aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder/FfmpegDecoderPlugin.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-10-21 21:12:37 +0200
committerMax Kellermann <max@duempel.org>2013-10-21 21:12:37 +0200
commit82059645f18e4a8aa734e0a376d10bb52fc1cc7d (patch)
treee2d1c113c887cdafe95ec07419150d6b768211b6 /src/decoder/FfmpegDecoderPlugin.cxx
parent13e9f18403b98f8123b1b983c4680957d684e47b (diff)
downloadmpd-82059645f18e4a8aa734e0a376d10bb52fc1cc7d.tar.gz
mpd-82059645f18e4a8aa734e0a376d10bb52fc1cc7d.tar.xz
mpd-82059645f18e4a8aa734e0a376d10bb52fc1cc7d.zip
decoder: rename the struct to "Decoder"
Diffstat (limited to 'src/decoder/FfmpegDecoderPlugin.cxx')
-rw-r--r--src/decoder/FfmpegDecoderPlugin.cxx14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/decoder/FfmpegDecoderPlugin.cxx b/src/decoder/FfmpegDecoderPlugin.cxx
index f7743180b..5092bdf9e 100644
--- a/src/decoder/FfmpegDecoderPlugin.cxx
+++ b/src/decoder/FfmpegDecoderPlugin.cxx
@@ -91,14 +91,14 @@ mpd_ffmpeg_log_callback(gcc_unused void *ptr, int level,
}
struct AvioStream {
- struct decoder *decoder;
+ Decoder *const decoder;
struct input_stream *input;
AVIOContext *io;
unsigned char buffer[8192];
- AvioStream(struct decoder *_decoder, input_stream *_input)
+ AvioStream(Decoder *_decoder, input_stream *_input)
:decoder(_decoder), input(_input), io(nullptr) {}
~AvioStream() {
@@ -255,7 +255,7 @@ copy_interleave_frame(const AVCodecContext *codec_context,
}
static DecoderCommand
-ffmpeg_send_packet(struct decoder *decoder, struct input_stream *is,
+ffmpeg_send_packet(Decoder &decoder, struct input_stream *is,
const AVPacket *packet,
AVCodecContext *codec_context,
const AVRational *time_base,
@@ -341,7 +341,7 @@ ffmpeg_sample_format(enum AVSampleFormat sample_fmt)
}
static AVInputFormat *
-ffmpeg_probe(struct decoder *decoder, struct input_stream *is)
+ffmpeg_probe(Decoder *decoder, struct input_stream *is)
{
enum {
BUFFER_SIZE = 16384,
@@ -370,16 +370,16 @@ ffmpeg_probe(struct decoder *decoder, struct input_stream *is)
}
static void
-ffmpeg_decode(struct decoder *decoder, struct input_stream *input)
+ffmpeg_decode(Decoder &decoder, struct input_stream *input)
{
- AVInputFormat *input_format = ffmpeg_probe(decoder, input);
+ AVInputFormat *input_format = ffmpeg_probe(&decoder, input);
if (input_format == nullptr)
return;
FormatDebug(ffmpeg_domain, "detected input format '%s' (%s)",
input_format->name, input_format->long_name);
- AvioStream stream(decoder, input);
+ AvioStream stream(&decoder, input);
if (!stream.Open()) {
LogError(ffmpeg_domain, "Failed to open stream");
return;