]> git.sesse.net Git - vlc/blobdiff - modules/video_output/x11/xvmc.c
XvMC: Compile Fixes, b_shm removal, and obvious typos... subpicture_sys_t still undec...
[vlc] / modules / video_output / x11 / xvmc.c
index cd6bda6b37f937bab14353f1db180295d0137c21..676ba00b3cdc4d5223826e132ca2240d71249dd3 100644 (file)
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
-#include <stdlib.h>                                      /* malloc(), free() */
-#include <string.h>                                            /* strerror() */
+
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
 
 #include <vlc/vlc.h>
 #include <vlc_interface.h>
@@ -66,7 +68,7 @@
 #include <X11/extensions/Xvlib.h>
 #include <X11/extensions/vldXvMC.h>
 
-#include "../../codec/xxmc/accel_xvmc.h"
+#include "../../codec/xvmc/accel_xvmc.h"
 #include "xcommon.h"
 #include "../../codec/spudec/spudec.h"
 #include <unistd.h>
@@ -571,7 +573,7 @@ static void xxmc_xvmc_surface_handler_construct( vout_thread_t *p_vout )
 {
     int i;
     xvmc_surface_handler_t *handler = &p_vout->p_sys->xvmc_surf_handler;
-    
     pthread_mutex_init( &handler->mutex, NULL );
     for( i=0; i<XVMC_MAX_SURFACES; ++i )
     {
@@ -774,7 +776,7 @@ int checkXvMCCap( vout_thread_t *p_vout )
         xvmc_context_writer_unlock( &p_vout->p_sys->xvmc_lock );
         return VLC_SUCCESS;
     }
-    XVMCLOCKDISPLAY( p_vout->p_sys->p_display );  
+    XVMCLOCKDISPLAY( p_vout->p_sys->p_display );
     XvMCDestroyContext( p_vout->p_sys->p_display, &c );
     xxmc_xvmc_surface_handler_construct(p_vout );
     /*  p_vout->p_sys->capabilities |= VO_CAP_XXMC; */
@@ -808,7 +810,7 @@ static int xxmc_setup_subpictures( vout_thread_t *p_vout,
             XLockDisplay( p_vout->p_sys->p_display );
             msg_Dbg(p_vout, "xxmc_setup_subpictures");
 #ifdef HAVE_SYS_SHM_H
-            if( p_vout->p_sys->b_shm )
+            if( p_vout->p_sys->i_shm_opcode )
             {
                 /* Create image using XShm extension */
                 p_vout->p_sys->subImage = CreateShmImage( p_vout,
@@ -839,7 +841,7 @@ static int xxmc_setup_subpictures( vout_thread_t *p_vout,
         p_vout->p_sys->xvmc_palette = (char *) malloc( sp->num_palette_entries
                                                        * sp->entry_bytes );
         xxmc_xvmc_free_subpicture( p_vout, sp);
-        if( !p_vout->p_sys->xvmc_pallette )
+        if( !p_vout->p_sys->xvmc_palette )
             return VLC_EGENERIC;
         p_vout->p_sys->hwSubpictures = 1;
     }
@@ -968,7 +970,7 @@ static XvMCSurface *xxmc_xvmc_alloc_surface( vout_thread_t *p_vout,
         if( !handler->surfInUse[i] )
         {
             XVMCLOCKDISPLAY( p_vout->p_sys->p_display );
-            if( Success != XvMCCreateSurface( p_vout->p_sys->p_display
+            if( Success != XvMCCreateSurface( p_vout->p_sys->p_display,
                                               context,
                                               handler->surfaces + i) )
             {
@@ -1315,7 +1317,7 @@ static void dispose_ximage( vout_thread_t *p_vout, XShmSegmentInfo *shminfo,
                 XvImage *myimage )
 {
 # ifdef HAVE_SYS_SHM_H
-    if( p_vout->p_sys->b_shm )
+    if( p_vout->p_sys->i_shm_opcode )
     {
         XShmDetach( p_vout->p_sys->p_display, shminfo );
         XFree( myimage );
@@ -1338,11 +1340,11 @@ static void dispose_ximage( vout_thread_t *p_vout, XShmSegmentInfo *shminfo,
 
 void xvmc_vld_frame( picture_t *picture )
 {
-    vout_sys_t *p_sys = picture->p_sys;
+    picture_sys_t *p_sys  = picture->p_sys;
     vout_thread_t *p_vout = p_sys->p_vout;
-    vlc_vld_frame_t *vft = &(p_sys->xxmc_data.vld_frame);
-    picture_t *ff = (picture_t *) vft->forward_reference_picture;
-    picture_t *bf = (picture_t *) vft->backward_reference_picture;
+    vlc_vld_frame_t *vft  = &(p_sys->xxmc_data.vld_frame);
+    picture_t *ff         = (picture_t *) vft->forward_reference_picture;
+    picture_t *bf         = (picture_t *) vft->backward_reference_picture;
     XvMCMpegControl ctl;
     XvMCSurface *fs=0, *bs=0;
     XvMCQMatrix qmx;
@@ -1416,7 +1418,7 @@ void xvmc_vld_frame( picture_t *picture )
 
 void xvmc_vld_slice( picture_t *picture )
 {
-    vout_sys_t *p_sys     = picture->p_sys;
+    picture_sys_t *p_sys  = picture->p_sys;
     vout_thread_t *p_vout = p_sys->p_vout;
 
     xvmc_context_reader_lock( &p_vout->p_sys->xvmc_lock );