00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #define ALLOCATE_DIRECTBUFFERS( i_max ) \
00025 \
00026 while( I_OUTPUTPICTURES < ( i_max ) ) \
00027 { \
00028 p_pic = NULL; \
00029 \
00030 \
00031 for( i_index = 0 ; i_index < VOUT_MAX_PICTURES ; i_index++ ) \
00032 { \
00033 if( p_vout->p_picture[ i_index ].i_status == FREE_PICTURE ) \
00034 { \
00035 p_pic = p_vout->p_picture + i_index; \
00036 break; \
00037 } \
00038 } \
00039 \
00040 if( p_pic == NULL ) \
00041 { \
00042 break; \
00043 } \
00044 \
00045 \
00046 vout_AllocatePicture( VLC_OBJECT(p_vout), p_pic, p_vout->output.i_chroma, \
00047 p_vout->output.i_width, \
00048 p_vout->output.i_height, \
00049 p_vout->output.i_aspect ); \
00050 \
00051 if( !p_pic->i_planes ) \
00052 { \
00053 break; \
00054 } \
00055 \
00056 p_pic->i_status = DESTROYED_PICTURE; \
00057 p_pic->i_type = DIRECT_PICTURE; \
00058 \
00059 PP_OUTPUTPICTURE[ I_OUTPUTPICTURES ] = p_pic; \
00060 \
00061 I_OUTPUTPICTURES++; \
00062 } \
00063
00064
00065
00066
00067
00068 static int SetParentVal( vlc_object_t *p_this, char const *psz_var,
00069 vlc_value_t oldval, vlc_value_t newval, void *p_data )
00070 {
00071 var_Change( (vlc_object_t *)p_data, psz_var, VLC_VAR_SETVALUE,
00072 &newval, NULL );
00073 return VLC_SUCCESS;
00074 }
00075
00076 #define ADD_CALLBACKS( newvout, handler ) \
00077 var_AddCallback( newvout, "fullscreen", SetParentVal, p_vout ); \
00078 var_AddCallback( newvout, "mouse-x", SendEvents, p_vout ); \
00079 var_AddCallback( newvout, "mouse-y", SendEvents, p_vout ); \
00080 var_AddCallback( newvout, "mouse-moved", SendEvents, p_vout ); \
00081 var_AddCallback( newvout, "mouse-clicked", SendEvents, p_vout );
00082
00083 #define DEL_CALLBACKS( newvout, handler ) \
00084 var_DelCallback( newvout, "fullscreen", SetParentVal, p_vout ); \
00085 var_DelCallback( newvout, "mouse-x", SendEvents, p_vout ); \
00086 var_DelCallback( newvout, "mouse-y", SendEvents, p_vout ); \
00087 var_DelCallback( newvout, "mouse-moved", SendEvents, p_vout ); \
00088 var_DelCallback( newvout, "mouse-clicked", SendEvents, p_vout );
00089
00090 #define ADD_PARENT_CALLBACKS( handler ) \
00091 var_AddCallback( p_vout, "fullscreen", handler, NULL ); \
00092 var_AddCallback( p_vout, "aspect-ratio", handler, NULL ); \
00093 var_AddCallback( p_vout, "crop", handler, NULL );
00094
00095 #define DEL_PARENT_CALLBACKS( handler ) \
00096 var_DelCallback( p_vout, "fullscreen", handler, NULL ); \
00097 var_DelCallback( p_vout, "aspect-ratio", handler, NULL ); \
00098 var_DelCallback( p_vout, "crop", handler, NULL );
00099
00100 static int SendEventsToChild( vlc_object_t *, char const *,
00101 vlc_value_t, vlc_value_t, void * );