From 6fa5ad78275f7f94565df3aaf3ef9bcf52c790fa Mon Sep 17 00:00:00 2001 From: Andreas Auras Date: Tue, 29 Mar 2011 11:35:31 +0200 Subject: Continuous video frame grabbing feature. In opposite to the 'xine_get_current_frame' based snapshot function this grabbing feature allow continuous grabbing of last or next displayed video frame. Grabbed video frames are returned in simple three byte RGB format. Depending on the capabilities of the used video output driver video image data is taken as close as possible at the end of the video processing chain. Thus a returned video image could contain the blended OSD data, is deinterlaced, cropped and scaled and video properties like hue, sat could be applied. With this patch such a decent grabbing feature is implemented for vdpau video out driver. If a video output driver does not have a decent grabbing implementation then there is a generic fallback feature that grabs the video frame as they are taken from the video display queue (like the xine_get_current_frame' function). In this case color correct conversation to a RGB image incorporating source cropping and scaling to the requested grab size is also supported. A more detailed description can be found in file "xine.h". --- include/xine/video_out.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include/xine') diff --git a/include/xine/video_out.h b/include/xine/video_out.h index 799e8f726..5a0401160 100644 --- a/include/xine/video_out.h +++ b/include/xine/video_out.h @@ -196,6 +196,9 @@ struct xine_video_port_s { uint32_t height, double ratio, int format, int flags); + /* create a new grab video frame */ + xine_grab_video_frame_t* (*new_grab_video_frame) (xine_video_port_t *self); + /* retrieves the last displayed frame (useful for taking snapshots) */ vo_frame_t* (*get_last_frame) (xine_video_port_t *self); @@ -388,6 +391,9 @@ struct vo_driver_s { */ int (*redraw_needed) (vo_driver_t *self); + /* Create a new grab video frame */ + xine_grab_video_frame_t* (*new_grab_video_frame)(vo_driver_t *self); + /* * free all resources, close driver */ -- cgit v1.2.3