]> git.sesse.net Git - vlc/commitdiff
Used VLC_CODEC_* and vlc_fourcc_GetCodec when suitable.
authorLaurent Aimar <fenrir@videolan.org>
Mon, 11 May 2009 18:49:09 +0000 (20:49 +0200)
committerLaurent Aimar <fenrir@videolan.org>
Wed, 13 May 2009 19:18:19 +0000 (21:18 +0200)
 There will be some regressions, I used automatic sed replacement with manual
checks but there was a lot to change.
 It's only the first pass.

230 files changed:
include/vlc_codecs.h
include/vlc_es.h
include/vlc_fourcc.h
modules/access/dc1394.c
modules/access/dshow/dshow.cpp
modules/access/dshow/filter.cpp
modules/access/jack.c
modules/access/oss.c
modules/access/qtcapture.m
modules/access/rtp/rtp.c
modules/access/rtp/xiph.c
modules/access/screen/beos.cpp
modules/access/screen/mac.c
modules/access/screen/screen.c
modules/access/screen/win32.c
modules/access/screen/x11.c
modules/access/v4l.c
modules/access/v4l2.c
modules/audio_filter/channel_mixer/dolby.c
modules/audio_filter/channel_mixer/headphone.c
modules/audio_filter/channel_mixer/simple.c
modules/audio_filter/channel_mixer/trivial.c
modules/audio_filter/converter/a52tofloat32.c
modules/audio_filter/converter/a52tospdif.c
modules/audio_filter/converter/dtstofloat32.c
modules/audio_filter/converter/dtstospdif.c
modules/audio_filter/converter/fixed.c
modules/audio_filter/converter/float.c
modules/audio_filter/converter/mpgatofixed32.c
modules/audio_filter/equalizer.c
modules/audio_filter/format.c
modules/audio_filter/normvol.c
modules/audio_filter/param_eq.c
modules/audio_filter/resampler/bandlimited.c
modules/audio_filter/resampler/linear.c
modules/audio_filter/resampler/trivial.c
modules/audio_filter/resampler/ugly.c
modules/audio_filter/scaletempo.c
modules/audio_filter/spatializer/spatializer.cpp
modules/audio_mixer/float32.c
modules/audio_mixer/trivial.c
modules/audio_output/alsa.c
modules/audio_output/auhal.c
modules/audio_output/directx.c
modules/audio_output/file.c
modules/audio_output/jack.c
modules/audio_output/oss.c
modules/audio_output/portaudio.c
modules/audio_output/pulse.c
modules/audio_output/sdl.c
modules/audio_output/waveout.c
modules/codec/a52.c
modules/codec/aes3.c
modules/codec/araw.c
modules/codec/avcodec/audio.c
modules/codec/avcodec/chroma.c
modules/codec/avcodec/encoder.c
modules/codec/avcodec/video.c
modules/codec/cc.c
modules/codec/cdg.c
modules/codec/csri.c
modules/codec/cvdsub.c
modules/codec/dirac.c
modules/codec/dmo/dmo.c
modules/codec/dts.c
modules/codec/dvbsub.c
modules/codec/faad.c
modules/codec/fake.c
modules/codec/flac.c
modules/codec/fluidsynth.c
modules/codec/invmem.c
modules/codec/kate.c
modules/codec/libass.c
modules/codec/libmpeg2.c
modules/codec/lpcm.c
modules/codec/mash.cpp
modules/codec/mpeg_audio.c
modules/codec/png.c
modules/codec/quicktime.c
modules/codec/rawvideo.c
modules/codec/realaudio.c
modules/codec/realvideo.c
modules/codec/schroedinger.c
modules/codec/sdl_image.c
modules/codec/speex.c
modules/codec/spudec/parse.c
modules/codec/spudec/spudec.c
modules/codec/subtitles/subsdec.c
modules/codec/subtitles/subsusf.c
modules/codec/subtitles/t140.c
modules/codec/svcdsub.c
modules/codec/tarkin.c
modules/codec/telx.c
modules/codec/theora.c
modules/codec/twolame.c
modules/codec/vorbis.c
modules/codec/wmafixed/wma.c
modules/codec/x264.c
modules/codec/xvmc/xxmc.c
modules/codec/zvbi.c
modules/demux/asf/asf.c
modules/demux/au.c
modules/demux/cdg.c
modules/demux/dirac.c
modules/demux/flac.c
modules/demux/live555.cpp
modules/demux/mjpeg.c
modules/demux/mkv/matroska_segment.cpp
modules/demux/mpc.c
modules/demux/mpeg/es.c
modules/demux/mpeg/h264.c
modules/demux/mpeg/mpgv.c
modules/demux/nuv.c
modules/demux/ogg.c
modules/demux/ps.c
modules/demux/ps.h
modules/demux/pva.c
modules/demux/rawdv.c
modules/demux/rawvid.c
modules/demux/smf.c
modules/demux/subtitle.c
modules/demux/subtitle_asa.c
modules/demux/ts.c
modules/demux/tta.c
modules/demux/ty.c
modules/demux/vobsub.c
modules/demux/voc.c
modules/demux/wav.c
modules/gui/beos/AudioOutput.cpp
modules/gui/beos/VideoWindow.h
modules/gui/fbosd.c
modules/gui/qnx/aout.c
modules/gui/qnx/vout.c
modules/gui/skins2/src/file_bitmap.cpp
modules/misc/dummy/aout.c
modules/misc/dummy/vout.c
modules/misc/freetype.c
modules/misc/osd/osd_menu.c
modules/misc/quartztext.c
modules/misc/rtsp.c
modules/misc/stats/vout.c
modules/misc/svg.c
modules/misc/win32text.c
modules/packetizer/copy.c
modules/packetizer/dirac.c
modules/packetizer/h264.c
modules/packetizer/mlp.c
modules/packetizer/mpeg4audio.c
modules/packetizer/mpeg4video.c
modules/packetizer/mpegvideo.c
modules/packetizer/vc1.c
modules/video_chroma/grey_yuv.c
modules/video_chroma/i420_rgb.c
modules/video_chroma/i420_ymga.c
modules/video_chroma/i420_yuy2.c
modules/video_chroma/i422_i420.c
modules/video_chroma/i422_yuy2.c
modules/video_chroma/yuy2_i420.c
modules/video_chroma/yuy2_i422.c
modules/video_filter/alphamask.c
modules/video_filter/atmo/atmo.cpp
modules/video_filter/blend.c
modules/video_filter/bluescreen.c
modules/video_filter/chain.c
modules/video_filter/crop.c
modules/video_filter/deinterlace.c
modules/video_filter/dynamicoverlay/dynamicoverlay.c
modules/video_filter/dynamicoverlay/dynamicoverlay_commands.c
modules/video_filter/erase.c
modules/video_filter/extract.c
modules/video_filter/filter_picture.h
modules/video_filter/gaussianblur.c
modules/video_filter/invert.c
modules/video_filter/logo.c
modules/video_filter/magnify.c
modules/video_filter/marq.c
modules/video_filter/mosaic.c
modules/video_filter/motiondetect.c
modules/video_filter/opencv_example.cpp
modules/video_filter/opencv_wrapper.c
modules/video_filter/osdmenu.c
modules/video_filter/panoramix.c
modules/video_filter/postproc.c
modules/video_filter/remoteosd.c
modules/video_filter/rss.c
modules/video_filter/rv32.c
modules/video_filter/scale.c
modules/video_filter/swscale.c
modules/video_filter/swscale_maemo.c
modules/video_filter/transform.c
modules/video_filter/yuvp.c
modules/video_output/aa.c
modules/video_output/caca.c
modules/video_output/directfb.c
modules/video_output/fb.c
modules/video_output/ggi.c
modules/video_output/hd1000v.cpp
modules/video_output/mga.c
modules/video_output/msw/direct3d.c
modules/video_output/msw/directx.c
modules/video_output/msw/wingdi.c
modules/video_output/omapfb.c
modules/video_output/opengl.c
modules/video_output/opengllayer.m
modules/video_output/qte/qte.cpp
modules/video_output/sdl.c
modules/video_output/snapshot.c
modules/video_output/svgalib.c
modules/video_output/vmem.c
modules/video_output/x11/xcommon.c
modules/video_output/xcb/x11.c
modules/video_output/xcb/xvideo.c
modules/video_output/yuv.c
modules/visualization/galaktos/plugin.c
modules/visualization/goom.c
modules/visualization/visual/visual.c
src/audio_output/common.c
src/audio_output/output.c
src/input/decoder.c
src/input/es_out.c
src/misc/es_format.c
src/misc/image.c
src/osd/osd_text.c
src/osd/osd_widgets.c
src/video_output/video_output.c
src/video_output/video_text.c
src/video_output/vout_intf.c
src/video_output/vout_pictures.c
src/video_output/vout_pictures.h
src/video_output/vout_subpictures.c

index c9ff3292d95e7d3ddad2397831b14568b052b2ea..42362954694e23125866849148fa10d311cd5703 100644 (file)
@@ -24,6 +24,7 @@
 #ifndef VLC_CODECS_H
 #define VLC_CODECS_H 1
 
+#include <vlc_fourcc.h>
 /**
  * \file
  * This file defines codec related structures needed by the demuxers and decoders
@@ -302,35 +303,34 @@ wave_format_tag_to_fourcc[] =
     { WAVE_FORMAT_PCM,        VLC_FOURCC( 'a', 'r', 'a', 'w' ), "Raw audio" },
     { WAVE_FORMAT_ADPCM,      VLC_FOURCC( 'm', 's', 0x00,0x02), "ADPCM" },
     { WAVE_FORMAT_IEEE_FLOAT, VLC_FOURCC( 'a', 'f', 'l', 't' ), "IEEE Float audio" },
-    { WAVE_FORMAT_ALAW,       VLC_FOURCC( 'a', 'l', 'a', 'w' ), "A-Law" },
-    { WAVE_FORMAT_MULAW,      VLC_FOURCC( 'm', 'l', 'a', 'w' ), "Mu-Law" },
+    { 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_GSM610,     VLC_FOURCC( 'a', 'g', 's', 'm' ), "Microsoft WAV GSM" },
-    { WAVE_FORMAT_G726,       VLC_FOURCC( 'g', '7', '2', '6' ), "G.726 ADPCM" },
-    { WAVE_FORMAT_MPEGLAYER3, VLC_FOURCC( 'm', 'p', 'g', 'a' ), "Mpeg Audio" },
-    { WAVE_FORMAT_MPEG,       VLC_FOURCC( 'm', 'p', 'g', 'a' ), "Mpeg Audio" },
-    { WAVE_FORMAT_A52,        VLC_FOURCC( 'a', '5', '2', ' ' ), "A/52" },
-    { WAVE_FORMAT_WMA1,       VLC_FOURCC( 'w', 'm', 'a', '1' ), "Window Media Audio v1" },
-    { WAVE_FORMAT_WMA2,       VLC_FOURCC( 'w', 'm', 'a', '2' ), "Window Media Audio v2" },
-    { WAVE_FORMAT_WMA2,       VLC_FOURCC( 'w', 'm', 'a', ' ' ), "Window Media Audio v2" },
-    { WAVE_FORMAT_WMAP,       VLC_FOURCC( 'w', 'm', 'a', 'p' ), "Window Media Audio 9 Professional" },
-    { WAVE_FORMAT_WMAL,       VLC_FOURCC( 'w', 'm', 'a', 'l' ), "Window Media Audio 9 Lossless" },
-    { WAVE_FORMAT_WMAS,       VLC_FOURCC( 'w', 'm', 'a', 's' ), "Window Media Audio 9 Speech" },
+    { WAVE_FORMAT_GSM610,     VLC_CODEC_GSM_MS,                 "Microsoft WAV GSM" },
+    { WAVE_FORMAT_G726,       VLC_CODEC_ADPCM_G726,             "G.726 ADPCM" },
+    { WAVE_FORMAT_MPEGLAYER3, VLC_CODEC_MPGA,                   "Mpeg Audio" },
+    { WAVE_FORMAT_MPEG,       VLC_CODEC_MPGA,                   "Mpeg Audio" },
+    { WAVE_FORMAT_A52,        VLC_CODEC_A52,                    "A/52" },
+    { WAVE_FORMAT_WMA1,       VLC_CODEC_WMA1,                   "Window Media Audio v1" },
+    { WAVE_FORMAT_WMA2,       VLC_CODEC_WMA2,                   "Window Media Audio v2" },
+    { WAVE_FORMAT_WMAP,       VLC_CODEC_WMAP,                   "Window Media Audio 9 Professional" },
+    { WAVE_FORMAT_WMAL,       VLC_CODEC_WMAL,                   "Window Media Audio 9 Lossless" },
+    { WAVE_FORMAT_WMAS,       VLC_CODEC_WMAS,                   "Window Media Audio 9 Speech" },
     { WAVE_FORMAT_DK3,        VLC_FOURCC( 'm', 's', 0x00,0x61), "Duck DK3" },
     { WAVE_FORMAT_DK4,        VLC_FOURCC( 'm', 's', 0x00,0x62), "Duck DK4" },
-    { WAVE_FORMAT_DTS,        VLC_FOURCC( 'd', 't', 's', ' ' ), "DTS Coherent Acoustics" },
-    { WAVE_FORMAT_DTS_MS,     VLC_FOURCC( 'd', 't', 's', ' ' ), "DTS Coherent Acoustics" },
-    { WAVE_FORMAT_DIVIO_AAC,  VLC_FOURCC( 'm', 'p', '4', 'a' ), "MPEG-4 Audio (Divio)" },
-    { WAVE_FORMAT_AAC,        VLC_FOURCC( 'm', 'p', '4', 'a' ), "MPEG-4 Audio" },
-    { WAVE_FORMAT_FFMPEG_AAC, VLC_FOURCC( 'm', 'p', '4', 'a' ), "MPEG-4 Audio" },
-    { WAVE_FORMAT_VORBIS,     VLC_FOURCC( 'v', 'o', 'r', 'b' ), "Vorbis Audio" },
+    { WAVE_FORMAT_DTS,        VLC_CODEC_DTS,                    "DTS Coherent Acoustics" },
+    { WAVE_FORMAT_DTS_MS,     VLC_CODEC_DTS,                    "DTS Coherent Acoustics" },
+    { WAVE_FORMAT_DIVIO_AAC,  VLC_CODEC_MP4A,                   "MPEG-4 Audio (Divio)" },
+    { WAVE_FORMAT_AAC,        VLC_CODEC_MP4A,                   "MPEG-4 Audio" },
+    { WAVE_FORMAT_FFMPEG_AAC, VLC_CODEC_MP4A,                   "MPEG-4 Audio" },
+    { WAVE_FORMAT_VORBIS,     VLC_CODEC_VORBIS,                 "Vorbis Audio" },
     { WAVE_FORMAT_VORB_1,     VLC_FOURCC( 'v', 'o', 'r', '1' ), "Vorbis 1 Audio" },
     { WAVE_FORMAT_VORB_1PLUS, VLC_FOURCC( 'v', 'o', '1', '+' ), "Vorbis 1+ Audio" },
     { WAVE_FORMAT_VORB_2,     VLC_FOURCC( 'v', 'o', 'r', '2' ), "Vorbis 2 Audio" },
     { WAVE_FORMAT_VORB_2PLUS, VLC_FOURCC( 'v', 'o', '2', '+' ), "Vorbis 2+ Audio" },
     { WAVE_FORMAT_VORB_3,     VLC_FOURCC( 'v', 'o', 'r', '3' ), "Vorbis 3 Audio" },
     { WAVE_FORMAT_VORB_3PLUS, VLC_FOURCC( 'v', 'o', '3', '+' ), "Vorbis 3+ Audio" },
-    { WAVE_FORMAT_SPEEX,      VLC_FOURCC( 's', 'p', 'x', ' ' ), "Speex Audio" },
+    { WAVE_FORMAT_SPEEX,      VLC_CODEC_SPEEX,                  "Speex Audio" },
     { WAVE_FORMAT_UNKNOWN,    VLC_FOURCC( 'u', 'n', 'd', 'f' ), "Unknown" }
 };
 
index ecaa843f659e5846e6c788103ea296c8462eb446..ad19c51350e3e7faf2a4eee4fab6d7ba14a9e78d 100644 (file)
@@ -99,13 +99,8 @@ struct audio_format_t
     uint8_t      i_flavor;
 };
 
-#ifdef WORDS_BIGENDIAN
-#   define AUDIO_FMT_S16_NE VLC_FOURCC('s','1','6','b')
-#   define AUDIO_FMT_U16_NE VLC_FOURCC('u','1','6','b')
-#else
-#   define AUDIO_FMT_S16_NE VLC_FOURCC('s','1','6','l')
-#   define AUDIO_FMT_U16_NE VLC_FOURCC('u','1','6','l')
-#endif
+#define AUDIO_FMT_S16_NE VLC_CODEC_S16N
+#define AUDIO_FMT_U16_NE VLC_CODEC_U16N
 
 /**
  * video format description
index 6951228ed85202a6804d508b497eb8a09c4b9355..c041a8e6c9fd774aa54154afb44d612b354f4aba 100644 (file)
 #define VLC_CODEC_GREY      VLC_FOURCC('G','R','E','Y')
 /* Packed YUV 4:2:2, U:Y:V:Y */
 #define VLC_CODEC_UYVY      VLC_FOURCC('U','Y','V','Y')
+/* Packed YUV 4:2:2, V:Y:U:Y */
+#define VLC_CODEC_VYUY      VLC_FOURCC('V','Y','U','Y')
 /* Packed YUV 4:2:2, Y:U:Y:V */
 #define VLC_CODEC_YUYV      VLC_FOURCC('Y','U','Y','2')
 /* Packed YUV 4:2:2, Y:V:Y:U */
index 9fa05aa8f5dd7bf0ff7e99c02b41636b97d8ba1e..ab2cd1d42450dc16dda98e5f28b86886eeff6aca 100644 (file)
@@ -478,11 +478,11 @@ static int Open( vlc_object_t *p_this )
     i_height = p_sys->camera.frame_height;
 
     i_aspect = vout_InitPicture( VLC_OBJECT(p_demux), &p_sys->pic,
-                    VLC_FOURCC('U', 'Y', 'V', 'Y'),
+                    VLC_CODEC_UYVY,
                     i_width, i_height,
                     i_width * VOUT_ASPECT_FACTOR / i_height );
 
-    es_format_Init( &fmt, VIDEO_ES, VLC_FOURCC('U', 'Y', 'V', 'Y') );
+    es_format_Init( &fmt, VIDEO_ES, VLC_CODEC_UYVY );
 
     fmt.video.i_width = i_width;
     fmt.video.i_height = i_height;
@@ -498,11 +498,11 @@ static int Open( vlc_object_t *p_this )
         if( p_sys->fd_audio >= 0 )
         {
             es_format_t fmt;
-            es_format_Init( &fmt, AUDIO_ES, VLC_FOURCC('a','r','a','w') );
+            es_format_Init( &fmt, AUDIO_ES, VLC_CODEC_S16L ); /* FIXME: hmm, ?? */
 
             fmt.audio.i_channels = p_sys->channels ? p_sys->channels : 1;
             fmt.audio.i_rate = p_sys->i_sample_rate;
-            fmt.audio.i_bitspersample = 16; /* FIXME: hmm, ?? */
+            fmt.audio.i_bitspersample = 16;
             fmt.audio.i_blockalign = fmt.audio.i_channels *
                                      fmt.audio.i_bitspersample / 8;
             fmt.i_bitrate = fmt.audio.i_channels * fmt.audio.i_rate *
index 5dbce84fa6923adae5298bd6e98d62eb1ef98436..729648aa58514ef23484b54e902de7903db2d7b4 100644 (file)
@@ -421,8 +421,9 @@ static int CommonOpen( vlc_object_t *p_this, access_sys_t *p_sys,
     var_Get( p_this, "dshow-chroma", &val );
     if( val.psz_string && strlen( val.psz_string ) >= 4 )
     {
-        i_chroma = VLC_FOURCC( val.psz_string[0], val.psz_string[1],
-                               val.psz_string[2], val.psz_string[3] );
+        i_chroma = vlc_fourcc_GetCodec( UNKNOWN_ES,
+                                        VLC_FOURCC( val.psz_string[0], val.psz_string[1],
+                                                    val.psz_string[2], val.psz_string[3] ) );
         p_sys->b_chroma = true;
     }
     free( val.psz_string );
@@ -488,11 +489,9 @@ static int CommonOpen( vlc_object_t *p_this, access_sys_t *p_sys,
         if( p_stream->mt.majortype == MEDIATYPE_Video )
         {
             if( /* Raw DV stream */
-                p_stream->i_fourcc == VLC_FOURCC('d','v','s','l') ||
-                p_stream->i_fourcc == VLC_FOURCC('d','v','s','d') ||
-                p_stream->i_fourcc == VLC_FOURCC('d','v','h','d') ||
+                p_stream->i_fourcc == VLC_CODEC_DV ||
                 /* Raw MPEG video stream */
-                p_stream->i_fourcc == VLC_FOURCC('m','p','2','v') )
+                p_stream->i_fourcc == VLC_CODEC_MP2V )
             {
                 b_use_audio = false;
 
@@ -668,7 +667,7 @@ static int DemuxOpen( vlc_object_t *p_this )
             }
 
             /* Setup rgb mask for RGB formats */
-            if( p_stream->i_fourcc == VLC_FOURCC('R','V','2','4') )
+            if( p_stream->i_fourcc == VLC_CODEC_RGB24 )
             {
                 /* This is in BGR format */
                 fmt.video.i_bmask = 0x00ff0000;
@@ -725,14 +724,12 @@ static int AccessOpen( vlc_object_t *p_this )
     /* Check if we need to force demuxers */
     if( !p_access->psz_demux || !*p_access->psz_demux )
     {
-        if( p_stream->i_fourcc == VLC_FOURCC('d','v','s','l') ||
-            p_stream->i_fourcc == VLC_FOURCC('d','v','s','d') ||
-            p_stream->i_fourcc == VLC_FOURCC('d','v','h','d') )
+        if( p_stream->i_fourcc == VLC_CODEC_DV )
         {
             free( p_access->psz_demux );
             p_access->psz_demux = strdup( "rawdv" );
         }
-        else if( p_stream->i_fourcc == VLC_FOURCC('m','p','2','v') )
+        else if( p_stream->i_fourcc == VLC_CODEC_MP2V )
         {
             free( p_access->psz_demux );
             p_access->psz_demux = strdup( "mpgv" );
@@ -912,17 +909,17 @@ static int GetFourCCPriority( int i_fourcc )
 {
     switch( i_fourcc )
     {
-    case VLC_FOURCC('I','4','2','0'):
-    case VLC_FOURCC('f','l','3','2'):
+    case VLC_CODEC_I420:
+    case VLC_CODEC_FL32:
         return 9;
-    case VLC_FOURCC('Y','V','1','2'):
+    case VLC_CODEC_YV12:
     case VLC_FOURCC('a','r','a','w'):
         return 8;
-    case VLC_FOURCC('R','V','2','4'):
+    case VLC_CODEC_RGB24:
         return 7;
-    case VLC_FOURCC('Y','U','Y','2'):
-    case VLC_FOURCC('R','V','3','2'):
-    case VLC_FOURCC('R','G','B','A'):
+    case VLC_CODEC_YUYV:
+    case VLC_CODEC_RGB32:
+    case VLC_CODEC_RGBA:
         return 6;
     }
 
@@ -1478,7 +1475,7 @@ static size_t EnumDeviceCaps( vlc_object_t *p_this, IBaseFilter *p_filter,
                                     val = i_bitspersample;
                                     if( ! val )
                                     {
-                                        if( VLC_FOURCC('f', 'l', '3', '2') == i_current_fourcc )
+                                        if( VLC_CODEC_FL32 == i_current_fourcc )
                                             val = 32;
                                         else
                                             val = 16;
@@ -1655,7 +1652,7 @@ static size_t EnumDeviceCaps( vlc_object_t *p_this, IBaseFilter *p_filter,
                 {
                     // output format for 'Hauppauge WinTV PVR PCI II Capture'
                     // try I420 as an input format
-                    i_current_fourcc = VLC_FOURCC('I','4','2','0');
+                    i_current_fourcc = VLC_CODEC_I420;
                     if( !i_fourcc || i_fourcc == i_current_fourcc )
                     {
                         // return alternative media type
@@ -1680,7 +1677,7 @@ static size_t EnumDeviceCaps( vlc_object_t *p_this, IBaseFilter *p_filter,
                             ((VIDEOINFOHEADER *)p_mt->pbFormat)->bmiHeader.biHeight;
                         vh.bmiHeader.biPlanes      = 3;
                         vh.bmiHeader.biBitCount    = 12;
-                        vh.bmiHeader.biCompression = VLC_FOURCC('I','4','2','0');
+                        vh.bmiHeader.biCompression = VLC_CODEC_I420;
                         vh.bmiHeader.biSizeImage   = vh.bmiHeader.biWidth * 12 *
                             vh.bmiHeader.biHeight / 8;
                         mtr.lSampleSize            = vh.bmiHeader.biSizeImage;
index 456aa87597aad24cf0c62df4e7a6c5a90c78ce21..8262e66ba4da8a33542a4e977c157241a2bf5e3c 100644 (file)
@@ -242,67 +242,67 @@ int GetFourCCFromMediaType( const AM_MEDIA_TYPE &media_type )
             else if( media_type.subtype == MEDIASUBTYPE_RGB8 )
                i_fourcc = VLC_FOURCC( 'R', 'G', 'B', '8' );
             else if( media_type.subtype == MEDIASUBTYPE_RGB555 )
-               i_fourcc = VLC_FOURCC( 'R', 'V', '1', '5' );
+               i_fourcc = VLC_CODEC_RGB15;
             else if( media_type.subtype == MEDIASUBTYPE_RGB565 )
-               i_fourcc = VLC_FOURCC( 'R', 'V', '1', '6' );
+               i_fourcc = VLC_CODEC_RGB16;
             else if( media_type.subtype == MEDIASUBTYPE_RGB24 )
-               i_fourcc = VLC_FOURCC( 'R', 'V', '2', '4' );
+               i_fourcc = VLC_CODEC_RGB24;
             else if( media_type.subtype == MEDIASUBTYPE_RGB32 )
-               i_fourcc = VLC_FOURCC( 'R', 'V', '3', '2' );
+               i_fourcc = VLC_CODEC_RGB32;
             else if( media_type.subtype == MEDIASUBTYPE_ARGB32 )
-               i_fourcc = VLC_FOURCC( 'R', 'G', 'B', 'A' );
+               i_fourcc = VLC_CODEC_RGBA;
 
             /* Planar YUV formats */
             else if( media_type.subtype == MEDIASUBTYPE_I420 )
-               i_fourcc = VLC_FOURCC( 'I', '4', '2', '0' );
+               i_fourcc = VLC_CODEC_I420;
             else if( media_type.subtype == MEDIASUBTYPE_Y41P )
-               i_fourcc = VLC_FOURCC( 'I', '4', '1', '1' );
+               i_fourcc = VLC_CODEC_I411;
             else if( media_type.subtype == MEDIASUBTYPE_YV12 )
-               i_fourcc = VLC_FOURCC( 'Y', 'V', '1', '2' );
+               i_fourcc = VLC_CODEC_YV12;
             else if( media_type.subtype == MEDIASUBTYPE_IYUV )
-               i_fourcc = VLC_FOURCC( 'Y', 'V', '1', '2' );
+               i_fourcc = VLC_CODEC_YV12;
             else if( media_type.subtype == MEDIASUBTYPE_YVU9 )
-               i_fourcc = VLC_FOURCC( 'Y', 'V', 'U', '9' );
+               i_fourcc = VLC_CODEC_I410;
 
             /* Packed YUV formats */
             else if( media_type.subtype == MEDIASUBTYPE_YVYU )
-               i_fourcc = VLC_FOURCC( 'Y', 'V', 'Y', 'U' );
+               i_fourcc = VLC_CODEC_YVYU;
             else if( media_type.subtype == MEDIASUBTYPE_YUYV )
-               i_fourcc = VLC_FOURCC( 'Y', 'U', 'Y', '2' );
+               i_fourcc = VLC_CODEC_YUYV;
             else if( media_type.subtype == MEDIASUBTYPE_Y411 )
                i_fourcc = VLC_FOURCC( 'I', '4', '1', 'N' );
             else if( media_type.subtype == MEDIASUBTYPE_Y211 )
-               i_fourcc = VLC_FOURCC( 'Y', '2', '1', '1' );
+               i_fourcc = VLC_CODEC_Y211;
             else if( media_type.subtype == MEDIASUBTYPE_YUY2 )
-               i_fourcc = VLC_FOURCC( 'Y', 'U', 'Y', '2' );
+               i_fourcc = VLC_CODEC_YUYV;
             else if( media_type.subtype == MEDIASUBTYPE_UYVY )
-               i_fourcc = VLC_FOURCC( 'U', 'Y', 'V', 'Y' );
+               i_fourcc = VLC_CODEC_UYVY;
             /* HDYC uses UYVY sample positions but Rec709 colourimetry */
             /* FIXME: When VLC understands colourspace, something will need
              * to be added / changed here. Until then, just make it behave
              * like UYVY */
             else if( media_type.subtype == MEDIASUBTYPE_HDYC )
-                i_fourcc = VLC_FOURCC( 'U', 'Y', 'V', 'Y');
+                i_fourcc = VLC_CODEC_UYVY;
 
             /* MPEG2 video elementary stream */
             else if( media_type.subtype == MEDIASUBTYPE_MPEG2_VIDEO )
-               i_fourcc = VLC_FOURCC( 'm', 'p', '2', 'v' );
+               i_fourcc = VLC_CODEC_MP2V;
 
-        /* DivX video */
+            /* DivX video */
             else if( media_type.subtype == MEDIASUBTYPE_DIVX )
-               i_fourcc = VLC_FOURCC( 'D', 'I', 'V', 'X' );
+               i_fourcc = VLC_CODEC_MP4V;
 
             /* DV formats */
             else if( media_type.subtype == MEDIASUBTYPE_dvsl )
-               i_fourcc = VLC_FOURCC( 'd', 'v', 's', 'l' );
+               i_fourcc = VLC_CODEC_DV;
             else if( media_type.subtype == MEDIASUBTYPE_dvsd )
-               i_fourcc = VLC_FOURCC( 'd', 'v', 's', 'd' );
+               i_fourcc = VLC_CODEC_DV;
             else if( media_type.subtype == MEDIASUBTYPE_dvhd )
-               i_fourcc = VLC_FOURCC( 'd', 'v', 'h', 'd' );
+               i_fourcc = VLC_CODEC_DV;
 
             /* MJPEG format */
             else if( media_type.subtype == MEDIASUBTYPE_MJPG )
-                i_fourcc = VLC_FOURCC( 'M', 'J', 'P', 'G' );
+                i_fourcc = VLC_CODEC_MJPG;
 
         }
     }
@@ -314,7 +314,7 @@ int GetFourCCFromMediaType( const AM_MEDIA_TYPE &media_type )
             if( media_type.subtype == MEDIASUBTYPE_PCM )
                 i_fourcc = VLC_FOURCC( 'a', 'r', 'a', 'w' );
             else if( media_type.subtype == MEDIASUBTYPE_IEEE_FLOAT )
-                i_fourcc = VLC_FOURCC( 'f', 'l', '3', '2' );
+                i_fourcc = VLC_CODEC_FL32;
         }
     }
     else if( media_type.majortype == MEDIATYPE_Stream )
index 8e05040d4a31b88256591ee4583e8dad96515b42..ed87e881d39e751d7aa0d5f202e73f09ebc62406 100644 (file)
@@ -305,7 +305,7 @@ static int Open( vlc_object_t *p_this )
     p_sys->jack_sample_size = sizeof( jack_default_audio_sample_t );
 
     /* Define output format */
-    es_format_Init( &fmt, AUDIO_ES, VLC_FOURCC( 'f','l','3','2' ) );
+    es_format_Init( &fmt, AUDIO_ES, VLC_CODEC_FL32 );
     fmt.audio.i_channels =  p_sys->i_channels;
     fmt.audio.i_rate =  p_sys->jack_sample_rate;
     fmt.audio.i_bitspersample =  p_sys->jack_sample_size * 8;
index 7ea65275881bd78f28ebce2729d4b58c5e280971..140b0f9e314387a5a191cb197da1a62e14e4dbc7 100644 (file)
@@ -397,7 +397,7 @@ static int OpenAudioDev( demux_t *p_demux )
              p_sys->i_sample_rate );
 
     es_format_t fmt;
-    es_format_Init( &fmt, AUDIO_ES, VLC_FOURCC('a','r','a','w') );
+    es_format_Init( &fmt, AUDIO_ES, VLC_CODEC_S16L );
 
     fmt.audio.i_channels = p_sys->b_stereo ? 2 : 1;
     fmt.audio.i_rate = p_sys->i_sample_rate;
index 088378f74923c0aa8905692769ba3e09112161bf..cc8f05687c366de54c8bf7aa36eb0d7c48048504 100644 (file)
@@ -171,8 +171,8 @@ static int qtchroma_to_fourcc( int i_qt )
     } qtchroma_to_fourcc[] =
     {
         /* Raw data types */
-        { k422YpCbCr8CodecType,    VLC_FOURCC('U','Y','V','Y') },
-        { kComponentVideoCodecType,VLC_FOURCC('Y','U','Y','2') },
+        { k422YpCbCr8CodecType,    VLC_CODEC_UYVY },
+        { kComponentVideoCodecType,VLC_CODEC_YUYV },
         { 0, 0 }
     };
     int i;
index 1f8c6f687104cd4641fdbfe581a5610ad8b95ca2..15075ad61767ec40c47f9dba6e84984f277697c2 100644 (file)
@@ -452,7 +452,7 @@ static void *pcmu_init (demux_t *demux)
 {
     es_format_t fmt;
 
-    es_format_Init (&fmt, AUDIO_ES, VLC_FOURCC ('u', 'l', 'a', 'w'));
+    es_format_Init (&fmt, AUDIO_ES, VLC_CODEC_MULAW);
     fmt.audio.i_rate = 8000;
     fmt.audio.i_channels = 1;
     return codec_init (demux, &fmt);
@@ -465,7 +465,7 @@ static void *gsm_init (demux_t *demux)
 {
     es_format_t fmt;
 
-    es_format_Init (&fmt, AUDIO_ES, VLC_FOURCC ('g', 's', 'm', ' '));
+    es_format_Init (&fmt, AUDIO_ES, VLC_CODEC_GSM);
     fmt.audio.i_rate = 8000;
     fmt.audio.i_channels = 1;
     return codec_init (demux, &fmt);
@@ -478,7 +478,7 @@ static void *pcma_init (demux_t *demux)
 {
     es_format_t fmt;
 
-    es_format_Init (&fmt, AUDIO_ES, VLC_FOURCC ('a', 'l', 'a', 'w'));
+    es_format_Init (&fmt, AUDIO_ES, VLC_CODEC_ALAW);
     fmt.audio.i_rate = 8000;
     fmt.audio.i_channels = 1;
     return codec_init (demux, &fmt);
@@ -491,7 +491,7 @@ static void *l16s_init (demux_t *demux)
 {
     es_format_t fmt;
 
-    es_format_Init (&fmt, AUDIO_ES, VLC_FOURCC ('s', '1', '6', 'b'));
+    es_format_Init (&fmt, AUDIO_ES, VLC_CODEC_S16B);
     fmt.audio.i_rate = 44100;
     fmt.audio.i_channels = 2;
     return codec_init (demux, &fmt);
@@ -501,7 +501,7 @@ static void *l16m_init (demux_t *demux)
 {
     es_format_t fmt;
 
-    es_format_Init (&fmt, AUDIO_ES, VLC_FOURCC ('s', '1', '6', 'b'));
+    es_format_Init (&fmt, AUDIO_ES, VLC_CODEC_S16B);
     fmt.audio.i_rate = 44100;
     fmt.audio.i_channels = 1;
     return codec_init (demux, &fmt);
@@ -514,7 +514,7 @@ static void *qcelp_init (demux_t *demux)
 {
     es_format_t fmt;
 
-    es_format_Init (&fmt, AUDIO_ES, VLC_FOURCC ('Q', 'c', 'l', 'p'));
+    es_format_Init (&fmt, AUDIO_ES, VLC_CODEC_QCELP);
     fmt.audio.i_rate = 8000;
     fmt.audio.i_channels = 1;
     return codec_init (demux, &fmt);
@@ -527,7 +527,7 @@ static void *mpa_init (demux_t *demux)
 {
     es_format_t fmt;
 
-    es_format_Init (&fmt, AUDIO_ES, VLC_FOURCC ('m', 'p', 'g', 'a'));
+    es_format_Init (&fmt, AUDIO_ES, VLC_CODEC_MPGA);
     fmt.audio.i_channels = 2;
     fmt.b_packetized = false;
     return codec_init (demux, &fmt);
@@ -555,7 +555,7 @@ static void *mpv_init (demux_t *demux)
 {
     es_format_t fmt;
 
-    es_format_Init (&fmt, VIDEO_ES, VLC_FOURCC ('m', 'p', 'g', 'v'));
+    es_format_Init (&fmt, VIDEO_ES, VLC_CODEC_MPGV);
     fmt.b_packetized = false;
     return codec_init (demux, &fmt);
 }
index 7f6492e64418a4b4b09a84ada00c0985494f3d15..8a98bd624a469143fea0a81130942b6607be4465 100644 (file)
@@ -250,7 +250,7 @@ static void vorbis_decode (demux_t *demux, void *data, block_t *block)
                     break;
 
                 es_format_t fmt;
-                es_format_Init (&fmt, AUDIO_ES, VLC_FOURCC ('v','o','r','b'));
+                es_format_Init (&fmt, AUDIO_ES, VLC_CODEC_VORBIS);
                 fmt.p_extra = extv;
                 fmt.i_extra = extc;
                 codec_destroy (demux, self->id);
index 165250c9c301dc59741e1456decda7db7c354281..5f70cdc66b2637c242978e99c9445dedc43ae6fe 100644 (file)
@@ -61,11 +61,11 @@ int screen_InitCapture( demux_t *p_demux )
     switch( p_data->p_screen->ColorSpace() )
     {
         case B_RGB32:
-            i_chroma = VLC_FOURCC('R','V','3','2');
+            i_chroma = VLC_CODEC_RGB32;
             i_bits_per_pixel = 32;
             break;
         case B_RGB16:
-            i_chroma = VLC_FOURCC('R','V','1','6');
+            i_chroma = VLC_CODEC_RGB16;
             i_bits_per_pixel = 16;
             break;
         default:
index 5b14fdd610773963176644ee76abcd8d5e1d8590..f469bac99476b3bda622c3d096b884d91e43d132 100644 (file)
@@ -129,7 +129,7 @@ int screen_InitCapture( demux_t *p_demux )
     CGLSetOffScreen( p_data->scaled, p_data->dest_width, p_data->dest_height,
                      p_data->dest_width * 4, p_data->scaled_image );
     
-    es_format_Init( &p_sys->fmt, VIDEO_ES, VLC_FOURCC( 'R','V','3','2' ) );
+    es_format_Init( &p_sys->fmt, VIDEO_ES, VLC_CODEC_RGB32 );
     
     /* p_sys->fmt.video.i_* must set to screen size, not subscreen size */
     p_sys->fmt.video.i_width = p_data->screen_width;
index e70b168e28e73de7807a70069f1f642b720f6b1d..173823c4334c29725db0669a032918fe5c8972f7 100644 (file)
@@ -212,7 +212,7 @@ static int Open( vlc_object_t *p_this )
         msg_Dbg( p_demux, "Using %s for the mouse pointer image", psz_mouse );
         memset( &fmt_in, 0, sizeof( fmt_in ) );
         memset( &fmt_out, 0, sizeof( fmt_out ) );
-        fmt_out.i_chroma = VLC_FOURCC('R','G','B','A');
+        fmt_out.i_chroma = VLC_CODEC_RGBA;
         p_image = image_HandlerCreate( p_demux );
         if( p_image )
         {
@@ -347,7 +347,7 @@ void RenderCursor( demux_t *p_demux, int i_x, int i_y,
         if( p_sys->p_blend )
         {
             es_format_Init( &p_sys->p_blend->fmt_in, VIDEO_ES,
-                            VLC_FOURCC('R','G','B','A') );
+                            VLC_CODEC_RGBA );
             p_sys->p_blend->fmt_in.video = p_sys->p_mouse->format;
             p_sys->p_blend->fmt_out = p_sys->fmt;
             p_sys->p_blend->p_module =
index e0cfd7abfb53add3df95916eb02c6d91a0e9aacb..01cac097c9d8711324ea49465ffc669950ef2a04 100644 (file)
@@ -81,14 +81,14 @@ int screen_InitCapture( demux_t *p_demux )
     switch( i_bits_per_pixel )
     {
     case 8: /* FIXME: set the palette */
-        i_chroma = VLC_FOURCC('R','G','B','2'); break;
+        i_chroma = VLC_CODEC_RGB8; break;
     case 15:
     case 16:    /* Yes it is really 15 bits (when using BI_RGB) */
-        i_chroma = VLC_FOURCC('R','V','1','5'); break;
+        i_chroma = VLC_CODEC_RGB15; break;
     case 24:
-        i_chroma = VLC_FOURCC('R','V','2','4'); break;
+        i_chroma = VLC_CODEC_RGB24; break;
     case 32:
-        i_chroma = VLC_FOURCC('R','V','3','2'); break;
+        i_chroma = VLC_CODEC_RGB32; break;
     default:
         msg_Err( p_demux, "unknown screen depth %i",
                  p_sys->fmt.video.i_bits_per_pixel );
@@ -108,17 +108,17 @@ int screen_InitCapture( demux_t *p_demux )
 
     switch( i_chroma )
     {
-    case VLC_FOURCC('R','V','1','5'):
+    case VLC_CODEC_RGB15:
         p_sys->fmt.video.i_rmask = 0x7c00;
         p_sys->fmt.video.i_gmask = 0x03e0;
         p_sys->fmt.video.i_bmask = 0x001f;
         break;
-    case VLC_FOURCC('R','V','2','4'):
+    case VLC_CODEC_RGB24:
         p_sys->fmt.video.i_rmask = 0x00ff0000;
         p_sys->fmt.video.i_gmask = 0x0000ff00;
         p_sys->fmt.video.i_bmask = 0x000000ff;
         break;
-    case VLC_FOURCC('R','V','3','2'):
+    case VLC_CODEC_RGB32:
         p_sys->fmt.video.i_rmask = 0x00ff0000;
         p_sys->fmt.video.i_gmask = 0x0000ff00;
         p_sys->fmt.video.i_bmask = 0x000000ff;
index 8723f150149cfdd333398818eae0d209ee2295b8..1cb4a5564490e0343623912ae240cdbb1595b4a5 100644 (file)
@@ -68,14 +68,14 @@ int screen_InitCapture( demux_t *p_demux )
     switch( win_info.depth )
     {
     case 8: /* FIXME: set the palette */
-        i_chroma = VLC_FOURCC('R','G','B','2'); break;
+        i_chroma = VLC_CODEC_RGB8; break;
     case 15:
-        i_chroma = VLC_FOURCC('R','V','1','5'); break;
+        i_chroma = VLC_CODEC_RGB15; break;
     case 16:
-        i_chroma = VLC_FOURCC('R','V','1','6'); break;
+        i_chroma = VLC_CODEC_RGB16; break;
     case 24:
     case 32:
-        i_chroma = VLC_FOURCC('R','V','3','2');
+        i_chroma = VLC_CODEC_RGB32;
         win_info.depth = 32;
         break;
     default:
index 11261e7c30e395f81f8bd0df39ca3101146c3536..197756cf3768f5b8b76ea3c336b8760d8e380678 100644 (file)
@@ -216,23 +216,21 @@ static const struct
 
 } v4lchroma_to_fourcc[] =
 {
-    { VIDEO_PALETTE_GREY, VLC_FOURCC( 'G', 'R', 'E', 'Y' ) },
+    { VIDEO_PALETTE_GREY, VLC_CODEC_GREY },
     { VIDEO_PALETTE_HI240, VLC_FOURCC( 'I', '2', '4', '0' ) },
-    { VIDEO_PALETTE_RGB565, VLC_FOURCC( 'R', 'V', '1', '6' ) },
-    { VIDEO_PALETTE_RGB555, VLC_FOURCC( 'R', 'V', '1', '5' ) },
-    { VIDEO_PALETTE_RGB24, VLC_FOURCC( 'R', 'V', '2', '4' ) },
-    { VIDEO_PALETTE_RGB32, VLC_FOURCC( 'R', 'V', '3', '2' ) },
-    { VIDEO_PALETTE_YUV422, VLC_FOURCC( 'Y', 'U', 'Y', '2' ) },
-    { VIDEO_PALETTE_YUV422, VLC_FOURCC( 'Y', 'U', 'Y', 'V' ) },
-    { VIDEO_PALETTE_YUYV, VLC_FOURCC( 'Y', 'U', 'Y', '2' ) },
-    { VIDEO_PALETTE_YUYV, VLC_FOURCC( 'Y', 'U', 'Y', 'V' ) },
-    { VIDEO_PALETTE_UYVY, VLC_FOURCC( 'U', 'Y', 'V', 'Y' ) },
+    { VIDEO_PALETTE_RGB565, VLC_CODEC_RGB16 },
+    { VIDEO_PALETTE_RGB555, VLC_CODEC_RGB15 },
+    { VIDEO_PALETTE_RGB24, VLC_CODEC_RGB24 },
+    { VIDEO_PALETTE_RGB32, VLC_CODEC_RGB32 },
+    { VIDEO_PALETTE_YUV422, VLC_CODEC_YUYV },
+    { VIDEO_PALETTE_YUYV, VLC_CODEC_YUYV },
+    { VIDEO_PALETTE_UYVY, VLC_CODEC_UYVY },
     { VIDEO_PALETTE_YUV420, VLC_FOURCC( 'I', '4', '2', 'N' ) },
     { VIDEO_PALETTE_YUV411, VLC_FOURCC( 'I', '4', '1', 'N' ) },
     { VIDEO_PALETTE_RAW, VLC_FOURCC( 'G', 'R', 'A', 'W' ) },
-    { VIDEO_PALETTE_YUV422P, VLC_FOURCC( 'I', '4', '2', '2' ) },
-    { VIDEO_PALETTE_YUV420P, VLC_FOURCC( 'I', '4', '2', '0' ) },
-    { VIDEO_PALETTE_YUV411P, VLC_FOURCC( 'I', '4', '1', '1' ) },
+    { VIDEO_PALETTE_YUV422P, VLC_CODEC_I422 },
+    { VIDEO_PALETTE_YUV420P, VLC_CODEC_I420 },
+    { VIDEO_PALETTE_YUV411P, VLC_CODEC_I411 },
     { 0, 0 }
 };
 
@@ -354,18 +352,18 @@ static int Open( vlc_object_t *p_this )
     /* Setup rgb mask for RGB formats */
     switch( p_sys->i_fourcc )
     {
-        case VLC_FOURCC('R','V','1','5'):
+        case VLC_CODEC_RGB15:
             fmt.video.i_rmask = 0x001f;
             fmt.video.i_gmask = 0x03e0;
             fmt.video.i_bmask = 0x7c00;
             break;
-        case VLC_FOURCC('R','V','1','6'):
+        case VLC_CODEC_RGB16:
             fmt.video.i_rmask = 0x001f;
             fmt.video.i_gmask = 0x07e0;
             fmt.video.i_bmask = 0xf800;
             break;
-        case VLC_FOURCC('R','V','2','4'):
-        case VLC_FOURCC('R','V','3','2'):
+        case VLC_CODEC_RGB24:
+        case VLC_CODEC_RGB32:
             fmt.video.i_rmask = 0x00ff0000;
             fmt.video.i_gmask = 0x0000ff00;
             fmt.video.i_bmask = 0x000000ff;
@@ -980,7 +978,8 @@ static int OpenVideoDev( demux_t *p_demux, char *psz_device )
             if( strlen( psz ) >= 4 )
             {
                 vid_picture.palette = 0;
-                int i_chroma = VLC_FOURCC( psz[0], psz[1], psz[2], psz[3] );
+                int i_chroma = vlc_fourcc_GetCodec( VIDEO_ES,
+                                                    VLC_FOURCC( psz[0], psz[1], psz[2], psz[3] ) );
 
                 /* Find out v4l chroma code */
                 for( i = 0; v4lchroma_to_fourcc[i].i_v4l != 0; i++ )
@@ -1056,7 +1055,7 @@ static int OpenVideoDev( demux_t *p_demux, char *psz_device )
             goto vdev_failed;
         }
 
-        p_sys->i_fourcc  = VLC_FOURCC( 'm','j','p','g' );
+        p_sys->i_fourcc  = VLC_CODEC_MJPG;
         p_sys->i_frame_pos = -1;
 
         /* queue up all the frames */
index 0e9b5b6a9b379e0da8db00101be7d0bd107bd368..c6688d6b1114bd4fbc5bdfcf084cd3097b684708 100644 (file)
@@ -400,35 +400,34 @@ static const struct
 } v4l2chroma_to_fourcc[] =
 {
     /* Raw data types */
-    { V4L2_PIX_FMT_GREY,    VLC_FOURCC('G','R','E','Y'), 0, 0, 0 },
+    { V4L2_PIX_FMT_GREY,    VLC_CODEC_GREY, 0, 0, 0 },
     { V4L2_PIX_FMT_HI240,   VLC_FOURCC('I','2','4','0'), 0, 0, 0 },
-    { V4L2_PIX_FMT_RGB555,  VLC_FOURCC('R','V','1','5'), 0x001f,0x03e0,0x7c00 },
-    { V4L2_PIX_FMT_RGB565,  VLC_FOURCC('R','V','1','6'), 0x001f,0x07e0,0xf800 },
+    { V4L2_PIX_FMT_RGB555,  VLC_CODEC_RGB15, 0x001f,0x03e0,0x7c00 },
+    { V4L2_PIX_FMT_RGB565,  VLC_CODEC_RGB16, 0x001f,0x07e0,0xf800 },
     /* Won't work since we don't know how to handle such gmask values
      * correctly
-    { V4L2_PIX_FMT_RGB555X, VLC_FOURCC('R','V','1','5'), 0x007c,0xe003,0x1f00 },
-    { V4L2_PIX_FMT_RGB565X, VLC_FOURCC('R','V','1','6'), 0x00f8,0xe007,0x1f00 },
+    { V4L2_PIX_FMT_RGB555X, VLC_CODEC_RGB15, 0x007c,0xe003,0x1f00 },
+    { V4L2_PIX_FMT_RGB565X, VLC_CODEC_RGB16, 0x00f8,0xe007,0x1f00 },
     */
-    { V4L2_PIX_FMT_BGR24,   VLC_FOURCC('R','V','2','4'), 0xff0000,0xff00,0xff },
-    { V4L2_PIX_FMT_RGB24,   VLC_FOURCC('R','V','2','4'), 0xff,0xff00,0xff0000 },
-    { V4L2_PIX_FMT_BGR32,   VLC_FOURCC('R','V','3','2'), 0xff0000,0xff00,0xff },
-    { V4L2_PIX_FMT_RGB32,   VLC_FOURCC('R','V','3','2'), 0xff,0xff00,0xff0000 },
-    { V4L2_PIX_FMT_YUYV,    VLC_FOURCC('Y','U','Y','2'), 0, 0, 0 },
-    { V4L2_PIX_FMT_YUYV,    VLC_FOURCC('Y','U','Y','V'), 0, 0, 0 },
-    { V4L2_PIX_FMT_UYVY,    VLC_FOURCC('U','Y','V','Y'), 0, 0, 0 },
+    { V4L2_PIX_FMT_BGR24,   VLC_CODEC_RGB24, 0xff0000,0xff00,0xff },
+    { V4L2_PIX_FMT_RGB24,   VLC_CODEC_RGB24, 0xff,0xff00,0xff0000 },
+    { V4L2_PIX_FMT_BGR32,   VLC_CODEC_RGB32, 0xff0000,0xff00,0xff },
+    { V4L2_PIX_FMT_RGB32,   VLC_CODEC_RGB32, 0xff,0xff00,0xff0000 },
+    { V4L2_PIX_FMT_YUYV,    VLC_CODEC_YUYV, 0, 0, 0 },
+    { V4L2_PIX_FMT_UYVY,    VLC_CODEC_UYVY, 0, 0, 0 },
     { V4L2_PIX_FMT_Y41P,    VLC_FOURCC('I','4','1','N'), 0, 0, 0 },
-    { V4L2_PIX_FMT_YUV422P, VLC_FOURCC('I','4','2','2'), 0, 0, 0 },
-    { V4L2_PIX_FMT_YVU420,  VLC_FOURCC('Y','V','1','2'), 0, 0, 0 },
-    { V4L2_PIX_FMT_YUV411P, VLC_FOURCC('I','4','1','1'), 0, 0, 0 },
-    { V4L2_PIX_FMT_YUV410,  VLC_FOURCC('I','4','1','0'), 0, 0, 0 },
+    { V4L2_PIX_FMT_YUV422P, VLC_CODEC_I422, 0, 0, 0 },
+    { V4L2_PIX_FMT_YVU420,  VLC_CODEC_YV12, 0, 0, 0 },
+    { V4L2_PIX_FMT_YUV411P, VLC_CODEC_I411, 0, 0, 0 },
+    { V4L2_PIX_FMT_YUV410,  VLC_CODEC_I410, 0, 0, 0 },
 
     /* Raw data types, not in V4L2 spec but still in videodev2.h and supported
      * by VLC */
-    { V4L2_PIX_FMT_YUV420,  VLC_FOURCC('I','4','2','0'), 0, 0, 0 },
-    /* FIXME { V4L2_PIX_FMT_RGB444,  VLC_FOURCC('R','V','3','2') }, */
+    { V4L2_PIX_FMT_YUV420,  VLC_CODEC_I420, 0, 0, 0 },
+    /* FIXME { V4L2_PIX_FMT_RGB444,  VLC_CODEC_RGB32 }, */
 
     /* Compressed data types */
-    { V4L2_PIX_FMT_MJPEG,   VLC_FOURCC('M','J','P','G'), 0, 0, 0 },
+    { V4L2_PIX_FMT_MJPEG,   VLC_CODEC_MJPG, 0, 0, 0 },
 #if 0
     { V4L2_PIX_FMT_JPEG,    VLC_FOURCC('J','P','E','G') },
     { V4L2_PIX_FMT_DV,      VLC_FOURCC('?','?','?','?') },
@@ -1951,9 +1950,10 @@ static int OpenVideoDev( vlc_object_t *p_obj, demux_sys_t *p_sys, bool b_demux )
         /* User specified chroma */
         if( strlen( p_sys->psz_requested_chroma ) >= 4 )
         {
-            int i_requested_fourcc = VLC_FOURCC(
+            int i_requested_fourcc = vlc_fourcc_GetCodec( VIDEO_ES,
+                                                          VLC_FOURCC(
                 p_sys->psz_requested_chroma[0], p_sys->psz_requested_chroma[1],
-                p_sys->psz_requested_chroma[2], p_sys->psz_requested_chroma[3] );
+                p_sys->psz_requested_chroma[2], p_sys->psz_requested_chroma[3] ) );
             for( int i = 0; v4l2chroma_to_fourcc[i].i_v4l2 != 0; i++ )
             {
                 if( v4l2chroma_to_fourcc[i].i_fourcc == i_requested_fourcc )
index 3b54cae2c2105a372943cfe7ce5b3b98f599b306..5e3810b19a89f02e7227af4b347c9267b105db24 100644 (file)
@@ -97,8 +97,8 @@ static int Create( vlc_object_t *p_this )
         return VLC_EGENERIC;
     }
 
-    if ( p_filter->input.i_format != VLC_FOURCC('f','l','3','2')
-          || p_filter->output.i_format != VLC_FOURCC('f','l','3','2') )
+    if ( p_filter->input.i_format != VLC_CODEC_FL32
+          || p_filter->output.i_format != VLC_CODEC_FL32 )
     {
         return VLC_EGENERIC;
     }
index 42d1bcdb474e5e053ac78b9742f111418397074f..c659cdf11d6e96a54aea567799775b62992f74f5 100644 (file)
@@ -372,12 +372,12 @@ static int Create( vlc_object_t *p_this )
         p_filter->input.i_original_channels =
                                         p_filter->output.i_original_channels;
     }
-    if( p_filter->input.i_format != VLC_FOURCC('f','l','3','2')
-          || p_filter->output.i_format != VLC_FOURCC('f','l','3','2') )
+    if( p_filter->input.i_format != VLC_CODEC_FL32
+          || p_filter->output.i_format != VLC_CODEC_FL32 )
     {
         b_fit = false;
-        p_filter->input.i_format = VLC_FOURCC('f','l','3','2');
-        p_filter->output.i_format = VLC_FOURCC('f','l','3','2');
+        p_filter->input.i_format = VLC_CODEC_FL32;
+        p_filter->output.i_format = VLC_CODEC_FL32;
     }
     if( p_filter->input.i_rate != p_filter->output.i_rate )
     {
@@ -580,12 +580,12 @@ static int OpenFilter( vlc_object_t *p_this )
         p_filter->fmt_in.audio.i_original_channels =
                                         p_filter->fmt_out.audio.i_original_channels;
     }
-    if( p_filter->fmt_in.audio.i_format != VLC_FOURCC('f','l','3','2')
-          || p_filter->fmt_out.audio.i_format != VLC_FOURCC('f','l','3','2') )
+    if( p_filter->fmt_in.audio.i_format != VLC_CODEC_FL32
+          || p_filter->fmt_out.audio.i_format != VLC_CODEC_FL32 )
     {
         b_fit = false;
-        p_filter->fmt_in.audio.i_format = VLC_FOURCC('f','l','3','2');
-        p_filter->fmt_out.audio.i_format = VLC_FOURCC('f','l','3','2');
+        p_filter->fmt_in.audio.i_format = VLC_CODEC_FL32;
+        p_filter->fmt_out.audio.i_format = VLC_CODEC_FL32;
     }
     if( p_filter->fmt_in.audio.i_rate != p_filter->fmt_out.audio.i_rate )
     {
index 02def5eee4ee910cdcad99eba275356f0c9ad750..40edd92d28d837fa462cba2ce34f72501471b616 100644 (file)
@@ -290,7 +290,7 @@ static block_t *Filter( filter_t *p_filter, block_t *p_block )
  *****************************************************************************/
 static bool IsSupported( const audio_format_t *p_input, const audio_format_t *p_output )
 {
-    if( p_input->i_format != VLC_FOURCC('f','l','3','2') ||
+    if( p_input->i_format != VLC_CODEC_FL32 ||
           p_input->i_format != p_output->i_format ||
           p_input->i_rate != p_output->i_rate )
         return false;
index ee393ed48deac87a410381317b587a827b08d844..42ac93e6231418e5dc662de808239caf875fbc22 100644 (file)
@@ -65,8 +65,8 @@ static int Create( vlc_object_t *p_this )
                == p_filter->output.i_original_channels)
           || p_filter->input.i_format != p_filter->output.i_format
           || p_filter->input.i_rate != p_filter->output.i_rate
-          || (p_filter->input.i_format != VLC_FOURCC('f','l','3','2')
-               && p_filter->input.i_format != VLC_FOURCC('f','i','3','2')) )
+          || (p_filter->input.i_format != VLC_CODEC_FL32
+               && p_filter->input.i_format != VLC_CODEC_FI32) )
     {
         return -1;
     }
index ad18a0ed907b34a1460a1d52faa5783f7f407930..083caf79a91c665be6d79bf317ee79566f09d84d 100644 (file)
@@ -122,11 +122,11 @@ static int Create( vlc_object_t *p_this )
     filter_sys_t *p_sys = (filter_sys_t *)p_filter->p_sys;
     int i_ret;
 
-    if ( p_filter->input.i_format != VLC_FOURCC('a','5','2',' ')
+    if ( p_filter->input.i_format != VLC_CODEC_A52
 #ifdef LIBA52_FIXED
-          || p_filter->output.i_format != VLC_FOURCC('f','i','3','2') )
+          || p_filter->output.i_format != VLC_CODEC_FI32 )
 #else
-          || p_filter->output.i_format != VLC_FOURCC('f','l','3','2') )
+          || p_filter->output.i_format != VLC_CODEC_FL32 )
 #endif
     {
         return -1;
@@ -416,16 +416,16 @@ static int OpenFilter( vlc_object_t *p_this )
     filter_sys_t *p_sys;
     int i_ret;
 
-    if( p_filter->fmt_in.i_codec != VLC_FOURCC('a','5','2',' ')  )
+    if( p_filter->fmt_in.i_codec != VLC_CODEC_A52  )
     {
         return VLC_EGENERIC;
     }
 
     p_filter->fmt_out.audio.i_format =
 #ifdef LIBA52_FIXED
-        p_filter->fmt_out.i_codec = VLC_FOURCC('f','i','3','2');
+        p_filter->fmt_out.i_codec = VLC_CODEC_FI32;
 #else
-        p_filter->fmt_out.i_codec = VLC_FOURCC('f','l','3','2');
+        p_filter->fmt_out.i_codec = VLC_CODEC_FL32;
 #endif
     p_filter->fmt_out.audio.i_bitspersample =
         aout_BitsPerSample( p_filter->fmt_out.i_codec );
index f43855135934775fb62bfe36ae13ba7a1e202755..7bfc5809a20a775623ed146582f9925094e556b8 100644 (file)
@@ -64,9 +64,9 @@ static int Create( vlc_object_t *p_this )
 {
     aout_filter_t * p_filter = (aout_filter_t *)p_this;
 
-    if ( p_filter->input.i_format != VLC_FOURCC('a','5','2',' ') ||
-         ( p_filter->output.i_format != VLC_FOURCC('s','p','d','b') &&
-           p_filter->output.i_format != VLC_FOURCC('s','p','d','i') ) )
+    if ( p_filter->input.i_format != VLC_CODEC_A52 ||
+         ( p_filter->output.i_format != VLC_CODEC_SPDIFB &&
+           p_filter->output.i_format != VLC_CODEC_SPDIFL ) )
     {
         return -1;
     }
@@ -95,7 +95,7 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter,
     uint8_t * p_out = p_out_buf->p_buffer;
 
     /* Copy the S/PDIF headers. */
-    if( p_filter->output.i_format == VLC_FOURCC('s','p','d','b') )
+    if( p_filter->output.i_format == VLC_CODEC_SPDIFB )
     {
         vlc_memcpy( p_out, p_sync_be, 6 );
         p_out[4] = p_in[5] & 0x7; /* bsmod */
index 0028e13cab822bc9e08b9e3b02e32afc7864c596..0d48406bd749e39d31445512e9f15ccbff7e4cb6 100644 (file)
@@ -112,8 +112,8 @@ static int Create( vlc_object_t *p_this )
     filter_sys_t *p_sys;
     int i_ret;
 
-    if ( p_filter->input.i_format != VLC_FOURCC('d','t','s',' ')
-          || p_filter->output.i_format != VLC_FOURCC('f','l','3','2') )
+    if ( p_filter->input.i_format != VLC_CODEC_DTS
+          || p_filter->output.i_format != VLC_CODEC_FL32 )
     {
         return -1;
     }
@@ -385,13 +385,13 @@ static int OpenFilter( vlc_object_t *p_this )
     filter_sys_t *p_sys;
     int i_ret;
 
-    if( p_filter->fmt_in.i_codec != VLC_FOURCC('d','t','s',' ')  )
+    if( p_filter->fmt_in.i_codec != VLC_CODEC_DTS  )
     {
         return VLC_EGENERIC;
     }
 
     p_filter->fmt_out.audio.i_format =
-        p_filter->fmt_out.i_codec = VLC_FOURCC('f','l','3','2');
+        p_filter->fmt_out.i_codec = VLC_CODEC_FL32;
     p_filter->fmt_out.audio.i_bitspersample =
         aout_BitsPerSample( p_filter->fmt_out.i_codec );
 
index d55446d11bbfff66d9a358b406e164b7bbc0e5ea..7ae39323caa3e6a78c6ec3ea0bc2a631a9be7335 100644 (file)
@@ -81,9 +81,9 @@ static int Create( vlc_object_t *p_this )
 {
     aout_filter_t * p_filter = (aout_filter_t *)p_this;
 
-    if( p_filter->input.i_format != VLC_FOURCC('d','t','s',' ') ||
-        ( p_filter->output.i_format != VLC_FOURCC('s','p','d','i') &&
-          p_filter->output.i_format != VLC_FOURCC('s','p','d','b') ) )
+    if( p_filter->input.i_format != VLC_CODEC_DTS ||
+        ( p_filter->output.i_format != VLC_CODEC_SPDIFL &&
+          p_filter->output.i_format != VLC_CODEC_SPDIFB ) )
     {
         return -1;
     }
@@ -170,7 +170,7 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter,
         }
 
         /* Copy the S/PDIF headers. */
-        if( p_filter->output.i_format == VLC_FOURCC('s','p','d','b') )
+        if( p_filter->output.i_format == VLC_CODEC_SPDIFB )
         {
             vlc_memcpy( p_out, p_sync_be, 6 );
             p_out[5] = i_ac5_spdif_type;
@@ -185,8 +185,8 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter,
             p_out[7] = (( i_length ) >> 5 ) & 0xFF;
         }
 
-        if( ( (p_in[0] == 0x1F || p_in[0] == 0x7F) && p_filter->output.i_format == VLC_FOURCC('s','p','d','i') ) ||
-            ( (p_in[0] == 0xFF || p_in[0] == 0xFE) && p_filter->output.i_format == VLC_FOURCC('s','p','d','b') ) )
+        if( ( (p_in[0] == 0x1F || p_in[0] == 0x7F) && p_filter->output.i_format == VLC_CODEC_SPDIFL ) ||
+            ( (p_in[0] == 0xFF || p_in[0] == 0xFE) && p_filter->output.i_format == VLC_CODEC_SPDIFB ) )
         {
             /* We are dealing with a big endian bitstream and a little endian output
              * or a little endian bitstream and a big endian output.
index 1282838feffc00011b3ddca11ad2830324e07929..c4634b6051ebdb5af21f73d6476039fbe03220c4 100644 (file)
@@ -73,7 +73,7 @@ static int Create_F32ToS16( vlc_object_t *p_this )
 {
     aout_filter_t * p_filter = (aout_filter_t *)p_this;
 
-    if ( p_filter->input.i_format != VLC_FOURCC('f','i','3','2')
+    if ( p_filter->input.i_format != VLC_CODEC_FI32
           || p_filter->output.i_format != AOUT_FMT_S16_NE )
     {
         return -1;
@@ -157,7 +157,7 @@ static int Create_S16ToF32( vlc_object_t *p_this )
 {
     aout_filter_t * p_filter = (aout_filter_t *)p_this;
 
-    if ( p_filter->output.i_format != VLC_FOURCC('f','i','3','2')
+    if ( p_filter->output.i_format != VLC_CODEC_FI32
           || p_filter->input.i_format != AOUT_FMT_S16_NE )
     {
         return -1;
@@ -203,8 +203,8 @@ static int Create_U8ToF32( vlc_object_t *p_this )
 {
     aout_filter_t * p_filter = (aout_filter_t *)p_this;
 
-    if ( p_filter->input.i_format != VLC_FOURCC('u','8',' ',' ')
-          || p_filter->output.i_format != VLC_FOURCC('f','i','3','2') )
+    if ( p_filter->input.i_format != VLC_CODEC_U8
+          || p_filter->output.i_format != VLC_CODEC_FI32 )
     {
         return -1;
     }
index 223aa1e3ad82eb065f614647d08a915624f42c47..1664a7a420454f732dfce3797d19a90649530557 100644 (file)
@@ -132,10 +132,10 @@ static int Create_F32ToFL32( vlc_object_t *p_this )
 {
     aout_filter_t * p_filter = (aout_filter_t *)p_this;
 
-    if( ( p_filter->input.i_format != VLC_FOURCC('f','i','3','2')
-           || p_filter->output.i_format != VLC_FOURCC('f','l','3','2') )
-      && ( p_filter->input.i_format != VLC_FOURCC('f','l','3','2')
-            || p_filter->output.i_format != VLC_FOURCC('f','i','3','2') ) )
+    if( ( p_filter->input.i_format != VLC_CODEC_FI32
+           || p_filter->output.i_format != VLC_CODEC_FL32 )
+      && ( p_filter->input.i_format != VLC_CODEC_FL32
+            || p_filter->output.i_format != VLC_CODEC_FI32 ) )
     {
         return -1;
     }
@@ -145,7 +145,7 @@ static int Create_F32ToFL32( vlc_object_t *p_this )
         return -1;
     }
 
-    if( p_filter->input.i_format == VLC_FOURCC('f','i','3','2') )
+    if( p_filter->input.i_format == VLC_CODEC_FI32 )
     {
         p_filter->pf_do_work = Do_F32ToFL32;
     }
@@ -202,7 +202,7 @@ static int Create_FL32ToS16( vlc_object_t *p_this )
 {
     aout_filter_t * p_filter = (aout_filter_t *)p_this;
 
-    if ( p_filter->input.i_format != VLC_FOURCC('f','l','3','2')
+    if ( p_filter->input.i_format != VLC_CODEC_FL32
           || p_filter->output.i_format != AOUT_FMT_S16_NE )
     {
         return -1;
@@ -257,8 +257,8 @@ static int Create_FL32ToS8( vlc_object_t *p_this )
 {
     aout_filter_t * p_filter = (aout_filter_t *)p_this;
 
-    if ( p_filter->input.i_format != VLC_FOURCC('f','l','3','2')
-          || p_filter->output.i_format != VLC_FOURCC('s','8',' ',' ') )
+    if ( p_filter->input.i_format != VLC_CODEC_FL32
+          || p_filter->output.i_format != VLC_CODEC_S8 )
     {
         return -1;
     }
@@ -302,7 +302,7 @@ static int Create_FL32ToU16( vlc_object_t *p_this )
 {
     aout_filter_t * p_filter = (aout_filter_t *)p_this;
 
-    if ( p_filter->input.i_format != VLC_FOURCC('f','l','3','2')
+    if ( p_filter->input.i_format != VLC_CODEC_FL32
           || p_filter->output.i_format != AOUT_FMT_U16_NE )
     {
         return -1;
@@ -347,8 +347,8 @@ static int Create_FL32ToU8( vlc_object_t *p_this )
 {
     aout_filter_t * p_filter = (aout_filter_t *)p_this;
 
-    if ( p_filter->input.i_format != VLC_FOURCC('f','l','3','2')
-          || p_filter->output.i_format != VLC_FOURCC('u','8',' ',' ') )
+    if ( p_filter->input.i_format != VLC_CODEC_FL32
+          || p_filter->output.i_format != VLC_CODEC_U8 )
     {
         return -1;
     }
@@ -395,7 +395,7 @@ static int Create_S16ToFL32( vlc_object_t *p_this )
     if ( ( p_filter->input.i_format != AOUT_FMT_S16_NE &&
            p_filter->input.i_format != AOUT_FMT_S24_NE &&
            p_filter->input.i_format != AOUT_FMT_S32_NE )
-          || p_filter->output.i_format != VLC_FOURCC('f','l','3','2') )
+          || p_filter->output.i_format != VLC_CODEC_FL32 )
     {
         return -1;
     }
@@ -505,9 +505,9 @@ static int Create_S16ToFL32_SW( vlc_object_t *p_this )
         return -1;
     }
 
-    if ( (p_filter->input.i_format == VLC_FOURCC('s','1','6','l') ||
-         p_filter->input.i_format == VLC_FOURCC('s','1','6','b'))
-         && p_filter->output.i_format == VLC_FOURCC('f','l','3','2')
+    if ( (p_filter->input.i_format == VLC_CODEC_S16L ||
+         p_filter->input.i_format == VLC_CODEC_S16B)
+         && p_filter->output.i_format == VLC_CODEC_FL32
          && p_filter->input.i_format != AOUT_FMT_S16_NE )
     {
         p_filter->pf_do_work = Do_S16ToFL32_SW;
@@ -516,9 +516,9 @@ static int Create_S16ToFL32_SW( vlc_object_t *p_this )
         return 0;
     }
 
-    if ( (p_filter->input.i_format == VLC_FOURCC('s','2','4','l') ||
-         p_filter->input.i_format == VLC_FOURCC('s','2','4','b'))
-         && p_filter->output.i_format == VLC_FOURCC('f','l','3','2')
+    if ( (p_filter->input.i_format == VLC_CODEC_S24L ||
+         p_filter->input.i_format == VLC_CODEC_S24B)
+         && p_filter->output.i_format == VLC_CODEC_FL32
          && p_filter->input.i_format != AOUT_FMT_S24_NE )
     {
         p_filter->pf_do_work = Do_S24ToFL32_SW;
@@ -527,9 +527,9 @@ static int Create_S16ToFL32_SW( vlc_object_t *p_this )
         return 0;
     }
 
-    if ( (p_filter->input.i_format == VLC_FOURCC('s','3','2','l') ||
-         p_filter->input.i_format == VLC_FOURCC('s','3','2','b'))
-         && p_filter->output.i_format == VLC_FOURCC('f','l','3','2')
+    if ( (p_filter->input.i_format == VLC_CODEC_S32L ||
+         p_filter->input.i_format == VLC_CODEC_S32B)
+         && p_filter->output.i_format == VLC_CODEC_FL32
          && p_filter->input.i_format != AOUT_FMT_S32_NE )
     {
         p_filter->pf_do_work = Do_S32ToFL32_SW;
@@ -623,8 +623,8 @@ static int Create_S8ToFL32( vlc_object_t *p_this )
 {
     aout_filter_t * p_filter = (aout_filter_t *)p_this;
 
-    if ( p_filter->input.i_format != VLC_FOURCC('s','8',' ',' ')
-          || p_filter->output.i_format != VLC_FOURCC('f','l','3','2') )
+    if ( p_filter->input.i_format != VLC_CODEC_S8
+          || p_filter->output.i_format != VLC_CODEC_FL32 )
     {
         return -1;
     }
@@ -667,8 +667,8 @@ static int Create_U8ToFL32( vlc_object_t *p_this )
 {
     aout_filter_t * p_filter = (aout_filter_t *)p_this;
 
-    if ( p_filter->input.i_format != VLC_FOURCC('u','8',' ',' ')
-          || p_filter->output.i_format != VLC_FOURCC('f','l','3','2') )
+    if ( p_filter->input.i_format != VLC_CODEC_U8
+          || p_filter->output.i_format != VLC_CODEC_FL32 )
     {
         return -1;
     }
index 357ccb8b6c88cab7bd1dff3f5e83e2c6c58171cb..1bee61dc33eff45508f3f22b3601c8047947a6eb 100644 (file)
@@ -87,10 +87,10 @@ static int Create( vlc_object_t *p_this )
     aout_filter_t *p_filter = (aout_filter_t *)p_this;
     struct filter_sys_t *p_sys;
 
-    if ( (p_filter->input.i_format != VLC_FOURCC('m','p','g','a')
+    if ( (p_filter->input.i_format != VLC_CODEC_MPGA
            && p_filter->input.i_format != VLC_FOURCC('m','p','g','3'))
-            || (p_filter->output.i_format != VLC_FOURCC('f','l','3','2')
-                 && p_filter->output.i_format != VLC_FOURCC('f','i','3','2')) )
+            || (p_filter->output.i_format != VLC_CODEC_FL32
+                 && p_filter->output.i_format != VLC_CODEC_FI32) )
     {
         return -1;
     }
@@ -147,7 +147,7 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter,
 
     if( p_sys->i_reject_count > 0 )
     {
-        if( p_filter->output.i_format == VLC_FOURCC('f','l','3','2') )
+        if( p_filter->output.i_format == VLC_CODEC_FL32 )
         {
             int i;
             int i_size = p_out_buf->i_nb_bytes / sizeof(float);
@@ -167,7 +167,7 @@ static void DoWork( aout_instance_t * p_aout, aout_filter_t * p_filter,
 
     mad_synth_frame( &p_sys->mad_synth, &p_sys->mad_frame );
 
-    if ( p_filter->output.i_format == VLC_FOURCC('f','i','3','2') )
+    if ( p_filter->output.i_format == VLC_CODEC_FI32 )
     {
         /* Interleave and keep buffers in mad_fixed_t format */
         mad_fixed_t * p_samples = (mad_fixed_t *)p_out_buf->p_buffer;
@@ -304,7 +304,7 @@ static int OpenFilter( vlc_object_t *p_this )
     filter_t *p_filter = (filter_t *)p_this;
     filter_sys_t *p_sys;
 
-    if( p_filter->fmt_in.i_codec != VLC_FOURCC('m','p','g','a') &&
+    if( p_filter->fmt_in.i_codec != VLC_CODEC_MPGA &&
         p_filter->fmt_in.i_codec != VLC_FOURCC('m','p','g','3') )
     {
         return VLC_EGENERIC;
@@ -325,9 +325,9 @@ static int OpenFilter( vlc_object_t *p_this )
     mad_stream_options( &p_sys->mad_stream, MAD_OPTION_IGNORECRC );
 
     if( vlc_CPU() & CPU_CAPABILITY_FPU )
-        p_filter->fmt_out.i_codec = VLC_FOURCC('f','l','3','2');
+        p_filter->fmt_out.i_codec = VLC_CODEC_FL32;
     else
-        p_filter->fmt_out.i_codec = VLC_FOURCC('f','i','3','2');
+        p_filter->fmt_out.i_codec = VLC_CODEC_FI32;
     p_filter->fmt_out.audio.i_format = p_filter->fmt_out.i_codec;
     p_filter->fmt_out.audio.i_bitspersample =
         aout_BitsPerSample( p_filter->fmt_out.i_codec );
index 33b646943764a176179bd5e4029dc2bf41023c4e..e10696f82aceb0b9394cb76ef1835ac4372f9d19 100644 (file)
@@ -147,12 +147,12 @@ static int Open( vlc_object_t *p_this )
     aout_filter_sys_t *p_sys;
     bool         b_fit = true;
 
-    if( p_filter->input.i_format != VLC_FOURCC('f','l','3','2' ) ||
-        p_filter->output.i_format != VLC_FOURCC('f','l','3','2') )
+    if( p_filter->input.i_format != VLC_CODEC_FL32 ||
+        p_filter->output.i_format != VLC_CODEC_FL32 )
     {
         b_fit = false;
-        p_filter->input.i_format = VLC_FOURCC('f','l','3','2');
-        p_filter->output.i_format = VLC_FOURCC('f','l','3','2');
+        p_filter->input.i_format = VLC_CODEC_FL32;
+        p_filter->output.i_format = VLC_CODEC_FL32;
         msg_Warn( p_filter, "bad input or output format" );
     }
     if ( !AOUT_FMTS_SIMILAR( &p_filter->input, &p_filter->output ) )
index 0811231b104a31ce661f3fde102299723099b0e7..242900b0e88d1dd2fe3f6313dbba86d467f581a8 100644 (file)
 #include "vlc_filter.h"
 
 #ifdef WORDS_BIGENDIAN
-#   define AOUT_FMT_S24_IE VLC_FOURCC('s','2','4','l')
-#   define AOUT_FMT_S16_IE VLC_FOURCC('s','1','6','l')
-#   define AOUT_FMT_U16_IE VLC_FOURCC('u','1','6','l')
+#   define AOUT_FMT_S24_IE VLC_CODEC_S24L
+#   define AOUT_FMT_S16_IE VLC_CODEC_S16L
+#   define AOUT_FMT_U16_IE VLC_CODEC_U16L
 #else
-#   define AOUT_FMT_S24_IE VLC_FOURCC('s','2','4','b')
-#   define AOUT_FMT_S16_IE VLC_FOURCC('s','1','6','b')
-#   define AOUT_FMT_U16_IE VLC_FOURCC('u','1','6','b')
+#   define AOUT_FMT_S24_IE VLC_CODEC_S24B
+#   define AOUT_FMT_S16_IE VLC_CODEC_S16B
+#   define AOUT_FMT_U16_IE VLC_CODEC_U16B
 #endif
 
 
@@ -125,74 +125,74 @@ static const struct
 } ConvertTable[] =
 {
     /* From fl32 */
-    { VLC_FOURCC('f','l','3','2'), AOUT_FMT_S24_NE, Float32toS24 },
-    { VLC_FOURCC('f','l','3','2'), AOUT_FMT_S16_NE, Float32toS16 },
-    { VLC_FOURCC('f','l','3','2'), AOUT_FMT_U16_NE, Float32toU16 },
-    { VLC_FOURCC('f','l','3','2'), AOUT_FMT_S24_IE, Float32toS24Invert },
-    { VLC_FOURCC('f','l','3','2'), AOUT_FMT_S16_IE, Float32toS16Invert },
-    { VLC_FOURCC('f','l','3','2'), AOUT_FMT_U16_IE, Float32toU16Invert },
-    { VLC_FOURCC('f','l','3','2'), VLC_FOURCC('s','8',' ',' '), Float32toS8 },
-    { VLC_FOURCC('f','l','3','2'), VLC_FOURCC('u','8',' ',' '), Float32toU8 },
+    { VLC_CODEC_FL32, AOUT_FMT_S24_NE, Float32toS24 },
+    { VLC_CODEC_FL32, AOUT_FMT_S16_NE, Float32toS16 },
+    { VLC_CODEC_FL32, AOUT_FMT_U16_NE, Float32toU16 },
+    { VLC_CODEC_FL32, AOUT_FMT_S24_IE, Float32toS24Invert },
+    { VLC_CODEC_FL32, AOUT_FMT_S16_IE, Float32toS16Invert },
+    { VLC_CODEC_FL32, AOUT_FMT_U16_IE, Float32toU16Invert },
+    { VLC_CODEC_FL32, VLC_CODEC_S8, Float32toS8 },
+    { VLC_CODEC_FL32, VLC_CODEC_U8, Float32toU8 },
 
     /* From s24 invert */
-    { AOUT_FMT_S24_NE, VLC_FOURCC('f','l','3','2'), S24toFloat32 },
+    { AOUT_FMT_S24_NE, VLC_CODEC_FL32, S24toFloat32 },
     { AOUT_FMT_S24_NE, AOUT_FMT_S24_IE,             Swap24 },
     { AOUT_FMT_S24_NE, AOUT_FMT_S16_NE,             S24toS16 },
     { AOUT_FMT_S24_NE, AOUT_FMT_S16_IE,             S24toS16Invert },
 
     /* From s16 */
-    { AOUT_FMT_S16_NE, VLC_FOURCC('f','l','3','2'), S16toFloat32 },
+    { AOUT_FMT_S16_NE, VLC_CODEC_FL32, S16toFloat32 },
     { AOUT_FMT_S16_NE, AOUT_FMT_S24_NE,             S16toS24 },
     { AOUT_FMT_S16_NE, AOUT_FMT_S24_IE,             S16toS24Invert },
     { AOUT_FMT_S16_NE, AOUT_FMT_S16_IE,             Swap16 },
     { AOUT_FMT_S16_NE, AOUT_FMT_U16_IE,             S16toU16 },
-    { AOUT_FMT_S16_NE, VLC_FOURCC('s','8',' ',' '), S16toS8 },
-    { AOUT_FMT_S16_NE, VLC_FOURCC('u','8',' ',' '), S16toU8 },
+    { AOUT_FMT_S16_NE, VLC_CODEC_S8, S16toS8 },
+    { AOUT_FMT_S16_NE, VLC_CODEC_U8, S16toU8 },
 
     /* From u16 */
-    { AOUT_FMT_U16_NE, VLC_FOURCC('f','l','3','2'), U16toFloat32 },
+    { AOUT_FMT_U16_NE, VLC_CODEC_FL32, U16toFloat32 },
     { AOUT_FMT_U16_NE, AOUT_FMT_U16_IE,             Swap16 },
     { AOUT_FMT_U16_NE, AOUT_FMT_S16_IE,             U16toS16 },
-    { AOUT_FMT_U16_NE, VLC_FOURCC('s','8',' ',' '), U16toS8 },
-    { AOUT_FMT_U16_NE, VLC_FOURCC('u','8',' ',' '), U16toU8 },
+    { AOUT_FMT_U16_NE, VLC_CODEC_S8, U16toS8 },
+    { AOUT_FMT_U16_NE, VLC_CODEC_U8, U16toU8 },
 
     /* From s8 */
-    { VLC_FOURCC('s','8',' ',' '), VLC_FOURCC('f','l','3','2'), S8toFloat32 },
-    { VLC_FOURCC('s','8',' ',' '), AOUT_FMT_S16_NE,             S8toS16 },
-    { VLC_FOURCC('s','8',' ',' '), AOUT_FMT_S16_IE,             S8toS16Invert },
-    { VLC_FOURCC('s','8',' ',' '), AOUT_FMT_U16_NE,             S8toU16 },
-    { VLC_FOURCC('s','8',' ',' '), AOUT_FMT_U16_IE,             S8toU16Invert },
-    { VLC_FOURCC('s','8',' ',' '), VLC_FOURCC('u','8',' ',' '), S8toU8 },
+    { VLC_CODEC_S8, VLC_CODEC_FL32, S8toFloat32 },
+    { VLC_CODEC_S8, AOUT_FMT_S16_NE,             S8toS16 },
+    { VLC_CODEC_S8, AOUT_FMT_S16_IE,             S8toS16Invert },
+    { VLC_CODEC_S8, AOUT_FMT_U16_NE,             S8toU16 },
+    { VLC_CODEC_S8, AOUT_FMT_U16_IE,             S8toU16Invert },
+    { VLC_CODEC_S8, VLC_CODEC_U8, S8toU8 },
  
     /* From u8 */
-    { VLC_FOURCC('u','8',' ',' '), VLC_FOURCC('f','l','3','2'), U8toFloat32 },
-    { VLC_FOURCC('u','8',' ',' '), AOUT_FMT_S16_NE,             U8toS16 },
-    { VLC_FOURCC('u','8',' ',' '), AOUT_FMT_S16_IE,             U8toS16Invert },
-    { VLC_FOURCC('u','8',' ',' '), AOUT_FMT_U16_NE,             U8toU16 },
-    { VLC_FOURCC('u','8',' ',' '), AOUT_FMT_U16_IE,             U8toU16Invert },
-    { VLC_FOURCC('u','8',' ',' '), VLC_FOURCC('s','8',' ',' '), U8toS8 },
+    { VLC_CODEC_U8, VLC_CODEC_FL32, U8toFloat32 },
+    { VLC_CODEC_U8, AOUT_FMT_S16_NE,             U8toS16 },
+    { VLC_CODEC_U8, AOUT_FMT_S16_IE,             U8toS16Invert },
+    { VLC_CODEC_U8, AOUT_FMT_U16_NE,             U8toU16 },
+    { VLC_CODEC_U8, AOUT_FMT_U16_IE,             U8toU16Invert },
+    { VLC_CODEC_U8, VLC_CODEC_S8, U8toS8 },
 
     /* From s24 invert */
-    { AOUT_FMT_S24_IE, VLC_FOURCC('f','l','3','2'), S24InverttoFloat32 },
+    { AOUT_FMT_S24_IE, VLC_CODEC_FL32, S24InverttoFloat32 },
     { AOUT_FMT_S24_IE, AOUT_FMT_S24_NE,             Swap24 },
     { AOUT_FMT_S24_IE, AOUT_FMT_S16_NE,             S24InverttoS16 },
     { AOUT_FMT_S24_IE, AOUT_FMT_S16_IE,             S24InverttoS16Invert },
 
     /* From s16 invert */
-    { AOUT_FMT_S16_IE, VLC_FOURCC('f','l','3','2'), S16InverttoFloat32 },
+    { AOUT_FMT_S16_IE, VLC_CODEC_FL32, S16InverttoFloat32 },
     { AOUT_FMT_S16_IE, AOUT_FMT_S24_NE,             S16InverttoS24 },
     { AOUT_FMT_S16_IE, AOUT_FMT_S24_IE,             S16InverttoS24Invert },
     { AOUT_FMT_S16_IE, AOUT_FMT_S16_NE,             Swap16 },
     { AOUT_FMT_S16_IE, AOUT_FMT_U16_NE,             S16InverttoU16 },
-    { AOUT_FMT_S16_IE, VLC_FOURCC('s','8',' ',' '), S16InverttoS8 },
-    { AOUT_FMT_S16_IE, VLC_FOURCC('u','8',' ',' '), S16InverttoU8 },
+    { AOUT_FMT_S16_IE, VLC_CODEC_S8, S16InverttoS8 },
+    { AOUT_FMT_S16_IE, VLC_CODEC_U8, S16InverttoU8 },
 
     /* From u16 invert */
-    { AOUT_FMT_U16_IE, VLC_FOURCC('f','l','3','2'), U16InverttoFloat32 },
+    { AOUT_FMT_U16_IE, VLC_CODEC_FL32, U16InverttoFloat32 },
     { AOUT_FMT_U16_IE, AOUT_FMT_U16_NE,             Swap16 },
     { AOUT_FMT_U16_IE, AOUT_FMT_S16_NE,             U16InverttoS16 },
-    { AOUT_FMT_U16_IE, VLC_FOURCC('s','8',' ',' '), U16InverttoS8 },
-    { AOUT_FMT_U16_IE, VLC_FOURCC('u','8',' ',' '), U16InverttoU8 },
+    { AOUT_FMT_U16_IE, VLC_CODEC_S8, U16InverttoS8 },
+    { AOUT_FMT_U16_IE, VLC_CODEC_U8, U16InverttoU8 },
 
     { 0, 0, NULL },
 };
index d0a2e351f3a9060cdc86d6f71cfbec24935741ea..7ec974e85377eecc08d0587b64a0d7c891244eff 100644 (file)
@@ -103,12 +103,12 @@ static int Open( vlc_object_t *p_this )
     int i_channels;
     aout_filter_sys_t *p_sys;
 
-    if( p_filter->input.i_format != VLC_FOURCC('f','l','3','2' ) ||
-        p_filter->output.i_format != VLC_FOURCC('f','l','3','2') )
+    if( p_filter->input.i_format != VLC_CODEC_FL32 ||
+        p_filter->output.i_format != VLC_CODEC_FL32 )
     {
         b_fit = false;
-        p_filter->input.i_format = VLC_FOURCC('f','l','3','2');
-        p_filter->output.i_format = VLC_FOURCC('f','l','3','2');
+        p_filter->input.i_format = VLC_CODEC_FL32;
+        p_filter->output.i_format = VLC_CODEC_FL32;
         msg_Warn( p_filter, "bad input or output format" );
     }
 
index b20a84a6e5a81212da79f5605d47e980e611d96b..fa8c19417a78e2dffd092e4cafb0751a472d0842 100644 (file)
@@ -110,12 +110,12 @@ static int Open( vlc_object_t *p_this )
     bool         b_fit = true;
     int                i_samplerate;
 
-    if( p_filter->input.i_format != VLC_FOURCC('f','l','3','2' ) ||
-        p_filter->output.i_format != VLC_FOURCC('f','l','3','2') )
+    if( p_filter->input.i_format != VLC_CODEC_FL32 ||
+        p_filter->output.i_format != VLC_CODEC_FL32 )
     {
         b_fit = false;
-        p_filter->input.i_format = VLC_FOURCC('f','l','3','2');
-        p_filter->output.i_format = VLC_FOURCC('f','l','3','2');
+        p_filter->input.i_format = VLC_CODEC_FL32;
+        p_filter->output.i_format = VLC_CODEC_FL32;
         msg_Warn( p_filter, "bad input or output format" );
     }
     if ( !AOUT_FMTS_SIMILAR( &p_filter->input, &p_filter->output ) )
index 9ec0714af3e6f2fc64c4dc07b260b24b216210de..485f320150f86368c0ec538b9c6d4f7a03587ed5 100644 (file)
@@ -121,7 +121,7 @@ static int Create( vlc_object_t *p_this )
               != p_filter->output.i_physical_channels
           || p_filter->input.i_original_channels
               != p_filter->output.i_original_channels
-          || p_filter->input.i_format != VLC_FOURCC('f','l','3','2') )
+          || p_filter->input.i_format != VLC_CODEC_FL32 )
     {
         return VLC_EGENERIC;
     }
@@ -475,7 +475,7 @@ static int OpenFilter( vlc_object_t *p_this )
     int i_filter_wing;
 
     if( p_filter->fmt_in.audio.i_rate == p_filter->fmt_out.audio.i_rate ||
-        p_filter->fmt_in.i_codec != VLC_FOURCC('f','l','3','2') )
+        p_filter->fmt_in.i_codec != VLC_CODEC_FL32 )
     {
         return VLC_EGENERIC;
     }
index 161b754a0fd1da759487067833f9b305dc0179e2..41be20b4e1c362fe9a46f538c575777736c8c405 100644 (file)
@@ -90,7 +90,7 @@ static int Create( vlc_object_t *p_this )
               != p_filter->output.i_physical_channels
           || p_filter->input.i_original_channels
               != p_filter->output.i_original_channels
-          || p_filter->input.i_format != VLC_FOURCC('f','l','3','2') )
+          || p_filter->input.i_format != VLC_CODEC_FL32 )
     {
         return VLC_EGENERIC;
     }
@@ -248,7 +248,7 @@ static int OpenFilter( vlc_object_t *p_this )
     int i_out_rate  = p_filter->fmt_out.audio.i_rate;
 
     if( p_filter->fmt_in.audio.i_rate == p_filter->fmt_out.audio.i_rate ||
-        p_filter->fmt_in.i_codec != VLC_FOURCC('f','l','3','2') )
+        p_filter->fmt_in.i_codec != VLC_CODEC_FL32 )
     {
         return VLC_EGENERIC;
     }
index 75586041e7d12fe361eeab406bada93ecb21d993..16918681e19af08ea9e1f6d52e575cd35fa63fd9 100644 (file)
@@ -65,8 +65,8 @@ static int Create( vlc_object_t *p_this )
               != p_filter->output.i_physical_channels
           || p_filter->input.i_original_channels
               != p_filter->output.i_original_channels
-          || (p_filter->input.i_format != VLC_FOURCC('f','l','3','2')
-               && p_filter->input.i_format != VLC_FOURCC('f','i','3','2')) )
+          || (p_filter->input.i_format != VLC_CODEC_FL32
+               && p_filter->input.i_format != VLC_CODEC_FI32) )
     {
         return -1;
     }
index 28e38e7f76479a278c85b08eae5acbb140742e9f..059d0074c0e14a45225bc237486fc6205ed6eb4a 100644 (file)
@@ -65,8 +65,8 @@ static int Create( vlc_object_t *p_this )
               != p_filter->output.i_physical_channels
           || p_filter->input.i_original_channels
               != p_filter->output.i_original_channels
-          || (p_filter->input.i_format != VLC_FOURCC('f','l','3','2')
-               && p_filter->input.i_format != VLC_FOURCC('f','i','3','2')) )
+          || (p_filter->input.i_format != VLC_CODEC_FL32
+               && p_filter->input.i_format != VLC_CODEC_FI32) )
     {
         return VLC_EGENERIC;
     }
index a40435d45ee500213e1434230cfa2235f2aa65d3..3137bf1cd7468ce1233d7aba5f947aff4207b57a 100644 (file)
@@ -392,11 +392,11 @@ static int Open( vlc_object_t *p_this )
     aout_filter_sys_t *p_sys;
     bool b_fit = true;
 
-    if( p_filter->input.i_format != VLC_FOURCC('f','l','3','2' ) ||
-        p_filter->output.i_format != VLC_FOURCC('f','l','3','2') )
+    if( p_filter->input.i_format != VLC_CODEC_FL32 ||
+        p_filter->output.i_format != VLC_CODEC_FL32 )
     {
         b_fit = false;
-        p_filter->input.i_format = p_filter->output.i_format = VLC_FOURCC('f','l','3','2');
+        p_filter->input.i_format = p_filter->output.i_format = VLC_CODEC_FL32;
         msg_Warn( p_filter, "bad input or output format" );
     }
     if( ! AOUT_FMTS_SIMILAR( &p_filter->input, &p_filter->output ) )
index 5ed460b83abeb1632473b6fc93473d62316d35ba..34a6c45438d8c03ac90cec2715179cab2b15c0a5 100644 (file)
@@ -133,12 +133,12 @@ static int Open( vlc_object_t *p_this )
     bool         b_fit = true;
     msg_Dbg(p_this, "Opening filter spatializer %s %s %d", __FILE__,__func__,__LINE__);
 
-    if( p_filter->input.i_format != VLC_FOURCC('f','l','3','2' ) ||
-        p_filter->output.i_format != VLC_FOURCC('f','l','3','2') )
+    if( p_filter->input.i_format != VLC_CODEC_FL32 ||
+        p_filter->output.i_format != VLC_CODEC_FL32 )
     {
         b_fit = false;
-        p_filter->input.i_format = VLC_FOURCC('f','l','3','2');
-        p_filter->output.i_format = VLC_FOURCC('f','l','3','2');
+        p_filter->input.i_format = VLC_CODEC_FL32;
+        p_filter->output.i_format = VLC_CODEC_FL32;
         msg_Warn( p_filter, "bad input or output format" );
     }
     if ( !AOUT_FMTS_SIMILAR( &p_filter->input, &p_filter->output ) )
index e3f905464dc6abe0d9c08edeed121d3a7970afec..474dd520a60c7621e04241f424d3d29f7c0822b2 100644 (file)
@@ -59,7 +59,7 @@ static int Create( vlc_object_t *p_this )
 {
     aout_instance_t * p_aout = (aout_instance_t *)p_this;
 
-    if ( p_aout->mixer.mixer.i_format != VLC_FOURCC('f','l','3','2') )
+    if ( p_aout->mixer.mixer.i_format != VLC_CODEC_FL32 )
     {
         return -1;
     }
index 2512981ae52ce5f94e2b7452b5da8d9673c4bf74..3cdd04c16c19b049f15ccdf91ad2d4d2a8a60d4f 100644 (file)
@@ -59,8 +59,8 @@ static int Create( vlc_object_t *p_this )
 {
     aout_instance_t * p_aout = (aout_instance_t *)p_this;
 
-    if ( p_aout->mixer.mixer.i_format != VLC_FOURCC('f','l','3','2')
-          && p_aout->mixer.mixer.i_format != VLC_FOURCC('f','i','3','2') )
+    if ( p_aout->mixer.mixer.i_format != VLC_CODEC_FL32
+          && p_aout->mixer.mixer.i_format != VLC_CODEC_FI32 )
     {
         return -1;
     }
index 2d03d1da2785dfa25057dc5e41d1b0bfad11d44e..03fd35bdbdf04a7e5b685b8bb881cc52b85af73c 100644 (file)
@@ -360,7 +360,7 @@ static int Open( vlc_object_t *p_this )
        and float32) */
     if( vlc_CPU() & CPU_CAPABILITY_FPU )
     {
-        i_vlc_pcm_format = VLC_FOURCC('f','l','3','2');
+        i_vlc_pcm_format = VLC_CODEC_FL32;
         i_snd_pcm_format = SND_PCM_FORMAT_FLOAT;
     }
     else
@@ -442,7 +442,7 @@ static int Open( vlc_object_t *p_this )
         i_snd_pcm_format = SND_PCM_FORMAT_S16;
         i_channels = 2;
 
-        i_vlc_pcm_format = VLC_FOURCC('s','p','d','i');
+        i_vlc_pcm_format = VLC_CODEC_SPDIFL;
         p_aout->output.i_nb_samples = i_period_size = ALSA_SPDIF_PERIOD_SIZE;
         p_aout->output.output.i_bytes_per_frame = AOUT_SPDIF_SIZE;
         p_aout->output.output.i_frame_length = A52_FRAME_NB;
@@ -540,11 +540,11 @@ static int Open( vlc_object_t *p_this )
                 goto error;
             }
         }
-        if( i_vlc_pcm_format != VLC_FOURCC('s','p','d','i') )
+        if( i_vlc_pcm_format != VLC_CODEC_SPDIFL )
         switch( i_snd_pcm_format )
         {
         case SND_PCM_FORMAT_FLOAT:
-            i_vlc_pcm_format = VLC_FOURCC('f','l','3','2');
+            i_vlc_pcm_format = VLC_CODEC_FL32;
             break;
         case SND_PCM_FORMAT_S16:
             i_vlc_pcm_format = AOUT_FMT_S16_NE;
@@ -865,7 +865,7 @@ static void ALSAFill( aout_instance_t * p_aout )
     }
 
     p_buffer = aout_OutputNextBuffer( p_aout, next_date,
-           (p_aout->output.output.i_format ==  VLC_FOURCC('s','p','d','i')) );
+           (p_aout->output.output.i_format ==  VLC_CODEC_SPDIFL) );
 
     /* Audio output buffer shortage -> stop the fill process and wait */
     if( p_buffer == NULL )
index 1effe5b26b1c03d000378273b41c9594a36b543b..edb438cbd5208ee02e61d440565d4562d10a731d 100644 (file)
@@ -513,7 +513,7 @@ static int OpenAnalog( aout_instance_t *p_aout )
     DeviceFormat.mFormatID = kAudioFormatLinearPCM;
 
     /* We use float 32. It's the best supported format by both VLC and Coreaudio */
-    p_aout->output.output.i_format = VLC_FOURCC( 'f','l','3','2');
+    p_aout->output.output.i_format = VLC_CODEC_FL32;
     DeviceFormat.mFormatFlags = kAudioFormatFlagsNativeFloatPacked;
     DeviceFormat.mBitsPerChannel = 32;
     DeviceFormat.mChannelsPerFrame = aout_FormatNbChannels( &p_aout->output.output );
@@ -768,9 +768,9 @@ static int OpenSPDIF( aout_instance_t * p_aout )
 
     /* Set the format flags */
     if( p_sys->stream_format.mFormatFlags & kAudioFormatFlagIsBigEndian )
-        p_aout->output.output.i_format = VLC_FOURCC('s','p','d','b');
+        p_aout->output.output.i_format = VLC_CODEC_SPDIFB;
     else
-        p_aout->output.output.i_format = VLC_FOURCC('s','p','d','i');
+        p_aout->output.output.i_format = VLC_CODEC_SPDIFL;
     p_aout->output.output.i_bytes_per_frame = AOUT_SPDIF_SIZE;
     p_aout->output.output.i_frame_length = A52_FRAME_NB;
     p_aout->output.i_nb_samples = p_aout->output.output.i_frame_length;
index c05d3cbdd0efc3c0cace60cc9188dd98b55bd7be..98ce3147fd48389ba0678edc5d1e3cfc7ce96ac2 100644 (file)
@@ -331,7 +331,7 @@ static int OpenAudio( vlc_object_t *p_this )
     /* Open the device */
     if( val.i_int == AOUT_VAR_SPDIF )
     {
-        p_aout->output.output.i_format = VLC_FOURCC('s','p','d','i');
+        p_aout->output.output.i_format = VLC_CODEC_SPDIFL;
 
         /* Calculate the frame size in bytes */
         p_aout->output.i_nb_samples = A52_FRAME_NB;
@@ -340,7 +340,7 @@ static int OpenAudio( vlc_object_t *p_this )
         p_aout->output.p_sys->i_frame_size =
             p_aout->output.output.i_bytes_per_frame;
 
-        if( CreateDSBuffer( p_aout, VLC_FOURCC('s','p','d','i'),
+        if( CreateDSBuffer( p_aout, VLC_CODEC_SPDIFL,
                             p_aout->output.output.i_physical_channels,
                             aout_FormatNbChannels( &p_aout->output.output ),
                             p_aout->output.output.i_rate,
@@ -647,7 +647,7 @@ static void Probe( aout_instance_t * p_aout )
     /* Test for SPDIF support */
     if ( AOUT_FMT_NON_LINEAR( &p_aout->output.output ) )
     {
-        if( CreateDSBuffer( p_aout, VLC_FOURCC('s','p','d','i'),
+        if( CreateDSBuffer( p_aout, VLC_CODEC_SPDIFL,
                             p_aout->output.output.i_physical_channels,
                             aout_FormatNbChannels( &p_aout->output.output ),
                             p_aout->output.output.i_rate,
@@ -870,7 +870,7 @@ static int CreateDSBuffer( aout_instance_t *p_aout, int i_format,
 
     switch( i_format )
     {
-    case VLC_FOURCC('s','p','d','i'):
+    case VLC_CODEC_SPDIFL:
         i_nb_channels = 2;
         /* To prevent channel re-ordering */
         waveformat.dwChannelMask = SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT;
@@ -881,7 +881,7 @@ static int CreateDSBuffer( aout_instance_t *p_aout, int i_format,
         waveformat.SubFormat = _KSDATAFORMAT_SUBTYPE_DOLBY_AC3_SPDIF;
         break;
 
-    case VLC_FOURCC('f','l','3','2'):
+    case VLC_CODEC_FL32:
         waveformat.Format.wBitsPerSample = sizeof(float) * 8;
         waveformat.Samples.wValidBitsPerSample =
             waveformat.Format.wBitsPerSample;
@@ -889,7 +889,7 @@ static int CreateDSBuffer( aout_instance_t *p_aout, int i_format,
         waveformat.SubFormat = _KSDATAFORMAT_SUBTYPE_IEEE_FLOAT;
         break;
 
-    case VLC_FOURCC('s','1','6','l'):
+    case VLC_CODEC_S16L:
         waveformat.Format.wBitsPerSample = 16;
         waveformat.Samples.wValidBitsPerSample =
             waveformat.Format.wBitsPerSample;
@@ -991,12 +991,12 @@ static int CreateDSBufferPCM( aout_instance_t *p_aout, int *i_format,
     /* Float32 audio samples are not supported for 5.1 output on the emu101k */
     if( !var_GetBool( p_aout, "directx-audio-float32" ) ||
         i_nb_channels > 2 ||
-        CreateDSBuffer( p_aout, VLC_FOURCC('f','l','3','2'),
+        CreateDSBuffer( p_aout, VLC_CODEC_FL32,
                         i_channels, i_nb_channels, i_rate,
                         FRAME_SIZE * 4 * i_nb_channels, b_probe )
         != VLC_SUCCESS )
     {
-        if ( CreateDSBuffer( p_aout, VLC_FOURCC('s','1','6','l'),
+        if ( CreateDSBuffer( p_aout, VLC_CODEC_S16L,
                              i_channels, i_nb_channels, i_rate,
                              FRAME_SIZE * 2 * i_nb_channels, b_probe )
              != VLC_SUCCESS )
@@ -1005,13 +1005,13 @@ static int CreateDSBufferPCM( aout_instance_t *p_aout, int *i_format,
         }
         else
         {
-            *i_format = VLC_FOURCC('s','1','6','l');
+            *i_format = VLC_CODEC_S16L;
             return VLC_SUCCESS;
         }
     }
     else
     {
-        *i_format = VLC_FOURCC('f','l','3','2');
+        *i_format = VLC_CODEC_FL32;
         return VLC_SUCCESS;
     }
 }
@@ -1117,7 +1117,7 @@ static void* DirectSoundThread( vlc_object_t *p_this )
     int canc = vlc_savecancel ();
 
     /* We don't want any resampling when using S/PDIF output */
-    b_sleek = p_aout->output.output.i_format == VLC_FOURCC('s','p','d','i');
+    b_sleek = p_aout->output.output.i_format == VLC_CODEC_SPDIFL;
 
     msg_Dbg( p_notif, "DirectSoundThread ready" );
 
index f6f851aa436c976444c80f1d8ed5e6adf7f536ad..366fe825fad68b651c2ef5e42a2af38c255c50fe 100644 (file)
@@ -95,16 +95,16 @@ static void    Play        ( aout_instance_t * );
 static const char *const format_list[] = { "u8", "s8", "u16", "s16", "u16_le",
                                      "s16_le", "u16_be", "s16_be", "fixed32",
                                      "float32", "spdif" };
-static const int format_int[] = { VLC_FOURCC('u','8',' ',' '),
-                                  VLC_FOURCC('s','8',' ',' '),
+static const int format_int[] = { VLC_CODEC_U8,
+                                  VLC_CODEC_S8,
                                   AOUT_FMT_U16_NE, AOUT_FMT_S16_NE,
-                                  VLC_FOURCC('u','1','6','l'),
-                                  VLC_FOURCC('s','1','6','l'),
-                                  VLC_FOURCC('u','1','6','b'),
-                                  VLC_FOURCC('s','1','6','b'),
-                                  VLC_FOURCC('f','i','3','2'),
-                                  VLC_FOURCC('f','l','3','2'),
-                                  VLC_FOURCC('s','p','i','f') };
+                                  VLC_CODEC_U16L,
+                                  VLC_CODEC_S16L,
+                                  VLC_CODEC_U16B,
+                                  VLC_CODEC_S16B,
+                                  VLC_CODEC_FI32,
+                                  VLC_CODEC_FL32,
+                                  VLC_CODEC_SPDIFL };
 
 #define FILE_TEXT N_("Output file")
 #define FILE_LONGTEXT N_("File to which the audio samples will be written to. (\"-\" for stdout")
@@ -227,15 +227,15 @@ static int Open( vlc_object_t * p_this )
 
         switch( p_aout->output.output.i_format )
         {
-        case VLC_FOURCC('f','l','3','2'):
+        case VLC_CODEC_FL32:
             wh->Format     = WAVE_FORMAT_IEEE_FLOAT;
             wh->BitsPerSample = sizeof(float) * 8;
             break;
-        case VLC_FOURCC('u','8',' ',' '):
+        case VLC_CODEC_U8:
             wh->Format     = WAVE_FORMAT_PCM;
             wh->BitsPerSample = 8;
             break;
-        case VLC_FOURCC('s','1','6','l'):
+        case VLC_CODEC_S16L:
         default:
             wh->Format     = WAVE_FORMAT_PCM;
             wh->BitsPerSample = 16;
index aeb203fc0a7e51cd67225e6c0f4ce60fb136fdac..db5d0445b452a800602f16248da8097c2c69c97e 100644 (file)
@@ -131,7 +131,7 @@ static int Open( vlc_object_t *p_this )
     aout_VolumeSoftInit( p_aout );
 
     /* JACK only supports fl32 format */
-    p_aout->output.output.i_format = VLC_FOURCC('f','l','3','2');
+    p_aout->output.output.i_format = VLC_CODEC_FL32;
     // TODO add buffer size callback
     p_aout->output.i_nb_samples = jack_get_buffer_size( p_sys->p_jack_client );
     p_aout->output.output.i_rate = jack_get_sample_rate( p_sys->p_jack_client );
index e6154656b84ac97a154c986a5aa9e0bc8df69930..3688e6ff39a7ed05eb2c8e7619beed4740dbaff7 100644 (file)
@@ -326,7 +326,7 @@ static int Open( vlc_object_t *p_this )
 
     if ( val.i_int == AOUT_VAR_SPDIF )
     {
-        p_aout->output.output.i_format = VLC_FOURCC('s','p','d','i');
+        p_aout->output.output.i_format = VLC_CODEC_SPDIFL;
     }
     else if ( val.i_int == AOUT_VAR_5_1 )
     {
@@ -388,7 +388,7 @@ static int Open( vlc_object_t *p_this )
             return VLC_EGENERIC;
         }
 
-        p_aout->output.output.i_format = VLC_FOURCC('s','p','d','i');
+        p_aout->output.output.i_format = VLC_CODEC_SPDIFL;
         p_aout->output.i_nb_samples = A52_FRAME_NB;
         p_aout->output.output.i_bytes_per_frame = AOUT_SPDIF_SIZE;
         p_aout->output.output.i_frame_length = A52_FRAME_NB;
@@ -415,22 +415,22 @@ static int Open( vlc_object_t *p_this )
         switch ( i_format )
         {
         case AFMT_U8:
-            p_aout->output.output.i_format = VLC_FOURCC('u','8',' ',' ');
+            p_aout->output.output.i_format = VLC_CODEC_U8;
             break;
         case AFMT_S8:
-            p_aout->output.output.i_format = VLC_FOURCC('s','8',' ',' ');
+            p_aout->output.output.i_format = VLC_CODEC_S8;
             break;
         case AFMT_U16_LE:
-            p_aout->output.output.i_format = VLC_FOURCC('u','1','6','l');
+            p_aout->output.output.i_format = VLC_CODEC_U16L;
             break;
         case AFMT_S16_LE:
-            p_aout->output.output.i_format = VLC_FOURCC('s','1','6','l');
+            p_aout->output.output.i_format = VLC_CODEC_S16L;
             break;
         case AFMT_U16_BE:
-            p_aout->output.output.i_format = VLC_FOURCC('u','1','6','b');
+            p_aout->output.output.i_format = VLC_CODEC_U16B;
             break;
         case AFMT_S16_BE:
-            p_aout->output.output.i_format = VLC_FOURCC('s','1','6','b');
+            p_aout->output.output.i_format = VLC_CODEC_S16B;
             break;
         default:
             msg_Err( p_aout, "OSS fell back to an unknown format (%d)",
@@ -598,7 +598,7 @@ static void* OSSThread( vlc_object_t *p_this )
         int i_tmp, i_size;
         uint8_t * p_bytes;
 
-        if ( p_aout->output.output.i_format != VLC_FOURCC('s','p','d','i') )
+        if ( p_aout->output.output.i_format != VLC_CODEC_SPDIFL )
         {
             mtime_t buffered = BufferDuration( p_aout );
 
index f73ce9bf7eacfdebcb4814eedb5934e40f30757b..9611a22c80407d5220f80f8cc9e1f560cdd3df98 100644 (file)
@@ -434,7 +434,7 @@ static int PAOpenDevice( aout_instance_t *p_aout )
     }
 
     /* Audio format is paFloat32 (always supported by portaudio v19) */
-    p_aout->output.output.i_format = VLC_FOURCC('f','l','3','2');
+    p_aout->output.output.i_format = VLC_CODEC_FL32;
 
     return VLC_SUCCESS;
 
index 86bd6dd4c7d2d7626ec05a99dbd7d72484ed455b..bacd55ca2343ebe32be8f12aef1e09732acc31d3 100644 (file)
@@ -169,7 +169,7 @@ static int Open ( vlc_object_t *p_this )
 
     ss.rate = p_aout->output.output.i_rate;
     ss.format = PA_SAMPLE_FLOAT32NE;
-    p_aout->output.output.i_format = VLC_FOURCC('f','l','3','2');
+    p_aout->output.output.i_format = VLC_CODEC_FL32;
 
     if (!pa_sample_spec_valid(&ss)) {
         msg_Err(p_aout,"Invalid sample spec");
index 10d6eb7f7257c894ce639814072625b9a7f82799..f8425fadb948574d1eeb4facb8cc97de49cc2585 100644 (file)
@@ -151,17 +151,17 @@ static int Open ( vlc_object_t *p_this )
     switch ( obtained.format )
     {
     case AUDIO_S16LSB:
-        p_aout->output.output.i_format = VLC_FOURCC('s','1','6','l'); break;
+        p_aout->output.output.i_format = VLC_CODEC_S16L; break;
     case AUDIO_S16MSB:
-        p_aout->output.output.i_format = VLC_FOURCC('s','1','6','b'); break;
+        p_aout->output.output.i_format = VLC_CODEC_S16B; break;
     case AUDIO_U16LSB:
-        p_aout->output.output.i_format = VLC_FOURCC('u','1','6','l'); break;
+        p_aout->output.output.i_format = VLC_CODEC_U16L; break;
     case AUDIO_U16MSB:
-        p_aout->output.output.i_format = VLC_FOURCC('u','1','6','b'); break;
+        p_aout->output.output.i_format = VLC_CODEC_U16B; break;
     case AUDIO_S8:
-        p_aout->output.output.i_format = VLC_FOURCC('s','8',' ',' '); break;
+        p_aout->output.output.i_format = VLC_CODEC_S8; break;
     case AUDIO_U8:
-        p_aout->output.output.i_format = VLC_FOURCC('u','8',' ',' '); break;
+        p_aout->output.output.i_format = VLC_CODEC_U8; break;
     }
     /* Volume is entirely done in software. */
     aout_VolumeSoftInit( p_aout );
index 8bea3e34959b44a42524d3466b5b99a04fec0439..27f2561f4bf6c44d7b62a411529c86a4ef338635 100644 (file)
@@ -313,11 +313,11 @@ static int Open( vlc_object_t *p_this )
     /* Open the device */
     if( val.i_int == AOUT_VAR_SPDIF )
     {
-        p_aout->output.output.i_format = VLC_FOURCC('s','p','d','i');
+        p_aout->output.output.i_format = VLC_CODEC_SPDIFL;
 
         if( OpenWaveOut( p_aout,
                          p_aout->output.p_sys->i_wave_device_id,
-                         VLC_FOURCC('s','p','d','i'),
+                         VLC_CODEC_SPDIFL,
                          p_aout->output.output.i_physical_channels,
                          aout_FormatNbChannels( &p_aout->output.output ),
                          p_aout->output.output.i_rate, false )
@@ -539,7 +539,7 @@ static void Probe( aout_instance_t * p_aout )
     {
         if( OpenWaveOut( p_aout,
                          p_aout->output.p_sys->i_wave_device_id,
-                         VLC_FOURCC('s','p','d','i'),
+                         VLC_CODEC_SPDIFL,
                          p_aout->output.output.i_physical_channels,
                          aout_FormatNbChannels( &p_aout->output.output ),
                          p_aout->output.output.i_rate, true )
@@ -692,7 +692,7 @@ static int OpenWaveOut( aout_instance_t *p_aout, uint32_t i_device_id, int i_for
 
     switch( i_format )
     {
-    case VLC_FOURCC('s','p','d','i'):
+    case VLC_CODEC_SPDIFL:
         i_nb_channels = 2;
         /* To prevent channel re-ordering */
         waveformat.dwChannelMask = SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT;
@@ -703,7 +703,7 @@ static int OpenWaveOut( aout_instance_t *p_aout, uint32_t i_device_id, int i_for
         waveformat.SubFormat = __KSDATAFORMAT_SUBTYPE_DOLBY_AC3_SPDIF;
         break;
 
-    case VLC_FOURCC('f','l','3','2'):
+    case VLC_CODEC_FL32:
         waveformat.Format.wBitsPerSample = sizeof(float) * 8;
         waveformat.Samples.wValidBitsPerSample =
             waveformat.Format.wBitsPerSample;
@@ -711,7 +711,7 @@ static int OpenWaveOut( aout_instance_t *p_aout, uint32_t i_device_id, int i_for
         waveformat.SubFormat = __KSDATAFORMAT_SUBTYPE_IEEE_FLOAT;
         break;
 
-    case VLC_FOURCC('s','1','6','l'):
+    case VLC_CODEC_S16L:
         waveformat.Format.wBitsPerSample = 16;
         waveformat.Samples.wValidBitsPerSample =
             waveformat.Format.wBitsPerSample;
@@ -809,11 +809,11 @@ static int OpenWaveOutPCM( aout_instance_t *p_aout, uint32_t i_device_id, int *i
 {
     bool b_use_float32 = var_CreateGetBool( p_aout, "waveout-float32");
 
-    if( !b_use_float32 || OpenWaveOut( p_aout, i_device_id, VLC_FOURCC('f','l','3','2'),
+    if( !b_use_float32 || OpenWaveOut( p_aout, i_device_id, VLC_CODEC_FL32,
                                    i_channels, i_nb_channels, i_rate, b_probe )
         != VLC_SUCCESS )
     {
-        if ( OpenWaveOut( p_aout, i_device_id, VLC_FOURCC('s','1','6','l'),
+        if ( OpenWaveOut( p_aout, i_device_id, VLC_CODEC_S16L,
                           i_channels, i_nb_channels, i_rate, b_probe )
              != VLC_SUCCESS )
         {
@@ -821,13 +821,13 @@ static int OpenWaveOutPCM( aout_instance_t *p_aout, uint32_t i_device_id, int *i
         }
         else
         {
-            *i_format = VLC_FOURCC('s','1','6','l');
+            *i_format = VLC_CODEC_S16L;
             return VLC_SUCCESS;
         }
     }
     else
     {
-        *i_format = VLC_FOURCC('f','l','3','2');
+        *i_format = VLC_CODEC_FL32;
         return VLC_SUCCESS;
     }
 }
@@ -982,7 +982,7 @@ static void* WaveOutThread( vlc_object_t *p_this )
     int canc = vlc_savecancel ();
 
     /* We don't want any resampling when using S/PDIF */
-    b_sleek = p_aout->output.output.i_format == VLC_FOURCC('s','p','d','i');
+    b_sleek = p_aout->output.output.i_format == VLC_CODEC_SPDIFL;
 
     // wait for first call to "play()"
     while( !p_sys->start_date && vlc_object_alive (p_aout) )
index 474a1d0063f6498f8001ea0b3067785b34ab6c64..cafbb562e82b86364055f3d033f013bc40e102d0 100644 (file)
@@ -114,16 +114,16 @@ static int OpenCommon( vlc_object_t *p_this, bool b_packetizer )
 
     switch( p_dec->fmt_in.i_codec )
     {
-    case VLC_FOURCC('a','5','2',' '):
+    case VLC_CODEC_A52:
     case VLC_FOURCC('a','5','2','b'):
-        i_codec = VLC_FOURCC('a','5','2',' ');
+        i_codec = VLC_CODEC_A52;
         break;
-    case VLC_FOURCC('e','a','c','3'):
+    case VLC_CODEC_EAC3:
         /* XXX ugly hack, a52 does not support eac3 so no eac3 pass-through
          * support */
         if( !b_packetizer )
             return VLC_EGENERIC;
-        i_codec = VLC_FOURCC('e','a','c','3');
+        i_codec = VLC_CODEC_EAC3;
         break;
     default:
         return VLC_EGENERIC;
index 986fa787cd5923c81e965d47fa8e3980c96a0bee..5c278b15a28caddfcd2d05e01b0a7f701e185eda 100644 (file)
@@ -345,7 +345,7 @@ static block_t *Parse( decoder_t *p_dec, int *pi_frame_length, int *pi_bits,
     }
     else
     {
-        p_dec->fmt_out.i_codec = i_bits == 16 ? VLC_FOURCC('s','1','6','l') : VLC_FOURCC('s','2','4','l');
+        p_dec->fmt_out.i_codec = i_bits == 16 ? VLC_CODEC_S16L : VLC_CODEC_S24L;
         p_dec->fmt_out.audio.i_bitspersample = i_bits == 16 ? 16 : 24;
     }
 
index 7a5ec825eb6e065671e49f17184cc1aee4534cf2..f57cd225b1198bc439cdd3535444f92f0b532f60 100644 (file)
@@ -188,20 +188,20 @@ static int DecoderOpen( vlc_object_t *p_this )
     /* _signed_ little endian samples (mov)*/
     case VLC_FOURCC('s','o','w','t'):
 
-    case VLC_FOURCC('a','l','a','w'):
+    case VLC_CODEC_ALAW:
     case VLC_FOURCC('u','l','a','w'):
-    case VLC_FOURCC('m','l','a','w'):
-
-    case VLC_FOURCC('f','l','6','4'):
-    case VLC_FOURCC('f','l','3','2'):
-    case VLC_FOURCC('s','3','2','l'):
-    case VLC_FOURCC('s','3','2','b'):
-    case VLC_FOURCC('s','2','4','l'):
-    case VLC_FOURCC('s','2','4','b'):
-    case VLC_FOURCC('s','1','6','l'):
-    case VLC_FOURCC('s','1','6','b'):
-    case VLC_FOURCC('s','8',' ',' '):
-    case VLC_FOURCC('u','8',' ',' '):
+    case VLC_CODEC_MULAW:
+
+    case VLC_CODEC_FL64:
+    case VLC_CODEC_FL32:
+    case VLC_CODEC_S32L:
+    case VLC_CODEC_S32B:
+    case VLC_CODEC_S24L:
+    case VLC_CODEC_S24B:
+    case VLC_CODEC_S16L:
+    case VLC_CODEC_S16B:
+    case VLC_CODEC_S8:
+    case VLC_CODEC_U8:
     case VLC_FOURCC('i','n','2','4'): /* Quicktime in24, bigendian int24 */
     case VLC_FOURCC('4','2','n','i'): /* Quicktime in24, little-endian int24 */
     case VLC_FOURCC('i','n','3','2'): /* Quicktime in32, bigendian int32 */
@@ -236,18 +236,18 @@ static int DecoderOpen( vlc_object_t *p_this )
              p_dec->fmt_in.audio.i_rate, p_dec->fmt_in.audio.i_channels,
              p_dec->fmt_in.audio.i_bitspersample );
 
-    if( p_dec->fmt_in.i_codec == VLC_FOURCC( 'f', 'l', '6', '4' ) )
+    if( p_dec->fmt_in.i_codec == VLC_CODEC_FL64 )
     {
         p_dec->fmt_out.i_codec = p_dec->fmt_in.i_codec;
         p_dec->fmt_in.audio.i_bitspersample = 64;
     }
-    else if( p_dec->fmt_in.i_codec == VLC_FOURCC( 'f', 'l', '3', '2' ) )
+    else if( p_dec->fmt_in.i_codec == VLC_CODEC_FL32 )
     {
         p_dec->fmt_out.i_codec = p_dec->fmt_in.i_codec;
         p_dec->fmt_in.audio.i_bitspersample = 32;
     }
-    else if( p_dec->fmt_in.i_codec == VLC_FOURCC( 's', '3', '2', 'l' ) ||
-             p_dec->fmt_in.i_codec == VLC_FOURCC( 's', '3', '2', 'b' ) )
+    else if( p_dec->fmt_in.i_codec == VLC_CODEC_S32L ||
+             p_dec->fmt_in.i_codec == VLC_CODEC_S32B )
     {
         p_dec->fmt_out.i_codec = p_dec->fmt_in.i_codec;
         p_dec->fmt_in.audio.i_bitspersample = 32;
@@ -256,33 +256,33 @@ static int DecoderOpen( vlc_object_t *p_this )
     {
         /* FIXME: mplayer uses bigendian for in24 .... but here it works
          * with little endian ... weird */
-        p_dec->fmt_out.i_codec = VLC_FOURCC( 's', '3', '2', 'l' );
+        p_dec->fmt_out.i_codec = VLC_CODEC_S32L;
         p_dec->fmt_in.audio.i_bitspersample = 32;
     }
-    else if( p_dec->fmt_in.i_codec == VLC_FOURCC( 's', '2', '4', 'l' ) ||
-             p_dec->fmt_in.i_codec == VLC_FOURCC( 's', '2', '4', 'b' ) )
+    else if( p_dec->fmt_in.i_codec == VLC_CODEC_S24L ||
+             p_dec->fmt_in.i_codec == VLC_CODEC_S24B )
     {
         p_dec->fmt_out.i_codec = p_dec->fmt_in.i_codec;
         p_dec->fmt_in.audio.i_bitspersample = 24;
     }
     else if( p_dec->fmt_in.i_codec == VLC_FOURCC( 'i', 'n', '2', '4' ) )
     {
-        p_dec->fmt_out.i_codec = VLC_FOURCC( 's', '2', '4', 'b' );
+        p_dec->fmt_out.i_codec = VLC_CODEC_S24B;
         p_dec->fmt_in.audio.i_bitspersample = 24;
     }
     else if( p_dec->fmt_in.i_codec == VLC_FOURCC( '4', '2', 'n', 'i' ) )
     {
-        p_dec->fmt_out.i_codec = VLC_FOURCC( 's', '2', '4', 'l' );
+        p_dec->fmt_out.i_codec = VLC_CODEC_S24L;
         p_dec->fmt_in.audio.i_bitspersample = 24;
     }
-    else if( p_dec->fmt_in.i_codec == VLC_FOURCC( 's', '1', '6', 'l' ) ||
-             p_dec->fmt_in.i_codec == VLC_FOURCC( 's', '1', '6', 'b' ) )
+    else if( p_dec->fmt_in.i_codec == VLC_CODEC_S16L ||
+             p_dec->fmt_in.i_codec == VLC_CODEC_S16B )
     {
         p_dec->fmt_out.i_codec = p_dec->fmt_in.i_codec;
         p_dec->fmt_in.audio.i_bitspersample = 16;
     }
-    else if( p_dec->fmt_in.i_codec == VLC_FOURCC( 's', '8', ' ', ' ' ) ||
-             p_dec->fmt_in.i_codec == VLC_FOURCC( 'u', '8', ' ', ' ' ) )
+    else if( p_dec->fmt_in.i_codec == VLC_CODEC_S8 ||
+             p_dec->fmt_in.i_codec == VLC_CODEC_U8 )
     {
         p_dec->fmt_out.i_codec = p_dec->fmt_in.i_codec;
         p_dec->fmt_in.audio.i_bitspersample = 8;
@@ -292,10 +292,10 @@ static int DecoderOpen( vlc_object_t *p_this )
         switch( ( p_dec->fmt_in.audio.i_bitspersample + 7 ) / 8 )
         {
         case 4:
-            p_dec->fmt_out.i_codec = VLC_FOURCC('f','l','3','2');
+            p_dec->fmt_out.i_codec = VLC_CODEC_FL32;
             break;
         case 8:
-            p_dec->fmt_out.i_codec = VLC_FOURCC('f','l','6','4');
+            p_dec->fmt_out.i_codec = VLC_CODEC_FL64;
             break;
         default:
             msg_Err( p_dec, "bad parameters(bits/sample)" );
@@ -308,16 +308,16 @@ static int DecoderOpen( vlc_object_t *p_this )
         switch( ( p_dec->fmt_in.audio.i_bitspersample + 7 ) / 8 )
         {
         case 1:
-            p_dec->fmt_out.i_codec = VLC_FOURCC('u','8',' ',' ');
+            p_dec->fmt_out.i_codec = VLC_CODEC_U8;
             break;
         case 2:
-            p_dec->fmt_out.i_codec = VLC_FOURCC('s','1','6','l');
+            p_dec->fmt_out.i_codec = VLC_CODEC_S16L;
             break;
         case 3:
-            p_dec->fmt_out.i_codec = VLC_FOURCC('s','2','4','l');
+            p_dec->fmt_out.i_codec = VLC_CODEC_S24L;
             break;
         case 4:
-            p_dec->fmt_out.i_codec = VLC_FOURCC('s','3','2','l');
+            p_dec->fmt_out.i_codec = VLC_CODEC_S32L;
             break;
         default:
             msg_Err( p_dec, "bad parameters(bits/sample)" );
@@ -329,16 +329,16 @@ static int DecoderOpen( vlc_object_t *p_this )
         switch( ( p_dec->fmt_in.audio.i_bitspersample + 7 ) / 8 )
         {
         case 1:
-            p_dec->fmt_out.i_codec = VLC_FOURCC('s','8',' ',' ');
+            p_dec->fmt_out.i_codec = VLC_CODEC_S8;
             break;
         case 2:
-            p_dec->fmt_out.i_codec = VLC_FOURCC('s','1','6','b');
+            p_dec->fmt_out.i_codec = VLC_CODEC_S16B;
             break;
         case 3:
-            p_dec->fmt_out.i_codec = VLC_FOURCC('s','2','4','b');
+            p_dec->fmt_out.i_codec = VLC_CODEC_S24B;
             break;
         case 4:
-            p_dec->fmt_out.i_codec = VLC_FOURCC('s','3','2','b');
+            p_dec->fmt_out.i_codec = VLC_CODEC_S32B;
             break;
         default:
             msg_Err( p_dec, "bad parameters(bits/sample)" );
@@ -350,30 +350,30 @@ static int DecoderOpen( vlc_object_t *p_this )
         switch( ( p_dec->fmt_in.audio.i_bitspersample + 7 ) / 8 )
         {
         case 1:
-            p_dec->fmt_out.i_codec = VLC_FOURCC('s','8',' ',' ');
+            p_dec->fmt_out.i_codec = VLC_CODEC_S8;
             break;
         case 2:
-            p_dec->fmt_out.i_codec = VLC_FOURCC('s','1','6','l');
+            p_dec->fmt_out.i_codec = VLC_CODEC_S16L;
             break;
         case 3:
-            p_dec->fmt_out.i_codec = VLC_FOURCC('s','2','4','l');
+            p_dec->fmt_out.i_codec = VLC_CODEC_S24L;
             break;
         case 4:
-            p_dec->fmt_out.i_codec = VLC_FOURCC('s','3','2','l');
+            p_dec->fmt_out.i_codec = VLC_CODEC_S32L;
             break;
         default:
             msg_Err( p_dec, "bad parameters(bits/sample)" );
             return VLC_EGENERIC;
         }
     }
-    else if( p_dec->fmt_in.i_codec == VLC_FOURCC( 'a', 'l', 'a', 'w' ) )
+    else if( p_dec->fmt_in.i_codec == VLC_CODEC_ALAW )
     {
         p_dec->fmt_out.i_codec = AOUT_FMT_S16_NE;
         p_sys->p_logtos16  = alawtos16;
         p_dec->fmt_in.audio.i_bitspersample = 8;
     }
     else if( p_dec->fmt_in.i_codec == VLC_FOURCC( 'u', 'l', 'a', 'w' ) ||
-             p_dec->fmt_in.i_codec == VLC_FOURCC( 'm', 'l', 'a', 'w' ) )
+             p_dec->fmt_in.i_codec == VLC_CODEC_MULAW )
     {
         p_dec->fmt_out.i_codec = AOUT_FMT_S16_NE;
         p_sys->p_logtos16  = ulawtos16;
@@ -396,9 +396,9 @@ static int DecoderOpen( vlc_object_t *p_this )
         p_dec->fmt_out.audio.i_original_channels =
             p_dec->fmt_in.audio.i_original_channels;
 
-    if( p_dec->fmt_in.i_codec == VLC_FOURCC( 'a', 'l', 'a', 'w' ) ||
+    if( p_dec->fmt_in.i_codec == VLC_CODEC_ALAW ||
         p_dec->fmt_in.i_codec == VLC_FOURCC( 'u', 'l', 'a', 'w' ) ||
-        p_dec->fmt_in.i_codec == VLC_FOURCC( 'm', 'l', 'a', 'w' ) )
+        p_dec->fmt_in.i_codec == VLC_CODEC_MULAW )
     {
         p_dec->fmt_out.audio.i_bitspersample = 16;
     }
@@ -1378,40 +1378,40 @@ static int EncoderOpen( vlc_object_t *p_this )
     encoder_t *p_enc = (encoder_t *)p_this;
     encoder_sys_t *p_sys;
 
-    if( p_enc->fmt_out.i_codec == VLC_FOURCC('u','8',' ',' ') ||
-        p_enc->fmt_out.i_codec == VLC_FOURCC('s','8',' ',' ') ||
-        p_enc->fmt_out.i_codec == VLC_FOURCC('a','l','a','w') ||
+    if( p_enc->fmt_out.i_codec == VLC_CODEC_U8 ||
+        p_enc->fmt_out.i_codec == VLC_CODEC_S8 ||
+        p_enc->fmt_out.i_codec == VLC_CODEC_ALAW ||
         p_enc->fmt_out.i_codec == VLC_FOURCC('u','l','a','w') ||
-        p_enc->fmt_out.i_codec == VLC_FOURCC('m','l','a','w'))
+        p_enc->fmt_out.i_codec == VLC_CODEC_MULAW)
     {
         p_enc->fmt_out.audio.i_bitspersample = 8;
     }
-    else if( p_enc->fmt_out.i_codec == VLC_FOURCC('u','1','6','l') ||
-             p_enc->fmt_out.i_codec == VLC_FOURCC('u','1','6','b') ||
-             p_enc->fmt_out.i_codec == VLC_FOURCC('s','1','6','l') ||
-             p_enc->fmt_out.i_codec == VLC_FOURCC('s','1','6','b') )
+    else if( p_enc->fmt_out.i_codec == VLC_CODEC_U16L ||
+             p_enc->fmt_out.i_codec == VLC_CODEC_U16B ||
+             p_enc->fmt_out.i_codec == VLC_CODEC_S16L ||
+             p_enc->fmt_out.i_codec == VLC_CODEC_S16B )
     {
         p_enc->fmt_out.audio.i_bitspersample = 16;
     }
-    else if( p_enc->fmt_out.i_codec == VLC_FOURCC('u','2','4','l') ||
-             p_enc->fmt_out.i_codec == VLC_FOURCC('u','2','4','b') ||
-             p_enc->fmt_out.i_codec == VLC_FOURCC('s','2','4','l') ||
-             p_enc->fmt_out.i_codec == VLC_FOURCC('s','2','4','b') ||
+    else if( p_enc->fmt_out.i_codec == VLC_CODEC_U24L ||
+             p_enc->fmt_out.i_codec == VLC_CODEC_U24B ||
+             p_enc->fmt_out.i_codec == VLC_CODEC_S24L ||
+             p_enc->fmt_out.i_codec == VLC_CODEC_S24B ||
              p_enc->fmt_out.i_codec == VLC_FOURCC('i','n','2','4') )
     {
         p_enc->fmt_out.audio.i_bitspersample = 24;
     }
-    else if( p_enc->fmt_out.i_codec == VLC_FOURCC('u','3','2','l') ||
-             p_enc->fmt_out.i_codec == VLC_FOURCC('u','3','2','b') ||
-             p_enc->fmt_out.i_codec == VLC_FOURCC('s','3','2','l') ||
-             p_enc->fmt_out.i_codec == VLC_FOURCC('s','3','2','b') ||
+    else if( p_enc->fmt_out.i_codec == VLC_CODEC_U32L ||
+             p_enc->fmt_out.i_codec == VLC_CODEC_U32B ||
+             p_enc->fmt_out.i_codec == VLC_CODEC_S32L ||
+             p_enc->fmt_out.i_codec == VLC_CODEC_S32B ||
              p_enc->fmt_out.i_codec == VLC_FOURCC('i','n','3','2') ||
-             p_enc->fmt_out.i_codec == VLC_FOURCC('f','i','3','2') ||
-             p_enc->fmt_out.i_codec == VLC_FOURCC('f','l','3','2') )
+             p_enc->fmt_out.i_codec == VLC_CODEC_FI32 ||
+             p_enc->fmt_out.i_codec == VLC_CODEC_FL32 )
     {
         p_enc->fmt_out.audio.i_bitspersample = 32;
     }
-    else if( p_enc->fmt_out.i_codec == VLC_FOURCC('f','l','6','4') )
+    else if( p_enc->fmt_out.i_codec == VLC_CODEC_FL64 )
     {
         p_enc->fmt_out.audio.i_bitspersample = 64;
     }
@@ -1429,14 +1429,14 @@ static int EncoderOpen( vlc_object_t *p_this )
     p_enc->fmt_in.i_codec = p_enc->fmt_out.i_codec;
     p_sys->i_s16tolog = 0;
 
-    if( p_enc->fmt_out.i_codec == VLC_FOURCC( 'a', 'l', 'a', 'w' ))
+    if( p_enc->fmt_out.i_codec == VLC_CODEC_ALAW)
     {
         p_enc->fmt_in.audio.i_bitspersample = 16;
         p_enc->fmt_in.i_codec = AOUT_FMT_S16_NE;
         p_sys->i_s16tolog = ALAW;
     }
     else if( p_enc->fmt_out.i_codec == VLC_FOURCC( 'u', 'l', 'a', 'w' ) ||
-             p_enc->fmt_out.i_codec == VLC_FOURCC( 'm', 'l', 'a', 'w' ) )
+             p_enc->fmt_out.i_codec == VLC_CODEC_MULAW )
     {
         p_enc->fmt_in.audio.i_bitspersample = 16;
         p_enc->fmt_in.i_codec = AOUT_FMT_S16_NE;
index cb89dd19226321001cd4daad96e68dc8a1ad6ec5..bb680e384200f8b86d0d2c9a58d1bfda4619c2ee 100644 (file)
@@ -120,12 +120,12 @@ int InitAudioDec( decoder_t *p_dec, AVCodecContext *p_context,
         int i_offset;
         int i_size;
 
-        if( p_dec->fmt_in.i_codec == VLC_FOURCC( 'f', 'l', 'a', 'c' ) )
+        if( p_dec->fmt_in.i_codec == VLC_CODEC_FLAC )
         {
             i_offset = 8;
             i_size = p_dec->fmt_in.i_extra - 8;
         }
-        else if( p_dec->fmt_in.i_codec == VLC_FOURCC( 'a', 'l', 'a', 'c' ) )
+        else if( p_dec->fmt_in.i_codec == VLC_CODEC_ALAC )
         {
             static const uint8_t p_pattern[] = { 0, 0, 0, 36, 'a', 'l', 'a', 'c' };
             /* Find alac atom XXX it is a bit ugly */
@@ -454,7 +454,7 @@ static void SetupOutputFormat( decoder_t *p_dec, bool b_trust )
     switch( p_sys->p_context->sample_fmt )
     {
     case SAMPLE_FMT_U8:
-        p_dec->fmt_out.i_codec = VLC_FOURCC('u','8',' ',' ');
+        p_dec->fmt_out.i_codec = VLC_CODEC_U8;
         p_dec->fmt_out.audio.i_bitspersample = 8;
         break;
     case SAMPLE_FMT_S32:
@@ -462,11 +462,11 @@ static void SetupOutputFormat( decoder_t *p_dec, bool b_trust )
         p_dec->fmt_out.audio.i_bitspersample = 32;
         break;
     case SAMPLE_FMT_FLT:
-        p_dec->fmt_out.i_codec = VLC_FOURCC('f','l','3','2');
+        p_dec->fmt_out.i_codec = VLC_CODEC_FL32;
         p_dec->fmt_out.audio.i_bitspersample = 32;
         break;
     case SAMPLE_FMT_DBL:
-        p_dec->fmt_out.i_codec = VLC_FOURCC('f','l','6','4');
+        p_dec->fmt_out.i_codec = VLC_CODEC_FL64;
         p_dec->fmt_out.audio.i_bitspersample = 64;
         break;
 
index 6913a427a67b6bfc34b4030d4e7f271c653398e4..6e13170a3485f731c4cea5d59f3cc38dc7353ca0 100644 (file)
@@ -66,52 +66,52 @@ static const struct
 } chroma_table[] =
 {
     /* Planar YUV formats */
-    {VLC_FOURCC('I','4','4','4'), PIX_FMT_YUV444P, 0, 0, 0 },
-    {VLC_FOURCC('J','4','4','4'), PIX_FMT_YUVJ444P, 0, 0, 0 },
+    {VLC_CODEC_I444, PIX_FMT_YUV444P, 0, 0, 0 },
+    {VLC_CODEC_J444, PIX_FMT_YUVJ444P, 0, 0, 0 },
 
 #if LIBAVUTIL_VERSION_INT >= ((49<<16)+(5<<8)+0)
-    {VLC_FOURCC('I','4','4','0'), PIX_FMT_YUV440P, 0, 0, 0 },
-    {VLC_FOURCC('J','4','4','0'), PIX_FMT_YUVJ440P, 0, 0, 0 },
+    {VLC_CODEC_I440, PIX_FMT_YUV440P, 0, 0, 0 },
+    {VLC_CODEC_J440, PIX_FMT_YUVJ440P, 0, 0, 0 },
 #endif
 
-    {VLC_FOURCC('I','4','2','2'), PIX_FMT_YUV422P, 0, 0, 0 },
-    {VLC_FOURCC('J','4','2','2'), PIX_FMT_YUVJ422P, 0, 0, 0 },
+    {VLC_CODEC_I422, PIX_FMT_YUV422P, 0, 0, 0 },
+    {VLC_CODEC_J422, PIX_FMT_YUVJ422P, 0, 0, 0 },
 
-    {VLC_FOURCC('I','4','2','0'), PIX_FMT_YUV420P, 0, 0, 0 },
-    {VLC_FOURCC('Y','V','1','2'), PIX_FMT_YUV420P, 0, 0, 0 },
+    {VLC_CODEC_I420, PIX_FMT_YUV420P, 0, 0, 0 },
+    {VLC_CODEC_YV12, PIX_FMT_YUV420P, 0, 0, 0 },
     {VLC_FOURCC('I','Y','U','V'), PIX_FMT_YUV420P, 0, 0, 0 },
-    {VLC_FOURCC('J','4','2','0'), PIX_FMT_YUVJ420P, 0, 0, 0 },
-    {VLC_FOURCC('I','4','1','1'), PIX_FMT_YUV411P, 0, 0, 0 },
-    {VLC_FOURCC('I','4','1','0'), PIX_FMT_YUV410P, 0, 0, 0 },
+    {VLC_CODEC_J420, PIX_FMT_YUVJ420P, 0, 0, 0 },
+    {VLC_CODEC_I411, PIX_FMT_YUV411P, 0, 0, 0 },
+    {VLC_CODEC_I410, PIX_FMT_YUV410P, 0, 0, 0 },
     {VLC_FOURCC('Y','V','U','9'), PIX_FMT_YUV410P, 0, 0, 0 },
 
     {VLC_FOURCC('N','V','1','2'), PIX_FMT_NV12, 0, 0, 0 },
     {VLC_FOURCC('N','V','2','1'), PIX_FMT_NV21, 0, 0, 0 },
 
     /* Packed YUV formats */
-    {VLC_FOURCC('Y','U','Y','2'), PIX_FMT_YUYV422, 0, 0, 0 },
+    {VLC_CODEC_YUYV, PIX_FMT_YUYV422, 0, 0, 0 },
     {VLC_FOURCC('Y','U','Y','V'), PIX_FMT_YUYV422, 0, 0, 0 },
-    {VLC_FOURCC('U','Y','V','Y'), PIX_FMT_UYVY422, 0, 0, 0 },
+    {VLC_CODEC_UYVY, PIX_FMT_UYVY422, 0, 0, 0 },
     {VLC_FOURCC('Y','4','1','1'), PIX_FMT_UYYVYY411, 0, 0, 0 },
 
     /* Packed RGB formats */
     VLC_RGB( VLC_FOURCC('R','G','B','4'), PIX_FMT_RGB4, PIX_FMT_BGR4, 0x10, 0x06, 0x01 )
     VLC_RGB( VLC_FOURCC('R','G','B','8'), PIX_FMT_RGB8, PIX_FMT_BGR8, 0xC0, 0x38, 0x07 )
 
-    VLC_RGB( VLC_FOURCC('R','V','1','5'), PIX_FMT_BGR555, PIX_FMT_RGB555, 0x7c00, 0x03e0, 0x001f )
-    VLC_RGB( VLC_FOURCC('R','V','1','6'), PIX_FMT_BGR565, PIX_FMT_RGB565, 0xf800, 0x07e0, 0x001f )
-    VLC_RGB( VLC_FOURCC('R','V','2','4'), PIX_FMT_BGR24, PIX_FMT_RGB24, 0xff0000, 0x00ff00, 0x0000ff )
+    VLC_RGB( VLC_CODEC_RGB15, PIX_FMT_BGR555, PIX_FMT_RGB555, 0x7c00, 0x03e0, 0x001f )
+    VLC_RGB( VLC_CODEC_RGB16, PIX_FMT_BGR565, PIX_FMT_RGB565, 0xf800, 0x07e0, 0x001f )
+    VLC_RGB( VLC_CODEC_RGB24, PIX_FMT_BGR24, PIX_FMT_RGB24, 0xff0000, 0x00ff00, 0x0000ff )
 
-    VLC_RGB( VLC_FOURCC('R','V','3','2'), PIX_FMT_RGB32, PIX_FMT_BGR32, 0x00ff0000, 0x0000ff00, 0x000000ff )
-    VLC_RGB( VLC_FOURCC('R','V','3','2'), PIX_FMT_RGB32_1, PIX_FMT_BGR32_1, 0xff000000, 0x00ff0000, 0x0000ff00 )
+    VLC_RGB( VLC_CODEC_RGB32, PIX_FMT_RGB32, PIX_FMT_BGR32, 0x00ff0000, 0x0000ff00, 0x000000ff )
+    VLC_RGB( VLC_CODEC_RGB32, PIX_FMT_RGB32_1, PIX_FMT_BGR32_1, 0xff000000, 0x00ff0000, 0x0000ff00 )
 
 #if defined(PIX_FMT_RGBA)
-    {VLC_FOURCC('R','G','B','A'), PIX_FMT_RGBA, 0xff000000, 0x00ff0000, 0x0000ff00},
+    {VLC_CODEC_RGBA, PIX_FMT_RGBA, 0xff000000, 0x00ff0000, 0x0000ff00},
 #endif
-    {VLC_FOURCC('G','R','E','Y'), PIX_FMT_GRAY8, 0, 0, 0},
+    {VLC_CODEC_GREY, PIX_FMT_GRAY8, 0, 0, 0},
 
      /* Paletized RGB */
-    {VLC_FOURCC('R','G','B','P'), PIX_FMT_PAL8, 0, 0, 0},
+    {VLC_CODEC_RGBP, PIX_FMT_PAL8, 0, 0, 0},
 
 
     { 0, 0, 0, 0, 0 }
index 092090d731689019063aa48a18caea9f2485adb0..389475573aa26be5061df50b2549d56e3fed5405 100644 (file)
@@ -453,8 +453,8 @@ int OpenEncoder( vlc_object_t *p_this )
             __MAX( __MIN( p_sys->i_b_frames, FF_MAX_B_FRAMES ), 0 );
         p_context->b_frame_strategy = 0;
         if( !p_context->max_b_frames  &&
-            (  p_enc->fmt_out.i_codec == VLC_FOURCC('m', 'p', '2', 'v') ||
-               p_enc->fmt_out.i_codec == VLC_FOURCC('m', 'p', '1', 'v') ) )
+            (  p_enc->fmt_out.i_codec == VLC_CODEC_MP2V ||
+               p_enc->fmt_out.i_codec == VLC_CODEC_MP1V ) )
             p_context->flags |= CODEC_FLAG_LOW_DELAY;
 
         av_reduce( &i_aspect_num, &i_aspect_den,
@@ -470,7 +470,7 @@ int OpenEncoder( vlc_object_t *p_this )
             p_sys->i_buffer_out = FF_MIN_BUFFER_SIZE;
         p_sys->p_buffer_out = malloc( p_sys->i_buffer_out );
 
-        p_enc->fmt_in.i_codec = VLC_FOURCC('I','4','2','0');
+        p_enc->fmt_in.i_codec = VLC_CODEC_I420;
         p_enc->fmt_in.video.i_chroma = p_enc->fmt_in.i_codec;
         GetFfmpegChroma( &p_context->pix_fmt, p_enc->fmt_in.video );
 
@@ -587,7 +587,7 @@ int OpenEncoder( vlc_object_t *p_this )
         p_context->sample_rate = p_enc->fmt_out.audio.i_rate;
         p_context->channels    = p_enc->fmt_out.audio.i_channels;
 
-        if ( p_enc->fmt_out.i_codec == VLC_FOURCC('m','p','4','a') )
+        if ( p_enc->fmt_out.i_codec == VLC_CODEC_MP4A )
         {
             /* XXX: FAAC does resample only when setting the INPUT samplerate
              * to the desired value (-R option of the faac frontend)
@@ -872,7 +872,7 @@ static block_t *EncodeVideo( encoder_t *p_enc, picture_t *p_pict )
     frame.top_field_first = !!p_pict->b_top_field_first;
 
     /* Set the pts of the frame being encoded (segfaults with mpeg4!)*/
-    if( p_enc->fmt_out.i_codec != VLC_FOURCC( 'm', 'p', '4', 'v' ) )
+    if( p_enc->fmt_out.i_codec != VLC_CODEC_MP4V )
     {
         frame.pts = p_pict->date ? p_pict->date : (int64_t)AV_NOPTS_VALUE;
 
index 1c2a2efc8eaa73d6279458041dcf17e0cfe0d206..951470bc8dd6c3db774d0834422c2fbc6be269ea 100644 (file)
@@ -128,7 +128,7 @@ static inline picture_t *ffmpeg_NewPictBuf( decoder_t *p_dec,
     if( GetVlcChroma( &p_dec->fmt_out.video, p_context->pix_fmt ) != VLC_SUCCESS )
     {
         /* we are doomed, but not really, because most codecs set their pix_fmt much later */
-        p_dec->fmt_out.i_codec = VLC_FOURCC('I','4','2','0');
+        p_dec->fmt_out.i_codec = VLC_CODEC_I420;
     }
     p_dec->fmt_out.i_codec = p_dec->fmt_out.video.i_chroma;
 
@@ -340,7 +340,7 @@ int InitVideoDec( decoder_t *p_dec, AVCodecContext *p_context,
     if( GetVlcChroma( &p_dec->fmt_out.video, p_context->pix_fmt ) != VLC_SUCCESS )
     {
         /* we are doomed. but not really, because most codecs set their pix_fmt later on */
-        p_dec->fmt_out.i_codec = VLC_FOURCC('I','4','2','0');
+        p_dec->fmt_out.i_codec = VLC_CODEC_I420;
     }
     p_dec->fmt_out.i_codec = p_dec->fmt_out.video.i_chroma;
 
index 419d576626823f8374ed551d73c73be5bb465683..bf312fd967ca01746f576d3ca9d0311aaf04e8d2 100644 (file)
@@ -210,7 +210,7 @@ static int Open( vlc_object_t *p_this )
     Eia608Init( &p_sys->eia608 );
 
     p_dec->fmt_out.i_cat = SPU_ES;
-    p_dec->fmt_out.i_codec = VLC_FOURCC('T','E','X','T');
+    p_dec->fmt_out.i_codec = VLC_CODEC_TEXT;
 
     return VLC_SUCCESS;
 }
@@ -340,7 +340,7 @@ static subpicture_t *Subtitle( decoder_t *p_dec, char *psz_subtitle, char *psz_h
 
     /* Create a new subpicture region */
     memset( &fmt, 0, sizeof(video_format_t) );
-    fmt.i_chroma = VLC_FOURCC('T','E','X','T');
+    fmt.i_chroma = VLC_CODEC_TEXT;
     fmt.i_aspect = 0;
     fmt.i_width = fmt.i_height = 0;
     fmt.i_x_offset = fmt.i_y_offset = 0;
index c1a3e754a014daecd5def969713962d1d3070999..974021ea7d6769f11a9a56ca87a235313e065aed 100644 (file)
@@ -99,7 +99,7 @@ static int Open( vlc_object_t *p_this )
     decoder_t *p_dec = (decoder_t*)p_this;
     decoder_sys_t *p_sys;
 
-    if( p_dec->fmt_in.i_codec != VLC_FOURCC('C','D','G',' ') )
+    if( p_dec->fmt_in.i_codec != VLC_CODEC_CDG )
         return VLC_EGENERIC;
 
     /* Allocate the memory needed to store the decoder's structure */
@@ -114,7 +114,7 @@ static int Open( vlc_object_t *p_this )
     /* Set output properties
      * TODO maybe it would be better to use RV16 or RV24 ? */
     p_dec->fmt_out.i_cat = VIDEO_ES;
-    p_dec->fmt_out.i_codec = VLC_FOURCC('R','V','3','2');
+    p_dec->fmt_out.i_codec = VLC_CODEC_RGB32;
     p_dec->fmt_out.video.i_width = CDG_DISPLAY_WIDTH;
     p_dec->fmt_out.video.i_height = CDG_DISPLAY_HEIGHT;
     p_dec->fmt_out.video.i_aspect =
index 3802f4a3322a7d95d9f0e65125257f1830fa770c..d09e16a5c6cbbf803d0db678ebc928206d52aa40 100644 (file)
@@ -102,7 +102,7 @@ static int Create( vlc_object_t *p_this )
     csri_rend *p_render;
     struct csri_stream_ext *p_stream_ext;
 
-    if( p_dec->fmt_in.i_codec != VLC_FOURCC('s','s','a',' ') )
+    if( p_dec->fmt_in.i_codec != VLC_CODEC_SSA )
         return VLC_EGENERIC;
 
     p_render = csri_renderer_default();
@@ -131,7 +131,7 @@ static int Create( vlc_object_t *p_this )
                                                    p_dec->fmt_in.p_extra ? strnlen( p_dec->fmt_in.p_extra, p_dec->fmt_in.i_extra ) : 0,
                                                    NULL);
     p_dec->fmt_out.i_cat = SPU_ES;
-    p_dec->fmt_out.i_codec = VLC_FOURCC('R','G','B','A');
+    p_dec->fmt_out.i_codec = VLC_CODEC_RGBA;
 
     return VLC_SUCCESS;
 }
@@ -268,7 +268,7 @@ static void UpdateRegions( spu_t *p_spu, subpicture_t *p_subpic,
     /* XXX On x86 at least our RGBA is mapped to their BGRA
      * TODO confirm that is the same on big endian cpu */
     fmt = *p_fmt;
-    fmt.i_chroma = VLC_FOURCC('R','G','B','A');
+    fmt.i_chroma = VLC_CODEC_RGBA;
     fmt.i_width = fmt.i_visible_width;
     fmt.i_height = fmt.i_visible_height;
     fmt.i_bits_per_pixel = 0;
index dbd59164dc718ef19ce7bc339ed0386a40b5ebb4..4570710c5850e420a4b71c9b4fa85798b45bf646 100644 (file)
@@ -129,7 +129,7 @@ static int DecoderOpen( vlc_object_t *p_this )
     p_dec->pf_packetize  = Packetize;
 
     p_dec->fmt_out.i_cat = SPU_ES;
-    p_dec->fmt_out.i_codec = VLC_FOURCC('Y','U','V','P');
+    p_dec->fmt_out.i_codec = VLC_CODEC_YUVP;
 
     return VLC_SUCCESS;
 }
@@ -512,7 +512,7 @@ static subpicture_t *DecodePacket( decoder_t *p_dec, block_t *p_data )
 
     /* Create new SPU region */
     memset( &fmt, 0, sizeof(video_format_t) );
-    fmt.i_chroma = VLC_FOURCC('Y','U','V','P');
+    fmt.i_chroma = VLC_CODEC_YUVP;
     fmt.i_aspect = VOUT_ASPECT_FACTOR;
     fmt.i_width = fmt.i_visible_width = p_sys->i_width;
     fmt.i_height = fmt.i_visible_height = p_sys->i_height;
index f397ba281a829f9073778fc0356d9cfe7cd5b746..7e11878783e4dd34dda667c7601d419064954ff6 100644 (file)
@@ -443,7 +443,7 @@ static int OpenEncoder( vlc_object_t *p_this )
     float f_tmp;
     char *psz_tmp;
 
-    if( p_enc->fmt_out.i_codec != VLC_FOURCC('d','r','a','c') &&
+    if( p_enc->fmt_out.i_codec != VLC_CODEC_DIRAC &&
         !p_enc->b_force )
     {
         return VLC_EGENERIC;
@@ -462,7 +462,7 @@ static int OpenEncoder( vlc_object_t *p_this )
 
     p_enc->p_sys = p_sys;
     p_enc->pf_encode_video = Encode;
-    p_enc->fmt_out.i_codec = VLC_FOURCC('d','r','a','c');
+    p_enc->fmt_out.i_codec = VLC_CODEC_DIRAC;
     p_enc->fmt_out.i_cat = VIDEO_ES;
 
     if( ( p_sys->p_dts_fifo = block_FifoNew() ) == NULL )
@@ -519,19 +519,19 @@ static int OpenEncoder( vlc_object_t *p_this )
     if( !psz_tmp )
         goto error;
     else if( !strcmp( psz_tmp, "420" ) ) {
-        p_enc->fmt_in.i_codec = VLC_FOURCC('I','4','2','0');
+        p_enc->fmt_in.i_codec = VLC_CODEC_I420;
         p_enc->fmt_in.video.i_bits_per_pixel = 12;
         p_sys->ctx.src_params.chroma = format420;
         p_sys->i_buffer_in = p_enc->fmt_in.video.i_width * p_enc->fmt_in.video.i_height * 3 / 2;
     }
     else if( !strcmp( psz_tmp, "422" ) ) {
-        p_enc->fmt_in.i_codec = VLC_FOURCC('I','4','2','2');
+        p_enc->fmt_in.i_codec = VLC_CODEC_I422;
         p_enc->fmt_in.video.i_bits_per_pixel = 16;
         p_sys->ctx.src_params.chroma = format422;
         p_sys->i_buffer_in = p_enc->fmt_in.video.i_width * p_enc->fmt_in.video.i_height * 2;
     }
     else if( !strcmp( psz_tmp, "444" ) ) {
-        p_enc->fmt_in.i_codec = VLC_FOURCC('I','4','4','4');
+        p_enc->fmt_in.i_codec = VLC_CODEC_I444;
         p_enc->fmt_in.video.i_bits_per_pixel = 24;
         p_sys->ctx.src_params.chroma = format444;
         p_sys->i_buffer_in = p_enc->fmt_in.video.i_width * p_enc->fmt_in.video.i_height * 3;
index 0c10fba0a6630a3ab57927ab0df253ac903d4fe1..236015f86be24ba8dc560c2abe648a88238579e1 100644 (file)
@@ -187,15 +187,15 @@ static const codec_dll decoders_table[] =
     { VLC_FOURCC('W','V','C','1'), "wvc1dmod.dll", &guid_wvc1 },
     { VLC_FOURCC('w','v','c','1'), "wvc1dmod.dll", &guid_wvc1 },
     /* WMV3 */
-    { VLC_FOURCC('W','M','V','3'), "wmv9dmod.dll", &guid_wmv9 },
+    { VLC_CODEC_WMV3, "wmv9dmod.dll", &guid_wmv9 },
     { VLC_FOURCC('w','m','v','3'), "wmv9dmod.dll", &guid_wmv9 },
     { VLC_FOURCC('W','M','V','P'), "wmv9dmod.dll", &guid_wmv9 },
     { VLC_FOURCC('w','m','v','p'), "wmv9dmod.dll", &guid_wmv9 },
     /* WMV2 */
-    { VLC_FOURCC('W','M','V','2'), "wmvdmod.dll", &guid_wmv },
+    { VLC_CODEC_WMV2, "wmvdmod.dll", &guid_wmv },
     { VLC_FOURCC('w','m','v','2'), "wmvdmod.dll", &guid_wmv },
     /* WMV1 */
-    { VLC_FOURCC('W','M','V','1'), "wmvdmod.dll", &guid_wmv },
+    { VLC_CODEC_WMV1, "wmvdmod.dll", &guid_wmv },
     { VLC_FOURCC('w','m','v','1'), "wmvdmod.dll", &guid_wmv },
     /* Screen codecs */
     { VLC_FOURCC('M','S','S','2'), "wmsdmod.dll", &guid_wms },
@@ -211,14 +211,14 @@ static const codec_dll decoders_table[] =
     /* WMA 3 */
     { VLC_FOURCC('W','M','A','3'), "wma9dmod.dll", &guid_wma9 },
     { VLC_FOURCC('w','m','a','3'), "wma9dmod.dll", &guid_wma9 },
-    { VLC_FOURCC('W','M','A','P'), "wma9dmod.dll", &guid_wma9 },
+    { VLC_CODEC_WMAP, "wma9dmod.dll", &guid_wma9 },
     { VLC_FOURCC('w','m','a','p'), "wma9dmod.dll", &guid_wma9 },
     /* WMA 2 */
-    { VLC_FOURCC('W','M','A','2'), "wma9dmod.dll", &guid_wma9 },
+    { VLC_CODEC_WMA2, "wma9dmod.dll", &guid_wma9 },
     { VLC_FOURCC('w','m','a','2'), "wma9dmod.dll", &guid_wma9 },
 
     /* WMA Speech */
-    { VLC_FOURCC('W','M','A','S'), "wmspdmod.dll", &guid_wma },
+    { VLC_CODEC_WMAS, "wmspdmod.dll", &guid_wma },
     { VLC_FOURCC('w','m','a','s'), "wmspdmod.dll", &guid_wma },
 
     /* */
@@ -228,20 +228,20 @@ static const codec_dll decoders_table[] =
 static const codec_dll encoders_table[] =
 {
     /* WMV3 */
-    { VLC_FOURCC('W','M','V','3'), "wmvdmoe2.dll", &guid_wmv_enc2 },
+    { VLC_CODEC_WMV3, "wmvdmoe2.dll", &guid_wmv_enc2 },
     { VLC_FOURCC('w','m','v','3'), "wmvdmoe2.dll", &guid_wmv_enc2 },
     /* WMV2 */
-    { VLC_FOURCC('W','M','V','2'), "wmvdmoe2.dll", &guid_wmv_enc2 },
+    { VLC_CODEC_WMV2, "wmvdmoe2.dll", &guid_wmv_enc2 },
     { VLC_FOURCC('w','m','v','2'), "wmvdmoe2.dll", &guid_wmv_enc2 },
     /* WMV1 */
-    { VLC_FOURCC('W','M','V','1'), "wmvdmoe2.dll", &guid_wmv_enc2 },
+    { VLC_CODEC_WMV1, "wmvdmoe2.dll", &guid_wmv_enc2 },
     { VLC_FOURCC('w','m','v','1'), "wmvdmoe2.dll", &guid_wmv_enc2 },
 
     /* WMA 3 */
     { VLC_FOURCC('W','M','A','3'), "wmadmoe.dll", &guid_wma_enc },
     { VLC_FOURCC('w','m','a','3'), "wmadmoe.dll", &guid_wma_enc },
     /* WMA 2 */
-    { VLC_FOURCC('W','M','A','2'), "wmadmoe.dll", &guid_wma_enc },
+    { VLC_CODEC_WMA2, "wmadmoe.dll", &guid_wma_enc },
     { VLC_FOURCC('w','m','a','2'), "wmadmoe.dll", &guid_wma_enc },
 
     /* */
@@ -502,14 +502,14 @@ static int DecOpen( decoder_t *p_dec )
     {
         BITMAPINFOHEADER *p_bih;
         DMO_MEDIA_TYPE mt;
-        unsigned i_chroma = VLC_FOURCC('Y','U','Y','2');
+        unsigned i_chroma = VLC_CODEC_YUYV;
         int i_planes = 1, i_bpp = 16;
         int i = 0;
 
         /* Find out which chroma to use */
         while( !p_dmo->vt->GetOutputType( p_dmo, 0, i++, &mt ) )
         {
-            if( mt.subtype.Data1 == VLC_FOURCC('Y','V','1','2') )
+            if( mt.subtype.Data1 == VLC_CODEC_YV12 )
             {
                 i_chroma = mt.subtype.Data1;
                 i_planes = 3; i_bpp = 12;
@@ -518,8 +518,8 @@ static int DecOpen( decoder_t *p_dec )
             DMOFreeMediaType( &mt );
         }
 
-        p_dec->fmt_out.i_codec = i_chroma == VLC_FOURCC('Y','V','1','2') ?
-            VLC_FOURCC('I','4','2','0') : i_chroma;
+        p_dec->fmt_out.i_codec = i_chroma == VLC_CODEC_YV12 ?
+            VLC_CODEC_I420 : i_chroma;
         p_dec->fmt_out.video.i_width = p_dec->fmt_in.video.i_width;
         p_dec->fmt_out.video.i_height = p_dec->fmt_in.video.i_height;
         p_dec->fmt_out.video.i_bits_per_pixel = i_bpp;
@@ -1122,7 +1122,7 @@ static int EncoderSetVideoType( encoder_t *p_enc, IMediaObject *p_dmo )
     memset( &vih, 0, sizeof(VIDEOINFOHEADER) );
 
     p_bih = &vih.bmiHeader;
-    p_bih->biCompression = VLC_FOURCC('I','4','2','0');
+    p_bih->biCompression = VLC_CODEC_I420;
     p_bih->biWidth = p_enc->fmt_in.video.i_width;
     p_bih->biHeight = p_enc->fmt_in.video.i_height;
     p_bih->biBitCount = p_enc->fmt_in.video.i_bits_per_pixel;
@@ -1237,7 +1237,7 @@ static int EncoderSetVideoType( encoder_t *p_enc, IMediaObject *p_dmo )
     i_err = p_dmo->vt->SetOutputType( p_dmo, 0, &dmo_type, 0 );
 
     p_vih = (VIDEOINFOHEADER *)dmo_type.pbFormat;
-    p_enc->fmt_in.i_codec = VLC_FOURCC('I','4','2','0');
+    p_enc->fmt_in.i_codec = VLC_CODEC_I420;
 
     DMOFreeMediaType( &dmo_type );
     if( i_err )
index 9b4ac47f8d2a92ecf1fe9c414570e584a99bfa5a..3a565bdcb6a4d5d01367907f961c994ba122e8b5 100644 (file)
@@ -140,7 +140,7 @@ static int OpenCommon( vlc_object_t *p_this, bool b_packetizer )
     decoder_t *p_dec = (decoder_t*)p_this;
     decoder_sys_t *p_sys;
 
-    if( p_dec->fmt_in.i_codec != VLC_FOURCC('d','t','s',' ') &&
+    if( p_dec->fmt_in.i_codec != VLC_CODEC_DTS &&
         p_dec->fmt_in.i_codec != VLC_FOURCC('d','t','s','b') )
     {
         return VLC_EGENERIC;
@@ -160,7 +160,7 @@ static int OpenCommon( vlc_object_t *p_this, bool b_packetizer )
 
     /* Set output properties */
     p_dec->fmt_out.i_cat = AUDIO_ES;
-    p_dec->fmt_out.i_codec = VLC_FOURCC('d','t','s',' ');
+    p_dec->fmt_out.i_codec = VLC_CODEC_DTS;
     p_dec->fmt_out.audio.i_rate = 0; /* So end_date gets initialized */
 
     /* Set callback */
index b102cd069c810500b6cc883c54448476fc9aeb69..f546e7182f670c736bafc7ab5ecc459d19c3cf01 100644 (file)
@@ -296,7 +296,7 @@ static int Open( vlc_object_t *p_this )
     vlc_value_t    val;
     int i_posx, i_posy;
 
-    if( p_dec->fmt_in.i_codec != VLC_FOURCC('d','v','b','s') )
+    if( p_dec->fmt_in.i_codec != VLC_CODEC_DVBS )
     {
         return VLC_EGENERIC;
     }
@@ -1542,7 +1542,7 @@ static subpicture_t *render( decoder_t *p_dec )
 
         /* Create new SPU region */
         memset( &fmt, 0, sizeof(video_format_t) );
-        fmt.i_chroma = VLC_FOURCC('Y','U','V','P');
+        fmt.i_chroma = VLC_CODEC_YUVP;
         fmt.i_aspect = 0; /* 0 means use aspect ratio of background video */
         fmt.i_width = fmt.i_visible_width = p_region->i_width;
         fmt.i_height = fmt.i_visible_height = p_region->i_height;
@@ -1595,7 +1595,7 @@ static subpicture_t *render( decoder_t *p_dec )
 
             /* Create new SPU region */
             memset( &fmt, 0, sizeof(video_format_t) );
-            fmt.i_chroma = VLC_FOURCC('T','E','X','T');
+            fmt.i_chroma = VLC_CODEC_TEXT;
             fmt.i_aspect = VOUT_ASPECT_FACTOR;
             fmt.i_width = fmt.i_visible_width = p_region->i_width;
             fmt.i_height = fmt.i_visible_height = p_region->i_height;
@@ -1659,7 +1659,7 @@ static int OpenEncoder( vlc_object_t *p_this )
     encoder_sys_t *p_sys;
     vlc_value_t val;
 
-    if( ( p_enc->fmt_out.i_codec != VLC_FOURCC('d','v','b','s') ) &&
+    if( ( p_enc->fmt_out.i_codec != VLC_CODEC_DVBS ) &&
         !p_enc->b_force )
     {
         return VLC_EGENERIC;
@@ -1671,7 +1671,7 @@ static int OpenEncoder( vlc_object_t *p_this )
     p_enc->p_sys = p_sys;
 
     p_enc->pf_encode_sub = Encode;
-    p_enc->fmt_out.i_codec = VLC_FOURCC('d','v','b','s');
+    p_enc->fmt_out.i_codec = VLC_CODEC_DVBS;
     p_enc->fmt_out.subs.dvb.i_id  = 1 << 16 | 1;
 
     config_ChainParse( p_enc, ENC_CFG_PREFIX, ppsz_enc_options, p_enc->p_cfg );
@@ -1692,8 +1692,8 @@ static int OpenEncoder( vlc_object_t *p_this )
     return VLC_SUCCESS;
 }
 
-/* FIXME: this routine is a hack to convert VLC_FOURCC('Y','U','V','A')
- *        into VLC_FOURCC('Y','U','V','P')
+/* FIXME: this routine is a hack to convert VLC_CODEC_YUVA
+ *        into VLC_CODEC_YUVP
  */
 static subpicture_t *YuvaYuvp( subpicture_t *p_subpic )
 {
@@ -1722,7 +1722,7 @@ static subpicture_t *YuvaYuvp( subpicture_t *p_subpic )
 #ifdef DEBUG_DVBSUB
         msg_Dbg( p_enc, "YuvaYuvp: i_pixels=%d, i_iterator=%d", i_pixels, i_iterator );
 #endif
-        p_fmt->i_chroma = VLC_FOURCC('Y','U','V','P');
+        p_fmt->i_chroma = VLC_CODEC_YUVP;
         p_fmt->p_palette = (video_palette_t *) malloc( sizeof( video_palette_t ) );
         if( !p_fmt->p_palette ) break;
         p_fmt->p_palette->i_entries = 0;
@@ -1909,11 +1909,11 @@ static block_t *Encode( encoder_t *p_enc, subpicture_t *p_subpic )
 
     if( !p_subpic || !p_subpic->p_region ) return NULL;
 
-    /* FIXME: this is a hack to convert VLC_FOURCC('Y','U','V','A') into
-     *  VLC_FOURCC('Y','U','V','P')
+    /* FIXME: this is a hack to convert VLC_CODEC_YUVA into
+     *  VLC_CODEC_YUVP
      */
     p_region = p_subpic->p_region;
-    if( p_region->fmt.i_chroma == VLC_FOURCC('Y','U','V','A') )
+    if( p_region->fmt.i_chroma == VLC_CODEC_YUVA )
     {
         p_temp = YuvaYuvp( p_subpic );
         if( !p_temp )
@@ -1927,8 +1927,8 @@ static block_t *Encode( encoder_t *p_enc, subpicture_t *p_subpic )
     /* Sanity check */
     if( !p_region ) return NULL;
 
-    if( ( p_region->fmt.i_chroma != VLC_FOURCC('T','E','X','T') ) &&
-        ( p_region->fmt.i_chroma != VLC_FOURCC('Y','U','V','P') ) )
+    if( ( p_region->fmt.i_chroma != VLC_CODEC_TEXT ) &&
+        ( p_region->fmt.i_chroma != VLC_CODEC_YUVP ) )
     {
         char psz_fourcc[5];
         memset( &psz_fourcc, 0, sizeof( psz_fourcc ) );
@@ -2113,7 +2113,7 @@ static void encode_clut( encoder_t *p_enc, bs_t *s, subpicture_t *p_subpic )
     /* Sanity check */
     if( !p_region ) return;
 
-    if( p_region->fmt.i_chroma == VLC_FOURCC('Y','U','V','P') )
+    if( p_region->fmt.i_chroma == VLC_CODEC_YUVP )
     {
         p_pal = p_region->fmt.p_palette;
     }
@@ -2167,7 +2167,7 @@ static void encode_region_composition( encoder_t *p_enc, bs_t *s,
     {
         int i_entries = 4, i_depth = 0x1, i_bg = 0;
         bool b_text =
-            ( p_region->fmt.i_chroma == VLC_FOURCC('T','E','X','T') );
+            ( p_region->fmt.i_chroma == VLC_CODEC_TEXT );
 
         if( !b_text )
         {
@@ -2253,10 +2253,10 @@ static void encode_object( encoder_t *p_enc, bs_t *s, subpicture_t *p_subpic )
         /* object coding method */
         switch( p_region->fmt.i_chroma )
         {
-        case VLC_FOURCC( 'Y','U','V','P' ):
+        case VLC_CODEC_YUVP:
             bs_write( s, 2, 0 );
             break;
-        case VLC_FOURCC( 'T','E','X','T' ):
+        case VLC_CODEC_TEXT:
             bs_write( s, 2, 1 );
             break;
         default:
@@ -2267,7 +2267,7 @@ static void encode_object( encoder_t *p_enc, bs_t *s, subpicture_t *p_subpic )
         bs_write( s, 1, 0 ); /* non modifying color flag */
         bs_write( s, 1, 0 ); /* Reserved */
 
-        if( p_region->fmt.i_chroma == VLC_FOURCC( 'T','E','X','T' ) )
+        if( p_region->fmt.i_chroma == VLC_CODEC_TEXT )
         {
             int i_size, i;
 
@@ -2326,7 +2326,7 @@ static void encode_pixel_data( encoder_t *p_enc, bs_t *s,
     unsigned int i_line;
 
     /* Sanity check */
-    if( p_region->fmt.i_chroma != VLC_FOURCC('Y','U','V','P') ) return;
+    if( p_region->fmt.i_chroma != VLC_CODEC_YUVP ) return;
 
     /* Encode line by line */
     for( i_line = !b_top; i_line < p_region->fmt.i_visible_height;
index e050a94bc0e15293f45ca1502f5998f249bd1437..1f4f079d7c74731deefc4e7f0cf57f95d82e1dcd 100644 (file)
@@ -117,7 +117,7 @@ static int Open( vlc_object_t *p_this )
     decoder_sys_t *p_sys = p_dec->p_sys;
     faacDecConfiguration *cfg;
 
-    if( p_dec->fmt_in.i_codec != VLC_FOURCC('m','p','4','a') )
+    if( p_dec->fmt_in.i_codec != VLC_CODEC_MP4A )
     {
         return VLC_EGENERIC;
     }
@@ -138,7 +138,7 @@ static int Open( vlc_object_t *p_this )
     p_dec->fmt_out.i_cat = AUDIO_ES;
 
     if (vlc_CPU() & CPU_CAPABILITY_FPU)
-        p_dec->fmt_out.i_codec = VLC_FOURCC('f','l','3','2');
+        p_dec->fmt_out.i_codec = VLC_CODEC_FL32;
     else
         p_dec->fmt_out.i_codec = AOUT_FMT_S16_NE;
     p_dec->pf_decode_audio = DecodeBlock;
index 0696eb1b8d5b2571d8a10d86b3cb32aa6da5b129..b9787851c7bf2428357f81516acb7bcf7a91127c 100644 (file)
@@ -172,14 +172,15 @@ static int OpenDecoder( vlc_object_t *p_this )
     if( strlen( psz_chroma ) != 4 )
     {
         msg_Warn( p_dec, "Invalid chroma (%s). Using I420.", psz_chroma );
-        fmt_out.i_chroma = VLC_FOURCC('I','4','2','0');
+        fmt_out.i_chroma = VLC_CODEC_I420;
     }
     else
     {
-        fmt_out.i_chroma = VLC_FOURCC( psz_chroma[0],
-                                       psz_chroma[1],
-                                       psz_chroma[2],
-                                       psz_chroma[3] );
+        fmt_out.i_chroma = vlc_fourcc_GetCodec( VIDEO_ES,
+                                                VLC_FOURCC( psz_chroma[0],
+                                                            psz_chroma[1],
+                                                            psz_chroma[2],
+                                                            psz_chroma[3] ) );
     }
     free( psz_chroma );
 
index be411d5489e14e3a49ef35fe41006c99c038e8e0..b250cc3c3b5099a187a65d86057483fc73eed74d 100644 (file)
@@ -210,7 +210,7 @@ static int OpenDecoder( vlc_object_t *p_this )
     decoder_t *p_dec = (decoder_t*)p_this;
     decoder_sys_t *p_sys;
 
-    if( p_dec->fmt_in.i_codec != VLC_FOURCC('f','l','a','c') )
+    if( p_dec->fmt_in.i_codec != VLC_CODEC_FLAC )
     {
         return VLC_EGENERIC;
     }
@@ -270,7 +270,7 @@ static int OpenDecoder( vlc_object_t *p_this )
 
     /* Set output properties */
     p_dec->fmt_out.i_cat = AUDIO_ES;
-    p_dec->fmt_out.i_codec = VLC_FOURCC('f','l','3','2');
+    p_dec->fmt_out.i_codec = VLC_CODEC_FL32;
 
     /* Set callbacks */
 #ifdef USE_LIBFLAC
@@ -294,7 +294,7 @@ static int OpenPacketizer( vlc_object_t *p_this )
     p_dec->pf_packetize    = PacketizeBlock;
 
     /* Set output properties */
-    p_dec->fmt_out.i_codec = VLC_FOURCC('f','l','a','c');
+    p_dec->fmt_out.i_codec = VLC_CODEC_FLAC;
 
     if( i_ret != VLC_SUCCESS )
     {
@@ -359,7 +359,7 @@ static void ProcessHeader( decoder_t *p_dec )
 
     if( !p_sys->b_stream_info ) return;
 
-    if( p_dec->fmt_out.i_codec == VLC_FOURCC('f','l','a','c') )
+    if( p_dec->fmt_out.i_codec == VLC_CODEC_FLAC )
     {
         p_dec->fmt_out.i_extra = p_dec->fmt_in.i_extra;
         p_dec->fmt_out.p_extra =
@@ -685,7 +685,7 @@ static void DecoderMetadataCallback( const FLAC__StreamDecoder *decoder,
         switch( metadata->data.stream_info.bits_per_sample )
         {
         case 8:
-            p_dec->fmt_out.i_codec = VLC_FOURCC('s','8',' ',' ');
+            p_dec->fmt_out.i_codec = VLC_CODEC_S8;
             break;
         case 16:
             p_dec->fmt_out.i_codec = AOUT_FMT_S16_NE;
@@ -696,7 +696,7 @@ static void DecoderMetadataCallback( const FLAC__StreamDecoder *decoder,
         default:
             msg_Dbg( p_dec, "strange bit/sample value: %d",
                      metadata->data.stream_info.bits_per_sample );
-            p_dec->fmt_out.i_codec = VLC_FOURCC('f','i','3','2');
+            p_dec->fmt_out.i_codec = VLC_CODEC_FI32;
             break;
         }
     }
@@ -1284,7 +1284,7 @@ static int OpenEncoder( vlc_object_t *p_this )
     encoder_t *p_enc = (encoder_t *)p_this;
     encoder_sys_t *p_sys;
 
-    if( p_enc->fmt_out.i_codec != VLC_FOURCC('f','l','a','c') &&
+    if( p_enc->fmt_out.i_codec != VLC_CODEC_FLAC &&
         !p_enc->b_force )
     {
         return VLC_EGENERIC;
@@ -1295,7 +1295,7 @@ static int OpenEncoder( vlc_object_t *p_this )
         return VLC_ENOMEM;
     p_enc->p_sys = p_sys;
     p_enc->pf_encode_audio = Encode;
-    p_enc->fmt_out.i_codec = VLC_FOURCC('f','l','a','c');
+    p_enc->fmt_out.i_codec = VLC_CODEC_FLAC;
 
     p_sys->i_headers = 0;
     p_sys->p_buffer = 0;
index f0ef618cf91cb266744a1850ce4e387e9389368e..ae08aeff7cdc04587158a9511fb8ed7545dfe921 100644 (file)
@@ -66,7 +66,7 @@ static int Open (vlc_object_t *p_this)
     decoder_t *p_dec = (decoder_t *)p_this;
     decoder_sys_t *p_sys;
 
-    if (p_dec->fmt_in.i_codec != VLC_FOURCC ('M', 'I', 'D', 'I'))
+    if (p_dec->fmt_in.i_codec != VLC_CODEC_MIDI)
         return VLC_EGENERIC;
 
     char *font_path = var_CreateGetNonEmptyString (p_this, "soundfont");
@@ -82,7 +82,7 @@ static int Open (vlc_object_t *p_this)
     p_dec->fmt_out.audio.i_original_channels =
     p_dec->fmt_out.audio.i_physical_channels =
         AOUT_CHAN_LEFT | AOUT_CHAN_RIGHT;
-    p_dec->fmt_out.i_codec = VLC_FOURCC('f', 'l', '3', '2');
+    p_dec->fmt_out.i_codec = VLC_CODEC_FL32;
     p_dec->fmt_out.audio.i_bitspersample = 32;
 
     p_dec->pf_decode_audio = DecodeBlock;
index 396e80c58ad677126e6583f3817a4ad9e97dd46d..4a6ed8f7fca294ca80caaeb6a9fe638997d4b5c5 100644 (file)
@@ -151,8 +151,8 @@ static int OpenDecoder( vlc_object_t *p_this )
     }
 
     /* Set output properties */
-    //p_dec->fmt_out.i_codec = VLC_FOURCC('R','G','B','A');
-    p_dec->fmt_out.i_codec = VLC_FOURCC('R','V','2','4');
+    //p_dec->fmt_out.i_codec = VLC_CODEC_RGBA;
+    p_dec->fmt_out.i_codec = VLC_CODEC_RGB24;
     p_dec->fmt_out.video.i_width = p_dec->p_sys->i_width;
     p_dec->fmt_out.video.i_height = p_dec->p_sys->i_height;
     p_dec->fmt_out.video.i_aspect = VOUT_ASPECT_FACTOR * p_dec->p_sys->i_width / p_dec->p_sys->i_height;
index a6d8ef4156f315111baeccd42811453277dfa0b8..146c40f0e1b7149911fbbf2edf334cd756cf587e 100644 (file)
@@ -952,7 +952,7 @@ static void TigerUpdateRegions( spu_t *p_spu, subpicture_t *p_subpic, const vide
 
     /* create a full frame region - this will also tell Tiger the size of the frame */
     fmt = *p_fmt;
-    fmt.i_chroma = VLC_FOURCC('R','G','B','A');
+    fmt.i_chroma = VLC_CODEC_RGBA;
     fmt.i_width = fmt.i_visible_width;
     fmt.i_height = fmt.i_visible_height;
     fmt.i_bits_per_pixel = 0;
@@ -1348,7 +1348,7 @@ static subpicture_t *SetupSimpleKateSPU( decoder_t *p_dec, subpicture_t *p_spu,
 
         /* create a separate region for the bitmap */
         memset( &fmt, 0, sizeof(video_format_t) );
-        fmt.i_chroma = VLC_FOURCC('Y','U','V','P');
+        fmt.i_chroma = VLC_CODEC_YUVP;
         fmt.i_aspect = 0;
         fmt.i_width = fmt.i_visible_width = ev->bitmap->width;
         fmt.i_height = fmt.i_visible_height = ev->bitmap->height;
@@ -1371,7 +1371,7 @@ static subpicture_t *SetupSimpleKateSPU( decoder_t *p_dec, subpicture_t *p_spu,
     }
 
     /* text region */
-    fmt.i_chroma = VLC_FOURCC('T','E','X','T');
+    fmt.i_chroma = VLC_CODEC_TEXT;
     fmt.i_aspect = 0;
     fmt.i_width = fmt.i_height = 0;
     fmt.i_x_offset = fmt.i_y_offset = 0;
index 70d9c52fc39e0ed1665bf9e25c59641e5aa47412..7ae8c53da1c82a47d79fc0f8ff8a46564b2d125f 100644 (file)
@@ -136,7 +136,7 @@ static int Create( vlc_object_t *p_this )
     decoder_sys_t *p_sys;
     ass_track_t *p_track;
 
-    if( p_dec->fmt_in.i_codec != VLC_FOURCC('s','s','a',' ') )
+    if( p_dec->fmt_in.i_codec != VLC_CODEC_SSA )
         return VLC_EGENERIC;
 
     p_dec->pf_decode_sub = DecodeBlock;
@@ -168,7 +168,7 @@ static int Create( vlc_object_t *p_this )
     vlc_mutex_unlock( &libass_lock );
 
     p_dec->fmt_out.i_cat = SPU_ES;
-    p_dec->fmt_out.i_codec = VLC_FOURCC('R','G','B','A');
+    p_dec->fmt_out.i_codec = VLC_CODEC_RGBA;
 
     return VLC_SUCCESS;
 }
@@ -332,7 +332,7 @@ static void UpdateRegions( spu_t *p_spu, subpicture_t *p_subpic,
 
     /* */
     fmt = *p_fmt;
-    fmt.i_chroma = VLC_FOURCC('R','G','B','A');
+    fmt.i_chroma = VLC_CODEC_RGBA;
     fmt.i_width = fmt.i_visible_width;
     fmt.i_height = fmt.i_visible_height;
     fmt.i_bits_per_pixel = 0;
index 5a2ef6fe7987245632bddbfa0130263327d2dec0..7b6620d697e0327fd96c6f267f6123ccfc674437 100644 (file)
@@ -119,11 +119,11 @@ static int OpenDecoder( vlc_object_t *p_this )
     decoder_sys_t *p_sys;
     uint32_t i_accel = 0;
 
-    if( p_dec->fmt_in.i_codec != VLC_FOURCC('m','p','g','v') &&
+    if( p_dec->fmt_in.i_codec != VLC_CODEC_MPGV &&
         p_dec->fmt_in.i_codec != VLC_FOURCC('m','p','g','1') &&
         /* Pinnacle hardware-mpeg1 */
         p_dec->fmt_in.i_codec != VLC_FOURCC('P','I','M','1') &&
-        p_dec->fmt_in.i_codec != VLC_FOURCC('m','p','2','v') &&
+        p_dec->fmt_in.i_codec != VLC_CODEC_MP2V &&
         p_dec->fmt_in.i_codec != VLC_FOURCC('m','p','g','2') &&
         p_dec->fmt_in.i_codec != VLC_FOURCC('h','d','v','2') )
     {
@@ -665,7 +665,7 @@ static picture_t *GetNewPicture( decoder_t *p_dec, uint8_t **pp_buf )
     p_dec->fmt_out.i_codec =
         ( p_sys->p_info->sequence->chroma_height <
           p_sys->p_info->sequence->height ) ?
-        VLC_FOURCC('I','4','2','0') : VLC_FOURCC('I','4','2','2');
+        VLC_CODEC_I420 : VLC_CODEC_I422;
 
     /* Get a new picture */
     p_pic = decoder_NewPicture( p_dec );
index 52adfc9a923ece7ba17e6d8ebba24e04265ba748..5af17ebc7321cc36dd9dac10c2f70e1169e5376f 100644 (file)
@@ -131,12 +131,12 @@ static int OpenCommon( vlc_object_t *p_this, bool b_packetizer )
     switch( p_dec->fmt_in.i_codec )
     {
     /* DVD LPCM */
-    case VLC_FOURCC('l','p','c','m'):
+    case VLC_CODEC_DVD_LPCM:
     case VLC_FOURCC('l','p','c','b'):
         b_dvd = true;
         break;
     /* BD LPCM */
-    case VLC_FOURCC('b','p','c','m'):
+    case VLC_CODEC_BD_LPCM:
         b_dvd = false;
         break;
     default:
@@ -158,7 +158,7 @@ static int OpenCommon( vlc_object_t *p_this, bool b_packetizer )
 
     if( b_packetizer )
     {
-        p_dec->fmt_out.i_codec = b_dvd ? VLC_FOURCC('l','p','c','m') : VLC_FOURCC('b','p','c','m');
+        p_dec->fmt_out.i_codec = b_dvd ? VLC_CODEC_DVD_LPCM : VLC_CODEC_BD_LPCM;
     }
     else
     {
@@ -166,11 +166,11 @@ static int OpenCommon( vlc_object_t *p_this, bool b_packetizer )
         {
         case 24:
         case 20:
-            p_dec->fmt_out.i_codec = VLC_FOURCC('s','2','4','b');
+            p_dec->fmt_out.i_codec = VLC_CODEC_S24B;
             p_dec->fmt_out.audio.i_bitspersample = 24;
             break;
         default:
-            p_dec->fmt_out.i_codec = VLC_FOURCC('s','1','6','b');
+            p_dec->fmt_out.i_codec = VLC_CODEC_S16B;
             p_dec->fmt_out.audio.i_bitspersample = 16;
             break;
         }
@@ -274,12 +274,12 @@ static void *DecodeFrame( decoder_t *p_dec, block_t **pp_block )
         /* */
         if( i_bits == 16 )
         {
-            p_dec->fmt_out.i_codec = VLC_FOURCC('s','1','6','b');
+            p_dec->fmt_out.i_codec = VLC_CODEC_S16B;
             p_dec->fmt_out.audio.i_bitspersample = 16;
         }
         else
         {
-            p_dec->fmt_out.i_codec = VLC_FOURCC('s','2','4','b');
+            p_dec->fmt_out.i_codec = VLC_CODEC_S24B;
             p_dec->fmt_out.audio.i_bitspersample = 24;
         }
 
index 88533cb4796230bc183ea3fe6473c73ca3625648..ea979515552f6e1108d8d569659ccb4fb032b69b 100644 (file)
@@ -86,7 +86,7 @@ static int OpenDecoder( vlc_object_t *p_this )
     switch( p_dec->fmt_in.i_codec )
     {
         /* Planar YUV */
-        case VLC_FOURCC('h','2','6','1'):
+        case VLC_CODEC_H261:
         case VLC_FOURCC('H','2','6','1'):
             break;
 
@@ -105,7 +105,7 @@ static int OpenDecoder( vlc_object_t *p_this )
 
     /* Set output properties */
     p_dec->fmt_out.i_cat = VIDEO_ES;
-    p_dec->fmt_out.i_codec = VLC_FOURCC('I','4','2','0');
+    p_dec->fmt_out.i_codec = VLC_CODEC_I420;
 
     /* Set callbacks */
     p_dec->pf_decode_video = (picture_t *(*)(decoder_t *, block_t **))
@@ -192,7 +192,7 @@ static void *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
     {
         msg_Dbg( p_dec, "video size is perhaps %dx%d", i_width,
                   i_height);
-        vout_InitFormat( &p_dec->fmt_out.video, VLC_FOURCC('I','4','2','0'),
+        vout_InitFormat( &p_dec->fmt_out.video, VLC_CODEC_I420,
                          i_width, i_height,
                          VOUT_ASPECT_FACTOR * i_width / i_height );
         p_sys->b_inited = true;
index 306bf0737b9ac343dbe1c2ecb1ff40ab26579e5a..f025be51f93b5ea0e1e0a3ed0a924eeae702587d 100644 (file)
@@ -134,7 +134,7 @@ static int Open( vlc_object_t *p_this )
     decoder_t *p_dec = (decoder_t*)p_this;
     decoder_sys_t *p_sys;
 
-    if( p_dec->fmt_in.i_codec != VLC_FOURCC('m','p','g','a') )
+    if( p_dec->fmt_in.i_codec != VLC_CODEC_MPGA )
     {
         return VLC_EGENERIC;
     }
@@ -153,7 +153,7 @@ static int Open( vlc_object_t *p_this )
 
     /* Set output properties */
     p_dec->fmt_out.i_cat = AUDIO_ES;
-    p_dec->fmt_out.i_codec = VLC_FOURCC('m','p','g','a');
+    p_dec->fmt_out.i_codec = VLC_CODEC_MPGA;
     p_dec->fmt_out.audio.i_rate = 0; /* So end_date gets initialized */
 
     /* Set callback */
index c604f014a1ad3be5274d34d27f3296cac213d286..4b48843523ab1c35591558b458fc7e96d25a3af0 100644 (file)
@@ -70,7 +70,7 @@ static int OpenDecoder( vlc_object_t *p_this )
     decoder_t *p_dec = (decoder_t*)p_this;
     decoder_sys_t *p_sys;
 
-    if( p_dec->fmt_in.i_codec != VLC_FOURCC('p','n','g',' ') &&
+    if( p_dec->fmt_in.i_codec != VLC_CODEC_PNG &&
         p_dec->fmt_in.i_codec != VLC_FOURCC('M','P','N','G') )
     {
         return VLC_EGENERIC;
@@ -83,7 +83,7 @@ static int OpenDecoder( vlc_object_t *p_this )
 
     /* Set output properties */
     p_dec->fmt_out.i_cat = VIDEO_ES;
-    p_dec->fmt_out.i_codec = VLC_FOURCC('R','G','B','A');
+    p_dec->fmt_out.i_codec = VLC_CODEC_RGBA;
 
     /* Set callbacks */
     p_dec->pf_decode_video = DecodeBlock;
@@ -184,7 +184,7 @@ static picture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
     if( p_sys->b_error ) goto error;
 
     /* Set output properties */
-    p_dec->fmt_out.i_codec = VLC_FOURCC('R','G','B','A');
+    p_dec->fmt_out.i_codec = VLC_CODEC_RGBA;
     p_dec->fmt_out.video.i_width = i_width;
     p_dec->fmt_out.video.i_height = i_height;
     p_dec->fmt_out.video.i_aspect = VOUT_ASPECT_FACTOR * i_width / i_height;
@@ -208,7 +208,7 @@ static picture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
     }
     else if( !(i_color_type & PNG_COLOR_MASK_ALPHA) )
     {
-        p_dec->fmt_out.i_codec = VLC_FOURCC('R','V','2','4');
+        p_dec->fmt_out.i_codec = VLC_CODEC_RGB24;
     }
 
     /* Get a new picture */
index e5b5778160a776e1dc439c7b07cc61e4efbc4f25..f61c4ffa39c3bd4fc07c37a1490184683eef00c3 100644 (file)
@@ -245,7 +245,7 @@ static int Open( vlc_object_t *p_this )
 
     switch( p_dec->fmt_in.i_codec )
     {
-        case VLC_FOURCC('h','2','6','4'): /* H.264 */
+        case VLC_CODEC_H264: /* H.264 */
         case VLC_FOURCC('c','v','i','d'): /* Cinepak */
         case VLC_FOURCC('I','V','4','1'): /* Indeo Video IV */
         case VLC_FOURCC('i','v','4','1'): /* dto. */
@@ -258,13 +258,13 @@ static int Open( vlc_object_t *p_this )
         case VLC_FOURCC('d','v','h','6'): /* DVC PRO HD 1080i 60 */
         case VLC_FOURCC('d','v','h','5'): /* DVC PRO HD 1080i 50 */
 
-        case VLC_FOURCC('S','V','Q','3'): /* Sorenson v3 */
-    /*    case VLC_FOURCC('S','V','Q','1'):  Sorenson v1
+        case VLC_CODEC_SVQ3: /* Sorenson v3 */
+    /*    case VLC_CODEC_SVQ1:  Sorenson v1
         case VLC_FOURCC('Z','y','G','o'):
         case VLC_FOURCC('V','P','3','1'):
         case VLC_FOURCC('3','I','V','1'): */
-        case VLC_FOURCC('r','l','e',' '): /* QuickTime animation (RLE) */
-        case VLC_FOURCC('r','p','z','a'): /* QuickTime Apple Video */
+        case VLC_CODEC_QTRLE: /* QuickTime animation (RLE) */
+        case VLC_CODEC_RPZA: /* QuickTime Apple Video */
         case VLC_FOURCC('a','z','p','r'): /* QuickTime animation (RLE) */
 #ifdef LOADER
         p_dec->p_sys = NULL;
@@ -283,23 +283,23 @@ static int Open( vlc_object_t *p_this )
             if ((err != noErr) || (qtVersion < 0x07500000)) 
                 return VLC_EGENERIC;
 #endif
-        case VLC_FOURCC('s','a','m','r'): /* 3GPP AMR audio */
+        case VLC_CODEC_AMR_NB: /* 3GPP AMR audio */
         case VLC_FOURCC('s','a','m','b'): /* 3GPP AMR-WB audio */
-        case VLC_FOURCC('m','p','4','a'): /* MPEG-4 audio */
+        case VLC_CODEC_MP4A: /* MPEG-4 audio */
         case VLC_FOURCC('Q','D','M','C'): /* QDesign */
-        case VLC_FOURCC('Q','D','M','2'): /* QDesign* 2 */
-        case VLC_FOURCC('Q','c','l','p'): /* Qualcomm Purevoice Codec */
+        case VLC_CODEC_QDM2: /* QDesign* 2 */
+        case VLC_CODEC_QCELP: /* Qualcomm Purevoice Codec */
         case VLC_FOURCC('Q','C','L','P'): /* Qualcomm Purevoice Codec */
-        case VLC_FOURCC('M','A','C','3'): /* MACE3 audio decoder */
-        case VLC_FOURCC('M','A','C','6'): /* MACE6 audio decoder */
+        case VLC_CODEC_MACE3: /* MACE3 audio decoder */
+        case VLC_CODEC_MACE6: /* MACE6 audio decoder */
         case VLC_FOURCC('d','v','c','a'): /* DV Audio */
         case VLC_FOURCC('s','o','w','t'): /* 16-bit Little Endian */
         case VLC_FOURCC('t','w','o','s'): /* 16-bit Big Endian */
-        case VLC_FOURCC('a','l','a','w'): /* ALaw 2:1 */
+        case VLC_CODEC_ALAW: /* ALaw 2:1 */
         case VLC_FOURCC('u','l','a','w'): /* mu-Law 2:1 */
         case VLC_FOURCC('r','a','w',' '): /* 8-bit offset binaries */
-        case VLC_FOURCC('f','l','3','2'): /* 32-bit Floating Point */
-        case VLC_FOURCC('f','l','6','4'): /* 64-bit Floating Point */
+        case VLC_CODEC_FL32: /* 32-bit Floating Point */
+        case VLC_CODEC_FL64: /* 64-bit Floating Point */
         case VLC_FOURCC('i','n','2','4'): /* 24-bit Interger */
         case VLC_FOURCC('i','n','3','2'): /* 32-bit Integer */
         case 0x0011:                            /* DVI IMA */
@@ -836,7 +836,7 @@ static int OpenVideo( decoder_t *p_dec )
     msg_Dbg( p_dec, "quicktime_video: ImageCodecPreDecompress cres=0x%X",
              (int)cres );
 
-    es_format_Init( &p_dec->fmt_out, VIDEO_ES, VLC_FOURCC( 'Y', 'U', 'Y', '2' ));
+    es_format_Init( &p_dec->fmt_out, VIDEO_ES, VLC_CODEC_YUYV);
     p_dec->fmt_out.video.i_width = p_dec->fmt_in.video.i_width;
     p_dec->fmt_out.video.i_height= p_dec->fmt_in.video.i_height;
     p_dec->fmt_out.video.i_aspect = VOUT_ASPECT_FACTOR * p_dec->fmt_in.video.i_width / p_dec->fmt_in.video.i_height;
index e79e2edff172683498be140b54ebfc5d9515d335..a43b73ee12ffe8605ec7a1b30a11bbbd851c2e52 100644 (file)
@@ -92,36 +92,36 @@ static int OpenDecoder( vlc_object_t *p_this )
     switch( p_dec->fmt_in.i_codec )
     {
         /* Planar YUV */
-        case VLC_FOURCC('I','4','4','4'):
-        case VLC_FOURCC('I','4','2','2'):
-        case VLC_FOURCC('I','4','2','0'):
-        case VLC_FOURCC('Y','V','1','2'):
+        case VLC_CODEC_I444:
+        case VLC_CODEC_I422:
+        case VLC_CODEC_I420:
+        case VLC_CODEC_YV12:
         case VLC_FOURCC('I','Y','U','V'):
-        case VLC_FOURCC('I','4','1','1'):
-        case VLC_FOURCC('I','4','1','0'):
+        case VLC_CODEC_I411:
+        case VLC_CODEC_I410:
         case VLC_FOURCC('Y','V','U','9'):
         case VLC_FOURCC('Y','4','2','B'):
         case VLC_FOURCC('Y','4','1','B'):
 
         /* Packed YUV */
-        case VLC_FOURCC('Y','U','Y','2'):
+        case VLC_CODEC_YUYV:
         case VLC_FOURCC('Y','8','0','0'):
-        case VLC_FOURCC('U','Y','V','Y'):
+        case VLC_CODEC_UYVY:
         case VLC_FOURCC('H','D','Y','C'):
 
         /* RGB */
-        case VLC_FOURCC('R','V','3','2'):
-        case VLC_FOURCC('R','V','2','4'):
-        case VLC_FOURCC('R','V','1','6'):
-        case VLC_FOURCC('R','V','1','5'):
+        case VLC_CODEC_RGB32:
+        case VLC_CODEC_RGB24:
+        case VLC_CODEC_RGB16:
+        case VLC_CODEC_RGB15:
             break;
         case VLC_FOURCC('2','V','u','y'):
         case VLC_FOURCC('2','v','u','y'):
         case VLC_FOURCC('A','V','U','I'):
-            p_dec->fmt_in.i_codec = VLC_FOURCC('U','Y','V','Y');
+            p_dec->fmt_in.i_codec = VLC_CODEC_UYVY;
             break;
         case VLC_FOURCC('y','v','1','2'):
-            p_dec->fmt_in.i_codec = VLC_FOURCC('Y','V','1','2');
+            p_dec->fmt_in.i_codec = VLC_CODEC_YV12;
             break;
 
         default:
index aa1d1334c31874f3c758be3d6e31b4d1dcdf0c51..af169aacab40f2a8abc4c4ab9ec867f6b5b38707 100644 (file)
@@ -182,8 +182,8 @@ static int Open( vlc_object_t *p_this )
 
     switch( p_dec->fmt_in.i_codec )
     {
-    case VLC_FOURCC('c','o','o','k'):
-    case VLC_FOURCC('a','t','r','c'):
+    case VLC_CODEC_COOK:
+    case VLC_CODEC_ATRAC3:
     case VLC_FOURCC('s','i','p','r'):
         break;
 
index 23ea612ae5a69dce12374f53977dc491ae9e5e53..c89068104566d160ed9b08c88b3d2f92a75030a4 100644 (file)
@@ -327,7 +327,7 @@ static int InitVideo(decoder_t *p_dec)
     }
 
     /* setup rv30 codec (codec sub-type and image dimensions): */
-    /*if ( p_dec->fmt_in.i_codec == VLC_FOURCC('R','V','3','0') )*/
+    /*if ( p_dec->fmt_in.i_codec == VLC_CODEC_RV30 )*/
     if (p_vide[1]>=0x20200002)
     {
         int i, cmsg_cnt;
@@ -347,10 +347,10 @@ static int InitVideo(decoder_t *p_dec)
             (*rvyuv_custom_message)(&cmsg_data,p_sys->handle);
     }
     /*
-    es_format_Init( &p_dec->fmt_out, VIDEO_ES, VLC_FOURCC( 'Y','V','1','2' ));
-    es_format_Init( &p_dec->fmt_out, VIDEO_ES, VLC_FOURCC( 'Y','U','Y','2' ));
+    es_format_Init( &p_dec->fmt_out, VIDEO_ES, VLC_CODEC_YV12);
+    es_format_Init( &p_dec->fmt_out, VIDEO_ES, VLC_CODEC_YUYV);
      */
-    es_format_Init( &p_dec->fmt_out, VIDEO_ES, VLC_FOURCC( 'I', '4', '2', '0'));
+    es_format_Init( &p_dec->fmt_out, VIDEO_ES, VLC_CODEC_I420);
      
     p_dec->fmt_out.video.i_width = p_dec->fmt_in.video.i_width;
     p_dec->fmt_out.video.i_height= p_dec->fmt_in.video.i_height;
@@ -376,10 +376,10 @@ static int Open( vlc_object_t *p_this )
 
     switch ( p_dec->fmt_in.i_codec )
     {
-    case VLC_FOURCC('R','V','1','0')
-    case VLC_FOURCC('R','V','2','0')
-    case VLC_FOURCC('R','V','3','0'):
-    case VLC_FOURCC('R','V','4','0')
+    case VLC_CODEC_RV10
+    case VLC_CODEC_RV20
+    case VLC_CODEC_RV30:
+    case VLC_CODEC_RV40
         p_dec->p_sys = NULL;
         p_dec->pf_decode_video = DecodeVideo;
         return InitVideo(p_dec);
index 8b7abb5f3711be814299f83a35d2c45638df8f0f..bc08984c7f44266fab868c8bfe16aa08591adde2 100644 (file)
@@ -88,7 +88,7 @@ static int OpenDecoder( vlc_object_t *p_this )
     decoder_sys_t *p_sys;
     SchroDecoder *p_schro;
 
-    if( p_dec->fmt_in.i_codec != VLC_FOURCC('d','r','a','c') )
+    if( p_dec->fmt_in.i_codec != VLC_CODEC_DIRAC )
     {
         return VLC_EGENERIC;
     }
@@ -117,7 +117,7 @@ static int OpenDecoder( vlc_object_t *p_this )
 
     /* Set output properties */
     p_dec->fmt_out.i_cat = VIDEO_ES;
-    p_dec->fmt_out.i_codec = VLC_FOURCC('I','4','2','0');
+    p_dec->fmt_out.i_codec = VLC_CODEC_I420;
 
     /* Set callbacks */
     p_dec->pf_decode_video = DecodeBlock;
@@ -142,9 +142,9 @@ static void SetVideoFormat( decoder_t *p_dec )
 
     switch( p_sys->p_format->chroma_format )
     {
-    case SCHRO_CHROMA_420: p_dec->fmt_out.i_codec = VLC_FOURCC('I','4','2','0'); break;
-    case SCHRO_CHROMA_422: p_dec->fmt_out.i_codec = VLC_FOURCC('I','4','2','2'); break;
-    case SCHRO_CHROMA_444: p_dec->fmt_out.i_codec = VLC_FOURCC('I','4','4','4'); break;
+    case SCHRO_CHROMA_420: p_dec->fmt_out.i_codec = VLC_CODEC_I420; break;
+    case SCHRO_CHROMA_422: p_dec->fmt_out.i_codec = VLC_CODEC_I422; break;
+    case SCHRO_CHROMA_444: p_dec->fmt_out.i_codec = VLC_CODEC_I444; break;
     default:
         p_dec->fmt_out.i_codec = 0;
         break;
index d4eb387ab17cf7a65ad8be146747b01bbdde7af5..1258238017a20d35c39af73edd1b289e2012dc3f 100644 (file)
@@ -70,17 +70,17 @@ static const struct supported_fmt_t
     const char *psz_sdl_type;
 } p_supported_fmt[] =
 {
-    { VLC_FOURCC('t','g','a',' '), "TGA" },
-    { VLC_FOURCC('b','m','p',' '), "BMP" },
-    { VLC_FOURCC('p','n','m',' '), "PNM" },
+    { VLC_CODEC_TARGA, "TGA" },
+    { VLC_CODEC_BMP, "BMP" },
+    { VLC_CODEC_PNM, "PNM" },
     { VLC_FOURCC('x','p','m',' '), "XPM" },
     { VLC_FOURCC('x','c','f',' '), "XCF" },
-    { VLC_FOURCC('p','c','x',' '), "PCX" },
-    { VLC_FOURCC('g','i','f',' '), "GIF" },
-    { VLC_FOURCC('j','p','e','g'), "JPG" },
-    { VLC_FOURCC('t','i','f','f'), "TIF" },
+    { VLC_CODEC_PCX, "PCX" },
+    { VLC_CODEC_GIF, "GIF" },
+    { VLC_CODEC_JPEG, "JPG" },
+    { VLC_CODEC_TIFF, "TIF" },
     { VLC_FOURCC('l','b','m',' '), "LBM" },
-    { VLC_FOURCC('p','n','g',' '), "PNG" }
+    { VLC_CODEC_PNG, "PNG" }
 };
 
 /*****************************************************************************
@@ -113,7 +113,7 @@ static int OpenDecoder( vlc_object_t *p_this )
 
     /* Set output properties - this is a decoy and isn't used anywhere */
     p_dec->fmt_out.i_cat = VIDEO_ES;
-    p_dec->fmt_out.i_codec = VLC_FOURCC('R','V','3','2');
+    p_dec->fmt_out.i_codec = VLC_CODEC_RGB32;
 
     /* Set callbacks */
     p_dec->pf_decode_video = DecodeBlock;
@@ -157,14 +157,14 @@ static picture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
     switch ( p_surface->format->BitsPerPixel )
     {
     case 16:
-        p_dec->fmt_out.i_codec = VLC_FOURCC('R','V','1','6');
+        p_dec->fmt_out.i_codec = VLC_CODEC_RGB16;
         break;
     case 8:
     case 24:
-        p_dec->fmt_out.i_codec = VLC_FOURCC('R','V','2','4');
+        p_dec->fmt_out.i_codec = VLC_CODEC_RGB24;
         break;
     case 32:
-        p_dec->fmt_out.i_codec = VLC_FOURCC('R','V','3','2');
+        p_dec->fmt_out.i_codec = VLC_CODEC_RGB32;
         break;
     default:
         msg_Warn( p_dec, "unknown bits/pixel format (%d)",
index af1ea6bd1ba4f231dea96c17adf299f99de01db9..23b102b80f0a9d328dc572a56ff337be9a79ab48 100644 (file)
@@ -205,7 +205,7 @@ static int OpenDecoder( vlc_object_t *p_this )
     decoder_t *p_dec = (decoder_t*)p_this;
     decoder_sys_t *p_sys = p_dec->p_sys;
 
-    if( p_dec->fmt_in.i_codec != VLC_FOURCC('s','p','x',' ') 
+    if( p_dec->fmt_in.i_codec != VLC_CODEC_SPEEX 
         && p_dec->fmt_in.i_codec != VLC_FOURCC('s', 'p', 'x', 'r') )
     {
         return VLC_EGENERIC;
@@ -263,7 +263,7 @@ static int OpenPacketizer( vlc_object_t *p_this )
     if( i_ret == VLC_SUCCESS )
     {
         p_dec->p_sys->b_packetizer = true;
-        p_dec->fmt_out.i_codec = VLC_FOURCC('s','p','x',' ');
+        p_dec->fmt_out.i_codec = VLC_CODEC_SPEEX;
     }
 
     return i_ret;
@@ -915,7 +915,7 @@ static int OpenEncoder( vlc_object_t *p_this )
     int pi_header[2];
     uint8_t *p_extra;
 
-    if( p_enc->fmt_out.i_codec != VLC_FOURCC('s','p','x',' ') &&
+    if( p_enc->fmt_out.i_codec != VLC_CODEC_SPEEX &&
         !p_enc->b_force )
     {
         return VLC_EGENERIC;
@@ -944,7 +944,7 @@ static int OpenEncoder( vlc_object_t *p_this )
     p_enc->p_sys = p_sys;
     p_enc->pf_encode_audio = Encode;
     p_enc->fmt_in.i_codec = AOUT_FMT_S16_NE;
-    p_enc->fmt_out.i_codec = VLC_FOURCC('s','p','x',' ');
+    p_enc->fmt_out.i_codec = VLC_CODEC_SPEEX;
 
     speex_init_header( &p_sys->header, p_enc->fmt_in.audio.i_rate,
                        1, p_speex_mode );
index 84db8df8acaa59aaa2135ff4ec7e7b759b364ffb..0a572d9e74b1c483f66efab006eb090697138bb4 100644 (file)
@@ -686,7 +686,7 @@ static void Render( decoder_t *p_dec, subpicture_t *p_spu,
 
     /* Create a new subpicture region */
     memset( &fmt, 0, sizeof(video_format_t) );
-    fmt.i_chroma = VLC_FOURCC('Y','U','V','P');
+    fmt.i_chroma = VLC_CODEC_YUVP;
     fmt.i_aspect = 0; /* 0 means use aspect ratio of background video */
     fmt.i_width = fmt.i_visible_width = p_spu_properties->i_width;
     fmt.i_height = fmt.i_visible_height = p_spu_properties->i_height -
index f527a9c2b379c0ed5fc6cc6ff48cc353859719ef..eb2d8e1314cf0fbe65852bfcad6421acf6a74040 100644 (file)
@@ -73,7 +73,7 @@ static int DecoderOpen( vlc_object_t *p_this )
     decoder_t     *p_dec = (decoder_t*)p_this;
     decoder_sys_t *p_sys;
 
-    if( p_dec->fmt_in.i_codec != VLC_FOURCC( 's','p','u',' ' ) &&
+    if( p_dec->fmt_in.i_codec != VLC_CODEC_SPU &&
         p_dec->fmt_in.i_codec != VLC_FOURCC( 's','p','u','b' ) )
     {
         return VLC_EGENERIC;
@@ -86,7 +86,7 @@ static int DecoderOpen( vlc_object_t *p_this )
     p_sys->i_spu      = 0;
     p_sys->p_block    = NULL;
 
-    es_format_Init( &p_dec->fmt_out, SPU_ES, VLC_FOURCC( 's','p','u',' ' ) );
+    es_format_Init( &p_dec->fmt_out, SPU_ES, VLC_CODEC_SPU );
 
     p_dec->pf_decode_sub = Decode;
     p_dec->pf_packetize  = NULL;
@@ -111,7 +111,7 @@ static int PacketizerOpen( vlc_object_t *p_this )
     p_dec->pf_packetize  = Packetize;
     p_dec->p_sys->b_packetizer = true;
     es_format_Copy( &p_dec->fmt_out, &p_dec->fmt_in );
-    p_dec->fmt_out.i_codec = VLC_FOURCC( 's','p','u',' ' );
+    p_dec->fmt_out.i_codec = VLC_CODEC_SPU;
 
     return VLC_SUCCESS;
 }
index 5bd43a51eb09ca4f8a98f83d43ffc36a7e93c86c..5dbc8471966e404445f054f4e0a88ed0546f5ab0 100644 (file)
@@ -232,8 +232,8 @@ static int OpenDecoder( vlc_object_t *p_this )
 
     switch( p_dec->fmt_in.i_codec )
     {
-        case VLC_FOURCC('s','u','b','t'):
-        case VLC_FOURCC('s','s','a',' '):
+        case VLC_CODEC_SUBT:
+        case VLC_CODEC_SSA:
         case VLC_FOURCC('t','1','4','0'):
             break;
         default:
@@ -315,7 +315,7 @@ static int OpenDecoder( vlc_object_t *p_this )
     var_Get( p_dec, "subsdec-align", &val );
     p_sys->i_align = val.i_int;
 
-    if( p_dec->fmt_in.i_codec == VLC_FOURCC('s','s','a',' ')
+    if( p_dec->fmt_in.i_codec == VLC_CODEC_SSA
      && var_CreateGetBool( p_dec, "subsdec-formatted" ) )
     {
         if( p_dec->fmt_in.i_extra > 0 )
@@ -492,7 +492,7 @@ static subpicture_t *ParseText( decoder_t *p_dec, block_t *p_block )
 
     /* Create a new subpicture region */
     memset( &fmt, 0, sizeof(video_format_t) );
-    fmt.i_chroma = VLC_FOURCC('T','E','X','T');
+    fmt.i_chroma = VLC_CODEC_TEXT;
     fmt.i_aspect = 0;
     fmt.i_width = fmt.i_height = 0;
     fmt.i_x_offset = fmt.i_y_offset = 0;
@@ -506,7 +506,7 @@ static subpicture_t *ParseText( decoder_t *p_dec, block_t *p_block )
     }
 
     /* Decode and format the subpicture unit */
-    if( p_dec->fmt_in.i_codec != VLC_FOURCC('s','s','a',' ') )
+    if( p_dec->fmt_in.i_codec != VLC_CODEC_SSA )
     {
         /* Normal text subs, easy markup */
         p_spu->p_region->i_align = SUBPICTURE_ALIGN_BOTTOM | p_sys->i_align;
index 717f8da1272fa517d270a0d7c036781d8f531ff7..7333dac988767edb137c4aa6d0afd619ecaa319a 100644 (file)
@@ -383,7 +383,7 @@ static subpicture_region_t *CreateTextRegion( decoder_t *p_dec,
 
     /* Create a new subpicture region */
     memset( &fmt, 0, sizeof(video_format_t) );
-    fmt.i_chroma = VLC_FOURCC('T','E','X','T');
+    fmt.i_chroma = VLC_CODEC_TEXT;
     fmt.i_aspect = 0;
     fmt.i_width = fmt.i_height = 0;
     fmt.i_x_offset = fmt.i_y_offset = 0;
@@ -488,7 +488,7 @@ static int ParseImageAttachments( decoder_t *p_dec )
                     memset( &fmt_out, 0, sizeof( video_format_t));
 
                     fmt_in.i_chroma  = type;
-                    fmt_out.i_chroma = VLC_FOURCC('Y','U','V','A');
+                    fmt_out.i_chroma = VLC_CODEC_YUVA;
 
                     /* Find a suitable decoder module */
                     if( module_exists( "sdl_image" ) )
@@ -1167,7 +1167,7 @@ static subpicture_region_t *LoadEmbeddedImage( decoder_t *p_dec,
     /* Display the feed's image */
     memset( &fmt_out, 0, sizeof( video_format_t));
 
-    fmt_out.i_chroma = VLC_FOURCC('Y','U','V','A');
+    fmt_out.i_chroma = VLC_CODEC_YUVA;
     fmt_out.i_aspect = VOUT_ASPECT_FACTOR;
     fmt_out.i_sar_num = fmt_out.i_sar_den = 1;
     fmt_out.i_width =
@@ -1181,7 +1181,7 @@ static subpicture_region_t *LoadEmbeddedImage( decoder_t *p_dec,
         msg_Err( p_dec, "cannot allocate SPU region" );
         return NULL;
     }
-    assert( p_pic->format.i_chroma == VLC_FOURCC('Y','U','V','A') );
+    assert( p_pic->format.i_chroma == VLC_CODEC_YUVA );
     /* FIXME the copy is probably not needed anymore */
     picture_CopyPixels( p_region->p_picture, p_pic );
 
@@ -1201,7 +1201,7 @@ static subpicture_region_t *LoadEmbeddedImage( decoder_t *p_dec,
         int i_u =   ( ( -38 * i_r -  74 * i_g + 112 * i_b + 128 ) >> 8 ) + 128 ;
         int i_v =   ( ( 112 * i_r -  94 * i_g -  18 * i_b + 128 ) >> 8 ) + 128 ;
 
-        assert( p_region->fmt.i_chroma == VLC_FOURCC('Y','U','V','A') );
+        assert( p_region->fmt.i_chroma == VLC_CODEC_YUVA );
         for( unsigned int y = 0; y < p_region->fmt.i_height; y++ )
         {
             for( unsigned int x = 0; x < p_region->fmt.i_width; x++ )
index 5e0c25a0a8bce8704f2e2f486e5b808a40407014..3560c510df260e41e4ec0ad9eca9e3d114da5df4 100644 (file)
@@ -49,7 +49,7 @@ static int Open( vlc_object_t *p_this )
 
     switch( p_enc->fmt_out.i_codec )
     {
-        case VLC_FOURCC('s','u','b','t'):
+        case VLC_CODEC_SUBT:
             if( ( p_enc->fmt_out.subs.psz_encoding != NULL )
              && strcasecmp( p_enc->fmt_out.subs.psz_encoding, "utf8" )
              && strcasecmp( p_enc->fmt_out.subs.psz_encoding, "UTF-8" ) )
@@ -92,7 +92,7 @@ static block_t *Encode( encoder_t *p_enc, subpicture_t *p_spu )
 
     p_region = p_spu->p_region;
     if( ( p_region == NULL )
-     || ( p_region->fmt.i_chroma != VLC_FOURCC('T','E','X','T') )
+     || ( p_region->fmt.i_chroma != VLC_CODEC_TEXT )
      || ( p_region->psz_text == NULL ) )
         return NULL;
 
index c6d9ee922994a75a407b306bfa63f081ea637010..0b20b73350333daf36e16a9477741defbacd167d 100644 (file)
@@ -480,7 +480,7 @@ static subpicture_t *DecodePacket( decoder_t *p_dec, block_t *p_data )
 
     /* Create new subtitle region */
     memset( &fmt, 0, sizeof(video_format_t) );
-    fmt.i_chroma = VLC_FOURCC('Y','U','V','P');
+    fmt.i_chroma = VLC_CODEC_YUVP;
 
     /**
        The video on which the subtitle sits, is scaled, probably
index 8c00db57632a8e8c4dc8642f74e835134011bfea..20e5d946270f8343811466317934e3559db12625 100644 (file)
@@ -93,7 +93,7 @@ static int OpenDecoder( vlc_object_t *p_this )
     decoder_t *p_dec = (decoder_t*)p_this;
     decoder_sys_t *p_sys;
 
-    if( p_dec->fmt_in.i_codec != VLC_FOURCC('t','a','r','k') )
+    if( p_dec->fmt_in.i_codec != VLC_CODEC_TARKIN )
     {
         return VLC_EGENERIC;
     }
@@ -240,19 +240,19 @@ static picture_t *DecodePacket( decoder_t *p_dec, block_t **pp_block,
         switch( p_sys->tarkin_stream->layer->desc.format )
         {
         case TARKIN_RGB24:
-            i_chroma = VLC_FOURCC('R','V','2','4');
+            i_chroma = VLC_CODEC_RGB24;
             i_stride = i_width * 3;
             break;
         case TARKIN_RGB32:
-            i_chroma = VLC_FOURCC('R','V','3','2');
+            i_chroma = VLC_CODEC_RGB32;
             i_stride = i_width * 4;
             break;
         case TARKIN_RGBA:
-            i_chroma = VLC_FOURCC('R','G','B','A');
+            i_chroma = VLC_CODEC_RGBA;
             i_stride = i_width * 4;
             break;
         default:
-            i_chroma = VLC_FOURCC('I','4','2','0');
+            i_chroma = VLC_CODEC_I420;
             i_stride = i_width;
             break;
         }
index 07fd4cf883d24894205dfec2addc1afd69c39d8b..9f2c2630080f6335c6f3744f6812b200f62cd147 100644 (file)
@@ -175,7 +175,7 @@ static int Open( vlc_object_t *p_this )
     vlc_value_t    val;
     int            i;
 
-    if( p_dec->fmt_in.i_codec != VLC_FOURCC('t','e','l','x'))
+    if( p_dec->fmt_in.i_codec != VLC_CODEC_TELETEXT)
     {
         return VLC_EGENERIC;
     }
@@ -701,7 +701,7 @@ static subpicture_t *Decode( decoder_t *p_dec, block_t **pp_block )
  
     /* Create a new subpicture region */
     memset( &fmt, 0, sizeof(video_format_t) );
-    fmt.i_chroma = VLC_FOURCC('T','E','X','T');
+    fmt.i_chroma = VLC_CODEC_TEXT;
     fmt.i_aspect = 0;
     fmt.i_width = fmt.i_height = 0;
     fmt.i_x_offset = fmt.i_y_offset = 0;
index 17bf9a7cf06b32e24bea3750636add750f38deec..dda5000b3e17a200d17466c71e7179ce25593f5c 100644 (file)
@@ -135,7 +135,7 @@ static int OpenDecoder( vlc_object_t *p_this )
     decoder_t *p_dec = (decoder_t*)p_this;
     decoder_sys_t *p_sys;
 
-    if( p_dec->fmt_in.i_codec != VLC_FOURCC('t','h','e','o') )
+    if( p_dec->fmt_in.i_codec != VLC_CODEC_THEORA )
     {
         return VLC_EGENERIC;
     }
@@ -150,7 +150,7 @@ static int OpenDecoder( vlc_object_t *p_this )
 
     /* Set output properties */
     p_dec->fmt_out.i_cat = VIDEO_ES;
-    p_dec->fmt_out.i_codec = VLC_FOURCC('I','4','2','0');
+    p_dec->fmt_out.i_codec = VLC_CODEC_I420;
 
     /* Set callbacks */
     p_dec->pf_decode_video = (picture_t *(*)(decoder_t *, block_t **))
@@ -176,7 +176,7 @@ static int OpenPacketizer( vlc_object_t *p_this )
     if( i_ret == VLC_SUCCESS )
     {
         p_dec->p_sys->b_packetizer = true;
-        p_dec->fmt_out.i_codec = VLC_FOURCC( 't', 'h', 'e', 'o' );
+        p_dec->fmt_out.i_codec = VLC_CODEC_THEORA;
     }
 
     return i_ret;
@@ -287,13 +287,13 @@ static int ProcessHeaders( decoder_t *p_dec )
     switch( p_sys->ti.pixelformat )
     {
       case OC_PF_420:
-        p_dec->fmt_out.i_codec = VLC_FOURCC( 'I','4','2','0' );
+        p_dec->fmt_out.i_codec = VLC_CODEC_I420;
         break;
       case OC_PF_422:
-        p_dec->fmt_out.i_codec = VLC_FOURCC( 'I','4','2','2' );
+        p_dec->fmt_out.i_codec = VLC_CODEC_I422;
         break;
       case OC_PF_444:
-        p_dec->fmt_out.i_codec = VLC_FOURCC( 'I','4','4','4' );
+        p_dec->fmt_out.i_codec = VLC_CODEC_I444;
         break;
       case OC_PF_RSVD:
       default:
@@ -609,7 +609,7 @@ static int OpenEncoder( vlc_object_t *p_this )
     vlc_value_t val;
     int i_quality, i;
 
-    if( p_enc->fmt_out.i_codec != VLC_FOURCC('t','h','e','o') &&
+    if( p_enc->fmt_out.i_codec != VLC_CODEC_THEORA &&
         !p_enc->b_force )
     {
         return VLC_EGENERIC;
@@ -621,8 +621,8 @@ static int OpenEncoder( vlc_object_t *p_this )
     p_enc->p_sys = p_sys;
 
     p_enc->pf_encode_video = Encode;
-    p_enc->fmt_in.i_codec = VLC_FOURCC('I','4','2','0');
-    p_enc->fmt_out.i_codec = VLC_FOURCC('t','h','e','o');
+    p_enc->fmt_in.i_codec = VLC_CODEC_I420;
+    p_enc->fmt_out.i_codec = VLC_CODEC_THEORA;
 
     config_ChainParse( p_enc, ENC_CFG_PREFIX, ppsz_enc_options, p_enc->p_cfg );
 
index 787cbf87fe94864872c735e70b1ab3b89d027876..6f2caf425111def7a42c7dc7aa52d9184f7b5697 100644 (file)
@@ -132,7 +132,7 @@ static int OpenEncoder( vlc_object_t *p_this )
     vlc_value_t val;
     int i_frequency;
 
-    if( p_enc->fmt_out.i_codec != VLC_FOURCC('m','p','g','a') &&
+    if( p_enc->fmt_out.i_codec != VLC_CODEC_MPGA &&
         p_enc->fmt_out.i_codec != VLC_FOURCC('m','p','2','a') &&
         p_enc->fmt_out.i_codec != VLC_FOURCC('m','p','2',' ') &&
         !p_enc->b_force )
@@ -167,7 +167,7 @@ static int OpenEncoder( vlc_object_t *p_this )
     p_enc->fmt_in.i_codec = AOUT_FMT_S16_NE;
 
     p_enc->fmt_out.i_cat = AUDIO_ES;
-    p_enc->fmt_out.i_codec = VLC_FOURCC('m','p','g','a');
+    p_enc->fmt_out.i_codec = VLC_CODEC_MPGA;
 
     config_ChainParse( p_enc, ENC_CFG_PREFIX, ppsz_enc_options, p_enc->p_cfg );
 
index 5d25be9d51b09abfd8c74d80738499710c0c7a2b..62cb4d2595df2548510e2dc8f85ef8ddc0e9f838 100644 (file)
@@ -229,7 +229,7 @@ static int OpenDecoder( vlc_object_t *p_this )
     decoder_t *p_dec = (decoder_t*)p_this;
     decoder_sys_t *p_sys;
 
-    if( p_dec->fmt_in.i_codec != VLC_FOURCC('v','o','r','b') )
+    if( p_dec->fmt_in.i_codec != VLC_CODEC_VORBIS )
     {
         return VLC_EGENERIC;
     }
@@ -251,9 +251,9 @@ static int OpenDecoder( vlc_object_t *p_this )
     /* Set output properties */
     p_dec->fmt_out.i_cat = AUDIO_ES;
 #ifdef MODULE_NAME_IS_tremor
-    p_dec->fmt_out.i_codec = VLC_FOURCC('f','i','3','2');
+    p_dec->fmt_out.i_codec = VLC_CODEC_FI32;
 #else
-    p_dec->fmt_out.i_codec = VLC_FOURCC('f','l','3','2');
+    p_dec->fmt_out.i_codec = VLC_CODEC_FL32;
 #endif
 
     /* Set callbacks */
@@ -274,7 +274,7 @@ static int OpenPacketizer( vlc_object_t *p_this )
     if( i_ret == VLC_SUCCESS )
     {
         p_dec->p_sys->b_packetizer = true;
-        p_dec->fmt_out.i_codec = VLC_FOURCC('v','o','r','b');
+        p_dec->fmt_out.i_codec = VLC_CODEC_VORBIS;
     }
 
     return i_ret;
@@ -794,7 +794,7 @@ static int OpenEncoder( vlc_object_t *p_this )
     vlc_value_t val;
     uint8_t *p_extra;
 
-    if( p_enc->fmt_out.i_codec != VLC_FOURCC('v','o','r','b') &&
+    if( p_enc->fmt_out.i_codec != VLC_CODEC_VORBIS &&
         !p_enc->b_force )
     {
         return VLC_EGENERIC;
@@ -806,8 +806,8 @@ static int OpenEncoder( vlc_object_t *p_this )
     p_enc->p_sys = p_sys;
 
     p_enc->pf_encode_audio = Encode;
-    p_enc->fmt_in.i_codec = VLC_FOURCC('f','l','3','2');
-    p_enc->fmt_out.i_codec = VLC_FOURCC('v','o','r','b');
+    p_enc->fmt_in.i_codec = VLC_CODEC_FL32;
+    p_enc->fmt_out.i_codec = VLC_CODEC_VORBIS;
 
     config_ChainParse( p_enc, ENC_CFG_PREFIX, ppsz_enc_options, p_enc->p_cfg );
 
index e57b9cef57391a2b204fcb22732e2b6fe7aa07ad..ef6cdb9ec7ff7d6a4ffe5766647dbde834d34490 100644 (file)
@@ -120,9 +120,9 @@ static int OpenDecoder( vlc_object_t *p_this )
     decoder_sys_t *p_sys;
 
     if( p_dec->fmt_in.i_codec != VLC_FOURCC('w','m','a','1') &&
-        p_dec->fmt_in.i_codec != VLC_FOURCC('W','M','A','1') &&
+        p_dec->fmt_in.i_codec != VLC_CODEC_WMA1 &&
         p_dec->fmt_in.i_codec != VLC_FOURCC('w','m','a','2') &&
-        p_dec->fmt_in.i_codec != VLC_FOURCC('W','M','A','2') )
+        p_dec->fmt_in.i_codec != VLC_CODEC_WMA2 )
     {
         return VLC_EGENERIC;
     }
@@ -139,7 +139,7 @@ static int OpenDecoder( vlc_object_t *p_this )
 
     /* Set output properties */
     p_dec->fmt_out.i_cat = AUDIO_ES;
-    p_dec->fmt_out.i_codec = VLC_FOURCC('f','i','3','2');
+    p_dec->fmt_out.i_codec = VLC_CODEC_FI32;
     p_dec->fmt_out.audio.i_bitspersample = p_dec->fmt_in.audio.i_bitspersample;
     p_dec->fmt_out.audio.i_rate = p_dec->fmt_in.audio.i_rate;
 
@@ -167,9 +167,9 @@ static int OpenDecoder( vlc_object_t *p_this )
         wfx.bitspersample );
 
     if( p_dec->fmt_in.i_codec == VLC_FOURCC('w','m','a','1')
-        || p_dec->fmt_in.i_codec == VLC_FOURCC('W','M','A','1') )
+        || p_dec->fmt_in.i_codec == VLC_CODEC_WMA1 )
         wfx.codec_id = ASF_CODEC_ID_WMAV1;
-    else if( p_dec->fmt_in.i_codec == VLC_FOURCC('W','M','A','2')
+    else if( p_dec->fmt_in.i_codec == VLC_CODEC_WMA2
         || p_dec->fmt_in.i_codec == VLC_FOURCC('w','m','a','2') )
         wfx.codec_id = ASF_CODEC_ID_WMAV2;
 
index 5004c2c724569bcfa1f70536a0d6afb5b86a9894..2a82903f4f2660e9dc3be232845c3fbbdd9bfe7e 100644 (file)
@@ -761,7 +761,7 @@ static int  Open ( vlc_object_t *p_this )
     x264_nal_t    *nal;
     int i, i_nal;
 
-    if( p_enc->fmt_out.i_codec != VLC_FOURCC( 'h', '2', '6', '4' ) &&
+    if( p_enc->fmt_out.i_codec != VLC_CODEC_H264 &&
         !p_enc->b_force )
     {
         return VLC_EGENERIC;
@@ -793,8 +793,8 @@ static int  Open ( vlc_object_t *p_this )
     config_ChainParse( p_enc, SOUT_CFG_PREFIX, ppsz_sout_options, p_enc->p_cfg );
 
     p_enc->fmt_out.i_cat = VIDEO_ES;
-    p_enc->fmt_out.i_codec = VLC_FOURCC( 'h', '2', '6', '4' );
-    p_enc->fmt_in.i_codec = VLC_FOURCC('I','4','2','0');
+    p_enc->fmt_out.i_codec = VLC_CODEC_H264;
+    p_enc->fmt_in.i_codec = VLC_CODEC_I420;
 
     p_enc->pf_encode_video = Encode;
     p_enc->pf_encode_audio = NULL;
index edfe1cc27b2cbadc6219884dc98aed416fb33bb9..7b8a87a16aa2662e36176ef207cb7c8294cf78b5 100644 (file)
@@ -121,7 +121,7 @@ static int OpenDecoder( vlc_object_t *p_this )
 #ifdef __GLIBC__
     mtrace();
 #endif
-    if( p_dec->fmt_in.i_codec != VLC_FOURCC('m','p','g','v') &&
+    if( p_dec->fmt_in.i_codec != VLC_CODEC_MPGV &&
         p_dec->fmt_in.i_codec != VLC_FOURCC('m','p','g','1') &&
         /* Pinnacle hardware-mpeg1 */
         p_dec->fmt_in.i_codec != VLC_FOURCC('P','I','M','1') &&
@@ -693,7 +693,7 @@ static picture_t *GetNewPicture( decoder_t *p_dec, uint8_t **pp_buf )
     p_dec->fmt_out.i_codec =
         ( p_sys->p_info->sequence->chroma_height <
           p_sys->p_info->sequence->height ) ?
-        VLC_FOURCC('I','4','2','0') : VLC_FOURCC('I','4','2','2');
+        VLC_CODEC_I420 : VLC_CODEC_I422;
 
 #if 0
     p_sys->f_wd_nb = fopen("/vlc/dec_nb", "w");
index 8d5509a6b4294f153ba961ffc1d35b9a27ac548f..3563a6640667889fa4ebe198ba89a962dfe73f98 100644 (file)
@@ -203,7 +203,7 @@ static int Open( vlc_object_t *p_this )
     decoder_t     *p_dec = (decoder_t *) p_this;
     decoder_sys_t *p_sys = NULL;
 
-    if( p_dec->fmt_in.i_codec != VLC_FOURCC('t','e','l','x') )
+    if( p_dec->fmt_in.i_codec != VLC_CODEC_TELETEXT )
         return VLC_EGENERIC;
 
     p_dec->pf_decode_sub = Decode;
@@ -271,11 +271,11 @@ static int Open( vlc_object_t *p_this )
     /* Listen for keys */
     var_AddCallback( p_dec->p_libvlc, "key-pressed", EventKey, p_dec );
 
-    es_format_Init( &p_dec->fmt_out, SPU_ES, VLC_FOURCC( 's','p','u',' ' ) );
+    es_format_Init( &p_dec->fmt_out, SPU_ES, VLC_CODEC_SPU );
     if( p_sys->b_text )
-        p_dec->fmt_out.video.i_chroma = VLC_FOURCC('T','E','X','T');
+        p_dec->fmt_out.video.i_chroma = VLC_CODEC_TEXT;
     else
-        p_dec->fmt_out.video.i_chroma = VLC_FOURCC('R','G','B','A');
+        p_dec->fmt_out.video.i_chroma = VLC_CODEC_RGBA;
     return VLC_SUCCESS;
 }
 
@@ -466,8 +466,8 @@ static subpicture_t *Subpicture( decoder_t *p_dec, video_format_t *p_fmt,
     }
 
     memset( &fmt, 0, sizeof(video_format_t) );
-    fmt.i_chroma = b_text ? VLC_FOURCC('T','E','X','T') :
-                                   VLC_FOURCC('R','G','B','A');
+    fmt.i_chroma = b_text ? VLC_CODEC_TEXT :
+                                   VLC_CODEC_RGBA;
     fmt.i_aspect = b_text ? 0 : VOUT_ASPECT_FACTOR;
     if( b_text )
     {
@@ -556,7 +556,7 @@ static int OpaquePage( picture_t *p_src, const vbi_page p_page,
 {
     unsigned int    x, y;
 
-    assert( fmt.i_chroma == VLC_FOURCC('R','G','B','A' ) );
+    assert( fmt.i_chroma == VLC_CODEC_RGBA );
 
     /* Kludge since zvbi doesn't provide an option to specify opacity. */
     for( y = 0; y < fmt.i_height; y++ )
index fb5de970c2f36dfa1bf21f73f374c76e7ec12143..18c293d3cae52e0d931594e2d7abfce877bb809e 100644 (file)
@@ -923,7 +923,7 @@ static int DemuxInit( demux_t *p_demux )
                 es_format_Init( &fmt, AUDIO_ES, 0 );
                 i_format = GetWLE( &p_data[0] );
                 if( i_format == 0 )
-                    fmt.i_codec = VLC_FOURCC( 'a','5','2',' ');
+                    fmt.i_codec = VLC_CODEC_A52;
                 else
                     wf_tag_to_fourcc( i_format, &fmt.i_codec, NULL );
                 fmt.audio.i_channels        = GetWLE(  &p_data[2] );
index 08f7e986417f0d84d2dd2f418d98a09742dcc6b2..bccf2ea6cf3ec532df464bef1121d7a835513eb3 100644 (file)
@@ -156,14 +156,14 @@ static int Open( vlc_object_t *p_this )
     switch( GetDWBE( &hdr[8] ) )
     {
         case AU_ALAW_8:        /* 8-bit ISDN A-law */
-            p_sys->fmt.i_codec               = VLC_FOURCC( 'a','l','a','w' );
+            p_sys->fmt.i_codec               = VLC_CODEC_ALAW;
             p_sys->fmt.audio.i_bitspersample = 8;
             p_sys->fmt.audio.i_blockalign    = 1 * p_sys->fmt.audio.i_channels;
             i_cat                    = AU_CAT_PCM;
             break;
 
         case AU_MULAW_8:       /* 8-bit ISDN u-law */
-            p_sys->fmt.i_codec               = VLC_FOURCC( 'u','l','a','w' );
+            p_sys->fmt.i_codec               = VLC_CODEC_MULAW;
             p_sys->fmt.audio.i_bitspersample = 8;
             p_sys->fmt.audio.i_blockalign    = 1 * p_sys->fmt.audio.i_channels;
             i_cat                    = AU_CAT_PCM;
index d9102884bc680ef0e3e2ac190daf5a51ddd05b26..4b6e59d4400afa1613f1174ad79c8270eae4a832 100644 (file)
@@ -94,7 +94,7 @@ static int Open( vlc_object_t * p_this )
     p_demux->p_sys      = p_sys = malloc( sizeof( demux_sys_t ) );
 
     /* */
-    es_format_Init( &p_sys->fmt, VIDEO_ES, VLC_FOURCC('C','D','G', ' ' ) );
+    es_format_Init( &p_sys->fmt, VIDEO_ES, VLC_CODEC_CDG );
     p_sys->fmt.video.i_width  = 300-2*6;
     p_sys->fmt.video.i_height = 216-2*12 ;
 
index 84e66913830f3aef1a2b85b0cd4fa7c981adebdc..4cfd537fdc64395953ed37ea07bb9a3da0a9433e 100644 (file)
@@ -110,7 +110,7 @@ static int Open( vlc_object_t * p_this )
     p_sys->i_dtsoffset = var_CreateGetInteger( p_demux, DEMUX_CFG_PREFIX DEMUX_DTSOFFSET );
 
     /* Load the packetizer */
-    es_format_Init( &fmt, VIDEO_ES, VLC_FOURCC( 'd','r','a','c' ) );
+    es_format_Init( &fmt, VIDEO_ES, VLC_CODEC_DIRAC );
     p_sys->p_packetizer = demux_PacketizerNew( p_demux, &fmt, "dirac" );
     if( !p_sys->p_packetizer )
     {
index 17b45ff6cc072d6c7eeb38791efb3865047be88b..91a2cccb40d76ad24c53ea6f27841ffa5f08137e 100644 (file)
@@ -144,7 +144,7 @@ static int Open( vlc_object_t * p_this )
     /* Load the FLAC packetizer */
     /* Store STREAMINFO for the decoder and packetizer */
     p_streaminfo[4] |= 0x80; /* Fake this as the last metadata block */
-    es_format_Init( &fmt, AUDIO_ES, VLC_FOURCC( 'f', 'l', 'a', 'c' ) );
+    es_format_Init( &fmt, AUDIO_ES, VLC_CODEC_FLAC );
     fmt.i_extra = i_streaminfo;
     fmt.p_extra = p_streaminfo;
 
index 414c51fcdaf4cf3dac8e4735d1cbf7c939122bfa..cd9c4f751ad34845e38999409399ac4c403f7efe 100644 (file)
@@ -808,12 +808,12 @@ static int SessionsSetup( demux_t *p_demux )
                     !strcmp( sub->codecName(), "MPA-ROBUST" ) ||
                     !strcmp( sub->codecName(), "X-MP3-DRAFT-00" ) )
                 {
-                    tk->fmt.i_codec = VLC_FOURCC( 'm', 'p', 'g', 'a' );
+                    tk->fmt.i_codec = VLC_CODEC_MPGA;
                     tk->fmt.audio.i_rate = 0;
                 }
                 else if( !strcmp( sub->codecName(), "AC3" ) )
                 {
-                    tk->fmt.i_codec = VLC_FOURCC( 'a', '5', '2', ' ' );
+                    tk->fmt.i_codec = VLC_CODEC_A52;
                     tk->fmt.audio.i_rate = 0;
                 }
                 else if( !strcmp( sub->codecName(), "L16" ) )
@@ -828,15 +828,15 @@ static int SessionsSetup( demux_t *p_demux )
                 }
                 else if( !strcmp( sub->codecName(), "PCMU" ) )
                 {
-                    tk->fmt.i_codec = VLC_FOURCC( 'u', 'l', 'a', 'w' );
+                    tk->fmt.i_codec = VLC_CODEC_MULAW;
                 }
                 else if( !strcmp( sub->codecName(), "PCMA" ) )
                 {
-                    tk->fmt.i_codec = VLC_FOURCC( 'a', 'l', 'a', 'w' );
+                    tk->fmt.i_codec = VLC_CODEC_ALAW;
                 }
                 else if( !strncmp( sub->codecName(), "G726", 4 ) )
                 {
-                    tk->fmt.i_codec = VLC_FOURCC( 'g', '7', '2', '6' );
+                    tk->fmt.i_codec = VLC_CODEC_ADPCM_G726;
                     tk->fmt.audio.i_rate = 8000;
                     tk->fmt.audio.i_channels = 1;
                     if( !strcmp( sub->codecName()+5, "40" ) )
@@ -850,18 +850,18 @@ static int SessionsSetup( demux_t *p_demux )
                 }
                 else if( !strcmp( sub->codecName(), "AMR" ) )
                 {
-                    tk->fmt.i_codec = VLC_FOURCC( 's', 'a', 'm', 'r' );
+                    tk->fmt.i_codec = VLC_CODEC_AMR_NB;
                 }
                 else if( !strcmp( sub->codecName(), "AMR-WB" ) )
                 {
-                    tk->fmt.i_codec = VLC_FOURCC( 's', 'a', 'w', 'b' );
+                    tk->fmt.i_codec = VLC_CODEC_AMR_WB;
                 }
                 else if( !strcmp( sub->codecName(), "MP4A-LATM" ) )
                 {
                     unsigned int i_extra;
                     uint8_t      *p_extra;
 
-                    tk->fmt.i_codec = VLC_FOURCC( 'm', 'p', '4', 'a' );
+                    tk->fmt.i_codec = VLC_CODEC_MP4A;
 
                     if( ( p_extra = parseStreamMuxConfigStr( sub->fmtp_config(),
                                                              i_extra ) ) )
@@ -880,7 +880,7 @@ static int SessionsSetup( demux_t *p_demux )
                     unsigned int i_extra;
                     uint8_t      *p_extra;
 
-                    tk->fmt.i_codec = VLC_FOURCC( 'm', 'p', '4', 'a' );
+                    tk->fmt.i_codec = VLC_CODEC_MP4A;
 
                     if( ( p_extra = parseGeneralConfigStr( sub->fmtp_config(),
                                                            i_extra ) ) )
@@ -920,24 +920,24 @@ static int SessionsSetup( demux_t *p_demux )
                 es_format_Init( &tk->fmt, VIDEO_ES, VLC_FOURCC('u','n','d','f') );
                 if( !strcmp( sub->codecName(), "MPV" ) )
                 {
-                    tk->fmt.i_codec = VLC_FOURCC( 'm', 'p', 'g', 'v' );
+                    tk->fmt.i_codec = VLC_CODEC_MPGV;
                 }
                 else if( !strcmp( sub->codecName(), "H263" ) ||
                          !strcmp( sub->codecName(), "H263-1998" ) ||
                          !strcmp( sub->codecName(), "H263-2000" ) )
                 {
-                    tk->fmt.i_codec = VLC_FOURCC( 'H', '2', '6', '3' );
+                    tk->fmt.i_codec = VLC_CODEC_H263;
                 }
                 else if( !strcmp( sub->codecName(), "H261" ) )
                 {
-                    tk->fmt.i_codec = VLC_FOURCC( 'H', '2', '6', '1' );
+                    tk->fmt.i_codec = VLC_CODEC_H261;
                 }
                 else if( !strcmp( sub->codecName(), "H264" ) )
                 {
                     unsigned int i_extra = 0;
                     uint8_t      *p_extra = NULL;
 
-                    tk->fmt.i_codec = VLC_FOURCC( 'h', '2', '6', '4' );
+                    tk->fmt.i_codec = VLC_CODEC_H264;
                     tk->fmt.b_packetized = false;
 
                     if((p_extra=parseH264ConfigStr( sub->fmtp_spropparametersets(),
@@ -952,14 +952,14 @@ static int SessionsSetup( demux_t *p_demux )
                 }
                 else if( !strcmp( sub->codecName(), "JPEG" ) )
                 {
-                    tk->fmt.i_codec = VLC_FOURCC( 'M', 'J', 'P', 'G' );
+                    tk->fmt.i_codec = VLC_CODEC_MJPG;
                 }
                 else if( !strcmp( sub->codecName(), "MP4V-ES" ) )
                 {
                     unsigned int i_extra;
                     uint8_t      *p_extra;
 
-                    tk->fmt.i_codec = VLC_FOURCC( 'm', 'p', '4', 'v' );
+                    tk->fmt.i_codec = VLC_CODEC_MP4V;
 
                     if( ( p_extra = parseGeneralConfigStr( sub->fmtp_config(),
                                                            i_extra ) ) )
@@ -1631,8 +1631,8 @@ static void StreamRead( void *p_private, unsigned int i_size,
         msg_Warn( p_demux, "buffer overflow" );
     }
     /* FIXME could i_size be > buffer size ? */
-    if( tk->fmt.i_codec == VLC_FOURCC('s','a','m','r') ||
-        tk->fmt.i_codec == VLC_FOURCC('s','a','w','b') )
+    if( tk->fmt.i_codec == VLC_CODEC_AMR_NB ||
+        tk->fmt.i_codec == VLC_CODEC_AMR_WB )
     {
         AMRAudioSource *amrSource = (AMRAudioSource*)tk->sub->readSource();
 
@@ -1640,7 +1640,7 @@ static void StreamRead( void *p_private, unsigned int i_size,
         p_block->p_buffer[0] = amrSource->lastFrameHeader();
         memcpy( p_block->p_buffer + 1, tk->p_buffer, i_size );
     }
-    else if( tk->fmt.i_codec == VLC_FOURCC('H','2','6','1') )
+    else if( tk->fmt.i_codec == VLC_CODEC_H261 )
     {
         H261VideoRTPSource *h261Source = (H261VideoRTPSource*)tk->sub->rtpSource();
         uint32_t header = h261Source->lastSpecialHeader();
@@ -1651,7 +1651,7 @@ static void StreamRead( void *p_private, unsigned int i_size,
         if( tk->sub->rtpSource()->curPacketMarkerBit() )
             p_block->i_flags |= BLOCK_FLAG_END_OF_FRAME;
     }
-    else if( tk->fmt.i_codec == VLC_FOURCC('h','2','6','4') )
+    else if( tk->fmt.i_codec == VLC_CODEC_H264 )
     {
         if( (tk->p_buffer[0] & 0x1f) >= 24 )
             msg_Warn( p_demux, "unsupported NAL type for H264" );
@@ -1694,7 +1694,7 @@ static void StreamRead( void *p_private, unsigned int i_size,
     if( !tk->b_muxed )
     {
         /*FIXME: for h264 you should check that packetization-mode=1 in sdp-file */
-        p_block->i_dts = ( tk->fmt.i_codec == VLC_FOURCC( 'm', 'p', 'g', 'v' ) ) ? 0 : i_pts;
+        p_block->i_dts = ( tk->fmt.i_codec == VLC_CODEC_MPGV ) ? 0 : i_pts;
     }
 
     if( tk->b_muxed )
index 69d54db80d6fdb36e22bfb185d6186a3f1f8ec68..406ac6e7a3a47775a0295f8227bde62bdf8a332e 100644 (file)
@@ -367,7 +367,7 @@ static int Open( vlc_object_t * p_this )
     }
 
     es_format_Init( &p_sys->fmt, VIDEO_ES, 0 );
-    p_sys->fmt.i_codec = VLC_FOURCC('m','j','p','g');
+    p_sys->fmt.i_codec = VLC_CODEC_MJPG;
 
     p_sys->p_es = es_out_Add( p_demux->out, &p_sys->fmt );
     return VLC_SUCCESS;
index 26d43b4bdc91bc2d0ec2060b17cca5e87981e4b3..5ec05d5243fd7086893119acc22239ed21084663 100644 (file)
@@ -669,12 +669,12 @@ bool matroska_segment_c::Select( mtime_t i_start_time )
         else if( !strcmp( tracks[i_track]->psz_codec, "V_MPEG1" ) ||
                  !strcmp( tracks[i_track]->psz_codec, "V_MPEG2" ) )
         {
-            tracks[i_track]->fmt.i_codec = VLC_FOURCC( 'm', 'p', 'g', 'v' );
+            tracks[i_track]->fmt.i_codec = VLC_CODEC_MPGV;
         }
         else if( !strncmp( tracks[i_track]->psz_codec, "V_THEORA", 8 ) )
         {
             uint8_t *p_data = tracks[i_track]->p_extra_data;
-            tracks[i_track]->fmt.i_codec = VLC_FOURCC( 't', 'h', 'e', 'o' );
+            tracks[i_track]->fmt.i_codec = VLC_CODEC_THEORA;
             if( tracks[i_track]->i_extra_data >= 4 ) {
                 if( p_data[0] == 2 ) {
                     int i = 1;
@@ -744,13 +744,13 @@ bool matroska_segment_c::Select( mtime_t i_start_time )
         else if( !strncmp( tracks[i_track]->psz_codec, "V_REAL/RV", 9 ) )
         {
             if( !strcmp( p_tk->psz_codec, "V_REAL/RV10" ) )
-                p_fmt->i_codec = VLC_FOURCC( 'R', 'V', '1', '0' );
+                p_fmt->i_codec = VLC_CODEC_RV10;
             else if( !strcmp( p_tk->psz_codec, "V_REAL/RV20" ) )
-                p_fmt->i_codec = VLC_FOURCC( 'R', 'V', '2', '0' );
+                p_fmt->i_codec = VLC_CODEC_RV20;
             else if( !strcmp( p_tk->psz_codec, "V_REAL/RV30" ) )
-                p_fmt->i_codec = VLC_FOURCC( 'R', 'V', '3', '0' );
+                p_fmt->i_codec = VLC_CODEC_RV30;
             else if( !strcmp( p_tk->psz_codec, "V_REAL/RV40" ) )
-                p_fmt->i_codec = VLC_FOURCC( 'R', 'V', '4', '0' );
+                p_fmt->i_codec = VLC_CODEC_RV40;
 
             if( p_tk->i_extra_data > 26 )
             {
@@ -765,13 +765,13 @@ bool matroska_segment_c::Select( mtime_t i_start_time )
         }
         else if( !strncmp( tracks[i_track]->psz_codec, "V_DIRAC", 7 ) )
         {
-            tracks[i_track]->fmt.i_codec = VLC_FOURCC('d', 'r', 'a', 'c' );
+            tracks[i_track]->fmt.i_codec = VLC_CODEC_DIRAC;
         }
         else if( !strncmp( tracks[i_track]->psz_codec, "V_MPEG4", 7 ) )
         {
             if( !strcmp( tracks[i_track]->psz_codec, "V_MPEG4/MS/V3" ) )
             {
-                tracks[i_track]->fmt.i_codec = VLC_FOURCC( 'D', 'I', 'V', '3' );
+                tracks[i_track]->fmt.i_codec = VLC_CODEC_DIV3;
             }
             else if( !strncmp( tracks[i_track]->psz_codec, "V_MPEG4/ISO", 11 ) )
             {
@@ -779,7 +779,7 @@ bool matroska_segment_c::Select( mtime_t i_start_time )
                 if( !strcmp( tracks[i_track]->psz_codec, "V_MPEG4/ISO/AVC" ) )
                     tracks[i_track]->fmt.i_codec = VLC_FOURCC( 'a', 'v', 'c', '1' );
                 else
-                    tracks[i_track]->fmt.i_codec = VLC_FOURCC( 'm', 'p', '4', 'v' );
+                    tracks[i_track]->fmt.i_codec = VLC_CODEC_MP4V;
                 tracks[i_track]->fmt.i_extra = tracks[i_track]->i_extra_data;
                 tracks[i_track]->fmt.p_extra = malloc( tracks[i_track]->i_extra_data );
                 memcpy( tracks[i_track]->fmt.p_extra,tracks[i_track]->p_extra_data, tracks[i_track]->i_extra_data );
@@ -840,33 +840,33 @@ bool matroska_segment_c::Select( mtime_t i_start_time )
                  !strcmp( tracks[i_track]->psz_codec, "A_MPEG/L2" ) ||
                  !strcmp( tracks[i_track]->psz_codec, "A_MPEG/L1" ) )
         {
-            tracks[i_track]->fmt.i_codec = VLC_FOURCC( 'm', 'p', 'g', 'a' );
+            tracks[i_track]->fmt.i_codec = VLC_CODEC_MPGA;
         }
         else if( !strcmp( tracks[i_track]->psz_codec, "A_AC3" ) )
         {
-            tracks[i_track]->fmt.i_codec = VLC_FOURCC( 'a', '5', '2', ' ' );
+            tracks[i_track]->fmt.i_codec = VLC_CODEC_A52;
         }
         else if( !strcmp( tracks[i_track]->psz_codec, "A_EAC3" ) )
         {
-            tracks[i_track]->fmt.i_codec = VLC_FOURCC( 'e', 'a', 'c', '3' );
+            tracks[i_track]->fmt.i_codec = VLC_CODEC_EAC3;
         }
         else if( !strcmp( tracks[i_track]->psz_codec, "A_DTS" ) )
         {
-            tracks[i_track]->fmt.i_codec = VLC_FOURCC( 'd', 't', 's', ' ' );
+            tracks[i_track]->fmt.i_codec = VLC_CODEC_DTS;
         }
         else if( !strcmp( tracks[i_track]->psz_codec, "A_MLP" ) )
         {
-            tracks[i_track]->fmt.i_codec = VLC_FOURCC('m', 'l', 'p', ' ' );
+            tracks[i_track]->fmt.i_codec = VLC_CODEC_MLP;
         }
         else if( !strcmp( tracks[i_track]->psz_codec, "A_TRUEHD" ) )
         {
             /* FIXME when more samples arrive */
-            tracks[i_track]->fmt.i_codec = VLC_FOURCC('t', 'r', 'h', 'd' );
+            tracks[i_track]->fmt.i_codec = VLC_CODEC_TRUEHD;
             p_fmt->b_packetized = false;
         }
         else if( !strcmp( tracks[i_track]->psz_codec, "A_FLAC" ) )
         {
-            tracks[i_track]->fmt.i_codec = VLC_FOURCC( 'f', 'l', 'a', 'c' );
+            tracks[i_track]->fmt.i_codec = VLC_CODEC_FLAC;
             tracks[i_track]->fmt.i_extra = tracks[i_track]->i_extra_data;
             tracks[i_track]->fmt.p_extra = malloc( tracks[i_track]->i_extra_data );
             memcpy( tracks[i_track]->fmt.p_extra,tracks[i_track]->p_extra_data, tracks[i_track]->i_extra_data );
@@ -876,7 +876,7 @@ bool matroska_segment_c::Select( mtime_t i_start_time )
             int i, i_offset = 1, i_size[3], i_extra;
             uint8_t *p_extra;
 
-            tracks[i_track]->fmt.i_codec = VLC_FOURCC( 'v', 'o', 'r', 'b' );
+            tracks[i_track]->fmt.i_codec = VLC_CODEC_VORBIS;
 
             /* Split the 3 headers */
             if( tracks[i_track]->p_extra_data[0] != 0x02 )
@@ -919,7 +919,7 @@ bool matroska_segment_c::Select( mtime_t i_start_time )
                         16000, 12000, 11025, 8000,  7350,  0,     0,     0
             };
 
-            tracks[i_track]->fmt.i_codec = VLC_FOURCC( 'm', 'p', '4', 'a' );
+            tracks[i_track]->fmt.i_codec = VLC_CODEC_MP4A;
             /* create data for faad (MP4DecSpecificDescrTag)*/
 
             if( !strcmp( &tracks[i_track]->psz_codec[12], "MAIN" ) )
@@ -971,21 +971,21 @@ bool matroska_segment_c::Select( mtime_t i_start_time )
         }
         else if( !strcmp( tracks[i_track]->psz_codec, "A_AAC" ) )
         {
-            tracks[i_track]->fmt.i_codec = VLC_FOURCC( 'm', 'p', '4', 'a' );
+            tracks[i_track]->fmt.i_codec = VLC_CODEC_MP4A;
             tracks[i_track]->fmt.i_extra = tracks[i_track]->i_extra_data;
             tracks[i_track]->fmt.p_extra = malloc( tracks[i_track]->i_extra_data );
             memcpy( tracks[i_track]->fmt.p_extra, tracks[i_track]->p_extra_data, tracks[i_track]->i_extra_data );
         }
         else if( !strcmp( tracks[i_track]->psz_codec, "A_WAVPACK4" ) )
         {
-            tracks[i_track]->fmt.i_codec = VLC_FOURCC( 'W', 'V', 'P', 'K' );
+            tracks[i_track]->fmt.i_codec = VLC_CODEC_WAVPACK;
             tracks[i_track]->fmt.i_extra = tracks[i_track]->i_extra_data;
             tracks[i_track]->fmt.p_extra = malloc( tracks[i_track]->i_extra_data );
             memcpy( tracks[i_track]->fmt.p_extra, tracks[i_track]->p_extra_data, tracks[i_track]->i_extra_data );
         }
         else if( !strcmp( tracks[i_track]->psz_codec, "A_TTA1" ) )
         {
-            tracks[i_track]->fmt.i_codec = VLC_FOURCC( 'T', 'T', 'A', '1' );
+            tracks[i_track]->fmt.i_codec = VLC_CODEC_TTA;
             tracks[i_track]->fmt.i_extra = tracks[i_track]->i_extra_data;
             tracks[i_track]->fmt.p_extra = malloc( tracks[i_track]->i_extra_data );
             memcpy( tracks[i_track]->fmt.p_extra, tracks[i_track]->p_extra_data, tracks[i_track]->i_extra_data );
@@ -1010,7 +1010,7 @@ bool matroska_segment_c::Select( mtime_t i_start_time )
             int i, i_offset = 1, i_extra, num_headers, size_so_far;
             uint8_t *p_extra;
 
-            tracks[i_track]->fmt.i_codec = VLC_FOURCC( 'k', 'a', 't', 'e' );
+            tracks[i_track]->fmt.i_codec = VLC_CODEC_KATE;
             tracks[i_track]->fmt.subs.psz_encoding = strdup( "UTF-8" );
 
             /* Recover the number of headers to expect */
@@ -1057,12 +1057,12 @@ bool matroska_segment_c::Select( mtime_t i_start_time )
         }
         else if( !strcmp( tracks[i_track]->psz_codec, "S_TEXT/ASCII" ) )
         {
-            p_fmt->i_codec = VLC_FOURCC( 's', 'u', 'b', 't' );
+            p_fmt->i_codec = VLC_CODEC_SUBT;
             p_fmt->subs.psz_encoding = NULL; /* Is there a place where it is stored ? */
         }
         else if( !strcmp( tracks[i_track]->psz_codec, "S_TEXT/UTF8" ) )
         {
-            tracks[i_track]->fmt.i_codec = VLC_FOURCC( 's', 'u', 'b', 't' );
+            tracks[i_track]->fmt.i_codec = VLC_CODEC_SUBT;
             tracks[i_track]->fmt.subs.psz_encoding = strdup( "UTF-8" );
         }
         else if( !strcmp( tracks[i_track]->psz_codec, "S_TEXT/USF" ) )
@@ -1081,7 +1081,7 @@ bool matroska_segment_c::Select( mtime_t i_start_time )
                  !strcmp( tracks[i_track]->psz_codec, "S_SSA" ) ||
                  !strcmp( tracks[i_track]->psz_codec, "S_ASS" ))
         {
-            tracks[i_track]->fmt.i_codec = VLC_FOURCC( 's', 's', 'a', ' ' );
+            tracks[i_track]->fmt.i_codec = VLC_CODEC_SSA;
             tracks[i_track]->fmt.subs.psz_encoding = strdup( "UTF-8" );
             if( tracks[i_track]->i_extra_data )
             {
@@ -1092,7 +1092,7 @@ bool matroska_segment_c::Select( mtime_t i_start_time )
         }
         else if( !strcmp( tracks[i_track]->psz_codec, "S_VOBSUB" ) )
         {
-            tracks[i_track]->fmt.i_codec = VLC_FOURCC( 's','p','u',' ' );
+            tracks[i_track]->fmt.i_codec = VLC_CODEC_SPU;
             if( tracks[i_track]->i_extra_data )
             {
                 char *p_start;
@@ -1120,7 +1120,7 @@ bool matroska_segment_c::Select( mtime_t i_start_time )
         }
         else if( !strcmp( p_tk->psz_codec, "A_REAL/14_4" ) )
         {
-            p_fmt->i_codec = VLC_FOURCC( '1', '4', '_', '4');
+            p_fmt->i_codec = VLC_CODEC_RA_144;
             p_fmt->audio.i_channels = 1;
             p_fmt->audio.i_rate = 8000;
             p_fmt->audio.i_blockalign = 0x14;
index b02e4cdf51610470676a4a793e07d4d6edc8ab15..a1aff2d97c543ac1b98758d4281407a47ed8ae30 100644 (file)
@@ -150,12 +150,12 @@ static int Open( vlc_object_t * p_this )
 
     /* */
 #ifndef MPC_FIXED_POINT
-    es_format_Init( &fmt, AUDIO_ES, VLC_FOURCC( 'f', 'l', '3', '2' ) );
+    es_format_Init( &fmt, AUDIO_ES, VLC_CODEC_FL32 );
 #else
 #   ifdef WORDS_BIGENDIAN
-    es_format_Init( &fmt, AUDIO_ES, VLC_FOURCC( 's', '3', '2', 'b' ) );
+    es_format_Init( &fmt, AUDIO_ES, VLC_CODEC_S32B );
 #   else
-    es_format_Init( &fmt, AUDIO_ES, VLC_FOURCC( 's', '3', '2', 'l' ) );
+    es_format_Init( &fmt, AUDIO_ES, VLC_CODEC_S32L );
 #   endif
 #endif
     fmt.audio.i_channels = p_sys->info.channels;
index abe04dcbc50deeeb61e3636fc071a07b10b54acc..3a23281fd6eee8a78373cea52915af752d857438 100644 (file)
@@ -133,12 +133,12 @@ static int MlpProbe( demux_t *p_demux, int64_t *pi_offset );
 static int MlpInit( demux_t *p_demux );
 
 static const codec_t p_codec[] = {
-    { VLC_FOURCC( 'm', 'p', '4', 'a' ), false, "mp4 audio",  AacProbe,  AacInit },
-    { VLC_FOURCC( 'm', 'p', 'g', 'a' ), false, "mpeg audio", MpgaProbe, MpgaInit },
-    { VLC_FOURCC( 'a', '5', '2', ' ' ), true,  "a52 audio",  A52Probe,  A52Init },
-    { VLC_FOURCC( 'e', 'a', 'c', '3' ), true,  "eac3 audio", EA52Probe, A52Init },
-    { VLC_FOURCC( 'd', 't', 's', ' ' ), false, "dts audio",  DtsProbe,  DtsInit },
-    { VLC_FOURCC( 'm', 'l', 'p', ' ' ), false, "mlp audio",  MlpProbe,  MlpInit },
+    { VLC_CODEC_MP4A, false, "mp4 audio",  AacProbe,  AacInit },
+    { VLC_CODEC_MPGA, false, "mpeg audio", MpgaProbe, MpgaInit },
+    { VLC_CODEC_A52, true,  "a52 audio",  A52Probe,  A52Init },
+    { VLC_CODEC_EAC3, true,  "eac3 audio", EA52Probe, A52Init },
+    { VLC_CODEC_DTS, false, "dts audio",  DtsProbe,  DtsInit },
+    { VLC_CODEC_MLP, false, "mlp audio",  MlpProbe,  MlpInit },
 
     { 0, false, NULL, NULL, NULL }
 };
index 5f6071c48220737855b4e7753ada1e7e945100f3..1bcf6f06c8a38c555d296c2fa32e9c934f297d9a 100644 (file)
@@ -109,7 +109,7 @@ static int Open( vlc_object_t * p_this )
     msg_Dbg( p_demux, "using %.2f fps", p_sys->f_fps );
 
     /* Load the mpegvideo packetizer */
-    es_format_Init( &fmt, VIDEO_ES, VLC_FOURCC( 'h', '2', '6', '4' ) );
+    es_format_Init( &fmt, VIDEO_ES, VLC_CODEC_H264 );
     p_sys->p_packetizer = demux_PacketizerNew( p_demux, &fmt, "h264" );
     if( !p_sys->p_packetizer )
     {
index 946739aa3c07e190e96ea08907b8bfc08122d6c5..e9cbd8e35653114ca1ea468e63125ee47b34cd08 100644 (file)
@@ -108,7 +108,7 @@ static int Open( vlc_object_t * p_this )
     p_sys->p_es        = NULL;
 
     /* Load the mpegvideo packetizer */
-    es_format_Init( &fmt, VIDEO_ES, VLC_FOURCC( 'm', 'p', 'g', 'v' ) );
+    es_format_Init( &fmt, VIDEO_ES, VLC_CODEC_MPGV );
     p_sys->p_packetizer = demux_PacketizerNew( p_demux, &fmt, "mpeg video" );
     if( !p_sys->p_packetizer )
     {
@@ -117,7 +117,7 @@ static int Open( vlc_object_t * p_this )
     }
 
     /* create the output */
-    es_format_Init( &fmt, VIDEO_ES, VLC_FOURCC( 'm', 'p', 'g', 'v' ) );
+    es_format_Init( &fmt, VIDEO_ES, VLC_CODEC_MPGV );
     p_sys->p_es = es_out_Add( p_demux->out, &fmt );
 
     return VLC_SUCCESS;
index c6a87b45ac6fea1580c9cd0af234c289b0c37bc9..99cad8397b69466a98a7938d6183bfb6f7902576 100644 (file)
@@ -314,7 +314,7 @@ static int Open( vlc_object_t * p_this )
     {
         es_format_t fmt;
 
-        es_format_Init( &fmt, AUDIO_ES, VLC_FOURCC('m','p','g','a') );
+        es_format_Init( &fmt, AUDIO_ES, VLC_CODEC_MPGA );
         fmt.audio.i_rate = p_sys->exh.i_audio_sample_rate;
         fmt.audio.i_bitspersample = p_sys->exh.i_audio_bits_per_sample;
 
index 2580c6aba6ac416986d965305ac8f06688da223e..5e50b7a55297a0b22759b5335d9d941525a1c237 100644 (file)
@@ -360,21 +360,21 @@ static int Demux( demux_t * p_demux )
             /* Read info from any secondary header packets, if there are any */
             if( p_stream->i_secondary_header_packets > 0 )
             {
-                if( p_stream->fmt.i_codec == VLC_FOURCC('t','h','e','o') &&
+                if( p_stream->fmt.i_codec == VLC_CODEC_THEORA &&
                         oggpacket.bytes >= 7 &&
                         ! memcmp( oggpacket.packet, "\x80theora", 7 ) )
                 {
                     Ogg_ReadTheoraHeader( p_stream, &oggpacket );
                     p_stream->i_secondary_header_packets = 0;
                 }
-                else if( p_stream->fmt.i_codec == VLC_FOURCC('v','o','r','b') &&
+                else if( p_stream->fmt.i_codec == VLC_CODEC_VORBIS &&
                         oggpacket.bytes >= 7 &&
                         ! memcmp( oggpacket.packet, "\x01vorbis", 7 ) )
                 {
                     Ogg_ReadVorbisHeader( p_stream, &oggpacket );
                     p_stream->i_secondary_header_packets = 0;
                 }
-                else if( p_stream->fmt.i_codec == VLC_FOURCC('c','m','m','l') )
+                else if( p_stream->fmt.i_codec == VLC_CODEC_CMML )
                 {
                     p_stream->i_secondary_header_packets = 0;
                 }
@@ -397,9 +397,9 @@ static int Demux( demux_t * p_demux )
                 }
 
                 /* An Ogg/vorbis packet contains an end date granulepos */
-                if( p_stream->fmt.i_codec == VLC_FOURCC( 'v','o','r','b' ) ||
-                    p_stream->fmt.i_codec == VLC_FOURCC( 's','p','x',' ' ) ||
-                    p_stream->fmt.i_codec == VLC_FOURCC( 'f','l','a','c' ) )
+                if( p_stream->fmt.i_codec == VLC_CODEC_VORBIS ||
+                    p_stream->fmt.i_codec == VLC_CODEC_SPEEX ||
+                    p_stream->fmt.i_codec == VLC_CODEC_FLAC )
                 {
                     if( ogg_stream_packetout( &p_stream->os, &oggpacket ) > 0 )
                     {
@@ -541,8 +541,8 @@ static void Ogg_UpdatePCR( logical_stream_t *p_stream,
     /* Convert the granulepos into a pcr */
     if( p_oggpacket->granulepos >= 0 )
     {
-        if( p_stream->fmt.i_codec == VLC_FOURCC( 't','h','e','o' ) ||
-            p_stream->fmt.i_codec == VLC_FOURCC( 'k','a','t','e' ) )
+        if( p_stream->fmt.i_codec == VLC_CODEC_THEORA ||
+            p_stream->fmt.i_codec == VLC_CODEC_KATE )
         {
             ogg_int64_t iframe = p_oggpacket->granulepos >>
               p_stream->i_granule_shift;
@@ -552,7 +552,7 @@ static void Ogg_UpdatePCR( logical_stream_t *p_stream,
             p_stream->i_pcr = ( iframe + pframe ) * INT64_C(1000000)
                               / p_stream->f_rate;
         }
-        else if( p_stream->fmt.i_codec == VLC_FOURCC( 'd','r','a','c' ) )
+        else if( p_stream->fmt.i_codec == VLC_CODEC_DIRAC )
         {
             ogg_int64_t i_dts = p_oggpacket->granulepos >> 31;
             /* NB, OggDirac granulepos values are in units of 2*picturerate */
@@ -616,7 +616,7 @@ static void Ogg_DecodePacket( demux_t *p_demux,
         return;
     }
 
-    if( p_stream->fmt.i_codec == VLC_FOURCC( 's','u','b','t' ) &&
+    if( p_stream->fmt.i_codec == VLC_CODEC_SUBT &&
         p_oggpacket->packet[0] & PACKET_TYPE_BITS ) return;
 
     /* Check the ES is selected */
@@ -632,13 +632,13 @@ static void Ogg_DecodePacket( demux_t *p_demux,
         p_stream->i_packets_backup++;
         switch( p_stream->fmt.i_codec )
         {
-        case VLC_FOURCC( 'v','o','r','b' ):
-        case VLC_FOURCC( 's','p','x',' ' ):
-        case VLC_FOURCC( 't','h','e','o' ):
+        case VLC_CODEC_VORBIS:
+        case VLC_CODEC_SPEEX:
+        case VLC_CODEC_THEORA:
             if( p_stream->i_packets_backup == 3 ) p_stream->b_force_backup = 0;
             break;
 
-        case VLC_FOURCC( 'f','l','a','c' ):
+        case VLC_CODEC_FLAC:
             if( !p_stream->fmt.audio.i_rate && p_stream->i_packets_backup == 2 )
             {
                 Ogg_ReadFlacHeader( p_demux, p_stream, p_oggpacket );
@@ -656,7 +656,7 @@ static void Ogg_DecodePacket( demux_t *p_demux,
             b_store_size = false;
             break;
 
-        case VLC_FOURCC( 'k','a','t','e' ):
+        case VLC_CODEC_KATE:
             if( p_stream->i_packets_backup == 1)
                 b_store_num_headers = true;
             if( p_stream->i_packets_backup == p_stream->i_kate_num_headers ) p_stream->b_force_backup = 0;
@@ -723,9 +723,9 @@ static void Ogg_DecodePacket( demux_t *p_demux,
     }
 
     /* Convert the pcr into a pts */
-    if( p_stream->fmt.i_codec == VLC_FOURCC( 'v','o','r','b' ) ||
-        p_stream->fmt.i_codec == VLC_FOURCC( 's','p','x',' ' ) ||
-        p_stream->fmt.i_codec == VLC_FOURCC( 'f','l','a','c' ) )
+    if( p_stream->fmt.i_codec == VLC_CODEC_VORBIS ||
+        p_stream->fmt.i_codec == VLC_CODEC_SPEEX ||
+        p_stream->fmt.i_codec == VLC_CODEC_FLAC )
     {
         if( p_stream->i_pcr >= 0 )
         {
@@ -770,9 +770,9 @@ static void Ogg_DecodePacket( demux_t *p_demux,
         }
     }
 
-    if( p_stream->fmt.i_codec != VLC_FOURCC( 'v','o','r','b' ) &&
-        p_stream->fmt.i_codec != VLC_FOURCC( 's','p','x',' ' ) &&
-        p_stream->fmt.i_codec != VLC_FOURCC( 'f','l','a','c' ) &&
+    if( p_stream->fmt.i_codec != VLC_CODEC_VORBIS &&
+        p_stream->fmt.i_codec != VLC_CODEC_SPEEX &&
+        p_stream->fmt.i_codec != VLC_CODEC_FLAC &&
         p_stream->i_pcr >= 0 )
     {
         p_stream->i_previous_pcr = p_stream->i_pcr;
@@ -805,9 +805,9 @@ static void Ogg_DecodePacket( demux_t *p_demux,
         p_block->i_dts = p_block->i_pts = i_pts;
         p_block->i_length = 0;
     }
-    else if( p_stream->fmt.i_codec == VLC_FOURCC( 't','h','e','o' ) )
+    else if( p_stream->fmt.i_codec == VLC_CODEC_THEORA )
         p_block->i_dts = p_block->i_pts = i_pts;
-    else if( p_stream->fmt.i_codec == VLC_FOURCC( 'd','r','a','c' ) )
+    else if( p_stream->fmt.i_codec == VLC_CODEC_DIRAC )
     {
         ogg_int64_t dts = p_oggpacket->granulepos >> 31;
         ogg_int64_t delay = (p_oggpacket->granulepos >> 9) & 0x1fff;
@@ -826,20 +826,20 @@ static void Ogg_DecodePacket( demux_t *p_demux,
         p_block->i_pts = 0;
     }
 
-    if( p_stream->fmt.i_codec != VLC_FOURCC( 'v','o','r','b' ) &&
-        p_stream->fmt.i_codec != VLC_FOURCC( 's','p','x',' ' ) &&
-        p_stream->fmt.i_codec != VLC_FOURCC( 'f','l','a','c' ) &&
-        p_stream->fmt.i_codec != VLC_FOURCC( 't','a','r','k' ) &&
-        p_stream->fmt.i_codec != VLC_FOURCC( 't','h','e','o' ) &&
-        p_stream->fmt.i_codec != VLC_FOURCC( 'c','m','m','l' ) &&
-        p_stream->fmt.i_codec != VLC_FOURCC( 'd','r','a','c' ) &&
-        p_stream->fmt.i_codec != VLC_FOURCC( 'k','a','t','e' ) )
+    if( p_stream->fmt.i_codec != VLC_CODEC_VORBIS &&
+        p_stream->fmt.i_codec != VLC_CODEC_SPEEX &&
+        p_stream->fmt.i_codec != VLC_CODEC_FLAC &&
+        p_stream->fmt.i_codec != VLC_CODEC_TARKIN &&
+        p_stream->fmt.i_codec != VLC_CODEC_THEORA &&
+        p_stream->fmt.i_codec != VLC_CODEC_CMML &&
+        p_stream->fmt.i_codec != VLC_CODEC_DIRAC &&
+        p_stream->fmt.i_codec != VLC_CODEC_KATE )
     {
         /* We remove the header from the packet */
         i_header_len = (*p_oggpacket->packet & PACKET_LEN_BITS01) >> 6;
         i_header_len |= (*p_oggpacket->packet & PACKET_LEN_BITS2) << 1;
 
-        if( p_stream->fmt.i_codec == VLC_FOURCC( 's','u','b','t' ))
+        if( p_stream->fmt.i_codec == VLC_CODEC_SUBT)
         {
             /* But with subtitles we need to retrieve the duration first */
             int i, lenbytes = 0;
@@ -869,7 +869,7 @@ static void Ogg_DecodePacket( demux_t *p_demux,
             p_block->i_buffer = 0;
     }
 
-    if( p_stream->fmt.i_codec == VLC_FOURCC( 't','a','r','k' ) )
+    if( p_stream->fmt.i_codec == VLC_CODEC_TARKIN )
     {
         /* FIXME: the biggest hack I've ever done */
         msg_Warn( p_demux, "tarkin pts: %"PRId64", granule: %"PRId64,
@@ -970,7 +970,7 @@ static int Ogg_FindLogicalStreams( demux_t *p_demux )
                     p_stream->b_force_backup = 1;
 
                     p_stream->fmt.i_cat = AUDIO_ES;
-                    p_stream->fmt.i_codec = VLC_FOURCC( 'f','l','a','c' );
+                    p_stream->fmt.i_codec = VLC_CODEC_FLAC;
                 }
                 /* Check for Flac header (>= version 1.1.1) */
                 else if( oggpacket.bytes >= 13 && oggpacket.packet[0] ==0x7F &&
@@ -987,7 +987,7 @@ static int Ogg_FindLogicalStreams( demux_t *p_demux )
                     p_stream->b_force_backup = 1;
 
                     p_stream->fmt.i_cat = AUDIO_ES;
-                    p_stream->fmt.i_codec = VLC_FOURCC( 'f','l','a','c' );
+                    p_stream->fmt.i_codec = VLC_CODEC_FLAC;
                     oggpacket.packet += 13; oggpacket.bytes -= 13;
                     Ogg_ReadFlacHeader( p_demux, p_stream, &oggpacket );
                 }
@@ -1022,7 +1022,7 @@ static int Ogg_FindLogicalStreams( demux_t *p_demux )
 
                     msg_Dbg( p_demux, "found tarkin header" );
                     p_stream->fmt.i_cat = VIDEO_ES;
-                    p_stream->fmt.i_codec = VLC_FOURCC( 't','a','r','k' );
+                    p_stream->fmt.i_codec = VLC_CODEC_TARKIN;
 
                     /* Cheat and get additionnal info ;) */
                     oggpack_readinit( &opb, oggpacket.packet, oggpacket.bytes);
@@ -1280,7 +1280,7 @@ static int Ogg_FindLogicalStreams( demux_t *p_demux )
 
                         msg_Dbg( p_demux, "found text subtitles header" );
                         p_stream->fmt.i_cat = SPU_ES;
-                        p_stream->fmt.i_codec = VLC_FOURCC('s','u','b','t');
+                        p_stream->fmt.i_codec = VLC_CODEC_SUBT;
                         p_stream->f_rate = 1000; /* granulepos is in millisec */
                     }
                     else
@@ -1385,15 +1385,15 @@ static int Ogg_BeginningOfStream( demux_t *p_demux )
         if( !p_stream->p_es )
         {
             /* Better be safe than sorry when possible with ogm */
-            if( p_stream->fmt.i_codec == VLC_FOURCC( 'm', 'p', 'g', 'a' ) ||
-                p_stream->fmt.i_codec == VLC_FOURCC( 'a', '5', '2', ' ' ) )
+            if( p_stream->fmt.i_codec == VLC_CODEC_MPGA ||
+                p_stream->fmt.i_codec == VLC_CODEC_A52 )
                 p_stream->fmt.b_packetized = false;
 
             p_stream->p_es = es_out_Add( p_demux->out, &p_stream->fmt );
         }
 
         // TODO: something to do here ?
-        if( p_stream->fmt.i_codec == VLC_FOURCC('c','m','m','l') )
+        if( p_stream->fmt.i_codec == VLC_CODEC_CMML )
         {
             /* Set the CMML stream active */
             es_out_Control( p_demux->out, ES_OUT_SET_ES, p_stream->p_es );
@@ -1496,7 +1496,7 @@ static bool Ogg_LogicalStreamResetEsFormat( demux_t *p_demux, logical_stream_t *
         return true;
 
     /* Only vorbis is supported */
-    if( p_stream->fmt.i_codec == VLC_FOURCC( 'v','o','r','b' ) )
+    if( p_stream->fmt.i_codec == VLC_CODEC_VORBIS )
         b_compatible = Ogg_IsVorbisFormatCompatible( &p_stream->fmt, &p_stream->fmt_old );
 
     if( !b_compatible )
@@ -1550,30 +1550,30 @@ static void Ogg_ExtractMeta( demux_t *p_demux, vlc_fourcc_t i_codec, const uint8
     switch( i_codec )
     {
     /* 3 headers with the 2° one being the comments */
-    case VLC_FOURCC( 'v','o','r','b' ):
+    case VLC_CODEC_VORBIS:
         Ogg_ExtractXiphMeta( p_demux, p_headers, i_headers, 1+6, false );
         break;
-    case VLC_FOURCC( 't','h','e','o' ):
+    case VLC_CODEC_THEORA:
         Ogg_ExtractXiphMeta( p_demux, p_headers, i_headers, 1+6, false );
         break;
-    case VLC_FOURCC( 's','p','x',' ' ):
+    case VLC_CODEC_SPEEX:
         Ogg_ExtractXiphMeta( p_demux, p_headers, i_headers, 0, false );
         break;
 
     /* N headers with the 2° one being the comments */
-    case VLC_FOURCC( 'k','a','t','e' ):
+    case VLC_CODEC_KATE:
         /* 1 byte for header type, 7 bit for magic, 1 reserved zero byte */
         Ogg_ExtractXiphMeta( p_demux, p_headers, i_headers, 1+7+1, true );
         break;
 
     /* TODO */
-    case VLC_FOURCC( 'f','l','a','c' ):
+    case VLC_CODEC_FLAC:
         msg_Warn( p_demux, "Ogg_ExtractMeta does not support %4.4s", (const char*)&i_codec );
         break;
 
     /* No meta data */
-    case VLC_FOURCC( 'c','m','m','l' ): /* CMML is XML text, doesn't have Vorbis comments */
-    case VLC_FOURCC( 'd','r','a','c' ):
+    case VLC_CODEC_CMML: /* CMML is XML text, doesn't have Vorbis comments */
+    case VLC_CODEC_DIRAC:
     default:
         break;
     }
@@ -1590,7 +1590,7 @@ static void Ogg_ReadTheoraHeader( logical_stream_t *p_stream,
     int i_keyframe_frequency_force;
 
     p_stream->fmt.i_cat = VIDEO_ES;
-    p_stream->fmt.i_codec = VLC_FOURCC( 't','h','e','o' );
+    p_stream->fmt.i_codec = VLC_CODEC_THEORA;
 
     /* Signal that we want to keep a backup of the theora
      * stream headers. They will be used when switching between
@@ -1642,7 +1642,7 @@ static void Ogg_ReadVorbisHeader( logical_stream_t *p_stream,
     oggpack_buffer opb;
 
     p_stream->fmt.i_cat = AUDIO_ES;
-    p_stream->fmt.i_codec = VLC_FOURCC( 'v','o','r','b' );
+    p_stream->fmt.i_codec = VLC_CODEC_VORBIS;
 
     /* Signal that we want to keep a backup of the vorbis
      * stream headers. They will be used when switching between
@@ -1665,7 +1665,7 @@ static void Ogg_ReadSpeexHeader( logical_stream_t *p_stream,
     oggpack_buffer opb;
 
     p_stream->fmt.i_cat = AUDIO_ES;
-    p_stream->fmt.i_codec = VLC_FOURCC( 's','p','x',' ' );
+    p_stream->fmt.i_codec = VLC_CODEC_SPEEX;
 
     /* Signal that we want to keep a backup of the speex
      * stream headers. They will be used when switching between
@@ -1729,7 +1729,7 @@ static void Ogg_ReadKateHeader( logical_stream_t *p_stream,
     char *psz_desc;
 
     p_stream->fmt.i_cat = SPU_ES;
-    p_stream->fmt.i_codec = VLC_FOURCC( 'k','a','t','e' );
+    p_stream->fmt.i_codec = VLC_CODEC_KATE;
 
     /* Signal that we want to keep a backup of the kate
      * stream headers. They will be used when switching between
@@ -1848,21 +1848,21 @@ static void Ogg_ReadAnnodexHeader( vlc_object_t *p_this,
         else if( !strncmp(content_type_string, "audio/x-vorbis", 14) )
         {
             p_stream->fmt.i_cat = AUDIO_ES;
-            p_stream->fmt.i_codec = VLC_FOURCC( 'v','o','r','b' );
+            p_stream->fmt.i_codec = VLC_CODEC_VORBIS;
 
             p_stream->b_force_backup = 1;
         }
         else if( !strncmp(content_type_string, "audio/x-speex", 14) )
         {
             p_stream->fmt.i_cat = AUDIO_ES;
-            p_stream->fmt.i_codec = VLC_FOURCC( 's','p','x',' ' );
+            p_stream->fmt.i_codec = VLC_CODEC_SPEEX;
 
             p_stream->b_force_backup = 1;
         }
         else if( !strncmp(content_type_string, "video/x-theora", 14) )
         {
             p_stream->fmt.i_cat = VIDEO_ES;
-            p_stream->fmt.i_codec = VLC_FOURCC( 't','h','e','o' );
+            p_stream->fmt.i_codec = VLC_CODEC_THEORA;
 
             p_stream->b_force_backup = 1;
         }
@@ -1877,13 +1877,13 @@ static void Ogg_ReadAnnodexHeader( vlc_object_t *p_this,
         {
             /* n.b. MPEG streams are unsupported right now */
             p_stream->fmt.i_cat = VIDEO_ES;
-            p_stream->fmt.i_codec = VLC_FOURCC( 'm','p','g','v' );
+            p_stream->fmt.i_codec = VLC_CODEC_MPGV;
         }
         else if( !strncmp(content_type_string, "text/x-cmml", 11) )
         {
             ogg_stream_packetout( &p_stream->os, p_oggpacket );
             p_stream->fmt.i_cat = SPU_ES;
-            p_stream->fmt.i_codec = VLC_FOURCC( 'c','m','m','l' );
+            p_stream->fmt.i_codec = VLC_CODEC_CMML;
         }
     }
 }
@@ -1985,7 +1985,7 @@ static bool Ogg_ReadDiracHeader( logical_stream_t *p_stream,
 
     /* probably is an ogg dirac es */
     p_stream->fmt.i_cat = VIDEO_ES;
-    p_stream->fmt.i_codec = VLC_FOURCC( 'd','r','a','c' );
+    p_stream->fmt.i_codec = VLC_CODEC_DIRAC;
 
     return true;
 }
index aad1e52971ad3b4434e0e235c17e253bbecb17c4..66b289219b11add189904f99c6a3ebcdbe03b505 100644 (file)
@@ -388,7 +388,7 @@ static int Demux( demux_t *p_demux )
             if( tk->b_seen && tk->es &&
                 (
 #ifdef ZVBI_COMPILED /* FIXME!! */
-                tk->fmt.i_codec == VLC_FOURCC('t','e','l','x') ||
+                tk->fmt.i_codec == VLC_CODEC_TELETEXT ||
 #endif
                 !ps_pkt_parse_pes( p_pkt, tk->i_skip ) ) )
             {
index fed3ab0ac93a33ed4380d333ce14ca16136df08a..d0b4cc4a02d00a8c7be3e816f0dabc0396594f0d 100644 (file)
@@ -70,28 +70,28 @@ static inline int ps_track_fill( ps_track_t *tk, ps_psm_t *p_psm, int i_id )
     {
         if( ( i_id&0xf8 ) == 0x88 || (i_id&0xf8) == 0x98 )
         {
-            es_format_Init( &tk->fmt, AUDIO_ES, VLC_FOURCC('d','t','s',' ') );
+            es_format_Init( &tk->fmt, AUDIO_ES, VLC_CODEC_DTS );
             tk->i_skip = 4;
         }
         else if( ( i_id&0xf0 ) == 0x80
                ||  (i_id&0xf0) == 0xc0 ) /* AC-3, Can also be used for DD+/E-AC-3 */
         {
-            es_format_Init( &tk->fmt, AUDIO_ES, VLC_FOURCC('a','5','2',' ') );
+            es_format_Init( &tk->fmt, AUDIO_ES, VLC_CODEC_A52 );
             tk->i_skip = 4;
         }
         else if( (i_id&0xf0) == 0xb0 )
         {
-            es_format_Init( &tk->fmt, AUDIO_ES, VLC_FOURCC('m','l','p',' ') );
+            es_format_Init( &tk->fmt, AUDIO_ES, VLC_CODEC_MLP );
             /* FIXME / untested ... no known decoder (at least not in VLC/ffmpeg) */
         }
         else if( ( i_id&0xe0 ) == 0x20 )
         {
-            es_format_Init( &tk->fmt, SPU_ES, VLC_FOURCC('s','p','u',' ') );
+            es_format_Init( &tk->fmt, SPU_ES, VLC_CODEC_SPU );
             tk->i_skip = 1;
         }
         else if( ( i_id&0xf0 ) == 0xa0 )
         {
-            es_format_Init( &tk->fmt, AUDIO_ES, VLC_FOURCC('l','p','c','m') );
+            es_format_Init( &tk->fmt, AUDIO_ES, VLC_CODEC_DVD_LPCM );
             tk->i_skip = 1;
         }
         else if( ( i_id&0xff ) == 0x70 )
@@ -104,7 +104,7 @@ static inline int ps_track_fill( ps_track_t *tk, ps_psm_t *p_psm, int i_id )
         }
         else if( ( i_id&0xff ) == 0x10 )
         {
-            es_format_Init( &tk->fmt, SPU_ES, VLC_FOURCC('t','e','l','x') );
+            es_format_Init( &tk->fmt, SPU_ES, VLC_CODEC_TELETEXT );
         }
         else
         {
@@ -117,7 +117,7 @@ static inline int ps_track_fill( ps_track_t *tk, ps_psm_t *p_psm, int i_id )
         uint8_t i_sub_id = i_id & 0xff;
         if( i_sub_id >= 0x55 && i_sub_id <= 0x5f )
         {
-            es_format_Init( &tk->fmt, VIDEO_ES, VLC_FOURCC('W','V','C','1') );
+            es_format_Init( &tk->fmt, VIDEO_ES, VLC_CODEC_VC1 );
         }
         else
         {
@@ -133,36 +133,36 @@ static inline int ps_track_fill( ps_track_t *tk, ps_psm_t *p_psm, int i_id )
 
         if( (i_id&0xf0) == 0xe0 && i_type == 0x1b )
         {
-            es_format_Init( &tk->fmt, VIDEO_ES, VLC_FOURCC('h','2','6','4') );
+            es_format_Init( &tk->fmt, VIDEO_ES, VLC_CODEC_H264 );
         }
         else if( (i_id&0xf0) == 0xe0 && i_type == 0x10 )
         {
-            es_format_Init( &tk->fmt, VIDEO_ES, VLC_FOURCC('m','p','4','v') );
+            es_format_Init( &tk->fmt, VIDEO_ES, VLC_CODEC_MP4V );
         }
         else if( (i_id&0xf0) == 0xe0 && i_type == 0x02 )
         {
-            es_format_Init( &tk->fmt, VIDEO_ES, VLC_FOURCC('m','p','g','v') );
+            es_format_Init( &tk->fmt, VIDEO_ES, VLC_CODEC_MPGV );
         }
         else if( ( i_id&0xe0 ) == 0xc0 && i_type == 0x0f )
         {
-            es_format_Init( &tk->fmt, AUDIO_ES, VLC_FOURCC('m','p','4','a') );
+            es_format_Init( &tk->fmt, AUDIO_ES, VLC_CODEC_MP4A );
         }
         else if( ( i_id&0xe0 ) == 0xc0 && i_type == 0x11 )
         {
-            es_format_Init( &tk->fmt, AUDIO_ES, VLC_FOURCC('m','p','4','a') );
+            es_format_Init( &tk->fmt, AUDIO_ES, VLC_CODEC_MP4A );
         }
         else if( ( i_id&0xe0 ) == 0xc0 && i_type == 0x03 )
         {
-            es_format_Init( &tk->fmt, AUDIO_ES, VLC_FOURCC('m','p','g','a') );
+            es_format_Init( &tk->fmt, AUDIO_ES, VLC_CODEC_MPGA );
         }
 
         if( tk->fmt.i_cat == UNKNOWN_ES && ( i_id&0xf0 ) == 0xe0 )
         {
-            es_format_Init( &tk->fmt, VIDEO_ES, VLC_FOURCC('m','p','g','v') );
+            es_format_Init( &tk->fmt, VIDEO_ES, VLC_CODEC_MPGV );
         }
         else if( tk->fmt.i_cat == UNKNOWN_ES && ( i_id&0xe0 ) == 0xc0 )
         {
-            es_format_Init( &tk->fmt, AUDIO_ES, VLC_FOURCC('m','p','g','a') );
+            es_format_Init( &tk->fmt, AUDIO_ES, VLC_CODEC_MPGA );
         }
         else if( tk->fmt.i_cat == UNKNOWN_ES ) return VLC_EGENERIC;
     }
index 68093d98df0e8ab65dd9887d1874c48d29ef2f02..d5ceafb6b9e1cb1e787231aace003026993154ef 100644 (file)
@@ -98,10 +98,10 @@ static int Open( vlc_object_t *p_this )
     p_demux->p_sys = p_sys = malloc( sizeof( demux_sys_t ) );
 
     /* Register one audio and one video stream */
-    es_format_Init( &fmt, AUDIO_ES, VLC_FOURCC( 'm', 'p', 'g', 'a' ) );
+    es_format_Init( &fmt, AUDIO_ES, VLC_CODEC_MPGA );
     p_sys->p_audio = es_out_Add( p_demux->out, &fmt );
 
-    es_format_Init( &fmt, VIDEO_ES, VLC_FOURCC( 'm', 'p', 'g', 'v' ) );
+    es_format_Init( &fmt, VIDEO_ES, VLC_CODEC_MPGV );
     p_sys->p_video = es_out_Add( p_demux->out, &fmt );
 
     p_sys->i_vc    = -1;
index 611be06aece1b9e0a638e3be4cf70c9617a1b105..527056d7daaeacd36c1d176d6928cf8087e587dd 100644 (file)
@@ -222,7 +222,7 @@ static int Open( vlc_object_t * p_this )
 
     p_sys->i_bitrate = 0;
 
-    es_format_Init( &p_sys->fmt_video, VIDEO_ES, VLC_FOURCC('d','v','s','d') );
+    es_format_Init( &p_sys->fmt_video, VIDEO_ES, VLC_CODEC_DV );
     p_sys->fmt_video.video.i_width = 720;
     p_sys->fmt_video.video.i_height= dv_header.dsf ? 576 : 480;;
 
@@ -239,9 +239,10 @@ static int Open( vlc_object_t * p_this )
     p_peek = p_peek_backup + 80*6+80*16*3 + 3; /* beginning of AAUX pack */
     if( *p_peek == 0x50 )
     {
-        es_format_Init( &p_sys->fmt_audio, AUDIO_ES,
-                        VLC_FOURCC('a','r','a','w') );
+        /* 12 bits non-linear will be converted to 16 bits linear */
+        es_format_Init( &p_sys->fmt_audio, AUDIO_ES, VLC_CODEC_S16L );
 
+        p_sys->fmt_audio.audio.i_bitspersample = 16;
         p_sys->fmt_audio.audio.i_channels = 2;
         switch( (p_peek[4] >> 3) & 0x07 )
         {
@@ -257,9 +258,6 @@ static int Open( vlc_object_t * p_this )
             break;
         }
 
-        /* 12 bits non-linear will be converted to 16 bits linear */
-        p_sys->fmt_audio.audio.i_bitspersample = 16;
-
         p_sys->p_es_audio = es_out_Add( p_demux->out, &p_sys->fmt_audio );
     }
 
index 22ded17b8e4ce979880fc7cdc50781fbc172f88c..8a127275a0c7a90d0e404e58458ed5a47e6f22a1 100644 (file)
@@ -113,12 +113,12 @@ struct preset_t
 
 static const struct preset_t p_presets[] =
 {
-    { "sqcif", 128, 96, 30000, 1001, 4,3, VLC_FOURCC('Y','V','1','2') },
-    { "qcif", 176, 144, 30000, 1001, 4,3, VLC_FOURCC('Y','V','1','2') },
-    { "cif", 352, 288, 30000, 1001, 4,3, VLC_FOURCC('Y','V','1','2') },
-    { "4cif", 704, 576, 30000, 1001, 4,3, VLC_FOURCC('Y','V','1','2') },
-    { "16cif", 1408, 1152, 30000, 1001, 4,3, VLC_FOURCC('Y','V','1','2') },
-    { "yuv", 176, 144, 25, 1, 4,3, VLC_FOURCC('Y','V','1','2') },
+    { "sqcif", 128, 96, 30000, 1001, 4,3, VLC_CODEC_YV12 },
+    { "qcif", 176, 144, 30000, 1001, 4,3, VLC_CODEC_YV12 },
+    { "cif", 352, 288, 30000, 1001, 4,3, VLC_CODEC_YV12 },
+    { "4cif", 704, 576, 30000, 1001, 4,3, VLC_CODEC_YV12 },
+    { "16cif", 1408, 1152, 30000, 1001, 4,3, VLC_CODEC_YV12 },
+    { "yuv", 176, 144, 25, 1, 4,3, VLC_CODEC_YV12 },
     { NULL, 0, 0, 0, 0, 0,0, 0 }
 };
 
@@ -238,12 +238,12 @@ static int Open( vlc_object_t * p_this )
         {
             static const struct { const char *psz_name; vlc_fourcc_t i_fcc; } formats[] =
             {
-                { "420jpeg",    VLC_FOURCC('I','4','2','0') },
-                { "420paldv",   VLC_FOURCC('I','4','2','0') },
-                { "420",        VLC_FOURCC('I','4','2','0') },
-                { "422",        VLC_FOURCC('I','4','2','2') },
-                { "444",        VLC_FOURCC('I','4','4','4') },
-                { "mono",       VLC_FOURCC('G','R','E','Y') },
+                { "420jpeg",    VLC_CODEC_I420 },
+                { "420paldv",   VLC_CODEC_I420 },
+                { "420",        VLC_CODEC_I420 },
+                { "422",        VLC_CODEC_I422 },
+                { "444",        VLC_CODEC_I444 },
+                { "mono",       VLC_CODEC_GREY },
                 { NULL, 0 }
             };
             bool b_found = false;
index ec02487eadd796098494b3cb21359f57386bad6e..2f8e93aaf9c7f3952a1ce7d0ebce68584d6a0858 100644 (file)
@@ -230,7 +230,7 @@ static int Open (vlc_object_t * p_this)
     }
 
     es_format_t  fmt;
-    es_format_Init (&fmt, AUDIO_ES, VLC_FOURCC('M', 'I', 'D', 'I'));
+    es_format_Init (&fmt, AUDIO_ES, VLC_CODEC_MIDI);
     fmt.audio.i_channels = 2;
     fmt.audio.i_original_channels = fmt.audio.i_physical_channels =
         AOUT_CHAN_LEFT | AOUT_CHAN_RIGHT;
index 426659c924f6b023e0dd6c970e6bd1781b05ab1f..4faaa9cdcc473b7f4fdfc113fc0ff102b5cca1de 100644 (file)
@@ -518,11 +518,11 @@ static int Open ( vlc_object_t *p_this )
              p_sys->i_type == SUB_TYPE_SSA2_4 ||
              p_sys->i_type == SUB_TYPE_ASS )
     {
-        es_format_Init( &fmt, SPU_ES, VLC_FOURCC( 's','s','a',' ' ) );
+        es_format_Init( &fmt, SPU_ES, VLC_CODEC_SSA );
     }
     else
     {
-        es_format_Init( &fmt, SPU_ES, VLC_FOURCC( 's','u','b','t' ) );
+        es_format_Init( &fmt, SPU_ES, VLC_CODEC_SUBT );
     }
     if( p_sys->psz_header != NULL )
     {
index 7a654f302a40d0d776bb6e26a1d90d730c73b768..4882206a3cbd53a7b2bd34a0416d339b745cfaf4 100644 (file)
@@ -252,11 +252,11 @@ static int Open ( vlc_object_t *p_this )
     /* *** add subtitle ES *** */
     if( p_detect->fmt->target == ASAI_TARGET_SSA )
     {
-        es_format_Init( &fmt, SPU_ES, VLC_FOURCC( 's','s','a',' ' ) );
+        es_format_Init( &fmt, SPU_ES, VLC_CODEC_SSA );
     }
     else
     {
-        es_format_Init( &fmt, SPU_ES, VLC_FOURCC( 's','u','b','t' ) );
+        es_format_Init( &fmt, SPU_ES, VLC_CODEC_SUBT );
     }
     p_sys->es = es_out_Add( p_demux->out, &fmt );
 
index 5493c47ef807cc5273564304f20bf608ab66cf60..18fe5e460bd3611ef3223a9ede6f26472f664a71 100644 (file)
@@ -1737,7 +1737,7 @@ static void ParsePES( demux_t *p_demux, ts_pid_t *pid )
     {
         i_skip += 1;
     }
-    else if( pid->es->fmt.i_codec == VLC_FOURCC( 's', 'u', 'b', 't' ) &&
+    else if( pid->es->fmt.i_codec == VLC_CODEC_SUBT &&
              pid->es->p_mpeg4desc )
     {
         decoder_config_descriptor_t *dcd = &pid->es->p_mpeg4desc->dec_descr;
@@ -1762,7 +1762,7 @@ static void ParsePES( demux_t *p_demux, ts_pid_t *pid )
         i_skip += 2;
     }
 #ifdef ZVBI_COMPILED
-    else if( pid->es->fmt.i_codec == VLC_FOURCC( 't', 'e', 'l', 'x' ) )
+    else if( pid->es->fmt.i_codec == VLC_CODEC_TELETEXT )
         i_skip = 0; /*hack for zvbi support */
 #endif
     /* skip header */
@@ -1804,7 +1804,7 @@ static void ParsePES( demux_t *p_demux, ts_pid_t *pid )
         p_pes->i_length = i_length * 100 / 9;
 
         p_block = block_ChainGather( p_pes );
-        if( pid->es->fmt.i_codec == VLC_FOURCC( 's', 'u', 'b', 't' ) )
+        if( pid->es->fmt.i_codec == VLC_CODEC_SUBT )
         {
             if( i_pes_size > 0 && p_block->i_buffer > i_pes_size )
             {
@@ -2048,38 +2048,38 @@ static int PIDFillFormat( ts_pid_t *pid, int i_stream_type )
     case 0x01:  /* MPEG-1 video */
     case 0x02:  /* MPEG-2 video */
     case 0x80:  /* MPEG-2 MOTO video */
-        es_format_Init( fmt, VIDEO_ES, VLC_FOURCC( 'm', 'p', 'g', 'v' ) );
+        es_format_Init( fmt, VIDEO_ES, VLC_CODEC_MPGV );
         break;
     case 0x03:  /* MPEG-1 audio */
     case 0x04:  /* MPEG-2 audio */
-        es_format_Init( fmt, AUDIO_ES, VLC_FOURCC( 'm', 'p', 'g', 'a' ) );
+        es_format_Init( fmt, AUDIO_ES, VLC_CODEC_MPGA );
         break;
     case 0x11:  /* MPEG4 (audio) */
     case 0x0f:  /* ISO/IEC 13818-7 Audio with ADTS transport syntax */
-        es_format_Init( fmt, AUDIO_ES, VLC_FOURCC( 'm', 'p', '4', 'a' ) );
+        es_format_Init( fmt, AUDIO_ES, VLC_CODEC_MP4A );
         break;
     case 0x10:  /* MPEG4 (video) */
-        es_format_Init( fmt, VIDEO_ES, VLC_FOURCC( 'm', 'p', '4', 'v' ) );
+        es_format_Init( fmt, VIDEO_ES, VLC_CODEC_MP4V );
         pid->es->b_gather = true;
         break;
     case 0x1B:  /* H264 <- check transport syntax/needed descriptor */
-        es_format_Init( fmt, VIDEO_ES, VLC_FOURCC( 'h', '2', '6', '4' ) );
+        es_format_Init( fmt, VIDEO_ES, VLC_CODEC_H264 );
         break;
 
     case 0x81:  /* A52 (audio) */
-        es_format_Init( fmt, AUDIO_ES, VLC_FOURCC( 'a', '5', '2', ' ' ) );
+        es_format_Init( fmt, AUDIO_ES, VLC_CODEC_A52 );
         break;
     case 0x82:  /* DVD_SPU (sub) */
-        es_format_Init( fmt, SPU_ES, VLC_FOURCC( 's', 'p', 'u', ' ' ) );
+        es_format_Init( fmt, SPU_ES, VLC_CODEC_SPU );
         break;
     case 0x83:  /* LPCM (audio) */
-        es_format_Init( fmt, AUDIO_ES, VLC_FOURCC( 'l', 'p', 'c', 'm' ) );
+        es_format_Init( fmt, AUDIO_ES, VLC_CODEC_DVD_LPCM );
         break;
     case 0x84:  /* SDDS (audio) */
-        es_format_Init( fmt, AUDIO_ES, VLC_FOURCC( 's', 'd', 'd', 's' ) );
+        es_format_Init( fmt, AUDIO_ES, VLC_CODEC_SDDS );
         break;
     case 0x85:  /* DTS (audio) */
-        es_format_Init( fmt, AUDIO_ES, VLC_FOURCC( 'd', 't', 's', ' ' ) );
+        es_format_Init( fmt, AUDIO_ES, VLC_CODEC_DTS );
         break;
 
     case 0x91:  /* A52 vls (audio) */
@@ -3103,14 +3103,14 @@ static void PMTSetupEsISO14496( demux_t *p_demux, ts_pid_t *pid,
         {
         case 0x0B: /* mpeg4 sub */
             p_fmt->i_cat = SPU_ES;
-            p_fmt->i_codec = VLC_FOURCC('s','u','b','t');
+            p_fmt->i_codec = VLC_CODEC_SUBT;
             break;
 
         case 0x20: /* mpeg4 */
-            p_fmt->i_codec = VLC_FOURCC('m','p','4','v');
+            p_fmt->i_codec = VLC_CODEC_MP4V;
             break;
         case 0x21: /* h264 */
-            p_fmt->i_codec = VLC_FOURCC('h','2','6','4');
+            p_fmt->i_codec = VLC_CODEC_H264;
             break;
         case 0x60:
         case 0x61:
@@ -3118,13 +3118,13 @@ static void PMTSetupEsISO14496( demux_t *p_demux, ts_pid_t *pid,
         case 0x63:
         case 0x64:
         case 0x65: /* mpeg2 */
-            p_fmt->i_codec = VLC_FOURCC( 'm','p','g','v' );
+            p_fmt->i_codec = VLC_CODEC_MPGV;
             break;
         case 0x6a: /* mpeg1 */
-            p_fmt->i_codec = VLC_FOURCC( 'm','p','g','v' );
+            p_fmt->i_codec = VLC_CODEC_MPGV;
             break;
         case 0x6c: /* mpeg1 */
-            p_fmt->i_codec = VLC_FOURCC( 'j','p','e','g' );
+            p_fmt->i_codec = VLC_CODEC_JPEG;
             break;
         default:
             p_fmt->i_cat = UNKNOWN_ES;
@@ -3137,18 +3137,18 @@ static void PMTSetupEsISO14496( demux_t *p_demux, ts_pid_t *pid,
         switch( dcd->i_objectTypeIndication )
         {
         case 0x40: /* mpeg4 */
-            p_fmt->i_codec = VLC_FOURCC('m','p','4','a');
+            p_fmt->i_codec = VLC_CODEC_MP4A;
             break;
         case 0x66:
         case 0x67:
         case 0x68: /* mpeg2 aac */
-            p_fmt->i_codec = VLC_FOURCC('m','p','4','a');
+            p_fmt->i_codec = VLC_CODEC_MP4A;
             break;
         case 0x69: /* mpeg2 */
-            p_fmt->i_codec = VLC_FOURCC('m','p','g','a');
+            p_fmt->i_codec = VLC_CODEC_MPGA;
             break;
         case 0x6b: /* mpeg1 */
-            p_fmt->i_codec = VLC_FOURCC('m','p','g','a');
+            p_fmt->i_codec = VLC_CODEC_MPGA;
             break;
         default:
             p_fmt->i_cat = UNKNOWN_ES;
@@ -3258,7 +3258,7 @@ static void PMTSetupEsTeletext( demux_t *p_demux, ts_pid_t *pid,
 #endif
 
     /* */
-    es_format_Init( p_fmt, SPU_ES, VLC_FOURCC( 't', 'e', 'l', 'x' ) );
+    es_format_Init( p_fmt, SPU_ES, VLC_CODEC_TELETEXT );
 
     /* In stream output mode, do not separate the stream by page */
     if( p_demux->out->b_sout || i_page <= 0 )
@@ -3337,7 +3337,7 @@ static void PMTSetupEsDvbSubtitle( demux_t *p_demux, ts_pid_t *pid,
 {
     es_format_t *p_fmt = &pid->es->fmt;
 
-    es_format_Init( p_fmt, SPU_ES, VLC_FOURCC( 'd', 'v', 'b', 's' ) );
+    es_format_Init( p_fmt, SPU_ES, VLC_CODEC_DVBS );
 
     dvbpsi_descriptor_t *p_dr = PMTEsFindDescriptor( p_es, 0x59 );
     int i_page = 0;
@@ -3442,13 +3442,13 @@ static void PMTSetupEs0x06( demux_t *p_demux, ts_pid_t *pid,
         PMTEsFindDescriptor( p_es, 0x81 ) )
     {
         p_fmt->i_cat = AUDIO_ES;
-        p_fmt->i_codec = VLC_FOURCC('a','5','2',' ');
+        p_fmt->i_codec = VLC_CODEC_A52;
     }
     else if( PMTEsFindDescriptor( p_es, 0x7a ) )
     {
         /* DVB with stream_type 0x06 (ETS EN 300 468) */
         p_fmt->i_cat = AUDIO_ES;
-        p_fmt->i_codec = VLC_FOURCC( 'e', 'a', 'c', '3' );
+        p_fmt->i_codec = VLC_CODEC_EAC3;
     }
     else if( PMTEsHasRegistration( p_demux, p_es, "DTS1" ) ||
              PMTEsHasRegistration( p_demux, p_es, "DTS2" ) ||
@@ -3457,7 +3457,7 @@ static void PMTSetupEs0x06( demux_t *p_demux, ts_pid_t *pid,
     {
         /*registration descriptor(ETSI TS 101 154 Annex F)*/
         p_fmt->i_cat = AUDIO_ES;
-        p_fmt->i_codec = VLC_FOURCC('d','t','s',' ');
+        p_fmt->i_codec = VLC_CODEC_DTS;
     }
     else if( PMTEsHasRegistration( p_demux, p_es, "BSSD" ) )
     {
@@ -3542,7 +3542,7 @@ static void PMTSetupEs0xEA( demux_t *p_demux, ts_pid_t *pid,
 
     /* registration descriptor for VC-1 (SMPTE rp227) */
     p_fmt->i_cat = VIDEO_ES;
-    p_fmt->i_codec = VLC_FOURCC('W','V','C','1');
+    p_fmt->i_codec = VLC_CODEC_VC1;
 
     /* XXX With Simple and Main profile the SEQUENCE
      * header is modified: video width and height are
@@ -3565,7 +3565,7 @@ static void PMTSetupEs0xD1( demux_t *p_demux, ts_pid_t *pid,
     /* registration descriptor for Dirac
      * (backwards compatable with VC-2 (SMPTE Sxxxx:2008)) */
     p_fmt->i_cat = VIDEO_ES;
-    p_fmt->i_codec = VLC_FOURCC('d','r','a','c');
+    p_fmt->i_codec = VLC_CODEC_DIRAC;
 }
 
 static void PMTSetupEs0xA0( demux_t *p_demux, ts_pid_t *pid,
@@ -3613,26 +3613,26 @@ static void PMTSetupEsHDMV( demux_t *p_demux, ts_pid_t *pid,
     {
     case 0x80:
         p_fmt->i_cat = AUDIO_ES;
-        p_fmt->i_codec = VLC_FOURCC( 'b', 'p', 'c', 'm' );
+        p_fmt->i_codec = VLC_CODEC_BD_LPCM;
         break;
     case 0x82:
     case 0x85: /* DTS-HD High resolution audio */
     case 0x86: /* DTS-HD Master audio */
     case 0xA2: /* Secondary DTS audio */
         p_fmt->i_cat = AUDIO_ES;
-        p_fmt->i_codec = VLC_FOURCC( 'd', 't', 's', ' ' );
+        p_fmt->i_codec = VLC_CODEC_DTS;
         break;
 
     case 0x83: /* TrueHD AC3 */
         p_fmt->i_cat = AUDIO_ES;
-        p_fmt->i_codec = VLC_FOURCC( 'm', 'l', 'p', ' ' );
+        p_fmt->i_codec = VLC_CODEC_MLP;
         break;
 
     case 0x84: /* E-AC3 */
     case 0x87: /* E-AC3 */
     case 0xA1: /* Secondary E-AC3 */
         p_fmt->i_cat = AUDIO_ES;
-        p_fmt->i_codec = VLC_FOURCC( 'e', 'a', 'c', '3' );
+        p_fmt->i_codec = VLC_CODEC_EAC3;
         break;
     case 0x90: /* Presentation graphics */
     case 0x91: /* Interactive graphics */
@@ -3934,8 +3934,8 @@ static void PMTCallBack( demux_t *p_demux, dvbpsi_pmt_t *p_pmt )
 
         if( pid->es->fmt.i_cat == AUDIO_ES ||
             ( pid->es->fmt.i_cat == SPU_ES &&
-              pid->es->fmt.i_codec != VLC_FOURCC('d','v','b','s') &&
-              pid->es->fmt.i_codec != VLC_FOURCC('t','e','l','x') ) )
+              pid->es->fmt.i_codec != VLC_CODEC_DVBS &&
+              pid->es->fmt.i_codec != VLC_CODEC_TELETEXT ) )
         {
             PMTParseEsIso639( p_demux, pid, p_es );
         }
index 0922f389536461e946cab0cebd810c71afec35dd..dd32597172f131954fe4e68064076998e77dd319 100644 (file)
@@ -117,7 +117,7 @@ static int Open( vlc_object_t * p_this )
     p_sys->pi_seektable = NULL;
 
     /* Read the metadata */
-    es_format_Init( &fmt, AUDIO_ES, VLC_FOURCC( 'T', 'T', 'A', '1' ) );
+    es_format_Init( &fmt, AUDIO_ES, VLC_CODEC_TTA );
     fmt.audio.i_channels = GetWLE( &p_header[6] );
     fmt.audio.i_bitspersample = GetWLE( &p_header[8] );
     fmt.audio.i_rate = GetDWLE( &p_header[10] );
index 63d8402dc994992a7ef839c9410f08091d3ea494..0c93a351e891dd84bbd3c1536174afa9372ce380 100644 (file)
@@ -352,15 +352,15 @@ static int Open(vlc_object_t *p_this)
 
     /* register the proper audio codec */
     if (p_sys->audio_type == TIVO_AUDIO_MPEG) {
-        es_format_Init( &fmt, AUDIO_ES, VLC_FOURCC( 'm', 'p', 'g', 'a' ) );
+        es_format_Init( &fmt, AUDIO_ES, VLC_CODEC_MPGA );
     } else {
-        es_format_Init( &fmt, AUDIO_ES, VLC_FOURCC( 'a', '5', '2', ' ' ) );
+        es_format_Init( &fmt, AUDIO_ES, VLC_CODEC_A52 );
     }
     fmt.i_group = TY_ES_GROUP;
     p_sys->p_audio = es_out_Add( p_demux->out, &fmt );
 
     /* register the video stream */
-    es_format_Init( &fmt, VIDEO_ES, VLC_FOURCC( 'm', 'p', 'g', 'v' ) );
+    es_format_Init( &fmt, VIDEO_ES, VLC_CODEC_MPGV );
     fmt.i_group = TY_ES_GROUP;
     p_sys->p_video = es_out_Add( p_demux->out, &fmt );
 
index 3b90e2da5be5a9784ca1782b901ebda3b9fbbe3c..a371b5e2be4e01cfea3e92b0f647569777f3e09c 100644 (file)
@@ -557,7 +557,7 @@ static int ParseVobSubIDX( demux_t *p_demux )
                 current_tk->i_track_id = i_track_id;
                 current_tk->i_delay = (int64_t)0;
 
-                es_format_Init( &fmt, SPU_ES, VLC_FOURCC( 's','p','u',' ' ) );
+                es_format_Init( &fmt, SPU_ES, VLC_CODEC_SPU );
                 fmt.subs.spu.i_original_frame_width = p_sys->i_original_frame_width;
                 fmt.subs.spu.i_original_frame_height = p_sys->i_original_frame_height;
                 fmt.psz_language = strdup( language );
index 13d86d1b28feb78de8bae83fa220bb5d273703fe..ccdb63a73fea173a6809101613c26de63b2c294f 100644 (file)
@@ -196,7 +196,7 @@ static int ReadBlockHeader( demux_t *p_demux )
                 return VLC_EGENERIC;
             }
 
-            new_fmt.i_codec = VLC_FOURCC('u','8',' ',' ');
+            new_fmt.i_codec = VLC_CODEC_U8;
             new_fmt.audio.i_rate = fix_voc_sr( 1000000L / (256L - buf[0]) );
             new_fmt.audio.i_bytes_per_frame = 1;
             new_fmt.audio.i_frame_length = 1;
@@ -221,7 +221,7 @@ static int ReadBlockHeader( demux_t *p_demux )
             i_block_size = 0;
             p_sys->i_silence_countdown = GetWLE( buf );
 
-            new_fmt.i_codec = VLC_FOURCC('u','8',' ',' ');
+            new_fmt.i_codec = VLC_CODEC_U8;
             new_fmt.audio.i_rate = fix_voc_sr( 1000000L / (256L - buf[0]) );
             new_fmt.audio.i_bytes_per_frame = 1;
             new_fmt.audio.i_frame_length = 1;
@@ -272,7 +272,7 @@ static int ReadBlockHeader( demux_t *p_demux )
                 return VLC_EGENERIC;
             }
 
-            new_fmt.i_codec = VLC_FOURCC('u','8',' ',' ');
+            new_fmt.i_codec = VLC_CODEC_U8;
             new_fmt.audio.i_channels = buf[3] + 1; /* can't be nul */
             new_fmt.audio.i_rate = 256000000L /
                           ((65536L - GetWLE(buf)) * new_fmt.audio.i_channels);
@@ -323,11 +323,11 @@ static int ReadBlockHeader( demux_t *p_demux )
                     switch( new_fmt.audio.i_bitspersample )
                     {
                         case 8:
-                            new_fmt.i_codec = VLC_FOURCC('u','8',' ',' ');
+                            new_fmt.i_codec = VLC_CODEC_U8;
                             break;
 
                         case 16:
-                            new_fmt.i_codec = VLC_FOURCC('u','1','6','l');
+                            new_fmt.i_codec = VLC_CODEC_U16L;
                             break;
 
                         default:
@@ -341,11 +341,11 @@ static int ReadBlockHeader( demux_t *p_demux )
                     switch( new_fmt.audio.i_bitspersample )
                     {
                         case 8:
-                            new_fmt.i_codec = VLC_FOURCC('s','8',' ',' ');
+                            new_fmt.i_codec = VLC_CODEC_S8;
                             break;
 
                         case 16:
-                            new_fmt.i_codec = VLC_FOURCC('s','1','6','l');
+                            new_fmt.i_codec = VLC_CODEC_S16L;
                             break;
 
                         default:
index ff5367a008fb44f0544c2034170914dbffffc9bf..9f4c832e012676d2dbd7cc0d0f61b6ffd0001357 100644 (file)
@@ -310,8 +310,8 @@ static int Open( vlc_object_t * p_this )
     case VLC_FOURCC( 'a', 'r', 'a', 'w' ):
     case VLC_FOURCC( 'a', 'f', 'l', 't' ):
     case VLC_FOURCC( 'u', 'l', 'a', 'w' ):
-    case VLC_FOURCC( 'a', 'l', 'a', 'w' ):
-    case VLC_FOURCC( 'm', 'l', 'a', 'w' ):
+    case VLC_CODEC_ALAW:
+    case VLC_CODEC_MULAW:
     case VLC_FOURCC( 'p', 'c', 'm', ' ' ):
         if( FrameInfo_PCM( &p_sys->i_frame_size, &p_sys->i_frame_samples,
                            &p_sys->fmt ) )
@@ -334,11 +334,11 @@ static int Open( vlc_object_t * p_this )
                                 &p_sys->fmt ) )
             goto error;
         break;
-    case VLC_FOURCC( 'm', 'p', 'g', 'a' ):
-    case VLC_FOURCC( 'a', '5', '2', ' ' ):
+    case VLC_CODEC_MPGA:
+    case VLC_CODEC_A52:
         /* FIXME set end of area FIXME */
         goto error;
-    case VLC_FOURCC( 'a', 'g', 's', 'm' ):
+    case VLC_CODEC_GSM_MS:
         if( FrameInfo_MSGSM( &p_sys->i_frame_size, &p_sys->i_frame_samples,
                              &p_sys->fmt ) )
             goto error;
index 1202ef04da6c340af136ae6f0eec33dcad6655e2..51cee519937eae44fd39bd4aa8b1db87aae56fba 100644 (file)
@@ -97,7 +97,7 @@ int OpenAudio ( vlc_object_t * p_this )
 #endif
     p_format->buffer_size = 8192;
 
-    p_aout->output.output.i_format = VLC_FOURCC('f','l','3','2');
+    p_aout->output.output.i_format = VLC_CODEC_FL32;
     p_aout->output.i_nb_samples = 2048 / i_nb_channels;
     p_aout->output.pf_play = DoNothing;
 
index 4f874d31aeb0d77abeac6af209c3a8acfcd1135a..aaffae5e8d4e08baf150a709e624699a7102eb53 100644 (file)
@@ -45,11 +45,11 @@ typedef struct colorcombo
 
 colorcombo colspace[]=
 {
-    {B_YCbCr420, "B_YCbCr420", VLC_FOURCC('I','4','2','0'), 3, 2},
+    {B_YCbCr420, "B_YCbCr420", VLC_CODEC_I420, 3, 2},
     {B_YUV422,   "B_YUV422",   VLC_FOURCC('Y','4','2','2'), 3, 2},
-    {B_YCbCr422, "B_YCbCr422", VLC_FOURCC('Y','U','Y','2'), 3, 2},
-    {B_RGB32,    "B_RGB32",    VLC_FOURCC('R','V','3','2'), 1, 4},
-    {B_RGB16,    "B_RGB16",    VLC_FOURCC('R','V','1','6'), 1, 2}
+    {B_YCbCr422, "B_YCbCr422", VLC_CODEC_YUYV, 3, 2},
+    {B_RGB32,    "B_RGB32",    VLC_CODEC_RGB32, 1, 4},
+    {B_RGB16,    "B_RGB16",    VLC_CODEC_RGB16, 1, 2}
 };
 
 #define COLOR_COUNT 5
index 47ae92dca5d4e3064bfd9f625f727b8135155a77..739137939b232bf68f3717d5a9bb0ed82585da6a 100644 (file)
@@ -537,10 +537,10 @@ static int OpenBlending( intf_thread_t *p_intf )
             p_intf->p_sys->fmt_out.i_chroma;
     if( config_GetInt( p_intf, "freetype-yuvp" ) )
         p_intf->p_sys->p_blend->fmt_in.video.i_chroma =
-                VLC_FOURCC('Y','U','V','P');
+                VLC_CODEC_YUVP;
     else
         p_intf->p_sys->p_blend->fmt_in.video.i_chroma =
-                VLC_FOURCC('Y','U','V','A');
+                VLC_CODEC_YUVA;
 
     p_intf->p_sys->p_blend->p_module =
         module_need( p_intf->p_sys->p_blend, "video blending", NULL, false );
@@ -628,7 +628,7 @@ static picture_t *AllocatePicture( video_format_t *p_fmt )
         return NULL;
 
     if( !p_fmt->p_palette &&
-        ( p_fmt->i_chroma == VLC_FOURCC('Y','U','V','P') ) )
+        ( p_fmt->i_chroma == VLC_CODEC_YUVP ) )
     {
         p_fmt->p_palette = malloc( sizeof(video_palette_t) );
         if( !p_fmt->p_palette )
@@ -737,13 +737,13 @@ static int InvertAlpha( intf_thread_t *p_intf, picture_t **p_pic, video_format_t
 
     switch( fmt.i_chroma )
     {
-        case VLC_FOURCC('R','V','2','4'):
+        case VLC_CODEC_RGB24:
             p_begin = (uint8_t *)(*p_pic)->p[Y_PLANE].p_pixels;
             p_end   = (uint8_t *)(*p_pic)->p[Y_PLANE].p_pixels +
                       ( fmt.i_height * (*p_pic)->p[Y_PLANE].i_pitch );
             i_skip = 3;
             break;
-        case VLC_FOURCC('R','V','3','2'):
+        case VLC_CODEC_RGB32:
             p_begin = (uint8_t *)(*p_pic)->p[Y_PLANE].p_pixels;
             p_end   = (uint8_t *)(*p_pic)->p[Y_PLANE].p_pixels +
                       ( fmt.i_height * (*p_pic)->p[Y_PLANE].i_pitch );
@@ -845,7 +845,7 @@ static picture_t *RenderText( intf_thread_t *p_intf, const char *psz_string,
         video_format_t fmt;
 
         memset( &fmt, 0, sizeof(fmt) );
-        fmt.i_chroma = VLC_FOURCC('T','E','X','T');
+        fmt.i_chroma = VLC_CODEC_TEXT;
         fmt.i_aspect = 0;
         fmt.i_width  = fmt.i_visible_width = 0;
         fmt.i_height = fmt.i_visible_height = 0;
@@ -960,15 +960,15 @@ static int Init( intf_thread_t *p_intf )
     switch( p_sys->var_info.bits_per_pixel )
     {
     case 8: /* FIXME: set the palette */
-        p_sys->fmt_out.i_chroma = VLC_FOURCC('R','G','B','2'); break;
+        p_sys->fmt_out.i_chroma = VLC_CODEC_RGB8; break;
     case 15:
-        p_sys->fmt_out.i_chroma = VLC_FOURCC('R','V','1','5'); break;
+        p_sys->fmt_out.i_chroma = VLC_CODEC_RGB15; break;
     case 16:
-        p_sys->fmt_out.i_chroma = VLC_FOURCC('R','V','1','6'); break;
+        p_sys->fmt_out.i_chroma = VLC_CODEC_RGB16; break;
     case 24:
-        p_sys->fmt_out.i_chroma = VLC_FOURCC('R','V','2','4'); break;
+        p_sys->fmt_out.i_chroma = VLC_CODEC_RGB24; break;
     case 32:
-        p_sys->fmt_out.i_chroma = VLC_FOURCC('R','V','3','2'); break;
+        p_sys->fmt_out.i_chroma = VLC_CODEC_RGB32; break;
     default:
         msg_Err( p_intf, "unknown screen depth %i",
                  p_sys->var_info.bits_per_pixel );
index f0f8297cb727deb236e0f2dfd9897805b4016e31..12fa0cc55505d2d8f2633701de2ea30cc47cec97 100644 (file)
@@ -270,7 +270,7 @@ static void* QNXaoutThread( vlc_object_t *p_this )
         int i_tmp, i_size;
         uint8_t * p_bytes;
 
-        if ( p_aout->output.output.i_format != VLC_FOURCC('s','p','d','i') )
+        if ( p_aout->output.output.i_format != VLC_CODEC_SPDIFL )
         {
             mtime_t next_date = 0;
 
index f5a01cb72d24ca38d276bc6b0734cffd67556d36..ef775d1c285a8c9792beb78672a3365804994b0c 100644 (file)
@@ -592,13 +592,13 @@ static int QNXInitDisplay( vout_thread_t * p_vout )
     switch( p_vout->p_sys->i_screen_depth )
     {
         case 8:
-            p_vout->output.i_chroma = VLC_FOURCC('R','G','B','2');
+            p_vout->output.i_chroma = VLC_CODEC_RGB8;
             p_vout->p_sys->i_bytes_per_pixel = 1;
             p_vout->output.pf_setpalette = SetPalette;
             break;
 
         case 15:
-            p_vout->output.i_chroma = VLC_FOURCC('R','V','1','5');
+            p_vout->output.i_chroma = VLC_CODEC_RGB15;
             p_vout->p_sys->i_bytes_per_pixel = 2;
             p_vout->output.i_rmask = 0x7c00;
             p_vout->output.i_gmask = 0x03e0;
@@ -606,7 +606,7 @@ static int QNXInitDisplay( vout_thread_t * p_vout )
             break;
 
         case 16:
-            p_vout->output.i_chroma = VLC_FOURCC('R','V','1','6');
+            p_vout->output.i_chroma = VLC_CODEC_RGB16;
             p_vout->p_sys->i_bytes_per_pixel = 2;
             p_vout->output.i_rmask = 0xf800;
             p_vout->output.i_gmask = 0x07e0;
@@ -614,7 +614,7 @@ static int QNXInitDisplay( vout_thread_t * p_vout )
             break;
 
         case 24:
-            p_vout->output.i_chroma = VLC_FOURCC('R','V','2','4');
+            p_vout->output.i_chroma = VLC_CODEC_RGB24;
             p_vout->p_sys->i_bytes_per_pixel = 3;
             p_vout->output.i_rmask = 0xff0000;
             p_vout->output.i_gmask = 0x00ff00;
@@ -623,7 +623,7 @@ static int QNXInitDisplay( vout_thread_t * p_vout )
 
         case 32:
         default:
-            p_vout->output.i_chroma = VLC_FOURCC('R','V','3','2');
+            p_vout->output.i_chroma = VLC_CODEC_RGB32;
             p_vout->p_sys->i_bytes_per_pixel = 4;
             p_vout->output.i_rmask = 0xff0000;
             p_vout->output.i_gmask = 0x00ff00;
@@ -819,7 +819,7 @@ static int NewPicture( vout_thread_t *p_vout, picture_t *p_pic, int index )
         switch (p_vout->p_sys->i_vc_format)
         {
             case Pg_VIDEO_FORMAT_YUV420:
-                p_vout->output.i_chroma = VLC_FOURCC('I','4','2','0');
+                p_vout->output.i_chroma = VLC_CODEC_I420;
 
                 p_pic->p_sys->p_buf[U_PLANE] = PdGetOffscreenContextPtr( p_pic->p_sys->p_ctx[U_PLANE] );
                 p_pic->p_sys->p_buf[V_PLANE] = PdGetOffscreenContextPtr( p_pic->p_sys->p_ctx[V_PLANE] );
@@ -856,7 +856,7 @@ static int NewPicture( vout_thread_t *p_vout, picture_t *p_pic, int index )
                 break;
 
             case Pg_VIDEO_FORMAT_YV12:
-                p_vout->output.i_chroma = VLC_FOURCC('Y','V','1','2');
+                p_vout->output.i_chroma = VLC_CODEC_YV12;
 
                 p_pic->p_sys->p_buf[U_PLANE] = PdGetOffscreenContextPtr( p_pic->p_sys->p_ctx[U_PLANE] );
                 p_pic->p_sys->p_buf[V_PLANE] = PdGetOffscreenContextPtr( p_pic->p_sys->p_ctx[V_PLANE] );
@@ -896,11 +896,11 @@ static int NewPicture( vout_thread_t *p_vout, picture_t *p_pic, int index )
             case Pg_VIDEO_FORMAT_YUY2:
                 if (p_vout->p_sys->i_vc_format == Pg_VIDEO_FORMAT_UYVY)
                 {
-                    p_vout->output.i_chroma = VLC_FOURCC('U','Y','V','Y');
+                    p_vout->output.i_chroma = VLC_CODEC_UYVY;
                 }
                 else
                 {
-                    p_vout->output.i_chroma = VLC_FOURCC('Y','U','Y','2');
+                    p_vout->output.i_chroma = VLC_CODEC_YUYV;
                 }
 
                 p_pic->p->p_pixels = p_pic->p_sys->p_buf[Y_PLANE];
@@ -914,7 +914,7 @@ static int NewPicture( vout_thread_t *p_vout, picture_t *p_pic, int index )
                 break;
 
             case Pg_VIDEO_FORMAT_RGB555:
-                p_vout->output.i_chroma = VLC_FOURCC('R','V','1','5');
+                p_vout->output.i_chroma = VLC_CODEC_RGB15;
                 p_vout->output.i_rmask = 0x001f;
                 p_vout->output.i_gmask = 0x03e0;
                 p_vout->output.i_bmask = 0x7c00;
@@ -930,7 +930,7 @@ static int NewPicture( vout_thread_t *p_vout, picture_t *p_pic, int index )
                 break;
 
             case Pg_VIDEO_FORMAT_RGB565:
-                p_vout->output.i_chroma = VLC_FOURCC('R','V','1','6');
+                p_vout->output.i_chroma = VLC_CODEC_RGB16;
                 p_vout->output.i_rmask = 0x001f;
                 p_vout->output.i_gmask = 0x07e0;
                 p_vout->output.i_bmask = 0xf800;
@@ -946,7 +946,7 @@ static int NewPicture( vout_thread_t *p_vout, picture_t *p_pic, int index )
                 break;
 
             case Pg_VIDEO_FORMAT_RGB8888:
-                p_vout->output.i_chroma = VLC_FOURCC('R','V','3','2');
+                p_vout->output.i_chroma = VLC_CODEC_RGB32;
                 p_vout->output.i_rmask = 0x000000ff;
                 p_vout->output.i_gmask = 0x0000ff00;
                 p_vout->output.i_bmask = 0x00ff0000;
@@ -966,7 +966,7 @@ static int NewPicture( vout_thread_t *p_vout, picture_t *p_pic, int index )
     switch( p_vout->output.i_chroma )
     {
 #ifdef MODULE_NAME_IS_xvideo
-        case VLC_FOURCC('Y','2','1','1'):
+        case VLC_CODEC_Y211:
 
             p_pic->p->p_pixels = p_pic->p_sys->p_image->data
                                   + p_pic->p_sys->p_image->offsets[0];
index 1724b49844ff19b00cf25b3ee242c09c8c86dd68..5ab377d5cd6522e52a34cd9e167a9812cd3d43fb 100644 (file)
@@ -39,7 +39,7 @@ FileBitmap::FileBitmap( intf_thread_t *pIntf, image_handler_t *pImageHandler,
     video_format_t fmt_in = {0}, fmt_out = {0};
     picture_t *pPic;
 
-    fmt_out.i_chroma = VLC_FOURCC('R','G','B','A');
+    fmt_out.i_chroma = VLC_CODEC_RGBA;
 
     pPic = image_ReadUrl( pImageHandler, fileName.c_str(), &fmt_in, &fmt_out );
     if( !pPic ) return;
index a5b62d37b14ca377cde1e30c50a041de5a41b45f..e648a335d2fb41d85e63789d882227f277b4ebc8 100644 (file)
@@ -52,7 +52,7 @@ int OpenAudio ( vlc_object_t * p_this )
     p_aout->output.pf_play = Play;
     aout_VolumeSoftInit( p_aout );
 
-    if ( p_aout->output.output.i_format == VLC_FOURCC('s','p','d','i') )
+    if ( p_aout->output.output.i_format == VLC_CODEC_SPDIFL )
     {
         p_aout->output.i_nb_samples = A52_FRAME_NB;
         p_aout->output.output.i_bytes_per_frame = AOUT_SPDIF_SIZE;
index 0b4cdbb481968df2e71d4a81845dd575176e7a5b..5d5e7aced5e7cb66f0a1bfe510122b1cbc7198b9 100644 (file)
@@ -93,8 +93,9 @@ static int Init( vout_thread_t *p_vout )
     {
         if( strlen( psz_chroma ) >= 4 )
         {
-            i_chroma = VLC_FOURCC( psz_chroma[0], psz_chroma[1],
-                                   psz_chroma[2], psz_chroma[3] );
+            i_chroma = vlc_fourcc_GetCodec( VIDEO_ES,
+                                            VLC_FOURCC( psz_chroma[0], psz_chroma[1],
+                                                        psz_chroma[2], psz_chroma[3] ) );
             b_chroma = 1;
         }
 
@@ -109,7 +110,7 @@ static int Init( vout_thread_t *p_vout )
         msg_Dbg( p_vout, "forcing chroma 0x%.8x (%4.4s)",
                          i_chroma, (char*)&i_chroma );
         p_vout->output.i_chroma = i_chroma;
-        if ( i_chroma == VLC_FOURCC( 'R', 'G', 'B', '2' ) )
+        if ( i_chroma == VLC_CODEC_RGB8 )
         {
             p_vout->output.pf_setpalette = SetPalette;
         }
index 7e458663d77eb3f342480ac2cdc31684f5a88afe..11d7bb8c5d7c4f5e303b17268d6ee0c6fc01ea58 100644 (file)
@@ -655,7 +655,7 @@ static int Render( filter_t *p_filter, subpicture_region_t *p_region,
 
     /* Create a new subpicture region */
     memset( &fmt, 0, sizeof(video_format_t) );
-    fmt.i_chroma = VLC_FOURCC('Y','U','V','P');
+    fmt.i_chroma = VLC_CODEC_YUVP;
     fmt.i_aspect = 0;
     fmt.i_width = fmt.i_visible_width = i_width + 4;
     fmt.i_height = fmt.i_visible_height = i_height + 4;
@@ -921,7 +921,7 @@ static int RenderYUVA( filter_t *p_filter, subpicture_region_t *p_region,
 
     /* Create a new subpicture region */
     memset( &fmt, 0, sizeof(video_format_t) );
-    fmt.i_chroma = VLC_FOURCC('Y','U','V','A');
+    fmt.i_chroma = VLC_CODEC_YUVA;
     fmt.i_aspect = 0;
     fmt.i_width = fmt.i_visible_width = i_width + 6;
     fmt.i_height = fmt.i_visible_height = i_height + 6;
index f5d8704f050253abf496438ab47844fee79f7bc8..f7b95d3ac8976305ef23a98d15e483e716b17587 100644 (file)
@@ -199,7 +199,7 @@ osd_state_t *osd_StateNew( osd_menu_t *p_menu, const char *psz_file,
     memset( &fmt_in, 0, sizeof(video_format_t) );
     memset( &fmt_out, 0, sizeof(video_format_t) );
 
-    fmt_out.i_chroma = VLC_FOURCC('Y','U','V','A');
+    fmt_out.i_chroma = VLC_CODEC_YUVA;
     if( p_menu->p_image )
     {
         p_state->p_pic = image_ReadUrl( p_menu->p_image, psz_file,
index a19c2a3cfd1df8829067bed9277187d67c2dcba1..b3b92445c749cd934e66708d9aff9a3caa518417 100644 (file)
@@ -838,7 +838,7 @@ static int RenderYUVA( filter_t *p_filter, subpicture_region_t *p_region, UniCha
 
     // Create a new subpicture region
     memset( &fmt, 0, sizeof(video_format_t) );
-    fmt.i_chroma = VLC_FOURCC('Y','U','V','A');
+    fmt.i_chroma = VLC_CODEC_YUVA;
     fmt.i_aspect = 0;
     fmt.i_width = fmt.i_visible_width = i_width;
     fmt.i_height = fmt.i_visible_height = i_textblock_height + VERTICAL_MARGIN * 2;
index 0dd3e93cce5d6a9088d12ef3919af803bc276790..9e7f97fb988631cbc56a9953574a58156418fd52 100644 (file)
@@ -517,7 +517,7 @@ static int MediaAddES( vod_t *p_vod, vod_media_t *p_media, es_format_t *p_fmt )
 
     switch( p_fmt->i_codec )
     {
-        case VLC_FOURCC( 's', '1', '6', 'b' ):
+        case VLC_CODEC_S16B:
             if( p_fmt->audio.i_channels == 1 && p_fmt->audio.i_rate == 44100 )
             {
                 p_es->i_payload_type = 11;
@@ -535,31 +535,31 @@ static int MediaAddES( vod_t *p_vod, vod_media_t *p_media, es_format_t *p_fmt )
                           p_fmt->audio.i_channels ) == -1 )
                 p_es->psz_rtpmap = NULL;
             break;
-        case VLC_FOURCC( 'u', '8', ' ', ' ' ):
+        case VLC_CODEC_U8:
             p_es->i_payload_type = p_media->i_payload_type++;
             if( asprintf( &p_es->psz_rtpmap, "L8/%d/%d", p_fmt->audio.i_rate,
                           p_fmt->audio.i_channels ) == -1 )
                 p_es->psz_rtpmap = NULL;
             break;
-        case VLC_FOURCC( 'm', 'p', 'g', 'a' ):
+        case VLC_CODEC_MPGA:
         case VLC_FOURCC( 'm', 'p', '3', ' ' ):
             p_es->i_payload_type = 14;
             p_es->psz_rtpmap = strdup( "MPA/90000" );
             break;
-        case VLC_FOURCC( 'm', 'p', 'g', 'v' ):
+        case VLC_CODEC_MPGV:
             p_es->i_payload_type = 32;
             p_es->psz_rtpmap = strdup( "MPV/90000" );
             break;
-        case VLC_FOURCC( 'a', '5', '2', ' ' ):
+        case VLC_CODEC_A52:
             p_es->i_payload_type = p_media->i_payload_type++;
             if( asprintf( &p_es->psz_rtpmap, "ac3/%d", p_fmt->audio.i_rate ) == -1 )
                 p_es->psz_rtpmap = NULL;
             break;
-        case VLC_FOURCC( 'H', '2', '6', '3' ):
+        case VLC_CODEC_H263:
             p_es->i_payload_type = p_media->i_payload_type++;
             p_es->psz_rtpmap = strdup( "H263-1998/90000" );
             break;
-        case VLC_FOURCC( 'h', '2', '6', '4' ):
+        case VLC_CODEC_H264:
             p_es->i_payload_type = p_media->i_payload_type++;
             p_es->psz_rtpmap = strdup( "H264/90000" );
             p_es->psz_fmtp = NULL;
@@ -625,7 +625,7 @@ static int MediaAddES( vod_t *p_vod, vod_media_t *p_media, es_format_t *p_fmt )
             if( !p_es->psz_fmtp )
                 p_es->psz_fmtp = strdup( "packetization-mode=1" );
             break;
-        case VLC_FOURCC( 'm', 'p', '4', 'v' ):
+        case VLC_CODEC_MP4V:
             p_es->i_payload_type = p_media->i_payload_type++;
             p_es->psz_rtpmap = strdup( "MP4V-ES/90000" );
             if( p_fmt->i_extra > 0 )
@@ -638,7 +638,7 @@ static int MediaAddES( vod_t *p_vod, vod_media_t *p_media, es_format_t *p_fmt )
                 free( p_hexa );
             }
             break;
-        case VLC_FOURCC( 'm', 'p', '4', 'a' ):
+        case VLC_CODEC_MP4A:
             p_es->i_payload_type = p_media->i_payload_type++;
             if( asprintf( &p_es->psz_rtpmap, "mpeg4-generic/%d", p_fmt->audio.i_rate ) == -1 )
                 p_es->psz_rtpmap = NULL;
@@ -664,13 +664,13 @@ static int MediaAddES( vod_t *p_vod, vod_media_t *p_media, es_format_t *p_fmt )
             p_es->i_payload_type = p_media->i_payload_type++;
             p_es->psz_rtpmap = strdup( "MP2P/90000" );
             break;
-        case VLC_FOURCC( 's', 'a', 'm', 'r' ):
+        case VLC_CODEC_AMR_NB:
             p_es->i_payload_type = p_media->i_payload_type++;
             p_es->psz_rtpmap = strdup( p_fmt->audio.i_channels == 2 ?
                                     "AMR/8000/2" : "AMR/8000" );
             p_es->psz_fmtp = strdup( "octet-align=1" );
             break;
-        case VLC_FOURCC( 's', 'a', 'w', 'b' ):
+        case VLC_CODEC_AMR_WB:
             p_es->i_payload_type = p_media->i_payload_type++;
             p_es->psz_rtpmap = strdup( p_fmt->audio.i_channels == 2 ?
                                     "AMR-WB/16000/2" : "AMR-WB/16000" );
index a765e3dd8a715929fb9e2b6b03a830e3ad054ebe..a9236f50f3ea8d37a8015cc9ee059dc5e02cbbf1 100644 (file)
@@ -109,7 +109,7 @@ static int Init( vout_thread_t *p_vout )
         msg_Dbg( p_vout, "forcing chroma 0x%.8x (%4.4s)",
                          i_chroma, (char*)&i_chroma );
         p_vout->output.i_chroma = i_chroma;
-        if ( i_chroma == VLC_FOURCC( 'R', 'G', 'B', '2' ) )
+        if ( i_chroma == VLC_CODEC_RGB8 )
         {
             p_vout->output.pf_setpalette = SetPalette;
         }
index 28e1b77b89139201253d238b6d5c3f732a37cd44..c6cf3d140c97f60e2bf40cbe3a73a4baba2af1c2 100644 (file)
@@ -277,7 +277,7 @@ static int Render( filter_t *p_filter, subpicture_region_t *p_region,
 
     /* Create a new subpicture region */
     memset( &fmt, 0, sizeof( video_format_t ) );
-    fmt.i_chroma = VLC_FOURCC( 'Y','U','V','A' );
+    fmt.i_chroma = VLC_CODEC_YUVA;
     fmt.i_aspect = VOUT_ASPECT_FACTOR;
     fmt.i_width = fmt.i_visible_width = i_width;
     fmt.i_height = fmt.i_visible_height = i_height;
@@ -481,7 +481,7 @@ static int RenderText( filter_t *p_filter, subpicture_region_t *p_region_out,
     }
     p_svg->i_width = p_sys->i_width;
     p_svg->i_height = p_sys->i_height;
-    p_svg->i_chroma = VLC_FOURCC( 'Y','U','V','A' );
+    p_svg->i_chroma = VLC_CODEC_YUVA;
 
     /* Render the SVG.
        The input data is stored in the p_string structure,
index 4475a7aef6fba816d81be2f6e262fa79f7dac500..b48f856645126b52ca93c5b059d973b36633d14a 100644 (file)
@@ -221,7 +221,7 @@ static int Render( filter_t *p_filter, subpicture_region_t *p_region,
 
     /* Create a new subpicture region */
     memset( &fmt, 0, sizeof(video_format_t) );
-    fmt.i_chroma = VLC_FOURCC('Y','U','V','P');
+    fmt.i_chroma = VLC_CODEC_YUVP;
     fmt.i_width = fmt.i_visible_width = i_width + (b_outline ? 4 : 0);
     fmt.i_height = fmt.i_visible_height = i_height + (b_outline ? 4 : 0);
     fmt.i_x_offset = fmt.i_y_offset = 0;
index 661e406c1458573ddf76391330bc42ae84de52ba..11461d5d36e2292e02fcfec7dabcdd4c4e1a1d0c 100644 (file)
@@ -103,26 +103,26 @@ static int Open( vlc_object_t *p_this )
         case VLC_FOURCC( 'D', 'X', '5', '0'):
         case VLC_FOURCC( 0x04, 0,   0,   0):
         case VLC_FOURCC( '3', 'I', 'V', '2'):
-            p_dec->fmt_out.i_codec = VLC_FOURCC( 'm', 'p', '4', 'v');
+            p_dec->fmt_out.i_codec = VLC_CODEC_MP4V;
             break;
 
         case VLC_FOURCC( 'm', 'p', 'g', '1' ):
         case VLC_FOURCC( 'm', 'p', 'g', '2' ):
-        case VLC_FOURCC( 'm', 'p', '1', 'v' ):
-        case VLC_FOURCC( 'm', 'p', '2', 'v' ):
-            p_dec->fmt_out.i_codec = VLC_FOURCC( 'm', 'p', 'g', 'v' );
+        case VLC_CODEC_MP1V:
+        case VLC_CODEC_MP2V:
+            p_dec->fmt_out.i_codec = VLC_CODEC_MPGV;
             break;
 
         case VLC_FOURCC( 'd', 'i', 'v', '1' ):
         case VLC_FOURCC( 'M', 'P', 'G', '4' ):
         case VLC_FOURCC( 'm', 'p', 'g', '4' ):
-            p_dec->fmt_out.i_codec = VLC_FOURCC( 'D', 'I', 'V', '1' );
+            p_dec->fmt_out.i_codec = VLC_CODEC_DIV1;
             break;
 
         case VLC_FOURCC( 'd', 'i', 'v', '2' ):
         case VLC_FOURCC( 'M', 'P', '4', '2' ):
         case VLC_FOURCC( 'm', 'p', '4', '2' ):
-            p_dec->fmt_out.i_codec = VLC_FOURCC( 'D', 'I', 'V', '2' );
+            p_dec->fmt_out.i_codec = VLC_CODEC_DIV2;
             break;
 
         case VLC_FOURCC( 'd', 'i', 'v', '3' ):
@@ -137,25 +137,25 @@ static int Open( vlc_object_t *p_this )
         case VLC_FOURCC( 'm', 'p', 'g', '3' ):
         case VLC_FOURCC( 'M', 'P', 'G', '3' ):
         case VLC_FOURCC( 'A', 'P', '4', '1' ):
-            p_dec->fmt_out.i_codec = VLC_FOURCC( 'D', 'I', 'V', '3' );
+            p_dec->fmt_out.i_codec = VLC_CODEC_DIV3;
             break;
 
-        case VLC_FOURCC( 'h', '2', '6', '3' ):
+        case VLC_CODEC_H263:
         case VLC_FOURCC( 'U', '2', '6', '3' ):
         case VLC_FOURCC( 'u', '2', '6', '3' ):
             p_dec->fmt_out.i_codec = VLC_FOURCC( 'H', '2', '6', '3' );
             break;
 
         case VLC_FOURCC( 'i', '2', '6', '3' ):
-            p_dec->fmt_out.i_codec = VLC_FOURCC( 'I', '2', '6', '3' );
+            p_dec->fmt_out.i_codec = VLC_CODEC_H263I;
             break;
 
         case VLC_FOURCC( 'm', 'j', 'p', 'g' ):
         case VLC_FOURCC( 'm', 'j', 'p', 'a' ):
-        case VLC_FOURCC( 'j', 'p', 'e', 'g' ):
+        case VLC_CODEC_JPEG:
         case VLC_FOURCC( 'J', 'P', 'E', 'G' ):
         case VLC_FOURCC( 'J', 'F', 'I', 'F' ):
-            p_dec->fmt_out.i_codec = VLC_FOURCC( 'M', 'J', 'P', 'G' );
+            p_dec->fmt_out.i_codec = VLC_CODEC_MJPG;
             break;
 
         case VLC_FOURCC( 'd', 'v', 's', 'd' ):
@@ -169,16 +169,16 @@ static int Open( vlc_object_t *p_this )
             switch( ( p_dec->fmt_in.audio.i_bitspersample + 7 ) / 8 )
             {
                 case 1:
-                    p_dec->fmt_out.i_codec = VLC_FOURCC('u','8',' ',' ');
+                    p_dec->fmt_out.i_codec = VLC_CODEC_U8;
                     break;
                 case 2:
-                    p_dec->fmt_out.i_codec = VLC_FOURCC('s','1','6','l');
+                    p_dec->fmt_out.i_codec = VLC_CODEC_S16L;
                     break;
                 case 3:
-                    p_dec->fmt_out.i_codec = VLC_FOURCC('s','2','4','l');
+                    p_dec->fmt_out.i_codec = VLC_CODEC_S24L;
                     break;
                 case 4:
-                    p_dec->fmt_out.i_codec = VLC_FOURCC('s','3','2','l');
+                    p_dec->fmt_out.i_codec = VLC_CODEC_S32L;
                     break;
                 default:
                     msg_Err( p_dec, "unknown raw audio sample size" );
@@ -190,16 +190,16 @@ static int Open( vlc_object_t *p_this )
             switch( ( p_dec->fmt_in.audio.i_bitspersample + 7 ) / 8 )
             {
                 case 1:
-                    p_dec->fmt_out.i_codec = VLC_FOURCC('s','8',' ',' ');
+                    p_dec->fmt_out.i_codec = VLC_CODEC_S8;
                     break;
                 case 2:
-                    p_dec->fmt_out.i_codec = VLC_FOURCC('s','1','6','b');
+                    p_dec->fmt_out.i_codec = VLC_CODEC_S16B;
                     break;
                 case 3:
-                    p_dec->fmt_out.i_codec = VLC_FOURCC('s','2','4','b');
+                    p_dec->fmt_out.i_codec = VLC_CODEC_S24B;
                     break;
                 case 4:
-                    p_dec->fmt_out.i_codec = VLC_FOURCC('s','3','2','b');
+                    p_dec->fmt_out.i_codec = VLC_CODEC_S32B;
                     break;
                 default:
                     msg_Err( p_dec, "unknown raw audio sample size" );
@@ -211,16 +211,16 @@ static int Open( vlc_object_t *p_this )
             switch( ( p_dec->fmt_in.audio.i_bitspersample + 7 ) / 8 )
             {
                 case 1:
-                    p_dec->fmt_out.i_codec = VLC_FOURCC('s','8',' ',' ');
+                    p_dec->fmt_out.i_codec = VLC_CODEC_S8;
                     break;
                 case 2:
-                    p_dec->fmt_out.i_codec = VLC_FOURCC('s','1','6','l');
+                    p_dec->fmt_out.i_codec = VLC_CODEC_S16L;
                     break;
                 case 3:
-                    p_dec->fmt_out.i_codec = VLC_FOURCC('s','2','4','l');
+                    p_dec->fmt_out.i_codec = VLC_CODEC_S24L;
                     break;
                 case 4:
-                    p_dec->fmt_out.i_codec = VLC_FOURCC('s','3','2','l');
+                    p_dec->fmt_out.i_codec = VLC_CODEC_S32L;
                     break;
                 default:
                     msg_Err( p_dec, "unknown raw audio sample size" );
index 75f9ce5796c3c6fc74f12cbc2066dc93b31dcc0b..39c48185a60dbddfd43e1fd153157a44e95687a3 100644 (file)
@@ -1349,7 +1349,7 @@ static int Open( vlc_object_t *p_this )
     decoder_t     *p_dec = (decoder_t*)p_this;
     decoder_sys_t *p_sys;
 
-    if( p_dec->fmt_in.i_codec !=  VLC_FOURCC( 'd','r','a','c' ) )
+    if( p_dec->fmt_in.i_codec !=  VLC_CODEC_DIRAC )
         return VLC_EGENERIC;
 
     p_dec->pf_packetize = Packetize;
index 534ee7bcbe6f58954dea56a0eba722a09b851456..bc942fafa23a9b17250968d5d3828f0ab7230718 100644 (file)
@@ -183,7 +183,7 @@ static int Open( vlc_object_t *p_this )
     decoder_sys_t *p_sys;
     int i;
 
-    if( p_dec->fmt_in.i_codec != VLC_FOURCC( 'h', '2', '6', '4') &&
+    if( p_dec->fmt_in.i_codec != VLC_CODEC_H264 &&
         p_dec->fmt_in.i_codec != VLC_FOURCC( 'H', '2', '6', '4') &&
         p_dec->fmt_in.i_codec != VLC_FOURCC( 'V', 'S', 'S', 'H') &&
         p_dec->fmt_in.i_codec != VLC_FOURCC( 'v', 's', 's', 'h') &&
@@ -233,7 +233,7 @@ static int Open( vlc_object_t *p_this )
 
     /* Setup properties */
     es_format_Copy( &p_dec->fmt_out, &p_dec->fmt_in );
-    p_dec->fmt_out.i_codec = VLC_FOURCC( 'h', '2', '6', '4' );
+    p_dec->fmt_out.i_codec = VLC_CODEC_H264;
 
     if( p_dec->fmt_in.i_codec == VLC_FOURCC( 'a', 'v', 'c', '1' ) )
     {
index 5722c0cb4e68a8a3018e6e63fa9ff04ae727c67e..09abbcb7575af0eacb6fa528afc72044cc9a6a4a 100644 (file)
@@ -120,7 +120,7 @@ static int Open( vlc_object_t *p_this )
     decoder_t *p_dec = (decoder_t*)p_this;
     decoder_sys_t *p_sys;
 
-    if( p_dec->fmt_in.i_codec != VLC_FOURCC('m','l','p',' ') )
+    if( p_dec->fmt_in.i_codec != VLC_CODEC_MLP )
         return VLC_EGENERIC;
 
     /* */
@@ -137,7 +137,7 @@ static int Open( vlc_object_t *p_this )
 
     /* Set output properties */
     p_dec->fmt_out.i_cat = AUDIO_ES;
-    p_dec->fmt_out.i_codec = VLC_FOURCC('m','l','p',' ');
+    p_dec->fmt_out.i_codec = VLC_CODEC_MLP;
     p_dec->fmt_out.audio.i_rate = 0;
 
     /* Set callback */
index e0f99d4012b03c44022dc109dc1c67d58988f02c..222678f140924250fefe058220919b79e45dfff9 100644 (file)
@@ -193,7 +193,7 @@ static int OpenPacketizer( vlc_object_t *p_this )
     decoder_t *p_dec = (decoder_t*)p_this;
     decoder_sys_t *p_sys;
 
-    if( p_dec->fmt_in.i_codec != VLC_FOURCC( 'm', 'p', '4', 'a' ) )
+    if( p_dec->fmt_in.i_codec != VLC_CODEC_MP4A )
     {
         return VLC_EGENERIC;
     }
@@ -211,7 +211,7 @@ static int OpenPacketizer( vlc_object_t *p_this )
 
     /* Set output properties */
     p_dec->fmt_out.i_cat = AUDIO_ES;
-    p_dec->fmt_out.i_codec = VLC_FOURCC('m','p','4','a');
+    p_dec->fmt_out.i_codec = VLC_CODEC_MP4A;
 
     msg_Dbg( p_dec, "running MPEG4 audio packetizer" );
 
index 018846c9980fa832596aa52e34284dd8bcbbe2ed..3a0965be17fd8de565b3dcec117ba51a443b4f8c 100644 (file)
@@ -137,7 +137,7 @@ static int Open( vlc_object_t *p_this )
         case VLC_FOURCC( 'M', '4', 'S', '2'):
         case VLC_FOURCC( 'm', 'p', '4', 's'):
         case VLC_FOURCC( 'M', 'P', '4', 'S'):
-        case VLC_FOURCC( 'm', 'p', '4', 'v'):
+        case VLC_CODEC_MP4V:
         case VLC_FOURCC( 'M', 'P', '4', 'V'):
         case VLC_FOURCC( 'D', 'I', 'V', 'X'):
         case VLC_FOURCC( 'd', 'i', 'v', 'x'):
@@ -172,7 +172,7 @@ static int Open( vlc_object_t *p_this )
 
     /* Setup properties */
     es_format_Copy( &p_dec->fmt_out, &p_dec->fmt_in );
-    p_dec->fmt_out.i_codec = VLC_FOURCC( 'm', 'p', '4', 'v' );
+    p_dec->fmt_out.i_codec = VLC_CODEC_MP4V;
 
     if( p_dec->fmt_in.i_extra )
     {
index a3a4020cfb57a89edda885b03f58bb6ec3e218d3..ac0c823ef4aac8c44f77569991026febfed84948 100644 (file)
@@ -155,12 +155,12 @@ static int Open( vlc_object_t *p_this )
 
     if( p_dec->fmt_in.i_codec != VLC_FOURCC( 'm', 'p', 'g', '1' ) &&
         p_dec->fmt_in.i_codec != VLC_FOURCC( 'm', 'p', 'g', '2' ) &&
-        p_dec->fmt_in.i_codec != VLC_FOURCC( 'm', 'p', 'g', 'v' ) )
+        p_dec->fmt_in.i_codec != VLC_CODEC_MPGV )
     {
         return VLC_EGENERIC;
     }
 
-    es_format_Init( &p_dec->fmt_out, VIDEO_ES, VLC_FOURCC('m','p','g','v') );
+    es_format_Init( &p_dec->fmt_out, VIDEO_ES, VLC_CODEC_MPGV );
     p_dec->pf_packetize = Packetize;
     p_dec->pf_get_cc = GetCc;
 
index c422f7a3dc73fed98bbb6f0b4e78bd5648496f03..83c7f500822ecb072d0f41aa5aa7efe52cc9da28 100644 (file)
@@ -130,7 +130,7 @@ static int Open( vlc_object_t *p_this )
     decoder_t     *p_dec = (decoder_t*)p_this;
     decoder_sys_t *p_sys;
 
-    if( p_dec->fmt_in.i_codec !=  VLC_FOURCC( 'W', 'V', 'C', '1' ) )
+    if( p_dec->fmt_in.i_codec !=  VLC_CODEC_VC1 )
         return VLC_EGENERIC;
 
     p_dec->pf_packetize = Packetize;
index 99e150c99fa7b1e37bf38d110d5be09789f8ebf6..5d382f6612e54f9e6fe1d59223333e38de7c3912 100644 (file)
@@ -78,15 +78,13 @@ static int Activate( vlc_object_t *p_this )
 
     switch( p_filter->fmt_in.video.i_chroma )
     {
-        case VLC_FOURCC('Y','8','0','0'):
-            p_filter->fmt_in.video.i_chroma = VLC_FOURCC('G','R','E','Y');
-        case VLC_FOURCC('G','R','E','Y'):
+        case VLC_CODEC_GREY:
             switch( p_filter->fmt_out.video.i_chroma )
             {
-                case VLC_FOURCC('I','4','2','0'):
+                case VLC_CODEC_I420:
                     p_filter->pf_video_filter = GREY_I420_Filter;
                     break;
-                case VLC_FOURCC('Y','U','Y','2'):
+                case VLC_CODEC_YUYV:
                     p_filter->pf_video_filter = GREY_YUY2_Filter;
                     break;
                 default:
index 1d56f9d5f1ce8e44ec03bd7dfbe6a8a7014b5e72..f39f806b4080bf3b8fe7c92be738c6e8f18a2650 100644 (file)
@@ -107,18 +107,17 @@ static int Activate( vlc_object_t *p_this )
 
     switch( p_filter->fmt_in.video.i_chroma )
     {
-        case VLC_FOURCC('Y','V','1','2'):
-        case VLC_FOURCC('I','4','2','0'):
-        case VLC_FOURCC('I','Y','U','V'):
+        case VLC_CODEC_YV12:
+        case VLC_CODEC_I420:
             switch( p_filter->fmt_out.video.i_chroma )
             {
 #if defined (MODULE_NAME_IS_i420_rgb)
-                case VLC_FOURCC('R','G','B','2'):
+                case VLC_CODEC_RGB8:
                     p_filter->pf_video_filter = I420_RGB8_Filter;
                     break;
 #endif
-                case VLC_FOURCC('R','V','1','5'):
-                case VLC_FOURCC('R','V','1','6'):
+                case VLC_CODEC_RGB15:
+                case VLC_CODEC_RGB16:
 #if ! defined (MODULE_NAME_IS_i420_rgb)
                     /* If we don't have support for the bitmasks, bail out */
                     if( ( p_filter->fmt_out.video.i_rmask == 0x7c00
@@ -147,10 +146,10 @@ static int Activate( vlc_object_t *p_this )
 
 #if 0
                 /* Hmmm, is there only X11 using 32bits per pixel for RV24 ? */
-                case VLC_FOURCC('R','V','2','4'):
+                case VLC_CODEC_RGB24:
 #endif
 
-                case VLC_FOURCC('R','V','3','2'):
+                case VLC_CODEC_RGB32:
 #if ! defined (MODULE_NAME_IS_i420_rgb)
                     /* If we don't have support for the bitmasks, bail out */
                     if( p_filter->fmt_out.video.i_rmask == 0x00ff0000
@@ -211,18 +210,18 @@ static int Activate( vlc_object_t *p_this )
     switch( p_filter->fmt_out.video.i_chroma )
     {
 #if defined (MODULE_NAME_IS_i420_rgb)
-        case VLC_FOURCC('R','G','B','2'):
+        case VLC_CODEC_RGB8:
             p_filter->p_sys->p_buffer = malloc( VOUT_MAX_WIDTH );
             break;
 #endif
 
-        case VLC_FOURCC('R','V','1','5'):
-        case VLC_FOURCC('R','V','1','6'):
+        case VLC_CODEC_RGB15:
+        case VLC_CODEC_RGB16:
             p_filter->p_sys->p_buffer = malloc( VOUT_MAX_WIDTH * 2 );
             break;
 
-        case VLC_FOURCC('R','V','2','4'):
-        case VLC_FOURCC('R','V','3','2'):
+        case VLC_CODEC_RGB24:
+        case VLC_CODEC_RGB32:
             p_filter->p_sys->p_buffer = malloc( VOUT_MAX_WIDTH * 4 );
             break;
 
@@ -239,7 +238,7 @@ static int Activate( vlc_object_t *p_this )
 
     p_filter->p_sys->p_offset = malloc( p_filter->fmt_out.video.i_width
                     * ( ( p_filter->fmt_out.video.i_chroma
-                           == VLC_FOURCC('R','G','B','2') ) ? 2 : 1 )
+                           == VLC_CODEC_RGB8 ) ? 2 : 1 )
                     * sizeof( int ) );
     if( p_filter->p_sys->p_offset == NULL )
     {
@@ -251,11 +250,11 @@ static int Activate( vlc_object_t *p_this )
 #if defined (MODULE_NAME_IS_i420_rgb)
     switch( p_filter->fmt_out.video.i_chroma )
     {
-    case VLC_FOURCC('R','G','B','2'):
+    case VLC_CODEC_RGB8:
         i_tables_size = sizeof( uint8_t ) * PALETTE_TABLE_SIZE;
         break;
-    case VLC_FOURCC('R','V','1','5'):
-    case VLC_FOURCC('R','V','1','6'):
+    case VLC_CODEC_RGB15:
+    case VLC_CODEC_RGB16:
         i_tables_size = sizeof( uint16_t ) * RGB_TABLE_SIZE;
         break;
     default: /* RV24, RV32 */
@@ -348,13 +347,13 @@ static void SetYUV( filter_t *p_filter )
     /* Color: build red, green and blue tables */
     switch( p_filter->fmt_out.video.i_chroma )
     {
-    case VLC_FOURCC('R','G','B','2'):
+    case VLC_CODEC_RGB8:
         p_filter->p_sys->p_rgb8 = (uint8_t *)p_filter->p_sys->p_base;
         Set8bppPalette( p_filter, p_filter->p_sys->p_rgb8 );
         break;
 
-    case VLC_FOURCC('R','V','1','5'):
-    case VLC_FOURCC('R','V','1','6'):
+    case VLC_CODEC_RGB15:
+    case VLC_CODEC_RGB16:
         p_filter->p_sys->p_rgb16 = (uint16_t *)p_filter->p_sys->p_base;
         for( i_index = 0; i_index < RED_MARGIN; i_index++ )
         {
@@ -379,8 +378,8 @@ static void SetYUV( filter_t *p_filter )
         }
         break;
 
-    case VLC_FOURCC('R','V','2','4'):
-    case VLC_FOURCC('R','V','3','2'):
+    case VLC_CODEC_RGB24:
+    case VLC_CODEC_RGB32:
         p_filter->p_sys->p_rgb32 = (uint32_t *)p_filter->p_sys->p_base;
         for( i_index = 0; i_index < RED_MARGIN; i_index++ )
         {
index 6e0f77c8a102be984216bd5ce28b9884b66f10f5..ac5b412ed3811ea373dd31026fbadc4cd64fe2a3 100644 (file)
@@ -82,12 +82,11 @@ static int Activate( vlc_object_t *p_this )
 
     switch( p_filter->fmt_in.video.i_chroma )
     {
-        case VLC_FOURCC('Y','V','1','2'):
-        case VLC_FOURCC('I','4','2','0'):
-        case VLC_FOURCC('I','Y','U','V'):
+        case VLC_CODEC_YV12:
+        case VLC_CODEC_I420:
             switch( p_filter->fmt_out.video.i_chroma )
             {
-                case VLC_FOURCC('Y','M','G','A'):
+                case VLC_CODEC_YMGA:
                     p_filter->pf_video_filter = I420_YMGA_Filter;
                     break;
 
index 15f5ac2fee6d469c27339e27e161b761f1ba043c..ff9f62d30e0257a6165ebd27aa3409421fcc0fd7 100644 (file)
@@ -126,23 +126,19 @@ static int Activate( vlc_object_t *p_this )
 
     switch( p_filter->fmt_in.video.i_chroma )
     {
-        case VLC_FOURCC('Y','V','1','2'):
-        case VLC_FOURCC('I','4','2','0'):
-        case VLC_FOURCC('I','Y','U','V'):
+        case VLC_CODEC_YV12:
+        case VLC_CODEC_I420:
             switch( p_filter->fmt_out.video.i_chroma )
             {
-                case VLC_FOURCC('Y','U','Y','2'):
-                case VLC_FOURCC('Y','U','N','V'):
+                case VLC_CODEC_YUYV:
                     p_filter->pf_video_filter = I420_YUY2_Filter;
                     break;
 
-                case VLC_FOURCC('Y','V','Y','U'):
+                case VLC_CODEC_YVYU:
                     p_filter->pf_video_filter = I420_YVYU_Filter;
                     break;
 
-                case VLC_FOURCC('U','Y','V','Y'):
-                case VLC_FOURCC('U','Y','N','V'):
-                case VLC_FOURCC('Y','4','2','2'):
+                case VLC_CODEC_UYVY:
                     p_filter->pf_video_filter = I420_UYVY_Filter;
                     break;
 #if !defined (MODULE_NAME_IS_i420_yuy2_altivec)
@@ -150,13 +146,13 @@ static int Activate( vlc_object_t *p_this )
                     p_filter->pf_video_filter = I420_IUYV_Filter;
                     break;
 
-                case VLC_FOURCC('c','y','u','v'):
+                case VLC_CODEC_CYUV:
                     p_filter->pf_video_filter = I420_cyuv_Filter;
                     break;
 #endif
 
 #if defined (MODULE_NAME_IS_i420_yuy2)
-                case VLC_FOURCC('Y','2','1','1'):
+                case VLC_CODEC_Y211:
                     p_filter->pf_video_filter = I420_Y211_Filter;
                     break;
 #endif
index 7cb40e3b90ade7db445468696c89cc151869a197..a3efe77aea408741d00cfa4bcf09b3b5c32fc48c 100644 (file)
@@ -80,21 +80,20 @@ static int Activate( vlc_object_t *p_this )
 
     switch( p_filter->fmt_in.video.i_chroma )
     {
-        case VLC_FOURCC('I','4','2','2'):
-        case VLC_FOURCC('J','4','2','2'):
+        case VLC_CODEC_I422:
+        case VLC_CODEC_J422:
             switch( p_filter->fmt_out.video.i_chroma )
             {
-                case VLC_FOURCC('I','4','2','0'):
-                case VLC_FOURCC('I','Y','U','V'):
-                case VLC_FOURCC('J','4','2','0'):
+                case VLC_CODEC_I420:
+                case VLC_CODEC_J420:
                     p_filter->pf_video_filter = I422_I420_Filter;
                     break;
 
-                case VLC_FOURCC('Y','V','1','2'):
+                case VLC_CODEC_YV12:
                     p_filter->pf_video_filter = I422_YV12_Filter;
                     break;
 
-                case VLC_FOURCC('Y','U','V','A'):
+                case VLC_CODEC_YUVA:
                     p_filter->pf_video_filter = I422_YUVA_Filter;
                     break;
 
index 53dd4fd20089be3f7f9d1ba2fc4779af3acfb963..931a1f222bc10250df230cefaabb0c2146c6eb34 100644 (file)
@@ -100,34 +100,30 @@ static int Activate( vlc_object_t *p_this )
 
     switch( p_filter->fmt_in.video.i_chroma )
     {
-        case VLC_FOURCC('I','4','2','2'):
+        case VLC_CODEC_I422:
             switch( p_filter->fmt_out.video.i_chroma )
             {
-                case VLC_FOURCC('Y','U','Y','2'):
-                case VLC_FOURCC('Y','U','N','V'):
+                case VLC_CODEC_YUYV:
                     p_filter->pf_video_filter = I422_YUY2_Filter;
                     break;
 
-                case VLC_FOURCC('Y','V','Y','U'):
+                case VLC_CODEC_YVYU:
                     p_filter->pf_video_filter = I422_YVYU_Filter;
                     break;
 
-                case VLC_FOURCC('U','Y','V','Y'):
-                case VLC_FOURCC('U','Y','N','V'):
-                case VLC_FOURCC('Y','4','2','2'):
+                case VLC_CODEC_UYVY:
                     p_filter->pf_video_filter = I422_UYVY_Filter;
                     break;
 
-                case VLC_FOURCC('I','U','Y','V'):
                     p_filter->pf_video_filter = I422_IUYV_Filter;
                     break;
 
-                case VLC_FOURCC('c','y','u','v'):
+                case VLC_CODEC_CYUV:
                     p_filter->pf_video_filter = I422_cyuv_Filter;
                     break;
 
 #if defined (MODULE_NAME_IS_i422_yuy2)
-                case VLC_FOURCC('Y','2','1','1'):
+                case VLC_CODEC_Y211:
                     p_filter->pf_video_filter = I422_Y211_Filter;
                     break;
 #endif
index 3f3e8822cedfb54cc1ca7cc5e6a97ee21981089a..36919482ea2b2a2e1f88e330cdb21f097b22ec53 100644 (file)
@@ -82,25 +82,22 @@ static int Activate( vlc_object_t *p_this )
 
     switch( p_filter->fmt_out.video.i_chroma )
     {
-        case VLC_FOURCC('I','4','2','0'):
+        case VLC_CODEC_I420:
             switch( p_filter->fmt_in.video.i_chroma )
             {
-                case VLC_FOURCC('Y','U','Y','2'):
-                case VLC_FOURCC('Y','U','N','V'):
+                case VLC_CODEC_YUYV:
                     p_filter->pf_video_filter = YUY2_I420_Filter;
                     break;
 
-                case VLC_FOURCC('Y','V','Y','U'):
+                case VLC_CODEC_YVYU:
                     p_filter->pf_video_filter = YVYU_I420_Filter;
                     break;
 
-                case VLC_FOURCC('U','Y','V','Y'):
-                case VLC_FOURCC('U','Y','N','V'):
-                case VLC_FOURCC('Y','4','2','2'):
+                case VLC_CODEC_UYVY:
                     p_filter->pf_video_filter = UYVY_I420_Filter;
                     break;
 
-                case VLC_FOURCC('c','y','u','v'):
+                case VLC_CODEC_CYUV:
                     p_filter->pf_video_filter = cyuv_I420_Filter;
                     break;
 
index 03d47fd54168608c77965a26eb8e96c1bbe341df..c9128eb260d75cbd205980c6c1a8b813b9256f99 100644 (file)
@@ -81,25 +81,22 @@ static int Activate( vlc_object_t *p_this )
 
     switch( p_filter->fmt_out.video.i_chroma )
     {
-        case VLC_FOURCC('I','4','2','2'):
+        case VLC_CODEC_I422:
             switch( p_filter->fmt_in.video.i_chroma )
             {
-                case VLC_FOURCC('Y','U','Y','2'):
-                case VLC_FOURCC('Y','U','N','V'):
+                case VLC_CODEC_YUYV:
                     p_filter->pf_video_filter = YUY2_I422_Filter;
                     break;
 
-                case VLC_FOURCC('Y','V','Y','U'):
+                case VLC_CODEC_YVYU:
                     p_filter->pf_video_filter = YVYU_I422_Filter;
                     break;
 
-                case VLC_FOURCC('U','Y','V','Y'):
-                case VLC_FOURCC('U','Y','N','V'):
-                case VLC_FOURCC('Y','4','2','2'):
+                case VLC_CODEC_UYVY:
                     p_filter->pf_video_filter = UYVY_I422_Filter;
                     break;
 
-                case VLC_FOURCC('c','y','u','v'):
+                case VLC_CODEC_CYUV:
                     p_filter->pf_video_filter = cyuv_I422_Filter;
                     break;
 
index 79999cda566a7e21210623cdc16d1e1af07a9987..7b8806dfecfd6bfa6b96ab0fa10d4d77f092c054 100644 (file)
@@ -90,7 +90,7 @@ static int Create( vlc_object_t *p_this )
     filter_sys_t *p_sys;
     char *psz_string;
 
-    if( p_filter->fmt_in.video.i_chroma != VLC_FOURCC('Y','U','V','A') )
+    if( p_filter->fmt_in.video.i_chroma != VLC_CODEC_YUVA )
     {
         msg_Err( p_filter,
                  "Unsupported input chroma \"%4s\". "
@@ -178,7 +178,7 @@ static void LoadMask( filter_t *p_filter, const char *psz_filename )
     video_format_t fmt_in, fmt_out;
     memset( &fmt_in, 0, sizeof( video_format_t ) );
     memset( &fmt_out, 0, sizeof( video_format_t ) );
-    fmt_out.i_chroma = VLC_FOURCC('Y','U','V','A');
+    fmt_out.i_chroma = VLC_CODEC_YUVA;
     if( p_filter->p_sys->p_mask )
         picture_Release( p_filter->p_sys->p_mask );
     p_image = image_HandlerCreate( p_filter );
index 2e78693a616aadcc9dc6a879569ab2a46f25f8d2..5c07f2ed5f0c08c38c40c51fbd142563c20e43fa 100644 (file)
@@ -1192,11 +1192,8 @@ static void Atmo_SetupParameters(filter_t *p_filter)
 
     switch( p_filter->fmt_in.video.i_chroma )
     {
-    case VLC_FOURCC('I','4','2','0'):
-    case VLC_FOURCC('I','Y','U','V'):
-    case VLC_FOURCC('Y','V','1','2'):
-    case VLC_FOURCC('Y','V','1','6'):
-    case VLC_FOURCC('Y','V','U','9'):
+    case VLC_CODEC_I420:
+    case VLC_CODEC_YV12:
         // simple enough? Dionoea?
         p_sys->pf_extract_mini_image = ExtractMiniImage_YUV;
         break;
index 08fe36f55bb99f5890e2e2d2a9497f8d7d1f9223..d3a86392bc0f5b2e06d0fc2ca18cbecdbb2ca276 100644 (file)
@@ -56,19 +56,19 @@ struct filter_sys_t
     int i_dummy;
 };
 
-#define FCC_YUVA VLC_FOURCC('Y','U','V','A')
-#define FCC_YUVP VLC_FOURCC('Y','U','V','P')
-#define FCC_RGBA VLC_FOURCC('R','G','B','A')
-
-#define FCC_I420 VLC_FOURCC('I','4','2','0')
-#define FCC_YV12 VLC_FOURCC('Y','V','1','2')
-#define FCC_YUY2 VLC_FOURCC('Y','U','Y','2')
-#define FCC_UYVY VLC_FOURCC('U','Y','V','Y')
-#define FCC_YVYU VLC_FOURCC('Y','V','Y','U')
-#define FCC_RV15 VLC_FOURCC('R','V','1','5')
-#define FCC_RV16 VLC_FOURCC('R','V','1','6')
-#define FCC_RV24 VLC_FOURCC('R','V','2','4')
-#define FCC_RV32 VLC_FOURCC('R','V','3','2')
+#define FCC_YUVA VLC_CODEC_YUVA
+#define FCC_YUVP VLC_CODEC_YUVP
+#define FCC_RGBA VLC_CODEC_RGBA
+
+#define FCC_I420 VLC_CODEC_I420
+#define FCC_YV12 VLC_CODEC_YV12
+#define FCC_YUY2 VLC_CODEC_YUYV
+#define FCC_UYVY VLC_CODEC_UYVY
+#define FCC_YVYU VLC_CODEC_YVYU
+#define FCC_RV15 VLC_CODEC_RGB15
+#define FCC_RV16 VLC_CODEC_RGB16
+#define FCC_RV24 VLC_CODEC_RGB24
+#define FCC_RV32 VLC_CODEC_RGB32
 
 /****************************************************************************
  * Local prototypes
index e2b4442007db9e03a20a077019272dff3f3f11cd..0316013a1a9bb39c86a015a0ad9385410021d8d7 100644 (file)
@@ -112,7 +112,7 @@ static int Create( vlc_object_t *p_this )
     filter_t *p_filter = (filter_t *)p_this;
     filter_sys_t *p_sys;
 
-    if( p_filter->fmt_in.video.i_chroma != VLC_FOURCC('Y','U','V','A') )
+    if( p_filter->fmt_in.video.i_chroma != VLC_CODEC_YUVA )
     {
         msg_Err( p_filter,
                  "Unsupported input chroma \"%4s\". "
@@ -174,7 +174,7 @@ static picture_t *Filter( filter_t *p_filter, picture_t *p_pic )
     uint8_t *p_v = p_pic->p[ V_PLANE ].p_pixels;
     uint8_t umin, umax, vmin, vmax;
 
-    if( p_pic->format.i_chroma != VLC_FOURCC('Y','U','V','A') )
+    if( p_pic->format.i_chroma != VLC_CODEC_YUVA )
     {
         msg_Err( p_filter,
                  "Unsupported input chroma \"%4s\". "
index d56f67e5e85e77b9d9cb03b9e423e11bb6d6b984..fa8650b2e0f3b05f61fa632a62827444a9f5d29c 100644 (file)
@@ -60,10 +60,10 @@ static void EsFormatMergeSize( es_format_t *p_dst,
                                const es_format_t *p_size );
 
 static const vlc_fourcc_t pi_allowed_chromas[] = {
-    VLC_FOURCC('I','4','2','0'),
-    VLC_FOURCC('I','4','2','2'),
-    VLC_FOURCC('R','V','3','2'),
-    VLC_FOURCC('R','V','2','4'),
+    VLC_CODEC_I420,
+    VLC_CODEC_I422,
+    VLC_CODEC_RGB32,
+    VLC_CODEC_RGB24,
     0
 };
 
index 355b0292f8cebb5b3ac441c389efe23e14616664..e27a77121a288a4ccff52d7152abd1c5c4834e2b 100644 (file)
@@ -554,15 +554,13 @@ static bool NonBlackLine(uint8_t *p_in, int i_line, int i_pitch,
     switch(i_chroma)
     {
     // planar YUV
-        case VLC_FOURCC('I','4','4','4'):
-        case VLC_FOURCC('I','4','2','2'):
-        case VLC_FOURCC('I','4','2','0'):
-        case VLC_FOURCC('Y','V','1','2'):
-        case VLC_FOURCC('I','Y','U','V'):
-        case VLC_FOURCC('I','4','1','1'):
-        case VLC_FOURCC('I','4','1','0'):
-        case VLC_FOURCC('Y','V','U','9'):
-        case VLC_FOURCC('Y','U','V','A'):
+        case VLC_CODEC_I444:
+        case VLC_CODEC_I422:
+        case VLC_CODEC_I420:
+        case VLC_CODEC_YV12:
+        case VLC_CODEC_I411:
+        case VLC_CODEC_I410:
+        case VLC_CODEC_YUVA:
             i_skipCount = (i_pitch * i_skipCountPercent) / 100;
             for (i_index = i_col/2 + i_skipCount/2;
                  i_index <= i_visible_pitch/2 + i_col/2 - i_skipCount/2;
@@ -573,7 +571,7 @@ static bool NonBlackLine(uint8_t *p_in, int i_line, int i_pitch,
             }
             break;
     // packed RGB
-        case VLC_FOURCC('R','G','B','2'):    // packed by 1
+        case VLC_CODEC_RGB8:    // packed by 1
             i_skipCount = (i_pitch * i_skipCountPercent) / 100;
             for (i_index = i_col/2 + i_skipCount/2;
                  i_index <= i_visible_pitch/2 + i_col/2 - i_skipCount/2;
@@ -583,8 +581,8 @@ static bool NonBlackLine(uint8_t *p_in, int i_line, int i_pitch,
             if (i_count > i_nonBlackPixel) break;
             }
             break;
-        case VLC_FOURCC('R','V','1','5'):    // packed by 2
-        case VLC_FOURCC('R','V','1','6'):    // packed by 2
+        case VLC_CODEC_RGB15:    // packed by 2
+        case VLC_CODEC_RGB16:    // packed by 2
             i_skipCount = (i_pitch * i_skipCountPercent) / 100;
             for (i_index = i_col/2 + i_skipCount/2 -
                                 (i_col/2 + i_skipCount/2) % 2;
@@ -596,7 +594,7 @@ static bool NonBlackLine(uint8_t *p_in, int i_line, int i_pitch,
             if (i_count > i_nonBlackPixel) break;
             }
             break;
-        case VLC_FOURCC('R','V','2','4'):    // packed by 3
+        case VLC_CODEC_RGB24:    // packed by 3
             i_skipCount = (i_pitch * i_skipCountPercent) / 100;
             for (i_index = i_col/2 + i_skipCount/2 - (i_col/2 + i_skipCount/2) % 3; i_index <= i_visible_pitch/2 + i_col/2 - i_skipCount/2; i_index+=3)
             {
@@ -606,7 +604,7 @@ static bool NonBlackLine(uint8_t *p_in, int i_line, int i_pitch,
             if (i_count > i_nonBlackPixel) break;
             }
             break;
-        case VLC_FOURCC('R','V','3','2'):    // packed by 4
+        case VLC_CODEC_RGB32:    // packed by 4
             i_skipCount = (i_pitch * i_skipCountPercent) / 100;
             for (i_index = i_col/2 + i_skipCount/2 - (i_col/2 + i_skipCount/2) % 4; i_index <= i_visible_pitch/2 + i_col/2 - i_skipCount/2; i_index+=4)
             {
@@ -615,11 +613,8 @@ static bool NonBlackLine(uint8_t *p_in, int i_line, int i_pitch,
             }
             break;
     // packed YUV
-        case VLC_FOURCC('Y','U','Y','2'):    // packed by 2
-        case VLC_FOURCC('Y','U','N','V'):    // packed by 2
-        case VLC_FOURCC('U','Y','V','Y'):    // packed by 2
-        case VLC_FOURCC('U','Y','N','V'):    // packed by 2
-        case VLC_FOURCC('Y','4','2','2'):    // packed by 2
+        case VLC_CODEC_YUYV:    // packed by 2
+        case VLC_CODEC_UYVY:    // packed by 2
             i_skipCount = (i_pitch * i_skipCountPercent) / 100;
             for (i_index = (i_col/2 + i_skipCount/2) -
                            (i_col/2 + i_skipCount/2) % 2;
@@ -736,7 +731,7 @@ static void UpdateStats( vout_thread_t *p_vout, picture_t *p_pic )
     /* Determine where black borders are */
     switch( p_vout->output.i_chroma )
     {
-    case VLC_FOURCC('I','4','2','0'):
+    case VLC_CODEC_I420:
         /* XXX: Do not laugh ! I know this is very naive. But it's just a
          *      proof of concept code snippet... */
         for( i = i_lines ; i-- ; )
index 08f135d8707e5a781800ce428c273ef3c71cc43f..0460fd952eeb2bc0b45117ed2c9846602846f2c2 100644 (file)
@@ -310,7 +310,7 @@ static void SetFilterMethod( vout_thread_t *p_vout, char *psz_method )
     }
     else
     {
-        const bool b_i422 = p_vout->render.i_chroma == VLC_FOURCC('I','4','2','2');
+        const bool b_i422 = p_vout->render.i_chroma == VLC_CODEC_I422;
         if( strcmp( psz_method, "discard" ) )
             msg_Err( p_vout, "no valid deinterlace mode provided, "
                      "using \"discard\"" );
@@ -336,17 +336,17 @@ static void GetOutputFormat( vout_thread_t *p_vout,
         p_dst->i_sar_den *= 2;
     }
 
-    if( p_src->i_chroma == VLC_FOURCC('I','4','2','2') )
+    if( p_src->i_chroma == VLC_CODEC_I422 )
     {
         switch( p_vout->p_sys->i_mode )
         {
         case DEINTERLACE_MEAN:
         case DEINTERLACE_LINEAR:
         case DEINTERLACE_X:
-            p_dst->i_chroma = VLC_FOURCC('I','4','2','2');
+            p_dst->i_chroma = VLC_CODEC_I422;
             break;
         default:
-            p_dst->i_chroma = VLC_FOURCC('I','4','2','0');
+            p_dst->i_chroma = VLC_CODEC_I420;
             break;
         }
     }
@@ -354,10 +354,9 @@ static void GetOutputFormat( vout_thread_t *p_vout,
 
 static bool IsChromaSupported( vlc_fourcc_t i_chroma )
 {
-    return i_chroma == VLC_FOURCC('I','4','2','0') ||
-           i_chroma == VLC_FOURCC('I','Y','U','V') ||
-           i_chroma == VLC_FOURCC('Y','V','1','2') ||
-           i_chroma == VLC_FOURCC('I','4','2','2');
+    return i_chroma == VLC_CODEC_I420 ||
+           i_chroma == VLC_CODEC_YV12 ||
+           i_chroma == VLC_CODEC_I422;
 }
 
 /*****************************************************************************
@@ -608,9 +607,8 @@ static void RenderDiscard( vout_thread_t *p_vout,
 
         switch( p_vout->render.i_chroma )
         {
-        case VLC_FOURCC('I','4','2','0'):
-        case VLC_FOURCC('I','Y','U','V'):
-        case VLC_FOURCC('Y','V','1','2'):
+        case VLC_CODEC_I420:
+        case VLC_CODEC_YV12:
 
             for( ; p_out < p_out_end ; )
             {
@@ -621,7 +619,7 @@ static void RenderDiscard( vout_thread_t *p_vout,
             }
             break;
 
-        case VLC_FOURCC('I','4','2','2'):
+        case VLC_CODEC_I422:
 
             i_increment = 2 * p_pic->p[i_plane].i_pitch;
 
@@ -673,9 +671,8 @@ static void RenderBob( vout_thread_t *p_vout,
 
         switch( p_vout->render.i_chroma )
         {
-            case VLC_FOURCC('I','4','2','0'):
-            case VLC_FOURCC('I','Y','U','V'):
-            case VLC_FOURCC('Y','V','1','2'):
+            case VLC_CODEC_I420:
+            case VLC_CODEC_YV12:
                 /* For BOTTOM field we need to add the first line */
                 if( i_field == 1 )
                 {
@@ -709,7 +706,7 @@ static void RenderBob( vout_thread_t *p_vout,
                 }
                 break;
 
-            case VLC_FOURCC('I','4','2','2'):
+            case VLC_CODEC_I422:
                 /* For BOTTOM field we need to add the first line */
                 if( i_field == 1 )
                 {
@@ -863,9 +860,8 @@ static void RenderBlend( vout_thread_t *p_vout,
 
         switch( p_vout->render.i_chroma )
         {
-            case VLC_FOURCC('I','4','2','0'):
-            case VLC_FOURCC('I','Y','U','V'):
-            case VLC_FOURCC('Y','V','1','2'):
+            case VLC_CODEC_I420:
+            case VLC_CODEC_YV12:
                 /* First line: simple copy */
                 vlc_memcpy( p_out, p_in, p_pic->p[i_plane].i_pitch );
                 p_out += p_outpic->p[i_plane].i_pitch;
@@ -881,7 +877,7 @@ static void RenderBlend( vout_thread_t *p_vout,
                 }
                 break;
 
-            case VLC_FOURCC('I','4','2','2'):
+            case VLC_CODEC_I422:
                 /* First line: simple copy */
                 vlc_memcpy( p_out, p_in, p_pic->p[i_plane].i_pitch );
                 p_out += p_outpic->p[i_plane].i_pitch;
index 8d2fce48f1c880a411e812eb5dab5ac31605307b..da647e25550b25fbc9c7175820ce1655dcf78ad1 100644 (file)
@@ -355,7 +355,7 @@ static subpicture_t *Filter( filter_t *p_filter, mtime_t date )
                  (char*)&p_overlay->format.i_chroma, p_overlay->i_x, p_overlay->i_y,
                  p_overlay->i_alpha );
 
-        if( p_overlay->format.i_chroma == VLC_FOURCC('T','E','X','T') )
+        if( p_overlay->format.i_chroma == VLC_CODEC_TEXT )
         {
             p_region->psz_text = strdup( p_overlay->data.p_text );
             p_region->p_style = text_style_Duplicate( p_overlay->p_fontstyle );
index 95bdd85d95a0d3f62cc8105f008d3119c86520aa..02710b94afbefd97a70f8c493bc309c81e8c6e1f 100644 (file)
@@ -437,7 +437,7 @@ static int exec_DataSharedMem( filter_t *p_filter,
     }
     i_size = shminfo.shm_segsz;
 
-    if( p_params->fourcc == VLC_FOURCC('T','E','X','T') )
+    if( p_params->fourcc == VLC_CODEC_TEXT )
     {
         char *p_data;
 
@@ -465,7 +465,7 @@ static int exec_DataSharedMem( filter_t *p_filter,
             return VLC_ENOMEM;
         }
 
-        vout_InitFormat( &p_ovl->format, VLC_FOURCC('T','E','X','T'),
+        vout_InitFormat( &p_ovl->format, VLC_CODEC_TEXT,
                          0, 0, 0 );
 
         p_data = shmat( p_params->i_shmid, NULL, SHM_RDONLY );
index faddc8ea3698cf5a3fdb92c6ae777b93fabc2e21..0a80eb74c9fd143e3eef550f441ae6424093cf27 100644 (file)
@@ -100,7 +100,7 @@ static void LoadMask( filter_t *p_filter, const char *psz_filename )
     picture_t *p_old_mask = p_filter->p_sys->p_mask;
     memset( &fmt_in, 0, sizeof( video_format_t ) );
     memset( &fmt_out, 0, sizeof( video_format_t ) );
-    fmt_out.i_chroma = VLC_FOURCC('Y','U','V','A');
+    fmt_out.i_chroma = VLC_CODEC_YUVA;
     p_image = image_HandlerCreate( p_filter );
     p_filter->p_sys->p_mask =
         image_ReadUrl( p_image, psz_filename, &fmt_in, &fmt_out );
@@ -128,13 +128,12 @@ static int Create( vlc_object_t *p_this )
 
     switch( p_filter->fmt_in.video.i_chroma )
     {
-        case VLC_FOURCC('I','4','2','0'):
-        case VLC_FOURCC('I','Y','U','V'):
-        case VLC_FOURCC('J','4','2','0'):
-        case VLC_FOURCC('Y','V','1','2'):
+        case VLC_CODEC_I420:
+        case VLC_CODEC_J420:
+        case VLC_CODEC_YV12:
 
-        case VLC_FOURCC('I','4','2','2'):
-        case VLC_FOURCC('J','4','2','2'):
+        case VLC_CODEC_I422:
+        case VLC_CODEC_J422:
             break;
 
         default:
@@ -248,8 +247,8 @@ static void FilterErase( filter_t *p_filter, picture_t *p_inpic,
         int i_width  = i_mask_visible_pitch;
 
         const bool b_line_factor = ( i_plane /* U_PLANE or V_PLANE */ &&
-            !( p_inpic->format.i_chroma == VLC_FOURCC('I','4','2','2')
-            || p_inpic->format.i_chroma == VLC_FOURCC('J','4','2','2') ) );
+            !( p_inpic->format.i_chroma == VLC_CODEC_I422
+            || p_inpic->format.i_chroma == VLC_CODEC_J422 ) );
 
         if( i_plane ) /* U_PLANE or V_PLANE */
         {
index 5515bfddc8f53f56355137031767bd47c9442ea3..fc8407b7f0d909c1c734815d8d2db53697fdae25 100644 (file)
@@ -106,13 +106,12 @@ static int Create( vlc_object_t *p_this )
 
     switch( p_filter->fmt_in.video.i_chroma )
     {
-        case VLC_FOURCC('I','4','2','0'):
-        case VLC_FOURCC('I','Y','U','V'):
-        case VLC_FOURCC('J','4','2','0'):
-        case VLC_FOURCC('Y','V','1','2'):
+        case VLC_CODEC_I420:
+        case VLC_CODEC_J420:
+        case VLC_CODEC_YV12:
 
-        case VLC_FOURCC('I','4','2','2'):
-        case VLC_FOURCC('J','4','2','2'):
+        case VLC_CODEC_I422:
+        case VLC_CODEC_J422:
 
         CASE_PACKED_YUV_422
             break;
@@ -181,10 +180,9 @@ static picture_t *Filter( filter_t *p_filter, picture_t *p_pic )
 
     switch( p_pic->format.i_chroma )
     {
-        case VLC_FOURCC('I','4','2','0'):
-        case VLC_FOURCC('I','Y','U','V'):
-        case VLC_FOURCC('J','4','2','0'):
-        case VLC_FOURCC('Y','V','1','2'):
+        case VLC_CODEC_I420:
+        case VLC_CODEC_J420:
+        case VLC_CODEC_YV12:
             switch( p_filter->p_sys->i_color )
             {
                 case RED:
@@ -207,8 +205,8 @@ static picture_t *Filter( filter_t *p_filter, picture_t *p_pic )
             }
             break;
 
-        case VLC_FOURCC('I','4','2','2'):
-        case VLC_FOURCC('J','4','2','2'):
+        case VLC_CODEC_I422:
+        case VLC_CODEC_J422:
             switch( p_filter->p_sys->i_color )
             {
                 case RED:
index b39a26637c9b0e9e036aff5363016757cc8fd854..c5b4473aa2f38344e583176fe9783d5f21237b24 100644 (file)
 
 /* FIXME: do all of these really have square pixels? */
 #define CASE_PLANAR_YUV_SQUARE              \
-        case VLC_FOURCC('I','4','2','0'):   \
-        case VLC_FOURCC('I','Y','U','V'):   \
-        case VLC_FOURCC('J','4','2','0'):   \
-        case VLC_FOURCC('Y','V','1','2'):   \
-        case VLC_FOURCC('I','4','1','1'):   \
-        case VLC_FOURCC('I','4','1','0'):   \
-        case VLC_FOURCC('Y','V','U','9'):   \
-        case VLC_FOURCC('I','4','4','4'):   \
-        case VLC_FOURCC('J','4','4','4'):   \
-        case VLC_FOURCC('Y','U','V','A'):
+        case VLC_CODEC_I420:   \
+        case VLC_CODEC_J420:   \
+        case VLC_CODEC_YV12:   \
+        case VLC_CODEC_I411:   \
+        case VLC_CODEC_I410:   \
+        case VLC_CODEC_I444:   \
+        case VLC_CODEC_J444:   \
+        case VLC_CODEC_YUVA:
 
 #define CASE_PLANAR_YUV_NONSQUARE           \
-        case VLC_FOURCC('I','4','2','2'):   \
-        case VLC_FOURCC('J','4','2','2'):
+        case VLC_CODEC_I422:   \
+        case VLC_CODEC_J422:
 
 #define CASE_PLANAR_YUV                     \
         CASE_PLANAR_YUV_SQUARE              \
         CASE_PLANAR_YUV_NONSQUARE           \
 
 #define CASE_PACKED_YUV_422                 \
-        case VLC_FOURCC('U','Y','V','Y'):   \
-        case VLC_FOURCC('U','Y','N','V'):   \
-        case VLC_FOURCC('Y','4','2','2'):   \
-        case VLC_FOURCC('c','y','u','v'):   \
-        case VLC_FOURCC('Y','U','Y','2'):   \
-        case VLC_FOURCC('Y','U','N','V'):   \
-        case VLC_FOURCC('Y','V','Y','U'):
+        case VLC_CODEC_UYVY:   \
+        case VLC_CODEC_CYUV:   \
+        case VLC_CODEC_YUYV:   \
+        case VLC_CODEC_YVYU:
 
 static inline int GetPackedYuvOffsets( vlc_fourcc_t i_chroma,
     int *i_y_offset, int *i_u_offset, int *i_v_offset )
 {
     switch( i_chroma )
     {
-        case VLC_FOURCC('U','Y','V','Y'):
-        case VLC_FOURCC('U','Y','N','V'):
-        case VLC_FOURCC('Y','4','2','2'):
-        case VLC_FOURCC('c','y','u','v'): /* <-- FIXME: reverted, whatever that means */
+        case VLC_CODEC_UYVY:
+        case VLC_CODEC_CYUV: /* <-- FIXME: reverted, whatever that means */
             /* UYVY */
             *i_y_offset = 1;
             *i_u_offset = 0;
             *i_v_offset = 2;
             return VLC_SUCCESS;
-        case VLC_FOURCC('Y','U','Y','2'):
-        case VLC_FOURCC('Y','U','N','V'):
+        case VLC_CODEC_YUYV:
             /* YUYV */
             *i_y_offset = 0;
             *i_u_offset = 1;
             *i_v_offset = 3;
             return VLC_SUCCESS;
-        case VLC_FOURCC('Y','V','Y','U'):
+        case VLC_CODEC_YVYU:
             /* YVYU */
             *i_y_offset = 0;
             *i_u_offset = 3;
index a8f96efc6833908b39e04f8efe865a0e24e45e7d..8f62c315dc480033fe94a0a4dc0f6aaac25f6f0a 100644 (file)
@@ -123,13 +123,12 @@ static int Create( vlc_object_t *p_this )
 {
     filter_t *p_filter = (filter_t *)p_this;
 
-    if(   p_filter->fmt_in.video.i_chroma != VLC_FOURCC('I','4','2','0')
-       && p_filter->fmt_in.video.i_chroma != VLC_FOURCC('I','Y','U','V')
-       && p_filter->fmt_in.video.i_chroma != VLC_FOURCC('J','4','2','0')
-       && p_filter->fmt_in.video.i_chroma != VLC_FOURCC('Y','V','1','2')
+    if(   p_filter->fmt_in.video.i_chroma != VLC_CODEC_I420
+       && p_filter->fmt_in.video.i_chroma != VLC_CODEC_J420
+       && p_filter->fmt_in.video.i_chroma != VLC_CODEC_YV12
 
-       && p_filter->fmt_in.video.i_chroma != VLC_FOURCC('I','4','2','2')
-       && p_filter->fmt_in.video.i_chroma != VLC_FOURCC('J','4','2','2')
+       && p_filter->fmt_in.video.i_chroma != VLC_CODEC_I422
+       && p_filter->fmt_in.video.i_chroma != VLC_CODEC_J422
       )
     {
         /* We only want planar YUV 4:2:0 or 4:2:2 */
index 1f1cd71aaed3c61335d2edae82fd85c7605ab436..3eb6bf703769080279be5ece9ea271e3df7dccc0 100644 (file)
@@ -121,7 +121,7 @@ static picture_t *Filter( filter_t *p_filter, picture_t *p_pic )
         return NULL;
     }
 
-    if( p_pic->format.i_chroma == VLC_FOURCC('Y','U','V','A') )
+    if( p_pic->format.i_chroma == VLC_CODEC_YUVA )
     {
         /* We don't want to invert the alpha plane */
         i_planes = p_pic->i_planes - 1;
index ebc137a048ad17e1c7f11574c13793ac5cf7d07b..5613a9bc023783f78c3a1a322c16ba3b9a4a012f 100644 (file)
@@ -179,7 +179,7 @@ static picture_t *LoadImage( vlc_object_t *p_this, char *psz_filename )
     memset( &fmt_in, 0, sizeof(video_format_t) );
     memset( &fmt_out, 0, sizeof(video_format_t) );
 
-    fmt_out.i_chroma = VLC_FOURCC('Y','U','V','A');
+    fmt_out.i_chroma = VLC_CODEC_YUVA;
     p_image = image_HandlerCreate( p_this );
     p_pic = image_ReadUrl( p_image, psz_filename, &fmt_in, &fmt_out );
     image_HandlerDelete( p_image );
@@ -392,7 +392,7 @@ static int Init( vout_thread_t *p_vout )
         p_sys->p_blend->fmt_in.video.i_y_offset = 0;
     p_sys->p_blend->fmt_out.video.i_aspect = p_vout->render.i_aspect;
     p_sys->p_blend->fmt_out.video.i_chroma = p_vout->output.i_chroma;
-    p_sys->p_blend->fmt_in.video.i_chroma = VLC_FOURCC('Y','U','V','A');
+    p_sys->p_blend->fmt_in.video.i_chroma = VLC_CODEC_YUVA;
     p_sys->p_blend->fmt_in.video.i_aspect = VOUT_ASPECT_FACTOR;
     p_sys->i_width =
         p_sys->p_blend->fmt_in.video.i_width =
@@ -821,7 +821,7 @@ static subpicture_t *Filter( filter_t *p_filter, mtime_t date )
 
     /* Create new SPU region */
     memset( &fmt, 0, sizeof(video_format_t) );
-    fmt.i_chroma = VLC_FOURCC('Y','U','V','A');
+    fmt.i_chroma = VLC_CODEC_YUVA;
     fmt.i_aspect = VOUT_ASPECT_FACTOR;
     fmt.i_sar_num = fmt.i_sar_den = 1;
     fmt.i_width = fmt.i_visible_width = p_pic->p[Y_PLANE].i_visible_pitch;
index aef6837a77d6968e921661d7c32459caed3db770..b5c080cd2e04d7d566d680968a12f6a745df4fff 100644 (file)
@@ -114,7 +114,7 @@ static int Create( vlc_object_t *p_this )
     switch( p_vout->fmt_in.i_chroma )
     {
         CASE_PLANAR_YUV
-        case VLC_FOURCC('G','R','E','Y'):
+        case VLC_CODEC_GREY:
             break;
         default:
             msg_Err( p_vout, "Unsupported chroma" );
index 1d8388b7a7c3c0a2b57f0903aad70a98e224f819..8c18c30f0338c39f81540f7942c395d9095ef821 100644 (file)
@@ -283,7 +283,7 @@ static subpicture_t *Filter( filter_t *p_filter, mtime_t date )
         goto out;
 
     memset( &fmt, 0, sizeof(video_format_t) );
-    fmt.i_chroma = VLC_FOURCC('T','E','X','T');
+    fmt.i_chroma = VLC_CODEC_TEXT;
     fmt.i_aspect = 0;
     fmt.i_width = fmt.i_height = 0;
     fmt.i_x_offset = 0;
index fdc506c31b763fb65bcb9a7f9cfa6c815554ca1c..c01810f68712835c689e8ca2a1608f3b9d16d2cc 100644 (file)
@@ -598,11 +598,11 @@ static subpicture_t *Filter( filter_t *p_filter, mtime_t date )
             fmt_in.i_height = p_es->p_picture->format.i_height;
             fmt_in.i_width = p_es->p_picture->format.i_width;
 
-            if( fmt_in.i_chroma == VLC_FOURCC('Y','U','V','A') ||
-                fmt_in.i_chroma == VLC_FOURCC('R','G','B','A') )
-                fmt_out.i_chroma = VLC_FOURCC('Y','U','V','A');
+            if( fmt_in.i_chroma == VLC_CODEC_YUVA ||
+                fmt_in.i_chroma == VLC_CODEC_RGBA )
+                fmt_out.i_chroma = VLC_CODEC_YUVA;
             else
-                fmt_out.i_chroma = VLC_FOURCC('I','4','2','0');
+                fmt_out.i_chroma = VLC_CODEC_I420;
             fmt_out.i_width = col_inner_width;
             fmt_out.i_height = row_inner_height;
 
index aaf8f3149dd66e25929b3a68d7acd933367ad30e..04052251d9b7ed4fd170a77c618abc9aac0fc21c 100644 (file)
@@ -198,16 +198,15 @@ static picture_t *Filter( filter_t *p_filter, picture_t *p_inpic )
     int i_chroma_dy;
     switch( p_inpic->format.i_chroma )
     {
-        case VLC_FOURCC('I','4','2','0'):
-        case VLC_FOURCC('I','Y','U','V'):
-        case VLC_FOURCC('J','4','2','0'):
-        case VLC_FOURCC('Y','V','1','2'):
+        case VLC_CODEC_I420:
+        case VLC_CODEC_J420:
+        case VLC_CODEC_YV12:
             i_chroma_dx = 2;
             i_chroma_dy = 2;
             break;
 
-        case VLC_FOURCC('I','4','2','2'):
-        case VLC_FOURCC('J','4','2','2'):
+        case VLC_CODEC_I422:
+        case VLC_CODEC_J422:
             i_chroma_dx = 2;
             i_chroma_dy = 1;
             break;
index e1fe03e2f1b816cc6435243d22fab793998ed71b..3d899e55d3e315ef063acc5e413b6e211be1d71e 100644 (file)
@@ -174,7 +174,7 @@ static picture_t *Filter( filter_t *p_filter, picture_t *p_pic )
         msg_Err( p_filter, "no image" );
         return NULL;
     }
-    if ((p_pic->format.i_chroma != VLC_FOURCC('I','4','2','0')))
+    if ((p_pic->format.i_chroma != VLC_CODEC_I420))
     {
         msg_Err( p_filter, "wrong chroma - use I420" );
         return NULL;
index ca48f23c5eaf171027ad42e2e7a786c5718a1633..6825ba38ed24ca6a9da694c14953b6934abbae5f 100644 (file)
@@ -318,9 +318,9 @@ static int Init( vout_thread_t *p_vout )
         fmt.i_y_offset = fmt.i_y_offset * p_sys->f_scale;
 
         if (p_sys->i_internal_chroma == GREY)
-            fmt.i_chroma = VLC_FOURCC('I','4','2','0');
+            fmt.i_chroma = VLC_CODEC_I420;
         else if (p_sys->i_internal_chroma == RGB)
-            fmt.i_chroma = VLC_FOURCC('R','V','3','2');
+            fmt.i_chroma = VLC_CODEC_RGB32;
     }
 
     /* Load the internal opencv filter */
@@ -463,13 +463,13 @@ static void VlcPictureToIplImage( vout_thread_t *p_vout, picture_t *p_in )
             //rgb2 gives 3 separate planes, this gives 1 interleaved plane
             //rv24 gives is about 20% faster but gives r&b the wrong way round
             //and I cant think of an easy way to fix this
-            fmt_out.i_chroma = VLC_FOURCC('R','V','3','2');
+            fmt_out.i_chroma = VLC_CODEC_RGB32;
         }
         else if (p_sys->i_internal_chroma == GREY)
         {
             //take the I (gray) plane (video seems to commonly be in this fmt so usually the
             //conversion does nothing)
-            fmt_out.i_chroma = VLC_FOURCC('I','4','2','0');
+            fmt_out.i_chroma = VLC_CODEC_I420;
         }
 
         //convert from the input image
index 82816578b1a0a323a28aabbc2707152aabe6b6d6..25e5f3b8e725fed64285e2e5808e51d31c2595f4 100644 (file)
@@ -262,7 +262,7 @@ static int CreateFilter ( vlc_object_t *p_this )
                         MouseEvent, p_sys );
     }
 
-    es_format_Init( &p_filter->fmt_out, SPU_ES, VLC_FOURCC( 's','p','u',' ' ) );
+    es_format_Init( &p_filter->fmt_out, SPU_ES, VLC_CODEC_SPU );
     p_filter->fmt_out.i_priority = 0;
 
     return VLC_SUCCESS;
@@ -369,7 +369,7 @@ static subpicture_region_t *create_text_region( filter_t *p_filter, subpicture_t
 
     /* Create new SPU region */
     memset( &fmt, 0, sizeof(video_format_t) );
-    fmt.i_chroma = VLC_FOURCC( 'T','E','X','T' );
+    fmt.i_chroma = VLC_CODEC_TEXT;
     fmt.i_aspect = VOUT_ASPECT_FACTOR;
     fmt.i_sar_num = fmt.i_sar_den = 1;
     fmt.i_width = fmt.i_visible_width = i_width;
@@ -407,13 +407,13 @@ static subpicture_region_t *create_picture_region( filter_t *p_filter, subpictur
 
     /* Create new SPU region */
     memset( &fmt, 0, sizeof(video_format_t) );
-    fmt.i_chroma = (p_pic == NULL) ? VLC_FOURCC('Y','U','V','P') : VLC_FOURCC('Y','U','V','A');
+    fmt.i_chroma = (p_pic == NULL) ? VLC_CODEC_YUVP : VLC_CODEC_YUVA;
     fmt.i_aspect = VOUT_ASPECT_FACTOR;
     fmt.i_sar_num = fmt.i_sar_den = 1;
     fmt.i_width = fmt.i_visible_width = i_width;
     fmt.i_height = fmt.i_visible_height = i_height;
     fmt.i_x_offset = fmt.i_y_offset = 0;
-    if( fmt.i_chroma == VLC_FOURCC('Y','U','V','P') )
+    if( fmt.i_chroma == VLC_CODEC_YUVP )
     {
         fmt.p_palette = &palette;
         fmt.p_palette->i_entries = 0;
index 73c92814fbbafb454b33f6cafdfe91fd6845aa51..8b4467a379318fc79b016f4378b49d6bfe0e3757 100644 (file)
@@ -307,43 +307,38 @@ static int Create( vlc_object_t *p_this )
     p_vout->pf_manage = NULL;
 /* Color Format not supported
 // Planar Y, packed UV
-case VLC_FOURCC('Y','M','G','A'):
+case VLC_CODEC_YMGA:
 // Packed YUV 4:2:2, U:Y:V:Y, interlaced
 case VLC_FOURCC('I','U','Y','V'):    // packed by 2
 // Packed YUV 2:1:1, Y:U:Y:V
-case VLC_FOURCC('Y','2','1','1'):     // packed by 4
+case VLC_CODEC_Y211:     // packed by 4
 // Packed YUV Reverted
-case VLC_FOURCC('c','y','u','v'):    // packed by 2
+case VLC_CODEC_CYUV:    // packed by 2
 */
     switch (p_vout->render.i_chroma)
     {
     // planar YUV
-        case VLC_FOURCC('I','4','4','4'):
-        case VLC_FOURCC('I','4','2','2'):
-        case VLC_FOURCC('I','4','2','0'):
-        case VLC_FOURCC('Y','V','1','2'):
-        case VLC_FOURCC('I','Y','U','V'):
-        case VLC_FOURCC('I','4','1','1'):
-        case VLC_FOURCC('I','4','1','0'):
-        case VLC_FOURCC('Y','V','U','9'):
-        case VLC_FOURCC('Y','U','V','A'):
+        case VLC_CODEC_I444:
+        case VLC_CODEC_I422:
+        case VLC_CODEC_I420:
+        case VLC_CODEC_YV12:
+        case VLC_CODEC_I411:
+        case VLC_CODEC_I410:
+        case VLC_CODEC_YUVA:
             p_vout->pf_render = RenderPlanarYUV;
             break;
     // packed RGB
-        case VLC_FOURCC('R','G','B','2'):    // packed by 1
-        case VLC_FOURCC('R','V','1','5'):    // packed by 2
-        case VLC_FOURCC('R','V','1','6'):    // packed by 2
-        case VLC_FOURCC('R','V','2','4'):    // packed by 3
-        case VLC_FOURCC('R','V','3','2'):    // packed by 4
+        case VLC_CODEC_RGB8:    // packed by 1
+        case VLC_CODEC_RGB15:    // packed by 2
+        case VLC_CODEC_RGB16:    // packed by 2
+        case VLC_CODEC_RGB24:    // packed by 3
+        case VLC_CODEC_RGB32:    // packed by 4
             p_vout->pf_render = RenderPackedRGB;
             break;
 #ifdef PACKED_YUV
     // packed YUV
-        case VLC_FOURCC('Y','U','Y','2'):    // packed by 2
-        case VLC_FOURCC('Y','U','N','V'):    // packed by 2
-        case VLC_FOURCC('U','Y','V','Y'):    // packed by 2
-        case VLC_FOURCC('U','Y','N','V'):    // packed by 2
-        case VLC_FOURCC('Y','4','2','2'):    // packed by 2
+        case VLC_CODEC_YUYV:    // packed by 2
+        case VLC_CODEC_UYVY:    // packed by 2
             p_vout->pf_render = RenderPackedYUV;
             break;
 #endif
@@ -700,29 +695,24 @@ static int Init( vout_thread_t *p_vout )
         switch (p_vout->render.i_chroma)
         {
         // planar YVU
-            case VLC_FOURCC('Y','V','1','2'):
-            case VLC_FOURCC('Y','V','U','9'):
+            case VLC_CODEC_YV12:
         // packed UYV
-            case VLC_FOURCC('U','Y','V','Y'):    // packed by 2
-            case VLC_FOURCC('U','Y','N','V'):    // packed by 2
-            case VLC_FOURCC('Y','4','2','2'):    // packed by 2
-    //        case VLC_FOURCC('c','y','u','v'):    // packed by 2
+            case VLC_CODEC_UYVY:    // packed by 2
+    //        case VLC_CODEC_CYUV:    // packed by 2
                 VLC_XCHG( float, p_vout->p_sys->f_gamma[1], p_vout->p_sys->f_gamma[2] );
                 VLC_XCHG( float, f_BlackCrush[1], f_BlackCrush[2] );
                 VLC_XCHG( float, f_WhiteCrush[1], f_WhiteCrush[2] );
                 VLC_XCHG( float, f_BlackLevel[1], f_BlackLevel[2] );
                 VLC_XCHG( float, f_WhiteLevel[1], f_WhiteLevel[2] );
         // planar YUV
-            case VLC_FOURCC('I','4','4','4'):
-            case VLC_FOURCC('I','4','2','2'):
-            case VLC_FOURCC('I','4','2','0'):
-            case VLC_FOURCC('I','4','1','1'):
-            case VLC_FOURCC('I','4','1','0'):
-            case VLC_FOURCC('I','Y','U','V'):
-            case VLC_FOURCC('Y','U','V','A'):
+            case VLC_CODEC_I444:
+            case VLC_CODEC_I422:
+            case VLC_CODEC_I420:
+            case VLC_CODEC_I411:
+            case VLC_CODEC_I410:
+            case VLC_CODEC_YUVA:
         // packed YUV
-            case VLC_FOURCC('Y','U','Y','2'):    // packed by 2
-            case VLC_FOURCC('Y','U','N','V'):    // packed by 2
+            case VLC_CODEC_YUYV:    // packed by 2
                 for (i_index = 0; i_index < 256; i_index++)
                     for (i_index2 = 0; i_index2 <= ACCURACY; i_index2++)
                         for (i_plane = 0; i_plane < VOUT_MAX_PLANES; i_plane++)
@@ -735,11 +725,11 @@ static int Init( vout_thread_t *p_vout )
                         }
                 break;
         // packed RGB
-            case VLC_FOURCC('R','G','B','2'):    // packed by 1
-            case VLC_FOURCC('R','V','1','5'):    // packed by 2
-            case VLC_FOURCC('R','V','1','6'):    // packed by 2
-            case VLC_FOURCC('R','V','2','4'):    // packed by 3
-            case VLC_FOURCC('R','V','3','2'):    // packed by 4
+            case VLC_CODEC_RGB8:    // packed by 1
+            case VLC_CODEC_RGB15:    // packed by 2
+            case VLC_CODEC_RGB16:    // packed by 2
+            case VLC_CODEC_RGB24:    // packed by 3
+            case VLC_CODEC_RGB32:    // packed by 4
             for (i_index = 0; i_index < 256; i_index++)
                     for (i_index2 = 0; i_index2 <= ACCURACY; i_index2++)
                         for (i_plane = 0; i_plane < VOUT_MAX_PLANES; i_plane++)
@@ -1651,8 +1641,7 @@ static void RenderPackedYUV( vout_thread_t *p_vout, picture_t *p_pic )
 #endif
             switch (p_vout->output.i_chroma)
                 {
-                    case VLC_FOURCC('Y','U','Y','2'):    // packed by 2
-                    case VLC_FOURCC('Y','U','N','V'):    // packed by 2
+                    case VLC_CODEC_YUYV:    // packed by 2
                         Denom = F2(length / p_pic->p->i_pixel_pitch);
                         a_2 = p_vout->p_sys->a_2 * (ACCURACY / 100);
                         a_1 = p_vout->p_sys->a_1 * 2 * p_vout->p_sys->i_halfLength * (ACCURACY / 100);
@@ -1672,9 +1661,7 @@ static void RenderPackedYUV( vout_thread_t *p_vout, picture_t *p_pic )
                                 p_vout->p_sys->cstYUV[i_col][1][i_index + 1] = p_vout->p_sys->cstYUV[i_col][1][i_index];
                         }
                         break;
-                    case VLC_FOURCC('U','Y','V','Y'):    // packed by 2
-                    case VLC_FOURCC('U','Y','N','V'):    // packed by 2
-                    case VLC_FOURCC('Y','4','2','2'):    // packed by 2
+                    case VLC_CODEC_UYVY:    // packed by 2
                         Denom = F2(length / p_pic->p->i_pixel_pitch);
                         a_2 = p_vout->p_sys->a_2 * (ACCURACY / 100);
                         a_1 = p_vout->p_sys->a_1 * 2 * p_vout->p_sys->i_halfLength * (ACCURACY / 100);
@@ -1740,8 +1727,7 @@ static void RenderPackedYUV( vout_thread_t *p_vout, picture_t *p_pic )
 #endif
                                 switch (p_vout->output.i_chroma)
                                 {
-                                    case VLC_FOURCC('Y','U','Y','2'):    // packed by 2
-                                    case VLC_FOURCC('Y','U','N','V'):    // packed by 2
+                                    case VLC_CODEC_YUYV:    // packed by 2
                                         Denom = F2(length / p_pic->p->i_pixel_pitch);
                                         a_2 = p_vout->p_sys->a_2 * (ACCURACY / 100);
                                         a_1 = p_vout->p_sys->a_1 * 2 * p_vout->p_sys->i_halfHeight * (ACCURACY / 100);
@@ -1761,9 +1747,7 @@ static void RenderPackedYUV( vout_thread_t *p_vout, picture_t *p_pic )
                                                 p_vout->p_sys->cstYUV2[i_row][1][i_index + 1] = p_vout->p_sys->cstYUV2[i_row][1][i_index];
                                         }
                                         break;
-                                    case VLC_FOURCC('U','Y','V','Y'):    // packed by 2
-                                    case VLC_FOURCC('U','Y','N','V'):    // packed by 2
-                                    case VLC_FOURCC('Y','4','2','2'):    // packed by 2
+                                    case VLC_CODEC_UYVY:    // packed by 2
                                         Denom = F2(length / p_pic->p->i_pixel_pitch);
                                         a_2 = p_vout->p_sys->a_2 * (ACCURACY / 100);
                                         a_1 = p_vout->p_sys->a_1 * 2 * p_vout->p_sys->i_halfHeight * (ACCURACY / 100);
index db9e56d0e54f645d63d8207be8b73c6ab15f0510..2779c098a1435ce3937d19d0bb70f2733cde94e1 100644 (file)
@@ -140,22 +140,21 @@ static int OpenPostproc( vlc_object_t *p_this )
 
     switch( p_filter->fmt_in.video.i_chroma )
     {
-        case VLC_FOURCC('I','4','4','4'):
-        case VLC_FOURCC('J','4','4','4'):
-        /* case VLC_FOURCC('Y','U','V','A'): FIXME Should work but alpha plane needs to be copied manually and I'm kind of feeling too lazy to write the code to do that ATM (i_pitch vs i_visible_pitch...). */
+        case VLC_CODEC_I444:
+        case VLC_CODEC_J444:
+        /* case VLC_CODEC_YUVA: FIXME Should work but alpha plane needs to be copied manually and I'm kind of feeling too lazy to write the code to do that ATM (i_pitch vs i_visible_pitch...). */
             i_flags |= PP_FORMAT_444;
             break;
-        case VLC_FOURCC('I','4','2','2'):
-        case VLC_FOURCC('J','4','2','2'):
+        case VLC_CODEC_I422:
+        case VLC_CODEC_J422:
             i_flags |= PP_FORMAT_422;
             break;
-        case VLC_FOURCC('I','4','1','1'):
+        case VLC_CODEC_I411:
             i_flags |= PP_FORMAT_411;
             break;
-        case VLC_FOURCC('I','4','2','0'):
-        case VLC_FOURCC('I','Y','U','V'):
-        case VLC_FOURCC('J','4','2','0'):
-        case VLC_FOURCC('Y','V','1','2'):
+        case VLC_CODEC_I420:
+        case VLC_CODEC_J420:
+        case VLC_CODEC_YV12:
             i_flags |= PP_FORMAT_420;
             break;
         default:
index 8b0e02ece326754b86991c75306cf4f11c192ec7..5bc22dc36fa19b8e516a883e789a1d7e07b4ade4 100644 (file)
@@ -323,7 +323,7 @@ static int CreateFilter ( vlc_object_t *p_this )
                          KeyEvent, p_this );
     }
 
-    es_format_Init( &p_filter->fmt_out, SPU_ES, VLC_FOURCC( 's','p','u',' ' ) );
+    es_format_Init( &p_filter->fmt_out, SPU_ES, VLC_CODEC_SPU );
     p_filter->fmt_out.i_priority = 0;
 
     vlc_gcrypt_init();
@@ -697,7 +697,7 @@ static void* vnc_worker_thread( vlc_object_t *p_thread_obj )
 
     /* Create an empty picture for VNC the data */
     vlc_mutex_lock( &p_sys->lock );
-    p_sys->p_pic = picture_New( VLC_FOURCC('Y','U','V','A'),
+    p_sys->p_pic = picture_New( VLC_CODEC_YUVA,
                                 p_sys->i_vnc_width, p_sys->i_vnc_height, VOUT_ASPECT_FACTOR );
     if( !p_sys->p_pic )
     {
@@ -1154,7 +1154,7 @@ static subpicture_t *Filter( filter_t *p_filter, mtime_t date )
 
     /* Create new SPU region */
     memset( &fmt, 0, sizeof(video_format_t) );
-    fmt.i_chroma = VLC_FOURCC('Y','U','V','A');
+    fmt.i_chroma = VLC_CODEC_YUVA;
     fmt.i_aspect = VOUT_ASPECT_FACTOR;
     fmt.i_sar_num = fmt.i_sar_den = 1;
     fmt.i_width = fmt.i_visible_width = p_pic->p[Y_PLANE].i_visible_pitch;
index c08083aa643b689a5f041ae33fa10731f7e86e0a..10cf8ca4e9287c5a6a040d9d10c98631180e035d 100644 (file)
@@ -440,7 +440,7 @@ static subpicture_t *Filter( filter_t *p_filter, mtime_t date )
         return NULL;
     }
 
-    fmt.i_chroma = VLC_FOURCC('T','E','X','T');
+    fmt.i_chroma = VLC_CODEC_TEXT;
 
     p_spu->p_region = subpicture_region_New( &fmt );
     if( !p_spu->p_region )
@@ -539,7 +539,7 @@ static subpicture_t *Filter( filter_t *p_filter, mtime_t date )
 
         memset( &fmt_out, 0, sizeof(video_format_t) );
 
-        fmt_out.i_chroma = VLC_FOURCC('Y','U','V','A');
+        fmt_out.i_chroma = VLC_CODEC_YUVA;
         fmt_out.i_aspect = VOUT_ASPECT_FACTOR;
         fmt_out.i_sar_num = fmt_out.i_sar_den = 1;
         fmt_out.i_width =
@@ -593,7 +593,7 @@ static picture_t *LoadImage( filter_t *p_filter, const char *psz_url )
     memset( &fmt_in, 0, sizeof(video_format_t) );
     memset( &fmt_out, 0, sizeof(video_format_t) );
 
-    fmt_out.i_chroma = VLC_FOURCC('Y','U','V','A');
+    fmt_out.i_chroma = VLC_CODEC_YUVA;
     p_orig = image_ReadUrl( p_handler, psz_url, &fmt_in, &fmt_out );
 
     if( !p_orig )
@@ -603,7 +603,7 @@ static picture_t *LoadImage( filter_t *p_filter, const char *psz_url )
     else if( p_sys->p_style->i_font_size > 0 )
     {
 
-        fmt_in.i_chroma = VLC_FOURCC('Y','U','V','A');
+        fmt_in.i_chroma = VLC_CODEC_YUVA;
         fmt_in.i_height = p_orig->p[Y_PLANE].i_visible_lines;
         fmt_in.i_width = p_orig->p[Y_PLANE].i_visible_pitch;
         fmt_out.i_width = p_orig->p[Y_PLANE].i_visible_pitch
index 68ef70f3469d67506a9aa072c80ac18991656e7a..5dc81eff748ac5840670dd40e3473c7174bf9fcb 100644 (file)
@@ -68,9 +68,9 @@ static int OpenFilter( vlc_object_t *p_this )
     filter_sys_t *p_sys;
 
     /* XXX Only support RV24 -> RV32 conversion */
-    if( p_filter->fmt_in.video.i_chroma != VLC_FOURCC('R','V','2','4') ||
-        (p_filter->fmt_out.video.i_chroma != VLC_FOURCC('R', 'V', '3', '2') &&
-        p_filter->fmt_out.video.i_chroma != VLC_FOURCC('R', 'G', 'B', 'A')) )
+    if( p_filter->fmt_in.video.i_chroma != VLC_CODEC_RGB24 ||
+        (p_filter->fmt_out.video.i_chroma != VLC_CODEC_RGB32 &&
+        p_filter->fmt_out.video.i_chroma != VLC_CODEC_RGBA) )
     {
         return VLC_EGENERIC;
     }
index 159bd180fca315d1f9889bf6db0b74c9fcd80b1a..7c095136ace45ea2ab23db950f87e76b78b6bbf3 100644 (file)
@@ -69,12 +69,12 @@ static int OpenFilter( vlc_object_t *p_this )
     filter_t *p_filter = (filter_t*)p_this;
     filter_sys_t *p_sys;
 
-    if( ( p_filter->fmt_in.video.i_chroma != VLC_FOURCC('Y','U','V','P') &&
-          p_filter->fmt_in.video.i_chroma != VLC_FOURCC('Y','U','V','A') &&
-          p_filter->fmt_in.video.i_chroma != VLC_FOURCC('I','4','2','0') &&
-          p_filter->fmt_in.video.i_chroma != VLC_FOURCC('Y','V','1','2') &&
-          p_filter->fmt_in.video.i_chroma != VLC_FOURCC('R','V','3','2') &&
-          p_filter->fmt_in.video.i_chroma != VLC_FOURCC('R','G','B','A') ) ||
+    if( ( p_filter->fmt_in.video.i_chroma != VLC_CODEC_YUVP &&
+          p_filter->fmt_in.video.i_chroma != VLC_CODEC_YUVA &&
+          p_filter->fmt_in.video.i_chroma != VLC_CODEC_I420 &&
+          p_filter->fmt_in.video.i_chroma != VLC_CODEC_YV12 &&
+          p_filter->fmt_in.video.i_chroma != VLC_CODEC_RGB32 &&
+          p_filter->fmt_in.video.i_chroma != VLC_CODEC_RGBA ) ||
         p_filter->fmt_in.video.i_chroma != p_filter->fmt_out.video.i_chroma )
     {
         return VLC_EGENERIC;
@@ -131,8 +131,8 @@ static picture_t *Filter( filter_t *p_filter, picture_t *p_pic )
         return NULL;
     }
 
-    if( p_filter->fmt_in.video.i_chroma != VLC_FOURCC('R','G','B','A') &&
-        p_filter->fmt_in.video.i_chroma != VLC_FOURCC('R','V','3','2') )
+    if( p_filter->fmt_in.video.i_chroma != VLC_CODEC_RGBA &&
+        p_filter->fmt_in.video.i_chroma != VLC_CODEC_RGB32 )
     {
         for( i_plane = 0; i_plane < p_pic_dst->i_planes; i_plane++ )
         {
index 61d0d8250423b10eac3fcce496c792a1420bb9b0..66249395df6883eefd233be64cbea14bcfa02f18 100644 (file)
@@ -272,30 +272,30 @@ static int GetParameters( ScalerConfiguration *p_cfg,
 
     if( p_fmti->i_chroma == p_fmto->i_chroma )
     {
-        if( p_fmti->i_chroma == VLC_FOURCC( 'Y', 'U', 'V', 'P' ) && ALLOW_YUVP )
+        if( p_fmti->i_chroma == VLC_CODEC_YUVP && ALLOW_YUVP )
         {
             i_fmti = i_fmto = PIX_FMT_GRAY8;
             i_sws_flags = SWS_POINT;
         }
     }
 
-    if( p_fmti->i_chroma == VLC_FOURCC( 'Y', 'U', 'V', 'A' ) )
+    if( p_fmti->i_chroma == VLC_CODEC_YUVA )
     {
         i_fmti = PIX_FMT_YUV444P;
         b_has_ai = true;
     }
-    else if( p_fmti->i_chroma == VLC_FOURCC( 'R', 'G', 'B', 'A' ) )
+    else if( p_fmti->i_chroma == VLC_CODEC_RGBA )
     {
         i_fmti = PIX_FMT_BGR32;
         b_has_ai = true;
     }
 
-    if( p_fmto->i_chroma == VLC_FOURCC( 'Y', 'U', 'V', 'A' ) )
+    if( p_fmto->i_chroma == VLC_CODEC_YUVA )
     {
         i_fmto = PIX_FMT_YUV444P;
         b_has_ao = true;
     }
-    else if( p_fmto->i_chroma == VLC_FOURCC( 'R', 'G', 'B', 'A' ) )
+    else if( p_fmto->i_chroma == VLC_CODEC_RGBA )
     {
         i_fmto = PIX_FMT_BGR32;
         b_has_ao = true;
@@ -379,8 +379,8 @@ static int Init( filter_t *p_filter )
     }
     if( p_sys->ctxA )
     {
-        p_sys->p_src_a = picture_New( VLC_FOURCC( 'G', 'R', 'E', 'Y' ), i_fmti_width, p_fmti->i_height, 0 );
-        p_sys->p_dst_a = picture_New( VLC_FOURCC( 'G', 'R', 'E', 'Y' ), i_fmto_width, p_fmto->i_height, 0 );
+        p_sys->p_src_a = picture_New( VLC_CODEC_GREY, i_fmti_width, p_fmti->i_height, 0 );
+        p_sys->p_dst_a = picture_New( VLC_CODEC_GREY, i_fmto_width, p_fmto->i_height, 0 );
     }
     if( p_sys->i_extend_factor != 1 )
     {
@@ -509,7 +509,7 @@ static void Convert( filter_t *p_filter, struct SwsContext *ctx,
     uint8_t *dst[3]; int dst_stride[3];
 
     GetPixels( src, src_stride, p_src, i_plane_start, i_plane_count );
-    if( p_filter->fmt_in.video.i_chroma == VLC_FOURCC( 'R', 'G', 'B', 'P' ) )
+    if( p_filter->fmt_in.video.i_chroma == VLC_CODEC_RGBP )
     {
         memset( palette, 0, sizeof(palette) );
         if( p_filter->fmt_in.video.p_palette )
@@ -575,13 +575,13 @@ static picture_t *Filter( filter_t *p_filter, picture_t *p_pic )
     if( p_sys->ctxA )
     {
         /* We extract the A plane to rescale it, and then we reinject it. */
-        if( p_fmti->i_chroma == VLC_FOURCC( 'R', 'G', 'B', 'A' ) )
+        if( p_fmti->i_chroma == VLC_CODEC_RGBA )
             ExtractA( p_sys->p_src_a, p_src, p_fmti->i_width * p_sys->i_extend_factor, p_fmti->i_height );
         else
             plane_CopyPixels( p_sys->p_src_a->p, p_src->p+A_PLANE );
 
         Convert( p_filter, p_sys->ctxA, p_sys->p_dst_a, p_sys->p_src_a, p_fmti->i_height, 0, 1 );
-        if( p_fmto->i_chroma == VLC_FOURCC( 'R', 'G', 'B', 'A' ) )
+        if( p_fmto->i_chroma == VLC_CODEC_RGBA )
             InjectA( p_dst, p_sys->p_dst_a, p_fmto->i_width * p_sys->i_extend_factor, p_fmto->i_height );
         else
             plane_CopyPixels( p_dst->p+A_PLANE, p_sys->p_dst_a->p );
@@ -589,7 +589,7 @@ static picture_t *Filter( filter_t *p_filter, picture_t *p_pic )
     else if( p_sys->b_add_a )
     {
         /* We inject a complete opaque alpha plane */
-        if( p_fmto->i_chroma == VLC_FOURCC( 'R', 'G', 'B', 'A' ) )
+        if( p_fmto->i_chroma == VLC_CODEC_RGBA )
             FillA( &p_dst->p[0], OFFSET_A );
         else
             FillA( &p_dst->p[A_PLANE], 0 );
index 6afd21000c4d61aeab287062885c6ca3525f70f4..c882b8752c47968b66aab29e1a9c9a6185cb8d47 100644 (file)
@@ -138,9 +138,8 @@ static int Init( filter_t *p_filter )
         return VLC_SUCCESS;
     }
 
-    if( ( p_filter->fmt_in.video.i_chroma != VLC_FOURCC('I','4','2','0') &&
-          p_filter->fmt_in.video.i_chroma != VLC_FOURCC('I','Y','U','V') &&
-          p_filter->fmt_in.video.i_chroma != VLC_FOURCC('Y','V','1','2') ) ||
+    if( ( p_filter->fmt_in.video.i_chroma != VLC_CODEC_I420 &&
+          p_filter->fmt_in.video.i_chroma != VLC_CODEC_YV12 ) ||
           p_filter->fmt_out.video.i_chroma != VLC_FOURCC('Y','4','2','0') )
     {
         msg_Err( p_filter, "format not supported" );
index 0409cf1acb126d2dd18f6c027694f55e707e65c6..0ecd4500843c711351b4de52d7ca11016455c9c3 100644 (file)
@@ -145,12 +145,12 @@ static int Create( vlc_object_t *p_this )
     switch( p_vout->fmt_in.i_chroma )
     {
         CASE_PLANAR_YUV_SQUARE
-        case VLC_FOURCC('G','R','E','Y'):
+        case VLC_CODEC_GREY:
             p_vout->p_sys->pf_filter = FilterPlanar;
             break;
 
-        case VLC_FOURCC('I','4','2','2'):
-        case VLC_FOURCC('J','4','2','2'):
+        case VLC_CODEC_I422:
+        case VLC_CODEC_J422:
             p_vout->p_sys->pf_filter = FilterI422;
             break;
 
index 72c6fb8898a01522b0fa3d517944ab11accc06fd..87125ba6efffd974e42401d98ecc5acde778cf94 100644 (file)
@@ -65,9 +65,9 @@ static int Open( vlc_object_t *p_this )
 
     /* It only supports YUVP to YUVA/RGBA without scaling
      * (if scaling is required another filter can do it) */
-    if( p_filter->fmt_in.video.i_chroma != VLC_FOURCC('Y','U','V','P') ||
-        ( p_filter->fmt_out.video.i_chroma != VLC_FOURCC('Y','U','V','A') &&
-          p_filter->fmt_out.video.i_chroma != VLC_FOURCC('R','G','B','A') ) ||
+    if( p_filter->fmt_in.video.i_chroma != VLC_CODEC_YUVP ||
+        ( p_filter->fmt_out.video.i_chroma != VLC_CODEC_YUVA &&
+          p_filter->fmt_out.video.i_chroma != VLC_CODEC_RGBA ) ||
         p_filter->fmt_in.video.i_width  != p_filter->fmt_out.video.i_width ||
         p_filter->fmt_in.video.i_height != p_filter->fmt_out.video.i_height )
     {
@@ -103,7 +103,7 @@ static picture_t *Filter( filter_t *p_filter, picture_t *p_pic )
     const video_palette_t *p_yuvp = p_filter->fmt_in.video.p_palette;
 
     assert( p_yuvp != NULL );
-    assert( p_filter->fmt_in.video.i_chroma == VLC_FOURCC('Y','U','V','P') );
+    assert( p_filter->fmt_in.video.i_chroma == VLC_CODEC_YUVP );
     assert( p_filter->fmt_in.video.i_width == p_filter->fmt_out.video.i_width );
     assert( p_filter->fmt_in.video.i_height == p_filter->fmt_out.video.i_height );
 
@@ -115,7 +115,7 @@ static picture_t *Filter( filter_t *p_filter, picture_t *p_pic )
         return NULL;
     }
 
-    if( p_filter->fmt_out.video.i_chroma == VLC_FOURCC('Y','U','V','A') )
+    if( p_filter->fmt_out.video.i_chroma == VLC_CODEC_YUVA )
     {
         for( unsigned int y = 0; y < p_filter->fmt_in.video.i_height; y++ )
         {
@@ -141,7 +141,7 @@ static picture_t *Filter( filter_t *p_filter, picture_t *p_pic )
     }
     else
     {
-        assert( p_filter->fmt_out.video.i_chroma == VLC_FOURCC('R','G','B','A') );
+        assert( p_filter->fmt_out.video.i_chroma == VLC_CODEC_RGBA );
 
         /* Create a RGBA palette */
         video_palette_t rgbp;
index 9777707117aa66232af98d229dd29ffef0bf7232..a46998fb0259a8397ede28b656b068f7068205c0 100644 (file)
@@ -127,7 +127,7 @@ static int Init( vout_thread_t *p_vout )
 
     I_OUTPUTPICTURES = 0;
 
-    p_vout->output.i_chroma = VLC_FOURCC('R','G','B','2');
+    p_vout->output.i_chroma = VLC_CODEC_RGB8;
     p_vout->output.i_width = p_vout->p_sys->i_width;
     p_vout->output.i_height = p_vout->p_sys->i_height;
     p_vout->output.i_aspect = p_vout->p_sys->i_width
index 63e437f26379b75a97d17b34263c03502d217d0a..d044a3d5ea0aff0a9caac7bfaca1fcddac107233 100644 (file)
@@ -215,7 +215,7 @@ static int Init( vout_thread_t *p_vout )
 
     I_OUTPUTPICTURES = 0;
 
-    p_vout->output.i_chroma = VLC_FOURCC('R','V','3','2');
+    p_vout->output.i_chroma = VLC_CODEC_RGB32;
     p_vout->output.i_width = p_vout->render.i_width;
     p_vout->output.i_height = p_vout->render.i_height;
     p_vout->output.i_aspect = p_vout->render.i_aspect;
index dce0dfadc2dfd38d4a4d11537d4880da87c8ed4d..83d753810d6ac56ed8fef8fb576f493828cce96c 100644 (file)
@@ -140,7 +140,7 @@ static int Init( vout_thread_t *p_vout )
             i_goffset = 2;
             i_blength = 2;
             i_boffset = 0;
-            p_vout->output.i_chroma = VLC_FOURCC('R','G','B','2');
+            p_vout->output.i_chroma = VLC_CODEC_RGB8;
             break;
 
         case DSPF_RGB16:
@@ -152,7 +152,7 @@ static int Init( vout_thread_t *p_vout )
             i_goffset = 5;
             i_blength = 5;
             i_boffset = 0;
-            p_vout->output.i_chroma = VLC_FOURCC('R','V','1','6');
+            p_vout->output.i_chroma = VLC_CODEC_RGB16
             break;
 
         case DSPF_RGB24:
@@ -164,7 +164,7 @@ static int Init( vout_thread_t *p_vout )
             i_goffset = 8;
             i_blength = 8;
             i_boffset = 0;
-            p_vout->output.i_chroma = VLC_FOURCC('R','V','2','4');
+            p_vout->output.i_chroma = VLC_CODEC_RGB24;
             break;
 
         case DSPF_RGB32:
@@ -176,7 +176,7 @@ static int Init( vout_thread_t *p_vout )
             i_goffset = 8;
             i_blength = 8;
             i_boffset = 0;
-            p_vout->output.i_chroma = VLC_FOURCC('R','V','3','2');
+            p_vout->output.i_chroma = VLC_CODEC_RGB32;
             break;
 
         default:
index 1796b70f7bf3dddb7b1d9e8451bcb793c0b7d22b..36bf04e2aed41d09d93bf6ec10714d0683caac3e 100644 (file)
@@ -227,10 +227,11 @@ static int Create( vlc_object_t *p_this )
     {
         if( strlen( psz_chroma ) == 4 )
         {
-            p_sys->i_chroma = VLC_FOURCC( psz_chroma[0],
-                                   psz_chroma[1],
-                                   psz_chroma[2],
-                                   psz_chroma[3] );
+            p_sys->i_chroma = vlc_fourcc_GetCodec( VIDEO_ES,
+                                                   VLC_FOURCC( psz_chroma[0],
+                                                               psz_chroma[1],
+                                                               psz_chroma[2],
+                                                               psz_chroma[3] ) );
             msg_Dbg( p_vout, "forcing chroma '%s'", psz_chroma );
         }
         else
@@ -487,15 +488,15 @@ static int Init( vout_thread_t *p_vout )
         switch( p_sys->var_info.bits_per_pixel )
         {
         case 8: /* FIXME: set the palette */
-            p_vout->output.i_chroma = VLC_FOURCC('R','G','B','2'); break;
+            p_vout->output.i_chroma = VLC_CODEC_RGB8; break;
         case 15:
-            p_vout->output.i_chroma = VLC_FOURCC('R','V','1','5'); break;
+            p_vout->output.i_chroma = VLC_CODEC_RGB15; break;
         case 16:
-            p_vout->output.i_chroma = VLC_FOURCC('R','V','1','6'); break;
+            p_vout->output.i_chroma = VLC_CODEC_RGB16; break;
         case 24:
-            p_vout->output.i_chroma = VLC_FOURCC('R','V','2','4'); break;
+            p_vout->output.i_chroma = VLC_CODEC_RGB24; break;
         case 32:
-            p_vout->output.i_chroma = VLC_FOURCC('R','V','3','2'); break;
+            p_vout->output.i_chroma = VLC_CODEC_RGB32; break;
         default:
             msg_Err( p_vout, "unknown screen depth %i",
                      p_vout->p_sys->var_info.bits_per_pixel );
index a5a0e6c39802ecdfc2f277d1679d33283394ab93..7f7c5d5464ffcb1645b2636081677e74d01f496f 100644 (file)
@@ -145,17 +145,17 @@ static int Init( vout_thread_t *p_vout )
     switch( p_vout->p_sys->i_bits_per_pixel )
     {
         case 8:
-            p_vout->output.i_chroma = VLC_FOURCC('R','G','B','2');
+            p_vout->output.i_chroma = VLC_CODEC_RGB8;
             p_vout->output.pf_setpalette = SetPalette;
             break;
         case 15:
-            p_vout->output.i_chroma = VLC_FOURCC('R','V','1','5'); break;
+            p_vout->output.i_chroma = VLC_CODEC_RGB15; break;
         case 16:
-            p_vout->output.i_chroma = VLC_FOURCC('R','V','1','6'); break;
+            p_vout->output.i_chroma = VLC_CODEC_RGB16; break;
         case 24:
-            p_vout->output.i_chroma = VLC_FOURCC('R','V','2','4'); break;
+            p_vout->output.i_chroma = VLC_CODEC_RGB24; break;
         case 32:
-            p_vout->output.i_chroma = VLC_FOURCC('R','V','3','2'); break;
+            p_vout->output.i_chroma = VLC_CODEC_RGB32; break;
         default:
             msg_Err( p_vout, "unknown screen depth %i",
                      p_vout->p_sys->i_bits_per_pixel );
index fa6b2058a9d24b6d8a0263f55992af3e380dbcab..37695a3b4202ff56e369dc09825cde21a3300e28 100644 (file)
@@ -171,7 +171,7 @@ static int Init( vout_thread_t *p_vout )
 
     I_OUTPUTPICTURES = 0;
 
-    p_vout->output.i_chroma = VLC_FOURCC('R','G','B','2');
+    p_vout->output.i_chroma = VLC_CODEC_RGB8;
     p_vout->output.i_width = p_vout->p_sys->i_width;
     p_vout->output.i_height = p_vout->p_sys->i_height;
     p_vout->output.i_aspect = p_vout->p_sys->i_width
@@ -181,15 +181,15 @@ static int Init( vout_thread_t *p_vout )
     switch( p_vout->p_sys->i_screen_depth )
     {
         case 8: /* FIXME: set the palette */
-            p_vout->output.i_chroma = VLC_FOURCC('R','G','B','2'); break;
+            p_vout->output.i_chroma = VLC_CODEC_RGB8; break;
         case 15:
-            p_vout->output.i_chroma = VLC_FOURCC('R','V','1','5'); break;
+            p_vout->output.i_chroma = VLC_CODEC_RGB15; break;
         case 16:
-            p_vout->output.i_chroma = VLC_FOURCC('R','V','1','6'); break;
+            p_vout->output.i_chroma = VLC_CODEC_RGB16; break;
         case 24:
-            p_vout->output.i_chroma = VLC_FOURCC('R','V','2','4'); break;
+            p_vout->output.i_chroma = VLC_CODEC_RGB24; break;
         case 32:
-            p_vout->output.i_chroma = VLC_FOURCC('R','V','3','2'); break;
+            p_vout->output.i_chroma = VLC_CODEC_RGB32; break;
         default:
             msg_Err( p_vout, "unknown screen depth %i",
                      p_vout->p_sys->i_screen_depth );
index 7ebcefcd8bdf140e3722074e005ce730ac597154..65ed9eee092041dd3c0d46c0661666cbb22d9e96 100644 (file)
@@ -188,7 +188,7 @@ static int Init( vout_thread_t *p_vout )
 
     /* Assume we only do YMGA for the moment. XXX: mga_vid calls this
      * YV12, but it's actually some strange format with packed UV. */
-    p_vout->output.i_chroma = VLC_FOURCC('Y','M','G','A');
+    p_vout->output.i_chroma = VLC_CODEC_YMGA;
     p_vout->p_sys->mga.format = MGA_VID_FORMAT_YV12;
 
     if( ioctl(p_vout->p_sys->i_fd, MGA_VID_CONFIG, &p_vout->p_sys->mga) )
index dcb73107bca90fae92ccb8f68b848d847169beb4..4503e27165146c8c799d6fbdc9aa5291d39dbf39 100644 (file)
@@ -883,17 +883,15 @@ static D3DFORMAT Direct3DVoutFindFormat(vout_thread_t *p_vout, int i_chroma, D3D
     /* it sounds like vista does not support YUV surfaces at all */
         switch( i_chroma )
         {
-            case VLC_FOURCC('U','Y','V','Y'):
-            case VLC_FOURCC('U','Y','N','V'):
-            case VLC_FOURCC('Y','4','2','2'):
+            case VLC_CODEC_UYVY:
             {
                 static const D3DFORMAT formats[] =
                     { D3DFMT_UYVY, D3DFMT_YUY2, D3DFMT_X8R8G8B8, D3DFMT_A8R8G8B8, D3DFMT_R5G6B5, D3DFMT_X1R5G5B5 };
                 return Direct3DVoutSelectFormat(p_vout, target, formats, sizeof(formats)/sizeof(D3DFORMAT));
             }
-            case VLC_FOURCC('I','4','2','0'):
-            case VLC_FOURCC('I','4','2','2'):
-            case VLC_FOURCC('Y','V','1','2'):
+            case VLC_CODEC_I420:
+            case VLC_CODEC_I422:
+            case VLC_CODEC_YV12:
             {
                 /* typically 3D textures don't support planar format
                 ** fallback to packed version and use CPU for the conversion
@@ -902,8 +900,7 @@ static D3DFORMAT Direct3DVoutFindFormat(vout_thread_t *p_vout, int i_chroma, D3D
                     { D3DFMT_YUY2, D3DFMT_UYVY, D3DFMT_X8R8G8B8, D3DFMT_A8R8G8B8, D3DFMT_R5G6B5, D3DFMT_X1R5G5B5 };
                 return Direct3DVoutSelectFormat(p_vout, target, formats, sizeof(formats)/sizeof(D3DFORMAT));
             }
-            case VLC_FOURCC('Y','U','Y','2'):
-            case VLC_FOURCC('Y','U','N','V'):
+            case VLC_CODEC_YUYV:
             {
                 static const D3DFORMAT formats[] =
                     { D3DFMT_YUY2, D3DFMT_UYVY, D3DFMT_X8R8G8B8, D3DFMT_A8R8G8B8, D3DFMT_R5G6B5, D3DFMT_X1R5G5B5 };
@@ -914,25 +911,25 @@ static D3DFORMAT Direct3DVoutFindFormat(vout_thread_t *p_vout, int i_chroma, D3D
 
     switch( i_chroma )
     {
-        case VLC_FOURCC('R', 'V', '1', '5'):
+        case VLC_CODEC_RGB15:
         {
             static const D3DFORMAT formats[] =
                 { D3DFMT_X1R5G5B5 };
             return Direct3DVoutSelectFormat(p_vout, target, formats, sizeof(formats)/sizeof(D3DFORMAT));
         }
-        case VLC_FOURCC('R', 'V', '1', '6'):
+        case VLC_CODEC_RGB16:
         {
             static const D3DFORMAT formats[] =
                 { D3DFMT_R5G6B5 };
             return Direct3DVoutSelectFormat(p_vout, target, formats, sizeof(formats)/sizeof(D3DFORMAT));
         }
-        case VLC_FOURCC('R', 'V', '2', '4'):
+        case VLC_CODEC_RGB24:
         {
             static const D3DFORMAT formats[] =
                 { D3DFMT_R8G8B8, D3DFMT_X8R8G8B8, D3DFMT_A8R8G8B8 };
             return Direct3DVoutSelectFormat(p_vout, target, formats, sizeof(formats)/sizeof(D3DFORMAT));
         }
-        case VLC_FOURCC('R', 'V', '3', '2'):
+        case VLC_CODEC_RGB32:
         {
             static const D3DFORMAT formats[] =
                 { D3DFMT_A8R8G8B8, D3DFMT_X8R8G8B8 };
@@ -980,32 +977,32 @@ static int Direct3DVoutSetOutputFormat(vout_thread_t *p_vout, D3DFORMAT format)
     switch( format )
     {
         case D3DFMT_YUY2:
-            p_vout->output.i_chroma = VLC_FOURCC('Y', 'U', 'Y', '2');
+            p_vout->output.i_chroma = VLC_CODEC_YUYV;
             break;
         case D3DFMT_UYVY:
-            p_vout->output.i_chroma = VLC_FOURCC('U', 'Y', 'V', 'Y');
+            p_vout->output.i_chroma = VLC_CODEC_UYVY;
             break;
         case D3DFMT_R8G8B8:
-            p_vout->output.i_chroma = VLC_FOURCC('R', 'V', '2', '4');
+            p_vout->output.i_chroma = VLC_CODEC_RGB24;
             p_vout->output.i_rmask = 0xff0000;
             p_vout->output.i_gmask = 0x00ff00;
             p_vout->output.i_bmask = 0x0000ff;
             break;
         case D3DFMT_X8R8G8B8:
         case D3DFMT_A8R8G8B8:
-            p_vout->output.i_chroma = VLC_FOURCC('R', 'V', '3', '2');
+            p_vout->output.i_chroma = VLC_CODEC_RGB32;
             p_vout->output.i_rmask = 0x00ff0000;
             p_vout->output.i_gmask = 0x0000ff00;
             p_vout->output.i_bmask = 0x000000ff;
             break;
         case D3DFMT_R5G6B5:
-            p_vout->output.i_chroma = VLC_FOURCC('R', 'V', '1', '6');
+            p_vout->output.i_chroma = VLC_CODEC_RGB16;
             p_vout->output.i_rmask = (0x1fL)<<11;
             p_vout->output.i_gmask = (0x3fL)<<5;
             p_vout->output.i_bmask = (0x1fL)<<0;
             break;
         case D3DFMT_X1R5G5B5:
-            p_vout->output.i_chroma = VLC_FOURCC('R', 'V', '1', '5');
+            p_vout->output.i_chroma = VLC_CODEC_RGB15;
             p_vout->output.i_rmask = (0x1fL)<<10;
             p_vout->output.i_gmask = (0x1fL)<<5;
             p_vout->output.i_bmask = (0x1fL)<<0;
@@ -1077,7 +1074,7 @@ static int Direct3DVoutCreatePictures( vout_thread_t *p_vout, size_t i_num_pics
          * picture_t structures */
         switch( p_vout->output.i_chroma )
         {
-            case VLC_FOURCC('R','G','B','2'):
+            case VLC_CODEC_RGB8:
                 p_pic->p->i_lines = p_vout->output.i_height;
                 p_pic->p->i_visible_lines = p_vout->output.i_height;
                 p_pic->p->i_pixel_pitch = 1;
@@ -1085,8 +1082,8 @@ static int Direct3DVoutCreatePictures( vout_thread_t *p_vout, size_t i_num_pics
                     p_pic->p->i_pixel_pitch;
                 p_pic->i_planes = 1;
             break;
-            case VLC_FOURCC('R','V','1','5'):
-            case VLC_FOURCC('R','V','1','6'):
+            case VLC_CODEC_RGB15:
+            case VLC_CODEC_RGB16:
                 p_pic->p->i_lines = p_vout->output.i_height;
                 p_pic->p->i_visible_lines = p_vout->output.i_height;
                 p_pic->p->i_pixel_pitch = 2;
@@ -1094,7 +1091,7 @@ static int Direct3DVoutCreatePictures( vout_thread_t *p_vout, size_t i_num_pics
                     p_pic->p->i_pixel_pitch;
                 p_pic->i_planes = 1;
             break;
-            case VLC_FOURCC('R','V','2','4'):
+            case VLC_CODEC_RGB24:
                 p_pic->p->i_lines = p_vout->output.i_height;
                 p_pic->p->i_visible_lines = p_vout->output.i_height;
                 p_pic->p->i_pixel_pitch = 3;
@@ -1102,7 +1099,7 @@ static int Direct3DVoutCreatePictures( vout_thread_t *p_vout, size_t i_num_pics
                     p_pic->p->i_pixel_pitch;
                 p_pic->i_planes = 1;
             break;
-            case VLC_FOURCC('R','V','3','2'):
+            case VLC_CODEC_RGB32:
                 p_pic->p->i_lines = p_vout->output.i_height;
                 p_pic->p->i_visible_lines = p_vout->output.i_height;
                 p_pic->p->i_pixel_pitch = 4;
@@ -1110,8 +1107,8 @@ static int Direct3DVoutCreatePictures( vout_thread_t *p_vout, size_t i_num_pics
                     p_pic->p->i_pixel_pitch;
                 p_pic->i_planes = 1;
                 break;
-            case VLC_FOURCC('U','Y','V','Y'):
-            case VLC_FOURCC('Y','U','Y','2'):
+            case VLC_CODEC_UYVY:
+            case VLC_CODEC_YUYV:
                 p_pic->p->i_lines = p_vout->output.i_height;
                 p_pic->p->i_visible_lines = p_vout->output.i_height;
                 p_pic->p->i_pixel_pitch = 2;
index 3d2ba7cec15cbee6c65abbf3cc5da11324735fc9..5844a6f53c8470c79d14ed719ce1d559cff8e682 100644 (file)
@@ -407,20 +407,17 @@ static int Init( vout_thread_t *p_vout )
     /* Choose the chroma we will try first. */
     switch( p_vout->render.i_chroma )
     {
-        case VLC_FOURCC('Y','U','Y','2'):
-        case VLC_FOURCC('Y','U','N','V'):
-            p_vout->output.i_chroma = VLC_FOURCC('Y','U','Y','2');
+        case VLC_CODEC_YUYV:
+            p_vout->output.i_chroma = VLC_CODEC_YUYV;
             break;
-        case VLC_FOURCC('U','Y','V','Y'):
-        case VLC_FOURCC('U','Y','N','V'):
-        case VLC_FOURCC('Y','4','2','2'):
-            p_vout->output.i_chroma = VLC_FOURCC('U','Y','V','Y');
+        case VLC_CODEC_UYVY:
+            p_vout->output.i_chroma = VLC_CODEC_UYVY;
             break;
-        case VLC_FOURCC('Y','V','Y','U'):
-            p_vout->output.i_chroma = VLC_FOURCC('Y','V','Y','U');
+        case VLC_CODEC_YVYU:
+            p_vout->output.i_chroma = VLC_CODEC_YVYU;
             break;
         default:
-            p_vout->output.i_chroma = VLC_FOURCC('Y','V','1','2');
+            p_vout->output.i_chroma = VLC_CODEC_YV12;
             break;
     }
 
@@ -431,15 +428,15 @@ static int Init( vout_thread_t *p_vout )
     if( !I_OUTPUTPICTURES )
     {
         /* hmmm, it didn't work! Let's try commonly supported chromas */
-        if( p_vout->output.i_chroma != VLC_FOURCC('I','4','2','0') )
+        if( p_vout->output.i_chroma != VLC_CODEC_I420 )
         {
-            p_vout->output.i_chroma = VLC_FOURCC('Y','V','1','2');
+            p_vout->output.i_chroma = VLC_CODEC_YV12;
             NewPictureVec( p_vout, p_vout->p_picture, MAX_DIRECTBUFFERS );
         }
         if( !I_OUTPUTPICTURES )
         {
             /* hmmm, it still didn't work! Let's try another one */
-            p_vout->output.i_chroma = VLC_FOURCC('Y','U','Y','2');
+            p_vout->output.i_chroma = VLC_CODEC_YUYV;
             NewPictureVec( p_vout, p_vout->p_picture, MAX_DIRECTBUFFERS );
         }
     }
@@ -1196,11 +1193,11 @@ static int DirectXCreateSurface( vout_thread_t *p_vout,
     if( !b_overlay )
     {
         bool b_rgb_surface =
-            ( i_chroma == VLC_FOURCC('R','G','B','2') )
-          || ( i_chroma == VLC_FOURCC('R','V','1','5') )
-           || ( i_chroma == VLC_FOURCC('R','V','1','6') )
-            || ( i_chroma == VLC_FOURCC('R','V','2','4') )
-             || ( i_chroma == VLC_FOURCC('R','V','3','2') );
+            ( i_chroma == VLC_CODEC_RGB8 )
+          || ( i_chroma == VLC_CODEC_RGB15 )
+           || ( i_chroma == VLC_CODEC_RGB16 )
+            || ( i_chroma == VLC_CODEC_RGB24 )
+             || ( i_chroma == VLC_CODEC_RGB32 );
 
         memset( &ddsd, 0, sizeof( DDSURFACEDESC ) );
         ddsd.dwSize = sizeof(DDSURFACEDESC);
@@ -1551,20 +1548,20 @@ static int NewPictureVec( vout_thread_t *p_vout, picture_t *p_pic,
                 switch( ddpfPixelFormat.dwRGBBitCount )
                 {
                 case 8:
-                    p_vout->output.i_chroma = VLC_FOURCC('R','G','B','2');
+                    p_vout->output.i_chroma = VLC_CODEC_RGB8;
                     p_vout->output.pf_setpalette = SetPalette;
                     break;
                 case 15:
-                    p_vout->output.i_chroma = VLC_FOURCC('R','V','1','5');
+                    p_vout->output.i_chroma = VLC_CODEC_RGB15;
                     break;
                 case 16:
-                    p_vout->output.i_chroma = VLC_FOURCC('R','V','1','6');
+                    p_vout->output.i_chroma = VLC_CODEC_RGB16;
                     break;
                 case 24:
-                    p_vout->output.i_chroma = VLC_FOURCC('R','V','2','4');
+                    p_vout->output.i_chroma = VLC_CODEC_RGB24;
                     break;
                 case 32:
-                    p_vout->output.i_chroma = VLC_FOURCC('R','V','3','2');
+                    p_vout->output.i_chroma = VLC_CODEC_RGB32;
                     break;
                 default:
                     msg_Err( p_vout, "unknown screen depth" );
@@ -1678,28 +1675,28 @@ static int UpdatePictureStruct( vout_thread_t *p_vout, picture_t *p_pic,
 {
     switch( p_vout->output.i_chroma )
     {
-        case VLC_FOURCC('R','G','B','2'):
-        case VLC_FOURCC('R','V','1','5'):
-        case VLC_FOURCC('R','V','1','6'):
-        case VLC_FOURCC('R','V','2','4'):
-        case VLC_FOURCC('R','V','3','2'):
+        case VLC_CODEC_RGB8:
+        case VLC_CODEC_RGB15:
+        case VLC_CODEC_RGB16:
+        case VLC_CODEC_RGB24:
+        case VLC_CODEC_RGB32:
             p_pic->p->p_pixels = p_pic->p_sys->ddsd.lpSurface;
             p_pic->p->i_lines = p_vout->output.i_height;
             p_pic->p->i_visible_lines = p_vout->output.i_height;
             p_pic->p->i_pitch = p_pic->p_sys->ddsd.lPitch;
             switch( p_vout->output.i_chroma )
             {
-                case VLC_FOURCC('R','G','B','2'):
+                case VLC_CODEC_RGB8:
                     p_pic->p->i_pixel_pitch = 1;
                     break;
-                case VLC_FOURCC('R','V','1','5'):
-                case VLC_FOURCC('R','V','1','6'):
+                case VLC_CODEC_RGB15:
+                case VLC_CODEC_RGB16:
                     p_pic->p->i_pixel_pitch = 2;
                     break;
-                case VLC_FOURCC('R','V','2','4'):
+                case VLC_CODEC_RGB24:
                     p_pic->p->i_pixel_pitch = 3;
                     break;
-                case VLC_FOURCC('R','V','3','2'):
+                case VLC_CODEC_RGB32:
                     p_pic->p->i_pixel_pitch = 4;
                     break;
                 default:
@@ -1710,12 +1707,11 @@ static int UpdatePictureStruct( vout_thread_t *p_vout, picture_t *p_pic,
             p_pic->i_planes = 1;
             break;
 
-        case VLC_FOURCC('Y','V','1','2'):
-        case VLC_FOURCC('I','4','2','0'):
+        case VLC_CODEC_YV12:
 
             /* U and V inverted compared to I420
              * Fixme: this should be handled by the vout core */
-            p_vout->output.i_chroma = VLC_FOURCC('I','4','2','0');
+            p_vout->output.i_chroma = VLC_CODEC_I420;
 
             p_pic->Y_PIXELS = p_pic->p_sys->ddsd.lpSurface;
             p_pic->p[Y_PLANE].i_lines = p_vout->output.i_height;
@@ -1746,7 +1742,7 @@ static int UpdatePictureStruct( vout_thread_t *p_vout, picture_t *p_pic,
             p_pic->i_planes = 3;
             break;
 
-        case VLC_FOURCC('I','Y','U','V'):
+        case VLC_CODEC_I420:
 
             p_pic->Y_PIXELS = p_pic->p_sys->ddsd.lpSurface;
             p_pic->p[Y_PLANE].i_lines = p_vout->output.i_height;
@@ -1777,8 +1773,8 @@ static int UpdatePictureStruct( vout_thread_t *p_vout, picture_t *p_pic,
             p_pic->i_planes = 3;
             break;
 
-        case VLC_FOURCC('U','Y','V','Y'):
-        case VLC_FOURCC('Y','U','Y','2'):
+        case VLC_CODEC_UYVY:
+        case VLC_CODEC_YUYV:
 
             p_pic->p->p_pixels = p_pic->p_sys->ddsd.lpSurface;
             p_pic->p->i_lines = p_vout->output.i_height;
index c725d66110c1df8ade309c3318d8ae6a7fc638d8..706aded1725d59e795381d183d84c8e4e55f4842 100644 (file)
@@ -379,29 +379,29 @@ static int Init( vout_thread_t *p_vout )
     switch( p_vout->p_sys->i_depth )
     {
     case 8:
-        p_vout->output.i_chroma = VLC_FOURCC('R','G','B','2');
+        p_vout->output.i_chroma = VLC_CODEC_RGB8;
         p_vout->output.pf_setpalette = SetPalette;
         break;
     case 15:
-        p_vout->output.i_chroma = VLC_FOURCC('R','V','1','5');
+        p_vout->output.i_chroma = VLC_CODEC_RGB15;
         p_vout->output.i_rmask  = 0x7c00;
         p_vout->output.i_gmask  = 0x03e0;
         p_vout->output.i_bmask  = 0x001f;
         break;
     case 16:
-        p_vout->output.i_chroma = VLC_FOURCC('R','V','1','6');
+        p_vout->output.i_chroma = VLC_CODEC_RGB16;
         p_vout->output.i_rmask  = 0xf800;
         p_vout->output.i_gmask  = 0x07e0;
         p_vout->output.i_bmask  = 0x001f;
         break;
     case 24:
-        p_vout->output.i_chroma = VLC_FOURCC('R','V','2','4');
+        p_vout->output.i_chroma = VLC_CODEC_RGB24;
         p_vout->output.i_rmask  = 0x00ff0000;
         p_vout->output.i_gmask  = 0x0000ff00;
         p_vout->output.i_bmask  = 0x000000ff;
         break;
     case 32:
-        p_vout->output.i_chroma = VLC_FOURCC('R','V','3','2');
+        p_vout->output.i_chroma = VLC_CODEC_RGB32;
         p_vout->output.i_rmask  = 0x00ff0000;
         p_vout->output.i_gmask  = 0x0000ff00;
         p_vout->output.i_bmask  = 0x000000ff;
index 95c2eaf2e604bbce6605bae621bab2979a0d1344..9d895645f4ed29dcd70aa07d669e5d480a0e2f36 100644 (file)
@@ -185,9 +185,8 @@ static int Create( vlc_object_t *p_this )
     vout_thread_t *p_vout = (vout_thread_t *)p_this;
     vout_sys_t    *p_sys;
 
-    if( p_vout->fmt_in.i_chroma != VLC_FOURCC('I','4','2','0') &&
-        p_vout->fmt_in.i_chroma != VLC_FOURCC('I','Y','U','V') &&
-        p_vout->fmt_in.i_chroma != VLC_FOURCC('Y','V','1','2') )
+    if( p_vout->fmt_in.i_chroma != VLC_CODEC_I420 &&
+        p_vout->fmt_in.i_chroma != VLC_CODEC_YV12 )
         return VLC_EGENERIC;
 
     /* Allocate instance and initialize some members */
@@ -308,7 +307,7 @@ static int Init( vout_thread_t *p_vout )
     }
 
     p_vout->output.i_chroma =
-    p_vout->fmt_out.i_chroma = VLC_FOURCC( 'Y','4','2','0' );
+    p_vout->fmt_out.i_chroma = VLC_CODEC_I420;
     p_sys->i_color_format = OMAPFB_COLOR_YUV420;
 
     // place in the framebuffer where we have to write
index 3fbe5e642feda3306762b49a135bcafe7fc2af96..2a3ca2b6a4cfa1b9f27067b707d0a85e8d39faf7 100644 (file)
@@ -250,16 +250,16 @@ static int Init( vout_thread_t *p_vout )
 
 /* TODO: We use YCbCr on Mac which is Y422, but on OSX it seems to == YUY2. Verify */
 #if ( defined( WORDS_BIGENDIAN ) && VLCGL_FORMAT == GL_YCBCR_422_APPLE ) || (VLCGL_FORMAT == YCBCR_MESA)
-    p_vout->output.i_chroma = VLC_FOURCC('Y','U','Y','2');
+    p_vout->output.i_chroma = VLC_CODEC_YUYV;
     i_pixel_pitch = 2;
 
 #elif (VLCGL_FORMAT == GL_YCBCR_422_APPLE)
-    p_vout->output.i_chroma = VLC_FOURCC('U','Y','V','Y');
+    p_vout->output.i_chroma = VLC_CODEC_UYVY;
     i_pixel_pitch = 2;
 
 #elif VLCGL_FORMAT == GL_RGB
 #   if VLCGL_TYPE == GL_UNSIGNED_BYTE
-    p_vout->output.i_chroma = VLC_FOURCC('R','V','2','4');
+    p_vout->output.i_chroma = VLC_CODEC_RGB24;
 #       if defined( WORDS_BIGENDIAN )
     p_vout->output.i_rmask = 0x00ff0000;
     p_vout->output.i_gmask = 0x0000ff00;
@@ -271,7 +271,7 @@ static int Init( vout_thread_t *p_vout )
 #       endif
     i_pixel_pitch = 3;
 #   else
-    p_vout->output.i_chroma = VLC_FOURCC('R','V','1','6');
+    p_vout->output.i_chroma = VLC_CODEC_RGB16;
 #       if defined( WORDS_BIGENDIAN )
     p_vout->output.i_rmask = 0x001f;
     p_vout->output.i_gmask = 0x07e0;
@@ -284,7 +284,7 @@ static int Init( vout_thread_t *p_vout )
     i_pixel_pitch = 2;
 #   endif
 #else
-    p_vout->output.i_chroma = VLC_FOURCC('R','V','3','2');
+    p_vout->output.i_chroma = VLC_CODEC_RGB32;
 #       if defined( WORDS_BIGENDIAN )
     p_vout->output.i_rmask = 0xff000000;
     p_vout->output.i_gmask = 0x00ff0000;
index fe7518f052d7d132e1cf74caac9145d42720d036..fe5717c03b1ca7f28eb467bb5e1d3a90433697b6 100644 (file)
@@ -170,10 +170,10 @@ static int Init( vout_thread_t *p_vout )
     vlc_value_t val;
 
 #if ( defined( WORDS_BIGENDIAN ) && VLCGL_FORMAT == GL_YCBCR_422_APPLE ) || (VLCGL_FORMAT == YCBCR_MESA)
-    p_vout->output.i_chroma = VLC_FOURCC('Y','U','Y','2');
+    p_vout->output.i_chroma = VLC_CODEC_YUYV;
     i_pixel_pitch = 2;
 #elif (VLCGL_FORMAT == GL_YCBCR_422_APPLE)
-    p_vout->output.i_chroma = VLC_FOURCC('U','Y','V','Y');
+    p_vout->output.i_chroma = VLC_CODEC_UYVY;
     i_pixel_pitch = 2;
 #endif
 
index 1c310bc5a494d4e9dda8f25928c0d955bc8680a0..f91acd7b3eeeda38734d48da33ceae98d7012b00 100644 (file)
@@ -218,7 +218,7 @@ static int Init( vout_thread_t *p_vout )
 
     I_OUTPUTPICTURES = 0;
 
-    p_vout->output.i_chroma = (dd == 16) ? VLC_FOURCC('R','V','1','6'): VLC_FOURCC('R','V','3','2');
+    p_vout->output.i_chroma = (dd == 16) ? VLC_CODEC_RGB16 : VLC_CODEC_RGB32;
     p_vout->output.i_rmask  = 0xf800;
     p_vout->output.i_gmask  = 0x07e0;
     p_vout->output.i_bmask  = 0x001f;
index ac19b285905b9388cf81d8177d4b978912e1bfe7..f2cfa7449a489dd2e02a2702bc956e98e0fb4423 100644 (file)
@@ -799,6 +799,7 @@ static int OpenDisplay( vout_thread_t *p_vout )
         if( strlen( psz_chroma ) >= 4 )
         {
             memcpy(&i_chroma, psz_chroma, 4);
+            i_chroma = vlc_fourcc_GetCodec( VIDEO_ES, i_chroma );
             msg_Dbg( p_vout, "Forcing chroma to 0x%.8x (%4.4s)", i_chroma, (char*)&i_chroma );
         }
         else
@@ -816,26 +817,22 @@ static int OpenDisplay( vout_thread_t *p_vout )
             if( !psz_chroma ) i_chroma = 0;
             switch( i_chroma ? i_chroma : p_vout->render.i_chroma )
             {
-                case VLC_FOURCC('Y','U','Y','2'):
-                case VLC_FOURCC('Y','U','N','V'):
-                    p_vout->output.i_chroma = VLC_FOURCC('Y','U','Y','2');
+                case VLC_CODEC_YUYV:
+                    p_vout->output.i_chroma = VLC_CODEC_YUYV;
                     i_sdl_chroma = SDL_YUY2_OVERLAY;
                     break;
-                case VLC_FOURCC('U','Y','V','Y'):
-                case VLC_FOURCC('U','Y','N','V'):
-                case VLC_FOURCC('Y','4','2','2'):
-                    p_vout->output.i_chroma = VLC_FOURCC('U','Y','V','Y');
+                case VLC_CODEC_UYVY:
+                    p_vout->output.i_chroma = VLC_CODEC_UYVY;
                     i_sdl_chroma = SDL_UYVY_OVERLAY;
                     break;
-                case VLC_FOURCC('Y','V','Y','U'):
-                    p_vout->output.i_chroma = VLC_FOURCC('Y','V','Y','U');
+                case VLC_CODEC_YVYU:
+                    p_vout->output.i_chroma = VLC_CODEC_YVYU;
                     i_sdl_chroma = SDL_YVYU_OVERLAY;
                     break;
-                case VLC_FOURCC('Y','V','1','2'):
-                case VLC_FOURCC('I','4','2','0'):
-                case VLC_FOURCC('I','Y','U','V'):
+                case VLC_CODEC_YV12:
+                case VLC_CODEC_I420:
                 default:
-                    p_vout->output.i_chroma = VLC_FOURCC('Y','V','1','2');
+                    p_vout->output.i_chroma = VLC_CODEC_YV12;
                     i_sdl_chroma = SDL_YV12_OVERLAY;
                     break;
             }
@@ -853,7 +850,7 @@ static int OpenDisplay( vout_thread_t *p_vout )
         /* If this best choice failed, fall back to other chromas */
         if( p_vout->p_sys->p_overlay == NULL )
         {
-            p_vout->output.i_chroma = VLC_FOURCC('I','Y','U','V');
+            p_vout->output.i_chroma = VLC_CODEC_I420;
             p_vout->p_sys->p_overlay =
                 SDL_CreateYUVOverlay( 32, 32, SDL_IYUV_OVERLAY,
                                       p_vout->p_sys->p_display );
@@ -861,7 +858,7 @@ static int OpenDisplay( vout_thread_t *p_vout )
 
         if( p_vout->p_sys->p_overlay == NULL )
         {
-            p_vout->output.i_chroma = VLC_FOURCC('Y','V','1','2');
+            p_vout->output.i_chroma = VLC_CODEC_YV12;
             p_vout->p_sys->p_overlay =
                 SDL_CreateYUVOverlay( 32, 32, SDL_YV12_OVERLAY,
                                       p_vout->p_sys->p_display );
@@ -869,7 +866,7 @@ static int OpenDisplay( vout_thread_t *p_vout )
 
         if( p_vout->p_sys->p_overlay == NULL )
         {
-            p_vout->output.i_chroma = VLC_FOURCC('Y','U','Y','2');
+            p_vout->output.i_chroma = VLC_CODEC_YUYV;
             p_vout->p_sys->p_overlay =
                 SDL_CreateYUVOverlay( 32, 32, SDL_YUY2_OVERLAY,
                                       p_vout->p_sys->p_display );
@@ -888,20 +885,20 @@ static int OpenDisplay( vout_thread_t *p_vout )
         switch( p_vout->p_sys->p_display->format->BitsPerPixel )
         {
             case 8:
-                p_vout->output.i_chroma = VLC_FOURCC('R','G','B','2');
+                p_vout->output.i_chroma = VLC_CODEC_RGB8;
                 p_vout->output.pf_setpalette = SetPalette;
                 break;
             case 15:
-                p_vout->output.i_chroma = VLC_FOURCC('R','V','1','5');
+                p_vout->output.i_chroma = VLC_CODEC_RGB15;
                 break;
             case 16:
-                p_vout->output.i_chroma = VLC_FOURCC('R','V','1','6');
+                p_vout->output.i_chroma = VLC_CODEC_RGB16;
                 break;
             case 24:
-                p_vout->output.i_chroma = VLC_FOURCC('R','V','2','4');
+                p_vout->output.i_chroma = VLC_CODEC_RGB24;
                 break;
             case 32:
-                p_vout->output.i_chroma = VLC_FOURCC('R','V','3','2');
+                p_vout->output.i_chroma = VLC_CODEC_RGB32;
                 break;
             default:
                 msg_Err( p_vout, "unknown screen depth %i",
index b5dce2551fd7ae80b7e1207c1bd845dfae986a01..49bf815c372a191da54e66b1452a711546a5498f 100644 (file)
@@ -168,8 +168,9 @@ static int Init( vout_thread_t *p_vout )
             msg_Err( p_vout, "snapshot-chroma should be 4 characters long" );
             return VLC_EGENERIC;
         }
-        i_chroma = VLC_FOURCC( psz_chroma[0], psz_chroma[1],
-                               psz_chroma[2], psz_chroma[3] );
+        i_chroma = vlc_fourcc_GetCodec( VIDEO_ES,
+                                        VLC_FOURCC( psz_chroma[0], psz_chroma[1],
+                                                    psz_chroma[2], psz_chroma[3] ) );
         free( psz_chroma );
     }
     else
@@ -192,25 +193,25 @@ static int Init( vout_thread_t *p_vout )
     /* Define the bitmasks */
     switch( i_chroma )
     {
-      case VLC_FOURCC( 'R','V','1','5' ):
+      case VLC_CODEC_RGB15;
         p_vout->output.i_rmask = 0x001f;
         p_vout->output.i_gmask = 0x03e0;
         p_vout->output.i_bmask = 0x7c00;
         break;
 
-      case VLC_FOURCC( 'R','V','1','6' ):
+      case VLC_CODEC_RGB16;
         p_vout->output.i_rmask = 0x001f;
         p_vout->output.i_gmask = 0x07e0;
         p_vout->output.i_bmask = 0xf800;
         break;
 
-      case VLC_FOURCC( 'R','V','2','4' ):
+      case VLC_CODEC_RGB24;
         p_vout->output.i_rmask = 0xff0000;
         p_vout->output.i_gmask = 0x00ff00;
         p_vout->output.i_bmask = 0x0000ff;
         break;
 
-      case VLC_FOURCC( 'R','V','3','2' ):
+      case VLC_CODEC_RGB32:
         p_vout->output.i_rmask = 0xff0000;
         p_vout->output.i_gmask = 0x00ff00;
         p_vout->output.i_bmask = 0x0000ff;
index ae99b3452922115ed140c74a8ddae8aea6412f4e..fbe3fda6235f0d737943f5b9545722067ae9f8cb 100644 (file)
@@ -155,7 +155,7 @@ static int Init( vout_thread_t *p_vout )
 
     /* Initialize the output structure: RGB with square pixels, whatever
      * the input format is, since it's the only format we know */
-    p_vout->output.i_chroma = VLC_FOURCC('R','G','B','2');
+    p_vout->output.i_chroma = VLC_CODEC_RGB8;
     p_vout->output.pf_setpalette = SetPalette;
     p_vout->output.i_width = vga_getxdim();
     p_vout->output.i_height = vga_getydim();
index f132021a2d8e5ef690a9d37753e8bfbafc0b080e..17ba736ff3fb2b5d9eb3e6f312a1320254a35cea 100644 (file)
@@ -148,8 +148,9 @@ static int Init( vout_thread_t *p_vout )
             free( psz_chroma );
             return VLC_EGENERIC;
         }
-        i_chroma = VLC_FOURCC( psz_chroma[0], psz_chroma[1],
-                               psz_chroma[2], psz_chroma[3] );
+        i_chroma = vlc_fourcc_GetCodec( VIDEO_ES,
+                                        VLC_FOURCC( psz_chroma[0], psz_chroma[1],
+                                                    psz_chroma[2], psz_chroma[3] ) );
         free( psz_chroma );
     }
     else
@@ -189,25 +190,25 @@ static int Init( vout_thread_t *p_vout )
     /* Define the bitmasks */
     switch( i_chroma )
     {
-      case VLC_FOURCC( 'R','V','1','5' ):
+      case VLC_CODEC_RGB15:
         p_vout->output.i_rmask = 0x001f;
         p_vout->output.i_gmask = 0x03e0;
         p_vout->output.i_bmask = 0x7c00;
         break;
 
-      case VLC_FOURCC( 'R','V','1','6' ):
+      case VLC_CODEC_RGB16:
         p_vout->output.i_rmask = 0x001f;
         p_vout->output.i_gmask = 0x07e0;
         p_vout->output.i_bmask = 0xf800;
         break;
 
-      case VLC_FOURCC( 'R','V','2','4' ):
+      case VLC_CODEC_RGB24:
         p_vout->output.i_rmask = 0xff0000;
         p_vout->output.i_gmask = 0x00ff00;
         p_vout->output.i_bmask = 0x0000ff;
         break;
 
-      case VLC_FOURCC( 'R','V','3','2' ):
+      case VLC_CODEC_RGB32:
         p_vout->output.i_rmask = 0xff0000;
         p_vout->output.i_gmask = 0x00ff00;
         p_vout->output.i_bmask = 0x0000ff;
index ea973d8663a051e78887f14b0ccea3e899310188..e142ae16926b2b438574d93e9f8c3a6f6d7416be 100644 (file)
@@ -286,7 +286,7 @@ int Activate ( vlc_object_t *p_this )
             }
         }
     }
-    p_vout->output.i_chroma = X112VLC_FOURCC(p_vout->output.i_chroma);
+    p_vout->output.i_chroma = vlc_fourcc_GetCodec( VIDEO_ES, X112VLC_FOURCC(p_vout->output.i_chroma) );
 #elif defined(MODULE_NAME_IS_glx)
     {
         int i_opcode, i_evt, i_err = 0;
@@ -812,7 +812,7 @@ static int InitVideo( vout_thread_t *p_vout )
 #if XvVersion < 2 || ( XvVersion == 2 && XvRevision < 2 )
     switch( p_vout->output.i_chroma )
     {
-        case VLC_FOURCC('R','V','1','6'):
+        case VLC_CODEC_RGB16:
 #if defined( WORDS_BIGENDIAN )
             p_vout->output.i_rmask = 0xf800;
             p_vout->output.i_gmask = 0x07e0;
@@ -823,7 +823,7 @@ static int InitVideo( vout_thread_t *p_vout )
             p_vout->output.i_bmask = 0xf800;
 #endif
             break;
-        case VLC_FOURCC('R','V','1','5'):
+        case VLC_CODEC_RGB15:
 #if defined( WORDS_BIGENDIAN )
             p_vout->output.i_rmask = 0x7c00;
             p_vout->output.i_gmask = 0x03e0;
@@ -843,14 +843,14 @@ static int InitVideo( vout_thread_t *p_vout )
     switch( p_vout->p_sys->i_screen_depth )
     {
         case 8: /* FIXME: set the palette */
-            p_vout->output.i_chroma = VLC_FOURCC('R','G','B','2'); break;
+            p_vout->output.i_chroma = VLC_CODEC_RGB8; break;
         case 15:
-            p_vout->output.i_chroma = VLC_FOURCC('R','V','1','5'); break;
+            p_vout->output.i_chroma = VLC_CODEC_RGB15; break;
         case 16:
-            p_vout->output.i_chroma = VLC_FOURCC('R','V','1','6'); break;
+            p_vout->output.i_chroma = VLC_CODEC_RGB16; break;
         case 24:
         case 32:
-            p_vout->output.i_chroma = VLC_FOURCC('R','V','3','2'); break;
+            p_vout->output.i_chroma = VLC_CODEC_RGB32; break;
         default:
             msg_Err( p_vout, "unknown screen depth %i",
                      p_vout->p_sys->i_screen_depth );
@@ -926,12 +926,12 @@ static int InitVideo( vout_thread_t *p_vout )
         I_OUTPUTPICTURES++;
     }
 
-    if( p_vout->output.i_chroma == VLC_FOURCC('Y','V','1','2') )
+    if( p_vout->output.i_chroma == VLC_CODEC_YV12 )
     {
         /* U and V inverted compared to I420
          * Fixme: this should be handled by the vout core */
-        p_vout->output.i_chroma = VLC_FOURCC('I','4','2','0');
-        p_vout->fmt_out.i_chroma = VLC_FOURCC('I','4','2','0');
+        p_vout->output.i_chroma = VLC_CODEC_I420;
+        p_vout->fmt_out.i_chroma = VLC_CODEC_I420;
     }
 
     return VLC_SUCCESS;
@@ -1958,15 +1958,15 @@ static int NewPicture( vout_thread_t *p_vout, picture_t *p_pic )
     switch( p_vout->output.i_chroma )
     {
 #if defined(MODULE_NAME_IS_xvideo) || defined(MODULE_NAME_IS_xvmc)
-        case VLC_FOURCC('I','4','2','0'):
-        case VLC_FOURCC('Y','V','1','2'):
-        case VLC_FOURCC('Y','2','1','1'):
-        case VLC_FOURCC('Y','U','Y','2'):
-        case VLC_FOURCC('U','Y','V','Y'):
-        case VLC_FOURCC('R','V','1','5'):
-        case VLC_FOURCC('R','V','1','6'):
-        case VLC_FOURCC('R','V','2','4'): /* Fixme: pixel pitch == 4 ? */
-        case VLC_FOURCC('R','V','3','2'):
+        case VLC_CODEC_I420:
+        case VLC_CODEC_YV12:
+        case VLC_CODEC_Y211:
+        case VLC_CODEC_YUYV:
+        case VLC_CODEC_UYVY:
+        case VLC_CODEC_RGB15:
+        case VLC_CODEC_RGB16:
+        case VLC_CODEC_RGB24: /* Fixme: pixel pitch == 4 ? */
+        case VLC_CODEC_RGB32:
 
             for( i_plane = 0; i_plane < p_pic->p_sys->p_image->num_planes;
                  i_plane++ )
@@ -1976,7 +1976,7 @@ static int NewPicture( vout_thread_t *p_vout, picture_t *p_pic )
                 p_pic->p[i_plane].i_pitch =
                     p_pic->p_sys->p_image->pitches[i_plane];
             }
-            if( p_vout->output.i_chroma == VLC_FOURCC('Y','V','1','2') )
+            if( p_vout->output.i_chroma == VLC_CODEC_YV12 )
             {
                 /* U and V inverted compared to I420
                  * Fixme: this should be handled by the vout core */
@@ -1989,11 +1989,11 @@ static int NewPicture( vout_thread_t *p_vout, picture_t *p_pic )
             break;
 
 #else
-        case VLC_FOURCC('R','G','B','2'):
-        case VLC_FOURCC('R','V','1','6'):
-        case VLC_FOURCC('R','V','1','5'):
-        case VLC_FOURCC('R','V','2','4'):
-        case VLC_FOURCC('R','V','3','2'):
+        case VLC_CODEC_RGB8:
+        case VLC_CODEC_RGB16:
+        case VLC_CODEC_RGB15:
+        case VLC_CODEC_RGB24:
+        case VLC_CODEC_RGB32:
 
             p_pic->p->i_lines = p_pic->p_sys->p_image->height;
             p_pic->p->i_visible_lines = p_pic->p_sys->p_image->height;
index 0c5a1234e77cecaa73570614874214463168f928..6ee3f963d3d0e6853863b7a260ce8ebe2b560b4d 100644 (file)
@@ -148,26 +148,26 @@ static int Open (vlc_object_t *obj)
         {
           case 24:
             if (fmt->bits_per_pixel == 32)
-                chroma = VLC_FOURCC ('R', 'V', '3', '2');
+                chroma = VLC_CODEC_RGB32;
             else if (fmt->bits_per_pixel == 24)
-                chroma = VLC_FOURCC ('R', 'V', '2', '4');
+                chroma = VLC_CODEC_RGB24;
             else
                 continue;
             break;
           case 16:
             if (fmt->bits_per_pixel != 16)
                 continue;
-            chroma = VLC_FOURCC ('R', 'V', '1', '6');
+            chroma = VLC_CODEC_RGB16;
             break;
           case 15:
             if (fmt->bits_per_pixel != 16)
                 continue;
-            chroma = VLC_FOURCC ('R', 'V', '1', '5');
+            chroma = VLC_CODEC_RGB15;
             break;
           case 8:
             if (fmt->bits_per_pixel != 8)
                 continue;
-            chroma = VLC_FOURCC ('R', 'G', 'B', '2');
+            chroma = VLC_CODEC_RGB8;
             break;
           default:
             continue;
@@ -202,7 +202,7 @@ static int Open (vlc_object_t *obj)
                 if (!gray)
                     continue; /* Prefer color over gray scale */
                 vid = vt->visual_id;
-                chroma = VLC_FOURCC ('G', 'R', 'E', 'Y');
+                chroma = VLC_CODEC_GREY;
             }
         }
 
index 0e99035be87489a688470870155a94bf45a7c2c2..ceffaf979cb9614d71f391d53facd606b01dc7e0 100644 (file)
@@ -249,21 +249,21 @@ static vlc_fourcc_t ParseFormat (vout_thread_t *vout,
             {
               case 32:
                 if (f->depth == 24)
-                    return VLC_FOURCC ('R', 'V', '3', '2');
+                    return VLC_CODEC_RGB32;
                 break;
               case 24:
                 if (f->depth == 24)
-                    return VLC_FOURCC ('R', 'V', '2', '4');
+                    return VLC_CODEC_RGB24;
                 break;
               case 16:
                 if (f->depth == 16)
-                    return VLC_FOURCC ('R', 'V', '1', '6');
+                    return VLC_CODEC_RGB16;
                 if (f->depth == 15)
-                    return VLC_FOURCC ('R', 'V', '1', '5');
+                    return VLC_CODEC_RGB15;
                 break;
               case 8:
                 if (f->depth == 8)
-                    return VLC_FOURCC ('R', 'G', 'B', '2');
+                    return VLC_CODEC_RGB8;
                 break;
             }
             break;
@@ -288,15 +288,15 @@ static vlc_fourcc_t ParseFormat (vout_thread_t *vout,
             {
               /*untested: case 24:
                 if (f->vhorz_u_period == 1 && f->vvert_u_period == 1)
-                    return VLC_FOURCC ('I', '4', '4', '4');
+                    return VLC_CODEC_I444;
                 break;*/
               case 16:
                 if (f->vhorz_u_period == 2 && f->vvert_u_period == 1)
                 {
                     if (!strcmp ((const char *)f->vcomp_order, "YUYV"))
-                        return VLC_FOURCC ('Y', 'U', 'Y', '2');
+                        return VLC_CODEC_YUYV;
                     if (!strcmp ((const char *)f->vcomp_order, "UYVY"))
-                        return VLC_FOURCC ('U', 'Y', 'V', 'Y');
+                        return VLC_CODEC_UYVY;
                 }
                 break;
             }
@@ -308,9 +308,9 @@ static vlc_fourcc_t ParseFormat (vout_thread_t *vout,
                 if (f->vhorz_u_period == 2 && f->vvert_u_period == 2)
                 {
                     if (!strcmp ((const char *)f->vcomp_order, "YVU"))
-                        return VLC_FOURCC ('Y', 'V', '1', '2');
+                        return VLC_CODEC_YV12;
                     if (!strcmp ((const char *)f->vcomp_order, "YUV"))
-                        return VLC_FOURCC ('I', '4', '2', '0');
+                        return VLC_CODEC_I420;
                 }
             }
             break;
@@ -401,9 +401,9 @@ static int Init (vout_thread_t *vout)
         /* Video chroma in preference order */
         const vlc_fourcc_t chromas[] = {
             vout->fmt_in.i_chroma,
-            VLC_FOURCC ('Y', 'U', 'Y', '2'),
-            VLC_FOURCC ('R', 'V', '2', '4'),
-            VLC_FOURCC ('R', 'V', '1', '5'),
+            VLC_CODEC_YUYV,
+            VLC_CODEC_RGB24,
+            VLC_CODEC_RGB15,
         };
         for (size_t i = 0; i < sizeof (chromas) / sizeof (chromas[0]); i++)
         {
index cd73fb8645b595e3db0945e9f215b3decb07fd34..fffb6009b8c5ada07ea0c54f49c36762f1037ed2 100644 (file)
@@ -121,7 +121,7 @@ static int Create( vlc_object_t *p_this )
     p_sys->p_fd = NULL;
 
     p_sys->b_yuv4mpeg2 = var_CreateGetBool( p_this, CFG_PREFIX "yuv4mpeg2" );
-    p_sys->i_chroma = VLC_FOURCC('I','4','2','0');
+    p_sys->i_chroma = VLC_CODEC_I420;
 
     p_sys->psz_file =
             var_CreateGetString( p_this, CFG_PREFIX "file" );
@@ -136,8 +136,9 @@ static int Create( vlc_object_t *p_this )
     psz_fcc = var_CreateGetNonEmptyString( p_this, CFG_PREFIX "chroma" );
     if( psz_fcc && (strlen( psz_fcc ) == 4) )
     {
-        p_sys->i_chroma = VLC_FOURCC( psz_fcc[0], psz_fcc[1],
-                                      psz_fcc[2], psz_fcc[3] );
+        p_sys->i_chroma = vlc_fourcc_GetCodec( VIDEO_ES,
+                                               VLC_FOURCC( psz_fcc[0], psz_fcc[1],
+                                                           psz_fcc[2], psz_fcc[3] ) );
     }
     free( psz_fcc );
 
@@ -145,10 +146,9 @@ static int Create( vlc_object_t *p_this )
     {
         switch( p_sys->i_chroma )
         {
-            case VLC_FOURCC('Y','V','1','2'):
-            case VLC_FOURCC('I','4','2','0'):
-            case VLC_FOURCC('I','Y','U','V'):
-            case VLC_FOURCC('J','4','2','0'):
+            case VLC_CODEC_YV12:
+            case VLC_CODEC_I420:
+            case VLC_CODEC_J420:
                 break;
             default:
                 msg_Err( p_this,
index 285ae50995c6af3acc9da9ebe776e751d0b90d05..97cfca3ec621c4cc086c8d68dbefc6f257baf545 100644 (file)
@@ -79,8 +79,8 @@ static int Open( vlc_object_t *p_this )
     aout_filter_sys_t *p_sys;
     galaktos_thread_t *p_thread;
 
-    if ( p_filter->input.i_format != VLC_FOURCC('f','l','3','2' )
-         || p_filter->output.i_format != VLC_FOURCC('f','l','3','2') )
+    if( p_filter->input.i_format != VLC_CODEC_FL32 ||
+        p_filter->output.i_format != VLC_CODEC_FL32 )
     {
         msg_Warn( p_filter, "bad input or output format" );
         return VLC_EGENERIC;
@@ -211,8 +211,7 @@ static void* Thread( vlc_object_t *p_this )
 
     /* Initialize vout parameters */
     vout_InitFormat( &p_thread->p_opengl->fmt_in,
-                     VLC_FOURCC('R','V','3','2'),
-                     p_thread->i_width, p_thread->i_height, 1 );
+                     VLC_CODEC_RGB32, p_thread->i_width, p_thread->i_height, 1 );
     p_thread->p_opengl->i_window_width = p_thread->i_width;
     p_thread->p_opengl->i_window_height = p_thread->i_height;
     p_thread->p_opengl->render.i_width = p_thread->i_width;
index 0dce4b7a6f13a259360903b1880a46ce89725d05..08b1d6c0a65d2d5461a5cace957774b84fac1df4 100644 (file)
@@ -137,13 +137,13 @@ static int Open( vlc_object_t *p_this )
     video_format_t     fmt;
 
 
-    if ( p_filter->input.i_format != VLC_FOURCC('f','l','3','2' )
-         || p_filter->output.i_format != VLC_FOURCC('f','l','3','2') )
+    if( p_filter->input.i_format != VLC_CODEC_FL32 ||
+         p_filter->output.i_format != VLC_CODEC_FL32 )
     {
         msg_Warn( p_filter, "bad input or output format" );
         return VLC_EGENERIC;
     }
-    if ( !AOUT_FMTS_SIMILAR( &p_filter->input, &p_filter->output ) )
+    if( !AOUT_FMTS_SIMILAR( &p_filter->input, &p_filter->output ) )
     {
         msg_Warn( p_filter, "input and output formats are not similar" );
         return VLC_EGENERIC;
@@ -167,7 +167,7 @@ static int Open( vlc_object_t *p_this )
 
     fmt.i_width = fmt.i_visible_width = width;
     fmt.i_height = fmt.i_visible_height = height;
-    fmt.i_chroma = VLC_FOURCC('R','V','3','2');
+    fmt.i_chroma = VLC_CODEC_RGB32;
     fmt.i_aspect = VOUT_ASPECT_FACTOR * width/height;
     fmt.i_sar_num = fmt.i_sar_den = 1;
 
index 4702a98952887c0af7f62e4def63e3b448edde63..c26d3b2612ddf888e934c20181b24573f1769452 100644 (file)
@@ -193,8 +193,8 @@ static int Open( vlc_object_t *p_this )
     char *psz_effects, *psz_parser;
     video_format_t fmt;
 
-    if( ( p_filter->input.i_format != VLC_FOURCC('f','l','3','2') &&
-          p_filter->input.i_format != VLC_FOURCC('f','i','3','2') ) )
+    if( ( p_filter->input.i_format != VLC_CODEC_FL32 &&
+          p_filter->input.i_format != VLC_CODEC_FI32 ) )
     {
         return VLC_EGENERIC;
     }
@@ -303,7 +303,7 @@ static int Open( vlc_object_t *p_this )
 
     fmt.i_width = fmt.i_visible_width = p_sys->i_width;
     fmt.i_height = fmt.i_visible_height = p_sys->i_height;
-    fmt.i_chroma = VLC_FOURCC('I','4','2','0');
+    fmt.i_chroma = VLC_CODEC_I420;
     fmt.i_aspect = VOUT_ASPECT_FACTOR * p_sys->i_width/p_sys->i_height;
     fmt.i_sar_num = fmt.i_sar_den = 1;
 
index 806cb998357999e1929d3e2f2ad9909c00caa980..fde38b3ab78a159d08996192c18102ea87767fa8 100644 (file)
@@ -144,29 +144,29 @@ unsigned int aout_BitsPerSample( vlc_fourcc_t i_format )
 {
     switch( i_format )
     {
-    case VLC_FOURCC('u','8',' ',' '):
-    case VLC_FOURCC('s','8',' ',' '):
+    case VLC_CODEC_U8:
+    case VLC_CODEC_S8:
         return 8;
 
-    case VLC_FOURCC('u','1','6','l'):
-    case VLC_FOURCC('s','1','6','l'):
-    case VLC_FOURCC('u','1','6','b'):
-    case VLC_FOURCC('s','1','6','b'):
+    case VLC_CODEC_U16L:
+    case VLC_CODEC_S16L:
+    case VLC_CODEC_U16B:
+    case VLC_CODEC_S16B:
         return 16;
 
-    case VLC_FOURCC('u','2','4','l'):
-    case VLC_FOURCC('s','2','4','l'):
-    case VLC_FOURCC('u','2','4','b'):
-    case VLC_FOURCC('s','2','4','b'):
+    case VLC_CODEC_U24L:
+    case VLC_CODEC_S24L:
+    case VLC_CODEC_U24B:
+    case VLC_CODEC_S24B:
         return 24;
 
-    case VLC_FOURCC('s','3','2','l'):
-    case VLC_FOURCC('s','3','2','b'):
-    case VLC_FOURCC('f','l','3','2'):
-    case VLC_FOURCC('f','i','3','2'):
+    case VLC_CODEC_S32L:
+    case VLC_CODEC_S32B:
+    case VLC_CODEC_FL32:
+    case VLC_CODEC_FI32:
         return 32;
 
-    case VLC_FOURCC('f','l','6','4'):
+    case VLC_CODEC_FL64:
         return 64;
 
     default:
index 0b0ebfa5071636bb13377e61d7746d10c12ec049..8271868079a6d1cbaff60fb606384b35b512c9c0 100644 (file)
@@ -177,8 +177,7 @@ int aout_OutputNew( aout_instance_t * p_aout,
         /* Non-S/PDIF mixer only deals with float32 or fixed32. */
         p_aout->mixer.mixer.i_format
                      = (vlc_CPU() & CPU_CAPABILITY_FPU) ?
-                        VLC_FOURCC('f','l','3','2') :
-                        VLC_FOURCC('f','i','3','2');
+                        VLC_CODEC_FL32 : VLC_CODEC_FI32;
         aout_FormatPrepare( &p_aout->mixer.mixer );
     }
     else
index dd2946067aa60b7a4c5ccef16fbc00f4a64a4310..591c2c17ea0f304346db84fa0e610ff1007648eb 100644 (file)
@@ -1694,7 +1694,7 @@ static void DecoderFlushBuffering( decoder_t *p_dec )
 static void DecoderProcessSout( decoder_t *p_dec, block_t *p_block )
 {
     decoder_owner_sys_t *p_owner = (decoder_owner_sys_t *)p_dec->p_owner;
-    const bool b_telx = p_dec->fmt_in.i_codec == VLC_FOURCC('t','e','l','x');
+    const bool b_telx = p_dec->fmt_in.i_codec == VLC_CODEC_TELETEXT;
     block_t *p_sout_block;
 
     while( ( p_sout_block =
@@ -1850,7 +1850,7 @@ static void DecoderProcessAudio( decoder_t *p_dec, block_t *p_block, bool b_flus
 static void DecoderProcessSpu( decoder_t *p_dec, block_t *p_block, bool b_flush )
 {
     decoder_owner_sys_t *p_owner = p_dec->p_owner;
-    const bool b_telx = p_dec->fmt_in.i_codec == VLC_FOURCC('t','e','l','x');
+    const bool b_telx = p_dec->fmt_in.i_codec == VLC_CODEC_TELETEXT;
 
     input_thread_t *p_input = p_owner->p_input;
     vout_thread_t *p_vout;
index 7f8b108cec87075155e3df3170327a223da609c3..c20972a578942290530177019853d6fd827176c1 100644 (file)
@@ -212,7 +212,7 @@ static inline int EsOutGetClosedCaptionsChannel( vlc_fourcc_t fcc )
 }
 static inline bool EsFmtIsTeletext( const es_format_t *p_fmt )
 {
-    return p_fmt->i_cat == SPU_ES && p_fmt->i_codec == VLC_FOURCC( 't', 'e', 'l', 'x' );
+    return p_fmt->i_cat == SPU_ES && p_fmt->i_codec == VLC_CODEC_TELETEXT;
 }
 
 /*****************************************************************************
@@ -1921,19 +1921,13 @@ static int EsOutSend( es_out_t *out, es_out_id_t *es, block_t *p_block )
     input_DecoderIsCcPresent( es->p_dec, pb_cc );
     for( int i = 0; i < 4; i++ )
     {
-        static const vlc_fourcc_t fcc[4] = {
-            VLC_FOURCC('c', 'c', '1', ' '),
-            VLC_FOURCC('c', 'c', '2', ' '),
-            VLC_FOURCC('c', 'c', '3', ' '),
-            VLC_FOURCC('c', 'c', '4', ' '),
-        };
         es_format_t fmt;
 
         if(  es->pb_cc_present[i] || !pb_cc[i] )
             continue;
         msg_Dbg( p_input, "Adding CC track %d for es[%d]", 1+i, es->i_id );
 
-        es_format_Init( &fmt, SPU_ES, fcc[i] );
+        es_format_Init( &fmt, SPU_ES, EsOutFourccClosedCaptions[i] );
         fmt.i_group = es->fmt.i_group;
         if( asprintf( &fmt.psz_description,
                       _("Closed captions %u"), 1 + i ) == -1 )
index 6b521374c77b615c38c4c762fc4d3145d2186b48..e6a81cf95c08b7968339665c550281d076f26416 100644 (file)
@@ -92,24 +92,24 @@ void video_format_FixRgb( video_format_t *p_fmt )
     {
         switch( p_fmt->i_chroma )
         {
-        case VLC_FOURCC('R','V','1','5'):
+        case VLC_CODEC_RGB15:
             p_fmt->i_rmask = 0x7c00;
             p_fmt->i_gmask = 0x03e0;
             p_fmt->i_bmask = 0x001f;
             break;
 
-        case VLC_FOURCC('R','V','1','6'):
+        case VLC_CODEC_RGB16:
             p_fmt->i_rmask = 0xf800;
             p_fmt->i_gmask = 0x07e0;
             p_fmt->i_bmask = 0x001f;
             break;
 
-        case VLC_FOURCC('R','V','2','4'):
+        case VLC_CODEC_RGB24:
             p_fmt->i_rmask = 0xff0000;
             p_fmt->i_gmask = 0x00ff00;
             p_fmt->i_bmask = 0x0000ff;
             break;
-        case VLC_FOURCC('R','V','3','2'):
+        case VLC_CODEC_RGB32:
             p_fmt->i_rmask = 0x00ff0000;
             p_fmt->i_gmask = 0x0000ff00;
             p_fmt->i_bmask = 0x000000ff;
index b0a808f82de35fa62dc996f15bfc905d42a5aaeb..ba567af1b2b43c49f7e8b8e5ddb51fab411c840f 100644 (file)
@@ -523,23 +523,23 @@ static const struct
 
 } ext_table[] =
 {
-    { VLC_FOURCC('j','p','e','g'), "jpeg" },
-    { VLC_FOURCC('j','p','e','g'), "jpg"  },
-    { VLC_FOURCC('l','j','p','g'), "ljpg" },
-    { VLC_FOURCC('p','n','g',' '), "png" },
-    { VLC_FOURCC('p','g','m',' '), "pgm" },
-    { VLC_FOURCC('p','g','m','y'), "pgmyuv" },
+    { VLC_CODEC_JPEG,              "jpeg" },
+    { VLC_CODEC_JPEG,              "jpg"  },
+    { VLC_CODEC_JPEGLS,            "ljpg" },
+    { VLC_CODEC_PNG,               "png" },
+    { VLC_CODEC_PGM,               "pgm" },
+    { VLC_CODEC_PGMYUV,            "pgmyuv" },
     { VLC_FOURCC('p','b','m',' '), "pbm" },
     { VLC_FOURCC('p','a','m',' '), "pam" },
-    { VLC_FOURCC('t','g','a',' '), "tga" },
-    { VLC_FOURCC('b','m','p',' '), "bmp" },
-    { VLC_FOURCC('p','n','m',' '), "pnm" },
+    { VLC_CODEC_TARGA,             "tga" },
+    { VLC_CODEC_BMP,               "bmp" },
+    { VLC_CODEC_PNM,               "pnm" },
     { VLC_FOURCC('x','p','m',' '), "xpm" },
     { VLC_FOURCC('x','c','f',' '), "xcf" },
-    { VLC_FOURCC('p','c','x',' '), "pcx" },
-    { VLC_FOURCC('g','i','f',' '), "gif" },
-    { VLC_FOURCC('t','i','f','f'), "tif" },
-    { VLC_FOURCC('t','i','f','f'), "tiff" },
+    { VLC_CODEC_PCX,               "pcx" },
+    { VLC_CODEC_GIF,               "gif" },
+    { VLC_CODEC_TIFF,              "tif" },
+    { VLC_CODEC_TIFF,              "tiff" },
     { VLC_FOURCC('l','b','m',' '), "lbm" },
     { 0, NULL }
 };
@@ -584,20 +584,20 @@ static const struct
     const char *psz_mime;
 } mime_table[] =
 {
-    { VLC_FOURCC('b','m','p',' '), "image/bmp" },
-    { VLC_FOURCC('b','m','p',' '), "image/x-bmp" },
-    { VLC_FOURCC('b','m','p',' '), "image/x-bitmap" },
-    { VLC_FOURCC('b','m','p',' '), "image/x-ms-bmp" },
-    { VLC_FOURCC('p','n','m',' '), "image/x-portable-anymap" },
-    { VLC_FOURCC('p','n','m',' '), "image/x-portable-bitmap" },
-    { VLC_FOURCC('p','n','m',' '), "image/x-portable-graymap" },
-    { VLC_FOURCC('p','n','m',' '), "image/x-portable-pixmap" },
-    { VLC_FOURCC('g','i','f',' '), "image/gif" },
-    { VLC_FOURCC('j','p','e','g'), "image/jpeg" },
-    { VLC_FOURCC('p','c','x',' '), "image/pcx" },
-    { VLC_FOURCC('p','n','g',' '), "image/png" },
-    { VLC_FOURCC('t','i','f','f'), "image/tiff" },
-    { VLC_FOURCC('t','g','a',' '), "iamge/x-tga" },
+    { VLC_CODEC_BMP,               "image/bmp" },
+    { VLC_CODEC_BMP,               "image/x-bmp" },
+    { VLC_CODEC_BMP,               "image/x-bitmap" },
+    { VLC_CODEC_BMP,               "image/x-ms-bmp" },
+    { VLC_CODEC_PNM,               "image/x-portable-anymap" },
+    { VLC_CODEC_PNM,               "image/x-portable-bitmap" },
+    { VLC_CODEC_PNM,               "image/x-portable-graymap" },
+    { VLC_CODEC_PNM,               "image/x-portable-pixmap" },
+    { VLC_CODEC_GIF,               "image/gif" },
+    { VLC_CODEC_JPEG,              "image/jpeg" },
+    { VLC_CODEC_PCX,               "image/pcx" },
+    { VLC_CODEC_PNG,               "image/png" },
+    { VLC_CODEC_TIFF,              "image/tiff" },
+    { VLC_CODEC_TARGA,             "iamge/x-tga" },
     { VLC_FOURCC('x','p','m',' '), "image/x-xpixmap" },
     { 0, NULL }
 };
index 7ae4be9b5d6990f09c587d23e6a5b9f1eed960e7..375a02af979e52b62279d41445b0a2dcad574697 100644 (file)
@@ -90,7 +90,7 @@ int osd_ShowTextAbsolute( spu_t *p_spu_channel, int i_channel,
 
     /* Create a new subpicture region */
     memset( &fmt, 0, sizeof(video_format_t) );
-    fmt.i_chroma = VLC_FOURCC('T','E','X','T');
+    fmt.i_chroma = VLC_CODEC_TEXT;
     fmt.i_aspect = 0;
     fmt.i_width = fmt.i_height = 0;
     fmt.i_x_offset = fmt.i_y_offset = 0;
index 5e880ead03e9e8faf0a411d1e81b9feade270ca6..32af4b8428d210622dae10929429851985d4fb7f 100644 (file)
@@ -159,7 +159,7 @@ static int CreatePicture( spu_t *p_spu, subpicture_t *p_subpic,
 
     /* Create a new subpicture region */
     memset( &fmt, 0, sizeof(video_format_t) );
-    fmt.i_chroma = VLC_FOURCC('Y','U','V','A');
+    fmt.i_chroma = VLC_CODEC_YUVA;
     fmt.i_aspect = 0;
     fmt.i_width = fmt.i_visible_width = i_width;
     fmt.i_height = fmt.i_visible_height = i_height;
index e2dcfdb113222852b7cea1084612305a192774c0..a2110d5cbec63a0484de1e911ca06a9a829cbfc4 100644 (file)
@@ -816,10 +816,10 @@ static bool ChromaIsEqual( const picture_heap_t *p_output, const picture_heap_t
      if( !vout_ChromaCmp( p_output->i_chroma, p_render->i_chroma ) )
          return false;
 
-     if( p_output->i_chroma != FOURCC_RV15 &&
-         p_output->i_chroma != FOURCC_RV16 &&
-         p_output->i_chroma != FOURCC_RV24 &&
-         p_output->i_chroma != FOURCC_RV32 )
+     if( p_output->i_chroma != VLC_CODEC_RGB15 &&
+         p_output->i_chroma != VLC_CODEC_RGB16 &&
+         p_output->i_chroma != VLC_CODEC_RGB24 &&
+         p_output->i_chroma != VLC_CODEC_RGB32 )
          return true;
 
      return p_output->i_rmask == p_render->i_rmask &&
index d153b2017930268071485efb764a8a7c3c31b4ab..d5a8f6244bb2ee1263d20a6197c202a459bb81b6 100644 (file)
@@ -92,7 +92,7 @@ int vout_ShowTextAbsolute( vout_thread_t *p_vout, int i_channel,
 
     /* Create a new subpicture region */
     memset( &fmt, 0, sizeof(video_format_t) );
-    fmt.i_chroma = VLC_FOURCC('T','E','X','T');
+    fmt.i_chroma = VLC_CODEC_TEXT;
     fmt.i_aspect = 0;
     fmt.i_width = fmt.i_height = 0;
     fmt.i_x_offset = fmt.i_y_offset = 0;
index 80f23e94cfcf8bd5ee47f1bb3925bfcffcf4a6ab..095101ac0fc21b2aad6dd462ab59f07c0c149a5f 100644 (file)
@@ -469,7 +469,7 @@ static int VoutSnapshotPip( vout_thread_t *p_vout, picture_t *p_pic )
     /* */
     memset( &fmt_out, 0, sizeof(fmt_out) );
     fmt_out = fmt_in;
-    fmt_out.i_chroma = VLC_FOURCC('Y','U','V','A');
+    fmt_out.i_chroma = VLC_CODEC_YUVA;
 
     /* */
     image_handler_t *p_image = image_HandlerCreate( p_vout );
@@ -752,7 +752,7 @@ int vout_GetSnapshot( vout_thread_t *p_vout,
 
     if( pp_image )
     {
-        vlc_fourcc_t i_format = VLC_FOURCC('p','n','g',' ');
+        vlc_fourcc_t i_format = VLC_CODEC_PNG;
         if( psz_format && image_Type2Fourcc( psz_format ) )
             i_format = image_Type2Fourcc( psz_format );
 
index d0da611c43180080ebb1bfdf89019cfe995a8111..844fc42f06254721781c37088a346b4a0c0c83bd 100644 (file)
@@ -619,62 +619,60 @@ void vout_InitFormat( video_frame_format_t *p_format, vlc_fourcc_t i_chroma,
         p_format->i_aspect = 0;
 #endif
 
-    switch( i_chroma )
+    switch( vlc_fourcc_GetCodec( VIDEO_ES, i_chroma ) )
     {
-        case FOURCC_YUVA:
+        case VLC_CODEC_YUVA:
             p_format->i_bits_per_pixel = 32;
             break;
-        case FOURCC_I444:
-        case FOURCC_J444:
+        case VLC_CODEC_I444:
+        case VLC_CODEC_J444:
             p_format->i_bits_per_pixel = 24;
             break;
-        case FOURCC_I422:
-        case FOURCC_YUY2:
-        case FOURCC_UYVY:
-        case FOURCC_J422:
+        case VLC_CODEC_I422:
+        case VLC_CODEC_YUYV:
+        case VLC_CODEC_YVYU:
+        case VLC_CODEC_UYVY:
+        case VLC_CODEC_VYUY:
+        case VLC_CODEC_J422:
             p_format->i_bits_per_pixel = 16;
             break;
-        case FOURCC_I440:
-        case FOURCC_J440:
+        case VLC_CODEC_I440:
+        case VLC_CODEC_J440:
             p_format->i_bits_per_pixel = 16;
             break;
-        case FOURCC_I411:
-        case FOURCC_YV12:
-        case FOURCC_I420:
-        case FOURCC_J420:
-        case FOURCC_IYUV:
+        case VLC_CODEC_I411:
+        case VLC_CODEC_YV12:
+        case VLC_CODEC_I420:
+        case VLC_CODEC_J420:
             p_format->i_bits_per_pixel = 12;
             break;
-        case FOURCC_I410:
-        case FOURCC_YVU9:
+        case VLC_CODEC_I410:
             p_format->i_bits_per_pixel = 9;
             break;
-        case FOURCC_Y211:
+        case VLC_CODEC_Y211:
             p_format->i_bits_per_pixel = 8;
             break;
-        case FOURCC_YUVP:
+        case VLC_CODEC_YUVP:
             p_format->i_bits_per_pixel = 8;
             break;
 
-        case FOURCC_RV32:
-        case FOURCC_RGBA:
+        case VLC_CODEC_RGB32:
+        case VLC_CODEC_RGBA:
             p_format->i_bits_per_pixel = 32;
             break;
-        case FOURCC_RV24:
+        case VLC_CODEC_RGB24:
             p_format->i_bits_per_pixel = 24;
             break;
-        case FOURCC_RV15:
-        case FOURCC_RV16:
+        case VLC_CODEC_RGB15:
+        case VLC_CODEC_RGB16:
             p_format->i_bits_per_pixel = 16;
             break;
-        case FOURCC_RGB2:
+        case VLC_CODEC_RGB8:
             p_format->i_bits_per_pixel = 8;
             break;
 
-        case FOURCC_GREY:
-        case FOURCC_Y800:
-        case FOURCC_Y8:
-        case FOURCC_RGBP:
+        case VLC_CODEC_GREY:
+        case VLC_CODEC_RGBP:
             p_format->i_bits_per_pixel = 8;
             break;
 
@@ -725,9 +723,9 @@ int __vout_InitPicture( vlc_object_t *p_this, picture_t *p_pic,
     i_height_aligned = (i_height + 15) >> 4 << 4;
 
     /* Calculate coordinates */
-    switch( i_chroma )
+    switch( vlc_fourcc_GetCodec( VIDEO_ES, i_chroma ) )
     {
-        case FOURCC_I411:
+        case VLC_CODEC_I411:
             p_pic->p[ Y_PLANE ].i_lines = i_height_aligned;
             p_pic->p[ Y_PLANE ].i_visible_lines = i_height;
             p_pic->p[ Y_PLANE ].i_pitch = i_width_aligned;
@@ -743,8 +741,7 @@ int __vout_InitPicture( vlc_object_t *p_this, picture_t *p_pic,
             p_pic->i_planes = 3;
             break;
 
-        case FOURCC_I410:
-        case FOURCC_YVU9:
+        case VLC_CODEC_I410:
             p_pic->p[ Y_PLANE ].i_lines = i_height_aligned;
             p_pic->p[ Y_PLANE ].i_visible_lines = i_height;
             p_pic->p[ Y_PLANE ].i_pitch = i_width_aligned;
@@ -760,10 +757,9 @@ int __vout_InitPicture( vlc_object_t *p_this, picture_t *p_pic,
             p_pic->i_planes = 3;
             break;
 
-        case FOURCC_YV12:
-        case FOURCC_I420:
-        case FOURCC_IYUV:
-        case FOURCC_J420:
+        case VLC_CODEC_YV12:
+        case VLC_CODEC_I420:
+        case VLC_CODEC_J420:
             p_pic->p[ Y_PLANE ].i_lines = i_height_aligned;
             p_pic->p[ Y_PLANE ].i_visible_lines = i_height;
             p_pic->p[ Y_PLANE ].i_pitch = i_width_aligned;
@@ -779,8 +775,8 @@ int __vout_InitPicture( vlc_object_t *p_this, picture_t *p_pic,
             p_pic->i_planes = 3;
             break;
 
-        case FOURCC_I422:
-        case FOURCC_J422:
+        case VLC_CODEC_I422:
+        case VLC_CODEC_J422:
             p_pic->p[ Y_PLANE ].i_lines = i_height_aligned;
             p_pic->p[ Y_PLANE ].i_visible_lines = i_height;
             p_pic->p[ Y_PLANE ].i_pitch = i_width_aligned;
@@ -796,8 +792,8 @@ int __vout_InitPicture( vlc_object_t *p_this, picture_t *p_pic,
             p_pic->i_planes = 3;
             break;
 
-        case FOURCC_I440:
-        case FOURCC_J440:
+        case VLC_CODEC_I440:
+        case VLC_CODEC_J440:
             p_pic->p[ Y_PLANE ].i_lines = i_height_aligned;
             p_pic->p[ Y_PLANE ].i_visible_lines = i_height;
             p_pic->p[ Y_PLANE ].i_pitch = i_width_aligned;
@@ -813,8 +809,8 @@ int __vout_InitPicture( vlc_object_t *p_this, picture_t *p_pic,
             p_pic->i_planes = 3;
             break;
 
-        case FOURCC_I444:
-        case FOURCC_J444:
+        case VLC_CODEC_I444:
+        case VLC_CODEC_J444:
             p_pic->p[ Y_PLANE ].i_lines = i_height_aligned;
             p_pic->p[ Y_PLANE ].i_visible_lines = i_height;
             p_pic->p[ Y_PLANE ].i_pitch = i_width_aligned;
@@ -830,7 +826,7 @@ int __vout_InitPicture( vlc_object_t *p_this, picture_t *p_pic,
             p_pic->i_planes = 3;
             break;
 
-        case FOURCC_YUVA:
+        case VLC_CODEC_YUVA:
             p_pic->p[ Y_PLANE ].i_lines = i_height_aligned;
             p_pic->p[ Y_PLANE ].i_visible_lines = i_height;
             p_pic->p[ Y_PLANE ].i_pitch = i_width_aligned;
@@ -850,7 +846,7 @@ int __vout_InitPicture( vlc_object_t *p_this, picture_t *p_pic,
             p_pic->i_planes = 4;
             break;
 
-        case FOURCC_YUVP:
+        case VLC_CODEC_YUVP:
             p_pic->p->i_lines = i_height_aligned;
             p_pic->p->i_visible_lines = i_height;
             p_pic->p->i_pitch = i_width_aligned;
@@ -859,7 +855,7 @@ int __vout_InitPicture( vlc_object_t *p_this, picture_t *p_pic,
             p_pic->i_planes = 1;
             break;
 
-        case FOURCC_Y211:
+        case VLC_CODEC_Y211:
             p_pic->p->i_lines = i_height_aligned;
             p_pic->p->i_visible_lines = i_height;
             p_pic->p->i_pitch = i_width_aligned;
@@ -868,8 +864,10 @@ int __vout_InitPicture( vlc_object_t *p_this, picture_t *p_pic,
             p_pic->i_planes = 1;
             break;
 
-        case FOURCC_UYVY:
-        case FOURCC_YUY2:
+        case VLC_CODEC_UYVY:
+        case VLC_CODEC_VYUY:
+        case VLC_CODEC_YUYV:
+        case VLC_CODEC_YVYU:
             p_pic->p->i_lines = i_height_aligned;
             p_pic->p->i_visible_lines = i_height;
             p_pic->p->i_pitch = i_width_aligned * 2;
@@ -878,7 +876,7 @@ int __vout_InitPicture( vlc_object_t *p_this, picture_t *p_pic,
             p_pic->i_planes = 1;
             break;
 
-        case FOURCC_RGB2:
+        case VLC_CODEC_RGB8:
             p_pic->p->i_lines = i_height_aligned;
             p_pic->p->i_visible_lines = i_height;
             p_pic->p->i_pitch = i_width_aligned;
@@ -887,7 +885,7 @@ int __vout_InitPicture( vlc_object_t *p_this, picture_t *p_pic,
             p_pic->i_planes = 1;
             break;
 
-        case FOURCC_RV15:
+        case VLC_CODEC_RGB15:
             p_pic->p->i_lines = i_height_aligned;
             p_pic->p->i_visible_lines = i_height;
             p_pic->p->i_pitch = i_width_aligned * 2;
@@ -896,7 +894,7 @@ int __vout_InitPicture( vlc_object_t *p_this, picture_t *p_pic,
             p_pic->i_planes = 1;
             break;
 
-        case FOURCC_RV16:
+        case VLC_CODEC_RGB16:
             p_pic->p->i_lines = i_height_aligned;
             p_pic->p->i_visible_lines = i_height;
             p_pic->p->i_pitch = i_width_aligned * 2;
@@ -905,7 +903,7 @@ int __vout_InitPicture( vlc_object_t *p_this, picture_t *p_pic,
             p_pic->i_planes = 1;
             break;
 
-        case FOURCC_RV24:
+        case VLC_CODEC_RGB24:
             p_pic->p->i_lines = i_height_aligned;
             p_pic->p->i_visible_lines = i_height;
             p_pic->p->i_pitch = i_width_aligned * 3;
@@ -914,8 +912,8 @@ int __vout_InitPicture( vlc_object_t *p_this, picture_t *p_pic,
             p_pic->i_planes = 1;
             break;
 
-        case FOURCC_RV32:
-        case FOURCC_RGBA:
+        case VLC_CODEC_RGB32:
+        case VLC_CODEC_RGBA:
             p_pic->p->i_lines = i_height_aligned;
             p_pic->p->i_visible_lines = i_height;
             p_pic->p->i_pitch = i_width_aligned * 4;
@@ -924,10 +922,8 @@ int __vout_InitPicture( vlc_object_t *p_this, picture_t *p_pic,
             p_pic->i_planes = 1;
             break;
 
-        case FOURCC_GREY:
-        case FOURCC_Y800:
-        case FOURCC_Y8:
-        case FOURCC_RGBP:
+        case VLC_CODEC_GREY:
+        case VLC_CODEC_RGBP:
             p_pic->p->i_lines = i_height_aligned;
             p_pic->p->i_visible_lines = i_height;
             p_pic->p->i_pitch = i_width_aligned;
@@ -956,30 +952,25 @@ int __vout_InitPicture( vlc_object_t *p_this, picture_t *p_pic,
 int vout_ChromaCmp( vlc_fourcc_t i_chroma, vlc_fourcc_t i_amorhc )
 {
     static const vlc_fourcc_t p_I420[] = {
-        FOURCC_I420, FOURCC_IYUV, FOURCC_YV12, FOURCC_J420, 0
+        VLC_CODEC_I420, VLC_CODEC_YV12, VLC_CODEC_J420, 0
     };
     static const vlc_fourcc_t p_I422[] = {
-        FOURCC_I422, FOURCC_J422, 0
+        VLC_CODEC_I422, VLC_CODEC_J422, 0
     };
     static const vlc_fourcc_t p_I440[] = {
-        FOURCC_I440, FOURCC_J440, 0
+        VLC_CODEC_I440, VLC_CODEC_J440, 0
     };
     static const vlc_fourcc_t p_I444[] = {
-        FOURCC_I444, FOURCC_J444, 0
-    };
-    static const vlc_fourcc_t p_UYVY[] = {
-        FOURCC_UYVY, FOURCC_UYNV, FOURCC_Y422, 0
-    };
-    static const vlc_fourcc_t p_YUYV[] = {
-        FOURCC_YUY2, FOURCC_YUNV, 0
-    };
-    static const vlc_fourcc_t p_GREY[] = {
-        FOURCC_GREY, FOURCC_Y800, FOURCC_Y8, 0
+        VLC_CODEC_I444, VLC_CODEC_J444, 0
     };
     static const vlc_fourcc_t *pp_fcc[] = {
-        p_I420, p_I422, p_I440, p_I444, p_UYVY, p_YUYV, p_GREY, NULL
+        p_I420, p_I422, p_I440, p_I444, NULL
     };
 
+    /* */
+    i_chroma = vlc_fourcc_GetCodec( VIDEO_ES, i_chroma );
+    i_amorhc = vlc_fourcc_GetCodec( VIDEO_ES, i_amorhc );
+
     /* If they are the same, they are the same ! */
     if( i_chroma == i_amorhc )
         return 1;
index e9144b38a95e03a26a896323a9800963ccb4aa98..8d41545b56c85eb09f1baeffdf284735afb0e09b 100644 (file)
  * Fourcc definitions that we can handle internally
  *****************************************************************************/
 
-/* Packed RGB for 8bpp */
-#define FOURCC_RGB2         VLC_FOURCC('R','G','B','2')
-
-/* Packed RGB 15bpp, usually 0x7c00, 0x03e0, 0x001f */
-#define FOURCC_RV15         VLC_FOURCC('R','V','1','5')
-
-/* Packed RGB 16bpp, usually 0xf800, 0x07e0, 0x001f */
-#define FOURCC_RV16         VLC_FOURCC('R','V','1','6')
-
-/* Packed RGB 24bpp, usually 0x00ff0000, 0x0000ff00, 0x000000ff */
-#define FOURCC_RV24         VLC_FOURCC('R','V','2','4')
-
-/* Packed RGB 32bpp, usually 0x00ff0000, 0x0000ff00, 0x000000ff */
-#define FOURCC_RV32         VLC_FOURCC('R','V','3','2')
-
-/* Packed RGBA 32bpp, like RV32 with 0xff000000 used for alpha */
-#define FOURCC_RGBA         VLC_FOURCC('R','G','B','A')
-
-/* Planar YUV 4:2:0, Y:U:V */
-#define FOURCC_I420         VLC_FOURCC('I','4','2','0')
-#define FOURCC_IYUV         VLC_FOURCC('I','Y','U','V')
-#define FOURCC_J420         VLC_FOURCC('J','4','2','0')
-
-/* Planar YUV 4:2:0, Y:V:U */
-#define FOURCC_YV12         VLC_FOURCC('Y','V','1','2')
-
-/* Packed YUV 4:2:2, U:Y:V:Y, interlaced */
-#define FOURCC_IUYV         VLC_FOURCC('I','U','Y','V')
-
-/* Packed YUV 4:2:2, U:Y:V:Y */
-#define FOURCC_UYVY         VLC_FOURCC('U','Y','V','Y')
-#define FOURCC_UYNV         VLC_FOURCC('U','Y','N','V')
-#define FOURCC_Y422         VLC_FOURCC('Y','4','2','2')
-
-/* Packed YUV 4:2:2, U:Y:V:Y, reverted */
-#define FOURCC_cyuv         VLC_FOURCC('c','y','u','v')
-
-/* Packed YUV 4:2:2, Y:U:Y:V */
-#define FOURCC_YUY2         VLC_FOURCC('Y','U','Y','2')
-#define FOURCC_YUNV         VLC_FOURCC('Y','U','N','V')
-
-/* Packed YUV 4:2:2, Y:V:Y:U */
-#define FOURCC_YVYU         VLC_FOURCC('Y','V','Y','U')
-
-/* Packed YUV 2:1:1, Y:U:Y:V */
-#define FOURCC_Y211         VLC_FOURCC('Y','2','1','1')
-
-/* Planar YUV 4:1:1, Y:U:V */
-#define FOURCC_I411         VLC_FOURCC('I','4','1','1')
-
-/* Planar YUV 4:1:0, Y:U:V */
-#define FOURCC_I410         VLC_FOURCC('I','4','1','0')
-#define FOURCC_YVU9         VLC_FOURCC('Y','V','U','9')
-
-/* Planar Y, packed UV, from Matrox */
-#define FOURCC_YMGA         VLC_FOURCC('Y','M','G','A')
-
-/* Planar 4:2:2, Y:U:V */
-#define FOURCC_I422         VLC_FOURCC('I','4','2','2')
-#define FOURCC_J422         VLC_FOURCC('J','4','2','2')
-
-/* Planar 4:4:0, Y:U:V */
-#define FOURCC_I440         VLC_FOURCC('I','4','4','0')
-#define FOURCC_J440         VLC_FOURCC('J','4','4','0')
-
-/* Planar 4:4:4, Y:U:V */
-#define FOURCC_I444         VLC_FOURCC('I','4','4','4')
-#define FOURCC_J444         VLC_FOURCC('J','4','4','4')
-
-/* Planar 4:4:4:4 Y:U:V:A */
-#define FOURCC_YUVA         VLC_FOURCC('Y','U','V','A')
-
-/* Palettized YUV with palette element Y:U:V:A */
-#define FOURCC_YUVP         VLC_FOURCC('Y','U','V','P')
-
-/* Palettized RGB with palette element R:G:B */
-#define FOURCC_RGBP         VLC_FOURCC('R','G','B','P')
-
-
-/* Planar 8-bit grayscale */
-#define FOURCC_GREY         VLC_FOURCC('G','R','E','Y')
-#define FOURCC_Y800         VLC_FOURCC('Y','8','0','0')
-#define FOURCC_Y8           VLC_FOURCC('Y','8',' ',' ')
-
 /* Alignment of critical dynamic data structure
  *
  * Not all platforms support memalign so we provide a vlc_memalign wrapper
index 104a9b2f6fc095ef180a90469b2d0fbf57955597..84ac9996fee7792978c0492e72e982dc478b59aa 100644 (file)
 /* Number of simultaneous subpictures */
 #define VOUT_MAX_SUBPICTURES (VOUT_MAX_PICTURES)
 
-#define VLC_FOURCC_YUVP VLC_FOURCC('Y','U','V','P')
-#define VLC_FOURCC_YUVA VLC_FOURCC('Y','U','V','A')
-#define VLC_FOURCC_RGBA VLC_FOURCC('R','G','B','A')
-#define VLC_FOURCC_TEXT VLC_FOURCC('T','E','X','T')
-
 /* */
 typedef struct
 {
@@ -735,7 +730,7 @@ subpicture_region_t *subpicture_region_New( const video_format_t *p_fmt )
 
     p_region->fmt = *p_fmt;
     p_region->fmt.p_palette = NULL;
-    if( p_fmt->i_chroma == VLC_FOURCC_YUVP )
+    if( p_fmt->i_chroma == VLC_CODEC_YUVP )
     {
         p_region->fmt.p_palette = calloc( 1, sizeof(*p_region->fmt.p_palette) );
         if( p_fmt->p_palette )
@@ -748,7 +743,7 @@ subpicture_region_t *subpicture_region_New( const video_format_t *p_fmt )
     p_region->p_style = NULL;
     p_region->p_picture = NULL;
 
-    if( p_fmt->i_chroma == VLC_FOURCC_TEXT )
+    if( p_fmt->i_chroma == VLC_CODEC_TEXT )
         return p_region;
 
     p_region->p_picture = picture_New( p_fmt->i_chroma, p_fmt->i_width, p_fmt->i_height,
@@ -1036,11 +1031,11 @@ static void SpuRenderCreateAndLoadScale( spu_t *p_spu )
     /* XXX p_spu->p_scale is used for all conversion/scaling except yuvp to
      * yuva/rgba */
     p_spu->p->p_scale = CreateAndLoadScale( VLC_OBJECT(p_spu),
-                                            VLC_FOURCC_YUVA, VLC_FOURCC_YUVA, true );
+                                            VLC_CODEC_YUVA, VLC_CODEC_YUVA, true );
     /* This one is used for YUVP to YUVA/RGBA without scaling
      * FIXME rename it */
     p_spu->p->p_scale_yuvp = CreateAndLoadScale( VLC_OBJECT(p_spu),
-                                                 VLC_FOURCC_YUVP, VLC_FOURCC_YUVA, false );
+                                                 VLC_CODEC_YUVP, VLC_CODEC_YUVA, false );
 }
 
 static void SpuRenderText( spu_t *p_spu, bool *pb_rerender_text,
@@ -1049,7 +1044,7 @@ static void SpuRenderText( spu_t *p_spu, bool *pb_rerender_text,
 {
     filter_t *p_text = p_spu->p->p_text;
 
-    assert( p_region->fmt.i_chroma == VLC_FOURCC_TEXT );
+    assert( p_region->fmt.i_chroma == VLC_CODEC_TEXT );
 
     if( !p_text || !p_text->p_module )
         goto exit;
@@ -1354,14 +1349,14 @@ static void SpuRenderRegion( spu_t *p_spu,
     *p_area = spu_area_create( 0,0, 0,0, scale_size );
 
     /* Render text region */
-    if( p_region->fmt.i_chroma == VLC_FOURCC_TEXT )
+    if( p_region->fmt.i_chroma == VLC_CODEC_TEXT )
     {
         const int i_min_scale_ratio = SCALE_UNIT; /* FIXME what is the right value? (scale_size is not) */
         SpuRenderText( p_spu, &b_rerender_text, p_subpic, p_region, i_min_scale_ratio );
         b_restore_format = b_rerender_text;
 
         /* Check if the rendering has failed ... */
-        if( p_region->fmt.i_chroma == VLC_FOURCC_TEXT )
+        if( p_region->fmt.i_chroma == VLC_CODEC_TEXT )
             goto exit;
     }
 
@@ -1369,7 +1364,7 @@ static void SpuRenderRegion( spu_t *p_spu,
      * FIXME b_force_palette and b_force_crop are applied to all subpictures using palette
      * instead of only the right one (being the dvd spu).
      */
-    const bool b_using_palette = p_region->fmt.i_chroma == VLC_FOURCC_YUVP;
+    const bool b_using_palette = p_region->fmt.i_chroma == VLC_CODEC_YUVP;
     const bool b_force_palette = b_using_palette && p_sys->b_force_palette;
     const bool b_force_crop    = b_force_palette && p_sys->b_force_crop;
     bool b_changed_palette     = false;
@@ -1484,7 +1479,7 @@ static void SpuRenderRegion( spu_t *p_spu,
 
                 /* TODO converting to RGBA for RGB video output is better */
                 p_scale_yuvp->fmt_out.video = p_region->fmt;
-                p_scale_yuvp->fmt_out.video.i_chroma = VLC_FOURCC_YUVA;
+                p_scale_yuvp->fmt_out.video.i_chroma = VLC_CODEC_YUVA;
 
                 p_picture = p_scale_yuvp->pf_video_filter( p_scale_yuvp, p_picture );
                 if( !p_picture )