X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=include%2Fvlc_vout.h;h=d3382771abdb0de8d41200fec1a56d4b2b50f9c3;hb=96b4ee1ee2da310e9ea951a29672a7609dbf831e;hp=c4aa5b7d09c9c186a21d909b7ec5bd40cabc23dd;hpb=af37ba18784c712f7b57a2420ab80d4a06984f20;p=vlc diff --git a/include/vlc_vout.h b/include/vlc_vout.h index c4aa5b7d09..d3382771ab 100644 --- a/include/vlc_vout.h +++ b/include/vlc_vout.h @@ -115,6 +115,23 @@ struct picture_t struct picture_t *p_next; }; +/** + * This function will create a new picture. + * The picture created will implement a default release management compatible + * with picture_Yield and picture_Release. This default management will release + * picture_sys_t *p_sys field if non NULL. + */ +VLC_EXPORT( picture_t *, picture_New, ( vlc_fourcc_t i_chroma, int i_width, int i_height, int i_aspect ) ); + +/** + * This function will force the destruction a picture. + * The value of the picture reference count should be 0 before entering this + * function. + * Unless used for reimplementing pf_release, you should not use this + * function but picture_Release. + */ +VLC_EXPORT( void, picture_Delete, ( picture_t * ) ); + /** * This function will increase the picture reference count. * It will not have any effect on picture obtained from vout @@ -148,6 +165,25 @@ static inline void picture_CopyProperties( picture_t *p_dst, const picture_t *p_ p_dst->b_top_field_first = p_src->b_top_field_first; } +/** + * This function will copy the picture pixels. + * You can safely copy between pictures that do not have the same size, + * only the compatible(smaller) part will be copied. + */ +VLC_EXPORT( void, picture_CopyPixels, ( picture_t *p_dst, const picture_t *p_src ) ); + +/** + * This function will copy both picture dynamic properties and pixels. + * You have to notice that sometime a simple picture_Yield may do what + * you want without the copy overhead. + * Provided for convenience. + */ +static inline void picture_Copy( picture_t *p_dst, const picture_t *p_src ) +{ + picture_CopyPixels( p_dst, p_src ); + picture_CopyProperties( p_dst, p_src ); +} + /** * Video picture heap, either render (to store pictures used * by the decoder) or output (to store pictures displayed by the vout plugin) @@ -315,9 +351,9 @@ struct subpicture_t video_format_t *, picture_t * ); void ( *pf_destroy_region ) ( vlc_object_t *, subpicture_region_t * ); - void ( *pf_pre_render ) ( video_format_t *, spu_t *, subpicture_t *, mtime_t ); - subpicture_region_t * ( *pf_update_regions ) ( video_format_t *, spu_t *, - subpicture_t *, mtime_t ); + void ( *pf_pre_render ) ( video_format_t *, spu_t *, subpicture_t * ); + void ( *pf_update_regions ) ( video_format_t *, spu_t *, + subpicture_t *, mtime_t ); /** Private data - the subtitle plugin might want to put stuff here to * keep track of the subpicture */ @@ -585,7 +621,7 @@ VLC_EXPORT( vout_thread_t *, __vout_Request, ( vlc_object_t *p_this, vout_thr * This function will create a suitable vout for a given p_fmt. It will never * reuse an already existing unused vout. * - * You have to call either vout_Destroy or vout_Request on the returned value + * You have to call either vout_Close or vout_Request on the returned value * \param p_this a vlc object to which the returned vout will be attached * \param p_fmt the video format requested * \return a vout if the request is successfull, NULL otherwise @@ -626,9 +662,14 @@ VLC_EXPORT( void, vout_DatePicture, ( vout_thread_t *, picture_t * VLC_EXPORT( void, vout_LinkPicture, ( vout_thread_t *, picture_t * ) ); VLC_EXPORT( void, vout_UnlinkPicture, ( vout_thread_t *, picture_t * ) ); VLC_EXPORT( void, vout_PlacePicture, ( vout_thread_t *, unsigned int, unsigned int, unsigned int *, unsigned int *, unsigned int *, unsigned int * ) ); + +/* DO NOT use vout_RenderPicture unless you are in src/video_ouput */ picture_t * vout_RenderPicture ( vout_thread_t *, picture_t *, subpicture_t * ); +/* DO NOT use vout_CountPictureAvailable unless your are in src/input/dec.c (no exception) */ +int vout_CountPictureAvailable( vout_thread_t * ); + VLC_EXPORT( int, vout_vaControlDefault, ( vout_thread_t *, int, va_list ) ); VLC_EXPORT( void *, vout_RequestWindow, ( vout_thread_t *, int *, int *, unsigned int *, unsigned int * ) ); VLC_EXPORT( void, vout_ReleaseWindow, ( vout_thread_t *, void * ) );