[FFmpeg-devel] [PATCH 2/2 v2] lavf: Add function for accessing Matroska Codec <-> CodecID table
Derek Buitenhuis
derek.buitenhuis at gmail.com
Wed May 30 20:17:35 CEST 2012
Signed-off-by: Derek Buitenhuis <derek.buitenhuis at gmail.com>
---
doc/APIchanges | 3 +++
libavformat/Makefile | 7 ++++---
libavformat/avformat.h | 6 ++++++
libavformat/utils.c | 6 ++++++
4 files changed, 19 insertions(+), 3 deletions(-)
diff --git a/doc/APIchanges b/doc/APIchanges
index b14204a..f814d5b 100644
--- a/doc/APIchanges
+++ b/doc/APIchanges
@@ -15,6 +15,9 @@ libavutil: 2011-04-18
API changes, most recent first:
+2012-05-30 - xxxxxxx - lavf 54.5.100
+ Add avformat_get_mkv_codec_tags()
+
2012-05-24 - xxxxxxx - lavu 51.54.100
Move AVPALETTE_SIZE and AVPALETTE_COUNT macros from
libavcodec/avcodec.h to libavutil/pixfmt.h.
diff --git a/libavformat/Makefile b/libavformat/Makefile
index 18a0e19..679300a 100644
--- a/libavformat/Makefile
+++ b/libavformat/Makefile
@@ -13,6 +13,7 @@ OBJS = allformats.o \
cutils.o \
id3v1.o \
id3v2.o \
+ matroska.o \
metadata.o \
options.o \
os_support.o \
@@ -143,9 +144,9 @@ OBJS-$(CONFIG_LOAS_DEMUXER) += loasdec.o
OBJS-$(CONFIG_LXF_DEMUXER) += lxfdec.o
OBJS-$(CONFIG_M4V_DEMUXER) += m4vdec.o rawdec.o
OBJS-$(CONFIG_M4V_MUXER) += rawenc.o
-OBJS-$(CONFIG_MATROSKA_DEMUXER) += matroskadec.o matroska.o \
+OBJS-$(CONFIG_MATROSKA_DEMUXER) += matroskadec.o \
isom.o rmdec.o rm.o
-OBJS-$(CONFIG_MATROSKA_MUXER) += matroskaenc.o matroska.o \
+OBJS-$(CONFIG_MATROSKA_MUXER) += matroskaenc.o \
isom.o avc.o \
flacenc_header.o avlanguage.o
OBJS-$(CONFIG_MD5_MUXER) += md5enc.o
@@ -333,7 +334,7 @@ OBJS-$(CONFIG_W64_DEMUXER) += wav.o pcm.o
OBJS-$(CONFIG_WAV_DEMUXER) += wav.o pcm.o
OBJS-$(CONFIG_WAV_MUXER) += wav.o
OBJS-$(CONFIG_WC3_DEMUXER) += wc3movie.o
-OBJS-$(CONFIG_WEBM_MUXER) += matroskaenc.o matroska.o \
+OBJS-$(CONFIG_WEBM_MUXER) += matroskaenc.o \
isom.o avc.o \
flacenc_header.o avlanguage.o
OBJS-$(CONFIG_WSAUD_DEMUXER) += westwood_aud.o
diff --git a/libavformat/avformat.h b/libavformat/avformat.h
index c3dba8f..1c0d279 100644
--- a/libavformat/avformat.h
+++ b/libavformat/avformat.h
@@ -321,6 +321,7 @@ typedef struct AVFrac {
/* input/output formats */
struct AVCodecTag;
+struct CodecTags;
/**
* This structure contains the data a format has to probe a file.
@@ -1925,6 +1926,11 @@ const struct AVCodecTag *avformat_get_riff_audio_tags(void);
*/
/**
+ * @return the table mapping Matroska Codec IDs to libavcodec CodecIDs.
+ */
+const struct CodecTags *avformat_get_mkv_codec_tags(void);
+
+/**
* Guesses the sample aspect ratio of a frame, based on both the stream and the
* frame aspect ratio.
*
diff --git a/libavformat/utils.c b/libavformat/utils.c
index e7fd04a..d792903 100644
--- a/libavformat/utils.c
+++ b/libavformat/utils.c
@@ -39,6 +39,7 @@
#include "libavutil/parseutils.h"
#include "libavutil/timestamp.h"
#include "riff.h"
+#include "matroska.h"
#include "audiointerleave.h"
#include "url.h"
#include <sys/time.h>
@@ -4424,6 +4425,11 @@ const struct AVCodecTag *avformat_get_riff_audio_tags(void)
return ff_codec_wav_tags;
}
+const CodecTags *avformat_get_mkv_codec_tags(void)
+{
+ return ff_mkv_codec_tags;
+}
+
AVRational av_guess_sample_aspect_ratio(AVFormatContext *format, AVStream *stream, AVFrame *frame)
{
AVRational undef = {0, 1};
--
1.7.10
More information about the ffmpeg-devel
mailing list