X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fvideo_output%2Fvideo_output.c;h=f87a0285681a42f7373f2fbbe9c5bc27e64802e3;hb=53b978f8650fd329bf5298a05c9f8a055ac56fe4;hp=9af7a3a43dc8750da885d89d01c9b6e0a7461904;hpb=bf7ee74f8f7420cf471784a53f391abbee97a91d;p=vlc diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c index 9af7a3a43d..f87a028568 100644 --- a/src/video_output/video_output.c +++ b/src/video_output/video_output.c @@ -5,7 +5,7 @@ * thread, and destroy a previously oppened video output thread. ***************************************************************************** * Copyright (C) 2000-2001 VideoLAN - * $Id: video_output.c,v 1.151 2002/01/02 14:37:42 sam Exp $ + * $Id: video_output.c,v 1.152 2002/01/04 14:01:35 sam Exp $ * * Authors: Vincent Seguin * @@ -89,12 +89,13 @@ void vout_EndBank ( void ) *****************************************************************************/ vout_thread_t * vout_CreateThread ( int *pi_status, int i_width, int i_height, - u64 i_chroma, int i_aspect ) + u32 i_chroma, int i_aspect ) { vout_thread_t * p_vout; /* thread descriptor */ int i_status; /* thread status */ int i_index; /* loop variable */ char * psz_plugin; + probedata_t data; /* Allocate descriptor */ p_vout = (vout_thread_t *) malloc( sizeof(vout_thread_t) ); @@ -112,7 +113,9 @@ vout_thread_t * vout_CreateThread ( int *pi_status, psz_plugin = main_GetPszVariable( VOUT_METHOD_VAR, "" ); } - p_vout->p_module = module_Need( MODULE_CAPABILITY_VOUT, psz_plugin, NULL ); + data.vout.i_chroma = i_chroma; + p_vout->p_module + = module_Need( MODULE_CAPABILITY_VOUT, psz_plugin, &data ); if( p_vout->p_module == NULL ) { @@ -127,6 +130,7 @@ vout_thread_t * vout_CreateThread ( int *pi_status, p_vout->pf_end = f.pf_end; p_vout->pf_destroy = f.pf_destroy; p_vout->pf_manage = f.pf_manage; + p_vout->pf_render = f.pf_render; p_vout->pf_display = f.pf_display; p_vout->pf_setpalette = f.pf_setpalette; #undef f @@ -275,14 +279,14 @@ static int InitThread( vout_thread_t *p_vout ) intf_WarnMsg( 1, "vout info: got %i direct buffer(s)", I_OUTPUTPICTURES ); i_pgcd = ReduceHeight( p_vout->render.i_aspect ); - intf_WarnMsg( 1, "vout info: picture in %ix%i, chroma 0x%.16llx, " + intf_WarnMsg( 1, "vout info: picture in %ix%i, chroma 0x%.8x, " "aspect ratio %i:%i", p_vout->render.i_width, p_vout->render.i_height, p_vout->render.i_chroma, p_vout->render.i_aspect / i_pgcd, VOUT_ASPECT_FACTOR / i_pgcd ); i_pgcd = ReduceHeight( p_vout->output.i_aspect ); - intf_WarnMsg( 1, "vout info: picture out %ix%i, chroma 0x%.16llx, " + intf_WarnMsg( 1, "vout info: picture out %ix%i, chroma 0x%.8x, " "aspect ratio %i:%i", p_vout->output.i_width, p_vout->output.i_height, p_vout->output.i_chroma, p_vout->output.i_aspect / i_pgcd, @@ -495,6 +499,15 @@ static void RunThread( vout_thread_t *p_vout) */ p_directbuffer = vout_RenderPicture( p_vout, p_picture, p_subpic ); + /* + * Call the plugin-specific rendering method + */ + if( p_picture != NULL ) + { + /* Render the direct buffer returned by vout_RenderPicture */ + p_vout->pf_render( p_vout, p_directbuffer ); + } + /* * Sleep, wake up */ @@ -630,7 +643,7 @@ static void EndThread( vout_thread_t *p_vout ) { if ( p_vout->p_picture[i_index].i_type == MEMORY_PICTURE ) { - free( p_vout->p_picture[i_index].planes[0].p_data ); + free( p_vout->p_picture[i_index].p_data ); } }