summaryrefslogtreecommitdiff
path: root/orkaudio/CapturePluginProxy.h
blob: 1df35d9004aecd43bccff14acfba2442fe084712 (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
/*
 * 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 CapturePluginProxy
{
public:
	CapturePluginProxy();
	bool Initialize();
	void Run();
	void Shutdown();
	void StartCapture(CStdString& capturePort);
	void StopCapture(CStdString& capturePort);

	static void __CDECL__  AudioChunkCallBack(AudioChunkRef chunkRef, CStdString& capturePort);
	static void __CDECL__ CaptureEventCallBack(CaptureEventRef eventRef, CStdString& capturePort);
private:
	ConfigureFunction m_configureFunction;
	RegisterCallBacksFunction m_registerCallBacksFunction;
	InitializeFunction m_initializeFunction;
	RunFunction m_runFunction;
	StartCaptureFunction m_startCaptureFunction;
	StopCaptureFunction m_stopCaptureFunction;

	ACE_DLL m_dll;
	bool m_loaded;
};

typedef ACE_Singleton<CapturePluginProxy, ACE_Thread_Mutex> CapturePluginProxySingleton;

#endif