andrew@webrtc.org | b015cbe | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 1 | /* |
| 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.org | 471ae72 | 2013-05-21 13:52:32 +0000 | [diff] [blame] | 14 | #include "webrtc/voice_engine/include/voe_external_media.h" |
andrew@webrtc.org | b015cbe | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 15 | |
pbos@webrtc.org | 471ae72 | 2013-05-21 13:52:32 +0000 | [diff] [blame] | 16 | #include "webrtc/voice_engine/shared_data.h" |
andrew@webrtc.org | b015cbe | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 17 | |
| 18 | namespace webrtc { |
| 19 | |
| 20 | class VoEExternalMediaImpl : public VoEExternalMedia |
| 21 | { |
| 22 | public: |
| 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.org | 54f03bc | 2013-04-09 10:09:10 +0000 | [diff] [blame] | 37 | const int16_t speechData10ms[], |
andrew@webrtc.org | b015cbe | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 38 | int lengthSamples, |
| 39 | int samplingFreqHz, |
| 40 | int current_delay_ms); |
| 41 | |
pbos@webrtc.org | 54f03bc | 2013-04-09 10:09:10 +0000 | [diff] [blame] | 42 | virtual int ExternalPlayoutGetData(int16_t speechData10ms[], |
andrew@webrtc.org | b015cbe | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 43 | int samplingFreqHz, |
| 44 | int current_delay_ms, |
| 45 | int& lengthSamples); |
| 46 | |
roosa@google.com | b9e3afc | 2012-12-12 23:00:29 +0000 | [diff] [blame] | 47 | 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.org | b015cbe | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 52 | protected: |
| 53 | VoEExternalMediaImpl(voe::SharedData* shared); |
| 54 | virtual ~VoEExternalMediaImpl(); |
| 55 | |
| 56 | private: |
wjia@webrtc.org | 7b1e78d | 2013-01-12 01:09:03 +0000 | [diff] [blame] | 57 | #ifdef WEBRTC_VOE_EXTERNAL_REC_AND_PLAYOUT |
andrew@webrtc.org | b015cbe | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 58 | int playout_delay_ms_; |
wjia@webrtc.org | 7b1e78d | 2013-01-12 01:09:03 +0000 | [diff] [blame] | 59 | #endif |
andrew@webrtc.org | b015cbe | 2012-10-22 18:19:23 +0000 | [diff] [blame] | 60 | voe::SharedData* shared_; |
| 61 | }; |
| 62 | |
| 63 | } // namespace webrtc |
| 64 | |
| 65 | #endif // WEBRTC_VOICE_ENGINE_VOE_EXTERNAL_MEDIA_IMPL_H |