[FFmpeg-cvslog] Support demuxing 4gv codec stored in qcp files

Paul B Mahol git at videolan.org
Sun Jun 21 11:37:07 CEST 2015


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Fri Jun 12 15:49:50 2015 +0000| [95ee0fbacfad9e79ed0f67e1e1980a53a4d2807e] | committer: Paul B Mahol

Support demuxing 4gv codec stored in qcp files

Signed-off-by: Paul B Mahol <onemda at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=95ee0fbacfad9e79ed0f67e1e1980a53a4d2807e
---

 libavcodec/avcodec.h    |    1 +
 libavcodec/codec_desc.c |    7 +++++++
 libavformat/qcp.c       |    7 +++++++
 3 files changed, 15 insertions(+)

diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index 77cddf8..b75b27e 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -500,6 +500,7 @@ enum AVCodecID {
     AV_CODEC_ID_DSD_MSBF    = MKBETAG('D','S','D','M'),
     AV_CODEC_ID_DSD_LSBF_PLANAR = MKBETAG('D','S','D','1'),
     AV_CODEC_ID_DSD_MSBF_PLANAR = MKBETAG('D','S','D','8'),
+    AV_CODEC_ID_4GV         = MKBETAG('s','4','g','v'),
 
     /* subtitle codecs */
     AV_CODEC_ID_FIRST_SUBTITLE = 0x17000,          ///< A dummy ID pointing at the start of subtitle codecs.
diff --git a/libavcodec/codec_desc.c b/libavcodec/codec_desc.c
index 81baf1e..87bbc776 100644
--- a/libavcodec/codec_desc.c
+++ b/libavcodec/codec_desc.c
@@ -2524,6 +2524,13 @@ static const AVCodecDescriptor codec_descriptors[] = {
         .props     = AV_CODEC_PROP_LOSSY,
     },
     {
+        .id        = AV_CODEC_ID_4GV,
+        .type      = AVMEDIA_TYPE_AUDIO,
+        .name      = "4gv",
+        .long_name = NULL_IF_CONFIG_SMALL("4GV (Fourth Generation Vocoder)"),
+        .props     = AV_CODEC_PROP_LOSSY,
+    },
+    {
         .id        = AV_CODEC_ID_DSD_LSBF,
         .type      = AVMEDIA_TYPE_AUDIO,
         .name      = "dsd_lsbf",
diff --git a/libavformat/qcp.c b/libavformat/qcp.c
index 9e2eedf..ad4a8ae 100644
--- a/libavformat/qcp.c
+++ b/libavformat/qcp.c
@@ -57,6 +57,11 @@ static const uint8_t guid_evrc[16] = {
     0x91, 0xef, 0x73, 0x6a, 0x51, 0x00, 0xce, 0xb4
 };
 
+static const uint8_t guid_4gv[16] = {
+    0xca, 0x29, 0xfd, 0x3c, 0x53, 0xf6, 0xf5, 0x4e,
+    0x90, 0xe9, 0xf4, 0x23, 0x6d, 0x59, 0x9b, 0x61
+};
+
 /**
  * SMV GUID as stored in the file
  */
@@ -106,6 +111,8 @@ static int qcp_read_header(AVFormatContext *s)
         st->codec->codec_id = AV_CODEC_ID_EVRC;
     } else if (!memcmp(buf, guid_smv, 16)) {
         st->codec->codec_id = AV_CODEC_ID_SMV;
+    } else if (!memcmp(buf, guid_4gv, 16)) {
+        st->codec->codec_id = AV_CODEC_ID_4GV;
     } else {
         av_log(s, AV_LOG_ERROR, "Unknown codec GUID "FF_PRI_GUID".\n",
                FF_ARG_GUID(buf));



More information about the ffmpeg-cvslog mailing list