h264: add nal_length_size and is_avc to the publically readable fields

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2011-11-02 18:39:42 +01:00
parent 913bc7996e
commit 146f99cfec

View File

@ -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