[FFmpeg-cvslog] h264: add nal_length_size and is_avc to the publically readable fields
Michael Niedermayer
git at videolan.org
Wed Nov 2 19:01:32 CET 2011
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Wed Nov 2 18:39:42 2011 +0100| [146f99cfecb243f55e6e759dc1c754839ae0ade7] | committer: Michael Niedermayer
h264: add nal_length_size and is_avc to the publically readable fields
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=146f99cfecb243f55e6e759dc1c754839ae0ade7
---
libavcodec/h264.c | 23 +++++++++++++++++++++++
1 files changed, 23 insertions(+), 0 deletions(-)
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index 3f6bc72..eb8b2f1 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
More information about the ffmpeg-cvslog
mailing list