summaryrefslogtreecommitdiff
path: root/src/xine-engine/xine.c
diff options
context:
space:
mode:
authorReinhard Nißl <rnissl@gmx.de>2007-04-15 20:43:42 +0200
committerReinhard Nißl <rnissl@gmx.de>2007-04-15 20:43:42 +0200
commitee7faf25388d4a2890bf3fa55288391cfe04851a (patch)
treeb87677a4c4164a1bceb79c822f7cf436469ea843 /src/xine-engine/xine.c
parentf8e051109fc70cbf7acbfd6582bc2f6d03e6d93b (diff)
downloadxine-lib-ee7faf25388d4a2890bf3fa55288391cfe04851a.tar.gz
xine-lib-ee7faf25388d4a2890bf3fa55288391cfe04851a.tar.bz2
Provide a function to query for outstanding OSD events.
This function shall be used to poll the number of outstanding OSD events from a certain point in time on until the reported number is 0. At that point in time, the content on screen is identical to a certain state of the stream, at which for example, a hardcopy may be taken.
Diffstat (limited to 'src/xine-engine/xine.c')
-rw-r--r--src/xine-engine/xine.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/xine-engine/xine.c b/src/xine-engine/xine.c
index ce7713810..840c91f3f 100644
--- a/src/xine-engine/xine.c
+++ b/src/xine-engine/xine.c
@@ -2171,3 +2171,22 @@ void _x_unlock_frontend(xine_stream_t *stream)
{
pthread_mutex_unlock(&stream->frontend_lock);
}
+
+int _x_query_unprocessed_osd_events(xine_stream_t *stream)
+{
+ video_overlay_manager_t *ovl;
+ int redraw_needed;
+
+ if (!stream->xine->port_ticket->acquire_nonblocking(stream->xine->port_ticket, 1))
+ return -1;
+
+ ovl = stream->video_out->get_overlay_manager(stream->video_out);
+ redraw_needed = ovl->redraw_needed(ovl, 0);
+
+ if (redraw_needed)
+ stream->video_out->trigger_drawing(stream->video_out);
+
+ stream->xine->port_ticket->release_nonblocking(stream->xine->port_ticket, 1);
+
+ return redraw_needed;
+}