Replace synchronization semaphore with async messages
* Remove SyncToServices, I will probably readd it in future but this time using a local synchronization service more than relying on the media_server to release the semaphore. * Due to some discussions today in mailing list I decided to step back and retry the initial way to notify media rosters about media services status. It is woking by using two different notifications for reconnecting to the media_server and notifying the local subscribers. * This speed up the media services restart. * Sorry for the noise and very thanks for reviewing my code to everyone.
This commit is contained in:
@@ -44,10 +44,6 @@ public:
|
||||
// Check if the media services are running.
|
||||
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);
|
||||
status_t GetAudioInput(media_node* _node);
|
||||
|
||||
@@ -30,6 +30,8 @@ enum {
|
||||
|
||||
// sent by the rescan thread
|
||||
MEDIA_SERVER_RESCAN_COMPLETED,
|
||||
// sent to rosters when rescan is completed
|
||||
MEDIA_SERVER_ALIVE,
|
||||
|
||||
// media add-on server
|
||||
MEDIA_ADD_ON_SERVER_PLAY_MEDIA = '_TRU'
|
||||
@@ -373,7 +375,6 @@ 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