/*****************************************************************************
* 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>
#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>
{
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 )
{
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; */
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,
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;
}
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) )
{
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 );
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;
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 );