vlc_video_splitter.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef VLC_VIDEO_SPLITTER_H
00025 #define VLC_VIDEO_SPLITTER_H 1
00026
00027 #include <vlc_es.h>
00028 #include <vlc_picture.h>
00029 #include <vlc_mouse.h>
00030
00031
00032
00033
00034
00035
00036 typedef struct video_splitter_t video_splitter_t;
00037 typedef struct video_splitter_sys_t video_splitter_sys_t;
00038 typedef struct video_splitter_owner_t video_splitter_owner_t;
00039
00040
00041
00042 typedef struct
00043 {
00044
00045 video_format_t fmt;
00046
00047
00048 struct
00049 {
00050
00051
00052
00053 int i_x;
00054 int i_y;
00055
00056
00057
00058 int i_align;
00059 } window;
00060
00061
00062
00063
00064 char *psz_module;
00065
00066 } video_splitter_output_t;
00067
00068
00069
00070 struct video_splitter_t
00071 {
00072 VLC_COMMON_MEMBERS
00073
00074
00075 module_t *p_module;
00076
00077
00078 config_chain_t *p_cfg;
00079
00080
00081
00082
00083 video_format_t fmt;
00084
00085
00086
00087
00088
00089
00090
00091 int i_output;
00092 video_splitter_output_t *p_output;
00093
00094 int (*pf_filter)( video_splitter_t *, picture_t *pp_dst[],
00095 picture_t *p_src );
00096 int (*pf_mouse) ( video_splitter_t *, vlc_mouse_t *,
00097 int i_index,
00098 const vlc_mouse_t *p_old, const vlc_mouse_t *p_new );
00099
00100 video_splitter_sys_t *p_sys;
00101
00102
00103 int (*pf_picture_new) ( video_splitter_t *, picture_t *pp_picture[] );
00104 void (*pf_picture_del) ( video_splitter_t *, picture_t *pp_picture[] );
00105 video_splitter_owner_t *p_owner;
00106 };
00107
00108
00109
00110
00111
00112
00113
00114
00115
00116 static inline int video_splitter_NewPicture( video_splitter_t *p_splitter,
00117 picture_t *pp_picture[] )
00118 {
00119 int i_ret = p_splitter->pf_picture_new( p_splitter, pp_picture );
00120 if( i_ret )
00121 msg_Warn( p_splitter, "can't get output pictures" );
00122 return i_ret;
00123 }
00124
00125
00126
00127
00128
00129 static inline void video_splitter_DeletePicture( video_splitter_t *p_splitter,
00130 picture_t *pp_picture[] )
00131 {
00132 p_splitter->pf_picture_del( p_splitter, pp_picture );
00133 }
00134
00135
00136 VLC_EXPORT( video_splitter_t *, video_splitter_New, ( vlc_object_t *, const char *psz_name, const video_format_t * ) );
00137 VLC_EXPORT( void, video_splitter_Delete, ( video_splitter_t * ) );
00138
00139 static inline int video_splitter_Filter( video_splitter_t *p_splitter,
00140 picture_t *pp_dst[], picture_t *p_src )
00141 {
00142 return p_splitter->pf_filter( p_splitter, pp_dst, p_src );
00143 }
00144 static inline int video_splitter_Mouse( video_splitter_t *p_splitter,
00145 vlc_mouse_t *p_mouse,
00146 int i_index,
00147 const vlc_mouse_t *p_old, const vlc_mouse_t *p_new )
00148 {
00149 if( !p_splitter->pf_mouse )
00150 {
00151 *p_mouse = *p_new;
00152 return VLC_SUCCESS;
00153 }
00154 return p_splitter->pf_mouse( p_splitter, p_mouse, i_index, p_old, p_new );
00155 }
00156
00157 #endif
00158