blob: ef460264f8f7433e2e547327c04deecc785b0362 [file] [log] [blame]
andrew@webrtc.orgb015cbe2012-10-22 18:19:23 +00001/*
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
3 *
4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
9 */
10
11#ifndef WEBRTC_VOICE_ENGINE_VOE_EXTERNAL_MEDIA_IMPL_H
12#define WEBRTC_VOICE_ENGINE_VOE_EXTERNAL_MEDIA_IMPL_H
13
pbos@webrtc.org471ae722013-05-21 13:52:32 +000014#include "webrtc/voice_engine/include/voe_external_media.h"
andrew@webrtc.orgb015cbe2012-10-22 18:19:23 +000015
pbos@webrtc.org471ae722013-05-21 13:52:32 +000016#include "webrtc/voice_engine/shared_data.h"
andrew@webrtc.orgb015cbe2012-10-22 18:19:23 +000017
18namespace webrtc {
19
20class VoEExternalMediaImpl : public VoEExternalMedia
21{
22public:
23 virtual int RegisterExternalMediaProcessing(
24 int channel,
25 ProcessingTypes type,
26 VoEMediaProcess& processObject);
27
28 virtual int DeRegisterExternalMediaProcessing(
29 int channel,
30 ProcessingTypes type);
31
32 virtual int SetExternalRecordingStatus(bool enable);
33
34 virtual int SetExternalPlayoutStatus(bool enable);
35
36 virtual int ExternalRecordingInsertData(
pbos@webrtc.org54f03bc2013-04-09 10:09:10 +000037 const int16_t speechData10ms[],
andrew@webrtc.orgb015cbe2012-10-22 18:19:23 +000038 int lengthSamples,
39 int samplingFreqHz,
40 int current_delay_ms);
41
pbos@webrtc.org54f03bc2013-04-09 10:09:10 +000042 virtual int ExternalPlayoutGetData(int16_t speechData10ms[],
andrew@webrtc.orgb015cbe2012-10-22 18:19:23 +000043 int samplingFreqHz,
44 int current_delay_ms,
45 int& lengthSamples);
46
roosa@google.comb9e3afc2012-12-12 23:00:29 +000047 virtual int GetAudioFrame(int channel, int desired_sample_rate_hz,
48 AudioFrame* frame);
49
50 virtual int SetExternalMixing(int channel, bool enable);
51
andrew@webrtc.orgb015cbe2012-10-22 18:19:23 +000052protected:
53 VoEExternalMediaImpl(voe::SharedData* shared);
54 virtual ~VoEExternalMediaImpl();
55
56private:
wjia@webrtc.org7b1e78d2013-01-12 01:09:03 +000057#ifdef WEBRTC_VOE_EXTERNAL_REC_AND_PLAYOUT
andrew@webrtc.orgb015cbe2012-10-22 18:19:23 +000058 int playout_delay_ms_;
wjia@webrtc.org7b1e78d2013-01-12 01:09:03 +000059#endif
andrew@webrtc.orgb015cbe2012-10-22 18:19:23 +000060 voe::SharedData* shared_;
61};
62
63} // namespace webrtc
64
65#endif // WEBRTC_VOICE_ENGINE_VOE_EXTERNAL_MEDIA_IMPL_H