diff options
author | Reinhard Nißl <rnissl@gmx.de> | 2007-04-13 00:32:19 +0200 |
---|---|---|
committer | Reinhard Nißl <rnissl@gmx.de> | 2007-04-13 00:32:19 +0200 |
commit | 31bb62fae17fe849704c5d3fe78090a3df92cead (patch) | |
tree | 77f9e2532a92d08b15bc86f8df429ac3b77897eb | |
parent | a7a5839d3520ab5ef743b3f9408e446838b3fd8b (diff) | |
download | xine-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.c | 10 | ||||
-rw-r--r-- | src/xine-engine/xine_internal.h | 2 |
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; |