diff options
author | Reinhard Nißl <rnissl@gmx.de> | 2007-04-15 20:43:42 +0200 |
---|---|---|
committer | Reinhard Nißl <rnissl@gmx.de> | 2007-04-15 20:43:42 +0200 |
commit | ee7faf25388d4a2890bf3fa55288391cfe04851a (patch) | |
tree | b87677a4c4164a1bceb79c822f7cf436469ea843 /src | |
parent | f8e051109fc70cbf7acbfd6582bc2f6d03e6d93b (diff) | |
download | xine-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')
-rw-r--r-- | src/xine-engine/xine.c | 19 | ||||
-rw-r--r-- | src/xine-engine/xine_internal.h | 1 |
2 files changed, 20 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; +} diff --git a/src/xine-engine/xine_internal.h b/src/xine-engine/xine_internal.h index 511b13a0d..f4041452d 100644 --- a/src/xine-engine/xine_internal.h +++ b/src/xine-engine/xine_internal.h @@ -375,6 +375,7 @@ int _x_lock_port_rewiring(xine_t *xine, int ms_to_time_out) XINE_PROTECTED; void _x_unlock_port_rewiring(xine_t *xine) XINE_PROTECTED; int _x_lock_frontend(xine_stream_t *stream, int ms_to_time_out) XINE_PROTECTED; void _x_unlock_frontend(xine_stream_t *stream) XINE_PROTECTED; +int _x_query_unprocessed_osd_events(xine_stream_t *stream) XINE_PROTECTED; void _x_handle_stream_end (xine_stream_t *stream, int non_user) XINE_PROTECTED; |