]> git.sesse.net Git - vlc/blobdiff - modules/misc/dummy/vout.c
Used vlc_fourcc_GetCodecFromString where applicable.
[vlc] / modules / misc / dummy / vout.c
index 59aa3f19ec6fcab24d61b4e9a52251b8d4ea512e..3311041e03d671edbbf29cd578ef21809d39442f 100644 (file)
@@ -29,7 +29,7 @@
 # include "config.h"
 #endif
 
-#include <vlc/vlc.h>
+#include <vlc_common.h>
 #include <vlc_vout.h>
 
 #define DUMMY_WIDTH 16
@@ -54,7 +54,7 @@ static int  Control   ( vout_thread_t *, int, va_list );
  *****************************************************************************
  * This function initializes a dummy vout method.
  *****************************************************************************/
-int E_(OpenVideo) ( vlc_object_t *p_this )
+int OpenVideo ( vlc_object_t *p_this )
 {
     vout_thread_t * p_vout = (vout_thread_t *)p_this;
 
@@ -73,11 +73,8 @@ int E_(OpenVideo) ( vlc_object_t *p_this )
  *****************************************************************************/
 static int Control( vout_thread_t *p_vout, int i_query, va_list args )
 {
-    switch( i_query )
-    {
-       default:
-            return vout_vaControlDefault( p_vout, i_query, args );
-    }
+    (void) p_vout; (void) i_query; (void) args;
+    return VLC_EGENERIC;
 }
 
 
@@ -92,17 +89,9 @@ static int Init( vout_thread_t *p_vout )
     bool b_chroma = 0;
 
     psz_chroma = config_GetPsz( p_vout, "dummy-chroma" );
-    if( psz_chroma )
-    {
-        if( strlen( psz_chroma ) >= 4 )
-        {
-            i_chroma = VLC_FOURCC( psz_chroma[0], psz_chroma[1],
-                                   psz_chroma[2], psz_chroma[3] );
-            b_chroma = 1;
-        }
-
-        free( psz_chroma );
-    }
+    i_chroma = vlc_fourcc_GetCodecFromString( VIDEO_ES, psz_chroma );
+    b_chroma = i_chroma != 0;
+    free( psz_chroma );
 
     I_OUTPUTPICTURES = 0;
 
@@ -112,7 +101,7 @@ static int Init( vout_thread_t *p_vout )
         msg_Dbg( p_vout, "forcing chroma 0x%.8x (%4.4s)",
                          i_chroma, (char*)&i_chroma );
         p_vout->output.i_chroma = i_chroma;
-        if ( i_chroma == VLC_FOURCC( 'R', 'G', 'B', '2' ) )
+        if ( i_chroma == VLC_CODEC_RGB8 )
         {
             p_vout->output.pf_setpalette = SetPalette;
         }