[vlc-devel] commit: Use VLC_CODEC for ADPCM_IMA_WAV (Jean-Baptiste Kempf )

git version control git at videolan.org
Fri Aug 28 09:39:08 CEST 2009


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Fri Aug 28 00:37:06 2009 +0200| [7289f1e5bfe419fb0f0c75ff2a6385a1d8c609e9] | committer: Jean-Baptiste Kempf 

Use VLC_CODEC for ADPCM_IMA_WAV

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=7289f1e5bfe419fb0f0c75ff2a6385a1d8c609e9
---

 include/vlc_codecs.h  |    2 +-
 include/vlc_fourcc.h  |    3 ++-
 modules/codec/adpcm.c |    2 +-
 modules/demux/wav.c   |    2 +-
 src/misc/fourcc.c     |    2 ++
 5 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/include/vlc_codecs.h b/include/vlc_codecs.h
index dcf555c..14d7af4 100644
--- a/include/vlc_codecs.h
+++ b/include/vlc_codecs.h
@@ -306,7 +306,7 @@ wave_format_tag_to_fourcc[] =
     { WAVE_FORMAT_IEEE_FLOAT, VLC_FOURCC( 'a', 'f', 'l', 't' ), "IEEE Float audio" },
     { WAVE_FORMAT_ALAW,       VLC_CODEC_ALAW,                   "A-Law" },
     { WAVE_FORMAT_MULAW,      VLC_CODEC_MULAW,                  "Mu-Law" },
-    { WAVE_FORMAT_IMA_ADPCM,  VLC_FOURCC( 'm', 's', 0x00,0x11), "Ima-ADPCM" },
+    { WAVE_FORMAT_IMA_ADPCM,  VLC_CODEC_ADPCM_IMA_WAV,          "Ima-ADPCM" },
     { WAVE_FORMAT_TRUESPEECH, VLC_FOURCC(0x22, 0x0, 0x0, 0x0 ), "Truespeech" },
     { WAVE_FORMAT_GSM610,     VLC_CODEC_GSM_MS,                 "Microsoft WAV GSM" },
     { WAVE_FORMAT_G726,       VLC_CODEC_ADPCM_G726,             "G.726 ADPCM" },
diff --git a/include/vlc_fourcc.h b/include/vlc_fourcc.h
index 1974518..59a92e6 100644
--- a/include/vlc_fourcc.h
+++ b/include/vlc_fourcc.h
@@ -218,10 +218,11 @@
 #define VLC_CODEC_ADPCM_XA  VLC_FOURCC('x','a',' ',' ')
 #define VLC_CODEC_ADPCM_ADX VLC_FOURCC('a','d','x',' ')
 #define VLC_CODEC_ADPCM_IMA_WS VLC_FOURCC('A','I','W','S')
-#define VLC_CODEC_VMDAUDIO  VLC_FOURCC('v','m','d','a')
 #define VLC_CODEC_ADPCM_G726 VLC_FOURCC('g','7','2','6')
 #define VLC_CODEC_ADPCM_SWF VLC_FOURCC('S','W','F','a')
 #define VLC_CODEC_ADPCM_MS  VLC_FOURCC('m','s',0x00,0x02)
+#define VLC_CODEC_ADPCM_IMA_WAV VLC_FOURCC('m','s',0x00,0x11)
+#define VLC_CODEC_VMDAUDIO  VLC_FOURCC('v','m','d','a')
 #define VLC_CODEC_AMR_NB    VLC_FOURCC('s','a','m','r')
 #define VLC_CODEC_AMR_WB    VLC_FOURCC('s','a','w','b')
 #define VLC_CODEC_ALAC      VLC_FOURCC('a','l','a','c')
diff --git a/modules/codec/adpcm.c b/modules/codec/adpcm.c
index 0639cee..a3d5c08 100644
--- a/modules/codec/adpcm.c
+++ b/modules/codec/adpcm.c
@@ -174,7 +174,7 @@ static int OpenDecoder( vlc_object_t *p_this )
         case VLC_FOURCC('i','m','a', '4'): /* IMA ADPCM */
             p_sys->codec = ADPCM_IMA_QT;
             break;
-        case VLC_FOURCC('m','s',0x00,0x11): /* IMA ADPCM */
+        case VLC_CODEC_ADPCM_IMA_WAV: /* IMA ADPCM */
             p_sys->codec = ADPCM_IMA_WAV;
             break;
         case VLC_CODEC_ADPCM_MS: /* MS ADPCM */
diff --git a/modules/demux/wav.c b/modules/demux/wav.c
index f06f83f..8dad269 100644
--- a/modules/demux/wav.c
+++ b/modules/demux/wav.c
@@ -323,7 +323,7 @@ static int Open( vlc_object_t * p_this )
                                 &p_sys->fmt ) )
             goto error;
         break;
-    case VLC_FOURCC( 'm', 's', 0x00, 0x11 ):
+    case VLC_CODEC_ADPCM_IMA_WAV:
         if( FrameInfo_IMA_ADPCM( &p_sys->i_frame_size, &p_sys->i_frame_samples,
                                  &p_sys->fmt ) )
             goto error;
diff --git a/src/misc/fourcc.c b/src/misc/fourcc.c
index c7cad4e..05511c9 100644
--- a/src/misc/fourcc.c
+++ b/src/misc/fourcc.c
@@ -909,6 +909,8 @@ static const entry_t p_list_audio[] = {
     B(VLC_CODEC_ADPCM_SWF, "Flash ADPCM Audio"),
         A("SWFa"),
 
+    B(VLC_CODEC_ADPCM_IMA_WAV, "IMA WAV ADPCM Audio"),
+        A("ms\x00\x11"),
 
     /* AMR */
     B(VLC_CODEC_AMR_NB, "AMR narrow band"),




More information about the vlc-devel mailing list