summaryrefslogtreecommitdiffstats
path: root/libavformat/riff.c
diff options
context:
space:
mode:
authorPeter Ross <pross@xvid.org>2011-04-05 20:36:55 +1000
committerMichael Niedermayer <michaelni@gmx.at>2011-04-07 17:54:52 +0200
commit36ffabc4eeab2e4489e83d874c19b86a4b44d25a (patch)
tree6b8da2f83aafaad5511e65315dfe5217dfd53002 /libavformat/riff.c
parentc1309b27d2fc57a18a22336c7812874191b2bdac (diff)
downloadffmpeg-streaming-36ffabc4eeab2e4489e83d874c19b86a4b44d25a.zip
ffmpeg-streaming-36ffabc4eeab2e4489e83d874c19b86a4b44d25a.tar.gz
move PRI_GUID, ARG_GUID, AVCodecGuid, ff_codec_guid_get_id, MEDIASUBTYPE_BASE_GUID and audio_guids[] to riff.c/h (add FF_ prefix to PRI_GUID, ARG_GUID, and MEDIASUBTYPE_BASE_GUID; rename audio_guids to ff_codec_wav_guids)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/riff.c')
-rw-r--r--libavformat/riff.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/libavformat/riff.c b/libavformat/riff.c
index b0a89de..03dda1f 100644
--- a/libavformat/riff.c
+++ b/libavformat/riff.c
@@ -320,6 +320,13 @@ const AVCodecTag ff_codec_wav_tags[] = {
{ CODEC_ID_NONE, 0 },
};
+const AVCodecGuid ff_codec_wav_guids[] = {
+ {CODEC_ID_AC3, {0x2C,0x80,0x6D,0xE0,0x46,0xDB,0xCF,0x11,0xB4,0xD1,0x00,0x80,0x5F,0x6C,0xBB,0xEA}},
+ {CODEC_ID_EAC3, {0xAF,0x87,0xFB,0xA7,0x02,0x2D,0xFB,0x42,0xA4,0xD4,0x05,0xCD,0x93,0x84,0x3B,0xDD}},
+ {CODEC_ID_MP2, {0x2B,0x80,0x6D,0xE0,0x46,0xDB,0xCF,0x11,0xB4,0xD1,0x00,0x80,0x5F,0x6C,0xBB,0xEA}},
+ {CODEC_ID_NONE}
+};
+
#if CONFIG_MUXERS
int64_t ff_start_tag(AVIOContext *pb, const char *tag)
{
@@ -590,3 +597,13 @@ void ff_get_guid(AVIOContext *s, ff_asf_guid *g)
assert(sizeof(*g) == 16);
avio_read(s, *g, sizeof(*g));
}
+
+enum CodecID ff_codec_guid_get_id(const AVCodecGuid *guids, ff_asf_guid guid)
+{
+ int i;
+ for (i = 0; guids[i].id != CODEC_ID_NONE; i++) {
+ if (!ff_guidcmp(guids[i].guid, guid))
+ return guids[i].id;
+ }
+ return CODEC_ID_NONE;
+}
OpenPOWER on IntegriCloud