[FFmpeg-devel] [PATCH 3/3] Metadata demuxer.

Aurelien Jacobs aurel
Sun Dec 26 18:09:08 CET 2010


On Wed, Dec 15, 2010 at 12:02:54PM -0800, Baptiste Coudurier wrote:
> Hi,
> 
> On 12/15/2010 04:15 AM, Anton Khirnov wrote:
> >---
> >  doc/general.texi         |    2 +-
> >  libavcodec/avcodec.h     |    1 +
> >  libavformat/Makefile     |    1 +
> >  libavformat/allformats.c |    2 +-
> >  libavformat/metadec.c    |  173 ++++++++++++++++++++++++++++++++++++++++++++++
> >  5 files changed, 177 insertions(+), 2 deletions(-)
> >  create mode 100644 libavformat/metadec.c
> >
> >diff --git a/doc/general.texi b/doc/general.texi
> >index 410b8fa..582920c 100644
> >--- a/doc/general.texi
> >+++ b/doc/general.texi
> >@@ -118,7 +118,7 @@ library:
> >      @tab VR native stream format, used by Leitch/Harris' video servers.
> >  @item Matroska                  @tab X @tab X
> >  @item Matroska audio            @tab X @tab
> >- at item FFmpeg metadata           @tab X @tab
> >+ at item FFmpeg metadata           @tab X @tab X
> >      @tab Metadata in text format.
> >  @item MAXIS XA                  @tab   @tab X
> >      @tab Used in Sim City 3000; file extension .xa.
> >diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
> >index ecfc28b..7feaba1 100644
> >--- a/libavcodec/avcodec.h
> >+++ b/libavcodec/avcodec.h
> >@@ -406,6 +406,7 @@ enum CodecID {
> >
> >      CODEC_ID_MPEG2TS= 0x20000, /**<  _FAKE_ codec to indicate a raw MPEG-2 TS
> >                                  * stream (only used by libavformat) */
> >+    CODEC_ID_META=0x21000,   ///<  Dummy codec for streams containing only metadata information.
> 
> CODEC_ID_METADATA seems more appropriate to me.

I don't like this name too much... There's probably plenty of different
"metadata" file format out there.

For example dvdxchap(1) is producing text files which looks like this:
CHAPTER01=00:01:35.240
CHAPTER01NAME=Chapter 01
CHAPTER02=00:03:40:300
CHAPTER02NAME=Chapter 02
It is not as generic as the format proposed in this patch, but it may
be interesting to support too.

So just "metadata" seems too generic to me. I suggest something like
CODEC_ID_FFMETA or CODEC_ID_FFMETADATA and .ffmeta as a file extension.

Other than that, I like this patch!

Aurel



More information about the ffmpeg-devel mailing list