diff options
Diffstat (limited to 'src/video_out/xxmc.h')
-rw-r--r-- | src/video_out/xxmc.h | 46 |
1 files changed, 27 insertions, 19 deletions
diff --git a/src/video_out/xxmc.h b/src/video_out/xxmc.h index 1c24991be..6110978d1 100644 --- a/src/video_out/xxmc.h +++ b/src/video_out/xxmc.h @@ -37,6 +37,14 @@ #define XVMC_THREAD_SAFE +/* + * some implementations are not aware of the display having been locked + * already before calling the xvmc function and may therefore deadlock. + */ +/* +#define XVMC_LOCKDISPLAY_SAFE +*/ + #ifdef HAVE_CONFIG_H #include "config.h" #endif @@ -106,7 +114,7 @@ typedef struct { XvMCMacroBlock *macroblockbaseptr; /* pointer to base MacroBlock in MB array */ XvMCMacroBlockArray macro_blocks; /* pointer to memory for macroblock array */ int slices; -} xvmc_macroblocks_t; +} xvmc_macroblocks_t; typedef struct { @@ -130,7 +138,7 @@ typedef struct { XShmSegmentInfo shminfo; /* XvMC specific stuff */ - + XvMCSurface *xvmc_surf; xine_xxmc_t xxmc_data; int last_sw_format; @@ -147,7 +155,7 @@ typedef struct{ XvImageFormatValues subPicType; int flags; } xvmc_capabilities_t; - + typedef struct xvmc_surface_handler_s { XvMCSurface surfaces[XVMC_MAX_SURFACES]; int surfInUse[XVMC_MAX_SURFACES]; @@ -171,13 +179,13 @@ typedef struct context_lock_s { return; \ } -#ifdef XVMC_THREAD_SAFE -#define XVMCLOCKDISPLAY(display) -#define XVMCUNLOCKDISPLAY(display) +#if defined(XVMC_THREAD_SAFE) && defined(XVMC_LOCKDISPLAY_SAFE) +#define XVMCLOCKDISPLAY(display) +#define XVMCUNLOCKDISPLAY(display) #else -#define XVMCLOCKDISPLAY(display) XLockDisplay(display) +#define XVMCLOCKDISPLAY(display) XLockDisplay(display) #define XVMCUNLOCKDISPLAY(display) XUnlockDisplay(display) -#endif +#endif struct xxmc_driver_s { vo_driver_t vo_driver; @@ -219,7 +227,7 @@ struct xxmc_driver_s { int (*x11_old_error_handler) (Display *, XErrorEvent *); xine_t *xine; - /* XvMC related stuff here */ + /* XvMC related stuff here */ xvmc_macroblocks_t macroblocks; xvmc_capabilities_t *xvmc_cap; unsigned xvmc_num_cap; @@ -264,8 +272,8 @@ struct xxmc_driver_s { /* * The mutex below is needed since XlockDisplay wasn't really enough - * to protect the XvMC Calls. - */ + * to protect the XvMC Calls. + */ context_lock_t xvmc_lock; alphablend_t alphablend_extra_data; @@ -285,14 +293,14 @@ extern int xxmc_xvmc_surface_valid(xxmc_driver_t *this, XvMCSurface *surf); extern void xvmc_vld_slice(vo_frame_t *this_gen); extern void xvmc_vld_frame(struct vo_frame_s *this_gen); -extern void xxmc_xvmc_proc_macro_block(int x, int y, int mb_type, int motion_type, - int (*mv_field_sel)[2], int *dmvector, - int cbp, - int dct_type, vo_frame_t *current_frame, - vo_frame_t *forward_ref_frame, - vo_frame_t *backward_ref_frame, - int picture_structure, - int second_field, int (*f_mot_pmv)[2], +extern void xxmc_xvmc_proc_macro_block(int x, int y, int mb_type, int motion_type, + int (*mv_field_sel)[2], int *dmvector, + int cbp, + int dct_type, vo_frame_t *current_frame, + vo_frame_t *forward_ref_frame, + vo_frame_t *backward_ref_frame, + int picture_structure, + int second_field, int (*f_mot_pmv)[2], int (*b_mot_pmv)[2]); #endif |