[FFmpeg-devel] [PATCH 07/21] libavcodec/metaenc: added an encoder/decoder for timed metadata

erkki.seppala.ext at nokia.com erkki.seppala.ext at nokia.com
Tue Aug 23 12:03:25 EEST 2016


From: Erkki Seppälä <erkki.seppala.ext at nokia.com>

This encoder is used primarily with ISO media files and basically
copies the data, while allowing the rest of the FFMPEG to refer
to the meta data with its identifiers.

Signed-off-by: Erkki Seppälä <erkki.seppala.ext at nokia.com>
Signed-off-by: OZOPlayer <OZOPL at nokia.com>
---
 configure               | 4 ++--
 libavcodec/Makefile     | 2 +-
 libavcodec/allcodecs.c  | 3 +++
 libavcodec/codec_desc.c | 8 ++++++++
 4 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/configure b/configure
index 9b92426..ded5452 100755
--- a/configure
+++ b/configure
@@ -2848,11 +2848,11 @@ matroska_demuxer_select="iso_media riffdec"
 matroska_demuxer_suggest="bzlib lzo zlib"
 matroska_muxer_select="iso_media riffenc"
 mmf_muxer_select="riffenc"
-mov_demuxer_select="iso_media riffdec"
+mov_demuxer_select="iso_media riffdec meta_decoder"
 mov_demuxer_suggest="zlib"
 mov_muxer_select="iso_media riffenc rtpenc_chain"
 mp3_demuxer_select="mpegaudio_parser"
-mp4_muxer_select="mov_muxer"
+mp4_muxer_select="mov_muxer meta_encoder"
 mpegts_demuxer_select="iso_media"
 mpegts_muxer_select="adts_muxer latm_muxer"
 mpegtsraw_demuxer_select="mpegts_demuxer"
diff --git a/libavcodec/Makefile b/libavcodec/Makefile
index a6e79ce..98a7a8d 100644
--- a/libavcodec/Makefile
+++ b/libavcodec/Makefile
@@ -799,7 +799,7 @@ OBJS-$(CONFIG_VP9_DXVA2_HWACCEL)          += dxva2_vp9.o
 OBJS-$(CONFIG_VP9_VAAPI_HWACCEL)          += vaapi_vp9.o
 
 # libavformat dependencies
-OBJS-$(CONFIG_ISO_MEDIA)               += mpeg4audio.o mpegaudiodata.o
+OBJS-$(CONFIG_ISO_MEDIA)               += mpeg4audio.o mpegaudiodata.o metacodec.o
 
 OBJS-$(CONFIG_ADTS_MUXER)              += mpeg4audio.o
 OBJS-$(CONFIG_CAF_DEMUXER)             += ac3tab.o
diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c
index 4c6b94e..30d0243 100644
--- a/libavcodec/allcodecs.c
+++ b/libavcodec/allcodecs.c
@@ -687,4 +687,7 @@ void avcodec_register_all(void)
     REGISTER_PARSER(VP3,                vp3);
     REGISTER_PARSER(VP8,                vp8);
     REGISTER_PARSER(VP9,                vp9);
+
+    /* data, meta data */
+    REGISTER_ENCDEC(META,               meta);
 }
diff --git a/libavcodec/codec_desc.c b/libavcodec/codec_desc.c
index 24948ca..e85b51d 100644
--- a/libavcodec/codec_desc.c
+++ b/libavcodec/codec_desc.c
@@ -2965,6 +2965,14 @@ static const AVCodecDescriptor codec_descriptors[] = {
         .mime_types= MT("application/octet-stream"),
     },
 
+    {
+        .id        = AV_CODEC_ID_META,
+        .type      = AVMEDIA_TYPE_DATA,
+        .name      = "meta_data",
+        .long_name = NULL_IF_CONFIG_SMALL("binary data"),
+        .mime_types= MT("application/octet-stream"),
+    },
+
     /* deprecated codec ids */
 };
 
-- 
2.7.4



More information about the ffmpeg-devel mailing list