summaryrefslogtreecommitdiff
path: root/orkbasecxx/CapturePluginProxy.h
blob: a3d4257f91678b4ff78e309b814752ce81a3f57d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
/*
 * Oreka -- A media capture and retrieval platform
 * 
 * Copyright (C) 2005, orecx LLC
 *
 * http://www.orecx.com
 *
 * This program is free software, distributed under the terms of
 * the GNU General Public License.
 * Please refer to http://www.gnu.org/copyleft/gpl.html
 *
 */

#ifndef __CAPTUREPLUGINPROXY_H__
#define __CAPTUREPLUGINPROXY_H__

#include "ace/Singleton.h"
#include "ace/Thread_Mutex.h"
#include "ace/DLL.h"
#include "AudioCapture.h"
#include "AudioCapturePlugin.h"

class DLL_IMPORT_EXPORT_ORKBASE CapturePluginProxy
{
public:
	static bool Initialize();
	static CapturePluginProxy* Singleton();

	void Run();
	void Shutdown();
	void StartCapture(CStdString& party, CStdString& orkuid);
	void PauseCapture(CStdString& party, CStdString& orkuid);
	void StopCapture(CStdString& party);

	static void __CDECL__  AudioChunkCallBack(AudioChunkRef chunkRef, CStdString& capturePort);
	static void __CDECL__ CaptureEventCallBack(CaptureEventRef eventRef, CStdString& capturePort);
private:
	CapturePluginProxy();
	static CapturePluginProxy* m_singleton;	
	bool Init();

	ConfigureFunction m_configureFunction;
	RegisterCallBacksFunction m_registerCallBacksFunction;
	InitializeFunction m_initializeFunction;
	RunFunction m_runFunction;
	StartCaptureFunction m_startCaptureFunction;
	StopCaptureFunction m_stopCaptureFunction;
	PauseCaptureFunction m_pauseCaptureFunction;

	ACE_DLL m_dll;
	bool m_loaded;
};

//typedef ACE_Singleton<CapturePluginProxy, ACE_Thread_Mutex> CapturePluginProxySingleton;

#endif