2002-12-26 05:25:25 +03:00
|
|
|
/*
|
|
|
|
* Copyright 2002, Marcus Overhagen. All rights reserved.
|
|
|
|
* Distributed under the terms of the MIT License.
|
|
|
|
*/
|
|
|
|
#include "DataExchange.h"
|
|
|
|
|
2003-11-17 13:16:51 +03:00
|
|
|
#include <Message.h>
|
|
|
|
|
|
|
|
class NodeManager;
|
|
|
|
|
2002-12-26 05:25:25 +03:00
|
|
|
class DefaultManager
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
DefaultManager();
|
|
|
|
~DefaultManager();
|
|
|
|
|
|
|
|
status_t LoadState();
|
2003-11-17 13:16:51 +03:00
|
|
|
status_t SaveState(NodeManager *node_manager);
|
2002-12-26 05:25:25 +03:00
|
|
|
|
2003-11-17 13:16:51 +03:00
|
|
|
status_t Set(media_node_id nodeid, const char *input_name, int32 input_id, node_type type);
|
2002-12-26 05:25:25 +03:00
|
|
|
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);
|
2003-05-25 00:33:52 +04:00
|
|
|
|
|
|
|
private:
|
2003-03-23 04:09:38 +03:00
|
|
|
static int32 rescan_thread(void *arg);
|
|
|
|
void RescanThread();
|
2003-05-25 00:33:52 +04:00
|
|
|
|
2003-11-17 13:16:51 +03:00
|
|
|
void FindPhysical(volatile media_node_id *id, uint32 default_type, bool isInput, media_type type);
|
2003-05-25 00:33:52 +04:00
|
|
|
void FindAudioMixer();
|
|
|
|
void FindTimeSource();
|
2003-03-23 04:09:38 +03:00
|
|
|
|
2003-05-26 01:16:53 +04:00
|
|
|
status_t ConnectMixerToOutput();
|
|
|
|
|
2002-12-26 05:25:25 +03:00
|
|
|
private:
|
2003-05-26 01:16:53 +04:00
|
|
|
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;
|
2003-05-25 00:33:52 +04:00
|
|
|
char fPhysicalAudioOutInputName[B_MEDIA_NAME_LENGTH];
|
2003-11-17 13:16:51 +03:00
|
|
|
|
|
|
|
BList fMsgList;
|
|
|
|
|
|
|
|
uint32 fBeginHeader[3];
|
|
|
|
uint32 fEndHeader[3];
|
2002-12-26 05:25:25 +03:00
|
|
|
};
|