summaryrefslogtreecommitdiffstats
path: root/libavformat/rawdec.h
diff options
context:
space:
mode:
Diffstat (limited to 'libavformat/rawdec.h')
-rw-r--r--libavformat/rawdec.h19
1 files changed, 17 insertions, 2 deletions
diff --git a/libavformat/rawdec.h b/libavformat/rawdec.h
index 3eb416b..85e0790 100644
--- a/libavformat/rawdec.h
+++ b/libavformat/rawdec.h
@@ -28,12 +28,19 @@
typedef struct FFRawVideoDemuxerContext {
const AVClass *class; /**< Class for private options. */
+ int raw_packet_size;
char *video_size; /**< String describing video size, set by a private option. */
char *pixel_format; /**< Set by a private option. */
AVRational framerate; /**< AVRational describing framerate, set by a private option. */
} FFRawVideoDemuxerContext;
+typedef struct FFRawDemuxerContext {
+ const AVClass *class; /**< Class for private options. */
+ int raw_packet_size;
+} FFRawDemuxerContext;
+
extern const AVOption ff_rawvideo_options[];
+extern const AVOption ff_raw_options[];
int ff_raw_read_partial_packet(AVFormatContext *s, AVPacket *pkt);
@@ -45,6 +52,14 @@ int ff_raw_subtitle_read_header(AVFormatContext *s);
int ff_raw_data_read_header(AVFormatContext *s);
+#define FF_RAW_DEMUXER_CLASS(name)\
+static const AVClass name ## _demuxer_class = {\
+ .class_name = #name " demuxer",\
+ .item_name = av_default_item_name,\
+ .option = ff_raw_options,\
+ .version = LIBAVUTIL_VERSION_INT,\
+};
+
#define FF_RAWVIDEO_DEMUXER_CLASS(name)\
static const AVClass name ## _demuxer_class = {\
.class_name = #name " demuxer",\
@@ -75,7 +90,7 @@ FF_DEF_RAWVIDEO_DEMUXER2(shortname, longname, probe, ext, id, AVFMT_GENERIC_INDE
static const AVClass name ## _demuxer_class = {\
.class_name = #name " demuxer",\
.item_name = av_default_item_name,\
- .option = NULL,\
+ .option = ff_raw_options,\
.version = LIBAVUTIL_VERSION_INT,\
};
@@ -90,7 +105,7 @@ AVInputFormat ff_ ## shortname ## _demuxer = {\
.extensions = ext,\
.flags = flag,\
.raw_codec_id = id,\
- .priv_data_size = 0,\
+ .priv_data_size = sizeof(FFRawDemuxerContext),\
.priv_class = &shortname ## _demuxer_class,\
};
OpenPOWER on IntegriCloud