summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorReinhard Nißl <rnissl@gmx.de>2007-04-13 00:32:19 +0200
committerReinhard Nißl <rnissl@gmx.de>2007-04-13 00:32:19 +0200
commit31bb62fae17fe849704c5d3fe78090a3df92cead (patch)
tree77f9e2532a92d08b15bc86f8df429ac3b77897eb
parenta7a5839d3520ab5ef743b3f9408e446838b3fd8b (diff)
downloadxine-lib-31bb62fae17fe849704c5d3fe78090a3df92cead.tar.gz
xine-lib-31bb62fae17fe849704c5d3fe78090a3df92cead.tar.bz2
Provide internal functions to lock port rewiring.
The introduced function give "frontend like" plugins a chance to lock and unlock port rewiring. This protects such threads (when combined with holding the frontend lock) from beeing blocked when calling functions like xine_get_current_frame().
-rw-r--r--src/xine-engine/xine.c10
-rw-r--r--src/xine-engine/xine_internal.h2
2 files changed, 12 insertions, 0 deletions
diff --git a/src/xine-engine/xine.c b/src/xine-engine/xine.c
index a780aa4dc..1a9a2be4d 100644
--- a/src/xine-engine/xine.c
+++ b/src/xine-engine/xine.c
@@ -2133,3 +2133,13 @@ int _x_query_buffer_usage(xine_stream_t *stream, int *num_video_buffers, int *nu
return ticket_acquired != 0;
}
+
+int _x_lock_port_rewiring(xine_t *xine, int ms_timeout)
+{
+ return xine->port_ticket->lock_port_rewiring(xine->port_ticket, ms_timeout);
+}
+
+void _x_unlock_port_rewiring(xine_t *xine)
+{
+ xine->port_ticket->unlock_port_rewiring(xine->port_ticket);
+}
diff --git a/src/xine-engine/xine_internal.h b/src/xine-engine/xine_internal.h
index db95d064a..4fa31a969 100644
--- a/src/xine-engine/xine_internal.h
+++ b/src/xine-engine/xine_internal.h
@@ -371,6 +371,8 @@ struct xine_stream_s {
*/
int _x_query_buffer_usage(xine_stream_t *stream, int *num_video_buffers, int *num_audio_buffers, int *num_video_frames, int *num_audio_frames) XINE_PROTECTED;
+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;
void _x_handle_stream_end (xine_stream_t *stream, int non_user) XINE_PROTECTED;