On Thu, Apr 21, 2016 at 05:03:01PM +0300, Maksym Veremeyenko wrote: > Hi, > > attached patches extends Generic/CDDI/MPEG2 essence descriptors with > additional items. These items required by AMWA AS-10 MXF > specification. > > -- > Maksym Veremeyenko >
> mxfenc.c | 47 ++++++++++++++++++++++++++++++++++++++++++++++- > 1 file changed, 46 insertions(+), 1 deletion(-) > ac195a1f686025452a8dcb009ed62ec9a2b69db8 > 0002-Extend-mpeg2-video-descriptor-with-additional-items.patch > From 937b1e3f14d641b83a40c9dc5e64e227121dddfa Mon Sep 17 00:00:00 2001 > From: Maksym Veremeyenko <ve...@m1.tv> > Date: Thu, 21 Apr 2016 01:18:39 +0300 > Subject: [PATCH 2/2] Extend mpeg2 video descriptor with additional items > > --- > libavformat/mxfenc.c | 47 ++++++++++++++++++++++++++++++++++++++++++++++- > 1 files changed, 46 insertions(+), 1 deletions(-) > > diff --git a/libavformat/mxfenc.c b/libavformat/mxfenc.c > index ec42cf5..c658624 100644 > --- a/libavformat/mxfenc.c > +++ b/libavformat/mxfenc.c > @@ -50,6 +50,7 @@ > #include "libavcodec/dnxhddata.h" > #include "libavcodec/h264.h" > #include "libavcodec/internal.h" > +#include "libavcodec/mpegvideo.h" > #include "audiointerleave.h" > #include "avformat.h" > #include "avio_internal.h" > @@ -458,6 +459,14 @@ static const MXFLocalTagPair mxf_local_tag_batch[] = { > // MPEG video Descriptor > { 0x8000, > {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x05,0x04,0x01,0x06,0x02,0x01,0x0B,0x00,0x00}}, > /* BitRate */ > { 0x8007, > {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x05,0x04,0x01,0x06,0x02,0x01,0x0A,0x00,0x00}}, > /* ProfileAndLevel */ > + { 0x8001, > {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x05,0x04,0x01,0x06,0x02,0x01,0x02,0x00,0x00}}, > /* Single Sequence Flag */ > + { 0x8002, > {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x05,0x04,0x01,0x06,0x02,0x01,0x03,0x00,0x00}}, > /* Constant B Picture Flag */ > + { 0x8003, > {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x05,0x04,0x01,0x06,0x02,0x01,0x04,0x00,0x00}}, > /* Coded Content Scanning Kind */ > + { 0x8004, > {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x05,0x04,0x01,0x06,0x02,0x01,0x05,0x00,0x00}}, > /* Low Delay Indicator */ > + { 0x8005, > {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x05,0x04,0x01,0x06,0x02,0x01,0x06,0x00,0x00}}, > /* Closed GOP Indicator */ > + { 0x8006, > {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x05,0x04,0x01,0x06,0x02,0x01,0x07,0x00,0x00}}, > /* Identical GOP */ > + { 0x8008, > {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x05,0x04,0x01,0x06,0x02,0x01,0x08,0x00,0x00}}, > /* Maximum GOP Size */ > + { 0x8009, > {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x05,0x04,0x01,0x06,0x02,0x01,0x09,0x00,0x00}}, > /* Maximum B Picture Count */ > // Wave Audio Essence Descriptor > { 0x3D09, > {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x05,0x04,0x02,0x03,0x03,0x05,0x00,0x00,0x00}}, > /* Average Bytes Per Second */ > { 0x3D0A, > {0x06,0x0E,0x2B,0x34,0x01,0x01,0x01,0x05,0x04,0x02,0x03,0x02,0x01,0x00,0x00,0x00}}, > /* Block Align */ > @@ -1203,7 +1212,10 @@ static void mxf_write_mpegvideo_desc(AVFormatContext > *s, AVStream *st) > int profile_and_level = (st->codecpar->profile<<4) | st->codecpar->level; > > if (st->codecpar->codec_id != AV_CODEC_ID_H264) { > - mxf_write_cdci_common(s, st, mxf_mpegvideo_descriptor_key, 8+5); > + AVCodecContext *avctx = st->codec; > + MpegEncContext *mpeg = (avctx)?avctx->priv_data:NULL; this is not ok it breaks API and ABI, MpegEncContext can change without major version bumps, its not even guranteed the priv_data is a MpegEncContext also the data can be stream copied you can only take information from AVStream, AVCodecParameters, AVCodecContext side data and the AVPacket data and extradata [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Everything should be made as simple as possible, but not simpler. -- Albert Einstein
signature.asc
Description: Digital signature
_______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel