haiku/src/servers/media/DefaultManager.h
beveloper 359ac30644 Added automatic loading of physical input and output nodes.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@3320 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-05-25 21:16:53 +00:00

52 lines
1.3 KiB
C++

/*
* Copyright 2002, Marcus Overhagen. All rights reserved.
* Distributed under the terms of the MIT License.
*/
#include "TList.h"
#include "TMap.h"
#include "TStack.h"
#include "DataExchange.h"
class DefaultManager
{
public:
DefaultManager();
~DefaultManager();
status_t LoadState();
status_t SaveState();
status_t Set(node_type type, const media_node *node, const dormant_node_info *info, const media_input *input);
status_t Get(media_node_id *nodeid, char *input_name, int32 *input_id, node_type type);
status_t Rescan();
void Dump();
void CleanupTeam(team_id team);
private:
static int32 rescan_thread(void *arg);
void RescanThread();
void FindPhysicalVideoOut();
void FindPhysicalVideoIn();
void FindPhysicalAudioOut();
void FindPhysicalAudioIn();
void FindAudioMixer();
void FindTimeSource();
status_t ConnectMixerToOutput();
private:
volatile bool fMixerConnected;
volatile media_node_id fPhysicalVideoOut;
volatile media_node_id fPhysicalVideoIn;
volatile media_node_id fPhysicalAudioOut;
volatile media_node_id fPhysicalAudioIn;
volatile media_node_id fSystemTimeSource;
volatile media_node_id fTimeSource;
volatile media_node_id fAudioMixer;
volatile int32 fPhysicalAudioOutInputID;
char fPhysicalAudioOutInputName[B_MEDIA_NAME_LENGTH];
};