* structure.
*****************************************************************************/
typedef int (vout_sys_create_t) ( p_vout_thread_t p_vout,
- char *psz_display, int i_root_window );
+ char *psz_display,
+ int i_root_window, void *p_data );
typedef int (vout_sys_init_t) ( p_vout_thread_t p_vout );
typedef void (vout_sys_end_t) ( p_vout_thread_t p_vout );
typedef void (vout_sys_destroy_t) ( p_vout_thread_t p_vout );
* Prototypes
*****************************************************************************/
vout_thread_t * vout_CreateThread ( char *psz_display, int i_root_window,
- int i_width, int i_height, int *pi_status, int i_method );
+ int i_width, int i_height, int *pi_status,
+ int i_method, void *p_data );
void vout_DestroyThread ( vout_thread_t *p_vout, int *pi_status );
picture_t * vout_CreatePicture ( vout_thread_t *p_vout, int i_type,
int i_width, int i_height );
/* 00 (force displaying) */
break;
/* FIXME: here we have to calculate dates. It's
- * around i_date * 10000 but I don't know
+ * around i_date * 12000 but I don't know
* how much exactly.
*/
case 0x01:
/* 01 (start displaying) */
- p_spu->begin_date += ( i_date * 10000 );
+ p_spu->begin_date += ( i_date * 12000 );
break;
case 0x02:
/* 02 (stop displaying) */
- p_spu->end_date += ( i_date * 10000 );
+ p_spu->end_date += ( i_date * 12000 );
break;
case 0x03:
/* 03xxxx (palette) */
* If not, it will be updated using one of the THREAD_* constants.
*****************************************************************************/
vout_thread_t * vout_CreateThread ( char *psz_display, int i_root_window,
- int i_width, int i_height, int *pi_status, int i_method )
+ int i_width, int i_height, int *pi_status,
+ int i_method, void *p_data )
{
vout_thread_t * p_vout; /* thread descriptor */
int i_status; /* thread status */
/* Create and initialize system-dependant method - this function issues its
* own error messages */
- if( p_vout->p_sys_create( p_vout, psz_display, i_root_window ) )
+ if( p_vout->p_sys_create( p_vout, psz_display, i_root_window, p_data ) )
{
TrashPlugin( p_vout->vout_plugin );
free( p_vout );
{
/* too late, destroying the subpic */
vout_DestroySubPicture( p_vout, p_subpic );
- printf( "destroying subpicture\n" );
break;
}
vout_RenderSPU( p_subpic->p_data, p_subpic->type.spu.i_offset,
{
if( (i_color = i_code & 0x3) )
{
- u8 *p_target = &vspu.p_data[ 2 *
+ u8 *p_target = &vspu.p_data[ i_bytes_per_pixel *
( vspu.x + vspu.y * vspu.width ) ];
- memset( p_target, p_palette[i_color], 2 * (i_code >> 2) );
+ memset( p_target, p_palette[i_color], i_bytes_per_pixel * (i_code >> 2) );
}
vspu.x += i_code >> 2;
}