Merge branch 1.0-bugfix
authorRémi Denis-Courmont <remi@remlab.net>
Sat, 16 May 2009 17:07:46 +0000 (20:07 +0300)
committerRémi Denis-Courmont <remi@remlab.net>
Sat, 16 May 2009 17:07:50 +0000 (20:07 +0300)
325 files changed:
NEWS
configure.ac
include/vlc/deprecated.h
include/vlc/libvlc_events.h
include/vlc_aout.h
include/vlc_codecs.h
include/vlc_es.h
include/vlc_fourcc.h [new file with mode: 0644]
include/vlc_input.h
include/vlc_osd.h
include/vlc_playlist.h
modules/access/dc1394.c
modules/access/dshow/dshow.cpp
modules/access/dshow/filter.cpp
modules/access/dv.c
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/mono.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/hd1000a.cpp
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/adpcm.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/fourcc.c
modules/codec/avcodec/video.c
modules/codec/cc.c
modules/codec/cdg.c
modules/codec/cmml/cmml.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/shine/shine_mod.c
modules/codec/speex.c
modules/codec/spudec/parse.c
modules/codec/spudec/spudec.c
modules/codec/subtitles/subsass.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/control/dbus.c
modules/control/http/macro.c
modules/control/http/rpn.c
modules/demux/Modules.am
modules/demux/asf/asf.c
modules/demux/au.c
modules/demux/avformat/Modules.am
modules/demux/avformat/demux.c
modules/demux/avformat/mux.c
modules/demux/avi/avi.c
modules/demux/avi/libavi.h
modules/demux/cdg.c
modules/demux/dirac.c
modules/demux/flac.c
modules/demux/live555.cpp
modules/demux/mjpeg.c
modules/demux/mkv/Modules.am
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/rawaud.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/vc1.c
modules/demux/vobsub.c
modules/demux/vobsub.h [new file with mode: 0644]
modules/demux/voc.c
modules/demux/wav.c
modules/gui/beos/AudioOutput.cpp
modules/gui/beos/VideoWindow.h
modules/gui/fbosd.c
modules/gui/macosx/playlist.m
modules/gui/macosx/voutgl.m
modules/gui/ncurses.c
modules/gui/pda/pda_callbacks.c
modules/gui/qnx/aout.c
modules/gui/qnx/vout.c
modules/gui/qt4/Modules.am
modules/gui/qt4/components/interface_widgets.cpp
modules/gui/qt4/components/interface_widgets.hpp
modules/gui/qt4/components/playlist/playlist_model.cpp
modules/gui/qt4/dialogs/external.cpp
modules/gui/qt4/dialogs/external.hpp
modules/gui/qt4/input_manager.cpp
modules/gui/qt4/main_interface.cpp
modules/gui/qt4/main_interface.hpp
modules/gui/qt4/qt4.cpp
modules/gui/qt4/qt4.hpp
modules/gui/qt4/variables.cpp [new file with mode: 0644]
modules/gui/qt4/variables.hpp [new file with mode: 0644]
modules/gui/skins2/src/file_bitmap.cpp
modules/gui/skins2/vars/playtree.cpp
modules/gui/wince/playlist.cpp
modules/gui/wince/preferences.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/decoder.c
modules/misc/stats/vout.c
modules/misc/svg.c
modules/misc/win32text.c
modules/mux/asf.c
modules/mux/avi.c
modules/mux/mp4.c
modules/mux/mpeg/pes.c
modules/mux/mpeg/ps.c
modules/mux/mpeg/ts.c
modules/mux/mpjpeg.c
modules/mux/ogg.c
modules/mux/wav.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/stream_out/mosaic_bridge.c
modules/stream_out/raop.c
modules/stream_out/record.c
modules/stream_out/rtp.c
modules/stream_out/switcher.c
modules/stream_out/transcode.c
modules/stream_out/transrate/transrate.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.h
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/drawable.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
projects/activex/plugin.cpp
projects/mozilla/test.html
projects/mozilla/vlcplugin.cpp
projects/mozilla/vlcshell.cpp
src/Makefile.am
src/audio_output/common.c
src/audio_output/output.c
src/control/event.c
src/control/libvlc_internal.h
src/control/media_list_path.h
src/control/media_list_player.c
src/control/media_player.c
src/control/playlist.c
src/control/video.c
src/input/control.c
src/input/decoder.c
src/input/es_out.c
src/input/event.c
src/input/event.h
src/input/input.c
src/libvlc.c
src/libvlc.sym
src/libvlccore.sym
src/misc/es_format.c
src/misc/fourcc.c [new file with mode: 0644]
src/misc/image.c
src/osd/osd_text.c
src/osd/osd_widgets.c
src/playlist/item.c
src/playlist/playlist_internal.h
src/playlist/search.c
src/playlist/services_discovery.c
src/stream_output/stream_output.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
test/Makefile.am
test/libvlc/core.c

diff --git a/NEWS b/NEWS
index 52671ec..382489d 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,7 @@
+Changes between 1.0.0-rc1 and 1.1.0-git:
+----------------------------------------
+
+
 Changes between 0.9.9a and 1.0.0-rc1:
 ------------------------------------
 
index 8d51b84..dd9aa11 100644 (file)
@@ -2,11 +2,11 @@ dnl Autoconf settings for vlc
 
 AC_COPYRIGHT([Copyright 2002-2009 the VideoLAN team])
 
-AC_INIT(vlc, 1.0.0-rc1)
+AC_INIT(vlc, 1.1.0-git)
 VERSION_MAJOR="1"
-VERSION_MINOR="0"
+VERSION_MINOR="1"
 VERSION_REVISION="0"
-VERSION_EXTRA="-rc1"
+VERSION_EXTRA="-git"
 PKGDIR="vlc"
 AC_SUBST(PKGDIR)
 
@@ -2024,28 +2024,28 @@ AC_ARG_ENABLE(dc1394,
   [  --enable-dc1394         dc1394 access module (default disabled)])
 if test "${enable_dc1394}" = "yes"
 then
-  AC_CHECK_HEADERS(libraw1394/raw1394.h, [
-    AC_CHECK_LIB( raw1394, raw1394_get_nodecount, [
-        AC_CHECK_HEADERS(libdc1394/dc1394_control.h , [
-dnl         AC_CHECK_LIB( dc1394_control, dc1394_setup_capture, [
-              VLC_ADD_PLUGIN([dc1394])
-              VLC_ADD_LIBS([dc1394],[-ldc1394_control -lraw1394])
-dnl         ],
-dnl         [
-dnl           AC_MSG_ERROR([libdc1394 is mandatory for the dc1394 input module. try --disable-dc1394 or install this library])
-dnl         ])
-      ],
-      [
-        AC_MSG_ERROR([libdc1394 is mandatory for the dc1394 input module. try --disable-dc1394 or install this library])
-      ])
+  dnl
+  dnl Check for libraw1394
+  dnl
+  PKG_CHECK_MODULES(LIBRAW1394, libraw1394 >= 2.0.1,
+    [
+      VLC_ADD_LIBS([dc1394],[`${PKG_CONFIG} --libs libraw1394`])
+      VLC_ADD_CPPFLAGS([dc1394],[`${PKG_CONFIG} --cflags libraw1394`])
     ],
+    [AC_MSG_ERROR([Couldn't find libraw1394 >= 2.0.1, install libraw1394 development package])]
+  )
+
+  dnl
+  dnl Check for libdc1394
+  dnl
+  PKG_CHECK_MODULES(LIBDC1394, libdc1394-2 >= 2.0.2,
     [
-      AC_MSG_ERROR([libraw1394 is mandatory for the dc1394 input module. try --disable-dc1394 or install this library])
-    ])
-  ],
-  [
-    AC_MSG_ERROR([libraw1394 is mandatory for the dc1394 input module. try --disable-dc1394 or install this library])
-  ])
+      VLC_ADD_PLUGIN([dc1394])
+      VLC_ADD_LIBS([dc1394],[`${PKG_CONFIG} --libs libdc1394-2`])
+      VLC_ADD_CPPFLAGS([access_dv],[`${PKG_CONFIG} --cflags libdc1394-2`])
+    ],
+    [AC_MSG_ERROR([Couldn't find libdc1394 >= 2.0.2, install libdc1394 development package])]
+  )
 fi
 
 dnl
@@ -2055,120 +2055,28 @@ AC_ARG_ENABLE(dv,
 [  --enable-dv             dv input module (default disabled)])
 if test "${enable_dv}" = "yes"
 then
-  AC_ARG_WITH(dv-raw1394,
-  [    --with-dv-raw1394=PATH   libraw1394 headers and libraries])
-  AC_ARG_WITH(dv-raw1394-tree,
-  [    --with-dv-raw1394=PATH   libraw1394 tree for static linking])
-
-  if test -z "${with_dv_raw1394}" -a "${with_dv_raw1394}" != ""
-  then
-    AC_MSG_CHECKING(for raw1394 headers in ${with_dv_raw1394})
-    if test -f ${with_dv_raw1394}/include/libraw1394/raw1394.h
-    then
-      dnl  Use ${with_dv_raw1394}/include/libraw1394/raw1394.h
-      AC_MSG_RESULT(yes)
-      VLC_ADD_PLUGIN([access_dv])
-      VLC_ADD_LIBS([access_dv],[-L${with_dv_raw1394}/lib -lraw1394 -lpthread])
-      VLC_ADD_CPPFLAGS([access_dv],[-I${with_dv_raw1394}/include])
-    else
-      dnl  No libraw1394 could be found, sorry
-      AC_MSG_RESULT(no)
-      AC_MSG_ERROR([cannot find ${with_dv_raw1394}/include/libraw1394/raw1394.h])
-    fi
-  else
-    AC_CHECK_HEADERS(libraw1394/raw1394.h,
-    [ VLC_ADD_PLUGIN([access_dv])
-        VLC_ADD_LIBS([access_dv],[-lraw1394 -lavc1394])
-    ],[
-        if test -n "${enable_dv}"
-        then
-          AC_MSG_ERROR([cannot find libraw1394 headers])
-        fi
-    ])
-  fi
-
-  dnl Check for static linking of libraw1394
-  if test -z "${with_dv_raw1394_tree}" -a "${with_dv_raw1394_tree}" != ""
-  then
-    AC_MSG_CHECKING(for libraw1394.a in ${with_dv_raw1394_tree})
-    real_dv_raw1394_tree="`cd ${with_dv_raw1394_tree} 2>/dev/null && pwd`"
-    if test -z "${real_dv_raw1394_tree}"
-    then
-      dnl  The given directory can't be found
-      AC_MSG_RESULT(no)
-      AC_MSG_ERROR([cannot cd to ${real_dv_raw1394_tree}])
-    fi
-    if test -f "${real_dv_raw1394_tree}/src/.libs/libraw1394.a"
-    then
-      dnl  Use a custom libraw1394
-      AC_MSG_RESULT(${real_dv_raw1394_tree}/src/.libs/libraw1394.a)
-      VLC_ADD_PLUGIN([access_dv])
-      VLC_ADD_LIBS([access_dv],[-L${real_dv_raw1394_tree}/src/.libs -lraw1394])
-      VLC_ADD_CPPFLAGS([access_dv],[-I${real_dv_raw1394_tree}])
-    else
-      dnl  The given libraw1394 wasn't built
-      AC_MSG_RESULT(no)
-      AC_MSG_ERROR([cannot find ${real_dv_raw1394_tree}/src/.libs/libraw1394.a, make sure you compiled libraw1394 in ${with_dv_raw1394_tree}])
-    fi
-  fi
+  dnl
+  dnl Check for libraw1394
+  dnl
+  PKG_CHECK_MODULES(LIBRAW1394, libraw1394 >= 2.0.1,
+    [
+      VLC_ADD_LIBS([access_dv],[`${PKG_CONFIG} --libs libraw1394`])
+      VLC_ADD_CPPFLAGS([access_dv],[`${PKG_CONFIG} --cflags libraw1394`])
+    ],
+    [AC_MSG_ERROR([Couldn't find libraw1394 >= 2.0.1, install libraw1394 development package])]
+  )
 
   dnl
   dnl Check for libavc1394
   dnl
-
-  AC_ARG_WITH(dv-avc1394,
-  [    --with-dv-avc1394=PATH   libavc1394 headers and libraries])
-  AC_ARG_WITH(dv-avc1394-tree,
-  [    --with-dv-avc1394=PATH   libavc1394 tree for static linking])
-
-  if test -z "${with_dv_avc1394}" -a "${with_dv_avc1394}" != ""
-  then
-    AC_MSG_CHECKING(for avc1394 headers in ${with_dv_avc1394})
-    if test -f ${with_dv_avc1394}/include/libavc1394/avc1394.h
-    then
-      dnl  Use ${with_dv_avc1394}/include/libavc1394/avc1394.h
-      AC_MSG_RESULT(yes)
-      VLC_ADD_LIBS([access_dv],[-L${with_dv_avc1394}/lib -lavc1394 -lrom1394 -lpthread])
-      VLC_ADD_CPPFLAGS([access_dv],[-I${with_avc1394}/include])
-    else
-      dnl  No libavc1394 could be found, sorry
-      AC_MSG_RESULT(no)
-      AC_MSG_ERROR([cannot find ${with_dv_avc1394}/include/libavc1394/avc1394.h])
-    fi
-  else
-    AC_CHECK_HEADERS(libavc1394/avc1394.h,
-    [ VLC_ADD_LIBS([access_dv],[-lavc1394 -lrom1394 -lpthread])
-    ],[
-        if test -n "${enable_dv}"
-        then
-          AC_MSG_ERROR([cannot find libavc1394 headers])
-        fi
-    ])
-  fi
-
-  dnl Check for static linking of libavc1394
-  if test -z "${with_dv_avc1394_tree}" -a "${with_dv_avc1394_tree}" != ""
-  then
-    AC_MSG_CHECKING(for libavc1394.a in ${with_dv_avc1394_tree})
-    real_dv_avc1394_tree="`cd ${with_dv_avc1394_tree} 2>/dev/null && pwd`"
-    if test -z "${real_dv_avc1394_tree}"
-    then
-      dnl  The given directory can't be found
-      AC_MSG_RESULT(no)
-      AC_MSG_ERROR([cannot cd to ${real_dv_avc1394_tree}])
-    fi
-    if test -f "${real_dv_avc1394_tree}/src/.libs/libavc1394.a"
-    then
-      dnl  Use a custom libavc1394
-      AC_MSG_RESULT(${real_dv_avc1394_tree}/src/.libs/libavc1394.a)
-      VLC_ADD_LIBS([access_dv],[-L${real_dv_avc1394_tree}/src/.libs -lavc1394 -lrom1394 -lpthread])
-      VLC_ADD_CPPFLAGS([access_dv],[-I${real_dv_avc1394_tree}])
-    else
-      dnl  The given libavc1394 wasn't built
-      AC_MSG_RESULT(no)
-      AC_MSG_ERROR([cannot find ${real_dv_avc1394_tree}/src/.libs/libavc1394.a, make sure you compiled libavc1394 in ${with_dv_avc1394_tree}])
-    fi
-  fi
+  PKG_CHECK_MODULES(LIBAVC1394, libavc1394 >= 0.5.3,
+    [
+      VLC_ADD_PLUGIN([access_dv])
+      VLC_ADD_LIBS([access_dv],[`${PKG_CONFIG} --libs libavc1394`])
+      VLC_ADD_CPPFLAGS([access_dv],[`${PKG_CONFIG} --cflags libavc1394`])
+    ],
+    [AC_MSG_ERROR([Couldn't find libavc1394 >= 0.5.1, install libavc1394 development package])]
+  )
 fi
 
 dnl
@@ -3990,7 +3898,7 @@ dnl
 
 AC_PATH_XTRA()
 AC_ARG_ENABLE(x11,
-  [  --enable-x11            X11 support (default enabled)],, [
+  [  --enable-x11            X11 support with Xlib (default enabled)],, [
   AS_IF([test "${SYS}" != "mingw32" -a "${SYS}" != "mingwce"], [
     enable_x11="yes"
   ], [
@@ -4078,7 +3986,7 @@ dnl  XVMC module
 dnl  (disabled by default except on win32)
 dnl
 AC_ARG_ENABLE(xvmc,
-  [  --enable-xvmc           XVMC support (default disabled)],, [
+  [  --enable-xvmc           XvMC support (default disabled)],, [
   enable_xvmc="no"
 ])
 AS_IF([test "${enable_xvmc}" != "no"], [
@@ -4159,17 +4067,23 @@ CPPFLAGS="${CPPFLAGS_save}"
 
 dnl
 dnl  X C Bindings modules
-dnl  (work in progress)
 dnl
 AC_ARG_ENABLE(xcb,
-  [  --enable-xcb            X C Bindings work-in-progress (default disabled)],
-  ,[enable_xcb="no"])
+  [  --enable-xcb            X11 support with XCB (default enabled)],, [
+  AS_IF([test "${SYS}" != "mingw32" -a "${SYS}" != "mingwce"], [
+    enable_xcb="yes"
+  ], [
+    enable_xcb="no"
+  ])
+])
+
 AS_IF([test "${enable_xcb}" != "no"], [
   PKG_CHECK_MODULES(XPROTO, [xproto])
 
   dnl libxcb
   PKG_CHECK_MODULES(XCB, [xcb])
   PKG_CHECK_MODULES(XCB_SHM, [xcb-shm])
+  VLC_ADD_PLUGIN([xcb])
 
   AS_IF([test "${enable_xvideo}" != "no"], [
     PKG_CHECK_MODULES(XCB_XV, [xcb-xv >= 1.1.90.1], [
@@ -4180,10 +4094,13 @@ AS_IF([test "${enable_xcb}" != "no"], [
   dnl xcb-utils
   PKG_CHECK_MODULES(XCB_KEYSYMS, [xcb-keysyms])
 
-  VLC_ADD_PLUGIN([xcb])
   VLC_ADD_PLUGIN([xcb_window])
+  VLC_ADD_PLUGIN([globalhotkeys])
+  VLC_ADD_CFLAGS([globalhotkeys],[${XCB_KEYSYMS_CFLAGS} ${XCB_CFLAGS}] )
+  VLC_ADD_LIBS([globalhotkeys],[${XCB_KEYSYMS_LIBS} ${XCB_LIBS}] )
 ])
 
+
 dnl
 dnl  OpenGL module
 dnl  (enabled by default except on beos)
@@ -5024,7 +4941,7 @@ then
     VLC_ADD_LIBS([maemo],[${HILDON_LIBS}])
     VLC_ADD_PLUGIN([maemo])
     VLC_ADD_PLUGIN([swscale_maemo])
-    AC_DEFINE([BUILD_MAEMO], 1, [Define if you're using Maemo interfaces])
+    AC_DEFINE([BUILD_MAEMO], 1, [Define if you are using Maemo interfaces])
     ALIASES="${ALIASES} mvlc"
   ], [
     AS_IF([test "${enable_maemo}" = "yes"],[
@@ -5043,7 +4960,7 @@ AC_ARG_ENABLE(qt4,
   AS_IF([test "${SYS}" = "darwin"], [enable_qt4=no])
 ])
 AS_IF([test "${enable_qt4}" != "no"], [
-  PKG_CHECK_MODULES(QT4, [QtCore QtGui >= 4.3.0], [
+  PKG_CHECK_MODULES(QT4, [QtCore QtGui >= 4.4.2], [
     VLC_ADD_PLUGIN([qt4])
     AC_DEFINE([HAVE_QT4], 1, [Define to 1 if you have QT4 library.])
     ALIASES="${ALIASES} qvlc"
@@ -5373,18 +5290,6 @@ then
   fi
 fi
 
-dnl
-dnl Global hotkeys using XCB
-dnl
-PKG_CHECK_MODULES(XCB, [xcb], [
-  PKG_CHECK_MODULES(XCB_KEYSYMS, [xcb-keysyms], [
-    PKG_CHECK_MODULES(XPROTO, [xproto], [
-      VLC_ADD_PLUGIN([globalhotkeys])
-      VLC_ADD_CFLAGS([globalhotkeys],[${XCB_KEYSYMS_CFLAGS} ${XCB_CFLAGS}] )
-      VLC_ADD_LIBS([globalhotkeys],[${XCB_KEYSYMS_LIBS} ${XCB_LIBS}] )
-    ], [ AC_MSG_WARN( [Xproto not found] ) ])
-  ], [ AC_MSG_WARN( [XCB keysyms was not found]) ])
-], [ AC_MSG_WARN( [XCB was not found]) ])
 
 AC_ARG_WITH(,[Misc options:])
 
index 2cb82e1..9305349 100644 (file)
@@ -71,88 +71,6 @@ VLC_DEPRECATED_API void libvlc_media_player_set_drawable ( libvlc_media_player_t
 VLC_DEPRECATED_API libvlc_drawable_t
                     libvlc_media_player_get_drawable ( libvlc_media_player_t *, libvlc_exception_t * );
 
-/**
- * Set the default video output's parent.
- *
- * This setting will be used as default for any video output.
- *
- * \param p_instance libvlc instance
- * \param drawable the new parent window
- *                 (see libvlc_media_player_set_drawable() for details)
- * \param p_e an initialized exception pointer
- * @deprecated Use libvlc_media_player_set_drawable
- */
-VLC_DEPRECATED_API void libvlc_video_set_parent( libvlc_instance_t *, libvlc_drawable_t, libvlc_exception_t * );
-
-/**
- * Set the default video output parent.
- *
- * This setting will be used as default for all video outputs.
- *
- * \param p_instance libvlc instance
- * \param drawable the new parent window (Drawable on X11, CGrafPort on MacOSX, HWND on Win32)
- * \param p_e an initialized exception pointer
- * @deprecated Use libvlc_media_player_get_drawable
- */
-VLC_DEPRECATED_API libvlc_drawable_t libvlc_video_get_parent( libvlc_instance_t *, libvlc_exception_t * );
-
-/**
- * Does nothing. Do not use this function.
- */
-VLC_DEPRECATED_API int libvlc_video_reparent( libvlc_media_player_t *, libvlc_drawable_t, libvlc_exception_t * );
-
-/**
- * Resize the current video output window.
- * This might crash. Please use libvlc_video_set_scale() instead.
- *
- * \param p_mi media player instance
- * \param width new width for video output window
- * \param height new height for video output window
- * \param p_e an initialized exception pointer
- * \return the success status (boolean)
- */
-VLC_DEPRECATED_API void libvlc_video_resize( libvlc_media_player_t *, int, int, libvlc_exception_t *);
-
-/**
- * Tell windowless video output to redraw rectangular area (MacOS X only).
- * This might crash. Do not use this function.
- *
- * \param p_mi media player instance
- * \param area coordinates within video drawable
- * \param p_e an initialized exception pointer
- */
-VLC_DEPRECATED_API void libvlc_video_redraw_rectangle( libvlc_media_player_t *, const libvlc_rectangle_t *, libvlc_exception_t * );
-
-/**
- * Set the default video output size.
- * This setting will be used as default for all video outputs.
- *
- * \param p_instance libvlc instance
- * \param width new width for video drawable
- * \param height new height for video drawable
- * \param p_e an initialized exception pointer
- */
-VLC_DEPRECATED_API void libvlc_video_set_size( libvlc_instance_t *, int, int, libvlc_exception_t * );
-
-/**
- * Set the default video output viewport for a windowless video output
- * (MacOS X only). This might crash. Do not use this function.
- *
- * This setting will be used as default for all video outputs.
- *
- * \param p_instance libvlc instance
- * \param p_mi media player instance
- * \param view coordinates within video drawable
- * \param clip coordinates within video drawable
- * \param p_e an initialized exception pointer
- */
-VLC_DEPRECATED_API void libvlc_video_set_viewport( libvlc_instance_t *, libvlc_media_player_t *, const libvlc_rectangle_t *, const libvlc_rectangle_t *, libvlc_exception_t * );
-
-/*
- * This function shall not be used at all. It may lead to crash and race condition.
- */
-VLC_DEPRECATED_API int libvlc_video_destroy( libvlc_media_player_t *, libvlc_exception_t *);
-
 /*****************************************************************************
  * Playlist (Deprecated)
  *****************************************************************************/
@@ -163,17 +81,6 @@ VLC_DEPRECATED_API int libvlc_video_destroy( libvlc_media_player_t *, libvlc_exc
  * @{
  */
 
-/**
- * Set the playlist's loop attribute. If set, the playlist runs continuously
- * and wraps around when it reaches the end.
- *
- * \param p_instance the playlist instance
- * \param loop the loop attribute. 1 sets looping, 0 disables it
- * \param p_e an initialized exception pointer
- */
-VLC_DEPRECATED_API void libvlc_playlist_loop( libvlc_instance_t* , int,
-                                          libvlc_exception_t * );
-
 /**
  * Start playing.
  *
@@ -191,158 +98,6 @@ VLC_DEPRECATED_API void libvlc_playlist_loop( libvlc_instance_t* , int,
 VLC_DEPRECATED_API void libvlc_playlist_play( libvlc_instance_t*, int, int,
                                           char **, libvlc_exception_t * );
 
-/**
- * Toggle the playlist's pause status.
- *
- * If the playlist was running, it is paused. If it was paused, it is resumed.
- *
- * \param p_instance the playlist instance to pause
- * \param p_e an initialized exception pointer
- */
-VLC_DEPRECATED_API void libvlc_playlist_pause( libvlc_instance_t *,
-                                           libvlc_exception_t * );
-
-/**
- * Checks whether the playlist is running
- *
- * \param p_instance the playlist instance
- * \param p_e an initialized exception pointer
- * \return 0 if the playlist is stopped or paused, 1 if it is running
- */
-VLC_DEPRECATED_API int libvlc_playlist_isplaying( libvlc_instance_t *,
-                                              libvlc_exception_t * );
-
-/**
- * Get the number of items in the playlist
- *
- * Expects the playlist instance to be locked already.
- *
- * \param p_instance the playlist instance
- * \param p_e an initialized exception pointer
- * \return the number of items
- */
-VLC_DEPRECATED_API int libvlc_playlist_items_count( libvlc_instance_t *,
-                                                libvlc_exception_t * );
-
-VLC_DEPRECATED_API int libvlc_playlist_get_current_index( libvlc_instance_t *,
-                                                 libvlc_exception_t *);
-/**
- * Lock the playlist.
- *
- * \param p_instance the playlist instance
- */
-VLC_DEPRECATED_API void libvlc_playlist_lock( libvlc_instance_t * );
-
-/**
- * Unlock the playlist.
- *
- * \param p_instance the playlist instance
- */
-VLC_DEPRECATED_API void libvlc_playlist_unlock( libvlc_instance_t * );
-
-/**
- * Stop playing.
- *
- * \param p_instance the playlist instance to stop
- * \param p_e an initialized exception pointer
- */
-VLC_DEPRECATED_API void libvlc_playlist_stop( libvlc_instance_t *,
-                                          libvlc_exception_t * );
-
-/**
- * Go to the next playlist item. If the playlist was stopped, playback
- * is started.
- *
- * \param p_instance the playlist instance
- * \param p_e an initialized exception pointer
- */
-VLC_DEPRECATED_API void libvlc_playlist_next( libvlc_instance_t *,
-                                          libvlc_exception_t * );
-
-/**
- * Go to the previous playlist item. If the playlist was stopped, playback
- * is started.
- *
- * \param p_instance the playlist instance
- * \param p_e an initialized exception pointer
- */
-VLC_DEPRECATED_API void libvlc_playlist_prev( libvlc_instance_t *,
-                                          libvlc_exception_t * );
-
-/**
- * Empty a playlist. All items in the playlist are removed.
- *
- * \param p_instance the playlist instance
- * \param p_e an initialized exception pointer
- */
-VLC_DEPRECATED_API void libvlc_playlist_clear( libvlc_instance_t *,
-                                           libvlc_exception_t * );
-
-/**
- * Append an item to the playlist. The item is added at the end. If more
- * advanced options are required, \see libvlc_playlist_add_extended instead.
- *
- * \param p_instance the playlist instance
- * \param psz_uri the URI to open, using VLC format
- * \param psz_name a name that you might want to give or NULL
- * \param p_e an initialized exception pointer
- * \return the identifier of the new item
- */
-VLC_DEPRECATED_API int libvlc_playlist_add( libvlc_instance_t *, const char *,
-                                        const char *, libvlc_exception_t * );
-
-/**
- * Append an item to the playlist. The item is added at the end, with
- * additional input options.
- *
- * \param p_instance the playlist instance
- * \param psz_uri the URI to open, using VLC format
- * \param psz_name a name that you might want to give or NULL
- * \param i_options the number of options to add
- * \param ppsz_options strings representing the options to add
- * \param p_e an initialized exception pointer
- * \return the identifier of the new item
- */
-VLC_DEPRECATED_API int libvlc_playlist_add_extended( libvlc_instance_t *, const char *,
-                                                 const char *, int, const char **,
-                                                 libvlc_exception_t * );
-
-/**
- * Append an item to the playlist. The item is added at the end, with
- * additional input options from an untrusted source.
- *
- * \param p_instance the playlist instance
- * \param psz_uri the URI to open, using VLC format
- * \param psz_name a name that you might want to give or NULL
- * \param i_options the number of options to add
- * \param ppsz_options strings representing the options to add
- * \param p_e an initialized exception pointer
- * \return the identifier of the new item
- */
-VLC_DEPRECATED_API int libvlc_playlist_add_extended_untrusted( libvlc_instance_t *, const char *,
-                                                 const char *, int, const char **,
-                                                 libvlc_exception_t * );
-
-/**
- * Delete the playlist item with the given ID.
- *
- * \param p_instance the playlist instance
- * \param i_id the id to remove
- * \param p_e an initialized exception pointer
- * \return 0 in case of success, a non-zero value otherwise
- */
-VLC_DEPRECATED_API int libvlc_playlist_delete_item( libvlc_instance_t *, int,
-                                                libvlc_exception_t * );
-
-/** Get the input that is currently being played by the playlist.
- *
- * \param p_instance the playlist instance to use
- * \param p_e an initialized exception pointern
- * \return a media instance object
- */
-VLC_DEPRECATED_API libvlc_media_player_t * libvlc_playlist_get_media_player(
-                                libvlc_instance_t *, libvlc_exception_t * );
-
 /** @}*/
 
 # ifdef __cplusplus
index 1004989..57bb9a6 100644 (file)
@@ -88,6 +88,7 @@ typedef enum libvlc_event_type_t {
 
     libvlc_MediaPlayerTitleChanged,
     libvlc_MediaPlayerSnapshotTaken,
+    libvlc_MediaPlayerLengthChanged,
     /* New event types HERE */
 } libvlc_event_type_t;
 
@@ -202,6 +203,11 @@ typedef struct libvlc_event_t
              char* psz_filename ;
         } media_player_snapshot_taken ;
 
+        /* Length changed */
+        struct
+        {
+            libvlc_time_t   new_length;
+        } media_player_length_changed;
     } u;
 } libvlc_event_t;
 
index 00b7e2e..21b67fb 100644 (file)
@@ -47,25 +47,14 @@ extern "C" {
       && ((p_first)->i_physical_channels == (p_second)->i_physical_channels)\
       && ((p_first)->i_original_channels == (p_second)->i_original_channels) )
 
-#ifdef WORDS_BIGENDIAN
-#   define AOUT_FMT_S16_NE VLC_FOURCC('s','1','6','b')
-#   define AOUT_FMT_U16_NE VLC_FOURCC('u','1','6','b')
-#   define AOUT_FMT_S24_NE VLC_FOURCC('s','2','4','b')
-#   define AOUT_FMT_S32_NE VLC_FOURCC('s','3','2','b')
-#   define AOUT_FMT_SPDIF_NE VLC_FOURCC('s','p','d','b')
-#else
-#   define AOUT_FMT_S16_NE VLC_FOURCC('s','1','6','l')
-#   define AOUT_FMT_U16_NE VLC_FOURCC('u','1','6','l')
-#   define AOUT_FMT_S24_NE VLC_FOURCC('s','2','4','l')
-#   define AOUT_FMT_S32_NE VLC_FOURCC('s','3','2','l')
-#   define AOUT_FMT_SPDIF_NE VLC_FOURCC('s','p','d','i')
-#endif
-
-#define AOUT_FMT_NON_LINEAR( p_format )                                    \
-    ( ((p_format)->i_format == VLC_FOURCC('s','p','d','i'))                \
-       || ((p_format)->i_format == VLC_FOURCC('s','p','d','b'))            \
-       || ((p_format)->i_format == VLC_FOURCC('a','5','2',' '))            \
-       || ((p_format)->i_format == VLC_FOURCC('d','t','s',' ')) )
+#define VLC_CODEC_SPDIFL VLC_FOURCC('s','p','d','i')
+#define VLC_CODEC_SPDIFB VLC_FOURCC('s','p','d','b')
+
+#define AOUT_FMT_NON_LINEAR( p_format )                 \
+    ( ((p_format)->i_format == VLC_CODEC_SPDIFL)       \
+       || ((p_format)->i_format == VLC_CODEC_SPDIFB)   \
+       || ((p_format)->i_format == VLC_CODEC_A52)       \
+       || ((p_format)->i_format == VLC_CODEC_DTS) )
 
 /* This is heavily borrowed from libmad, by Robert Leslie <rob@mars.org> */
 /*
index 85176d0..4236295 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" }
 };
 
@@ -393,31 +393,4 @@ static inline void sf_tag_to_fourcc( GUID *guid_tag,
     if( ppsz_name ) *ppsz_name = sub_format_tag_to_fourcc[i].psz_name;
 }
 
-/**
- * Structure to hold information concerning subtitles.
- * Used between demuxers and decoders of subtitles.
- */
-typedef struct es_sys_t
-{
-    char               *psz_header; /* for 'ssa ' and 'subt' */
-
-    /* for spudec */
-    unsigned int        i_orig_height;
-    unsigned int        i_orig_width;
-    unsigned int        i_origin_x;
-    unsigned int        i_origin_y;
-    unsigned int        i_scale_h;
-    unsigned int        i_scale_v;
-    unsigned int        i_alpha;
-    bool          b_smooth;
-    mtime_t             i_fade_in;
-    mtime_t             i_fade_out;
-    unsigned int        i_align;
-    mtime_t             i_time_offset;
-    bool          b_forced_subs;
-    unsigned int        palette[16];
-    unsigned int        colors[4];
-
-} subtitle_data_t;
-
 #endif /* "codecs.h" */
index 8744f20..224617f 100644 (file)
@@ -27,6 +27,7 @@
 /* FIXME: i'm not too sure about this include but it fixes compilation of
  * video chromas -- dionoea */
 #include "vlc_common.h"
+#include <vlc_fourcc.h>
 
 /**
  * \file
@@ -98,14 +99,6 @@ 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
-
 /**
  * video format description
  */
@@ -227,8 +220,9 @@ typedef struct extra_languages_t
  */
 struct es_format_t
 {
-    int             i_cat;      /**< ES category @see es_format_category_e */
-    vlc_fourcc_t    i_codec;    /**< FOURCC value as used in vlc */
+    int             i_cat;              /**< ES category @see es_format_category_e */
+    vlc_fourcc_t    i_codec;            /**< FOURCC value as used in vlc */
+    vlc_fourcc_t    i_original_fourcc;  /**< original FOURCC from the container */
 
     int             i_id;       /**< es identifier, where means
                                     -1: let the core mark the right id
diff --git a/include/vlc_fourcc.h b/include/vlc_fourcc.h
new file mode 100644 (file)
index 0000000..0fe0c2d
--- /dev/null
@@ -0,0 +1,353 @@
+/*****************************************************************************
+ * vlc_fourcc.h: Definition of various FOURCC and helpers
+ *****************************************************************************
+ * Copyright (C) 2009 Laurent Aimar
+ * $Id$
+ *
+ * Authors: Laurent Aimar <fenrir _AT_ videolan _DOT_ com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ *****************************************************************************/
+
+#ifndef VLC_FOURCC_H
+#define VLC_FOURCC_H 1
+
+#include <vlc_common.h>
+#include <vlc_es.h>
+
+/* Video codec */
+#define VLC_CODEC_MPGV      VLC_FOURCC('m','p','g','v')
+#define VLC_CODEC_MP4V      VLC_FOURCC('m','p','4','v')
+#define VLC_CODEC_DIV1      VLC_FOURCC('D','I','V','1')
+#define VLC_CODEC_DIV2      VLC_FOURCC('D','I','V','2')
+#define VLC_CODEC_DIV3      VLC_FOURCC('D','I','V','3')
+#define VLC_CODEC_SVQ1      VLC_FOURCC('S','V','Q','1')
+#define VLC_CODEC_SVQ3      VLC_FOURCC('S','V','Q','3')
+#define VLC_CODEC_H264      VLC_FOURCC('h','2','6','4')
+#define VLC_CODEC_H263      VLC_FOURCC('h','2','6','3')
+#define VLC_CODEC_H263I     VLC_FOURCC('I','2','6','3')
+#define VLC_CODEC_H263P     VLC_FOURCC('I','L','V','R')
+#define VLC_CODEC_FLV1      VLC_FOURCC('F','L','V','1')
+#define VLC_CODEC_H261      VLC_FOURCC('h','2','6','1')
+#define VLC_CODEC_MJPG      VLC_FOURCC('M','J','P','G')
+#define VLC_CODEC_MJPGB     VLC_FOURCC('m','j','p','b')
+#define VLC_CODEC_LJPG      VLC_FOURCC('L','J','P','G')
+#define VLC_CODEC_WMV1      VLC_FOURCC('W','M','V','1')
+#define VLC_CODEC_WMV2      VLC_FOURCC('W','M','V','2')
+#define VLC_CODEC_WMV3      VLC_FOURCC('W','M','V','3')
+#define VLC_CODEC_WMVA      VLC_FOURCC('W','M','V','A')
+#define VLC_CODEC_VC1       VLC_FOURCC('V','C','-','1')
+#define VLC_CODEC_THEORA    VLC_FOURCC('t','h','e','o')
+#define VLC_CODEC_TARKIN    VLC_FOURCC('t','a','r','k')
+#define VLC_CODEC_SNOW      VLC_FOURCC('S','N','O','W')
+#define VLC_CODEC_DIRAC     VLC_FOURCC('d','r','a','c')
+#define VLC_CODEC_CAVS      VLC_FOURCC('C','A','V','S')
+#define VLC_CODEC_NUV       VLC_FOURCC('N','J','P','G')
+#define VLC_CODEC_RV10      VLC_FOURCC('R','V','1','0')
+#define VLC_CODEC_RV13      VLC_FOURCC('R','V','1','3')
+#define VLC_CODEC_RV20      VLC_FOURCC('R','V','2','0')
+#define VLC_CODEC_RV30      VLC_FOURCC('R','V','3','0')
+#define VLC_CODEC_RV40      VLC_FOURCC('R','V','4','0')
+#define VLC_CODEC_VP3       VLC_FOURCC('V','P','3',' ')
+#define VLC_CODEC_VP5       VLC_FOURCC('V','P','5',' ')
+#define VLC_CODEC_VP6       VLC_FOURCC('V','P','6','2')
+#define VLC_CODEC_VP6F      VLC_FOURCC('V','P','6','F')
+#define VLC_CODEC_VP6A      VLC_FOURCC('V','P','6','A')
+#define VLC_CODEC_MSVIDEO1  VLC_FOURCC('M','S','V','C')
+#define VLC_CODEC_FLIC      VLC_FOURCC('F','L','I','C')
+#define VLC_CODEC_SP5X      VLC_FOURCC('S','P','5','X')
+#define VLC_CODEC_DV        VLC_FOURCC('d','v',' ',' ')
+#define VLC_CODEC_MSRLE     VLC_FOURCC('m','r','l','e')
+#define VLC_CODEC_INDEO3    VLC_FOURCC('I','V','3','1')
+#define VLC_CODEC_HUFFYUV   VLC_FOURCC('H','F','Y','U')
+#define VLC_CODEC_FFVHUFF   VLC_FOURCC('F','F','V','H')
+#define VLC_CODEC_ASV1      VLC_FOURCC('A','S','V','1')
+#define VLC_CODEC_ASV2      VLC_FOURCC('A','S','V','2')
+#define VLC_CODEC_FFV1      VLC_FOURCC('F','F','V','1')
+#define VLC_CODEC_VCR1      VLC_FOURCC('V','C','R','1')
+#define VLC_CODEC_CLJR      VLC_FOURCC('C','L','J','R')
+#define VLC_CODEC_RPZA      VLC_FOURCC('r','p','z','a')
+#define VLC_CODEC_SMC       VLC_FOURCC('s','m','c',' ')
+#define VLC_CODEC_CINEPAK   VLC_FOURCC('C','V','I','D')
+#define VLC_CODEC_TSCC      VLC_FOURCC('T','S','C','C')
+#define VLC_CODEC_CSCD      VLC_FOURCC('C','S','C','D')
+#define VLC_CODEC_ZMBV      VLC_FOURCC('Z','M','B','V')
+#define VLC_CODEC_VMNC      VLC_FOURCC('V','M','n','c')
+#define VLC_CODEC_FRAPS     VLC_FOURCC('F','P','S','1')
+#define VLC_CODEC_TRUEMOTION1 VLC_FOURCC('D','U','C','K')
+#define VLC_CODEC_TRUEMOTION2 VLC_FOURCC('T','M','2','0')
+#define VLC_CODEC_QTRLE     VLC_FOURCC('r','l','e',' ')
+#define VLC_CODEC_QDRAW     VLC_FOURCC('q','d','r','w')
+#define VLC_CODEC_QPEG      VLC_FOURCC('Q','P','E','G')
+#define VLC_CODEC_ULTI      VLC_FOURCC('U','L','T','I')
+#define VLC_CODEC_VIXL      VLC_FOURCC('V','I','X','L')
+#define VLC_CODEC_LOCO      VLC_FOURCC('L','O','C','O')
+#define VLC_CODEC_WNV1      VLC_FOURCC('W','N','V','1')
+#define VLC_CODEC_AASC      VLC_FOURCC('A','A','S','C')
+#define VLC_CODEC_INDEO2    VLC_FOURCC('I','V','2','0')
+#define VLC_CODEC_FLASHSV   VLC_FOURCC('F','S','V','1')
+#define VLC_CODEC_KMVC      VLC_FOURCC('K','M','V','C')
+#define VLC_CODEC_SMACKVIDEO VLC_FOURCC('S','M','K','2')
+#define VLC_CODEC_DNXHD     VLC_FOURCC('A','V','d','n')
+#define VLC_CODEC_8BPS      VLC_FOURCC('8','B','P','S')
+#define VLC_CODEC_MIMIC     VLC_FOURCC('M','L','2','O')
+#define VLC_CODEC_INTERPLAY VLC_FOURCC('i','m','v','e')
+#define VLC_CODEC_IDCIN     VLC_FOURCC('I','D','C','I')
+#define VLC_CODEC_4XM       VLC_FOURCC('4','X','M','V')
+#define VLC_CODEC_ROQ       VLC_FOURCC('R','o','Q','v')
+#define VLC_CODEC_MDEC      VLC_FOURCC('M','D','E','C')
+#define VLC_CODEC_VMDVIDEO  VLC_FOURCC('V','M','D','V')
+#define VLC_CODEC_CDG       VLC_FOURCC('C','D','G',' ')
+
+/* Planar YUV 4:2:0 Y:V:U */
+#define VLC_CODEC_YV12      VLC_FOURCC('Y','V','1','2')
+/* Planar YUV 4:1:0 Y:U:V */
+#define VLC_CODEC_I410      VLC_FOURCC('I','4','1','0')
+/* Planar YUV 4:1:1 Y:U:V */
+#define VLC_CODEC_I411      VLC_FOURCC('I','4','1','1')
+/* Planar YUV 4:2:0 Y:U:V */
+#define VLC_CODEC_I420      VLC_FOURCC('I','4','2','0')
+/* Planar YUV 4:2:2 Y:U:V */
+#define VLC_CODEC_I422      VLC_FOURCC('I','4','2','2')
+/* Planar YUV 4:4:0 Y:U:V */
+#define VLC_CODEC_I440      VLC_FOURCC('I','4','4','0')
+/* Planar YUV 4:4:4 Y:U:V */
+#define VLC_CODEC_I444      VLC_FOURCC('I','4','4','4')
+/* Planar YUV 4:2:0 Y:U:V full scale */
+#define VLC_CODEC_J420      VLC_FOURCC('J','4','2','0')
+/* Planar YUV 4:2:2 Y:U:V full scale */
+#define VLC_CODEC_J422      VLC_FOURCC('J','4','2','2')
+/* Planar YUV 4:4:0 Y:U:V full scale */
+#define VLC_CODEC_J440      VLC_FOURCC('J','4','4','0')
+/* Planar YUV 4:4:4 Y:U:V full scale */
+#define VLC_CODEC_J444      VLC_FOURCC('J','4','4','4')
+/* Palettized YUV with palette element Y:U:V:A */
+#define VLC_CODEC_YUVP      VLC_FOURCC('Y','U','V','P')
+/* Planar YUV 4:4:4 Y:U:V:A */
+#define VLC_CODEC_YUVA      VLC_FOURCC('Y','U','V','A')
+/* Palettized RGB with palette element R:G:B */
+#define VLC_CODEC_RGBP      VLC_FOURCC('R','G','B','P')
+/* 8 bits RGB */
+#define VLC_CODEC_RGB8      VLC_FOURCC('R','G','B','2')
+/* 15 bits RGB stored on 16 bits */
+#define VLC_CODEC_RGB15     VLC_FOURCC('R','V','1','5')
+/* 16 bits RGB store on a 16 bits */
+#define VLC_CODEC_RGB16     VLC_FOURCC('R','V','1','6')
+/* 24 bits RGB */
+#define VLC_CODEC_RGB24     VLC_FOURCC('R','V','2','4')
+/* 32 bits RGB */
+#define VLC_CODEC_RGB32     VLC_FOURCC('R','V','3','2')
+/* 32 bits VLC RGBA */
+#define VLC_CODEC_RGBA      VLC_FOURCC('R','G','B','A')
+/* 8 bits grey */
+#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 */
+#define VLC_CODEC_YVYU      VLC_FOURCC('Y','V','Y','U')
+/* Packed YUV 2:1:1, Y:U:Y:V */
+#define VLC_CODEC_Y211      VLC_FOURCC('Y','2','1','1')
+/* Planar Y, packed UV, from Matrox */
+#define VLC_CODEC_YMGA      VLC_FOURCC('Y','M','G','A')
+/* Packed YUV 4:2:2, U:Y:V:Y, reverted */
+#define VLC_CODEC_CYUV      VLC_FOURCC('c','y','u','v')
+/* 10-bit 4:2:2 Component YCbCr */
+#define VLC_CODEC_V210      VLC_FOURCC('v','2','1','0')
+
+/* Image codec (video) */
+#define VLC_CODEC_PNG       VLC_FOURCC('p','n','g',' ')
+#define VLC_CODEC_PPM       VLC_FOURCC('p','p','m',' ')
+#define VLC_CODEC_PGM       VLC_FOURCC('p','g','m',' ')
+#define VLC_CODEC_PGMYUV    VLC_FOURCC('p','g','m','y')
+#define VLC_CODEC_PAM       VLC_FOURCC('p','a','m',' ')
+#define VLC_CODEC_JPEG      VLC_FOURCC('j','p','e','g')
+#define VLC_CODEC_JPEGLS    VLC_FOURCC('M','J','L','S')
+#define VLC_CODEC_BMP       VLC_FOURCC('b','m','p',' ')
+#define VLC_CODEC_TIFF      VLC_FOURCC('t','i','f','f')
+#define VLC_CODEC_GIF       VLC_FOURCC('g','i','f',' ')
+#define VLC_CODEC_TARGA     VLC_FOURCC('t','g','a',' ')
+#define VLC_CODEC_SGI       VLC_FOURCC('s','g','i',' ')
+#define VLC_CODEC_PNM       VLC_FOURCC('p','n','m',' ')
+#define VLC_CODEC_PCX       VLC_FOURCC('p','c','x',' ')
+
+
+/* Audio codec */
+#define VLC_CODEC_MPGA      VLC_FOURCC('m','p','g','a')
+#define VLC_CODEC_MP4A      VLC_FOURCC('m','p','4','a')
+#define VLC_CODEC_A52       VLC_FOURCC('a','5','2',' ')
+#define VLC_CODEC_EAC3      VLC_FOURCC('e','a','c','3')
+#define VLC_CODEC_DTS       VLC_FOURCC('d','t','s',' ')
+#define VLC_CODEC_WMA1      VLC_FOURCC('W','M','A','1')
+#define VLC_CODEC_WMA2      VLC_FOURCC('W','M','A','2')
+#define VLC_CODEC_WMAP      VLC_FOURCC('W','M','A','P')
+#define VLC_CODEC_WMAL      VLC_FOURCC('W','M','A','L')
+#define VLC_CODEC_WMAS      VLC_FOURCC('W','M','A','S')
+#define VLC_CODEC_FLAC      VLC_FOURCC('f','l','a','c')
+#define VLC_CODEC_MLP       VLC_FOURCC('m','l','p',' ')
+#define VLC_CODEC_TRUEHD    VLC_FOURCC('t','r','h','d')
+#define VLC_CODEC_DVAUDIO   VLC_FOURCC('d','v','a','u')
+#define VLC_CODEC_SPEEX     VLC_FOURCC('s','p','x',' ')
+#define VLC_CODEC_VORBIS    VLC_FOURCC('v','o','r','b')
+#define VLC_CODEC_MACE3     VLC_FOURCC('M','A','C','3')
+#define VLC_CODEC_MACE6     VLC_FOURCC('M','A','C','6')
+#define VLC_CODEC_MUSEPACK7 VLC_FOURCC('M','P','C',' ')
+#define VLC_CODEC_MUSEPACK8 VLC_FOURCC('M','P','C','K')
+#define VLC_CODEC_RA_144    VLC_FOURCC('1','4','_','4')
+#define VLC_CODEC_RA_288    VLC_FOURCC('2','8','_','8')
+#define VLC_CODEC_ADPCM_4XM VLC_FOURCC('4','x','m','a')
+#define VLC_CODEC_ADPCM_EA  VLC_FOURCC('A','D','E','A')
+#define VLC_CODEC_INTERPLAY_DPCM VLC_FOURCC('i','d','p','c')
+#define VLC_CODEC_ROQ_DPCM  VLC_FOURCC('R','o','Q','a')
+#define VLC_CODEC_DSICINAUDIO VLC_FOURCC('D','C','I','A')
+#define VLC_CODEC_ADPCM_XA  VLC_FOURCC('x','a',' ',' ')
+#define VLC_CODEC_ADPCM_ADX VLC_FOURCC('a','d','x',' ')
+#define VLC_CODEC_ADPCM_IMA_WS VLC_FOURCC('A','I','W','S')
+#define VLC_CODEC_VMDAUDIO  VLC_FOURCC('v','m','d','a')
+#define VLC_CODEC_ADPCM_G726 VLC_FOURCC('g','7','2','6')
+#define VLC_CODEC_AMR_NB    VLC_FOURCC('s','a','m','r')
+#define VLC_CODEC_AMR_WB    VLC_FOURCC('s','a','w','b')
+#define VLC_CODEC_ALAC      VLC_FOURCC('a','l','a','c')
+#define VLC_CODEC_QDM2      VLC_FOURCC('Q','D','M','2')
+#define VLC_CODEC_COOK      VLC_FOURCC('c','o','o','k')
+#define VLC_CODEC_TTA       VLC_FOURCC('T','T','A','1')
+#define VLC_CODEC_SHORTEN   VLC_FOURCC('s','h','n',' ')
+#define VLC_CODEC_WAVPACK   VLC_FOURCC('W','V','P','K')
+#define VLC_CODEC_GSM       VLC_FOURCC('g','s','m',' ')
+#define VLC_CODEC_GSM_MS    VLC_FOURCC('a','g','s','m')
+#define VLC_CODEC_ATRAC3    VLC_FOURCC('a','t','r','c')
+#define VLC_CODEC_SONIC     VLC_FOURCC('S','O','N','C')
+#define VLC_CODEC_IMC       VLC_FOURCC(0x1,0x4,0x0,0x0)
+#define VLC_CODEC_TRUESPEECH VLC_FOURCC(0x22,0x0,0x0,0x0)
+#define VLC_CODEC_NELLYMOSER VLC_FOURCC('N','E','L','L')
+#define VLC_CODEC_APE       VLC_FOURCC('A','P','E',' ')
+#define VLC_CODEC_QCELP     VLC_FOURCC('Q','c','l','p')
+#define VLC_CODEC_302M      VLC_FOURCC('3','0','2','m')
+#define VLC_CODEC_DVD_LPCM  VLC_FOURCC('l','p','c','m')
+#define VLC_CODEC_BD_LPCM   VLC_FOURCC('b','p','c','m')
+#define VLC_CODEC_SDDS      VLC_FOURCC('s','d','d','s')
+#define VLC_CODEC_MIDI      VLC_FOURCC('M','I','D','I')
+#define VLC_CODEC_S8        VLC_FOURCC('s','8',' ',' ')
+#define VLC_CODEC_U8        VLC_FOURCC('u','8',' ',' ')
+#define VLC_CODEC_S16L      VLC_FOURCC('s','1','6','l')
+#define VLC_CODEC_S16B      VLC_FOURCC('s','1','6','b')
+#define VLC_CODEC_U16L      VLC_FOURCC('u','1','6','l')
+#define VLC_CODEC_U16B      VLC_FOURCC('u','1','6','b')
+#define VLC_CODEC_S24L      VLC_FOURCC('s','2','4','l')
+#define VLC_CODEC_S24B      VLC_FOURCC('s','2','4','b')
+#define VLC_CODEC_U24L      VLC_FOURCC('u','2','4','l')
+#define VLC_CODEC_U24B      VLC_FOURCC('u','2','4','b')
+#define VLC_CODEC_S32L      VLC_FOURCC('s','3','2','l')
+#define VLC_CODEC_S32B      VLC_FOURCC('s','3','2','b')
+#define VLC_CODEC_U32L      VLC_FOURCC('u','3','2','l')
+#define VLC_CODEC_U32B      VLC_FOURCC('u','3','2','b')
+#define VLC_CODEC_ALAW      VLC_FOURCC('a','l','a','w')
+#define VLC_CODEC_MULAW     VLC_FOURCC('m','l','a','w')
+#define VLC_CODEC_S24DAUD   VLC_FOURCC('d','a','u','d')
+#define VLC_CODEC_FI32      VLC_FOURCC('f','i','3','2')
+#define VLC_CODEC_FL32      VLC_FOURCC('f','l','3','2')
+#define VLC_CODEC_FL64      VLC_FOURCC('f','l','6','4')
+
+/* Subtitle */
+#define VLC_CODEC_SPU       VLC_FOURCC('s','p','u',' ')
+#define VLC_CODEC_DVBS      VLC_FOURCC('d','v','b','s')
+#define VLC_CODEC_SUBT      VLC_FOURCC('s','u','b','t')
+#define VLC_CODEC_XSUB      VLC_FOURCC('X','S','U','B')
+#define VLC_CODEC_SSA       VLC_FOURCC('s','s','a',' ')
+#define VLC_CODEC_TEXT      VLC_FOURCC('T','E','X','T')
+#define VLC_CODEC_TELETEXT  VLC_FOURCC('t','e','l','x')
+#define VLC_CODEC_KATE      VLC_FOURCC('k','a','t','e')
+#define VLC_CODEC_CMML      VLC_FOURCC('c','m','m','l')
+#define VLC_CODEC_ITU_T140  VLC_FOURCC('t','1','4','0')
+#define VLC_CODEC_USF       VLC_FOURCC('u','s','f',' ')
+#define VLC_CODEC_OGT       VLC_FOURCC('o','g','t',' ')
+#define VLC_CODEC_CVD       VLC_FOURCC('c','v','d',' ')
+
+
+/* Special endian dependant values
+ * The suffic N means Native
+ * The suffix I means Inverted (ie non native) */
+#ifdef WORDS_BIGENDIAN
+#   define VLC_CODEC_S16N VLC_CODEC_S16B
+#   define VLC_CODEC_U16N VLC_CODEC_U16B
+#   define VLC_CODEC_S24N VLC_CODEC_S24B
+#   define VLC_CODEC_S32N VLC_CODEC_S32B
+
+#   define VLC_CODEC_S16I VLC_CODEC_S16L
+#   define VLC_CODEC_U16I VLC_CODEC_U16L
+#   define VLC_CODEC_S24I VLC_CODEC_S24L
+#   define VLC_CODEC_S32I VLC_CODEC_S32L
+#else
+#   define VLC_CODEC_S16N VLC_CODEC_S16L
+#   define VLC_CODEC_U16N VLC_CODEC_U16L
+#   define VLC_CODEC_S24N VLC_CODEC_S24L
+#   define VLC_CODEC_S32N VLC_CODEC_S32L
+
+#   define VLC_CODEC_S16I VLC_CODEC_S16B
+#   define VLC_CODEC_U16I VLC_CODEC_U16B
+#   define VLC_CODEC_S24I VLC_CODEC_S24B
+#   define VLC_CODEC_S32I VLC_CODEC_S32B
+#endif
+
+/* Non official codecs, used to force a profile in an encoder */
+/* MPEG-1 video */
+#define VLC_CODEC_MP1V      VLC_FOURCC('m','p','1','v')
+/* MPEG-2 video */
+#define VLC_CODEC_MP2V      VLC_FOURCC('m','p','2','v')
+/* MPEG-I/II layer 3 audio */
+#define VLC_CODEC_MP3       VLC_FOURCC('m','p','3',' ')
+
+/**
+ * It returns the codec associated to a fourcc within a ES category.
+ *
+ * If not found, it will return the given fourcc.
+ * If found, it will allways be one of the VLC_CODEC_ defined above.
+ *
+ * You may use UNKNOWN_ES for the ES category if you don't have the information.
+ */
+VLC_EXPORT( vlc_fourcc_t, vlc_fourcc_GetCodec, ( int i_cat, vlc_fourcc_t i_fourcc ) );
+
+/**
+ * It returns the codec associated to a fourcc store in a zero terminated
+ * string.
+ *
+ * If the string is NULL or does not have exactly 4 charateres, it will
+ * return 0, otherwise it behaves like vlc_fourcc_GetCodec.
+ *
+ * Provided for convenience.
+ */
+VLC_EXPORT( vlc_fourcc_t, vlc_fourcc_GetCodecFromString, ( int i_cat, const char * ) );
+
+/**
+ * It convert the gives fourcc to an audio codec when possible.
+ *
+ * The fourcc converted are aflt, araw/pcm , twos, sowt. When an incompatible i_bits
+ * is detected, 0 is returned.
+ * The other fourcc goes through vlc_fourcc_GetCodec and i_bits is not checked.
+ */
+VLC_EXPORT( vlc_fourcc_t, vlc_fourcc_GetCodecAudio, ( vlc_fourcc_t i_fourcc, int i_bits ) );
+
+/**
+ * It returns the description of the given fourcc or NULL if not found.
+ *
+ * You may use UNKNOWN_ES for the ES category if you don't have the information.
+ */
+VLC_EXPORT( const char *, vlc_fourcc_GetDescription, ( int i_cat, vlc_fourcc_t i_fourcc ) );
+
+#endif /* _VLC_FOURCC_H */
+
index 06f6fc2..561a753 100644 (file)
@@ -383,8 +383,11 @@ typedef enum input_event_type_e
     /* "rate" has changed */
     INPUT_EVENT_RATE,
 
-    /* At least one of "position" or "time" or "length" has changed */
-    INPUT_EVENT_TIMES,
+    /* At least one of "position" or "time" */
+    INPUT_EVENT_POSITION,
+
+    /* "length" has changed */
+    INPUT_EVENT_LENGTH,
 
     /* A title has been added or removed or selected.
      * It imply that chapter has changed (not chapter event is sent) */
index df855f6..0aff210 100644 (file)
@@ -265,8 +265,25 @@ struct text_style_t
 #define STYLE_UNDERLINE   32
 #define STYLE_STRIKEOUT   64
 
-static const text_style_t default_text_style = { NULL, 22, 0xffffff, 0xff, STYLE_OUTLINE,
-                0x000000, 0xff, 0x000000, 0xff, 0xffffff, 0x80, 0xffffff, 0xff, 1, 0, -1 };
+/**
+ * Create a default text style
+ */
+VLC_EXPORT( text_style_t *, text_style_New, ( void ) );
+
+/**
+ * Copy a text style into another
+ */
+VLC_EXPORT( text_style_t *, text_style_Copy, ( text_style_t *, const text_style_t * ) );
+
+/**
+ * Duplicate a text style
+ */
+VLC_EXPORT( text_style_t *, text_style_Duplicate, ( const text_style_t * ) );
+
+/**
+ * Delete a text style created by text_style_New or text_style_Duplicate
+ */
+VLC_EXPORT( void, text_style_Delete, ( text_style_t * ) );
 
 /**
  * OSD menu button states
@@ -590,8 +607,8 @@ static inline void osd_SetMenuUpdate( osd_menu_t *p_osd, bool b_value )
  * object. The types are declared in the include file include/vlc_osd.h
  * @see vlc_osd.h
  */
-VLC_EXPORT( int, osd_ShowTextRelative, ( spu_t *, int, const char *, text_style_t *, int, int, int, mtime_t ) );
-VLC_EXPORT( int, osd_ShowTextAbsolute, ( spu_t *, int, const char *, text_style_t *, int, int, int, mtime_t, mtime_t ) );
+VLC_EXPORT( int, osd_ShowTextRelative, ( spu_t *, int, const char *, const text_style_t *, int, int, int, mtime_t ) );
+VLC_EXPORT( int, osd_ShowTextAbsolute, ( spu_t *, int, const char *, const text_style_t *, int, int, int, mtime_t, mtime_t ) );
 VLC_EXPORT( void, osd_Message, ( spu_t *, int, char *, ... ) LIBVLC_FORMAT( 3, 4 ) );
 
 /**
@@ -611,34 +628,9 @@ VLC_EXPORT( int, osd_Icon, ( vlc_object_t *, spu_t *, int, int, int, int, int, s
  * Vout text and widget overlays
  **********************************************************************/
 
-/**
- * Show text on the video for some time
- * \param p_vout pointer to the vout the text is to be showed on
- * \param i_channel Subpicture channel
- * \param psz_string The text to be shown
- * \param p_style Pointer to a struct with text style info
- * \param i_flags flags for alignment and such
- * \param i_hmargin horizontal margin in pixels
- * \param i_vmargin vertical margin in pixels
- * \param i_duration Amount of time the text is to be shown.
- */
-VLC_EXPORT( int, vout_ShowTextRelative, ( vout_thread_t *, int, char *, text_style_t *, int, int, int, mtime_t ) );
+VLC_EXPORT( int, vout_ShowTextRelative, ( vout_thread_t *, int, char *, const text_style_t *, int, int, int, mtime_t ) );
 
-/**
- * Show text on the video from a given start date to a given end date
- * \param p_vout pointer to the vout the text is to be showed on
- * \param i_channel Subpicture channel
- * \param psz_string The text to be shown
- * \param p_style Pointer to a struct with text style info
- * \param i_flags flags for alignment and such
- * \param i_hmargin horizontal margin in pixels
- * \param i_vmargin vertical margin in pixels
- * \param i_start the time when this string is to appear on the video
- * \param i_stop the time when this string should stop to be displayed
- *               if this is 0 the string will be shown untill the next string
- *               is about to be shown
- */
-VLC_EXPORT( int, vout_ShowTextAbsolute, ( vout_thread_t *, int, const char *, text_style_t *, int, int, int, mtime_t, mtime_t ) );
+VLC_EXPORT( int, vout_ShowTextAbsolute, ( vout_thread_t *, int, const char *, const text_style_t *, int, int, int, mtime_t, mtime_t ) );
 
 /**
  * Write an informative message at the default location,
index fc2b808..d8de71c 100644 (file)
@@ -111,7 +111,7 @@ TYPEDEF_ARRAY(playlist_item_t*, playlist_item_array_t);
  * Generally speaking, playlist_NodeAddInput should not be used in newer code, it
  * will maybe become useful again when we merge VLM;
  *
- * To delete an item, use playlist_DeleteFromInput( input_id ) which will
+ * To delete an item, use playlist_DeleteFromInput( p_item ) which will
  * remove all occurrences of the input in both trees
  *
  *
@@ -322,7 +322,7 @@ VLC_EXPORT( bool, playlist_IsServicesDiscoveryLoaded, ( playlist_t *,const char
  ********************************************************/
 
 /*************************** Item deletion **************************/
-VLC_EXPORT( int,  playlist_DeleteFromInput, ( playlist_t *, int, bool ) );
+VLC_EXPORT( int,  playlist_DeleteFromInput, ( playlist_t *, input_item_t *, bool ) );
 
 /******************** Item addition ********************/
 VLC_EXPORT( int,  playlist_Add,    ( playlist_t *, const char *, const char *, int, int, bool, bool ) );
@@ -333,7 +333,6 @@ VLC_EXPORT( int, playlist_BothAddInput, ( playlist_t *, input_item_t *,playlist_
 /********************************** Item search *************************/
 VLC_EXPORT( playlist_item_t *, playlist_ItemGetById, (playlist_t *, int ) );
 VLC_EXPORT( playlist_item_t *, playlist_ItemGetByInput, (playlist_t *,input_item_t * ) );
-VLC_EXPORT( playlist_item_t *, playlist_ItemGetByInputId, (playlist_t *, int, playlist_item_t *) );
 
 VLC_EXPORT( int, playlist_LiveSearchUpdate, (playlist_t *, playlist_item_t *, const char *) );
 
index 9fa05aa..ab2cd1d 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 5dbce84..c2dfd9c 100644 (file)
@@ -349,7 +349,8 @@ static int CommonOpen( vlc_object_t *p_this, access_sys_t *p_sys,
 
     /* Get/parse options and open device(s) */
     string vdevname, adevname;
-    int i_width = 0, i_height = 0, i_chroma = 0;
+    int i_width = 0, i_height = 0;
+    vlc_fourcc_t i_chroma = 0;
     bool b_use_audio = true;
     bool b_use_video = true;
 
@@ -419,12 +420,9 @@ static int CommonOpen( vlc_object_t *p_this, access_sys_t *p_sys,
     p_sys->b_chroma = false;
     var_Create( p_this, "dshow-chroma", VLC_VAR_STRING | VLC_VAR_DOINHERIT );
     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] );
-        p_sys->b_chroma = true;
-    }
+
+    i_chroma = vlc_fourcc_GetCodecFromString( UNKNOWN_ES, val.psz_string );
+    p_sys->b_chroma = i_chroma != 0;
     free( val.psz_string );
 
     var_Create( p_this, "dshow-fps", VLC_VAR_FLOAT | VLC_VAR_DOINHERIT );
@@ -488,11 +486,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_MPGV )
             {
                 b_use_audio = false;
 
@@ -668,7 +664,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 +721,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_MPGV )
         {
             free( p_access->psz_demux );
             p_access->psz_demux = strdup( "mpgv" );
@@ -912,17 +906,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 +1472,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 +1649,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 +1674,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 456aa87..a9f7d5c 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_MPGV;
 
-        /* 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 6384403..f611a04 100644 (file)
@@ -232,7 +232,7 @@ static int Open( vlc_object_t *p_this )
         free( psz_name );
         return VLC_EGENERIC;
     }
+
     p_sys->p_ev->p_frame = NULL;
     p_sys->p_ev->pp_last = &p_sys->p_ev->p_frame;
     p_sys->p_ev->p_access = p_access;
@@ -340,14 +340,6 @@ static block_t *Block( access_t *p_access )
     access_sys_t *p_sys = p_access->p_sys;
     block_t *p_block = NULL;
 
-#if 0
-    if( !p_access->psz_demux )
-    {
-        free( p_access->psz_demux );
-        p_access->psz_demux = strdup( "rawdv" );
-    }
-#endif
-
     vlc_mutex_lock( &p_sys->lock );
     p_block = p_sys->p_frame;
     //msg_Dbg( p_access, "sending frame %p",p_block );
@@ -401,7 +393,7 @@ static int Raw1394Handler( raw1394handle_t handle, int channel, size_t length, q
     p_sys = p_access->p_sys;
 
     /* skip empty packets */
-    if ( length > 16 )
+    if( length > 16 )
     {
         unsigned char * p = ( unsigned char* ) &data[ 3 ];
         int section_type = p[ 0 ] >> 5;           /* section type is in bits 5 - 7 */
@@ -476,13 +468,13 @@ static int Raw1394GetNumPorts( access_t *p_access )
     raw1394handle_t handle;
 
     /* get a raw1394 handle */
-    if ( !( handle = raw1394_new_handle() ) )
+    if( !( handle = raw1394_new_handle() ) )
     {
         msg_Err( p_access, "raw1394 - failed to get handle: %m." );
         return VLC_EGENERIC;
     }
 
-    if ( ( n_ports = raw1394_get_port_info( handle, pinf, 16 ) ) < 0 )
+    if( ( n_ports = raw1394_get_port_info( handle, pinf, 16 ) ) < 0 )
     {
         msg_Err( p_access, "raw1394 - failed to get port info: %m." );
         raw1394_destroy_handle( handle );
@@ -500,21 +492,14 @@ static raw1394handle_t Raw1394Open( access_t *p_access, int port )
     raw1394handle_t handle;
 
     /* get a raw1394 handle */
-#ifdef RAW1394_V_0_8
-
-    handle = raw1394_get_handle();
-#else
-
     handle = raw1394_new_handle();
-#endif
-
-    if ( !handle )
+    if( !handle )
     {
         msg_Err( p_access, "raw1394 - failed to get handle: %m." );
         return NULL;
     }
 
-    if ( ( n_ports = raw1394_get_port_info( handle, pinf, 16 ) ) < 0 )
+    if( ( n_ports = raw1394_get_port_info( handle, pinf, 16 ) ) < 0 )
     {
         msg_Err( p_access, "raw1394 - failed to get port info: %m." );
         raw1394_destroy_handle( handle );
@@ -522,7 +507,7 @@ static raw1394handle_t Raw1394Open( access_t *p_access, int port )
     }
 
     /* tell raw1394 which host adapter to use */
-    if ( raw1394_set_port( handle, port ) < 0 )
+    if( raw1394_set_port( handle, port ) < 0 )
     {
         msg_Err( p_access, "raw1394 - failed to set set port: %m." );
         return NULL;
@@ -598,8 +583,8 @@ static int DiscoverAVC( access_t *p_access, int* port, uint64_t guid )
 static raw1394handle_t AVCOpen( access_t *p_access, int port )
 {
     access_sys_t *p_sys = p_access->p_sys;
-    int numcards;
     struct raw1394_portinfo pinf[ 16 ];
+    int numcards;
 
     p_sys->p_avc1394 = raw1394_new_handle();
     if( !p_sys->p_avc1394 )
@@ -627,7 +612,6 @@ static void AVCClose( access_t *p_access )
     }
 }
 
-
 static int AVCResetHandler( raw1394handle_t handle, unsigned int generation )
 {
     raw1394_update_generation( handle, generation );
index 8e05040..ed87e88 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 7ea6527..140b0f9 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 088378f..cc8f056 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 1f8c6f6..15075ad 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 7f6492e..8a98bd6 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 165250c..5f70cdc 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 5b14fdd..f469bac 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 e70b168..173823c 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 e0cfd7a..01cac09 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 8723f15..1cb4a55 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 11261e7..16e408a 100644 (file)
@@ -212,27 +212,25 @@ struct quicktime_mjpeg_app1
 static const struct
 {
     int i_v4l;
-    int i_fourcc;
+    vlc_fourcc_t i_fourcc;
 
 } 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;
@@ -977,10 +975,12 @@ static int OpenVideoDev( demux_t *p_demux, char *psz_device )
             p_sys->i_fourcc = 0;
 
             psz = var_CreateGetString( p_demux, "v4l-chroma" );
-            if( strlen( psz ) >= 4 )
+
+            const vlc_fourcc_t i_chroma =
+                vlc_fourcc_GetCodecFromString( VIDEO_ES, psz );
+            if( i_chroma )
             {
                 vid_picture.palette = 0;
-                int i_chroma = 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 +1056,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 0e9b5b6..aa511ee 100644 (file)
@@ -393,42 +393,41 @@ static int AccessControlResetCallback( vlc_object_t *p_this,
 static const struct
 {
     unsigned int i_v4l2;
-    int i_fourcc;
+    vlc_fourcc_t i_fourcc;
     int i_rmask;
     int i_gmask;
     int i_bmask;
 } 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('?','?','?','?') },
@@ -1946,21 +1945,18 @@ static int OpenVideoDev( vlc_object_t *p_obj, demux_sys_t *p_sys, bool b_demux )
 
     /* Test and set Chroma */
     fmt.fmt.pix.pixelformat = 0;
-    if( p_sys->psz_requested_chroma && strlen( p_sys->psz_requested_chroma ) > 0 )
+    if( p_sys->psz_requested_chroma && *p_sys->psz_requested_chroma )
     {
         /* User specified chroma */
-        if( strlen( p_sys->psz_requested_chroma ) >= 4 )
+        const vlc_fourcc_t i_requested_fourcc =
+            vlc_fourcc_GetCodecFromString( VIDEO_ES, p_sys->psz_requested_chroma );
+
+        for( int i = 0; v4l2chroma_to_fourcc[i].i_v4l2 != 0; i++ )
         {
-            int i_requested_fourcc = 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] );
-            for( int i = 0; v4l2chroma_to_fourcc[i].i_v4l2 != 0; i++ )
+            if( v4l2chroma_to_fourcc[i].i_fourcc == i_requested_fourcc )
             {
-                if( v4l2chroma_to_fourcc[i].i_fourcc == i_requested_fourcc )
-                {
-                    fmt.fmt.pix.pixelformat = v4l2chroma_to_fourcc[i].i_v4l2;
-                    break;
-                }
+                fmt.fmt.pix.pixelformat = v4l2chroma_to_fourcc[i].i_v4l2;
+                break;
             }
         }
         /* Try and set user chroma */
index 3b54cae..5e3810b 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 42d1bcd..c659cdf 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 77bc29f..7e4af3d 100644 (file)
@@ -358,8 +358,8 @@ static int OpenFilter( vlc_object_t *p_this )
         return VLC_EGENERIC;
     }
 
-    if( (p_filter->fmt_in.i_codec != AOUT_FMT_S16_NE) ||
-        (p_filter->fmt_out.i_codec != AOUT_FMT_S16_NE) )
+    if( (p_filter->fmt_in.i_codec != VLC_CODEC_S16N) ||
+        (p_filter->fmt_out.i_codec != VLC_CODEC_S16N) )
     {
         /*msg_Err( p_this, "filter discarded (invalid format)" );*/
         return VLC_EGENERIC;
@@ -367,8 +367,8 @@ static int OpenFilter( vlc_object_t *p_this )
 
     if( (p_filter->fmt_in.audio.i_format != p_filter->fmt_out.audio.i_format) &&
         (p_filter->fmt_in.audio.i_rate != p_filter->fmt_out.audio.i_rate) &&
-        (p_filter->fmt_in.audio.i_format != AOUT_FMT_S16_NE) &&
-        (p_filter->fmt_out.audio.i_format != AOUT_FMT_S16_NE) &&
+        (p_filter->fmt_in.audio.i_format != VLC_CODEC_S16N) &&
+        (p_filter->fmt_out.audio.i_format != VLC_CODEC_S16N) &&
         (p_filter->fmt_in.audio.i_bitspersample !=
                                     p_filter->fmt_out.audio.i_bitspersample))
     {
index 443c3cf..c6cf8b0 100644 (file)
@@ -291,7 +291,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 ee393ed..42ac93e 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 ad18a0e..083caf7 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 f438551..7bfc580 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 0028e13..0d48406 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 d55446d..7ae3932 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 1282838..c770279 100644 (file)
@@ -73,8 +73,8 @@ 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')
-          || p_filter->output.i_format != AOUT_FMT_S16_NE )
+    if ( p_filter->input.i_format != VLC_CODEC_FI32
+          || p_filter->output.i_format != VLC_CODEC_S16N )
     {
         return -1;
     }
@@ -157,8 +157,8 @@ 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')
-          || p_filter->input.i_format != AOUT_FMT_S16_NE )
+    if ( p_filter->output.i_format != VLC_CODEC_FI32
+          || p_filter->input.i_format != VLC_CODEC_S16N )
     {
         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 223aa1e..b927175 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,8 +202,8 @@ 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')
-          || p_filter->output.i_format != AOUT_FMT_S16_NE )
+    if ( p_filter->input.i_format != VLC_CODEC_FL32
+          || p_filter->output.i_format != VLC_CODEC_S16N )
     {
         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,8 +302,8 @@ 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')
-          || p_filter->output.i_format != AOUT_FMT_U16_NE )
+    if ( p_filter->input.i_format != VLC_CODEC_FL32
+          || p_filter->output.i_format != VLC_CODEC_U16N )
     {
         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;
     }
@@ -392,10 +392,10 @@ static int Create_S16ToFL32( vlc_object_t *p_this )
 {
     aout_filter_t * p_filter = (aout_filter_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') )
+    if ( ( p_filter->input.i_format != VLC_CODEC_S16N &&
+           p_filter->input.i_format != VLC_CODEC_S24N &&
+           p_filter->input.i_format != VLC_CODEC_S32N )
+          || p_filter->output.i_format != VLC_CODEC_FL32 )
     {
         return -1;
     }
@@ -405,9 +405,9 @@ static int Create_S16ToFL32( vlc_object_t *p_this )
         return -1;
     }
 
-    if( p_filter->input.i_format == AOUT_FMT_S32_NE )
+    if( p_filter->input.i_format == VLC_CODEC_S32N )
         p_filter->pf_do_work = Do_S32ToFL32;
-    else if( p_filter->input.i_format == AOUT_FMT_S24_NE )
+    else if( p_filter->input.i_format == VLC_CODEC_S24N )
         p_filter->pf_do_work = Do_S24ToFL32;
     else
         p_filter->pf_do_work = Do_S16ToFL32;
@@ -505,10 +505,10 @@ 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')
-         && p_filter->input.i_format != AOUT_FMT_S16_NE )
+    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 != VLC_CODEC_S16N )
     {
         p_filter->pf_do_work = Do_S16ToFL32_SW;
         p_filter->b_in_place = true;
@@ -516,10 +516,10 @@ 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')
-         && p_filter->input.i_format != AOUT_FMT_S24_NE )
+    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 != VLC_CODEC_S24N )
     {
         p_filter->pf_do_work = Do_S24ToFL32_SW;
         p_filter->b_in_place = true;
@@ -527,10 +527,10 @@ 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')
-         && p_filter->input.i_format != AOUT_FMT_S32_NE )
+    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 != VLC_CODEC_S32N )
     {
         p_filter->pf_do_work = Do_S32ToFL32_SW;
         p_filter->b_in_place = true;
@@ -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 357ccb8..1bee61d 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 33b6469..e10696f 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 0811231..6f8a604 100644 (file)
 #include <vlc_block.h>
 #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')
-#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')
-#endif
-
-
 /*****************************************************************************
  * Local prototypes
  *****************************************************************************/
@@ -125,74 +114,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, VLC_CODEC_S24N, Float32toS24 },
+    { VLC_CODEC_FL32, VLC_CODEC_S16N, Float32toS16 },
+    { VLC_CODEC_FL32, VLC_CODEC_U16N, Float32toU16 },
+    { VLC_CODEC_FL32, VLC_CODEC_S24I, Float32toS24Invert },
+    { VLC_CODEC_FL32, VLC_CODEC_S16I, Float32toS16Invert },
+    { VLC_CODEC_FL32, VLC_CODEC_U16I, 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, AOUT_FMT_S24_IE,             Swap24 },
-    { AOUT_FMT_S24_NE, AOUT_FMT_S16_NE,             S24toS16 },
-    { AOUT_FMT_S24_NE, AOUT_FMT_S16_IE,             S24toS16Invert },
+    { VLC_CODEC_S24N, VLC_CODEC_FL32, S24toFloat32 },
+    { VLC_CODEC_S24N, VLC_CODEC_S24I,             Swap24 },
+    { VLC_CODEC_S24N, VLC_CODEC_S16N,             S24toS16 },
+    { VLC_CODEC_S24N, VLC_CODEC_S16I,             S24toS16Invert },
 
     /* From s16 */
-    { AOUT_FMT_S16_NE, VLC_FOURCC('f','l','3','2'), 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 },
+    { VLC_CODEC_S16N, VLC_CODEC_FL32, S16toFloat32 },
+    { VLC_CODEC_S16N, VLC_CODEC_S24N,             S16toS24 },
+    { VLC_CODEC_S16N, VLC_CODEC_S24I,             S16toS24Invert },
+    { VLC_CODEC_S16N, VLC_CODEC_S16I,             Swap16 },
+    { VLC_CODEC_S16N, VLC_CODEC_U16I,             S16toU16 },
+    { VLC_CODEC_S16N, VLC_CODEC_S8, S16toS8 },
+    { VLC_CODEC_S16N, VLC_CODEC_U8, S16toU8 },
 
     /* From u16 */
-    { AOUT_FMT_U16_NE, VLC_FOURCC('f','l','3','2'), 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 },
+    { VLC_CODEC_U16N, VLC_CODEC_FL32, U16toFloat32 },
+    { VLC_CODEC_U16N, VLC_CODEC_U16I,             Swap16 },
+    { VLC_CODEC_U16N, VLC_CODEC_S16I,             U16toS16 },
+    { VLC_CODEC_U16N, VLC_CODEC_S8, U16toS8 },
+    { VLC_CODEC_U16N, 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, VLC_CODEC_S16N,             S8toS16 },
+    { VLC_CODEC_S8, VLC_CODEC_S16I,             S8toS16Invert },
+    { VLC_CODEC_S8, VLC_CODEC_U16N,             S8toU16 },
+    { VLC_CODEC_S8, VLC_CODEC_U16I,             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, VLC_CODEC_S16N,             U8toS16 },
+    { VLC_CODEC_U8, VLC_CODEC_S16I,             U8toS16Invert },
+    { VLC_CODEC_U8, VLC_CODEC_U16N,             U8toU16 },
+    { VLC_CODEC_U8, VLC_CODEC_U16I,             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, AOUT_FMT_S24_NE,             Swap24 },
-    { AOUT_FMT_S24_IE, AOUT_FMT_S16_NE,             S24InverttoS16 },
-    { AOUT_FMT_S24_IE, AOUT_FMT_S16_IE,             S24InverttoS16Invert },
+    { VLC_CODEC_S24I, VLC_CODEC_FL32, S24InverttoFloat32 },
+    { VLC_CODEC_S24I, VLC_CODEC_S24N,             Swap24 },
+    { VLC_CODEC_S24I, VLC_CODEC_S16N,             S24InverttoS16 },
+    { VLC_CODEC_S24I, VLC_CODEC_S16I,             S24InverttoS16Invert },
 
     /* From s16 invert */
-    { AOUT_FMT_S16_IE, VLC_FOURCC('f','l','3','2'), 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 },
+    { VLC_CODEC_S16I, VLC_CODEC_FL32, S16InverttoFloat32 },
+    { VLC_CODEC_S16I, VLC_CODEC_S24N,             S16InverttoS24 },
+    { VLC_CODEC_S16I, VLC_CODEC_S24I,             S16InverttoS24Invert },
+    { VLC_CODEC_S16I, VLC_CODEC_S16N,             Swap16 },
+    { VLC_CODEC_S16I, VLC_CODEC_U16N,             S16InverttoU16 },
+    { VLC_CODEC_S16I, VLC_CODEC_S8, S16InverttoS8 },
+    { VLC_CODEC_S16I, VLC_CODEC_U8, S16InverttoU8 },
 
     /* From u16 invert */
-    { AOUT_FMT_U16_IE, VLC_FOURCC('f','l','3','2'), 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 },
+    { VLC_CODEC_U16I, VLC_CODEC_FL32, U16InverttoFloat32 },
+    { VLC_CODEC_U16I, VLC_CODEC_U16N,             Swap16 },
+    { VLC_CODEC_U16I, VLC_CODEC_S16N,             U16InverttoS16 },
+    { VLC_CODEC_U16I, VLC_CODEC_S8, U16InverttoS8 },
+    { VLC_CODEC_U16I, VLC_CODEC_U8, U16InverttoU8 },
 
     { 0, 0, NULL },
 };
index d0a2e35..7ec974e 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 b20a84a..fa8c194 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 9ec0714..485f320 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 161b754..41be20b 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 7558604..1691868 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 28e38e7..059d007 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 a40435d..3137bf1 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 5ed460b..34a6c45 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 e3f9054..474dd52 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 2512981..3cdd04c 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 2d03d1d..fb2f45c 100644 (file)
@@ -360,12 +360,12 @@ 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
     {
-        i_vlc_pcm_format = AOUT_FMT_S16_NE;
+        i_vlc_pcm_format = VLC_CODEC_S16N;
         i_snd_pcm_format = SND_PCM_FORMAT_S16;
     }
 
@@ -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,14 +540,14 @@ 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;
+            i_vlc_pcm_format = VLC_CODEC_S16N;
             break;
         }
         p_aout->output.output.i_format = i_vlc_pcm_format;
@@ -624,7 +624,7 @@ static int Open( vlc_object_t *p_this )
             {
                 b_retry = true;
                 i_snd_pcm_format = SND_PCM_FORMAT_S16;
-                p_aout->output.output.i_format = AOUT_FMT_S16_NE;
+                p_aout->output.output.i_format = VLC_CODEC_S16N;
                 msg_Warn( p_aout, "unable to commit hardware configuration "
                                   "with fl32 samples. Retrying with s16l (%s)",                                     snd_strerror( i_snd_rc ) );
             }
@@ -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 1effe5b..edb438c 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 c05d3cb..98ce314 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 f6f851a..cb9bc0c 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',' ',' '),
-                                  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') };
+static const int format_int[] = { VLC_CODEC_U8,
+                                  VLC_CODEC_S8,
+                                  VLC_CODEC_U16N, VLC_CODEC_S16N,
+                                  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 78a77d1..1b736da 100644 (file)
@@ -156,7 +156,7 @@ static int Open( vlc_object_t * p_this )
         }
     }
 
-    p_aout->output.output.i_format = AOUT_FMT_S16_NE;
+    p_aout->output.output.i_format = VLC_CODEC_S16N;
     p_aout->output.i_nb_samples = FRAME_SIZE;
     p_aout->output.output.i_physical_channels
             = AOUT_CHAN_LEFT | AOUT_CHAN_RIGHT;
index aeb203f..db5d044 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 e615465..6ee0688 100644 (file)
@@ -326,11 +326,11 @@ 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 )
     {
-        p_aout->output.output.i_format = AOUT_FMT_S16_NE;
+        p_aout->output.output.i_format = VLC_CODEC_S16N;
         p_aout->output.output.i_physical_channels
             = AOUT_CHAN_LEFT | AOUT_CHAN_RIGHT | AOUT_CHAN_CENTER
                | AOUT_CHAN_REARLEFT | AOUT_CHAN_REARRIGHT
@@ -338,20 +338,20 @@ static int Open( vlc_object_t *p_this )
     }
     else if ( val.i_int == AOUT_VAR_2F2R )
     {
-        p_aout->output.output.i_format = AOUT_FMT_S16_NE;
+        p_aout->output.output.i_format = VLC_CODEC_S16N;
         p_aout->output.output.i_physical_channels
             = AOUT_CHAN_LEFT | AOUT_CHAN_RIGHT
                | AOUT_CHAN_REARLEFT | AOUT_CHAN_REARRIGHT;
     }
     else if ( val.i_int == AOUT_VAR_STEREO )
     {
-        p_aout->output.output.i_format = AOUT_FMT_S16_NE;
+        p_aout->output.output.i_format = VLC_CODEC_S16N;
         p_aout->output.output.i_physical_channels
             = AOUT_CHAN_LEFT | AOUT_CHAN_RIGHT;
     }
     else if ( val.i_int == AOUT_VAR_MONO )
     {
-        p_aout->output.output.i_format = AOUT_FMT_S16_NE;
+        p_aout->output.output.i_format = VLC_CODEC_S16N;
         p_aout->output.output.i_physical_channels = AOUT_CHAN_CENTER;
     }
     else
@@ -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 f73ce9b..9611a22 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 86bd6dd..bacd55c 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 10d6eb7..f8425fa 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 8bea3e3..27f2561 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 474a1d0..38c7d7c 100644 (file)
@@ -114,16 +114,15 @@ 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_FOURCC('a','5','2','b'):
-        i_codec = VLC_FOURCC('a','5','2',' ');
+    case VLC_CODEC_A52:
+        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 d62cdaa..61f749f 100644 (file)
@@ -247,7 +247,7 @@ static int OpenDecoder( vlc_object_t *p_this )
              p_sys->i_samplesperblock );
 
     p_dec->fmt_out.i_cat = AUDIO_ES;
-    p_dec->fmt_out.i_codec = AOUT_FMT_S16_NE;
+    p_dec->fmt_out.i_codec = VLC_CODEC_S16N;
     p_dec->fmt_out.audio.i_rate = p_dec->fmt_in.audio.i_rate;
     p_dec->fmt_out.audio.i_channels = p_dec->fmt_in.audio.i_channels;
     p_dec->fmt_out.audio.i_physical_channels =
index 986fa78..e1fd626 100644 (file)
@@ -233,7 +233,7 @@ static int Open( decoder_t *p_dec, bool b_packetizer )
 {
     decoder_sys_t *p_sys;
 
-    if( p_dec->fmt_in.i_codec != VLC_FOURCC('a','e','s','3') )
+    if( p_dec->fmt_in.i_codec != VLC_CODEC_302M )
         return VLC_EGENERIC;
 
     /* Allocate the memory needed to store the decoder's structure */
@@ -253,7 +253,7 @@ static int Open( decoder_t *p_dec, bool b_packetizer )
     /* Set callback */
     if( b_packetizer )
     {
-        p_dec->fmt_out.i_codec = VLC_FOURCC('a','e','s','3');
+        p_dec->fmt_out.i_codec = VLC_CODEC_302M;
 
         p_dec->pf_decode_audio = NULL;
         p_dec->pf_packetize    = Packetize;
@@ -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 7a5ec82..4196a9c 100644 (file)
@@ -188,23 +188,19 @@ 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_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_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 */
+    case VLC_CODEC_ALAW:
+    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:
         break;
 
     default:
@@ -236,150 +232,63 @@ 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;
     }
-    else if( p_dec->fmt_in.i_codec == VLC_FOURCC( 'i', 'n', '3', '2' ) )
-    {
-        /* 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_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_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_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;
     }
-    else if( p_dec->fmt_in.i_codec == VLC_FOURCC( 'a', 'f', 'l', 't' ) )
+    else if( p_dec->fmt_in.i_codec == VLC_CODEC_ALAW )
     {
-        switch( ( p_dec->fmt_in.audio.i_bitspersample + 7 ) / 8 )
-        {
-        case 4:
-            p_dec->fmt_out.i_codec = VLC_FOURCC('f','l','3','2');
-            break;
-        case 8:
-            p_dec->fmt_out.i_codec = VLC_FOURCC('f','l','6','4');
-            break;
-        default:
-            msg_Err( p_dec, "bad parameters(bits/sample)" );
-            return VLC_EGENERIC;
-        }
-    }
-    else if( p_dec->fmt_in.i_codec == VLC_FOURCC( 'a', 'r', 'a', 'w' ) ||
-             p_dec->fmt_in.i_codec == VLC_FOURCC( 'p', 'c', 'm', ' ' ) )
-    {
-        switch( ( p_dec->fmt_in.audio.i_bitspersample + 7 ) / 8 )
-        {
-        case 1:
-            p_dec->fmt_out.i_codec = VLC_FOURCC('u','8',' ',' ');
-            break;
-        case 2:
-            p_dec->fmt_out.i_codec = VLC_FOURCC('s','1','6','l');
-            break;
-        case 3:
-            p_dec->fmt_out.i_codec = VLC_FOURCC('s','2','4','l');
-            break;
-        case 4:
-            p_dec->fmt_out.i_codec = VLC_FOURCC('s','3','2','l');
-            break;
-        default:
-            msg_Err( p_dec, "bad parameters(bits/sample)" );
-            return VLC_EGENERIC;
-        }
+        p_dec->fmt_out.i_codec = VLC_CODEC_S16N;
+        p_sys->p_logtos16  = alawtos16;
+        p_dec->fmt_in.audio.i_bitspersample = 8;
     }
-    else if( p_dec->fmt_in.i_codec == VLC_FOURCC( 't', 'w', 'o', 's' ) )
+    else if( p_dec->fmt_in.i_codec == VLC_CODEC_MULAW )
     {
-        switch( ( p_dec->fmt_in.audio.i_bitspersample + 7 ) / 8 )
-        {
-        case 1:
-            p_dec->fmt_out.i_codec = VLC_FOURCC('s','8',' ',' ');
-            break;
-        case 2:
-            p_dec->fmt_out.i_codec = VLC_FOURCC('s','1','6','b');
-            break;
-        case 3:
-            p_dec->fmt_out.i_codec = VLC_FOURCC('s','2','4','b');
-            break;
-        case 4:
-            p_dec->fmt_out.i_codec = VLC_FOURCC('s','3','2','b');
-            break;
-        default:
-            msg_Err( p_dec, "bad parameters(bits/sample)" );
-            return VLC_EGENERIC;
-        }
+        p_dec->fmt_out.i_codec = VLC_CODEC_S16N;
+        p_sys->p_logtos16  = ulawtos16;
+        p_dec->fmt_in.audio.i_bitspersample = 8;
     }
-    else if( p_dec->fmt_in.i_codec == VLC_FOURCC( 's', 'o', 'w', 't' ) )
+    else
     {
-        switch( ( p_dec->fmt_in.audio.i_bitspersample + 7 ) / 8 )
+        p_dec->fmt_out.i_codec =
+            vlc_fourcc_GetCodecAudio( p_dec->fmt_in.i_codec,
+                                      p_dec->fmt_in.audio.i_bitspersample );
+        if( !p_dec->fmt_out.i_codec )
         {
-        case 1:
-            p_dec->fmt_out.i_codec = VLC_FOURCC('s','8',' ',' ');
-            break;
-        case 2:
-            p_dec->fmt_out.i_codec = VLC_FOURCC('s','1','6','l');
-            break;
-        case 3:
-            p_dec->fmt_out.i_codec = VLC_FOURCC('s','2','4','l');
-            break;
-        case 4:
-            p_dec->fmt_out.i_codec = VLC_FOURCC('s','3','2','l');
-            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' ) )
-    {
-        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_out.i_codec = AOUT_FMT_S16_NE;
-        p_sys->p_logtos16  = ulawtos16;
-        p_dec->fmt_in.audio.i_bitspersample = 8;
-    }
-    else return VLC_EGENERIC;
 
     /* Set output properties */
     p_dec->fmt_out.i_cat = AUDIO_ES;
@@ -396,9 +305,8 @@ 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' ) ||
-        p_dec->fmt_in.i_codec == VLC_FOURCC( 'u', 'l', 'a', 'w' ) ||
-        p_dec->fmt_in.i_codec == VLC_FOURCC( 'm', 'l', 'a', 'w' ) )
+    if( p_dec->fmt_in.i_codec == VLC_CODEC_ALAW ||
+        p_dec->fmt_in.i_codec == VLC_CODEC_MULAW )
     {
         p_dec->fmt_out.audio.i_bitspersample = 16;
     }
@@ -1378,40 +1286,37 @@ 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') ||
-        p_enc->fmt_out.i_codec == VLC_FOURCC('u','l','a','w') ||
-        p_enc->fmt_out.i_codec == VLC_FOURCC('m','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_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') ||
-             p_enc->fmt_out.i_codec == VLC_FOURCC('i','n','2','4') )
+    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.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') ||
-             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') )
+    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_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,17 +1334,16 @@ 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_enc->fmt_in.i_codec = VLC_CODEC_S16N;
         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' ) )
+    else if( 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;
+        p_enc->fmt_in.i_codec = VLC_CODEC_S16N;
         p_sys->i_s16tolog = ULAW;
     }
 
index cb89dd1..8a6f802 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,30 +454,30 @@ 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:
-        p_dec->fmt_out.i_codec = AOUT_FMT_S32_NE;
+        p_dec->fmt_out.i_codec = VLC_CODEC_S32N;
         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;
 
     case SAMPLE_FMT_S16:
     default:
-        p_dec->fmt_out.i_codec = AOUT_FMT_S16_NE;
+        p_dec->fmt_out.i_codec = VLC_CODEC_S16N;
         p_dec->fmt_out.audio.i_bitspersample = 16;
         break;
     }
 #else
-    p_dec->fmt_out.i_codec = AOUT_FMT_S16_NE;
+    p_dec->fmt_out.i_codec = VLC_CODEC_S16N;
     p_dec->fmt_out.audio.i_bitspersample = 16;
 #endif
     p_dec->fmt_out.audio.i_rate     = p_sys->p_context->sample_rate;
index 6913a42..6e13170 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 092090d..44e2f6c 100644 (file)
@@ -453,8 +453,9 @@ 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_MPGV ||
+               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 +471,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 );
 
@@ -583,11 +584,11 @@ int OpenEncoder( vlc_object_t *p_this )
         if( i_codec_id == CODEC_ID_MP3 && p_enc->fmt_in.audio.i_channels > 2 )
             p_enc->fmt_in.audio.i_channels = 2;
 
-        p_enc->fmt_in.i_codec  = AOUT_FMT_S16_NE;
+        p_enc->fmt_in.i_codec  = VLC_CODEC_S16N;
         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 +873,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 79f993d..51d0c59 100644 (file)
@@ -46,770 +46,185 @@ static const struct
     vlc_fourcc_t  i_fourcc;
     int  i_codec;
     int  i_cat;
-    const char psz_name[36];
 } codecs_table[] =
 {
     /*
      * Video Codecs
      */
 
-    /* MPEG-1 Video */
-    { VLC_FOURCC('m','p','1','v'), CODEC_ID_MPEG1VIDEO,
-      VIDEO_ES, "MPEG-1 Video" },
-    { VLC_FOURCC('m','p','e','g'), CODEC_ID_MPEG1VIDEO,
-      VIDEO_ES, "MPEG-1 Video" },
-    { VLC_FOURCC('m','p','g','1'), CODEC_ID_MPEG1VIDEO,
-      VIDEO_ES, "MPEG-1 Video" },
-    { VLC_FOURCC('P','I','M','1'), CODEC_ID_MPEG1VIDEO,
-      VIDEO_ES, "Pinnacle DC1000 (MPEG-1 Video)" },
-
-    /* MPEG-2 Video */
-    { VLC_FOURCC('m','p','2','v'), CODEC_ID_MPEG2VIDEO,
-      VIDEO_ES, "MPEG-2 Video" },
-    { VLC_FOURCC('M','P','E','G'), CODEC_ID_MPEG2VIDEO,
-      VIDEO_ES, "MPEG-2 Video" },
-    { VLC_FOURCC('m','p','g','v'), CODEC_ID_MPEG2VIDEO,
-      VIDEO_ES, "MPEG-2 Video" },
-    { VLC_FOURCC('m','p','g','2'), CODEC_ID_MPEG2VIDEO,
-      VIDEO_ES, "MPEG-2 Video" },
-    { VLC_FOURCC('h','d','v','1'), CODEC_ID_MPEG2VIDEO,
-      VIDEO_ES, "HDV 720p30 (MPEG-2 Video)" },
-    { VLC_FOURCC('h','d','v','2'), CODEC_ID_MPEG2VIDEO,
-      VIDEO_ES, "Sony HDV (MPEG-2 Video)" },
-    { VLC_FOURCC('h','d','v','3'), CODEC_ID_MPEG2VIDEO,
-      VIDEO_ES, "FCP HDV (MPEG-2 Video)" },
-    { VLC_FOURCC('h','d','v','5'), CODEC_ID_MPEG2VIDEO,
-      VIDEO_ES, "HDV 720p25 (MPEG-2 Video)" },
-    { VLC_FOURCC('h','d','v','6'), CODEC_ID_MPEG2VIDEO,
-      VIDEO_ES, "HDV 1080p24 (MPEG-2 Video)" },
-    { VLC_FOURCC('h','d','v','7'), CODEC_ID_MPEG2VIDEO,
-      VIDEO_ES, "HDV 1080p25 (MPEG-2 Video)" },
-    { VLC_FOURCC('h','d','v','8'), CODEC_ID_MPEG2VIDEO,
-      VIDEO_ES, "HDV 1080p30 (MPEG-2 Video)" },
-
-    { VLC_FOURCC('m','x','5','n'), CODEC_ID_MPEG2VIDEO,
-      VIDEO_ES, "MPEG2 IMX NTSC 525/60 50mb/s (FCP)" },
-    { VLC_FOURCC('m','x','5','p'), CODEC_ID_MPEG2VIDEO,
-      VIDEO_ES, "MPEG2 IMX PAL 625/60 50mb/s (FCP)" },
-    { VLC_FOURCC('m','x','4','n'), CODEC_ID_MPEG2VIDEO,
-      VIDEO_ES, "MPEG2 IMX NTSC 525/60 40mb/s (FCP)" },
-    { VLC_FOURCC('m','x','4','p'), CODEC_ID_MPEG2VIDEO,
-      VIDEO_ES, "MPEG2 IMX PAL 625/50 40mb/s (FCP)" },
-    { VLC_FOURCC('m','x','3','n'), CODEC_ID_MPEG2VIDEO,
-      VIDEO_ES, "MPEG2 IMX NTSC 525/60 30mb/s (FCP)" },
-    { VLC_FOURCC('m','x','3','p'), CODEC_ID_MPEG2VIDEO,
-      VIDEO_ES, "MPEG2 IMX NTSC 625/50 30mb/s (FCP)" },
-    { VLC_FOURCC('x','d','v','2'), CODEC_ID_MPEG2VIDEO,
-      VIDEO_ES, "XDCAM HD 1080i60" },
-    { VLC_FOURCC('A','V','m','p'), CODEC_ID_MPEG2VIDEO,
-      VIDEO_ES, "AVID IMX PAL" },
-    /* ATI VCR2 */
-    { VLC_FOURCC('V','C','R','2'), CODEC_ID_MPEG2VIDEO,
-      VIDEO_ES, "ATI VCR2 Video" },
-    { VLC_FOURCC('M','M','E','S'), CODEC_ID_MPEG2VIDEO,
-      VIDEO_ES, "Matrox MPEG-2" },
-    { VLC_FOURCC('m','m','e','s'), CODEC_ID_MPEG2VIDEO,
-      VIDEO_ES, "Matrox MPEG-2" },
-    { VLC_FOURCC('P','I','M','2'), CODEC_ID_MPEG2VIDEO,
-      VIDEO_ES, "Pinnacle DC1000 (MPEG-2 Video)" },
-
-    /* MPEG-4 Video */
-    { VLC_FOURCC('D','I','V','X'), CODEC_ID_MPEG4,
-      VIDEO_ES, "MPEG-4 Video" },
-    { VLC_FOURCC('d','i','v','x'), CODEC_ID_MPEG4,
-      VIDEO_ES, "MPEG-4 Video" },
-    { VLC_FOURCC('M','P','4','S'), CODEC_ID_MPEG4,
-      VIDEO_ES, "MPEG-4 Video" },
-    { VLC_FOURCC('m','p','4','s'), CODEC_ID_MPEG4,
-      VIDEO_ES, "MPEG-4 Video" },
-    { VLC_FOURCC('M','4','S','2'), CODEC_ID_MPEG4,
-      VIDEO_ES, "MPEG-4 Video" },
-    { VLC_FOURCC('m','4','s','2'), CODEC_ID_MPEG4,
-      VIDEO_ES, "MPEG-4 Video" },
-    /* XVID flavours */
-    { VLC_FOURCC('x','v','i','d'), CODEC_ID_MPEG4,
-      VIDEO_ES, "MPEG-4 Video" },
-    { VLC_FOURCC('X','V','I','D'), CODEC_ID_MPEG4,
-      VIDEO_ES, "MPEG-4 Video" },
-    { VLC_FOURCC('X','v','i','D'), CODEC_ID_MPEG4,
-      VIDEO_ES, "MPEG-4 Video" },
-    { VLC_FOURCC('X','V','I','X'), CODEC_ID_MPEG4,
-      VIDEO_ES, "MPEG-4 Video" },
-    { VLC_FOURCC('x','v','i','x'), CODEC_ID_MPEG4,
-      VIDEO_ES, "MPEG-4 Video" },
-    /* DX50 */
-    { VLC_FOURCC('D','X','5','0'), CODEC_ID_MPEG4,
-      VIDEO_ES, "MPEG-4 Video" },
-    { VLC_FOURCC('d','x','5','0'), CODEC_ID_MPEG4,
-      VIDEO_ES, "MPEG-4 Video" },
-    { VLC_FOURCC('B','L','Z','0'), CODEC_ID_MPEG4,
-      VIDEO_ES, "Blizzard MPEG-4 Video" },
-    { VLC_FOURCC('D','X','G','M'), CODEC_ID_MPEG4,
-      VIDEO_ES, "Electronic Arts Game MPEG-4 Video" },
-    { VLC_FOURCC('m','p','4','v'), CODEC_ID_MPEG4,
-      VIDEO_ES, "MPEG-4 Video" },
-    { VLC_FOURCC('M','P','4','V'), CODEC_ID_MPEG4,
-      VIDEO_ES, "MPEG-4 Video" },
-    { VLC_FOURCC( 4,  0,  0,  0 ), CODEC_ID_MPEG4,
-      VIDEO_ES, "MPEG-4 Video" },
-    { VLC_FOURCC('m','4','c','c'), CODEC_ID_MPEG4,
-      VIDEO_ES, "MPEG-4 Video" },
-    { VLC_FOURCC('M','4','C','C'), CODEC_ID_MPEG4,
-      VIDEO_ES, "MPEG-4 Video" },
-    { VLC_FOURCC('F','M','P','4'), CODEC_ID_MPEG4,
-      VIDEO_ES, "MPEG-4 Video" },
-    { VLC_FOURCC('f','m','p','4'), CODEC_ID_MPEG4,
-      VIDEO_ES, "MPEG-4 Video" },
+    { VLC_CODEC_MPGV, CODEC_ID_MPEG2VIDEO, VIDEO_ES },
+
+    { VLC_CODEC_MP4V, CODEC_ID_MPEG4, VIDEO_ES },
     /* 3ivx delta 3.5 Unsupported
      * putting it here gives extreme distorted images
-    { VLC_FOURCC('3','I','V','1'), CODEC_ID_MPEG4,
-      VIDEO_ES, "MPEG-4 Video" },
-    { VLC_FOURCC('3','i','v','1'), CODEC_ID_MPEG4,
-      VIDEO_ES, "MPEG-4 Video" }, */
-    /* 3ivx delta 4 */
-    { VLC_FOURCC('3','I','V','2'), CODEC_ID_MPEG4,
-      VIDEO_ES, "MPEG-4 Video" },
-    { VLC_FOURCC('3','i','v','2'), CODEC_ID_MPEG4,
-      VIDEO_ES, "MPEG-4 Video" },
-    { VLC_FOURCC('U','M','P','4'), CODEC_ID_MPEG4,
-      VIDEO_ES, "UB MPEG-4 Video" },
-    { VLC_FOURCC('W','V','1','F'), CODEC_ID_MPEG4,
-      VIDEO_ES, "MPEG-4 Video" },
-    { VLC_FOURCC('S','E','D','G'), CODEC_ID_MPEG4,
-      VIDEO_ES, "Samsung MPEG-4 Video" },
-    { VLC_FOURCC('R','M','P','4'), CODEC_ID_MPEG4,
-      VIDEO_ES, "REALmagic MPEG-4 Video" },
-    { VLC_FOURCC('H','D','X','4'), CODEC_ID_MPEG4,
-      VIDEO_ES, "Jomigo HDX4 (MPEG-4 Video)" },
-    { VLC_FOURCC('h','d','x','4'), CODEC_ID_MPEG4,
-      VIDEO_ES, "Jomigo HDX4 (MPEG-4 Video)" },
-    { VLC_FOURCC('S','M','P','4'), CODEC_ID_MPEG4,
-      VIDEO_ES, "Samsung SMP4 (MPEG-4 Video)" },
-    { VLC_FOURCC('s','m','p','4'), CODEC_ID_MPEG4,
-      VIDEO_ES, "Samsung SMP4 (MPEG-4 Video)" },
-    { VLC_FOURCC('f','v','f','w'), CODEC_ID_MPEG4,
-      VIDEO_ES, "FFmpeg MPEG-4" },
-    { VLC_FOURCC('F','V','F','W'), CODEC_ID_MPEG4,
-      VIDEO_ES, "FFmpeg MPEG-4" },
-    { VLC_FOURCC('F','F','D','S'), CODEC_ID_MPEG4,
-      VIDEO_ES, "FFDShow MPEG-4" },
-    { VLC_FOURCC('V','I','D','M'), CODEC_ID_MPEG4,
-      VIDEO_ES, "vidm 4.01 codec" },
-    { VLC_FOURCC('D','C','O','D'), CODEC_ID_MPEG4,
-      VIDEO_ES, "MPEG-4 Video" },
-    { VLC_FOURCC('f','m','p','4'), CODEC_ID_MPEG4,
-      VIDEO_ES, "MPEG-4 Video" },
-    { VLC_FOURCC('M','V','X','M'), CODEC_ID_MPEG4,
-      VIDEO_ES, "MPEG-4 Video" },
-    { VLC_FOURCC('P','M','4','V'), CODEC_ID_MPEG4,
-      VIDEO_ES, "MPEG-4 Video" },
-    { VLC_FOURCC('f','m','p','4'), CODEC_ID_MPEG4,
-      VIDEO_ES, "MPEG-4 Video" },
-    { VLC_FOURCC('M','4','T','3'), CODEC_ID_MPEG4,
-      VIDEO_ES, "MPEG-4 Video" },
-    { VLC_FOURCC('G','E','O','X'), CODEC_ID_MPEG4,
-      VIDEO_ES, "MPEG-4 Video" },
-    { VLC_FOURCC('D','M','K','2'), CODEC_ID_MPEG4,
-      VIDEO_ES, "MPEG-4 Video" },
-    { VLC_FOURCC('D','I','G','I'), CODEC_ID_MPEG4,
-      VIDEO_ES, "MPEG-4 Video" },
-    { VLC_FOURCC('I','N','M','C'), CODEC_ID_MPEG4,
-      VIDEO_ES, "MPEG-4 Video" },
-    { VLC_FOURCC('S','N','4','0'), CODEC_ID_MPEG4,
-      VIDEO_ES, "MPEG-4 Video" },
-    { VLC_FOURCC('E','P','H','V'), CODEC_ID_MPEG4,
-      VIDEO_ES, "MPEG-4 Video" },
-
-    /* MSMPEG4 v1 */
-    { VLC_FOURCC('D','I','V','1'), CODEC_ID_MSMPEG4V1,
-      VIDEO_ES, "MS MPEG-4 Video v1" },
-    { VLC_FOURCC('d','i','v','1'), CODEC_ID_MSMPEG4V1,
-      VIDEO_ES, "MS MPEG-4 Video v1" },
-    { VLC_FOURCC('M','P','G','4'), CODEC_ID_MSMPEG4V1,
-      VIDEO_ES, "MS MPEG-4 Video v1" },
-    { VLC_FOURCC('m','p','g','4'), CODEC_ID_MSMPEG4V1,
-      VIDEO_ES, "MS MPEG-4 Video v1" },
-    { VLC_FOURCC('m','p','4','1'), CODEC_ID_MSMPEG4V1,
-      VIDEO_ES, "MS MPEG-4 Video v1" },
-
-    /* MSMPEG4 v2 */
-    { VLC_FOURCC('D','I','V','2'), CODEC_ID_MSMPEG4V2,
-      VIDEO_ES, "MS MPEG-4 Video v2" },
-    { VLC_FOURCC('d','i','v','2'), CODEC_ID_MSMPEG4V2,
-      VIDEO_ES, "MS MPEG-4 Video v2" },
-    { VLC_FOURCC('M','P','4','2'), CODEC_ID_MSMPEG4V2,
-      VIDEO_ES, "MS MPEG-4 Video v2" },
-    { VLC_FOURCC('m','p','4','2'), CODEC_ID_MSMPEG4V2,
-      VIDEO_ES, "MS MPEG-4 Video v2" },
-
-    /* MSMPEG4 v3 / M$ mpeg4 v3 */
-    { VLC_FOURCC('M','P','G','3'), CODEC_ID_MSMPEG4V3,
-      VIDEO_ES, "MS MPEG-4 Video v3" },
-    { VLC_FOURCC('m','p','g','3'), CODEC_ID_MSMPEG4V3,
-      VIDEO_ES, "MS MPEG-4 Video v3" },
-    { VLC_FOURCC('d','i','v','3'), CODEC_ID_MSMPEG4V3,
-      VIDEO_ES, "MS MPEG-4 Video v3" },
-    { VLC_FOURCC('M','P','4','3'), CODEC_ID_MSMPEG4V3,
-      VIDEO_ES, "MS MPEG-4 Video v3" },
-    { VLC_FOURCC('m','p','4','3'), CODEC_ID_MSMPEG4V3,
-      VIDEO_ES, "MS MPEG-4 Video v3" },
-    /* DivX 3.20 */
-    { VLC_FOURCC('D','I','V','3'), CODEC_ID_MSMPEG4V3,
-      VIDEO_ES, "MS MPEG-4 Video v3" },
-    { VLC_FOURCC('D','I','V','4'), CODEC_ID_MSMPEG4V3,
-      VIDEO_ES, "MS MPEG-4 Video v3" },
-    { VLC_FOURCC('d','i','v','4'), CODEC_ID_MSMPEG4V3,
-      VIDEO_ES, "MS MPEG-4 Video v3" },
-    { VLC_FOURCC('D','I','V','5'), CODEC_ID_MSMPEG4V3,
-      VIDEO_ES, "MS MPEG-4 Video v3" },
-    { VLC_FOURCC('d','i','v','5'), CODEC_ID_MSMPEG4V3,
-      VIDEO_ES, "MS MPEG-4 Video v3" },
-    { VLC_FOURCC('D','I','V','6'), CODEC_ID_MSMPEG4V3,
-      VIDEO_ES, "MS MPEG-4 Video v3" },
-    { VLC_FOURCC('d','i','v','6'), CODEC_ID_MSMPEG4V3,
-      VIDEO_ES, "MS MPEG-4 Video v3" },
-    /* Cool Codec */
-    { VLC_FOURCC('C','O','L','1'), CODEC_ID_MSMPEG4V3,
-      VIDEO_ES, "MS MPEG-4 Video v3" },
-    { VLC_FOURCC('c','o','l','1'), CODEC_ID_MSMPEG4V3,
-      VIDEO_ES, "MS MPEG-4 Video v3" },
-    { VLC_FOURCC('C','O','L','0'), CODEC_ID_MSMPEG4V3,
-      VIDEO_ES, "MS MPEG-4 Video v3" },
-    { VLC_FOURCC('c','o','l','0'), CODEC_ID_MSMPEG4V3,
-      VIDEO_ES, "MS MPEG-4 Video v3" },
-    /* AngelPotion stuff */
-    { VLC_FOURCC('A','P','4','1'), CODEC_ID_MSMPEG4V3,
-      VIDEO_ES, "MS MPEG-4 Video v3" },
-    /* 3ivx doctered divx files */
-    { VLC_FOURCC('3','I','V','D'), CODEC_ID_MSMPEG4V3,
-      VIDEO_ES, "MS MPEG-4 Video v3" },
-    { VLC_FOURCC('3','i','v','d'), CODEC_ID_MSMPEG4V3,
-      VIDEO_ES, "MS MPEG-4 Video v3" },
-    /* who knows? */
-    { VLC_FOURCC('3','V','I','D'), CODEC_ID_MSMPEG4V3,
-      VIDEO_ES, "MS MPEG-4 Video v3" },
-    { VLC_FOURCC('3','v','i','d'), CODEC_ID_MSMPEG4V3,
-      VIDEO_ES, "MS MPEG-4 Video v3" },
-
-    /* Sorenson v1 */
-    { VLC_FOURCC('S','V','Q','1'), CODEC_ID_SVQ1,
-      VIDEO_ES, "SVQ-1 (Sorenson Video v1)" },
-    { VLC_FOURCC('s','v','q','1'), CODEC_ID_SVQ1,
-      VIDEO_ES, "SVQ-1 (Sorenson Video v1)" },
-    { VLC_FOURCC('s','v','q','i'), CODEC_ID_SVQ1,
-      VIDEO_ES, "SVQ-1 (Sorenson Video v1)" },
-
-    /* Sorenson v3 */
-    { VLC_FOURCC('S','V','Q','3'), CODEC_ID_SVQ3,
-      VIDEO_ES, "SVQ-3 (Sorenson Video v3)" },
-
-    /* h264 */
-    { VLC_FOURCC('h','2','6','4'), CODEC_ID_H264,
-      VIDEO_ES, "H264 - MPEG-4 AVC (part 10)" },
-    { VLC_FOURCC('H','2','6','4'), CODEC_ID_H264,
-      VIDEO_ES, "H264 - MPEG-4 AVC (part 10)" },
-    { VLC_FOURCC('x','2','6','4'), CODEC_ID_H264,
-      VIDEO_ES, "H264 - MPEG-4 AVC (part 10)" },
-    { VLC_FOURCC('X','2','6','4'), CODEC_ID_H264,
-      VIDEO_ES, "H264 - MPEG-4 AVC (part 10)" },
-    /* avc1: special case h264 */
-    { VLC_FOURCC('a','v','c','1'), CODEC_ID_H264,
-      VIDEO_ES, "H264 - MPEG-4 AVC (part 10)" },
-    { VLC_FOURCC('A','V','C','1'), CODEC_ID_H264,
-      VIDEO_ES, "H264 - MPEG-4 AVC (part 10)" },
-    { VLC_FOURCC('V','S','S','H'), CODEC_ID_H264,
-      VIDEO_ES, "Vanguard VSS H264" },
-    { VLC_FOURCC('V','S','S','W'), CODEC_ID_H264,
-      VIDEO_ES, "Vanguard VSS H264" },
-    { VLC_FOURCC('v','s','s','h'), CODEC_ID_H264,
-      VIDEO_ES, "Vanguard VSS H264" },
-    { VLC_FOURCC('D','A','V','C'), CODEC_ID_H264,
-      VIDEO_ES, "Dicas MPEGable H.264/MPEG-4 AVC" },
-    { VLC_FOURCC('d','a','v','c'), CODEC_ID_H264,
-      VIDEO_ES, "Dicas MPEGable H.264/MPEG-4 AVC" },
-
-/* H263 and H263i */
-/* H263(+) is also known as Real Video 1.0 */
-
-    /* H263 */
-    { VLC_FOURCC('D','2','6','3'), CODEC_ID_H263,
-      VIDEO_ES, "DEC H263" },
-    { VLC_FOURCC('H','2','6','3'), CODEC_ID_H263,
-      VIDEO_ES, "H263" },
-    { VLC_FOURCC('h','2','6','3'), CODEC_ID_H263,
-      VIDEO_ES, "H263" },
-    { VLC_FOURCC('L','2','6','3'), CODEC_ID_H263,
-      VIDEO_ES, "LEAD H263" },
-    { VLC_FOURCC('s','2','6','3'), CODEC_ID_H263,
-      VIDEO_ES, "H263" },
-    { VLC_FOURCC('S','2','6','3'), CODEC_ID_H263,
-      VIDEO_ES, "H263" },
-    { VLC_FOURCC('M','2','6','3'), CODEC_ID_H263,
-      VIDEO_ES, "Microsoft H263" },
-    { VLC_FOURCC('X','2','6','3'), CODEC_ID_H263,
-      VIDEO_ES, "Xirlink H263" },
-    { VLC_FOURCC('V','X','1','K'), CODEC_ID_H263,
-      VIDEO_ES, "H263" },
-
-    /* Zygo (partial) */
-    { VLC_FOURCC('Z','y','G','o'), CODEC_ID_H263,
-      VIDEO_ES, "ITU H263+" },
-
-    /* H263i */
-    { VLC_FOURCC('I','2','6','3'), CODEC_ID_H263I,
-      VIDEO_ES, "I263.I" },
-    { VLC_FOURCC('i','2','6','3'), CODEC_ID_H263I,
-      VIDEO_ES, "I263.I" },
-
-    /* H263P */
-    { VLC_FOURCC('v','i','v','1'), CODEC_ID_H263P,
-      VIDEO_ES, "H263+" },
-    { VLC_FOURCC('v','i','v','O'), CODEC_ID_H263P,
-      VIDEO_ES, "H263+" },
-    { VLC_FOURCC('v','i','v','2'), CODEC_ID_H263P,
-      VIDEO_ES, "H263+" },
-    { VLC_FOURCC('U','2','6','3'), CODEC_ID_H263P,
-      VIDEO_ES, "UB H263+" },
-    { VLC_FOURCC('I','L','V','R'), CODEC_ID_H263P,
-      VIDEO_ES, "ITU H263+" },
-
-    /* Flash (H263) variant */
-    { VLC_FOURCC('F','L','V','1'), CODEC_ID_FLV1,
-      VIDEO_ES, "Flash Video" },
-
-    /* H261 */
-    { VLC_FOURCC('H','2','6','1'), CODEC_ID_H261,
-      VIDEO_ES, "H.261" },
-    { VLC_FOURCC('h','2','6','1'), CODEC_ID_H261,
-      VIDEO_ES, "H.261" },
-
-    { VLC_FOURCC('F','L','I','C'), CODEC_ID_FLIC,
-      VIDEO_ES, "Flic Video" },
-
-    /* MJPEG */
-    { VLC_FOURCC( 'M','J','P','G' ), CODEC_ID_MJPEG,
-      VIDEO_ES, "Motion JPEG Video" },
-    { VLC_FOURCC( 'm','j','p','g' ), CODEC_ID_MJPEG,
-      VIDEO_ES, "Motion JPEG Video" },
-    { VLC_FOURCC( 'm','j','p','a' ), CODEC_ID_MJPEG, /* for mov file */
-      VIDEO_ES, "Motion JPEG Video" },
-    { VLC_FOURCC( 'j','p','e','g' ), CODEC_ID_MJPEG,
-      VIDEO_ES, "Motion JPEG Video" },
-    { VLC_FOURCC( 'J','P','E','G' ), CODEC_ID_MJPEG,
-      VIDEO_ES, "Motion JPEG Video" },
-    { VLC_FOURCC( 'J','F','I','F' ), CODEC_ID_MJPEG,
-      VIDEO_ES, "Motion JPEG Video" },
-    { VLC_FOURCC( 'J','P','G','L' ), CODEC_ID_MJPEG,
-      VIDEO_ES, "Motion JPEG Video" },
-    { VLC_FOURCC( 'A','V','D','J' ), CODEC_ID_MJPEG,
-      VIDEO_ES, "Motion JPEG Video" },
-    { VLC_FOURCC( 'm','j','p','b' ), CODEC_ID_MJPEGB, /* for mov file */
-      VIDEO_ES, "Motion JPEG B Video" },
-    { VLC_FOURCC( 'L','J','P','G' ), CODEC_ID_LJPEG,
-      VIDEO_ES, "Lead Motion JPEG Video" },
-    { VLC_FOURCC( 'L','J','P','G' ), CODEC_ID_MJPEG,
-      VIDEO_ES, "Lead Motion JPEG Video" },
-    /* AVID MJPEG */
-    { VLC_FOURCC( 'A','V','R','n' ), CODEC_ID_MJPEG,
-      VIDEO_ES, "Avid Motion JPEG" },
-    { VLC_FOURCC( 'A','D','J','V' ), CODEC_ID_MJPEG,
-      VIDEO_ES, "Avid Motion JPEG" },
-    { VLC_FOURCC( 'd','m','b','1' ), CODEC_ID_MJPEG,
-      VIDEO_ES, "Motion JPEG OpenDML Video" },
-    { VLC_FOURCC( 'I','J','P','G' ), CODEC_ID_MJPEG,
-      VIDEO_ES, "Intergraph JPEG Video" },
-    { VLC_FOURCC( 'A','C','D','V' ), CODEC_ID_MJPEG,
-      VIDEO_ES, "ACD Systems Digital" },
-
-    /* SP5x */
-    { VLC_FOURCC( 'S','P','5','X' ), CODEC_ID_SP5X,
-      VIDEO_ES, "Sunplus Motion JPEG Video" },
-    { VLC_FOURCC( 'S','P','5','3' ), CODEC_ID_SP5X,
-      VIDEO_ES, "Sunplus Motion JPEG Video" },
-    { VLC_FOURCC( 'S','P','5','4' ), CODEC_ID_SP5X,
-      VIDEO_ES, "Sunplus Motion JPEG Video" },
-    { VLC_FOURCC( 'S','P','5','5' ), CODEC_ID_SP5X,
-      VIDEO_ES, "Sunplus Motion JPEG Video" },
-    { VLC_FOURCC( 'S','P','5','6' ), CODEC_ID_SP5X,
-      VIDEO_ES, "Sunplus Motion JPEG Video" },
-    { VLC_FOURCC( 'S','P','5','7' ), CODEC_ID_SP5X,
-      VIDEO_ES, "Sunplus Motion JPEG Video" },
-    { VLC_FOURCC( 'S','P','5','8' ), CODEC_ID_SP5X,
-      VIDEO_ES, "Sunplus Motion JPEG Video" },
-
-    /* DV */
-    { VLC_FOURCC('d','v','s','l'), CODEC_ID_DVVIDEO,
-      VIDEO_ES, "DV Video" },
-    { VLC_FOURCC('d','v','s','d'), CODEC_ID_DVVIDEO,
-      VIDEO_ES, "DV Video" },
-    { VLC_FOURCC('D','V','S','D'), CODEC_ID_DVVIDEO,
-      VIDEO_ES, "DV Video" },
-    { VLC_FOURCC('d','v','h','d'), CODEC_ID_DVVIDEO,
-      VIDEO_ES, "DV Video" },
-    { VLC_FOURCC('d','v','h','p'), CODEC_ID_DVVIDEO,
-      VIDEO_ES, "DV Video" },
-    { VLC_FOURCC('d','v','h','q'), CODEC_ID_DVVIDEO,
-      VIDEO_ES, "DV Video" },
-    { VLC_FOURCC('d','v','h','1'), CODEC_ID_DVVIDEO,
-      VIDEO_ES, "DV Video" },
-    { VLC_FOURCC('d','v','h','3'), CODEC_ID_DVVIDEO,
-      VIDEO_ES, "DV Video" },
-    { VLC_FOURCC('d','v','h','5'), CODEC_ID_DVVIDEO,
-      VIDEO_ES, "DV Video" },
-    { VLC_FOURCC('d','v','h','6'), CODEC_ID_DVVIDEO,
-      VIDEO_ES, "DV Video" },
-    { VLC_FOURCC('d','v','c',' '), CODEC_ID_DVVIDEO,
-      VIDEO_ES, "DV Video" },
-    { VLC_FOURCC('d','v','2','5'), CODEC_ID_DVVIDEO,
-      VIDEO_ES, "DV Video" },
-    { VLC_FOURCC('d','v','c','p'), CODEC_ID_DVVIDEO,
-      VIDEO_ES, "DV Video PAL" },
-    { VLC_FOURCC('d','v','p',' '), CODEC_ID_DVVIDEO,
-      VIDEO_ES, "DV Video Pro" },
-    { VLC_FOURCC('d','v','p','p'), CODEC_ID_DVVIDEO,
-      VIDEO_ES, "DV Video Pro PAL" },
-    { VLC_FOURCC('C','D','V','C'), CODEC_ID_DVVIDEO,
-      VIDEO_ES, "Canopus DV Video" },
-    { VLC_FOURCC('c','d','v','c'), CODEC_ID_DVVIDEO,
-      VIDEO_ES, "Canopus DV Video" },
-    { VLC_FOURCC('C','D','V','H'), CODEC_ID_DVVIDEO,
-      VIDEO_ES, "Canopus DV Video" },
-    { VLC_FOURCC('d','v','5','p'), CODEC_ID_DVVIDEO,
-      VIDEO_ES, "DV Video C Pro 50 PAL" },
-    { VLC_FOURCC('d','v','5','n'), CODEC_ID_DVVIDEO,
-      VIDEO_ES, "DV Video C Pro 50 NTSC" },
-    { VLC_FOURCC('A','V','d','v'), CODEC_ID_DVVIDEO,
-      VIDEO_ES, "AVID DV" },
-    { VLC_FOURCC('A','V','d','1'), CODEC_ID_DVVIDEO,
-      VIDEO_ES, "AVID DV" },
-
-
-    /* Windows Media Video */
-    { VLC_FOURCC('W','M','V','1'), CODEC_ID_WMV1,
-      VIDEO_ES, "Windows Media Video 1" },
-    { VLC_FOURCC('w','m','v','1'), CODEC_ID_WMV1,
-      VIDEO_ES, "Windows Media Video 1" },
-    { VLC_FOURCC('W','M','V','2'), CODEC_ID_WMV2,
-      VIDEO_ES, "Windows Media Video 2" },
-    { VLC_FOURCC('w','m','v','2'), CODEC_ID_WMV2,
-      VIDEO_ES, "Windows Media Video 2" },
+    { VLC_FOURCC('3','I','V','1'), CODEC_ID_MPEG4, VIDEO_ES },
+    { VLC_FOURCC('3','i','v','1'), CODEC_ID_MPEG4, VIDEO_ES }, */
+
+    { VLC_CODEC_DIV1, CODEC_ID_MSMPEG4V1, VIDEO_ES },
+    { VLC_CODEC_DIV2, CODEC_ID_MSMPEG4V2, VIDEO_ES },
+    { VLC_CODEC_DIV3, CODEC_ID_MSMPEG4V3, VIDEO_ES },
+
+    { VLC_CODEC_SVQ1, CODEC_ID_SVQ1, VIDEO_ES },
+    { VLC_CODEC_SVQ3, CODEC_ID_SVQ3, VIDEO_ES },
+
+    { VLC_CODEC_H264, CODEC_ID_H264, VIDEO_ES },
+    { VLC_CODEC_H263, CODEC_ID_H263, VIDEO_ES },
+    { VLC_CODEC_H263I,CODEC_ID_H263I,VIDEO_ES },
+    { VLC_CODEC_H263P,CODEC_ID_H263P,VIDEO_ES },
+
+    { VLC_CODEC_FLV1, CODEC_ID_FLV1, VIDEO_ES },
+
+    { VLC_CODEC_H261, CODEC_ID_H261, VIDEO_ES },
+    { VLC_CODEC_FLIC, CODEC_ID_FLIC, VIDEO_ES },
+
+    { VLC_CODEC_MJPG, CODEC_ID_MJPEG, VIDEO_ES },
+    { VLC_CODEC_MJPGB,CODEC_ID_MJPEGB,VIDEO_ES },
+    { VLC_CODEC_LJPG, CODEC_ID_LJPEG, VIDEO_ES },
+
+    { VLC_CODEC_SP5X, CODEC_ID_SP5X, VIDEO_ES },
+
+    { VLC_CODEC_DV,   CODEC_ID_DVVIDEO, VIDEO_ES },
+
+    { VLC_CODEC_WMV1, CODEC_ID_WMV1, VIDEO_ES },
+    { VLC_CODEC_WMV2, CODEC_ID_WMV2, VIDEO_ES },
+    { VLC_CODEC_WMV3, CODEC_ID_WMV3, VIDEO_ES },
+
 #if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 51, 10, 1 )
-    { VLC_FOURCC('W','M','V','3'), CODEC_ID_WMV3,
-      VIDEO_ES, "Windows Media Video 3" },
-    { VLC_FOURCC('w','m','v','3'), CODEC_ID_WMV3,
-      VIDEO_ES, "Windows Media Video 3" },
-    { VLC_FOURCC('W','V','C','1'), CODEC_ID_VC1,
-      VIDEO_ES, "Windows Media Video VC1" },
-    { VLC_FOURCC('w','v','c','1'), CODEC_ID_VC1,
-      VIDEO_ES, "Windows Media Video VC1" },
-    { VLC_FOURCC('v','c','-','1'), CODEC_ID_VC1,
-      VIDEO_ES, "Windows Media Video VC1" },
-    { VLC_FOURCC('V','C','-','1'), CODEC_ID_VC1,
-      VIDEO_ES, "Windows Media Video VC1" },
-    /* WMVA is the VC-1 codec before the standardization proces,
-       it is not bitstream compatible and deprecated  */
-    { VLC_FOURCC('W','M','V','A'), CODEC_ID_VC1,
-      VIDEO_ES, "Windows Media Video Advanced Profile" },
+    { VLC_CODEC_VC1,  CODEC_ID_VC1, VIDEO_ES },
 #endif
 
-    /* Microsoft Video 1 */
-    { VLC_FOURCC('M','S','V','C'), CODEC_ID_MSVIDEO1,
-      VIDEO_ES, "Microsoft Video 1" },
-    { VLC_FOURCC('m','s','v','c'), CODEC_ID_MSVIDEO1,
-      VIDEO_ES, "Microsoft Video 1" },
-    { VLC_FOURCC('C','R','A','M'), CODEC_ID_MSVIDEO1,
-      VIDEO_ES, "Microsoft Video 1" },
-    { VLC_FOURCC('c','r','a','m'), CODEC_ID_MSVIDEO1,
-      VIDEO_ES, "Microsoft Video 1" },
-    { VLC_FOURCC('W','H','A','M'), CODEC_ID_MSVIDEO1,
-      VIDEO_ES, "Microsoft Video 1" },
-    { VLC_FOURCC('w','h','a','m'), CODEC_ID_MSVIDEO1,
-      VIDEO_ES, "Microsoft Video 1" },
-
-    /* Microsoft RLE */
-    { VLC_FOURCC('m','r','l','e'), CODEC_ID_MSRLE,
-      VIDEO_ES, "Microsoft RLE Video" },
-    { VLC_FOURCC('W','R','L','E'), CODEC_ID_MSRLE,
-      VIDEO_ES, "Microsoft RLE Video" },
-    { VLC_FOURCC(0x1,0x0,0x0,0x0), CODEC_ID_MSRLE,
-      VIDEO_ES, "Microsoft RLE Video" },
-    { VLC_FOURCC(0x2,0x0,0x0,0x0), CODEC_ID_MSRLE,
-      VIDEO_ES, "Microsoft RLE Video" },
+    { VLC_CODEC_MSVIDEO1, CODEC_ID_MSVIDEO1, VIDEO_ES },
+    { VLC_CODEC_MSRLE, CODEC_ID_MSRLE, VIDEO_ES },
 
+    { VLC_CODEC_INDEO2, CODEC_ID_INDEO2, VIDEO_ES },
     /* Indeo Video Codecs (Quality of this decoder on ppc is not good) */
-    { VLC_FOURCC('I','V','3','1'), CODEC_ID_INDEO3,
-      VIDEO_ES, "Indeo Video v3" },
-    { VLC_FOURCC('i','v','3','1'), CODEC_ID_INDEO3,
-      VIDEO_ES, "Indeo Video v3" },
-    { VLC_FOURCC('I','V','3','2'), CODEC_ID_INDEO3,
-      VIDEO_ES, "Indeo Video v3" },
-    { VLC_FOURCC('i','v','3','2'), CODEC_ID_INDEO3,
-      VIDEO_ES, "Indeo Video v3" },
-
-    /* Huff YUV */
-    { VLC_FOURCC('H','F','Y','U'), CODEC_ID_HUFFYUV,
-      VIDEO_ES, "Huff YUV Video" },
-    { VLC_FOURCC('F','F','V','H'), CODEC_ID_FFVHUFF,
-      VIDEO_ES, "Huff YUV Video" },
-
-    /* Creative YUV */
-    { VLC_FOURCC('C','Y','U','V'), CODEC_ID_CYUV,
-      VIDEO_ES, "Creative YUV Video" },
-    { VLC_FOURCC('c','y','u','v'), CODEC_ID_CYUV,
-      VIDEO_ES, "Creative YUV Video" },
-
-    /* On2 VP3 Video Codecs */
-    { VLC_FOURCC('V','P','3',' '), CODEC_ID_VP3,
-      VIDEO_ES, "On2's VP3 Video" },
-    { VLC_FOURCC('V','P','3','0'), CODEC_ID_VP3,
-      VIDEO_ES, "On2's VP3 Video" },
-    { VLC_FOURCC('V','P','3','1'), CODEC_ID_VP3,
-      VIDEO_ES, "On2's VP3 Video" },
-    { VLC_FOURCC('v','p','3','1'), CODEC_ID_VP3,
-      VIDEO_ES, "On2's VP3 Video" },
-
-    /* On2  VP5, VP6 codecs */
+    { VLC_CODEC_INDEO3, CODEC_ID_INDEO3, VIDEO_ES },
+
+    { VLC_CODEC_HUFFYUV, CODEC_ID_HUFFYUV, VIDEO_ES },
+    { VLC_CODEC_FFVHUFF, CODEC_ID_FFVHUFF, VIDEO_ES },
+    { VLC_CODEC_CYUV, CODEC_ID_CYUV, VIDEO_ES },
+
+    { VLC_CODEC_VP3, CODEC_ID_VP3, VIDEO_ES },
 #if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 51, 14, 0 )
-    { VLC_FOURCC('V','P','5',' '), CODEC_ID_VP5,
-      VIDEO_ES, "On2's VP5 Video" },
-    { VLC_FOURCC('V','P','5','0'), CODEC_ID_VP5,
-      VIDEO_ES, "On2's VP5 Video" },
-    { VLC_FOURCC('V','P','6','2'), CODEC_ID_VP6,
-      VIDEO_ES, "On2's VP6.2 Video" },
-    { VLC_FOURCC('v','p','6','2'), CODEC_ID_VP6,
-      VIDEO_ES, "On2's VP6.2 Video" },
-    { VLC_FOURCC('V','P','6','F'), CODEC_ID_VP6F,
-      VIDEO_ES, "On2's VP6.2 Video (Flash)" },
+    { VLC_CODEC_VP5, CODEC_ID_VP5, VIDEO_ES },
 #endif
-
 #if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 51, 27, 0 )
-    { VLC_FOURCC('V','P','6','0'), CODEC_ID_VP6,
-      VIDEO_ES, "On2's VP6.0 Video" },
-    { VLC_FOURCC('V','P','6','1'), CODEC_ID_VP6,
-      VIDEO_ES, "On2's VP6.1 Video" },
+    { VLC_CODEC_VP6, CODEC_ID_VP6, VIDEO_ES },
+    { VLC_CODEC_VP6F, CODEC_ID_VP6F, VIDEO_ES },
 #endif
-
 #if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 51, 47, 0 )
-    { VLC_FOURCC('V','P','6','A'), CODEC_ID_VP6A,
-      VIDEO_ES, "On2's VP6 A Video" },
+    { VLC_CODEC_VP6A, CODEC_ID_VP6A, VIDEO_ES },
 #endif
 
-    /* Xiph.org theora */
-    { VLC_FOURCC('t','h','e','o'), CODEC_ID_THEORA,
-      VIDEO_ES, "Xiph.org's Theora Video" },
-    { VLC_FOURCC('T','h','r','a'), CODEC_ID_THEORA,
-      VIDEO_ES, "Xiph.org's Theora Video" },
+    { VLC_CODEC_THEORA, CODEC_ID_THEORA, VIDEO_ES },
 
 #if ( !defined( WORDS_BIGENDIAN ) )
     /* Asus Video (Another thing that doesn't work on PPC) */
-    { VLC_FOURCC('A','S','V','1'), CODEC_ID_ASV1,
-      VIDEO_ES, "Asus V1 Video" },
-    { VLC_FOURCC('A','S','V','2'), CODEC_ID_ASV2,
-      VIDEO_ES, "Asus V2 Video" },
+    { VLC_CODEC_ASV1, CODEC_ID_ASV1, VIDEO_ES },
+    { VLC_CODEC_ASV2, CODEC_ID_ASV2, VIDEO_ES },
 #endif
 
-    /* FFMPEG Video 1 (lossless codec) */
-    { VLC_FOURCC('F','F','V','1'), CODEC_ID_FFV1,
-      VIDEO_ES, "FFMpeg Video 1" },
+    { VLC_CODEC_FFV1, CODEC_ID_FFV1, VIDEO_ES },
 
-    /* ATI VCR1 */
-    { VLC_FOURCC('V','C','R','1'), CODEC_ID_VCR1,
-      VIDEO_ES, "ATI VCR1 Video" },
+    { VLC_CODEC_VCR1, CODEC_ID_VCR1, VIDEO_ES },
 
-    /* Cirrus Logic AccuPak */
-    { VLC_FOURCC('C','L','J','R'), CODEC_ID_CLJR,
-      VIDEO_ES, "Creative Logic AccuPak" },
+    { VLC_CODEC_CLJR, CODEC_ID_CLJR, VIDEO_ES },
 
     /* Real Video */
-    { VLC_FOURCC('R','V','1','0'), CODEC_ID_RV10,
-      VIDEO_ES, "Real Video 1.0" },
-    { VLC_FOURCC('r','v','1','0'), CODEC_ID_RV10,
-      VIDEO_ES, "Real Video 1.0" },
-    { VLC_FOURCC('R','V','1','3'), CODEC_ID_RV10,
-      VIDEO_ES, "Real Video 1.3" },
-    { VLC_FOURCC('r','v','1','3'), CODEC_ID_RV10,
-      VIDEO_ES, "Real Video 1.3" },
+    { VLC_CODEC_RV10, CODEC_ID_RV10, VIDEO_ES },
 #if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 51, 15, 1 )
-    { VLC_FOURCC('R','V','2','0'), CODEC_ID_RV20,
-      VIDEO_ES, "Real Video 2.0" },
-    { VLC_FOURCC('r','v','2','0'), CODEC_ID_RV20,
-      VIDEO_ES, "Real Video 2.0" },
+    { VLC_CODEC_RV20, CODEC_ID_RV20, VIDEO_ES },
 #endif
 #if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 52, 8, 0 )
-    { VLC_FOURCC('R','V','3','0'), CODEC_ID_RV30,
-      VIDEO_ES, "Real Video 3.0" },
-    { VLC_FOURCC('r','v','3','0'), CODEC_ID_RV30,
-      VIDEO_ES, "Real Video 3.0" },
+    { VLC_CODEC_RV30, CODEC_ID_RV30, VIDEO_ES },
 #endif
 #if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 52, 5, 0 )
-    { VLC_FOURCC('R','V','4','0'), CODEC_ID_RV40,
-      VIDEO_ES, "Real Video 4.0" },
-    { VLC_FOURCC('r','v','4','0'), CODEC_ID_RV40,
-      VIDEO_ES, "Real Video 4.0" },
+    { VLC_CODEC_RV40, CODEC_ID_RV40, VIDEO_ES },
 #endif
 
+    { VLC_CODEC_RPZA, CODEC_ID_RPZA, VIDEO_ES },
 
-    /* Apple Video */
-    { VLC_FOURCC('r','p','z','a'), CODEC_ID_RPZA,
-      VIDEO_ES, "Apple Video" },
-    { VLC_FOURCC('a','z','p','r'), CODEC_ID_RPZA,
-      VIDEO_ES, "Apple Video" },
-
-    { VLC_FOURCC('s','m','c',' '), CODEC_ID_SMC,
-      VIDEO_ES, "Apple graphics" },
+    { VLC_CODEC_SMC, CODEC_ID_SMC, VIDEO_ES },
 
- /* CINEPAK. We have our own decoder with an higher priority,
-       but this can't harm */
-    { VLC_FOURCC('C','V','I','D'), CODEC_ID_CINEPAK,
-      VIDEO_ES, "Cinepak Video" },
-    { VLC_FOURCC('c','v','i','d'), CODEC_ID_CINEPAK,
-      VIDEO_ES, "Cinepak Video" },
+    { VLC_CODEC_CINEPAK, CODEC_ID_CINEPAK, VIDEO_ES },
 
-    /* Screen Capture Video Codecs */
-    { VLC_FOURCC('t','s','c','c'), CODEC_ID_TSCC,
-      VIDEO_ES, "TechSmith Camtasia Screen Capture" },
-    { VLC_FOURCC('T','S','C','C'), CODEC_ID_TSCC,
-      VIDEO_ES, "TechSmith Camtasia Screen Capture" },
+    { VLC_CODEC_TSCC, CODEC_ID_TSCC, VIDEO_ES },
 
-    { VLC_FOURCC('C','S','C','D'), CODEC_ID_CSCD,
-      VIDEO_ES, "CamStudio Screen Codec" },
-    { VLC_FOURCC('c','s','c','d'), CODEC_ID_CSCD,
-      VIDEO_ES, "CamStudio Screen Codec" },
+    { VLC_CODEC_CSCD, CODEC_ID_CSCD, VIDEO_ES },
 
-    { VLC_FOURCC('Z','M','B','V'), CODEC_ID_ZMBV,
-      VIDEO_ES, "DosBox Capture Codec" },
+    { VLC_CODEC_ZMBV, CODEC_ID_ZMBV, VIDEO_ES },
 
 #if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 51, 13, 0 )
-    { VLC_FOURCC('V','M','n','c'), CODEC_ID_VMNC,
-      VIDEO_ES, "VMware Video" },
+    { VLC_CODEC_VMNC, CODEC_ID_VMNC, VIDEO_ES },
 #endif
-    { VLC_FOURCC('F','P','S','1'), CODEC_ID_FRAPS,
-      VIDEO_ES, "FRAPS: Realtime Video Capture" },
-    { VLC_FOURCC('f','p','s','1'), CODEC_ID_FRAPS,
-      VIDEO_ES, "FRAPS: Realtime Video Capture" },
-
-    /* Duck TrueMotion */
-    { VLC_FOURCC('D','U','C','K'), CODEC_ID_TRUEMOTION1,
-      VIDEO_ES, "Duck TrueMotion v1 Video" },
-    { VLC_FOURCC('T','M','2','0'), CODEC_ID_TRUEMOTION2,
-      VIDEO_ES, "Duck TrueMotion v2.0 Video" },
-
-    /* FFMPEG's SNOW wavelet codec */
-    { VLC_FOURCC('S','N','O','W'), CODEC_ID_SNOW,
-      VIDEO_ES, "FFMpeg SNOW wavelet Video" },
-    { VLC_FOURCC('s','n','o','w'), CODEC_ID_SNOW,
-      VIDEO_ES, "FFMpeg SNOW wavelet Video" },
-
-    { VLC_FOURCC('r','l','e',' '), CODEC_ID_QTRLE,
-      VIDEO_ES, "Apple QuickTime RLE Video" },
-
-    { VLC_FOURCC('q','d','r','w'), CODEC_ID_QDRAW,
-      VIDEO_ES, "Apple QuickDraw Video" },
-
-    { VLC_FOURCC('Q','P','E','G'), CODEC_ID_QPEG,
-      VIDEO_ES, "QPEG Video" },
-    { VLC_FOURCC('Q','1','.','0'), CODEC_ID_QPEG,
-      VIDEO_ES, "QPEG Video" },
-    { VLC_FOURCC('Q','1','.','1'), CODEC_ID_QPEG,
-      VIDEO_ES, "QPEG Video" },
-
-    { VLC_FOURCC('U','L','T','I'), CODEC_ID_ULTI,
-      VIDEO_ES, "IBM Ultimotion Video" },
-
-    { VLC_FOURCC('V','I','X','L'), CODEC_ID_VIXL,
-      VIDEO_ES, "Miro/Pinnacle VideoXL Video" },
-    { VLC_FOURCC('P','I','X','L'), CODEC_ID_VIXL,
-      VIDEO_ES, "Pinnacle VideoXL Video" },
-
-    { VLC_FOURCC('L','O','C','O'), CODEC_ID_LOCO,
-      VIDEO_ES, "LOCO Video" },
-
-    { VLC_FOURCC('W','N','V','1'), CODEC_ID_WNV1,
-      VIDEO_ES, "Winnov WNV1 Video" },
-
-    { VLC_FOURCC('A','A','S','C'), CODEC_ID_AASC,
-      VIDEO_ES, "Autodesc RLE Video" },
-
-    { VLC_FOURCC('I','V','2','0'), CODEC_ID_INDEO2,
-      VIDEO_ES, "Indeo Video v2" },
-    { VLC_FOURCC('R','T','2','1'), CODEC_ID_INDEO2,
-      VIDEO_ES, "Indeo Video v2" },
-
-        /* Flash Screen Video */
+    { VLC_CODEC_FRAPS, CODEC_ID_FRAPS, VIDEO_ES },
+
+    { VLC_CODEC_TRUEMOTION1, CODEC_ID_TRUEMOTION1, VIDEO_ES },
+    { VLC_CODEC_TRUEMOTION2, CODEC_ID_TRUEMOTION2, VIDEO_ES },
+
+    { VLC_CODEC_SNOW, CODEC_ID_SNOW, VIDEO_ES },
+
+    { VLC_CODEC_QTRLE, CODEC_ID_QTRLE, VIDEO_ES },
+
+    { VLC_CODEC_QDRAW, CODEC_ID_QDRAW, VIDEO_ES },
+
+    { VLC_CODEC_QPEG, CODEC_ID_QPEG, VIDEO_ES },
+
+    { VLC_CODEC_ULTI, CODEC_ID_ULTI, VIDEO_ES },
+
+    { VLC_CODEC_VIXL, CODEC_ID_VIXL, VIDEO_ES },
+
+    { VLC_CODEC_LOCO, CODEC_ID_LOCO, VIDEO_ES },
+
+    { VLC_CODEC_WNV1, CODEC_ID_WNV1, VIDEO_ES },
+
+    { VLC_CODEC_AASC, CODEC_ID_AASC, VIDEO_ES },
+
 #if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 51, 11, 0 )
-    { VLC_FOURCC('F','S','V','1'), CODEC_ID_FLASHSV,
-              VIDEO_ES, "Flash Screen Video" },
+    { VLC_CODEC_FLASHSV, CODEC_ID_FLASHSV, VIDEO_ES },
 #endif
-   { VLC_FOURCC('K','M','V','C'), CODEC_ID_KMVC,
-      VIDEO_ES, "Karl Morton's Video Codec (Worms)" },
+    { VLC_CODEC_KMVC, CODEC_ID_KMVC, VIDEO_ES },
 
 #if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 51, 13, 0 )
-    { VLC_FOURCC('N','U','V','1'), CODEC_ID_NUV,
-      VIDEO_ES, "Nuppel Video" },
-    { VLC_FOURCC('R','J','P','G'), CODEC_ID_NUV,
-      VIDEO_ES, "Nuppel Video" },
+    { VLC_CODEC_NUV, CODEC_ID_NUV, VIDEO_ES },
 #endif
 
 #if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 51, 8, 0 )
-    /* CODEC_ID_SMACKVIDEO */
-    { VLC_FOURCC('S','M','K','2'), CODEC_ID_SMACKVIDEO,
-      VIDEO_ES, "Smacker Video" },
-    { VLC_FOURCC('S','M','K','4'), CODEC_ID_SMACKVIDEO,
-      VIDEO_ES, "Smacker Video" },
+    { VLC_CODEC_SMACKVIDEO, CODEC_ID_SMACKVIDEO, VIDEO_ES },
 #endif
 
     /* Chinese AVS - Untested */
 #if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 51, 8, 0 )
-    { VLC_FOURCC('C','A','V','S'), CODEC_ID_CAVS,
-      VIDEO_ES, "Chinese AVS" },
-    { VLC_FOURCC('A','V','s','2'), CODEC_ID_CAVS,
-      VIDEO_ES, "Chinese AVS" },
+    { VLC_CODEC_CAVS, CODEC_ID_CAVS, VIDEO_ES },
 #endif
 
 #if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 51, 40, 0 )
     /* Untested yet */
-    { VLC_FOURCC('A','V','d','n'), CODEC_ID_DNXHD,
-      VIDEO_ES, "DNxHD" },
+    { VLC_CODEC_DNXHD, CODEC_ID_DNXHD, VIDEO_ES },
 #endif
-    { VLC_FOURCC('8','B','P','S'), CODEC_ID_8BPS,
-      VIDEO_ES, "8BPS" },
+    { VLC_CODEC_8BPS, CODEC_ID_8BPS, VIDEO_ES },
 
 #if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 51, 52, 0 )
-    { VLC_FOURCC('M','L','2','O'), CODEC_ID_MIMIC,
-      VIDEO_ES, "Mimic" },
+    { VLC_CODEC_MIMIC, CODEC_ID_MIMIC, VIDEO_ES },
+#endif
+
+#if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 52, 29, 0 )
+    { VLC_CODEC_V210, CODEC_ID_V210, VIDEO_ES },
 #endif
 
     /* Videogames Codecs */
 
-    /* Interplay MVE */
-    { VLC_FOURCC('i','m','v','e'), CODEC_ID_INTERPLAY_VIDEO,
-      VIDEO_ES, "Interplay MVE Video" },
-    { VLC_FOURCC('I','N','P','V'), CODEC_ID_INTERPLAY_VIDEO,
-      VIDEO_ES, "Interplay MVE Video" },
+    { VLC_CODEC_INTERPLAY, CODEC_ID_INTERPLAY_VIDEO, VIDEO_ES },
 
-    /* Id Quake II CIN */
-    { VLC_FOURCC('I','D','C','I'), CODEC_ID_IDCIN,
-      VIDEO_ES, "Id Quake II CIN Video" },
+    { VLC_CODEC_IDCIN, CODEC_ID_IDCIN, VIDEO_ES },
 
-    /* 4X Technologies */
-    { VLC_FOURCC('4','x','m','v'), CODEC_ID_4XM,
-      VIDEO_ES, "4X Technologies Video" },
-    { VLC_FOURCC('4','X','M','V'), CODEC_ID_4XM,
-      VIDEO_ES, "4X Technologies Video" },
+    { VLC_CODEC_4XM, CODEC_ID_4XM, VIDEO_ES },
 
-    /* Id RoQ */
-    { VLC_FOURCC('R','o','Q','v'), CODEC_ID_ROQ,
-      VIDEO_ES, "Id RoQ Video" },
+    { VLC_CODEC_ROQ, CODEC_ID_ROQ, VIDEO_ES },
 
-    /* Sony Playstation MDEC */
-    { VLC_FOURCC('M','D','E','C'), CODEC_ID_MDEC,
-      VIDEO_ES, "PSX MDEC Video" },
+    { VLC_CODEC_MDEC, CODEC_ID_MDEC, VIDEO_ES },
 
-    /* Sierra VMD */
-    { VLC_FOURCC('v','m','d','v'), CODEC_ID_VMDVIDEO,
-      VIDEO_ES, "Sierra VMD Video" },
-    { VLC_FOURCC('V','M','D','V'), CODEC_ID_VMDVIDEO,
-      VIDEO_ES, "Sierra VMD Video" },
+    { VLC_CODEC_VMDVIDEO, CODEC_ID_VMDVIDEO, VIDEO_ES },
 
 #if 0
 /*    UNTESTED VideoGames*/
@@ -838,339 +253,187 @@ static const struct
     /*
      *  Image codecs
      */
-    { VLC_FOURCC('p','n','g',' '), CODEC_ID_PNG,
-      VIDEO_ES, "PNG Image" },
-    { VLC_FOURCC('p','p','m',' '), CODEC_ID_PPM,
-      VIDEO_ES, "PPM Image" },
-    { VLC_FOURCC('p','g','m',' '), CODEC_ID_PGM,
-      VIDEO_ES, "PGM Image" },
-    { VLC_FOURCC('p','g','m','y'), CODEC_ID_PGMYUV,
-      VIDEO_ES, "PGM YUV Image" },
-    { VLC_FOURCC('p','a','m',' '), CODEC_ID_PAM,
-      VIDEO_ES, "PAM Image" },
-    { VLC_FOURCC('M','J','L','S'), CODEC_ID_JPEGLS,
-      VIDEO_ES, "PAM Image" },
+    { VLC_CODEC_PNG, CODEC_ID_PNG, VIDEO_ES },
+    { VLC_CODEC_PPM, CODEC_ID_PPM, VIDEO_ES },
+    { VLC_CODEC_PGM, CODEC_ID_PGM, VIDEO_ES },
+    { VLC_CODEC_PGMYUV, CODEC_ID_PGMYUV, VIDEO_ES },
+    { VLC_CODEC_PAM, CODEC_ID_PAM, VIDEO_ES },
+    { VLC_CODEC_JPEGLS, CODEC_ID_JPEGLS, VIDEO_ES },
 
 #if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 51, 0, 0 )
-    { VLC_FOURCC('b','m','p',' '), CODEC_ID_BMP,
-      VIDEO_ES, "BMP Image" },
+    { VLC_CODEC_BMP, CODEC_ID_BMP, VIDEO_ES },
 #endif
 
 #if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 51, 40, 1 )
-    { VLC_FOURCC('t','i','f','f'), CODEC_ID_TIFF,
-      VIDEO_ES, "TIFF Image" },
-    { VLC_FOURCC('g','i','f',' '), CODEC_ID_GIF,
-      VIDEO_ES, "GIF Image" },
-    { VLC_FOURCC('t','g','a',' '), CODEC_ID_TARGA,
-      VIDEO_ES, "Truevision Targa Image" },
-    { VLC_FOURCC('m','t','g','a'), CODEC_ID_TARGA,
-      VIDEO_ES, "Truevision Targa Image" },
-    { VLC_FOURCC('M','T','G','A'), CODEC_ID_TARGA,
-      VIDEO_ES, "Truevision Targa Image" },
+    { VLC_CODEC_TIFF, CODEC_ID_TIFF, VIDEO_ES },
+    { VLC_CODEC_GIF, CODEC_ID_GIF, VIDEO_ES },
+    { VLC_CODEC_TARGA, CODEC_ID_TARGA, VIDEO_ES },
 #endif
 #if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 51, 40, 3 )
-    { VLC_FOURCC('s','g','i',' '), CODEC_ID_SGI,
-      VIDEO_ES, "SGI Image" },
+    { VLC_CODEC_SGI, CODEC_ID_SGI, VIDEO_ES },
 #endif
 
 #if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 51, 55, 0 )
-    { VLC_FOURCC('d','r','a','c'), CODEC_ID_DIRAC,
-      VIDEO_ES, "Dirac" },
+    { VLC_CODEC_DIRAC, CODEC_ID_DIRAC, VIDEO_ES },
 #endif
 
     /*
      *  Audio Codecs
      */
 
-    /* Windows Media Audio 1 */
-    { VLC_FOURCC('W','M','A','1'), CODEC_ID_WMAV1,
-      AUDIO_ES, "Windows Media Audio 1" },
-    { VLC_FOURCC('w','m','a','1'), CODEC_ID_WMAV1,
-      AUDIO_ES, "Windows Media Audio 1" },
-
-    /* Windows Media Audio 2 */
-    { VLC_FOURCC('W','M','A','2'), CODEC_ID_WMAV2,
-      AUDIO_ES, "Windows Media Audio 2" },
-    { VLC_FOURCC('w','m','a','2'), CODEC_ID_WMAV2,
-      AUDIO_ES, "Windows Media Audio 2" },
-
-    /* DV Audio */
-    { VLC_FOURCC('d','v','a','u'), CODEC_ID_DVAUDIO,
-      AUDIO_ES, "DV Audio" },
-    { VLC_FOURCC('v','d','v','a'), CODEC_ID_DVAUDIO,
-      AUDIO_ES, "DV Audio" },
-    { VLC_FOURCC('d','v','c','a'), CODEC_ID_DVAUDIO,
-      AUDIO_ES, "DV Audio" },
-    { VLC_FOURCC('R','A','D','V'), CODEC_ID_DVAUDIO,
-      AUDIO_ES, "DV Audio" },
-
-    /* MACE-3 Audio */
-    { VLC_FOURCC('M','A','C','3'), CODEC_ID_MACE3,
-      AUDIO_ES, "MACE-3 Audio" },
-
-    /* MACE-6 Audio */
-    { VLC_FOURCC('M','A','C','6'), CODEC_ID_MACE6,
-      AUDIO_ES, "MACE-6 Audio" },
+    { VLC_CODEC_WMA1, CODEC_ID_WMAV1, AUDIO_ES },
+    { VLC_CODEC_WMA2, CODEC_ID_WMAV2, AUDIO_ES },
+
+    { VLC_CODEC_DVAUDIO, CODEC_ID_DVAUDIO, AUDIO_ES },
+
+    { VLC_CODEC_MACE3, CODEC_ID_MACE3, AUDIO_ES },
+    { VLC_CODEC_MACE6, CODEC_ID_MACE6, AUDIO_ES },
 
 #if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 51, 41, 1 )
-    /* MUSEPACK7 Audio */
-    { VLC_FOURCC('M','P','C',' '), CODEC_ID_MUSEPACK7,
-      AUDIO_ES, "MUSEPACK7 Audio" },
+    { VLC_CODEC_MUSEPACK7, CODEC_ID_MUSEPACK7, AUDIO_ES },
 #endif
 #if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 51, 48, 0 )
-    /* MUSEPACK8 Audio */
-    { VLC_FOURCC('M','P','C','K'), CODEC_ID_MUSEPACK8,
-      AUDIO_ES, "MUSEPACK8 Audio" },
-    { VLC_FOURCC('M','P','C','8'), CODEC_ID_MUSEPACK8,
-      AUDIO_ES, "MUSEPACK8 Audio" },
+    { VLC_CODEC_MUSEPACK8, CODEC_ID_MUSEPACK8, AUDIO_ES },
 #endif
 
-    /* RealAudio 1.0 */
-    { VLC_FOURCC('1','4','_','4'), CODEC_ID_RA_144,
-      AUDIO_ES, "RealAudio 1.0" },
-    { VLC_FOURCC('l','p','c','J'), CODEC_ID_RA_144,
-      AUDIO_ES, "RealAudio 1.0" },
-
-    /* RealAudio 2.0 */
-    { VLC_FOURCC('2','8','_','8'), CODEC_ID_RA_288,
-      AUDIO_ES, "RealAudio 2.0" },
-
-    /* MPEG Audio layer 1/2/3 */
-    { VLC_FOURCC('m','p','g','a'), CODEC_ID_MP2,
-      AUDIO_ES, "MPEG Audio layer 1/2" },
-    { VLC_FOURCC('m','p','3',' '), CODEC_ID_MP3,
-      AUDIO_ES, "MPEG Audio layer 1/2/3" },
-    { VLC_FOURCC('.','m','p','3'), CODEC_ID_MP3,
-      AUDIO_ES, "MPEG Audio layer 1/2/3" },
-    { VLC_FOURCC('M','P','3',' '), CODEC_ID_MP3,
-      AUDIO_ES, "MPEG Audio layer 1/2/3" },
-    { VLC_FOURCC('L','A','M','E'), CODEC_ID_MP3,
-      AUDIO_ES, "MPEG Audio layer 1/2/3" },
-
-    /* A52 Audio (aka AC3) */
-    { VLC_FOURCC('a','5','2',' '), CODEC_ID_AC3,
-      AUDIO_ES, "A52 Audio (aka AC3)" },
-    { VLC_FOURCC('a','5','2','b'), CODEC_ID_AC3, /* VLC specific hack */
-      AUDIO_ES, "A52 Audio (aka AC3)" },
+    { VLC_CODEC_RA_144, CODEC_ID_RA_144, AUDIO_ES },
+    { VLC_CODEC_RA_288, CODEC_ID_RA_288, AUDIO_ES },
+
+    { VLC_CODEC_MPGA, CODEC_ID_MP3, AUDIO_ES },
+
+    { VLC_CODEC_A52, CODEC_ID_AC3, AUDIO_ES },
 
 #if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 52, 0, 0 )
-    { VLC_FOURCC('e','a','c','3'), CODEC_ID_EAC3,
-      AUDIO_ES, "A/52 B Audio (aka E-AC3)" },
+    { VLC_CODEC_EAC3, CODEC_ID_EAC3, AUDIO_ES },
 #endif
 
-    /* DTS Audio */
-    { VLC_FOURCC('d','t','s',' '), CODEC_ID_DTS,
-      AUDIO_ES, "DTS Audio" },
-
-    /* AAC audio */
-    { VLC_FOURCC('m','p','4','a'), CODEC_ID_AAC,
-      AUDIO_ES, "MPEG AAC Audio" },
-    { VLC_FOURCC('a','a','c',' '), CODEC_ID_AAC,
-      AUDIO_ES, "MPEG AAC Audio" },
+    { VLC_CODEC_DTS, CODEC_ID_DTS, AUDIO_ES },
 
-    /* AC-3 Audio (Dolby Digital) */
-    { VLC_FOURCC('a','c','-','3'), CODEC_ID_AC3,
-      AUDIO_ES, "AC-3 Audio (Dolby Digital)" },
+    { VLC_CODEC_MP4A, CODEC_ID_AAC, AUDIO_ES },
 
-    /* 4X Technologies */
-    { VLC_FOURCC('4','x','m','a'), CODEC_ID_ADPCM_4XM,
-      AUDIO_ES, "4X Technologies Audio" },
+    { VLC_CODEC_ADPCM_4XM, CODEC_ID_ADPCM_4XM, AUDIO_ES },
 
-    /* EA ADPCM */
-    { VLC_FOURCC('A','D','E','A'), CODEC_ID_ADPCM_EA,
-      AUDIO_ES, "EA ADPCM Audio" },
+    { VLC_CODEC_ADPCM_EA, CODEC_ID_ADPCM_EA, AUDIO_ES },
 
-    /* Interplay DPCM */
-    { VLC_FOURCC('i','d','p','c'), CODEC_ID_INTERPLAY_DPCM,
-      AUDIO_ES, "Interplay DPCM Audio" },
+    { VLC_CODEC_INTERPLAY_DPCM, CODEC_ID_INTERPLAY_DPCM, AUDIO_ES },
 
-    /* Id RoQ */
-    { VLC_FOURCC('R','o','Q','a'), CODEC_ID_ROQ_DPCM,
-      AUDIO_ES, "Id RoQ DPCM Audio" },
+    { VLC_CODEC_ROQ_DPCM, CODEC_ID_ROQ_DPCM, AUDIO_ES },
 
 #if LIBAVCODEC_VERSION_INT >= AV_VERSION_INT( 51, 27, 0 )
-    /* DCIN Audio */
-    { VLC_FOURCC('D','C','I','A'), CODEC_ID_DSICINAUDIO,
-      AUDIO_ES, "Delphine CIN Audio" },
+    { VLC_CODEC_DSICINAUDIO, CODEC_ID_DSICINAUDIO, AUDIO_ES },
 #endif
 
-    /* Sony Playstation XA ADPCM */
-    { VLC_FOURCC('x','a',' ',' '), CODEC_ID_ADPCM_XA,
-      AUDIO_ES, "PSX XA ADPCM Audio" },
-
-    /* ADX ADPCM */
-    { VLC_FOURCC('a','d','x',' '), CODEC_ID_ADPCM_ADX,
-      AUDIO_ES, "ADX ADPCM Audio" },
-
-    /* Westwood ADPCM */