]> git.sesse.net Git - vlc/blobdiff - modules/video_output/mga.c
vout_fb: cosmetics, stick to orig coding style
[vlc] / modules / video_output / mga.c
index e1dff096ab083da63f36adfa7039a7c4f23e96d9..0a1a2fc5d05f96bc1c2e092b6936201badd039b1 100644 (file)
 # include "config.h"
 #endif
 
-#include <vlc/vlc.h>
+#include <vlc_common.h>
+#include <vlc_plugin.h>
 #include <vlc_vout.h>
+#include <vlc_charset.h>
 
 #ifdef SYS_BSD
 #include <sys/types.h>                                     /* typedef ushort */
@@ -57,11 +59,11 @@ static int  NewPicture     ( vout_thread_t *, picture_t * );
 /*****************************************************************************
  * Module descriptor
  *****************************************************************************/
-vlc_module_begin();
-    set_description( _("Matrox Graphic Array video output") );
-    set_capability( "video output", 10 );
-    set_callbacks( Create, Destroy );
-vlc_module_end();
+vlc_module_begin ()
+    set_description( N_("Matrox Graphic Array video output") )
+    set_capability( "video output", 10 )
+    set_callbacks( Create, Destroy )
+vlc_module_end ()
 
 /*****************************************************************************
  * vout_sys_t: video output MGA method descriptor
@@ -114,7 +116,7 @@ struct vout_sys_t
 {
     mga_vid_config_t    mga;
     int                 i_fd;
-    byte_t *            p_video;
+    uint8_t *           p_video;
 };
 
 struct picture_sys_t
@@ -136,12 +138,9 @@ static int Create( vlc_object_t *p_this )
     /* Allocate structure */
     p_vout->p_sys = malloc( sizeof( vout_sys_t ) );
     if( p_vout->p_sys == NULL )
-    {
-        msg_Err( p_vout, "out of memory" );
         return( 1 );
-    }
 
-    p_vout->p_sys->i_fd = open( "/dev/mga_vid", O_RDWR );
+    p_vout->p_sys->i_fd = utf8_open( "/dev/mga_vid", O_RDWR );
     if( p_vout->p_sys->i_fd == -1 )
     {
         msg_Err( p_vout, "cannot open MGA driver /dev/mga_vid" );
@@ -190,7 +189,7 @@ static int Init( vout_thread_t *p_vout )
 
     /* Assume we only do YMGA for the moment. XXX: mga_vid calls this
      * YV12, but it's actually some strange format with packed UV. */
-    p_vout->output.i_chroma = VLC_FOURCC('Y','M','G','A');
+    p_vout->output.i_chroma = VLC_CODEC_YMGA;
     p_vout->p_sys->mga.format = MGA_VID_FORMAT_YV12;
 
     if( ioctl(p_vout->p_sys->i_fd, MGA_VID_CONFIG, &p_vout->p_sys->mga) )