diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-11-02 18:39:42 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-11-02 18:53:57 +0100 |
commit | 146f99cfecb243f55e6e759dc1c754839ae0ade7 (patch) | |
tree | 1ba485d52e1cdf8ac7f9619629e7a1f0d44664d7 /libavcodec/h264.c | |
parent | 913bc7996e7cb6bd8616d0a2758e715ee912831f (diff) | |
download | ffmpeg-146f99cfecb243f55e6e759dc1c754839ae0ade7.tar.gz |
h264: add nal_length_size and is_avc to the publically readable fields
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/h264.c')
-rw-r--r-- | libavcodec/h264.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c index 3f6bc7290b..eb8b2f1245 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -26,6 +26,7 @@ */ #include "libavutil/imgutils.h" +#include "libavutil/opt.h" #include "internal.h" #include "dsputil.h" #include "avcodec.h" @@ -4231,6 +4232,26 @@ static const AVProfile profiles[] = { { FF_PROFILE_UNKNOWN }, }; +static const AVOption h264_options[] = { + {"is_avc", "is avc", offsetof(H264Context, is_avc), FF_OPT_TYPE_INT, {.dbl = 0}, 0, 1, 0}, + {"nal_length_size", "nal_length_size", offsetof(H264Context, nal_length_size), FF_OPT_TYPE_INT, {.dbl = 0}, 0, 4, 0}, + {NULL} +}; + +static const AVClass h264_class = { + "H264 Decoder", + av_default_item_name, + h264_options, + LIBAVUTIL_VERSION_INT, +}; + +static const AVClass h264_vdpau_class = { + "H264 VDPAU Decoder", + av_default_item_name, + h264_options, + LIBAVUTIL_VERSION_INT, +}; + AVCodec ff_h264_decoder = { .name = "h264", .type = AVMEDIA_TYPE_VIDEO, @@ -4246,6 +4267,7 @@ AVCodec ff_h264_decoder = { .init_thread_copy = ONLY_IF_THREADS_ENABLED(decode_init_thread_copy), .update_thread_context = ONLY_IF_THREADS_ENABLED(decode_update_thread_context), .profiles = NULL_IF_CONFIG_SMALL(profiles), + .priv_class = &h264_class, }; #if CONFIG_H264_VDPAU_DECODER @@ -4262,5 +4284,6 @@ AVCodec ff_h264_vdpau_decoder = { .long_name = NULL_IF_CONFIG_SMALL("H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (VDPAU acceleration)"), .pix_fmts = (const enum PixelFormat[]){PIX_FMT_VDPAU_H264, PIX_FMT_NONE}, .profiles = NULL_IF_CONFIG_SMALL(profiles), + .priv_class = &h264_vdpau_class, }; #endif |