From baed2ec4c2c2b0b5bf8b216fca28c88500bc1f61 Mon Sep 17 00:00:00 2001 From: Baptiste Coudurier Date: Sat, 31 Jan 2009 07:02:20 +0000 Subject: [PATCH] add aes3 pcm wrapping and use it by default Originally committed as revision 16895 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavformat/mxfenc.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/libavformat/mxfenc.c b/libavformat/mxfenc.c index a43a9a8..8c9ebad 100644 --- a/libavformat/mxfenc.c +++ b/libavformat/mxfenc.c @@ -70,6 +70,7 @@ typedef struct { } MXFContainerEssenceEntry; static void mxf_write_wav_desc(AVFormatContext *s, AVStream *st); +static void mxf_write_aes3_desc(AVFormatContext *s, AVStream *st); static void mxf_write_mpegvideo_desc(AVFormatContext *s, AVStream *st); static const MXFContainerEssenceEntry mxf_essence_container_uls[] = { @@ -77,6 +78,10 @@ static const MXFContainerEssenceEntry mxf_essence_container_uls[] = { { 0x06,0x0E,0x2B,0x34,0x01,0x02,0x01,0x01,0x0D,0x01,0x03,0x01,0x15,0x01,0x05,0x00 }, { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x03,0x04,0x01,0x02,0x02,0x01,0x00,0x00,0x00 }, CODEC_ID_MPEG2VIDEO, mxf_write_mpegvideo_desc }, + { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x0D,0x01,0x03,0x01,0x02,0x06,0x03,0x00 }, + { 0x06,0x0E,0x2B,0x34,0x01,0x02,0x01,0x01,0x0D,0x01,0x03,0x01,0x16,0x01,0x03,0x00 }, + { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x04,0x02,0x02,0x01,0x00,0x00,0x00,0x00 }, + CODEC_ID_PCM_S16LE, mxf_write_aes3_desc }, { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x0D,0x01,0x03,0x01,0x02,0x06,0x01,0x00 }, { 0x06,0x0E,0x2B,0x34,0x01,0x02,0x01,0x01,0x0D,0x01,0x03,0x01,0x16,0x01,0x01,0x00 }, { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x04,0x02,0x02,0x01,0x00,0x00,0x00,0x00 }, @@ -575,6 +580,7 @@ static void mxf_write_generic_desc(ByteIOContext *pb, AVStream *st, const UID ke static const UID mxf_mpegvideo_descriptor_key = { 0x06,0x0E,0x2B,0x34,0x02,0x53,0x01,0x01,0x0d,0x01,0x01,0x01,0x01,0x01,0x51,0x00 }; static const UID mxf_wav_descriptor_key = { 0x06,0x0E,0x2B,0x34,0x02,0x53,0x01,0x01,0x0d,0x01,0x01,0x01,0x01,0x01,0x48,0x00 }; +static const UID mxf_aes3_descriptor_key = { 0x06,0x0E,0x2B,0x34,0x02,0x53,0x01,0x01,0x0d,0x01,0x01,0x01,0x01,0x01,0x47,0x00 }; static void mxf_write_mpegvideo_desc(AVFormatContext *s, AVStream *st) { @@ -631,6 +637,11 @@ static void mxf_write_wav_desc(AVFormatContext *s, AVStream *st) mxf_write_generic_sound_desc(s, st, mxf_wav_descriptor_key, 93); } +static void mxf_write_aes3_desc(AVFormatContext *s, AVStream *st) +{ + mxf_write_generic_sound_desc(s, st, mxf_aes3_descriptor_key, 93); +} + static void mxf_write_package(AVFormatContext *s, enum MXFMetadataSetType type) { ByteIOContext *pb = s->pb; -- 2.7.4