Introduce functionality for syncing with the media services
* The global synchro semaphore is provided with the purpose of being used to avoid threads lock up when the media_server is in an undefined state. There's still room for improvements. * BMediaRoster::SyncToServices lock up on a semaphore until the multi_audio correctly connected to the mixer.
This commit is contained in:
@@ -42,7 +42,11 @@ public:
|
||||
// same time.
|
||||
|
||||
// Check if the media services are running.
|
||||
static bool IsRunning();
|
||||
static bool IsRunning();
|
||||
|
||||
// This functions blocks until the media services are available,
|
||||
// don't abuse of it.
|
||||
static status_t SyncToServices(bigtime_t timeout = -1);
|
||||
|
||||
// Getting common instances of system nodes:
|
||||
status_t GetVideoInput(media_node* _node);
|
||||
|
||||
@@ -28,6 +28,9 @@ enum {
|
||||
// add_system_beep_event()
|
||||
MEDIA_SERVER_ADD_SYSTEM_BEEP_EVENT,
|
||||
|
||||
// sent by the rescan thread
|
||||
MEDIA_SERVER_RESCAN_COMPLETED,
|
||||
|
||||
// media add-on server
|
||||
MEDIA_ADD_ON_SERVER_PLAY_MEDIA = '_TRU'
|
||||
};
|
||||
@@ -370,6 +373,7 @@ struct server_register_app_request : request_data {
|
||||
};
|
||||
|
||||
struct server_register_app_reply : reply_data {
|
||||
sem_id global_synchro;
|
||||
};
|
||||
|
||||
struct server_unregister_app_request : request_data {
|
||||
|
||||
Reference in New Issue
Block a user