From 3343b69ac7865a75ddba6e62bcecd60232cef18f Mon Sep 17 00:00:00 2001
From: Dario Casalinuovo <b.vitruvio@gmail.com>
Date: Thu, 9 Apr 2015 15:39:04 +0200
Subject: [PATCH 05/13] Add BMediaRoster::IsRunning which check if media
services are running.
---
headers/os/media/MediaRoster.h | 3 +++
src/kits/media/MediaRoster.cpp | 11 +++++++++++
2 files changed, 14 insertions(+)
diff --git a/headers/os/media/MediaRoster.h b/headers/os/media/MediaRoster.h
index 137a03d..fcf3af1 100644
a
|
b
|
public:
|
41 | 41 | // already. It is not thread safe if you call Roster() at the |
42 | 42 | // same time. |
43 | 43 | |
| 44 | // Check if the media services are running. |
| 45 | static bool IsRunning(); |
| 46 | |
44 | 47 | // Getting common instances of system nodes: |
45 | 48 | status_t GetVideoInput(media_node* _node); |
46 | 49 | status_t GetAudioInput(media_node* _node); |
diff --git a/src/kits/media/MediaRoster.cpp b/src/kits/media/MediaRoster.cpp
index 7137f6d..1acf332 100644
a
|
b
|
char __dont_remove_copyright_from_binary[] = "Copyright (c) 2002-2006 Marcus "
|
52 | 52 | #include <MimeType.h> |
53 | 53 | #include <OS.h> |
54 | 54 | #include <ParameterWeb.h> |
| 55 | #include <Roster.h> |
55 | 56 | #include <StopWatch.h> |
56 | 57 | #include <String.h> |
57 | 58 | #include <TimeSource.h> |
… |
… |
BMediaRoster::GetInstancesFor(media_addon_id addon, int32 flavor,
|
3176 | 3177 | } |
3177 | 3178 | |
3178 | 3179 | |
| 3180 | bool |
| 3181 | BMediaRoster::IsRunning() |
| 3182 | { |
| 3183 | if (be_roster->IsRunning(B_MEDIA_SERVER_SIGNATURE) |
| 3184 | && be_roster->IsRunning(B_MEDIA_ADDON_SERVER_SIGNATURE)) |
| 3185 | return true; |
| 3186 | return false; |
| 3187 | } |
| 3188 | |
| 3189 | |
3179 | 3190 | status_t |
3180 | 3191 | BMediaRoster::SetRealtimeFlags(uint32 enabled) |
3181 | 3192 | { |