Add BMediaRoster::IsRunning

* This function is provided to check
  if media services are running.
This commit is contained in:
Dario Casalinuovo 2015-04-09 15:39:04 +02:00
parent 239f85731e
commit 67483edabd
2 changed files with 14 additions and 0 deletions

View File

@ -41,6 +41,9 @@ public:
// already. It is not thread safe if you call Roster() at the
// same time.
// Check if the media services are running.
static bool IsRunning();
// Getting common instances of system nodes:
status_t GetVideoInput(media_node* _node);
status_t GetAudioInput(media_node* _node);

View File

@ -52,6 +52,7 @@ char __dont_remove_copyright_from_binary[] = "Copyright (c) 2002-2006 Marcus "
#include <MimeType.h>
#include <OS.h>
#include <ParameterWeb.h>
#include <Roster.h>
#include <StopWatch.h>
#include <String.h>
#include <TimeSource.h>
@ -3217,6 +3218,16 @@ BMediaRoster::GetInstancesFor(media_addon_id addon, int32 flavor,
}
bool
BMediaRoster::IsRunning()
{
if (be_roster->IsRunning(B_MEDIA_SERVER_SIGNATURE)
&& be_roster->IsRunning(B_MEDIA_ADDON_SERVER_SIGNATURE))
return true;
return false;
}
status_t
BMediaRoster::SetRealtimeFlags(uint32 enabled)
{