Roll chromium_revision e144d30..6fdb142 (318658:318841) + remove OVERRIDE macro
Clang version changed 223108:230914
Details: e144d30..6fdb142
/tools/clang/scripts/update.sh
Removes the OVERRIDE macro defined in:
* webrtc/base/common.h
* webrtc/typedefs.h
The majority of the source changes were done by running this in src/:
perl -0pi -e "s/virtual\s([^({;]*(\([^({;]*\)[^({;]*))(OVERRIDE|override)/\1override/sg" `find {talk,webrtc} -name "*.h" -o -name "*.cc*" -o -name "*.mm*"`
which converted all:
virtual Foo() OVERRIDE
functions to:
Foo() override
Then I manually edited:
* talk/media/webrtc/fakewebrtccommon.h
* webrtc/test/fake_common.h
Remaining uses of OVERRIDE was fixed by search+replace.
Manual edits were done to fix virtual destructors that were
overriding inherited ones.
Finally a build error related to the pure virtual definitions of
Read, Write and Rewind in common_types.h required a bit of
refactoring in:
* webrtc/common_types.cc
* webrtc/common_types.h
* webrtc/system_wrappers/interface/file_wrapper.h
* webrtc/system_wrappers/source/file_impl.cc
This roll should make it possible for us to finally re-enable deadlock
detection for TSan on the buildbots.
BUG=4106
R=pbos@webrtc.org, tommi@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/41069004
Cr-Commit-Position: refs/heads/master@{#8596}
git-svn-id: http://webrtc.googlecode.com/svn/trunk@8596 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
792f1a14e2
commit
14665ff7d4
2
DEPS
2
DEPS
@ -6,7 +6,7 @@
|
|||||||
vars = {
|
vars = {
|
||||||
'extra_gyp_flag': '-Dextra_gyp_flag=0',
|
'extra_gyp_flag': '-Dextra_gyp_flag=0',
|
||||||
'chromium_git': 'https://chromium.googlesource.com',
|
'chromium_git': 'https://chromium.googlesource.com',
|
||||||
'chromium_revision': 'e144d30232209034b82d544926070bb8dc62f6ec',
|
'chromium_revision': '6fdb1425edf17f7b3d55626927d4fddb076a8e31',
|
||||||
}
|
}
|
||||||
|
|
||||||
# NOTE: Prefer revision numbers to tags for svn deps. Use http rather than
|
# NOTE: Prefer revision numbers to tags for svn deps. Use http rather than
|
||||||
|
@ -42,21 +42,20 @@ class AudioTrack : public MediaStreamTrack<AudioTrackInterface> {
|
|||||||
const std::string& id, AudioSourceInterface* source);
|
const std::string& id, AudioSourceInterface* source);
|
||||||
|
|
||||||
// AudioTrackInterface implementation.
|
// AudioTrackInterface implementation.
|
||||||
virtual AudioSourceInterface* GetSource() const OVERRIDE {
|
AudioSourceInterface* GetSource() const override {
|
||||||
return audio_source_.get();
|
return audio_source_.get();
|
||||||
}
|
}
|
||||||
// TODO(xians): Implement these methods.
|
// TODO(xians): Implement these methods.
|
||||||
virtual void AddSink(AudioTrackSinkInterface* sink) OVERRIDE {}
|
void AddSink(AudioTrackSinkInterface* sink) override {}
|
||||||
virtual void RemoveSink(AudioTrackSinkInterface* sink) OVERRIDE {}
|
void RemoveSink(AudioTrackSinkInterface* sink) override {}
|
||||||
virtual bool GetSignalLevel(int* level) OVERRIDE { return false; }
|
bool GetSignalLevel(int* level) override { return false; }
|
||||||
virtual rtc::scoped_refptr<AudioProcessorInterface> GetAudioProcessor()
|
rtc::scoped_refptr<AudioProcessorInterface> GetAudioProcessor() override {
|
||||||
OVERRIDE { return NULL; }
|
|
||||||
virtual cricket::AudioRenderer* GetRenderer() OVERRIDE {
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
cricket::AudioRenderer* GetRenderer() override { return NULL; }
|
||||||
|
|
||||||
// MediaStreamTrack implementation.
|
// MediaStreamTrack implementation.
|
||||||
virtual std::string kind() const OVERRIDE;
|
std::string kind() const override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
AudioTrack(const std::string& label, AudioSourceInterface* audio_source);
|
AudioTrack(const std::string& label, AudioSourceInterface* audio_source);
|
||||||
|
@ -47,8 +47,8 @@ class AudioTrackRenderer : public cricket::AudioRenderer {
|
|||||||
~AudioTrackRenderer();
|
~AudioTrackRenderer();
|
||||||
|
|
||||||
// Implements cricket::AudioRenderer.
|
// Implements cricket::AudioRenderer.
|
||||||
virtual void AddChannel(int channel_id) OVERRIDE;
|
void AddChannel(int channel_id) override;
|
||||||
virtual void RemoveChannel(int channel_id) OVERRIDE;
|
void RemoveChannel(int channel_id) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int channel_id_;
|
int channel_id_;
|
||||||
|
@ -78,15 +78,16 @@ class DtmfSender
|
|||||||
DtmfProviderInterface* provider);
|
DtmfProviderInterface* provider);
|
||||||
|
|
||||||
// Implements DtmfSenderInterface.
|
// Implements DtmfSenderInterface.
|
||||||
virtual void RegisterObserver(DtmfSenderObserverInterface* observer) OVERRIDE;
|
void RegisterObserver(DtmfSenderObserverInterface* observer) override;
|
||||||
virtual void UnregisterObserver() OVERRIDE;
|
void UnregisterObserver() override;
|
||||||
virtual bool CanInsertDtmf() OVERRIDE;
|
bool CanInsertDtmf() override;
|
||||||
virtual bool InsertDtmf(const std::string& tones, int duration,
|
bool InsertDtmf(const std::string& tones,
|
||||||
int inter_tone_gap) OVERRIDE;
|
int duration,
|
||||||
virtual const AudioTrackInterface* track() const OVERRIDE;
|
int inter_tone_gap) override;
|
||||||
virtual std::string tones() const OVERRIDE;
|
const AudioTrackInterface* track() const override;
|
||||||
virtual int duration() const OVERRIDE;
|
std::string tones() const override;
|
||||||
virtual int inter_tone_gap() const OVERRIDE;
|
int duration() const override;
|
||||||
|
int inter_tone_gap() const override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
DtmfSender(AudioTrackInterface* track,
|
DtmfSender(AudioTrackInterface* track,
|
||||||
|
@ -50,7 +50,7 @@ class FakeDtmfObserver : public DtmfSenderObserverInterface {
|
|||||||
FakeDtmfObserver() : completed_(false) {}
|
FakeDtmfObserver() : completed_(false) {}
|
||||||
|
|
||||||
// Implements DtmfSenderObserverInterface.
|
// Implements DtmfSenderObserverInterface.
|
||||||
virtual void OnToneChange(const std::string& tone) OVERRIDE {
|
void OnToneChange(const std::string& tone) override {
|
||||||
LOG(LS_VERBOSE) << "FakeDtmfObserver::OnToneChange '" << tone << "'.";
|
LOG(LS_VERBOSE) << "FakeDtmfObserver::OnToneChange '" << tone << "'.";
|
||||||
tones_.push_back(tone);
|
tones_.push_back(tone);
|
||||||
if (tone.empty()) {
|
if (tone.empty()) {
|
||||||
@ -90,12 +90,13 @@ class FakeDtmfProvider : public DtmfProviderInterface {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Implements DtmfProviderInterface.
|
// Implements DtmfProviderInterface.
|
||||||
virtual bool CanInsertDtmf(const std::string& track_label) OVERRIDE {
|
bool CanInsertDtmf(const std::string& track_label) override {
|
||||||
return (can_insert_dtmf_tracks_.count(track_label) != 0);
|
return (can_insert_dtmf_tracks_.count(track_label) != 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual bool InsertDtmf(const std::string& track_label,
|
bool InsertDtmf(const std::string& track_label,
|
||||||
int code, int duration) OVERRIDE {
|
int code,
|
||||||
|
int duration) override {
|
||||||
int gap = 0;
|
int gap = 0;
|
||||||
// TODO(ronghuawu): Make the timer (basically the rtc::TimeNanos)
|
// TODO(ronghuawu): Make the timer (basically the rtc::TimeNanos)
|
||||||
// mockable and use a fake timer in the unit tests.
|
// mockable and use a fake timer in the unit tests.
|
||||||
|
@ -57,7 +57,7 @@ class AndroidVideoCapturerJni : public webrtc::AndroidVideoCapturerDelegate {
|
|||||||
webrtc::AndroidVideoCapturer* capturer) override;
|
webrtc::AndroidVideoCapturer* capturer) override;
|
||||||
void Stop() override;
|
void Stop() override;
|
||||||
|
|
||||||
virtual void ReturnBuffer(int64 time_stamp) override;
|
void ReturnBuffer(int64 time_stamp) override;
|
||||||
|
|
||||||
std::string GetSupportedFormats() override;
|
std::string GetSupportedFormats() override;
|
||||||
|
|
||||||
|
@ -212,7 +212,7 @@ class PCOJava : public PeerConnectionObserver {
|
|||||||
|
|
||||||
virtual ~PCOJava() {}
|
virtual ~PCOJava() {}
|
||||||
|
|
||||||
virtual void OnIceCandidate(const IceCandidateInterface* candidate) OVERRIDE {
|
void OnIceCandidate(const IceCandidateInterface* candidate) override {
|
||||||
ScopedLocalRefFrame local_ref_frame(jni());
|
ScopedLocalRefFrame local_ref_frame(jni());
|
||||||
std::string sdp;
|
std::string sdp;
|
||||||
CHECK(candidate->ToString(&sdp)) << "got so far: " << sdp;
|
CHECK(candidate->ToString(&sdp)) << "got so far: " << sdp;
|
||||||
@ -230,8 +230,8 @@ class PCOJava : public PeerConnectionObserver {
|
|||||||
CHECK_EXCEPTION(jni()) << "error during CallVoidMethod";
|
CHECK_EXCEPTION(jni()) << "error during CallVoidMethod";
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void OnSignalingChange(
|
void OnSignalingChange(
|
||||||
PeerConnectionInterface::SignalingState new_state) OVERRIDE {
|
PeerConnectionInterface::SignalingState new_state) override {
|
||||||
ScopedLocalRefFrame local_ref_frame(jni());
|
ScopedLocalRefFrame local_ref_frame(jni());
|
||||||
jmethodID m = GetMethodID(
|
jmethodID m = GetMethodID(
|
||||||
jni(), *j_observer_class_, "onSignalingChange",
|
jni(), *j_observer_class_, "onSignalingChange",
|
||||||
@ -242,8 +242,8 @@ class PCOJava : public PeerConnectionObserver {
|
|||||||
CHECK_EXCEPTION(jni()) << "error during CallVoidMethod";
|
CHECK_EXCEPTION(jni()) << "error during CallVoidMethod";
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void OnIceConnectionChange(
|
void OnIceConnectionChange(
|
||||||
PeerConnectionInterface::IceConnectionState new_state) OVERRIDE {
|
PeerConnectionInterface::IceConnectionState new_state) override {
|
||||||
ScopedLocalRefFrame local_ref_frame(jni());
|
ScopedLocalRefFrame local_ref_frame(jni());
|
||||||
jmethodID m = GetMethodID(
|
jmethodID m = GetMethodID(
|
||||||
jni(), *j_observer_class_, "onIceConnectionChange",
|
jni(), *j_observer_class_, "onIceConnectionChange",
|
||||||
@ -254,8 +254,8 @@ class PCOJava : public PeerConnectionObserver {
|
|||||||
CHECK_EXCEPTION(jni()) << "error during CallVoidMethod";
|
CHECK_EXCEPTION(jni()) << "error during CallVoidMethod";
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void OnIceGatheringChange(
|
void OnIceGatheringChange(
|
||||||
PeerConnectionInterface::IceGatheringState new_state) OVERRIDE {
|
PeerConnectionInterface::IceGatheringState new_state) override {
|
||||||
ScopedLocalRefFrame local_ref_frame(jni());
|
ScopedLocalRefFrame local_ref_frame(jni());
|
||||||
jmethodID m = GetMethodID(
|
jmethodID m = GetMethodID(
|
||||||
jni(), *j_observer_class_, "onIceGatheringChange",
|
jni(), *j_observer_class_, "onIceGatheringChange",
|
||||||
@ -266,7 +266,7 @@ class PCOJava : public PeerConnectionObserver {
|
|||||||
CHECK_EXCEPTION(jni()) << "error during CallVoidMethod";
|
CHECK_EXCEPTION(jni()) << "error during CallVoidMethod";
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void OnAddStream(MediaStreamInterface* stream) OVERRIDE {
|
void OnAddStream(MediaStreamInterface* stream) override {
|
||||||
ScopedLocalRefFrame local_ref_frame(jni());
|
ScopedLocalRefFrame local_ref_frame(jni());
|
||||||
jobject j_stream = jni()->NewObject(
|
jobject j_stream = jni()->NewObject(
|
||||||
*j_media_stream_class_, j_media_stream_ctor_, (jlong)stream);
|
*j_media_stream_class_, j_media_stream_ctor_, (jlong)stream);
|
||||||
@ -322,7 +322,7 @@ class PCOJava : public PeerConnectionObserver {
|
|||||||
CHECK_EXCEPTION(jni()) << "error during CallVoidMethod";
|
CHECK_EXCEPTION(jni()) << "error during CallVoidMethod";
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void OnRemoveStream(MediaStreamInterface* stream) OVERRIDE {
|
void OnRemoveStream(MediaStreamInterface* stream) override {
|
||||||
ScopedLocalRefFrame local_ref_frame(jni());
|
ScopedLocalRefFrame local_ref_frame(jni());
|
||||||
NativeToJavaStreamsMap::iterator it = streams_.find(stream);
|
NativeToJavaStreamsMap::iterator it = streams_.find(stream);
|
||||||
CHECK(it != streams_.end()) << "unexpected stream: " << std::hex << stream;
|
CHECK(it != streams_.end()) << "unexpected stream: " << std::hex << stream;
|
||||||
@ -338,7 +338,7 @@ class PCOJava : public PeerConnectionObserver {
|
|||||||
CHECK_EXCEPTION(jni()) << "error during CallVoidMethod";
|
CHECK_EXCEPTION(jni()) << "error during CallVoidMethod";
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void OnDataChannel(DataChannelInterface* channel) OVERRIDE {
|
void OnDataChannel(DataChannelInterface* channel) override {
|
||||||
ScopedLocalRefFrame local_ref_frame(jni());
|
ScopedLocalRefFrame local_ref_frame(jni());
|
||||||
jobject j_channel = jni()->NewObject(
|
jobject j_channel = jni()->NewObject(
|
||||||
*j_data_channel_class_, j_data_channel_ctor_, (jlong)channel);
|
*j_data_channel_class_, j_data_channel_ctor_, (jlong)channel);
|
||||||
@ -358,7 +358,7 @@ class PCOJava : public PeerConnectionObserver {
|
|||||||
CHECK_EXCEPTION(jni()) << "error during CallVoidMethod";
|
CHECK_EXCEPTION(jni()) << "error during CallVoidMethod";
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void OnRenegotiationNeeded() OVERRIDE {
|
void OnRenegotiationNeeded() override {
|
||||||
ScopedLocalRefFrame local_ref_frame(jni());
|
ScopedLocalRefFrame local_ref_frame(jni());
|
||||||
jmethodID m =
|
jmethodID m =
|
||||||
GetMethodID(jni(), *j_observer_class_, "onRenegotiationNeeded", "()V");
|
GetMethodID(jni(), *j_observer_class_, "onRenegotiationNeeded", "()V");
|
||||||
@ -407,13 +407,9 @@ class ConstraintsWrapper : public MediaConstraintsInterface {
|
|||||||
virtual ~ConstraintsWrapper() {}
|
virtual ~ConstraintsWrapper() {}
|
||||||
|
|
||||||
// MediaConstraintsInterface.
|
// MediaConstraintsInterface.
|
||||||
virtual const Constraints& GetMandatory() const OVERRIDE {
|
const Constraints& GetMandatory() const override { return mandatory_; }
|
||||||
return mandatory_;
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual const Constraints& GetOptional() const OVERRIDE {
|
const Constraints& GetOptional() const override { return optional_; }
|
||||||
return optional_;
|
|
||||||
}
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Helper for translating a List<Pair<String, String>> to a Constraints.
|
// Helper for translating a List<Pair<String, String>> to a Constraints.
|
||||||
@ -493,7 +489,7 @@ class SdpObserverWrapper : public T {
|
|||||||
|
|
||||||
virtual ~SdpObserverWrapper() {}
|
virtual ~SdpObserverWrapper() {}
|
||||||
|
|
||||||
// Can't mark OVERRIDE because of templating.
|
// Can't mark override because of templating.
|
||||||
virtual void OnSuccess() {
|
virtual void OnSuccess() {
|
||||||
ScopedLocalRefFrame local_ref_frame(jni());
|
ScopedLocalRefFrame local_ref_frame(jni());
|
||||||
jmethodID m = GetMethodID(jni(), *j_observer_class_, "onSetSuccess", "()V");
|
jmethodID m = GetMethodID(jni(), *j_observer_class_, "onSetSuccess", "()V");
|
||||||
@ -501,7 +497,7 @@ class SdpObserverWrapper : public T {
|
|||||||
CHECK_EXCEPTION(jni()) << "error during CallVoidMethod";
|
CHECK_EXCEPTION(jni()) << "error during CallVoidMethod";
|
||||||
}
|
}
|
||||||
|
|
||||||
// Can't mark OVERRIDE because of templating.
|
// Can't mark override because of templating.
|
||||||
virtual void OnSuccess(SessionDescriptionInterface* desc) {
|
virtual void OnSuccess(SessionDescriptionInterface* desc) {
|
||||||
ScopedLocalRefFrame local_ref_frame(jni());
|
ScopedLocalRefFrame local_ref_frame(jni());
|
||||||
jmethodID m = GetMethodID(
|
jmethodID m = GetMethodID(
|
||||||
@ -540,7 +536,7 @@ class CreateSdpObserverWrapper
|
|||||||
ConstraintsWrapper* constraints)
|
ConstraintsWrapper* constraints)
|
||||||
: SdpObserverWrapper(jni, j_observer, constraints) {}
|
: SdpObserverWrapper(jni, j_observer, constraints) {}
|
||||||
|
|
||||||
virtual void OnFailure(const std::string& error) OVERRIDE {
|
void OnFailure(const std::string& error) override {
|
||||||
ScopedLocalRefFrame local_ref_frame(jni());
|
ScopedLocalRefFrame local_ref_frame(jni());
|
||||||
SdpObserverWrapper::OnFailure(std::string("Create"), error);
|
SdpObserverWrapper::OnFailure(std::string("Create"), error);
|
||||||
}
|
}
|
||||||
@ -553,7 +549,7 @@ class SetSdpObserverWrapper
|
|||||||
ConstraintsWrapper* constraints)
|
ConstraintsWrapper* constraints)
|
||||||
: SdpObserverWrapper(jni, j_observer, constraints) {}
|
: SdpObserverWrapper(jni, j_observer, constraints) {}
|
||||||
|
|
||||||
virtual void OnFailure(const std::string& error) OVERRIDE {
|
void OnFailure(const std::string& error) override {
|
||||||
ScopedLocalRefFrame local_ref_frame(jni());
|
ScopedLocalRefFrame local_ref_frame(jni());
|
||||||
SdpObserverWrapper::OnFailure(std::string("Set"), error);
|
SdpObserverWrapper::OnFailure(std::string("Set"), error);
|
||||||
}
|
}
|
||||||
@ -577,13 +573,13 @@ class DataChannelObserverWrapper : public DataChannelObserver {
|
|||||||
|
|
||||||
virtual ~DataChannelObserverWrapper() {}
|
virtual ~DataChannelObserverWrapper() {}
|
||||||
|
|
||||||
virtual void OnStateChange() OVERRIDE {
|
void OnStateChange() override {
|
||||||
ScopedLocalRefFrame local_ref_frame(jni());
|
ScopedLocalRefFrame local_ref_frame(jni());
|
||||||
jni()->CallVoidMethod(*j_observer_global_, j_on_state_change_mid_);
|
jni()->CallVoidMethod(*j_observer_global_, j_on_state_change_mid_);
|
||||||
CHECK_EXCEPTION(jni()) << "error during CallVoidMethod";
|
CHECK_EXCEPTION(jni()) << "error during CallVoidMethod";
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void OnMessage(const DataBuffer& buffer) OVERRIDE {
|
void OnMessage(const DataBuffer& buffer) override {
|
||||||
ScopedLocalRefFrame local_ref_frame(jni());
|
ScopedLocalRefFrame local_ref_frame(jni());
|
||||||
jobject byte_buffer =
|
jobject byte_buffer =
|
||||||
jni()->NewDirectByteBuffer(const_cast<char*>(buffer.data.data()),
|
jni()->NewDirectByteBuffer(const_cast<char*>(buffer.data.data()),
|
||||||
@ -628,7 +624,7 @@ class StatsObserverWrapper : public StatsObserver {
|
|||||||
|
|
||||||
virtual ~StatsObserverWrapper() {}
|
virtual ~StatsObserverWrapper() {}
|
||||||
|
|
||||||
virtual void OnComplete(const StatsReports& reports) OVERRIDE {
|
void OnComplete(const StatsReports& reports) override {
|
||||||
ScopedLocalRefFrame local_ref_frame(jni());
|
ScopedLocalRefFrame local_ref_frame(jni());
|
||||||
jobjectArray j_reports = ReportsToJava(jni(), reports);
|
jobjectArray j_reports = ReportsToJava(jni(), reports);
|
||||||
jmethodID m = GetMethodID(jni(), *j_observer_class_, "onComplete",
|
jmethodID m = GetMethodID(jni(), *j_observer_class_, "onComplete",
|
||||||
@ -700,13 +696,13 @@ class VideoRendererWrapper : public VideoRendererInterface {
|
|||||||
|
|
||||||
virtual ~VideoRendererWrapper() {}
|
virtual ~VideoRendererWrapper() {}
|
||||||
|
|
||||||
virtual void SetSize(int width, int height) OVERRIDE {
|
void SetSize(int width, int height) override {
|
||||||
ScopedLocalRefFrame local_ref_frame(AttachCurrentThreadIfNeeded());
|
ScopedLocalRefFrame local_ref_frame(AttachCurrentThreadIfNeeded());
|
||||||
const bool kNotReserved = false; // What does this param mean??
|
const bool kNotReserved = false; // What does this param mean??
|
||||||
renderer_->SetSize(width, height, kNotReserved);
|
renderer_->SetSize(width, height, kNotReserved);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void RenderFrame(const cricket::VideoFrame* frame) OVERRIDE {
|
void RenderFrame(const cricket::VideoFrame* frame) override {
|
||||||
ScopedLocalRefFrame local_ref_frame(AttachCurrentThreadIfNeeded());
|
ScopedLocalRefFrame local_ref_frame(AttachCurrentThreadIfNeeded());
|
||||||
renderer_->RenderFrame(frame);
|
renderer_->RenderFrame(frame);
|
||||||
}
|
}
|
||||||
@ -742,13 +738,13 @@ class JavaVideoRendererWrapper : public VideoRendererInterface {
|
|||||||
|
|
||||||
virtual ~JavaVideoRendererWrapper() {}
|
virtual ~JavaVideoRendererWrapper() {}
|
||||||
|
|
||||||
virtual void SetSize(int width, int height) OVERRIDE {
|
void SetSize(int width, int height) override {
|
||||||
ScopedLocalRefFrame local_ref_frame(jni());
|
ScopedLocalRefFrame local_ref_frame(jni());
|
||||||
jni()->CallVoidMethod(*j_callbacks_, j_set_size_id_, width, height);
|
jni()->CallVoidMethod(*j_callbacks_, j_set_size_id_, width, height);
|
||||||
CHECK_EXCEPTION(jni());
|
CHECK_EXCEPTION(jni());
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void RenderFrame(const cricket::VideoFrame* frame) OVERRIDE {
|
void RenderFrame(const cricket::VideoFrame* frame) override {
|
||||||
ScopedLocalRefFrame local_ref_frame(jni());
|
ScopedLocalRefFrame local_ref_frame(jni());
|
||||||
if (frame->GetNativeHandle() != NULL) {
|
if (frame->GetNativeHandle() != NULL) {
|
||||||
jobject j_frame = CricketToJavaTextureFrame(frame);
|
jobject j_frame = CricketToJavaTextureFrame(frame);
|
||||||
|
@ -42,19 +42,19 @@ class MediaStream : public Notifier<MediaStreamInterface> {
|
|||||||
public:
|
public:
|
||||||
static rtc::scoped_refptr<MediaStream> Create(const std::string& label);
|
static rtc::scoped_refptr<MediaStream> Create(const std::string& label);
|
||||||
|
|
||||||
virtual std::string label() const OVERRIDE { return label_; }
|
std::string label() const override { return label_; }
|
||||||
|
|
||||||
virtual bool AddTrack(AudioTrackInterface* track) OVERRIDE;
|
bool AddTrack(AudioTrackInterface* track) override;
|
||||||
virtual bool AddTrack(VideoTrackInterface* track) OVERRIDE;
|
bool AddTrack(VideoTrackInterface* track) override;
|
||||||
virtual bool RemoveTrack(AudioTrackInterface* track) OVERRIDE;
|
bool RemoveTrack(AudioTrackInterface* track) override;
|
||||||
virtual bool RemoveTrack(VideoTrackInterface* track) OVERRIDE;
|
bool RemoveTrack(VideoTrackInterface* track) override;
|
||||||
virtual rtc::scoped_refptr<AudioTrackInterface>
|
virtual rtc::scoped_refptr<AudioTrackInterface>
|
||||||
FindAudioTrack(const std::string& track_id);
|
FindAudioTrack(const std::string& track_id);
|
||||||
virtual rtc::scoped_refptr<VideoTrackInterface>
|
virtual rtc::scoped_refptr<VideoTrackInterface>
|
||||||
FindVideoTrack(const std::string& track_id);
|
FindVideoTrack(const std::string& track_id);
|
||||||
|
|
||||||
virtual AudioTrackVector GetAudioTracks() OVERRIDE { return audio_tracks_; }
|
AudioTrackVector GetAudioTracks() override { return audio_tracks_; }
|
||||||
virtual VideoTrackVector GetVideoTracks() OVERRIDE { return video_tracks_; }
|
VideoTrackVector GetVideoTracks() override { return video_tracks_; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
explicit MediaStream(const std::string& label);
|
explicit MediaStream(const std::string& label);
|
||||||
|
@ -78,12 +78,14 @@ class LocalAudioSinkAdapter : public AudioTrackSinkInterface,
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
// AudioSinkInterface implementation.
|
// AudioSinkInterface implementation.
|
||||||
virtual void OnData(const void* audio_data, int bits_per_sample,
|
void OnData(const void* audio_data,
|
||||||
int sample_rate, int number_of_channels,
|
int bits_per_sample,
|
||||||
int number_of_frames) OVERRIDE;
|
int sample_rate,
|
||||||
|
int number_of_channels,
|
||||||
|
int number_of_frames) override;
|
||||||
|
|
||||||
// cricket::AudioRenderer implementation.
|
// cricket::AudioRenderer implementation.
|
||||||
virtual void SetSink(cricket::AudioRenderer::Sink* sink) OVERRIDE;
|
void SetSink(cricket::AudioRenderer::Sink* sink) override;
|
||||||
|
|
||||||
cricket::AudioRenderer::Sink* sink_;
|
cricket::AudioRenderer::Sink* sink_;
|
||||||
// Critical section protecting |sink_|.
|
// Critical section protecting |sink_|.
|
||||||
@ -100,11 +102,11 @@ class LocalAudioTrackHandler : public TrackHandler {
|
|||||||
AudioProviderInterface* provider);
|
AudioProviderInterface* provider);
|
||||||
virtual ~LocalAudioTrackHandler();
|
virtual ~LocalAudioTrackHandler();
|
||||||
|
|
||||||
virtual void Stop() OVERRIDE;
|
void Stop() override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void OnStateChanged() OVERRIDE;
|
void OnStateChanged() override;
|
||||||
virtual void OnEnabledChanged() OVERRIDE;
|
void OnEnabledChanged() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
AudioTrackInterface* audio_track_;
|
AudioTrackInterface* audio_track_;
|
||||||
@ -125,15 +127,15 @@ class RemoteAudioTrackHandler : public AudioSourceInterface::AudioObserver,
|
|||||||
uint32 ssrc,
|
uint32 ssrc,
|
||||||
AudioProviderInterface* provider);
|
AudioProviderInterface* provider);
|
||||||
virtual ~RemoteAudioTrackHandler();
|
virtual ~RemoteAudioTrackHandler();
|
||||||
virtual void Stop() OVERRIDE;
|
void Stop() override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void OnStateChanged() OVERRIDE;
|
void OnStateChanged() override;
|
||||||
virtual void OnEnabledChanged() OVERRIDE;
|
void OnEnabledChanged() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// AudioSourceInterface::AudioObserver implementation.
|
// AudioSourceInterface::AudioObserver implementation.
|
||||||
virtual void OnSetVolume(double volume) OVERRIDE;
|
void OnSetVolume(double volume) override;
|
||||||
|
|
||||||
AudioTrackInterface* audio_track_;
|
AudioTrackInterface* audio_track_;
|
||||||
AudioProviderInterface* provider_;
|
AudioProviderInterface* provider_;
|
||||||
@ -148,11 +150,11 @@ class LocalVideoTrackHandler : public TrackHandler {
|
|||||||
uint32 ssrc,
|
uint32 ssrc,
|
||||||
VideoProviderInterface* provider);
|
VideoProviderInterface* provider);
|
||||||
virtual ~LocalVideoTrackHandler();
|
virtual ~LocalVideoTrackHandler();
|
||||||
virtual void Stop() OVERRIDE;
|
void Stop() override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void OnStateChanged() OVERRIDE;
|
void OnStateChanged() override;
|
||||||
virtual void OnEnabledChanged() OVERRIDE;
|
void OnEnabledChanged() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
VideoTrackInterface* local_video_track_;
|
VideoTrackInterface* local_video_track_;
|
||||||
@ -168,11 +170,11 @@ class RemoteVideoTrackHandler : public TrackHandler {
|
|||||||
uint32 ssrc,
|
uint32 ssrc,
|
||||||
VideoProviderInterface* provider);
|
VideoProviderInterface* provider);
|
||||||
virtual ~RemoteVideoTrackHandler();
|
virtual ~RemoteVideoTrackHandler();
|
||||||
virtual void Stop() OVERRIDE;
|
void Stop() override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void OnStateChanged() OVERRIDE;
|
void OnStateChanged() override;
|
||||||
virtual void OnEnabledChanged() OVERRIDE;
|
void OnEnabledChanged() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
VideoTrackInterface* remote_video_track_;
|
VideoTrackInterface* remote_video_track_;
|
||||||
@ -192,7 +194,7 @@ class MediaStreamHandler : public ObserverInterface {
|
|||||||
virtual void AddVideoTrack(VideoTrackInterface* video_track, uint32 ssrc) = 0;
|
virtual void AddVideoTrack(VideoTrackInterface* video_track, uint32 ssrc) = 0;
|
||||||
|
|
||||||
virtual void RemoveTrack(MediaStreamTrackInterface* track);
|
virtual void RemoveTrack(MediaStreamTrackInterface* track);
|
||||||
virtual void OnChanged() OVERRIDE;
|
void OnChanged() override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
TrackHandler* FindTrackHandler(MediaStreamTrackInterface* track);
|
TrackHandler* FindTrackHandler(MediaStreamTrackInterface* track);
|
||||||
@ -210,10 +212,8 @@ class LocalMediaStreamHandler : public MediaStreamHandler {
|
|||||||
VideoProviderInterface* video_provider);
|
VideoProviderInterface* video_provider);
|
||||||
~LocalMediaStreamHandler();
|
~LocalMediaStreamHandler();
|
||||||
|
|
||||||
virtual void AddAudioTrack(AudioTrackInterface* audio_track,
|
void AddAudioTrack(AudioTrackInterface* audio_track, uint32 ssrc) override;
|
||||||
uint32 ssrc) OVERRIDE;
|
void AddVideoTrack(VideoTrackInterface* video_track, uint32 ssrc) override;
|
||||||
virtual void AddVideoTrack(VideoTrackInterface* video_track,
|
|
||||||
uint32 ssrc) OVERRIDE;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class RemoteMediaStreamHandler : public MediaStreamHandler {
|
class RemoteMediaStreamHandler : public MediaStreamHandler {
|
||||||
@ -222,10 +222,8 @@ class RemoteMediaStreamHandler : public MediaStreamHandler {
|
|||||||
AudioProviderInterface* audio_provider,
|
AudioProviderInterface* audio_provider,
|
||||||
VideoProviderInterface* video_provider);
|
VideoProviderInterface* video_provider);
|
||||||
~RemoteMediaStreamHandler();
|
~RemoteMediaStreamHandler();
|
||||||
virtual void AddAudioTrack(AudioTrackInterface* audio_track,
|
void AddAudioTrack(AudioTrackInterface* audio_track, uint32 ssrc) override;
|
||||||
uint32 ssrc) OVERRIDE;
|
void AddVideoTrack(VideoTrackInterface* video_track, uint32 ssrc) override;
|
||||||
virtual void AddVideoTrack(VideoTrackInterface* video_track,
|
|
||||||
uint32 ssrc) OVERRIDE;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// Container for MediaStreamHandlers of currently known local and remote
|
// Container for MediaStreamHandlers of currently known local and remote
|
||||||
|
@ -39,11 +39,11 @@ class RTCDataChannelObserver : public DataChannelObserver {
|
|||||||
public:
|
public:
|
||||||
RTCDataChannelObserver(RTCDataChannel* channel) { _channel = channel; }
|
RTCDataChannelObserver(RTCDataChannel* channel) { _channel = channel; }
|
||||||
|
|
||||||
virtual void OnStateChange() OVERRIDE {
|
void OnStateChange() override {
|
||||||
[_channel.delegate channelDidChangeState:_channel];
|
[_channel.delegate channelDidChangeState:_channel];
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void OnMessage(const DataBuffer& buffer) OVERRIDE {
|
void OnMessage(const DataBuffer& buffer) override {
|
||||||
if (!_channel.delegate) {
|
if (!_channel.delegate) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -38,7 +38,7 @@ class RTCMediaStreamTrackObserver : public ObserverInterface {
|
|||||||
public:
|
public:
|
||||||
RTCMediaStreamTrackObserver(RTCMediaStreamTrack* track) { _track = track; }
|
RTCMediaStreamTrackObserver(RTCMediaStreamTrack* track) { _track = track; }
|
||||||
|
|
||||||
virtual void OnChanged() OVERRIDE {
|
void OnChanged() override {
|
||||||
[_track.delegate mediaStreamTrackDidChange:_track];
|
[_track.delegate mediaStreamTrackDidChange:_track];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -62,7 +62,7 @@ class RTCCreateSessionDescriptionObserver
|
|||||||
_peerConnection = peerConnection;
|
_peerConnection = peerConnection;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void OnSuccess(SessionDescriptionInterface* desc) OVERRIDE {
|
void OnSuccess(SessionDescriptionInterface* desc) override {
|
||||||
RTCSessionDescription* session =
|
RTCSessionDescription* session =
|
||||||
[[RTCSessionDescription alloc] initWithSessionDescription:desc];
|
[[RTCSessionDescription alloc] initWithSessionDescription:desc];
|
||||||
[_delegate peerConnection:_peerConnection
|
[_delegate peerConnection:_peerConnection
|
||||||
@ -71,7 +71,7 @@ class RTCCreateSessionDescriptionObserver
|
|||||||
delete desc;
|
delete desc;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void OnFailure(const std::string& error) OVERRIDE {
|
void OnFailure(const std::string& error) override {
|
||||||
NSString* str = @(error.c_str());
|
NSString* str = @(error.c_str());
|
||||||
NSError* err =
|
NSError* err =
|
||||||
[NSError errorWithDomain:kRTCSessionDescriptionDelegateErrorDomain
|
[NSError errorWithDomain:kRTCSessionDescriptionDelegateErrorDomain
|
||||||
@ -95,12 +95,12 @@ class RTCSetSessionDescriptionObserver : public SetSessionDescriptionObserver {
|
|||||||
_peerConnection = peerConnection;
|
_peerConnection = peerConnection;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void OnSuccess() OVERRIDE {
|
void OnSuccess() override {
|
||||||
[_delegate peerConnection:_peerConnection
|
[_delegate peerConnection:_peerConnection
|
||||||
didSetSessionDescriptionWithError:nil];
|
didSetSessionDescriptionWithError:nil];
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void OnFailure(const std::string& error) OVERRIDE {
|
void OnFailure(const std::string& error) override {
|
||||||
NSString* str = @(error.c_str());
|
NSString* str = @(error.c_str());
|
||||||
NSError* err =
|
NSError* err =
|
||||||
[NSError errorWithDomain:kRTCSessionDescriptionDelegateErrorDomain
|
[NSError errorWithDomain:kRTCSessionDescriptionDelegateErrorDomain
|
||||||
@ -123,7 +123,7 @@ class RTCStatsObserver : public StatsObserver {
|
|||||||
_peerConnection = peerConnection;
|
_peerConnection = peerConnection;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void OnComplete(const StatsReports& reports) OVERRIDE {
|
void OnComplete(const StatsReports& reports) override {
|
||||||
NSMutableArray* stats = [NSMutableArray arrayWithCapacity:reports.size()];
|
NSMutableArray* stats = [NSMutableArray arrayWithCapacity:reports.size()];
|
||||||
for (const auto* report : reports) {
|
for (const auto* report : reports) {
|
||||||
RTCStatsReport* statsReport =
|
RTCStatsReport* statsReport =
|
||||||
|
@ -42,31 +42,31 @@ class RTCPeerConnectionObserver : public PeerConnectionObserver {
|
|||||||
virtual ~RTCPeerConnectionObserver();
|
virtual ~RTCPeerConnectionObserver();
|
||||||
|
|
||||||
// Triggered when the SignalingState changed.
|
// Triggered when the SignalingState changed.
|
||||||
virtual void OnSignalingChange(
|
void OnSignalingChange(
|
||||||
PeerConnectionInterface::SignalingState new_state) OVERRIDE;
|
PeerConnectionInterface::SignalingState new_state) override;
|
||||||
|
|
||||||
// Triggered when media is received on a new stream from remote peer.
|
// Triggered when media is received on a new stream from remote peer.
|
||||||
virtual void OnAddStream(MediaStreamInterface* stream) OVERRIDE;
|
void OnAddStream(MediaStreamInterface* stream) override;
|
||||||
|
|
||||||
// Triggered when a remote peer close a stream.
|
// Triggered when a remote peer close a stream.
|
||||||
virtual void OnRemoveStream(MediaStreamInterface* stream) OVERRIDE;
|
void OnRemoveStream(MediaStreamInterface* stream) override;
|
||||||
|
|
||||||
// Triggered when a remote peer open a data channel.
|
// Triggered when a remote peer open a data channel.
|
||||||
virtual void OnDataChannel(DataChannelInterface* data_channel) OVERRIDE;
|
void OnDataChannel(DataChannelInterface* data_channel) override;
|
||||||
|
|
||||||
// Triggered when renegotiation is needed, for example the ICE has restarted.
|
// Triggered when renegotiation is needed, for example the ICE has restarted.
|
||||||
virtual void OnRenegotiationNeeded() OVERRIDE;
|
void OnRenegotiationNeeded() override;
|
||||||
|
|
||||||
// Called any time the ICEConnectionState changes
|
// Called any time the ICEConnectionState changes
|
||||||
virtual void OnIceConnectionChange(
|
void OnIceConnectionChange(
|
||||||
PeerConnectionInterface::IceConnectionState new_state) OVERRIDE;
|
PeerConnectionInterface::IceConnectionState new_state) override;
|
||||||
|
|
||||||
// Called any time the ICEGatheringState changes
|
// Called any time the ICEGatheringState changes
|
||||||
virtual void OnIceGatheringChange(
|
void OnIceGatheringChange(
|
||||||
PeerConnectionInterface::IceGatheringState new_state) OVERRIDE;
|
PeerConnectionInterface::IceGatheringState new_state) override;
|
||||||
|
|
||||||
// New Ice candidate have been found.
|
// New Ice candidate have been found.
|
||||||
virtual void OnIceCandidate(const IceCandidateInterface* candidate) OVERRIDE;
|
void OnIceCandidate(const IceCandidateInterface* candidate) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
__weak RTCPeerConnection* _peerConnection;
|
__weak RTCPeerConnection* _peerConnection;
|
||||||
|
@ -40,11 +40,11 @@ class RTCVideoRendererNativeAdapter : public VideoRendererInterface {
|
|||||||
_adapter = adapter;
|
_adapter = adapter;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void SetSize(int width, int height) OVERRIDE {
|
void SetSize(int width, int height) override {
|
||||||
[_adapter.videoRenderer setSize:CGSizeMake(width, height)];
|
[_adapter.videoRenderer setSize:CGSizeMake(width, height)];
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void RenderFrame(const cricket::VideoFrame* frame) OVERRIDE {
|
void RenderFrame(const cricket::VideoFrame* frame) override {
|
||||||
RTCI420Frame* i420Frame = [[RTCI420Frame alloc] initWithVideoFrame:frame];
|
RTCI420Frame* i420Frame = [[RTCI420Frame alloc] initWithVideoFrame:frame];
|
||||||
[_adapter.videoRenderer renderFrame:i420Frame];
|
[_adapter.videoRenderer renderFrame:i420Frame];
|
||||||
}
|
}
|
||||||
|
@ -118,34 +118,30 @@ class PeerConnection : public PeerConnectionInterface,
|
|||||||
virtual void OnMessage(rtc::Message* msg);
|
virtual void OnMessage(rtc::Message* msg);
|
||||||
|
|
||||||
// Implements MediaStreamSignalingObserver.
|
// Implements MediaStreamSignalingObserver.
|
||||||
virtual void OnAddRemoteStream(MediaStreamInterface* stream) OVERRIDE;
|
void OnAddRemoteStream(MediaStreamInterface* stream) override;
|
||||||
virtual void OnRemoveRemoteStream(MediaStreamInterface* stream) OVERRIDE;
|
void OnRemoveRemoteStream(MediaStreamInterface* stream) override;
|
||||||
virtual void OnAddDataChannel(DataChannelInterface* data_channel) OVERRIDE;
|
void OnAddDataChannel(DataChannelInterface* data_channel) override;
|
||||||
virtual void OnAddRemoteAudioTrack(MediaStreamInterface* stream,
|
void OnAddRemoteAudioTrack(MediaStreamInterface* stream,
|
||||||
AudioTrackInterface* audio_track,
|
AudioTrackInterface* audio_track,
|
||||||
uint32 ssrc) OVERRIDE;
|
uint32 ssrc) override;
|
||||||
virtual void OnAddRemoteVideoTrack(MediaStreamInterface* stream,
|
void OnAddRemoteVideoTrack(MediaStreamInterface* stream,
|
||||||
VideoTrackInterface* video_track,
|
VideoTrackInterface* video_track,
|
||||||
uint32 ssrc) OVERRIDE;
|
uint32 ssrc) override;
|
||||||
virtual void OnRemoveRemoteAudioTrack(
|
void OnRemoveRemoteAudioTrack(MediaStreamInterface* stream,
|
||||||
MediaStreamInterface* stream,
|
AudioTrackInterface* audio_track) override;
|
||||||
AudioTrackInterface* audio_track) OVERRIDE;
|
void OnRemoveRemoteVideoTrack(MediaStreamInterface* stream,
|
||||||
virtual void OnRemoveRemoteVideoTrack(
|
VideoTrackInterface* video_track) override;
|
||||||
MediaStreamInterface* stream,
|
void OnAddLocalAudioTrack(MediaStreamInterface* stream,
|
||||||
VideoTrackInterface* video_track) OVERRIDE;
|
|
||||||
virtual void OnAddLocalAudioTrack(MediaStreamInterface* stream,
|
|
||||||
AudioTrackInterface* audio_track,
|
AudioTrackInterface* audio_track,
|
||||||
uint32 ssrc) OVERRIDE;
|
uint32 ssrc) override;
|
||||||
virtual void OnAddLocalVideoTrack(MediaStreamInterface* stream,
|
void OnAddLocalVideoTrack(MediaStreamInterface* stream,
|
||||||
VideoTrackInterface* video_track,
|
VideoTrackInterface* video_track,
|
||||||
uint32 ssrc) OVERRIDE;
|
uint32 ssrc) override;
|
||||||
virtual void OnRemoveLocalAudioTrack(
|
void OnRemoveLocalAudioTrack(MediaStreamInterface* stream,
|
||||||
MediaStreamInterface* stream,
|
|
||||||
AudioTrackInterface* audio_track,
|
AudioTrackInterface* audio_track,
|
||||||
uint32 ssrc) OVERRIDE;
|
uint32 ssrc) override;
|
||||||
virtual void OnRemoveLocalVideoTrack(
|
void OnRemoveLocalVideoTrack(MediaStreamInterface* stream,
|
||||||
MediaStreamInterface* stream,
|
VideoTrackInterface* video_track) override;
|
||||||
VideoTrackInterface* video_track) OVERRIDE;
|
|
||||||
virtual void OnRemoveLocalStream(MediaStreamInterface* stream);
|
virtual void OnRemoveLocalStream(MediaStreamInterface* stream);
|
||||||
|
|
||||||
// Implements IceObserver
|
// Implements IceObserver
|
||||||
|
@ -313,71 +313,69 @@ class MethodCall5 : public rtc::Message,
|
|||||||
};
|
};
|
||||||
|
|
||||||
#define BEGIN_PROXY_MAP(c) \
|
#define BEGIN_PROXY_MAP(c) \
|
||||||
class c##Proxy : public c##Interface {\
|
class c##Proxy : public c##Interface { \
|
||||||
protected:\
|
protected: \
|
||||||
typedef c##Interface C;\
|
typedef c##Interface C; \
|
||||||
c##Proxy(rtc::Thread* thread, C* c)\
|
c##Proxy(rtc::Thread* thread, C* c) : owner_thread_(thread), c_(c) {} \
|
||||||
: owner_thread_(thread), \
|
~c##Proxy() { \
|
||||||
c_(c) {}\
|
MethodCall0<c##Proxy, void> call(this, &c##Proxy::Release_s); \
|
||||||
~c##Proxy() {\
|
call.Marshal(owner_thread_); \
|
||||||
MethodCall0<c##Proxy, void> call(this, &c##Proxy::Release_s);\
|
} \
|
||||||
call.Marshal(owner_thread_);\
|
\
|
||||||
}\
|
public: \
|
||||||
public:\
|
static rtc::scoped_refptr<C> Create(rtc::Thread* thread, C* c) { \
|
||||||
static rtc::scoped_refptr<C> Create(rtc::Thread* thread, \
|
return new rtc::RefCountedObject<c##Proxy>(thread, c); \
|
||||||
C* c) {\
|
}
|
||||||
return new rtc::RefCountedObject<c##Proxy>(thread, c);\
|
|
||||||
}\
|
|
||||||
|
|
||||||
#define PROXY_METHOD0(r, method)\
|
#define PROXY_METHOD0(r, method) \
|
||||||
r method() OVERRIDE {\
|
r method() override { \
|
||||||
MethodCall0<C, r> call(c_.get(), &C::method);\
|
MethodCall0<C, r> call(c_.get(), &C::method); \
|
||||||
return call.Marshal(owner_thread_);\
|
return call.Marshal(owner_thread_); \
|
||||||
}\
|
}
|
||||||
|
|
||||||
#define PROXY_CONSTMETHOD0(r, method)\
|
#define PROXY_CONSTMETHOD0(r, method) \
|
||||||
r method() const OVERRIDE {\
|
r method() const override { \
|
||||||
ConstMethodCall0<C, r> call(c_.get(), &C::method);\
|
ConstMethodCall0<C, r> call(c_.get(), &C::method); \
|
||||||
return call.Marshal(owner_thread_);\
|
return call.Marshal(owner_thread_); \
|
||||||
}\
|
}
|
||||||
|
|
||||||
#define PROXY_METHOD1(r, method, t1)\
|
#define PROXY_METHOD1(r, method, t1) \
|
||||||
r method(t1 a1) OVERRIDE {\
|
r method(t1 a1) override { \
|
||||||
MethodCall1<C, r, t1> call(c_.get(), &C::method, a1);\
|
MethodCall1<C, r, t1> call(c_.get(), &C::method, a1); \
|
||||||
return call.Marshal(owner_thread_);\
|
return call.Marshal(owner_thread_); \
|
||||||
}\
|
}
|
||||||
|
|
||||||
#define PROXY_CONSTMETHOD1(r, method, t1)\
|
#define PROXY_CONSTMETHOD1(r, method, t1) \
|
||||||
r method(t1 a1) const OVERRIDE {\
|
r method(t1 a1) const override { \
|
||||||
ConstMethodCall1<C, r, t1> call(c_.get(), &C::method, a1);\
|
ConstMethodCall1<C, r, t1> call(c_.get(), &C::method, a1); \
|
||||||
return call.Marshal(owner_thread_);\
|
return call.Marshal(owner_thread_); \
|
||||||
}\
|
}
|
||||||
|
|
||||||
#define PROXY_METHOD2(r, method, t1, t2)\
|
#define PROXY_METHOD2(r, method, t1, t2) \
|
||||||
r method(t1 a1, t2 a2) OVERRIDE {\
|
r method(t1 a1, t2 a2) override { \
|
||||||
MethodCall2<C, r, t1, t2> call(c_.get(), &C::method, a1, a2);\
|
MethodCall2<C, r, t1, t2> call(c_.get(), &C::method, a1, a2); \
|
||||||
return call.Marshal(owner_thread_);\
|
return call.Marshal(owner_thread_); \
|
||||||
}\
|
}
|
||||||
|
|
||||||
#define PROXY_METHOD3(r, method, t1, t2, t3)\
|
#define PROXY_METHOD3(r, method, t1, t2, t3) \
|
||||||
r method(t1 a1, t2 a2, t3 a3) OVERRIDE {\
|
r method(t1 a1, t2 a2, t3 a3) override { \
|
||||||
MethodCall3<C, r, t1, t2, t3> call(c_.get(), &C::method, a1, a2, a3);\
|
MethodCall3<C, r, t1, t2, t3> call(c_.get(), &C::method, a1, a2, a3); \
|
||||||
return call.Marshal(owner_thread_);\
|
return call.Marshal(owner_thread_); \
|
||||||
}\
|
}
|
||||||
|
|
||||||
#define PROXY_METHOD4(r, method, t1, t2, t3, t4)\
|
#define PROXY_METHOD4(r, method, t1, t2, t3, t4) \
|
||||||
r method(t1 a1, t2 a2, t3 a3, t4 a4) OVERRIDE {\
|
r method(t1 a1, t2 a2, t3 a3, t4 a4) override { \
|
||||||
MethodCall4<C, r, t1, t2, t3, t4> call(\
|
MethodCall4<C, r, t1, t2, t3, t4> call(c_.get(), &C::method, a1, a2, a3, \
|
||||||
c_.get(), &C::method, a1, a2, a3, a4);\
|
a4); \
|
||||||
return call.Marshal(owner_thread_);\
|
return call.Marshal(owner_thread_); \
|
||||||
}\
|
}
|
||||||
|
|
||||||
#define PROXY_METHOD5(r, method, t1, t2, t3, t4, t5)\
|
#define PROXY_METHOD5(r, method, t1, t2, t3, t4, t5) \
|
||||||
r method(t1 a1, t2 a2, t3 a3, t4 a4, t5 a5) OVERRIDE {\
|
r method(t1 a1, t2 a2, t3 a3, t4 a4, t5 a5) override { \
|
||||||
MethodCall5<C, r, t1, t2, t3, t4, t5> call(\
|
MethodCall5<C, r, t1, t2, t3, t4, t5> call(c_.get(), &C::method, a1, a2, \
|
||||||
c_.get(), &C::method, a1, a2, a3, a4, a5);\
|
a3, a4, a5); \
|
||||||
return call.Marshal(owner_thread_);\
|
return call.Marshal(owner_thread_); \
|
||||||
}\
|
}
|
||||||
|
|
||||||
#define END_PROXY() \
|
#define END_PROXY() \
|
||||||
private:\
|
private:\
|
||||||
|
@ -51,12 +51,12 @@ class RemoteAudioSource : public Notifier<AudioSourceInterface> {
|
|||||||
typedef std::list<AudioObserver*> AudioObserverList;
|
typedef std::list<AudioObserver*> AudioObserverList;
|
||||||
|
|
||||||
// MediaSourceInterface implementation.
|
// MediaSourceInterface implementation.
|
||||||
virtual MediaSourceInterface::SourceState state() const OVERRIDE;
|
MediaSourceInterface::SourceState state() const override;
|
||||||
|
|
||||||
// AudioSourceInterface implementation.
|
// AudioSourceInterface implementation.
|
||||||
virtual void SetVolume(double volume) OVERRIDE;
|
void SetVolume(double volume) override;
|
||||||
virtual void RegisterAudioObserver(AudioObserver* observer) OVERRIDE;
|
void RegisterAudioObserver(AudioObserver* observer) override;
|
||||||
virtual void UnregisterAudioObserver(AudioObserver* observer) OVERRIDE;
|
void UnregisterAudioObserver(AudioObserver* observer) override;
|
||||||
|
|
||||||
AudioObserverList audio_observers_;
|
AudioObserverList audio_observers_;
|
||||||
};
|
};
|
||||||
|
@ -47,14 +47,14 @@ class RemoteVideoCapturer : public cricket::VideoCapturer {
|
|||||||
virtual ~RemoteVideoCapturer();
|
virtual ~RemoteVideoCapturer();
|
||||||
|
|
||||||
// cricket::VideoCapturer implementation.
|
// cricket::VideoCapturer implementation.
|
||||||
virtual cricket::CaptureState Start(
|
cricket::CaptureState Start(
|
||||||
const cricket::VideoFormat& capture_format) OVERRIDE;
|
const cricket::VideoFormat& capture_format) override;
|
||||||
virtual void Stop() OVERRIDE;
|
void Stop() override;
|
||||||
virtual bool IsRunning() OVERRIDE;
|
bool IsRunning() override;
|
||||||
virtual bool GetPreferredFourccs(std::vector<uint32>* fourccs) OVERRIDE;
|
bool GetPreferredFourccs(std::vector<uint32>* fourccs) override;
|
||||||
virtual bool GetBestCaptureFormat(const cricket::VideoFormat& desired,
|
bool GetBestCaptureFormat(const cricket::VideoFormat& desired,
|
||||||
cricket::VideoFormat* best_format) OVERRIDE;
|
cricket::VideoFormat* best_format) override;
|
||||||
virtual bool IsScreencast() const OVERRIDE;
|
bool IsScreencast() const override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
DISALLOW_COPY_AND_ASSIGN(RemoteVideoCapturer);
|
DISALLOW_COPY_AND_ASSIGN(RemoteVideoCapturer);
|
||||||
|
@ -113,8 +113,7 @@ class FakeAudioProcessor : public webrtc::AudioProcessorInterface {
|
|||||||
~FakeAudioProcessor() {}
|
~FakeAudioProcessor() {}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
virtual void GetStats(
|
void GetStats(AudioProcessorInterface::AudioProcessorStats* stats) override {
|
||||||
AudioProcessorInterface::AudioProcessorStats* stats) OVERRIDE {
|
|
||||||
stats->typing_noise_detected = true;
|
stats->typing_noise_detected = true;
|
||||||
stats->echo_return_loss = 2;
|
stats->echo_return_loss = 2;
|
||||||
stats->echo_return_loss_enhancement = 3;
|
stats->echo_return_loss_enhancement = 3;
|
||||||
@ -130,20 +129,16 @@ class FakeAudioTrack
|
|||||||
explicit FakeAudioTrack(const std::string& id)
|
explicit FakeAudioTrack(const std::string& id)
|
||||||
: webrtc::MediaStreamTrack<webrtc::AudioTrackInterface>(id),
|
: webrtc::MediaStreamTrack<webrtc::AudioTrackInterface>(id),
|
||||||
processor_(new rtc::RefCountedObject<FakeAudioProcessor>()) {}
|
processor_(new rtc::RefCountedObject<FakeAudioProcessor>()) {}
|
||||||
std::string kind() const OVERRIDE {
|
std::string kind() const override { return "audio"; }
|
||||||
return "audio";
|
webrtc::AudioSourceInterface* GetSource() const override { return NULL; }
|
||||||
}
|
void AddSink(webrtc::AudioTrackSinkInterface* sink) override {}
|
||||||
virtual webrtc::AudioSourceInterface* GetSource() const OVERRIDE {
|
void RemoveSink(webrtc::AudioTrackSinkInterface* sink) override {}
|
||||||
return NULL;
|
bool GetSignalLevel(int* level) override {
|
||||||
}
|
|
||||||
virtual void AddSink(webrtc::AudioTrackSinkInterface* sink) OVERRIDE {}
|
|
||||||
virtual void RemoveSink(webrtc::AudioTrackSinkInterface* sink) OVERRIDE {}
|
|
||||||
virtual bool GetSignalLevel(int* level) OVERRIDE {
|
|
||||||
*level = 1;
|
*level = 1;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
virtual rtc::scoped_refptr<webrtc::AudioProcessorInterface>
|
rtc::scoped_refptr<webrtc::AudioProcessorInterface> GetAudioProcessor()
|
||||||
GetAudioProcessor() OVERRIDE {
|
override {
|
||||||
return processor_;
|
return processor_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -76,133 +76,129 @@ class FakeAudioCaptureModule
|
|||||||
// Only functions called by PeerConnection are implemented, the rest do
|
// Only functions called by PeerConnection are implemented, the rest do
|
||||||
// nothing and return success. If a function is not expected to be called by
|
// nothing and return success. If a function is not expected to be called by
|
||||||
// PeerConnection an assertion is triggered if it is in fact called.
|
// PeerConnection an assertion is triggered if it is in fact called.
|
||||||
virtual int64_t TimeUntilNextProcess() OVERRIDE;
|
int64_t TimeUntilNextProcess() override;
|
||||||
virtual int32_t Process() OVERRIDE;
|
int32_t Process() override;
|
||||||
|
|
||||||
virtual int32_t ActiveAudioLayer(AudioLayer* audio_layer) const OVERRIDE;
|
int32_t ActiveAudioLayer(AudioLayer* audio_layer) const override;
|
||||||
|
|
||||||
virtual ErrorCode LastError() const OVERRIDE;
|
ErrorCode LastError() const override;
|
||||||
virtual int32_t RegisterEventObserver(
|
int32_t RegisterEventObserver(
|
||||||
webrtc::AudioDeviceObserver* event_callback) OVERRIDE;
|
webrtc::AudioDeviceObserver* event_callback) override;
|
||||||
|
|
||||||
// Note: Calling this method from a callback may result in deadlock.
|
// Note: Calling this method from a callback may result in deadlock.
|
||||||
virtual int32_t RegisterAudioCallback(
|
int32_t RegisterAudioCallback(
|
||||||
webrtc::AudioTransport* audio_callback) OVERRIDE;
|
webrtc::AudioTransport* audio_callback) override;
|
||||||
|
|
||||||
virtual int32_t Init() OVERRIDE;
|
int32_t Init() override;
|
||||||
virtual int32_t Terminate() OVERRIDE;
|
int32_t Terminate() override;
|
||||||
virtual bool Initialized() const OVERRIDE;
|
bool Initialized() const override;
|
||||||
|
|
||||||
virtual int16_t PlayoutDevices() OVERRIDE;
|
int16_t PlayoutDevices() override;
|
||||||
virtual int16_t RecordingDevices() OVERRIDE;
|
int16_t RecordingDevices() override;
|
||||||
virtual int32_t PlayoutDeviceName(
|
int32_t PlayoutDeviceName(uint16_t index,
|
||||||
uint16_t index,
|
|
||||||
char name[webrtc::kAdmMaxDeviceNameSize],
|
char name[webrtc::kAdmMaxDeviceNameSize],
|
||||||
char guid[webrtc::kAdmMaxGuidSize]) OVERRIDE;
|
char guid[webrtc::kAdmMaxGuidSize]) override;
|
||||||
virtual int32_t RecordingDeviceName(
|
int32_t RecordingDeviceName(uint16_t index,
|
||||||
uint16_t index,
|
|
||||||
char name[webrtc::kAdmMaxDeviceNameSize],
|
char name[webrtc::kAdmMaxDeviceNameSize],
|
||||||
char guid[webrtc::kAdmMaxGuidSize]) OVERRIDE;
|
char guid[webrtc::kAdmMaxGuidSize]) override;
|
||||||
|
|
||||||
virtual int32_t SetPlayoutDevice(uint16_t index) OVERRIDE;
|
int32_t SetPlayoutDevice(uint16_t index) override;
|
||||||
virtual int32_t SetPlayoutDevice(WindowsDeviceType device) OVERRIDE;
|
int32_t SetPlayoutDevice(WindowsDeviceType device) override;
|
||||||
virtual int32_t SetRecordingDevice(uint16_t index) OVERRIDE;
|
int32_t SetRecordingDevice(uint16_t index) override;
|
||||||
virtual int32_t SetRecordingDevice(WindowsDeviceType device) OVERRIDE;
|
int32_t SetRecordingDevice(WindowsDeviceType device) override;
|
||||||
|
|
||||||
virtual int32_t PlayoutIsAvailable(bool* available) OVERRIDE;
|
int32_t PlayoutIsAvailable(bool* available) override;
|
||||||
virtual int32_t InitPlayout() OVERRIDE;
|
int32_t InitPlayout() override;
|
||||||
virtual bool PlayoutIsInitialized() const OVERRIDE;
|
bool PlayoutIsInitialized() const override;
|
||||||
virtual int32_t RecordingIsAvailable(bool* available) OVERRIDE;
|
int32_t RecordingIsAvailable(bool* available) override;
|
||||||
virtual int32_t InitRecording() OVERRIDE;
|
int32_t InitRecording() override;
|
||||||
virtual bool RecordingIsInitialized() const OVERRIDE;
|
bool RecordingIsInitialized() const override;
|
||||||
|
|
||||||
virtual int32_t StartPlayout() OVERRIDE;
|
int32_t StartPlayout() override;
|
||||||
virtual int32_t StopPlayout() OVERRIDE;
|
int32_t StopPlayout() override;
|
||||||
virtual bool Playing() const OVERRIDE;
|
bool Playing() const override;
|
||||||
virtual int32_t StartRecording() OVERRIDE;
|
int32_t StartRecording() override;
|
||||||
virtual int32_t StopRecording() OVERRIDE;
|
int32_t StopRecording() override;
|
||||||
virtual bool Recording() const OVERRIDE;
|
bool Recording() const override;
|
||||||
|
|
||||||
virtual int32_t SetAGC(bool enable) OVERRIDE;
|
int32_t SetAGC(bool enable) override;
|
||||||
virtual bool AGC() const OVERRIDE;
|
bool AGC() const override;
|
||||||
|
|
||||||
virtual int32_t SetWaveOutVolume(uint16_t volume_left,
|
int32_t SetWaveOutVolume(uint16_t volume_left,
|
||||||
uint16_t volume_right) OVERRIDE;
|
uint16_t volume_right) override;
|
||||||
virtual int32_t WaveOutVolume(uint16_t* volume_left,
|
int32_t WaveOutVolume(uint16_t* volume_left,
|
||||||
uint16_t* volume_right) const OVERRIDE;
|
uint16_t* volume_right) const override;
|
||||||
|
|
||||||
virtual int32_t InitSpeaker() OVERRIDE;
|
int32_t InitSpeaker() override;
|
||||||
virtual bool SpeakerIsInitialized() const OVERRIDE;
|
bool SpeakerIsInitialized() const override;
|
||||||
virtual int32_t InitMicrophone() OVERRIDE;
|
int32_t InitMicrophone() override;
|
||||||
virtual bool MicrophoneIsInitialized() const OVERRIDE;
|
bool MicrophoneIsInitialized() const override;
|
||||||
|
|
||||||
virtual int32_t SpeakerVolumeIsAvailable(bool* available) OVERRIDE;
|
int32_t SpeakerVolumeIsAvailable(bool* available) override;
|
||||||
virtual int32_t SetSpeakerVolume(uint32_t volume) OVERRIDE;
|
int32_t SetSpeakerVolume(uint32_t volume) override;
|
||||||
virtual int32_t SpeakerVolume(uint32_t* volume) const OVERRIDE;
|
int32_t SpeakerVolume(uint32_t* volume) const override;
|
||||||
virtual int32_t MaxSpeakerVolume(uint32_t* max_volume) const OVERRIDE;
|
int32_t MaxSpeakerVolume(uint32_t* max_volume) const override;
|
||||||
virtual int32_t MinSpeakerVolume(uint32_t* min_volume) const OVERRIDE;
|
int32_t MinSpeakerVolume(uint32_t* min_volume) const override;
|
||||||
virtual int32_t SpeakerVolumeStepSize(uint16_t* step_size) const OVERRIDE;
|
int32_t SpeakerVolumeStepSize(uint16_t* step_size) const override;
|
||||||
|
|
||||||
virtual int32_t MicrophoneVolumeIsAvailable(bool* available) OVERRIDE;
|
int32_t MicrophoneVolumeIsAvailable(bool* available) override;
|
||||||
virtual int32_t SetMicrophoneVolume(uint32_t volume) OVERRIDE;
|
int32_t SetMicrophoneVolume(uint32_t volume) override;
|
||||||
virtual int32_t MicrophoneVolume(uint32_t* volume) const OVERRIDE;
|
int32_t MicrophoneVolume(uint32_t* volume) const override;
|
||||||
virtual int32_t MaxMicrophoneVolume(uint32_t* max_volume) const OVERRIDE;
|
int32_t MaxMicrophoneVolume(uint32_t* max_volume) const override;
|
||||||
|
|
||||||
virtual int32_t MinMicrophoneVolume(uint32_t* min_volume) const OVERRIDE;
|
int32_t MinMicrophoneVolume(uint32_t* min_volume) const override;
|
||||||
virtual int32_t MicrophoneVolumeStepSize(uint16_t* step_size) const OVERRIDE;
|
int32_t MicrophoneVolumeStepSize(uint16_t* step_size) const override;
|
||||||
|
|
||||||
virtual int32_t SpeakerMuteIsAvailable(bool* available) OVERRIDE;
|
int32_t SpeakerMuteIsAvailable(bool* available) override;
|
||||||
virtual int32_t SetSpeakerMute(bool enable) OVERRIDE;
|
int32_t SetSpeakerMute(bool enable) override;
|
||||||
virtual int32_t SpeakerMute(bool* enabled) const OVERRIDE;
|
int32_t SpeakerMute(bool* enabled) const override;
|
||||||
|
|
||||||
virtual int32_t MicrophoneMuteIsAvailable(bool* available) OVERRIDE;
|
int32_t MicrophoneMuteIsAvailable(bool* available) override;
|
||||||
virtual int32_t SetMicrophoneMute(bool enable) OVERRIDE;
|
int32_t SetMicrophoneMute(bool enable) override;
|
||||||
virtual int32_t MicrophoneMute(bool* enabled) const OVERRIDE;
|
int32_t MicrophoneMute(bool* enabled) const override;
|
||||||
|
|
||||||
virtual int32_t MicrophoneBoostIsAvailable(bool* available) OVERRIDE;
|
int32_t MicrophoneBoostIsAvailable(bool* available) override;
|
||||||
virtual int32_t SetMicrophoneBoost(bool enable) OVERRIDE;
|
int32_t SetMicrophoneBoost(bool enable) override;
|
||||||
virtual int32_t MicrophoneBoost(bool* enabled) const OVERRIDE;
|
int32_t MicrophoneBoost(bool* enabled) const override;
|
||||||
|
|
||||||
virtual int32_t StereoPlayoutIsAvailable(bool* available) const OVERRIDE;
|
int32_t StereoPlayoutIsAvailable(bool* available) const override;
|
||||||
virtual int32_t SetStereoPlayout(bool enable) OVERRIDE;
|
int32_t SetStereoPlayout(bool enable) override;
|
||||||
virtual int32_t StereoPlayout(bool* enabled) const OVERRIDE;
|
int32_t StereoPlayout(bool* enabled) const override;
|
||||||
virtual int32_t StereoRecordingIsAvailable(bool* available) const OVERRIDE;
|
int32_t StereoRecordingIsAvailable(bool* available) const override;
|
||||||
virtual int32_t SetStereoRecording(bool enable) OVERRIDE;
|
int32_t SetStereoRecording(bool enable) override;
|
||||||
virtual int32_t StereoRecording(bool* enabled) const OVERRIDE;
|
int32_t StereoRecording(bool* enabled) const override;
|
||||||
virtual int32_t SetRecordingChannel(const ChannelType channel) OVERRIDE;
|
int32_t SetRecordingChannel(const ChannelType channel) override;
|
||||||
virtual int32_t RecordingChannel(ChannelType* channel) const OVERRIDE;
|
int32_t RecordingChannel(ChannelType* channel) const override;
|
||||||
|
|
||||||
virtual int32_t SetPlayoutBuffer(const BufferType type,
|
int32_t SetPlayoutBuffer(const BufferType type,
|
||||||
uint16_t size_ms = 0) OVERRIDE;
|
uint16_t size_ms = 0) override;
|
||||||
virtual int32_t PlayoutBuffer(BufferType* type,
|
int32_t PlayoutBuffer(BufferType* type, uint16_t* size_ms) const override;
|
||||||
uint16_t* size_ms) const OVERRIDE;
|
int32_t PlayoutDelay(uint16_t* delay_ms) const override;
|
||||||
virtual int32_t PlayoutDelay(uint16_t* delay_ms) const OVERRIDE;
|
int32_t RecordingDelay(uint16_t* delay_ms) const override;
|
||||||
virtual int32_t RecordingDelay(uint16_t* delay_ms) const OVERRIDE;
|
|
||||||
|
|
||||||
virtual int32_t CPULoad(uint16_t* load) const OVERRIDE;
|
int32_t CPULoad(uint16_t* load) const override;
|
||||||
|
|
||||||
virtual int32_t StartRawOutputFileRecording(
|
int32_t StartRawOutputFileRecording(
|
||||||
const char pcm_file_name_utf8[webrtc::kAdmMaxFileNameSize]) OVERRIDE;
|
const char pcm_file_name_utf8[webrtc::kAdmMaxFileNameSize]) override;
|
||||||
virtual int32_t StopRawOutputFileRecording() OVERRIDE;
|
int32_t StopRawOutputFileRecording() override;
|
||||||
virtual int32_t StartRawInputFileRecording(
|
int32_t StartRawInputFileRecording(
|
||||||
const char pcm_file_name_utf8[webrtc::kAdmMaxFileNameSize]) OVERRIDE;
|
const char pcm_file_name_utf8[webrtc::kAdmMaxFileNameSize]) override;
|
||||||
virtual int32_t StopRawInputFileRecording() OVERRIDE;
|
int32_t StopRawInputFileRecording() override;
|
||||||
|
|
||||||
virtual int32_t SetRecordingSampleRate(
|
int32_t SetRecordingSampleRate(const uint32_t samples_per_sec) override;
|
||||||
const uint32_t samples_per_sec) OVERRIDE;
|
int32_t RecordingSampleRate(uint32_t* samples_per_sec) const override;
|
||||||
virtual int32_t RecordingSampleRate(uint32_t* samples_per_sec) const OVERRIDE;
|
int32_t SetPlayoutSampleRate(const uint32_t samples_per_sec) override;
|
||||||
virtual int32_t SetPlayoutSampleRate(const uint32_t samples_per_sec) OVERRIDE;
|
int32_t PlayoutSampleRate(uint32_t* samples_per_sec) const override;
|
||||||
virtual int32_t PlayoutSampleRate(uint32_t* samples_per_sec) const OVERRIDE;
|
|
||||||
|
|
||||||
virtual int32_t ResetAudioDevice() OVERRIDE;
|
int32_t ResetAudioDevice() override;
|
||||||
virtual int32_t SetLoudspeakerStatus(bool enable) OVERRIDE;
|
int32_t SetLoudspeakerStatus(bool enable) override;
|
||||||
virtual int32_t GetLoudspeakerStatus(bool* enabled) const OVERRIDE;
|
int32_t GetLoudspeakerStatus(bool* enabled) const override;
|
||||||
virtual bool BuiltInAECIsAvailable() const { return false; }
|
virtual bool BuiltInAECIsAvailable() const { return false; }
|
||||||
virtual int32_t EnableBuiltInAEC(bool enable) { return -1; }
|
virtual int32_t EnableBuiltInAEC(bool enable) { return -1; }
|
||||||
// End of functions inherited from webrtc::AudioDeviceModule.
|
// End of functions inherited from webrtc::AudioDeviceModule.
|
||||||
|
|
||||||
// The following function is inherited from rtc::MessageHandler.
|
// The following function is inherited from rtc::MessageHandler.
|
||||||
virtual void OnMessage(rtc::Message* msg) OVERRIDE;
|
void OnMessage(rtc::Message* msg) override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// The constructor is protected because the class needs to be created as a
|
// The constructor is protected because the class needs to be created as a
|
||||||
|
@ -36,9 +36,9 @@ class FakeDataChannelProvider : public webrtc::DataChannelProviderInterface {
|
|||||||
transport_error_(false) {}
|
transport_error_(false) {}
|
||||||
virtual ~FakeDataChannelProvider() {}
|
virtual ~FakeDataChannelProvider() {}
|
||||||
|
|
||||||
virtual bool SendData(const cricket::SendDataParams& params,
|
bool SendData(const cricket::SendDataParams& params,
|
||||||
const rtc::Buffer& payload,
|
const rtc::Buffer& payload,
|
||||||
cricket::SendDataResult* result) OVERRIDE {
|
cricket::SendDataResult* result) override {
|
||||||
ASSERT(ready_to_send_ && transport_available_);
|
ASSERT(ready_to_send_ && transport_available_);
|
||||||
if (send_blocked_) {
|
if (send_blocked_) {
|
||||||
*result = cricket::SDR_BLOCK;
|
*result = cricket::SDR_BLOCK;
|
||||||
@ -54,7 +54,7 @@ class FakeDataChannelProvider : public webrtc::DataChannelProviderInterface {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual bool ConnectDataChannel(webrtc::DataChannel* data_channel) OVERRIDE {
|
bool ConnectDataChannel(webrtc::DataChannel* data_channel) override {
|
||||||
ASSERT(connected_channels_.find(data_channel) == connected_channels_.end());
|
ASSERT(connected_channels_.find(data_channel) == connected_channels_.end());
|
||||||
if (!transport_available_) {
|
if (!transport_available_) {
|
||||||
return false;
|
return false;
|
||||||
@ -64,14 +64,13 @@ class FakeDataChannelProvider : public webrtc::DataChannelProviderInterface {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void DisconnectDataChannel(
|
void DisconnectDataChannel(webrtc::DataChannel* data_channel) override {
|
||||||
webrtc::DataChannel* data_channel) OVERRIDE {
|
|
||||||
ASSERT(connected_channels_.find(data_channel) != connected_channels_.end());
|
ASSERT(connected_channels_.find(data_channel) != connected_channels_.end());
|
||||||
LOG(LS_INFO) << "DataChannel disconnected " << data_channel;
|
LOG(LS_INFO) << "DataChannel disconnected " << data_channel;
|
||||||
connected_channels_.erase(data_channel);
|
connected_channels_.erase(data_channel);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void AddSctpDataStream(int sid) OVERRIDE {
|
void AddSctpDataStream(int sid) override {
|
||||||
ASSERT(sid >= 0);
|
ASSERT(sid >= 0);
|
||||||
if (!transport_available_) {
|
if (!transport_available_) {
|
||||||
return;
|
return;
|
||||||
@ -80,15 +79,13 @@ class FakeDataChannelProvider : public webrtc::DataChannelProviderInterface {
|
|||||||
recv_ssrcs_.insert(sid);
|
recv_ssrcs_.insert(sid);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void RemoveSctpDataStream(int sid) OVERRIDE {
|
void RemoveSctpDataStream(int sid) override {
|
||||||
ASSERT(sid >= 0);
|
ASSERT(sid >= 0);
|
||||||
send_ssrcs_.erase(sid);
|
send_ssrcs_.erase(sid);
|
||||||
recv_ssrcs_.erase(sid);
|
recv_ssrcs_.erase(sid);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual bool ReadyToSendData() const OVERRIDE {
|
bool ReadyToSendData() const override { return ready_to_send_; }
|
||||||
return ready_to_send_;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Set true to emulate the SCTP stream being blocked by congestion control.
|
// Set true to emulate the SCTP stream being blocked by congestion control.
|
||||||
void set_send_blocked(bool blocked) {
|
void set_send_blocked(bool blocked) {
|
||||||
|
@ -305,11 +305,9 @@ class FrameInputWrapper : public cricket::VideoRenderer {
|
|||||||
virtual ~FrameInputWrapper() {}
|
virtual ~FrameInputWrapper() {}
|
||||||
|
|
||||||
// VideoRenderer implementation.
|
// VideoRenderer implementation.
|
||||||
virtual bool SetSize(int width, int height, int reserved) OVERRIDE {
|
bool SetSize(int width, int height, int reserved) override { return true; }
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual bool RenderFrame(const cricket::VideoFrame* frame) OVERRIDE {
|
bool RenderFrame(const cricket::VideoFrame* frame) override {
|
||||||
if (!capturer_->IsRunning()) {
|
if (!capturer_->IsRunning()) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -180,21 +180,23 @@ class WebRtcSession : public cricket::BaseSession,
|
|||||||
|
|
||||||
|
|
||||||
// AudioMediaProviderInterface implementation.
|
// AudioMediaProviderInterface implementation.
|
||||||
virtual void SetAudioPlayout(uint32 ssrc, bool enable,
|
void SetAudioPlayout(uint32 ssrc,
|
||||||
cricket::AudioRenderer* renderer) OVERRIDE;
|
bool enable,
|
||||||
virtual void SetAudioSend(uint32 ssrc, bool enable,
|
cricket::AudioRenderer* renderer) override;
|
||||||
|
void SetAudioSend(uint32 ssrc,
|
||||||
|
bool enable,
|
||||||
const cricket::AudioOptions& options,
|
const cricket::AudioOptions& options,
|
||||||
cricket::AudioRenderer* renderer) OVERRIDE;
|
cricket::AudioRenderer* renderer) override;
|
||||||
virtual void SetAudioPlayoutVolume(uint32 ssrc, double volume) OVERRIDE;
|
void SetAudioPlayoutVolume(uint32 ssrc, double volume) override;
|
||||||
|
|
||||||
// Implements VideoMediaProviderInterface.
|
// Implements VideoMediaProviderInterface.
|
||||||
virtual bool SetCaptureDevice(uint32 ssrc,
|
bool SetCaptureDevice(uint32 ssrc, cricket::VideoCapturer* camera) override;
|
||||||
cricket::VideoCapturer* camera) OVERRIDE;
|
void SetVideoPlayout(uint32 ssrc,
|
||||||
virtual void SetVideoPlayout(uint32 ssrc,
|
|
||||||
bool enable,
|
bool enable,
|
||||||
cricket::VideoRenderer* renderer) OVERRIDE;
|
cricket::VideoRenderer* renderer) override;
|
||||||
virtual void SetVideoSend(uint32 ssrc, bool enable,
|
void SetVideoSend(uint32 ssrc,
|
||||||
const cricket::VideoOptions* options) OVERRIDE;
|
bool enable,
|
||||||
|
const cricket::VideoOptions* options) override;
|
||||||
|
|
||||||
// Implements DtmfProviderInterface.
|
// Implements DtmfProviderInterface.
|
||||||
virtual bool CanInsertDtmf(const std::string& track_id);
|
virtual bool CanInsertDtmf(const std::string& track_id);
|
||||||
@ -203,19 +205,19 @@ class WebRtcSession : public cricket::BaseSession,
|
|||||||
virtual sigslot::signal0<>* GetOnDestroyedSignal();
|
virtual sigslot::signal0<>* GetOnDestroyedSignal();
|
||||||
|
|
||||||
// Implements DataChannelProviderInterface.
|
// Implements DataChannelProviderInterface.
|
||||||
virtual bool SendData(const cricket::SendDataParams& params,
|
bool SendData(const cricket::SendDataParams& params,
|
||||||
const rtc::Buffer& payload,
|
const rtc::Buffer& payload,
|
||||||
cricket::SendDataResult* result) OVERRIDE;
|
cricket::SendDataResult* result) override;
|
||||||
virtual bool ConnectDataChannel(DataChannel* webrtc_data_channel) OVERRIDE;
|
bool ConnectDataChannel(DataChannel* webrtc_data_channel) override;
|
||||||
virtual void DisconnectDataChannel(DataChannel* webrtc_data_channel) OVERRIDE;
|
void DisconnectDataChannel(DataChannel* webrtc_data_channel) override;
|
||||||
virtual void AddSctpDataStream(int sid) OVERRIDE;
|
void AddSctpDataStream(int sid) override;
|
||||||
virtual void RemoveSctpDataStream(int sid) OVERRIDE;
|
void RemoveSctpDataStream(int sid) override;
|
||||||
virtual bool ReadyToSendData() const OVERRIDE;
|
bool ReadyToSendData() const override;
|
||||||
|
|
||||||
// Implements DataChannelFactory.
|
// Implements DataChannelFactory.
|
||||||
rtc::scoped_refptr<DataChannel> CreateDataChannel(
|
rtc::scoped_refptr<DataChannel> CreateDataChannel(
|
||||||
const std::string& label,
|
const std::string& label,
|
||||||
const InternalDataChannelInit* config) OVERRIDE;
|
const InternalDataChannelInit* config) override;
|
||||||
|
|
||||||
cricket::DataChannelType data_channel_type() const;
|
cricket::DataChannelType data_channel_type() const;
|
||||||
|
|
||||||
|
@ -154,12 +154,11 @@ class FakeMetricsObserver : public webrtc::MetricsObserverInterface {
|
|||||||
sizeof(peer_connection_metrics_name_));
|
sizeof(peer_connection_metrics_name_));
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void IncrementCounter(
|
void IncrementCounter(webrtc::PeerConnectionMetricsCounter type) override {
|
||||||
webrtc::PeerConnectionMetricsCounter type) OVERRIDE {
|
|
||||||
peer_connection_metrics_counters_[type]++;
|
peer_connection_metrics_counters_[type]++;
|
||||||
}
|
}
|
||||||
virtual void AddHistogramSample(webrtc::PeerConnectionMetricsName type,
|
void AddHistogramSample(webrtc::PeerConnectionMetricsName type,
|
||||||
int value) OVERRIDE {
|
int value) override {
|
||||||
ASSERT(peer_connection_metrics_name_[type] == 0);
|
ASSERT(peer_connection_metrics_name_[type] == 0);
|
||||||
peer_connection_metrics_name_[type] = value;
|
peer_connection_metrics_name_[type] = value;
|
||||||
}
|
}
|
||||||
@ -168,8 +167,8 @@ class FakeMetricsObserver : public webrtc::MetricsObserverInterface {
|
|||||||
[webrtc::kPeerConnectionMetricsCounter_Max];
|
[webrtc::kPeerConnectionMetricsCounter_Max];
|
||||||
int peer_connection_metrics_name_[webrtc::kPeerConnectionMetricsCounter_Max];
|
int peer_connection_metrics_name_[webrtc::kPeerConnectionMetricsCounter_Max];
|
||||||
|
|
||||||
virtual int AddRef() OVERRIDE { return 1; }
|
int AddRef() override { return 1; }
|
||||||
virtual int Release() OVERRIDE { return 1; }
|
int Release() override { return 1; }
|
||||||
};
|
};
|
||||||
|
|
||||||
class MockIceObserver : public webrtc::IceObserver {
|
class MockIceObserver : public webrtc::IceObserver {
|
||||||
@ -300,17 +299,15 @@ class FakeAudioRenderer : public cricket::AudioRenderer {
|
|||||||
sink_->OnClose();
|
sink_->OnClose();
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void AddChannel(int channel_id) OVERRIDE {
|
void AddChannel(int channel_id) override {
|
||||||
ASSERT(channel_id_ == -1);
|
ASSERT(channel_id_ == -1);
|
||||||
channel_id_ = channel_id;
|
channel_id_ = channel_id;
|
||||||
}
|
}
|
||||||
virtual void RemoveChannel(int channel_id) OVERRIDE {
|
void RemoveChannel(int channel_id) override {
|
||||||
ASSERT(channel_id == channel_id_);
|
ASSERT(channel_id == channel_id_);
|
||||||
channel_id_ = -1;
|
channel_id_ = -1;
|
||||||
}
|
}
|
||||||
virtual void SetSink(Sink* sink) OVERRIDE {
|
void SetSink(Sink* sink) override { sink_ = sink; }
|
||||||
sink_ = sink;
|
|
||||||
}
|
|
||||||
|
|
||||||
int channel_id() const { return channel_id_; }
|
int channel_id() const { return channel_id_; }
|
||||||
cricket::AudioRenderer::Sink* sink() const { return sink_; }
|
cricket::AudioRenderer::Sink* sink() const { return sink_; }
|
||||||
|
@ -432,14 +432,12 @@ class FakeVoiceMediaChannel : public RtpHelper<VoiceMediaChannel> {
|
|||||||
renderer_->SetSink(NULL);
|
renderer_->SetSink(NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
virtual void OnData(const void* audio_data,
|
void OnData(const void* audio_data,
|
||||||
int bits_per_sample,
|
int bits_per_sample,
|
||||||
int sample_rate,
|
int sample_rate,
|
||||||
int number_of_channels,
|
int number_of_channels,
|
||||||
int number_of_frames) OVERRIDE {}
|
int number_of_frames) override {}
|
||||||
virtual void OnClose() OVERRIDE {
|
void OnClose() override { renderer_ = NULL; }
|
||||||
renderer_ = NULL;
|
|
||||||
}
|
|
||||||
AudioRenderer* renderer() const { return renderer_; }
|
AudioRenderer* renderer() const { return renderer_; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -33,31 +33,27 @@
|
|||||||
namespace cricket {
|
namespace cricket {
|
||||||
|
|
||||||
#define WEBRTC_STUB(method, args) \
|
#define WEBRTC_STUB(method, args) \
|
||||||
virtual int method args OVERRIDE { return 0; }
|
int method args override { return 0; }
|
||||||
|
|
||||||
#define WEBRTC_STUB_CONST(method, args) \
|
#define WEBRTC_STUB_CONST(method, args) \
|
||||||
virtual int method args const OVERRIDE { return 0; }
|
int method args const override { return 0; }
|
||||||
|
|
||||||
#define WEBRTC_BOOL_STUB(method, args) \
|
#define WEBRTC_BOOL_STUB(method, args) \
|
||||||
virtual bool method args OVERRIDE { return true; }
|
bool method args override { return true; }
|
||||||
|
|
||||||
#define WEBRTC_BOOL_STUB_CONST(method, args) \
|
#define WEBRTC_BOOL_STUB_CONST(method, args) \
|
||||||
virtual bool method args const OVERRIDE { return true; }
|
bool method args const override { return true; }
|
||||||
|
|
||||||
#define WEBRTC_VOID_STUB(method, args) \
|
#define WEBRTC_VOID_STUB(method, args) \
|
||||||
virtual void method args OVERRIDE {}
|
void method args override {}
|
||||||
|
|
||||||
#define WEBRTC_FUNC(method, args) \
|
#define WEBRTC_FUNC(method, args) int method args override
|
||||||
virtual int method args OVERRIDE
|
|
||||||
|
|
||||||
#define WEBRTC_FUNC_CONST(method, args) \
|
#define WEBRTC_FUNC_CONST(method, args) int method args const override
|
||||||
virtual int method args const OVERRIDE
|
|
||||||
|
|
||||||
#define WEBRTC_BOOL_FUNC(method, args) \
|
#define WEBRTC_BOOL_FUNC(method, args) bool method args override
|
||||||
virtual bool method args OVERRIDE
|
|
||||||
|
|
||||||
#define WEBRTC_VOID_FUNC(method, args) \
|
#define WEBRTC_VOID_FUNC(method, args) void method args override
|
||||||
virtual void method args OVERRIDE
|
|
||||||
|
|
||||||
#define WEBRTC_CHECK_CHANNEL(channel) \
|
#define WEBRTC_CHECK_CHANNEL(channel) \
|
||||||
if (channels_.find(channel) == channels_.end()) return -1;
|
if (channels_.find(channel) == channels_.end()) return -1;
|
||||||
|
@ -46,73 +46,63 @@ class FakeWebRtcVideoCaptureModule : public webrtc::VideoCaptureModule {
|
|||||||
running_(false),
|
running_(false),
|
||||||
delay_(0) {
|
delay_(0) {
|
||||||
}
|
}
|
||||||
virtual int64_t TimeUntilNextProcess() OVERRIDE {
|
int64_t TimeUntilNextProcess() override { return 0; }
|
||||||
return 0;
|
int32_t Process() override { return 0; }
|
||||||
}
|
void RegisterCaptureDataCallback(
|
||||||
virtual int32_t Process() OVERRIDE {
|
webrtc::VideoCaptureDataCallback& callback) override {
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
virtual void RegisterCaptureDataCallback(
|
|
||||||
webrtc::VideoCaptureDataCallback& callback) OVERRIDE {
|
|
||||||
callback_ = &callback;
|
callback_ = &callback;
|
||||||
}
|
}
|
||||||
virtual void DeRegisterCaptureDataCallback() OVERRIDE { callback_ = NULL; }
|
void DeRegisterCaptureDataCallback() override { callback_ = NULL; }
|
||||||
virtual void RegisterCaptureCallback(
|
void RegisterCaptureCallback(
|
||||||
webrtc::VideoCaptureFeedBack& callback) OVERRIDE {
|
webrtc::VideoCaptureFeedBack& callback) override {
|
||||||
// Not implemented.
|
// Not implemented.
|
||||||
}
|
}
|
||||||
virtual void DeRegisterCaptureCallback() OVERRIDE {
|
void DeRegisterCaptureCallback() override {
|
||||||
// Not implemented.
|
// Not implemented.
|
||||||
}
|
}
|
||||||
virtual void SetCaptureDelay(int32_t delay) OVERRIDE { delay_ = delay; }
|
void SetCaptureDelay(int32_t delay) override { delay_ = delay; }
|
||||||
virtual int32_t CaptureDelay() OVERRIDE { return delay_; }
|
int32_t CaptureDelay() override { return delay_; }
|
||||||
virtual void EnableFrameRateCallback(const bool enable) OVERRIDE {
|
void EnableFrameRateCallback(const bool enable) override {
|
||||||
// not implemented
|
// not implemented
|
||||||
}
|
}
|
||||||
virtual void EnableNoPictureAlarm(const bool enable) OVERRIDE {
|
void EnableNoPictureAlarm(const bool enable) override {
|
||||||
// not implemented
|
// not implemented
|
||||||
}
|
}
|
||||||
virtual int32_t StartCapture(
|
int32_t StartCapture(const webrtc::VideoCaptureCapability& cap) override {
|
||||||
const webrtc::VideoCaptureCapability& cap) OVERRIDE {
|
|
||||||
if (running_) return -1;
|
if (running_) return -1;
|
||||||
cap_ = cap;
|
cap_ = cap;
|
||||||
running_ = true;
|
running_ = true;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
virtual int32_t StopCapture() OVERRIDE {
|
int32_t StopCapture() override {
|
||||||
running_ = false;
|
running_ = false;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
virtual const char* CurrentDeviceName() const OVERRIDE {
|
const char* CurrentDeviceName() const override {
|
||||||
return NULL; // not implemented
|
return NULL; // not implemented
|
||||||
}
|
}
|
||||||
virtual bool CaptureStarted() OVERRIDE {
|
bool CaptureStarted() override { return running_; }
|
||||||
return running_;
|
int32_t CaptureSettings(webrtc::VideoCaptureCapability& settings) override {
|
||||||
}
|
|
||||||
virtual int32_t CaptureSettings(
|
|
||||||
webrtc::VideoCaptureCapability& settings) OVERRIDE {
|
|
||||||
if (!running_) return -1;
|
if (!running_) return -1;
|
||||||
settings = cap_;
|
settings = cap_;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual int32_t SetCaptureRotation(webrtc::VideoRotation rotation) OVERRIDE {
|
int32_t SetCaptureRotation(webrtc::VideoRotation rotation) override {
|
||||||
return -1; // not implemented
|
return -1; // not implemented
|
||||||
}
|
}
|
||||||
virtual bool SetApplyRotation(bool enable) OVERRIDE {
|
bool SetApplyRotation(bool enable) override {
|
||||||
return false; // not implemented
|
return false; // not implemented
|
||||||
}
|
}
|
||||||
virtual bool GetApplyRotation() OVERRIDE {
|
bool GetApplyRotation() override {
|
||||||
return true; // Rotation compensation is turned on.
|
return true; // Rotation compensation is turned on.
|
||||||
}
|
}
|
||||||
virtual VideoCaptureEncodeInterface* GetEncodeInterface(
|
VideoCaptureEncodeInterface* GetEncodeInterface(
|
||||||
const webrtc::VideoCodec& codec) OVERRIDE {
|
const webrtc::VideoCodec& codec) override {
|
||||||
return NULL; // not implemented
|
return NULL; // not implemented
|
||||||
}
|
}
|
||||||
virtual int32_t AddRef() OVERRIDE {
|
int32_t AddRef() override { return 0; }
|
||||||
return 0;
|
int32_t Release() override {
|
||||||
}
|
|
||||||
virtual int32_t Release() OVERRIDE {
|
|
||||||
delete this;
|
delete this;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -145,25 +145,15 @@ class FakeAudioProcessing : public webrtc::AudioProcessing {
|
|||||||
WEBRTC_STUB(StartDebugRecording, (const char filename[kMaxFilenameSize]));
|
WEBRTC_STUB(StartDebugRecording, (const char filename[kMaxFilenameSize]));
|
||||||
WEBRTC_STUB(StartDebugRecording, (FILE* handle));
|
WEBRTC_STUB(StartDebugRecording, (FILE* handle));
|
||||||
WEBRTC_STUB(StopDebugRecording, ());
|
WEBRTC_STUB(StopDebugRecording, ());
|
||||||
virtual webrtc::EchoCancellation* echo_cancellation() const OVERRIDE {
|
webrtc::EchoCancellation* echo_cancellation() const override { return NULL; }
|
||||||
return NULL;
|
webrtc::EchoControlMobile* echo_control_mobile() const override {
|
||||||
}
|
|
||||||
virtual webrtc::EchoControlMobile* echo_control_mobile() const OVERRIDE {
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
virtual webrtc::GainControl* gain_control() const OVERRIDE { return NULL; }
|
|
||||||
virtual webrtc::HighPassFilter* high_pass_filter() const OVERRIDE {
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
virtual webrtc::LevelEstimator* level_estimator() const OVERRIDE {
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
virtual webrtc::NoiseSuppression* noise_suppression() const OVERRIDE {
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
virtual webrtc::VoiceDetection* voice_detection() const OVERRIDE {
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
webrtc::GainControl* gain_control() const override { return NULL; }
|
||||||
|
webrtc::HighPassFilter* high_pass_filter() const override { return NULL; }
|
||||||
|
webrtc::LevelEstimator* level_estimator() const override { return NULL; }
|
||||||
|
webrtc::NoiseSuppression* noise_suppression() const override { return NULL; }
|
||||||
|
webrtc::VoiceDetection* voice_detection() const override { return NULL; }
|
||||||
|
|
||||||
bool experimental_ns_enabled() {
|
bool experimental_ns_enabled() {
|
||||||
return experimental_ns_enabled_;
|
return experimental_ns_enabled_;
|
||||||
@ -456,7 +446,7 @@ class FakeWebRtcVoiceEngine
|
|||||||
inited_ = false;
|
inited_ = false;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
virtual webrtc::AudioProcessing* audio_processing() OVERRIDE {
|
webrtc::AudioProcessing* audio_processing() override {
|
||||||
return &audio_processing_;
|
return &audio_processing_;
|
||||||
}
|
}
|
||||||
WEBRTC_FUNC(CreateChannel, ()) {
|
WEBRTC_FUNC(CreateChannel, ()) {
|
||||||
|
@ -97,90 +97,83 @@ class DelegatingWebRtcMediaEngine : public cricket::MediaEngineInterface {
|
|||||||
virtual ~DelegatingWebRtcMediaEngine() {
|
virtual ~DelegatingWebRtcMediaEngine() {
|
||||||
DestroyWebRtcMediaEngine(delegate_);
|
DestroyWebRtcMediaEngine(delegate_);
|
||||||
}
|
}
|
||||||
virtual bool Init(rtc::Thread* worker_thread) OVERRIDE {
|
bool Init(rtc::Thread* worker_thread) override {
|
||||||
return delegate_->Init(worker_thread);
|
return delegate_->Init(worker_thread);
|
||||||
}
|
}
|
||||||
virtual void Terminate() OVERRIDE {
|
void Terminate() override { delegate_->Terminate(); }
|
||||||
delegate_->Terminate();
|
int GetCapabilities() override { return delegate_->GetCapabilities(); }
|
||||||
}
|
VoiceMediaChannel* CreateChannel() override {
|
||||||
virtual int GetCapabilities() OVERRIDE {
|
|
||||||
return delegate_->GetCapabilities();
|
|
||||||
}
|
|
||||||
virtual VoiceMediaChannel* CreateChannel() OVERRIDE {
|
|
||||||
return delegate_->CreateChannel();
|
return delegate_->CreateChannel();
|
||||||
}
|
}
|
||||||
virtual VideoMediaChannel* CreateVideoChannel(
|
VideoMediaChannel* CreateVideoChannel(
|
||||||
const VideoOptions& options,
|
const VideoOptions& options,
|
||||||
VoiceMediaChannel* voice_media_channel) OVERRIDE {
|
VoiceMediaChannel* voice_media_channel) override {
|
||||||
return delegate_->CreateVideoChannel(options, voice_media_channel);
|
return delegate_->CreateVideoChannel(options, voice_media_channel);
|
||||||
}
|
}
|
||||||
virtual SoundclipMedia* CreateSoundclip() OVERRIDE {
|
SoundclipMedia* CreateSoundclip() override {
|
||||||
return delegate_->CreateSoundclip();
|
return delegate_->CreateSoundclip();
|
||||||
}
|
}
|
||||||
virtual AudioOptions GetAudioOptions() const OVERRIDE {
|
AudioOptions GetAudioOptions() const override {
|
||||||
return delegate_->GetAudioOptions();
|
return delegate_->GetAudioOptions();
|
||||||
}
|
}
|
||||||
virtual bool SetAudioOptions(const AudioOptions& options) OVERRIDE {
|
bool SetAudioOptions(const AudioOptions& options) override {
|
||||||
return delegate_->SetAudioOptions(options);
|
return delegate_->SetAudioOptions(options);
|
||||||
}
|
}
|
||||||
virtual bool SetAudioDelayOffset(int offset) OVERRIDE {
|
bool SetAudioDelayOffset(int offset) override {
|
||||||
return delegate_->SetAudioDelayOffset(offset);
|
return delegate_->SetAudioDelayOffset(offset);
|
||||||
}
|
}
|
||||||
virtual bool SetDefaultVideoEncoderConfig(
|
bool SetDefaultVideoEncoderConfig(const VideoEncoderConfig& config) override {
|
||||||
const VideoEncoderConfig& config) OVERRIDE {
|
|
||||||
return delegate_->SetDefaultVideoEncoderConfig(config);
|
return delegate_->SetDefaultVideoEncoderConfig(config);
|
||||||
}
|
}
|
||||||
virtual bool SetSoundDevices(
|
bool SetSoundDevices(const Device* in_device,
|
||||||
const Device* in_device, const Device* out_device) OVERRIDE {
|
const Device* out_device) override {
|
||||||
return delegate_->SetSoundDevices(in_device, out_device);
|
return delegate_->SetSoundDevices(in_device, out_device);
|
||||||
}
|
}
|
||||||
virtual bool GetOutputVolume(int* level) OVERRIDE {
|
bool GetOutputVolume(int* level) override {
|
||||||
return delegate_->GetOutputVolume(level);
|
return delegate_->GetOutputVolume(level);
|
||||||
}
|
}
|
||||||
virtual bool SetOutputVolume(int level) OVERRIDE {
|
bool SetOutputVolume(int level) override {
|
||||||
return delegate_->SetOutputVolume(level);
|
return delegate_->SetOutputVolume(level);
|
||||||
}
|
}
|
||||||
virtual int GetInputLevel() OVERRIDE {
|
int GetInputLevel() override { return delegate_->GetInputLevel(); }
|
||||||
return delegate_->GetInputLevel();
|
bool SetLocalMonitor(bool enable) override {
|
||||||
}
|
|
||||||
virtual bool SetLocalMonitor(bool enable) OVERRIDE {
|
|
||||||
return delegate_->SetLocalMonitor(enable);
|
return delegate_->SetLocalMonitor(enable);
|
||||||
}
|
}
|
||||||
virtual const std::vector<AudioCodec>& audio_codecs() OVERRIDE {
|
const std::vector<AudioCodec>& audio_codecs() override {
|
||||||
return delegate_->audio_codecs();
|
return delegate_->audio_codecs();
|
||||||
}
|
}
|
||||||
virtual const std::vector<RtpHeaderExtension>&
|
const std::vector<RtpHeaderExtension>& audio_rtp_header_extensions()
|
||||||
audio_rtp_header_extensions() OVERRIDE {
|
override {
|
||||||
return delegate_->audio_rtp_header_extensions();
|
return delegate_->audio_rtp_header_extensions();
|
||||||
}
|
}
|
||||||
virtual const std::vector<VideoCodec>& video_codecs() OVERRIDE {
|
const std::vector<VideoCodec>& video_codecs() override {
|
||||||
return delegate_->video_codecs();
|
return delegate_->video_codecs();
|
||||||
}
|
}
|
||||||
virtual const std::vector<RtpHeaderExtension>&
|
const std::vector<RtpHeaderExtension>& video_rtp_header_extensions()
|
||||||
video_rtp_header_extensions() OVERRIDE {
|
override {
|
||||||
return delegate_->video_rtp_header_extensions();
|
return delegate_->video_rtp_header_extensions();
|
||||||
}
|
}
|
||||||
virtual void SetVoiceLogging(int min_sev, const char* filter) OVERRIDE {
|
void SetVoiceLogging(int min_sev, const char* filter) override {
|
||||||
delegate_->SetVoiceLogging(min_sev, filter);
|
delegate_->SetVoiceLogging(min_sev, filter);
|
||||||
}
|
}
|
||||||
virtual void SetVideoLogging(int min_sev, const char* filter) OVERRIDE {
|
void SetVideoLogging(int min_sev, const char* filter) override {
|
||||||
delegate_->SetVideoLogging(min_sev, filter);
|
delegate_->SetVideoLogging(min_sev, filter);
|
||||||
}
|
}
|
||||||
virtual bool StartAecDump(rtc::PlatformFile file) OVERRIDE {
|
bool StartAecDump(rtc::PlatformFile file) override {
|
||||||
return delegate_->StartAecDump(file);
|
return delegate_->StartAecDump(file);
|
||||||
}
|
}
|
||||||
virtual bool RegisterVoiceProcessor(
|
bool RegisterVoiceProcessor(uint32 ssrc,
|
||||||
uint32 ssrc, VoiceProcessor* video_processor,
|
VoiceProcessor* video_processor,
|
||||||
MediaProcessorDirection direction) OVERRIDE {
|
MediaProcessorDirection direction) override {
|
||||||
return delegate_->RegisterVoiceProcessor(ssrc, video_processor, direction);
|
return delegate_->RegisterVoiceProcessor(ssrc, video_processor, direction);
|
||||||
}
|
}
|
||||||
virtual bool UnregisterVoiceProcessor(
|
bool UnregisterVoiceProcessor(uint32 ssrc,
|
||||||
uint32 ssrc, VoiceProcessor* video_processor,
|
VoiceProcessor* video_processor,
|
||||||
MediaProcessorDirection direction) OVERRIDE {
|
MediaProcessorDirection direction) override {
|
||||||
return delegate_->UnregisterVoiceProcessor(ssrc, video_processor,
|
return delegate_->UnregisterVoiceProcessor(ssrc, video_processor,
|
||||||
direction);
|
direction);
|
||||||
}
|
}
|
||||||
virtual VideoFormat GetStartCaptureFormat() const OVERRIDE {
|
VideoFormat GetStartCaptureFormat() const override {
|
||||||
return delegate_->GetStartCaptureFormat();
|
return delegate_->GetStartCaptureFormat();
|
||||||
}
|
}
|
||||||
virtual sigslot::repeater2<VideoCapturer*, CaptureState>&
|
virtual sigslot::repeater2<VideoCapturer*, CaptureState>&
|
||||||
|
@ -41,139 +41,138 @@ class WebRtcPassthroughRender : public webrtc::VideoRender {
|
|||||||
WebRtcPassthroughRender();
|
WebRtcPassthroughRender();
|
||||||
virtual ~WebRtcPassthroughRender();
|
virtual ~WebRtcPassthroughRender();
|
||||||
|
|
||||||
virtual int64_t TimeUntilNextProcess() OVERRIDE { return 0; }
|
int64_t TimeUntilNextProcess() override { return 0; }
|
||||||
|
|
||||||
virtual int32_t Process() OVERRIDE { return 0; }
|
int32_t Process() override { return 0; }
|
||||||
|
|
||||||
virtual void* Window() OVERRIDE {
|
void* Window() override {
|
||||||
rtc::CritScope cs(&render_critical_);
|
rtc::CritScope cs(&render_critical_);
|
||||||
return window_;
|
return window_;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual int32_t ChangeWindow(void* window) OVERRIDE {
|
int32_t ChangeWindow(void* window) override {
|
||||||
rtc::CritScope cs(&render_critical_);
|
rtc::CritScope cs(&render_critical_);
|
||||||
window_ = window;
|
window_ = window;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual webrtc::VideoRenderCallback* AddIncomingRenderStream(
|
webrtc::VideoRenderCallback* AddIncomingRenderStream(
|
||||||
const uint32_t stream_id,
|
const uint32_t stream_id,
|
||||||
const uint32_t zOrder,
|
const uint32_t zOrder,
|
||||||
const float left, const float top,
|
const float left,
|
||||||
const float right, const float bottom) OVERRIDE;
|
const float top,
|
||||||
|
const float right,
|
||||||
|
const float bottom) override;
|
||||||
|
|
||||||
virtual int32_t DeleteIncomingRenderStream(const uint32_t stream_id) OVERRIDE;
|
int32_t DeleteIncomingRenderStream(const uint32_t stream_id) override;
|
||||||
|
|
||||||
virtual int32_t AddExternalRenderCallback(
|
int32_t AddExternalRenderCallback(
|
||||||
const uint32_t stream_id,
|
const uint32_t stream_id,
|
||||||
webrtc::VideoRenderCallback* render_object) OVERRIDE;
|
webrtc::VideoRenderCallback* render_object) override;
|
||||||
|
|
||||||
virtual int32_t GetIncomingRenderStreamProperties(
|
int32_t GetIncomingRenderStreamProperties(const uint32_t stream_id,
|
||||||
const uint32_t stream_id,
|
|
||||||
uint32_t& zOrder,
|
uint32_t& zOrder,
|
||||||
float& left, float& top,
|
float& left,
|
||||||
float& right, float& bottom) const OVERRIDE {
|
float& top,
|
||||||
|
float& right,
|
||||||
|
float& bottom) const override {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual uint32_t GetIncomingFrameRate(const uint32_t stream_id) OVERRIDE {
|
uint32_t GetIncomingFrameRate(const uint32_t stream_id) override { return 0; }
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual uint32_t GetNumIncomingRenderStreams() const OVERRIDE {
|
uint32_t GetNumIncomingRenderStreams() const override {
|
||||||
return static_cast<uint32_t>(stream_render_map_.size());
|
return static_cast<uint32_t>(stream_render_map_.size());
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual bool HasIncomingRenderStream(const uint32_t stream_id) const OVERRIDE;
|
bool HasIncomingRenderStream(const uint32_t stream_id) const override;
|
||||||
|
|
||||||
virtual int32_t RegisterRawFrameCallback(
|
int32_t RegisterRawFrameCallback(
|
||||||
const uint32_t stream_id,
|
const uint32_t stream_id,
|
||||||
webrtc::VideoRenderCallback* callback_obj) OVERRIDE {
|
webrtc::VideoRenderCallback* callback_obj) override {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual int32_t GetLastRenderedFrame(
|
int32_t GetLastRenderedFrame(const uint32_t stream_id,
|
||||||
const uint32_t stream_id,
|
webrtc::I420VideoFrame& frame) const override {
|
||||||
webrtc::I420VideoFrame &frame) const OVERRIDE {
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual int32_t StartRender(const uint32_t stream_id) OVERRIDE;
|
int32_t StartRender(const uint32_t stream_id) override;
|
||||||
|
|
||||||
virtual int32_t StopRender(const uint32_t stream_id) OVERRIDE;
|
int32_t StopRender(const uint32_t stream_id) override;
|
||||||
|
|
||||||
virtual int32_t ResetRender() OVERRIDE { return 0; }
|
int32_t ResetRender() override { return 0; }
|
||||||
|
|
||||||
virtual webrtc::RawVideoType PreferredVideoType() const OVERRIDE;
|
webrtc::RawVideoType PreferredVideoType() const override;
|
||||||
|
|
||||||
virtual bool IsFullScreen() OVERRIDE { return false; }
|
bool IsFullScreen() override { return false; }
|
||||||
|
|
||||||
virtual int32_t GetScreenResolution(uint32_t& screenWidth,
|
int32_t GetScreenResolution(uint32_t& screenWidth,
|
||||||
uint32_t& screenHeight) const OVERRIDE {
|
uint32_t& screenHeight) const override {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual uint32_t RenderFrameRate(const uint32_t stream_id) OVERRIDE {
|
uint32_t RenderFrameRate(const uint32_t stream_id) override { return 0; }
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual int32_t SetStreamCropping(
|
int32_t SetStreamCropping(const uint32_t stream_id,
|
||||||
const uint32_t stream_id,
|
const float left,
|
||||||
const float left, const float top,
|
const float top,
|
||||||
const float right,
|
const float right,
|
||||||
const float bottom) OVERRIDE {
|
const float bottom) override {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual int32_t SetExpectedRenderDelay(uint32_t stream_id,
|
int32_t SetExpectedRenderDelay(uint32_t stream_id,
|
||||||
int32_t delay_ms) OVERRIDE {
|
int32_t delay_ms) override {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual int32_t ConfigureRenderer(
|
int32_t ConfigureRenderer(const uint32_t stream_id,
|
||||||
const uint32_t stream_id,
|
|
||||||
const unsigned int zOrder,
|
const unsigned int zOrder,
|
||||||
const float left, const float top,
|
const float left,
|
||||||
|
const float top,
|
||||||
const float right,
|
const float right,
|
||||||
const float bottom) OVERRIDE {
|
const float bottom) override {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual int32_t SetTransparentBackground(const bool enable) OVERRIDE {
|
int32_t SetTransparentBackground(const bool enable) override { return -1; }
|
||||||
|
|
||||||
|
int32_t FullScreenRender(void* window, const bool enable) override {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual int32_t FullScreenRender(void* window, const bool enable) OVERRIDE {
|
int32_t SetBitmap(const void* bitMap,
|
||||||
|
const uint8_t pictureId,
|
||||||
|
const void* colorKey,
|
||||||
|
const float left,
|
||||||
|
const float top,
|
||||||
|
const float right,
|
||||||
|
const float bottom) override {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual int32_t SetBitmap(const void* bitMap,
|
int32_t SetText(const uint8_t textId,
|
||||||
const uint8_t pictureId, const void* colorKey,
|
|
||||||
const float left, const float top,
|
|
||||||
const float right, const float bottom) OVERRIDE {
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual int32_t SetText(const uint8_t textId,
|
|
||||||
const uint8_t* text,
|
const uint8_t* text,
|
||||||
const int32_t textLength,
|
const int32_t textLength,
|
||||||
const uint32_t textColorRef,
|
const uint32_t textColorRef,
|
||||||
const uint32_t backgroundColorRef,
|
const uint32_t backgroundColorRef,
|
||||||
const float left, const float top,
|
const float left,
|
||||||
const float right, const float bottom) OVERRIDE {
|
const float top,
|
||||||
|
const float right,
|
||||||
|
const float bottom) override {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual int32_t SetStartImage(
|
int32_t SetStartImage(const uint32_t stream_id,
|
||||||
const uint32_t stream_id,
|
const webrtc::I420VideoFrame& videoFrame) override {
|
||||||
const webrtc::I420VideoFrame& videoFrame) OVERRIDE {
|
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual int32_t SetTimeoutImage(
|
int32_t SetTimeoutImage(const uint32_t stream_id,
|
||||||
const uint32_t stream_id,
|
|
||||||
const webrtc::I420VideoFrame& videoFrame,
|
const webrtc::I420VideoFrame& videoFrame,
|
||||||
const uint32_t timeout) OVERRIDE {
|
const uint32_t timeout) override {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -127,11 +127,11 @@ class EncoderFactoryAdapter : public webrtc::VideoEncoderFactory {
|
|||||||
virtual ~EncoderFactoryAdapter() {}
|
virtual ~EncoderFactoryAdapter() {}
|
||||||
|
|
||||||
// Implement webrtc::VideoEncoderFactory.
|
// Implement webrtc::VideoEncoderFactory.
|
||||||
virtual webrtc::VideoEncoder* Create() OVERRIDE {
|
webrtc::VideoEncoder* Create() override {
|
||||||
return factory_->CreateVideoEncoder(webrtc::kVideoCodecVP8);
|
return factory_->CreateVideoEncoder(webrtc::kVideoCodecVP8);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void Destroy(webrtc::VideoEncoder* encoder) OVERRIDE {
|
void Destroy(webrtc::VideoEncoder* encoder) override {
|
||||||
return factory_->DestroyVideoEncoder(encoder);
|
return factory_->DestroyVideoEncoder(encoder);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -677,7 +677,7 @@ class WebRtcOveruseObserver : public webrtc::CpuOveruseObserver {
|
|||||||
// TODO(mflodman): Consider sending resolution as part of event, to let
|
// TODO(mflodman): Consider sending resolution as part of event, to let
|
||||||
// adapter know what resolution the request is based on. Helps eliminate stale
|
// adapter know what resolution the request is based on. Helps eliminate stale
|
||||||
// data, race conditions.
|
// data, race conditions.
|
||||||
virtual void OveruseDetected() OVERRIDE {
|
void OveruseDetected() override {
|
||||||
rtc::CritScope cs(&crit_);
|
rtc::CritScope cs(&crit_);
|
||||||
if (!enabled_) {
|
if (!enabled_) {
|
||||||
return;
|
return;
|
||||||
@ -686,7 +686,7 @@ class WebRtcOveruseObserver : public webrtc::CpuOveruseObserver {
|
|||||||
video_adapter_->OnCpuResolutionRequest(CoordinatedVideoAdapter::DOWNGRADE);
|
video_adapter_->OnCpuResolutionRequest(CoordinatedVideoAdapter::DOWNGRADE);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void NormalUsage() OVERRIDE {
|
void NormalUsage() override {
|
||||||
rtc::CritScope cs(&crit_);
|
rtc::CritScope cs(&crit_);
|
||||||
if (!enabled_) {
|
if (!enabled_) {
|
||||||
return;
|
return;
|
||||||
|
@ -266,43 +266,42 @@ class WebRtcVideoMediaChannel : public rtc::MessageHandler,
|
|||||||
int GetDefaultChannelId() const { return default_channel_id_; }
|
int GetDefaultChannelId() const { return default_channel_id_; }
|
||||||
|
|
||||||
// VideoMediaChannel implementation
|
// VideoMediaChannel implementation
|
||||||
virtual bool SetRecvCodecs(const std::vector<VideoCodec> &codecs) OVERRIDE;
|
bool SetRecvCodecs(const std::vector<VideoCodec>& codecs) override;
|
||||||
virtual bool SetSendCodecs(const std::vector<VideoCodec> &codecs) OVERRIDE;
|
bool SetSendCodecs(const std::vector<VideoCodec>& codecs) override;
|
||||||
virtual bool GetSendCodec(VideoCodec* send_codec) OVERRIDE;
|
bool GetSendCodec(VideoCodec* send_codec) override;
|
||||||
virtual bool SetSendStreamFormat(uint32 ssrc,
|
bool SetSendStreamFormat(uint32 ssrc, const VideoFormat& format) override;
|
||||||
const VideoFormat& format) OVERRIDE;
|
bool SetRender(bool render) override;
|
||||||
virtual bool SetRender(bool render) OVERRIDE;
|
bool SetSend(bool send) override;
|
||||||
virtual bool SetSend(bool send) OVERRIDE;
|
|
||||||
|
|
||||||
virtual bool AddSendStream(const StreamParams& sp) OVERRIDE;
|
bool AddSendStream(const StreamParams& sp) override;
|
||||||
virtual bool RemoveSendStream(uint32 ssrc) OVERRIDE;
|
bool RemoveSendStream(uint32 ssrc) override;
|
||||||
virtual bool AddRecvStream(const StreamParams& sp) OVERRIDE;
|
bool AddRecvStream(const StreamParams& sp) override;
|
||||||
virtual bool RemoveRecvStream(uint32 ssrc) OVERRIDE;
|
bool RemoveRecvStream(uint32 ssrc) override;
|
||||||
virtual bool SetRenderer(uint32 ssrc, VideoRenderer* renderer) OVERRIDE;
|
bool SetRenderer(uint32 ssrc, VideoRenderer* renderer) override;
|
||||||
virtual bool GetStats(VideoMediaInfo* info) OVERRIDE;
|
bool GetStats(VideoMediaInfo* info) override;
|
||||||
virtual bool SetCapturer(uint32 ssrc, VideoCapturer* capturer) OVERRIDE;
|
bool SetCapturer(uint32 ssrc, VideoCapturer* capturer) override;
|
||||||
virtual bool SendIntraFrame() OVERRIDE;
|
bool SendIntraFrame() override;
|
||||||
virtual bool RequestIntraFrame() OVERRIDE;
|
bool RequestIntraFrame() override;
|
||||||
|
|
||||||
virtual void OnPacketReceived(rtc::Buffer* packet,
|
void OnPacketReceived(rtc::Buffer* packet,
|
||||||
const rtc::PacketTime& packet_time) OVERRIDE;
|
const rtc::PacketTime& packet_time) override;
|
||||||
virtual void OnRtcpReceived(rtc::Buffer* packet,
|
void OnRtcpReceived(rtc::Buffer* packet,
|
||||||
const rtc::PacketTime& packet_time) OVERRIDE;
|
const rtc::PacketTime& packet_time) override;
|
||||||
virtual void OnReadyToSend(bool ready) OVERRIDE;
|
void OnReadyToSend(bool ready) override;
|
||||||
virtual bool MuteStream(uint32 ssrc, bool on) OVERRIDE;
|
bool MuteStream(uint32 ssrc, bool on) override;
|
||||||
virtual bool SetRecvRtpHeaderExtensions(
|
bool SetRecvRtpHeaderExtensions(
|
||||||
const std::vector<RtpHeaderExtension>& extensions) OVERRIDE;
|
const std::vector<RtpHeaderExtension>& extensions) override;
|
||||||
virtual bool SetSendRtpHeaderExtensions(
|
bool SetSendRtpHeaderExtensions(
|
||||||
const std::vector<RtpHeaderExtension>& extensions) OVERRIDE;
|
const std::vector<RtpHeaderExtension>& extensions) override;
|
||||||
virtual int GetRtpSendTimeExtnId() const OVERRIDE;
|
int GetRtpSendTimeExtnId() const override;
|
||||||
virtual bool SetMaxSendBandwidth(int bps) OVERRIDE;
|
bool SetMaxSendBandwidth(int bps) override;
|
||||||
virtual bool SetOptions(const VideoOptions &options) OVERRIDE;
|
bool SetOptions(const VideoOptions& options) override;
|
||||||
virtual bool GetOptions(VideoOptions *options) const OVERRIDE {
|
bool GetOptions(VideoOptions* options) const override {
|
||||||
*options = options_;
|
*options = options_;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
virtual void SetInterface(NetworkInterface* iface) OVERRIDE;
|
void SetInterface(NetworkInterface* iface) override;
|
||||||
virtual void UpdateAspectRatio(int ratio_w, int ratio_h) OVERRIDE;
|
void UpdateAspectRatio(int ratio_w, int ratio_h) override;
|
||||||
|
|
||||||
// Public functions for use by tests and other specialized code.
|
// Public functions for use by tests and other specialized code.
|
||||||
uint32 send_ssrc() const { return 0; }
|
uint32 send_ssrc() const { return 0; }
|
||||||
@ -320,17 +319,15 @@ class WebRtcVideoMediaChannel : public rtc::MessageHandler,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// rtc::MessageHandler:
|
// rtc::MessageHandler:
|
||||||
virtual void OnMessage(rtc::Message* msg) OVERRIDE;
|
void OnMessage(rtc::Message* msg) override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void Terminate();
|
void Terminate();
|
||||||
int GetLastEngineError() { return engine()->GetLastEngineError(); }
|
int GetLastEngineError() { return engine()->GetLastEngineError(); }
|
||||||
|
|
||||||
// webrtc::Transport:
|
// webrtc::Transport:
|
||||||
virtual int SendPacket(int channel, const void* data, size_t len) OVERRIDE;
|
int SendPacket(int channel, const void* data, size_t len) override;
|
||||||
virtual int SendRTCPPacket(int channel,
|
int SendRTCPPacket(int channel, const void* data, size_t len) override;
|
||||||
const void* data,
|
|
||||||
size_t len) OVERRIDE;
|
|
||||||
|
|
||||||
bool ConferenceModeIsEnabled() const {
|
bool ConferenceModeIsEnabled() const {
|
||||||
return options_.conference_mode.GetWithDefaultIfUnset(false);
|
return options_.conference_mode.GetWithDefaultIfUnset(false);
|
||||||
@ -531,10 +528,10 @@ class WebRtcSimulcastEncoderFactory
|
|||||||
|
|
||||||
static bool UseSimulcastEncoderFactory(const std::vector<VideoCodec>& codecs);
|
static bool UseSimulcastEncoderFactory(const std::vector<VideoCodec>& codecs);
|
||||||
|
|
||||||
virtual webrtc::VideoEncoder* CreateVideoEncoder(
|
webrtc::VideoEncoder* CreateVideoEncoder(
|
||||||
webrtc::VideoCodecType type) OVERRIDE;
|
webrtc::VideoCodecType type) override;
|
||||||
virtual const std::vector<VideoCodec>& codecs() const OVERRIDE;
|
const std::vector<VideoCodec>& codecs() const override;
|
||||||
virtual void DestroyVideoEncoder(webrtc::VideoEncoder* encoder) OVERRIDE;
|
void DestroyVideoEncoder(webrtc::VideoEncoder* encoder) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
cricket::WebRtcVideoEncoderFactory* factory_;
|
cricket::WebRtcVideoEncoderFactory* factory_;
|
||||||
|
@ -89,8 +89,7 @@ class UnsignalledSsrcHandler {
|
|||||||
class DefaultUnsignalledSsrcHandler : public UnsignalledSsrcHandler {
|
class DefaultUnsignalledSsrcHandler : public UnsignalledSsrcHandler {
|
||||||
public:
|
public:
|
||||||
DefaultUnsignalledSsrcHandler();
|
DefaultUnsignalledSsrcHandler();
|
||||||
virtual Action OnUnsignalledSsrc(VideoMediaChannel* engine,
|
Action OnUnsignalledSsrc(VideoMediaChannel* engine, uint32_t ssrc) override;
|
||||||
uint32_t ssrc) override;
|
|
||||||
|
|
||||||
VideoRenderer* GetDefaultRenderer() const;
|
VideoRenderer* GetDefaultRenderer() const;
|
||||||
void SetDefaultRenderer(VideoMediaChannel* channel, VideoRenderer* renderer);
|
void SetDefaultRenderer(VideoMediaChannel* channel, VideoRenderer* renderer);
|
||||||
@ -188,49 +187,48 @@ class WebRtcVideoChannel2 : public rtc::MessageHandler,
|
|||||||
bool Init();
|
bool Init();
|
||||||
|
|
||||||
// VideoMediaChannel implementation
|
// VideoMediaChannel implementation
|
||||||
virtual bool SetRecvCodecs(const std::vector<VideoCodec>& codecs) override;
|
bool SetRecvCodecs(const std::vector<VideoCodec>& codecs) override;
|
||||||
virtual bool SetSendCodecs(const std::vector<VideoCodec>& codecs) override;
|
bool SetSendCodecs(const std::vector<VideoCodec>& codecs) override;
|
||||||
virtual bool GetSendCodec(VideoCodec* send_codec) override;
|
bool GetSendCodec(VideoCodec* send_codec) override;
|
||||||
virtual bool SetSendStreamFormat(uint32 ssrc,
|
bool SetSendStreamFormat(uint32 ssrc, const VideoFormat& format) override;
|
||||||
const VideoFormat& format) override;
|
bool SetRender(bool render) override;
|
||||||
virtual bool SetRender(bool render) override;
|
bool SetSend(bool send) override;
|
||||||
virtual bool SetSend(bool send) override;
|
|
||||||
|
|
||||||
virtual bool AddSendStream(const StreamParams& sp) override;
|
bool AddSendStream(const StreamParams& sp) override;
|
||||||
virtual bool RemoveSendStream(uint32 ssrc) override;
|
bool RemoveSendStream(uint32 ssrc) override;
|
||||||
virtual bool AddRecvStream(const StreamParams& sp) override;
|
bool AddRecvStream(const StreamParams& sp) override;
|
||||||
virtual bool RemoveRecvStream(uint32 ssrc) override;
|
bool RemoveRecvStream(uint32 ssrc) override;
|
||||||
virtual bool SetRenderer(uint32 ssrc, VideoRenderer* renderer) override;
|
bool SetRenderer(uint32 ssrc, VideoRenderer* renderer) override;
|
||||||
virtual bool GetStats(VideoMediaInfo* info) override;
|
bool GetStats(VideoMediaInfo* info) override;
|
||||||
virtual bool SetCapturer(uint32 ssrc, VideoCapturer* capturer) override;
|
bool SetCapturer(uint32 ssrc, VideoCapturer* capturer) override;
|
||||||
virtual bool SendIntraFrame() override;
|
bool SendIntraFrame() override;
|
||||||
virtual bool RequestIntraFrame() override;
|
bool RequestIntraFrame() override;
|
||||||
|
|
||||||
virtual void OnPacketReceived(rtc::Buffer* packet,
|
void OnPacketReceived(rtc::Buffer* packet,
|
||||||
const rtc::PacketTime& packet_time) override;
|
const rtc::PacketTime& packet_time) override;
|
||||||
virtual void OnRtcpReceived(rtc::Buffer* packet,
|
void OnRtcpReceived(rtc::Buffer* packet,
|
||||||
const rtc::PacketTime& packet_time) override;
|
const rtc::PacketTime& packet_time) override;
|
||||||
virtual void OnReadyToSend(bool ready) override;
|
void OnReadyToSend(bool ready) override;
|
||||||
virtual bool MuteStream(uint32 ssrc, bool mute) override;
|
bool MuteStream(uint32 ssrc, bool mute) override;
|
||||||
|
|
||||||
// Set send/receive RTP header extensions. This must be done before creating
|
// Set send/receive RTP header extensions. This must be done before creating
|
||||||
// streams as it only has effect on future streams.
|
// streams as it only has effect on future streams.
|
||||||
virtual bool SetRecvRtpHeaderExtensions(
|
bool SetRecvRtpHeaderExtensions(
|
||||||
const std::vector<RtpHeaderExtension>& extensions) override;
|
const std::vector<RtpHeaderExtension>& extensions) override;
|
||||||
virtual bool SetSendRtpHeaderExtensions(
|
bool SetSendRtpHeaderExtensions(
|
||||||
const std::vector<RtpHeaderExtension>& extensions) override;
|
const std::vector<RtpHeaderExtension>& extensions) override;
|
||||||
virtual bool SetMaxSendBandwidth(int bps) override;
|
bool SetMaxSendBandwidth(int bps) override;
|
||||||
virtual bool SetOptions(const VideoOptions& options) override;
|
bool SetOptions(const VideoOptions& options) override;
|
||||||
virtual bool GetOptions(VideoOptions* options) const override {
|
bool GetOptions(VideoOptions* options) const override {
|
||||||
*options = options_;
|
*options = options_;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
virtual void SetInterface(NetworkInterface* iface) override;
|
void SetInterface(NetworkInterface* iface) override;
|
||||||
virtual void UpdateAspectRatio(int ratio_w, int ratio_h) override;
|
void UpdateAspectRatio(int ratio_w, int ratio_h) override;
|
||||||
|
|
||||||
virtual void OnMessage(rtc::Message* msg) override;
|
void OnMessage(rtc::Message* msg) override;
|
||||||
|
|
||||||
virtual void OnLoadUpdate(Load load) override;
|
void OnLoadUpdate(Load load) override;
|
||||||
|
|
||||||
// Implemented for VideoMediaChannelTest.
|
// Implemented for VideoMediaChannelTest.
|
||||||
bool sending() const { return sending_; }
|
bool sending() const { return sending_; }
|
||||||
@ -396,9 +394,9 @@ class WebRtcVideoChannel2 : public rtc::MessageHandler,
|
|||||||
void SetRecvCodecs(const std::vector<VideoCodecSettings>& recv_codecs);
|
void SetRecvCodecs(const std::vector<VideoCodecSettings>& recv_codecs);
|
||||||
void SetRtpExtensions(const std::vector<webrtc::RtpExtension>& extensions);
|
void SetRtpExtensions(const std::vector<webrtc::RtpExtension>& extensions);
|
||||||
|
|
||||||
virtual void RenderFrame(const webrtc::I420VideoFrame& frame,
|
void RenderFrame(const webrtc::I420VideoFrame& frame,
|
||||||
int time_to_render_ms) override;
|
int time_to_render_ms) override;
|
||||||
virtual bool IsTextureSupported() const override;
|
bool IsTextureSupported() const override;
|
||||||
|
|
||||||
void SetRenderer(cricket::VideoRenderer* renderer);
|
void SetRenderer(cricket::VideoRenderer* renderer);
|
||||||
cricket::VideoRenderer* GetRenderer();
|
cricket::VideoRenderer* GetRenderer();
|
||||||
@ -449,8 +447,8 @@ class WebRtcVideoChannel2 : public rtc::MessageHandler,
|
|||||||
void Construct(webrtc::Call* call, WebRtcVideoEngine2* engine);
|
void Construct(webrtc::Call* call, WebRtcVideoEngine2* engine);
|
||||||
void SetDefaultOptions();
|
void SetDefaultOptions();
|
||||||
|
|
||||||
virtual bool SendRtp(const uint8_t* data, size_t len) override;
|
bool SendRtp(const uint8_t* data, size_t len) override;
|
||||||
virtual bool SendRtcp(const uint8_t* data, size_t len) override;
|
bool SendRtcp(const uint8_t* data, size_t len) override;
|
||||||
|
|
||||||
void StartAllSendStreams();
|
void StartAllSendStreams();
|
||||||
void StopAllSendStreams();
|
void StopAllSendStreams();
|
||||||
|
@ -392,8 +392,7 @@ class WebRtcVideoEngine2Test : public ::testing::Test {
|
|||||||
FakeCall* GetCall() { return fake_call_; }
|
FakeCall* GetCall() { return fake_call_; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
virtual webrtc::Call* CreateCall(
|
webrtc::Call* CreateCall(const webrtc::Call::Config& config) override {
|
||||||
const webrtc::Call::Config& config) OVERRIDE {
|
|
||||||
assert(fake_call_ == NULL);
|
assert(fake_call_ == NULL);
|
||||||
fake_call_ = new FakeCall(config);
|
fake_call_ = new FakeCall(config);
|
||||||
return fake_call_;
|
return fake_call_;
|
||||||
@ -799,7 +798,7 @@ class WebRtcVideoChannel2BaseTest
|
|||||||
protected:
|
protected:
|
||||||
typedef VideoMediaChannelTest<WebRtcVideoEngine2, WebRtcVideoChannel2> Base;
|
typedef VideoMediaChannelTest<WebRtcVideoEngine2, WebRtcVideoChannel2> Base;
|
||||||
|
|
||||||
virtual cricket::VideoCodec DefaultCodec() OVERRIDE { return kVp8Codec; }
|
cricket::VideoCodec DefaultCodec() override { return kVp8Codec; }
|
||||||
};
|
};
|
||||||
|
|
||||||
#define WEBRTC_BASE_TEST(test) \
|
#define WEBRTC_BASE_TEST(test) \
|
||||||
@ -923,7 +922,7 @@ class WebRtcVideoChannel2Test : public WebRtcVideoEngine2Test,
|
|||||||
public WebRtcCallFactory {
|
public WebRtcCallFactory {
|
||||||
public:
|
public:
|
||||||
WebRtcVideoChannel2Test() : fake_call_(NULL) {}
|
WebRtcVideoChannel2Test() : fake_call_(NULL) {}
|
||||||
virtual void SetUp() OVERRIDE {
|
void SetUp() override {
|
||||||
engine_.SetCallFactory(this);
|
engine_.SetCallFactory(this);
|
||||||
engine_.Init(rtc::Thread::Current());
|
engine_.Init(rtc::Thread::Current());
|
||||||
channel_.reset(engine_.CreateChannel(cricket::VideoOptions(), NULL));
|
channel_.reset(engine_.CreateChannel(cricket::VideoOptions(), NULL));
|
||||||
@ -933,8 +932,7 @@ class WebRtcVideoChannel2Test : public WebRtcVideoEngine2Test,
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual webrtc::Call* CreateCall(
|
webrtc::Call* CreateCall(const webrtc::Call::Config& config) override {
|
||||||
const webrtc::Call::Config& config) OVERRIDE {
|
|
||||||
assert(fake_call_ == NULL);
|
assert(fake_call_ == NULL);
|
||||||
fake_call_ = new FakeCall(config);
|
fake_call_ = new FakeCall(config);
|
||||||
return fake_call_;
|
return fake_call_;
|
||||||
@ -2325,7 +2323,7 @@ class WebRtcVideoChannel2SimulcastTest : public WebRtcVideoEngine2SimulcastTest,
|
|||||||
public:
|
public:
|
||||||
WebRtcVideoChannel2SimulcastTest() : fake_call_(NULL) {}
|
WebRtcVideoChannel2SimulcastTest() : fake_call_(NULL) {}
|
||||||
|
|
||||||
virtual void SetUp() OVERRIDE {
|
void SetUp() override {
|
||||||
engine_.SetCallFactory(this);
|
engine_.SetCallFactory(this);
|
||||||
engine_.Init(rtc::Thread::Current());
|
engine_.Init(rtc::Thread::Current());
|
||||||
channel_.reset(engine_.CreateChannel(VideoOptions(), NULL));
|
channel_.reset(engine_.CreateChannel(VideoOptions(), NULL));
|
||||||
@ -2334,8 +2332,7 @@ class WebRtcVideoChannel2SimulcastTest : public WebRtcVideoEngine2SimulcastTest,
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual webrtc::Call* CreateCall(
|
webrtc::Call* CreateCall(const webrtc::Call::Config& config) override {
|
||||||
const webrtc::Call::Config& config) OVERRIDE {
|
|
||||||
assert(fake_call_ == NULL);
|
assert(fake_call_ == NULL);
|
||||||
fake_call_ = new FakeCall(config);
|
fake_call_ = new FakeCall(config);
|
||||||
return fake_call_;
|
return fake_call_;
|
||||||
|
@ -54,16 +54,16 @@ class FakeVideoSendStream : public webrtc::VideoSendStream,
|
|||||||
void SetStats(const webrtc::VideoSendStream::Stats& stats);
|
void SetStats(const webrtc::VideoSendStream::Stats& stats);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
virtual void SwapFrame(webrtc::I420VideoFrame* frame) OVERRIDE;
|
void SwapFrame(webrtc::I420VideoFrame* frame) override;
|
||||||
virtual webrtc::VideoSendStream::Stats GetStats() OVERRIDE;
|
webrtc::VideoSendStream::Stats GetStats() override;
|
||||||
|
|
||||||
virtual bool ReconfigureVideoEncoder(
|
bool ReconfigureVideoEncoder(
|
||||||
const webrtc::VideoEncoderConfig& config) OVERRIDE;
|
const webrtc::VideoEncoderConfig& config) override;
|
||||||
|
|
||||||
virtual webrtc::VideoSendStreamInput* Input() OVERRIDE;
|
webrtc::VideoSendStreamInput* Input() override;
|
||||||
|
|
||||||
virtual void Start() OVERRIDE;
|
void Start() override;
|
||||||
virtual void Stop() OVERRIDE;
|
void Stop() override;
|
||||||
|
|
||||||
bool sending_;
|
bool sending_;
|
||||||
webrtc::VideoSendStream::Config config_;
|
webrtc::VideoSendStream::Config config_;
|
||||||
@ -89,10 +89,10 @@ class FakeVideoReceiveStream : public webrtc::VideoReceiveStream {
|
|||||||
void SetStats(const webrtc::VideoReceiveStream::Stats& stats);
|
void SetStats(const webrtc::VideoReceiveStream::Stats& stats);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
virtual webrtc::VideoReceiveStream::Stats GetStats() const OVERRIDE;
|
webrtc::VideoReceiveStream::Stats GetStats() const override;
|
||||||
|
|
||||||
virtual void Start() OVERRIDE;
|
void Start() override;
|
||||||
virtual void Stop() OVERRIDE;
|
void Stop() override;
|
||||||
|
|
||||||
webrtc::VideoReceiveStream::Config config_;
|
webrtc::VideoReceiveStream::Config config_;
|
||||||
bool receiving_;
|
bool receiving_;
|
||||||
@ -123,25 +123,24 @@ class FakeCall : public webrtc::Call {
|
|||||||
void SetStats(const webrtc::Call::Stats& stats);
|
void SetStats(const webrtc::Call::Stats& stats);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
virtual webrtc::VideoSendStream* CreateVideoSendStream(
|
webrtc::VideoSendStream* CreateVideoSendStream(
|
||||||
const webrtc::VideoSendStream::Config& config,
|
const webrtc::VideoSendStream::Config& config,
|
||||||
const webrtc::VideoEncoderConfig& encoder_config) OVERRIDE;
|
const webrtc::VideoEncoderConfig& encoder_config) override;
|
||||||
|
|
||||||
virtual void DestroyVideoSendStream(
|
void DestroyVideoSendStream(webrtc::VideoSendStream* send_stream) override;
|
||||||
webrtc::VideoSendStream* send_stream) OVERRIDE;
|
|
||||||
|
|
||||||
virtual webrtc::VideoReceiveStream* CreateVideoReceiveStream(
|
webrtc::VideoReceiveStream* CreateVideoReceiveStream(
|
||||||
const webrtc::VideoReceiveStream::Config& config) OVERRIDE;
|
const webrtc::VideoReceiveStream::Config& config) override;
|
||||||
|
|
||||||
virtual void DestroyVideoReceiveStream(
|
void DestroyVideoReceiveStream(
|
||||||
webrtc::VideoReceiveStream* receive_stream) OVERRIDE;
|
webrtc::VideoReceiveStream* receive_stream) override;
|
||||||
virtual webrtc::PacketReceiver* Receiver() OVERRIDE;
|
webrtc::PacketReceiver* Receiver() override;
|
||||||
|
|
||||||
virtual webrtc::Call::Stats GetStats() const OVERRIDE;
|
webrtc::Call::Stats GetStats() const override;
|
||||||
|
|
||||||
virtual void SetBitrateConfig(
|
void SetBitrateConfig(
|
||||||
const webrtc::Call::Config::BitrateConfig& bitrate_config) OVERRIDE;
|
const webrtc::Call::Config::BitrateConfig& bitrate_config) override;
|
||||||
virtual void SignalNetworkState(webrtc::Call::NetworkState state) OVERRIDE;
|
void SignalNetworkState(webrtc::Call::NetworkState state) override;
|
||||||
|
|
||||||
webrtc::Call::Config config_;
|
webrtc::Call::Config config_;
|
||||||
webrtc::Call::NetworkState network_state_;
|
webrtc::Call::NetworkState network_state_;
|
||||||
|
5
talk/media/webrtc/webrtcvideoframefactory.h
Executable file → Normal file
5
talk/media/webrtc/webrtcvideoframefactory.h
Executable file → Normal file
@ -37,8 +37,9 @@ struct CapturedFrame;
|
|||||||
// Creates instances of cricket::WebRtcVideoFrame.
|
// Creates instances of cricket::WebRtcVideoFrame.
|
||||||
class WebRtcVideoFrameFactory : public VideoFrameFactory {
|
class WebRtcVideoFrameFactory : public VideoFrameFactory {
|
||||||
public:
|
public:
|
||||||
virtual VideoFrame* CreateAliasedFrame(
|
VideoFrame* CreateAliasedFrame(const CapturedFrame* aliased_frame,
|
||||||
const CapturedFrame* aliased_frame, int width, int height) const OVERRIDE;
|
int width,
|
||||||
|
int height) const override;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace cricket
|
} // namespace cricket
|
||||||
|
@ -1790,11 +1790,11 @@ class WebRtcVoiceMediaChannel::WebRtcVoiceChannelRenderer
|
|||||||
|
|
||||||
// AudioRenderer::Sink implementation.
|
// AudioRenderer::Sink implementation.
|
||||||
// This method is called on the audio thread.
|
// This method is called on the audio thread.
|
||||||
virtual void OnData(const void* audio_data,
|
void OnData(const void* audio_data,
|
||||||
int bits_per_sample,
|
int bits_per_sample,
|
||||||
int sample_rate,
|
int sample_rate,
|
||||||
int number_of_channels,
|
int number_of_channels,
|
||||||
int number_of_frames) OVERRIDE {
|
int number_of_frames) override {
|
||||||
voe_audio_transport_->OnData(channel_,
|
voe_audio_transport_->OnData(channel_,
|
||||||
audio_data,
|
audio_data,
|
||||||
bits_per_sample,
|
bits_per_sample,
|
||||||
@ -1805,7 +1805,7 @@ class WebRtcVoiceMediaChannel::WebRtcVoiceChannelRenderer
|
|||||||
|
|
||||||
// Callback from the |renderer_| when it is going away. In case Start() has
|
// Callback from the |renderer_| when it is going away. In case Start() has
|
||||||
// never been called, this callback won't be triggered.
|
// never been called, this callback won't be triggered.
|
||||||
virtual void OnClose() OVERRIDE {
|
void OnClose() override {
|
||||||
rtc::CritScope lock(&lock_);
|
rtc::CritScope lock(&lock_);
|
||||||
// Set |renderer_| to NULL to make sure no more callback will get into
|
// Set |renderer_| to NULL to make sure no more callback will get into
|
||||||
// the renderer.
|
// the renderer.
|
||||||
|
@ -69,8 +69,8 @@ class WebRtcSoundclipStream : public webrtc::InStream {
|
|||||||
}
|
}
|
||||||
void set_loop(bool loop) { loop_ = loop; }
|
void set_loop(bool loop) { loop_ = loop; }
|
||||||
|
|
||||||
virtual int Read(void* buf, size_t len) OVERRIDE;
|
int Read(void* buf, size_t len) override;
|
||||||
virtual int Rewind() OVERRIDE;
|
int Rewind() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
rtc::MemoryStream mem_;
|
rtc::MemoryStream mem_;
|
||||||
@ -80,9 +80,7 @@ class WebRtcSoundclipStream : public webrtc::InStream {
|
|||||||
// WebRtcMonitorStream is used to monitor a stream coming from WebRtc.
|
// WebRtcMonitorStream is used to monitor a stream coming from WebRtc.
|
||||||
// For now we just dump the data.
|
// For now we just dump the data.
|
||||||
class WebRtcMonitorStream : public webrtc::OutStream {
|
class WebRtcMonitorStream : public webrtc::OutStream {
|
||||||
virtual bool Write(const void *buf, size_t len) OVERRIDE {
|
bool Write(const void* buf, size_t len) override { return true; }
|
||||||
return true;
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class AudioDeviceModule;
|
class AudioDeviceModule;
|
||||||
@ -152,12 +150,12 @@ class WebRtcVoiceEngine
|
|||||||
MediaProcessorDirection direction);
|
MediaProcessorDirection direction);
|
||||||
|
|
||||||
// Method from webrtc::VoEMediaProcess
|
// Method from webrtc::VoEMediaProcess
|
||||||
virtual void Process(int channel,
|
void Process(int channel,
|
||||||
webrtc::ProcessingTypes type,
|
webrtc::ProcessingTypes type,
|
||||||
int16_t audio10ms[],
|
int16_t audio10ms[],
|
||||||
int length,
|
int length,
|
||||||
int sampling_freq,
|
int sampling_freq,
|
||||||
bool is_stereo) OVERRIDE;
|
bool is_stereo) override;
|
||||||
|
|
||||||
// For tracking WebRtc channels. Needed because we have to pause them
|
// For tracking WebRtc channels. Needed because we have to pause them
|
||||||
// all when switching devices.
|
// all when switching devices.
|
||||||
@ -211,12 +209,10 @@ class WebRtcVoiceEngine
|
|||||||
bool ApplyOptions(const AudioOptions& options);
|
bool ApplyOptions(const AudioOptions& options);
|
||||||
|
|
||||||
// webrtc::TraceCallback:
|
// webrtc::TraceCallback:
|
||||||
virtual void Print(webrtc::TraceLevel level,
|
void Print(webrtc::TraceLevel level, const char* trace, int length) override;
|
||||||
const char* trace,
|
|
||||||
int length) OVERRIDE;
|
|
||||||
|
|
||||||
// webrtc::VoiceEngineObserver:
|
// webrtc::VoiceEngineObserver:
|
||||||
virtual void CallbackOnError(int channel, int errCode) OVERRIDE;
|
void CallbackOnError(int channel, int errCode) override;
|
||||||
|
|
||||||
// Given the device type, name, and id, find device id. Return true and
|
// Given the device type, name, and id, find device id. Return true and
|
||||||
// set the output parameter rtc_id if successful.
|
// set the output parameter rtc_id if successful.
|
||||||
@ -315,14 +311,12 @@ class WebRtcMediaChannel : public T, public webrtc::Transport {
|
|||||||
|
|
||||||
protected:
|
protected:
|
||||||
// implements Transport interface
|
// implements Transport interface
|
||||||
virtual int SendPacket(int channel, const void *data, size_t len) OVERRIDE {
|
int SendPacket(int channel, const void* data, size_t len) override {
|
||||||
rtc::Buffer packet(data, len, kMaxRtpPacketLen);
|
rtc::Buffer packet(data, len, kMaxRtpPacketLen);
|
||||||
return T::SendPacket(&packet) ? static_cast<int>(len) : -1;
|
return T::SendPacket(&packet) ? static_cast<int>(len) : -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual int SendRTCPPacket(int channel,
|
int SendRTCPPacket(int channel, const void* data, size_t len) override {
|
||||||
const void* data,
|
|
||||||
size_t len) OVERRIDE {
|
|
||||||
rtc::Buffer packet(data, len, kMaxRtpPacketLen);
|
rtc::Buffer packet(data, len, kMaxRtpPacketLen);
|
||||||
return T::SendRtcp(&packet) ? static_cast<int>(len) : -1;
|
return T::SendRtcp(&packet) ? static_cast<int>(len) : -1;
|
||||||
}
|
}
|
||||||
|
@ -183,28 +183,6 @@ inline bool ImplicitCastToBool(bool result) { return result; }
|
|||||||
#define FORCE_INLINE
|
#define FORCE_INLINE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Borrowed from Chromium's base/compiler_specific.h.
|
|
||||||
// Annotate a virtual method indicating it must be overriding a virtual
|
|
||||||
// method in the parent class.
|
|
||||||
// Use like:
|
|
||||||
// virtual void foo() OVERRIDE;
|
|
||||||
#if defined(WEBRTC_WIN)
|
|
||||||
#define OVERRIDE override
|
|
||||||
#elif defined(__clang__)
|
|
||||||
// Clang defaults to C++03 and warns about using override. Squelch that.
|
|
||||||
// Intentionally no push/pop here so all users of OVERRIDE ignore the warning
|
|
||||||
// too. This is like passing -Wno-c++11-extensions, except that GCC won't die
|
|
||||||
// (because it won't see this pragma).
|
|
||||||
#pragma clang diagnostic ignored "-Wc++11-extensions"
|
|
||||||
#define OVERRIDE override
|
|
||||||
#elif defined(__GNUC__) && __cplusplus >= 201103 && \
|
|
||||||
(__GNUC__ * 10000 + __GNUC_MINOR__ * 100) >= 40700
|
|
||||||
// GCC 4.7 supports explicit virtual overrides when C++11 support is enabled.
|
|
||||||
#define OVERRIDE override
|
|
||||||
#else
|
|
||||||
#define OVERRIDE
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Annotate a function indicating the caller must examine the return value.
|
// Annotate a function indicating the caller must examine the return value.
|
||||||
// Use like:
|
// Use like:
|
||||||
// int foo() WARN_UNUSED_RESULT;
|
// int foo() WARN_UNUSED_RESULT;
|
||||||
|
@ -61,9 +61,7 @@ class CallDoStuffOnThread : public Thread {
|
|||||||
SetName("call_do_stuff_on_thread", NULL);
|
SetName("call_do_stuff_on_thread", NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void Run() OVERRIDE {
|
void Run() override { thread_checker_class_->DoStuff(); }
|
||||||
thread_checker_class_->DoStuff();
|
|
||||||
}
|
|
||||||
|
|
||||||
// New method. Needed since Thread::Join is protected, and it is called by
|
// New method. Needed since Thread::Join is protected, and it is called by
|
||||||
// the TEST.
|
// the TEST.
|
||||||
@ -87,9 +85,7 @@ class DeleteThreadCheckerClassOnThread : public Thread {
|
|||||||
SetName("delete_thread_checker_class_on_thread", NULL);
|
SetName("delete_thread_checker_class_on_thread", NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void Run() OVERRIDE {
|
void Run() override { thread_checker_class_.reset(); }
|
||||||
thread_checker_class_.reset();
|
|
||||||
}
|
|
||||||
|
|
||||||
// New method. Needed since Thread::Join is protected, and it is called by
|
// New method. Needed since Thread::Join is protected, and it is called by
|
||||||
// the TEST.
|
// the TEST.
|
||||||
|
@ -17,11 +17,11 @@ namespace {
|
|||||||
// Callback Function to add 3 to every sample in the signal.
|
// Callback Function to add 3 to every sample in the signal.
|
||||||
class PlusThreeBlockerCallback : public webrtc::BlockerCallback {
|
class PlusThreeBlockerCallback : public webrtc::BlockerCallback {
|
||||||
public:
|
public:
|
||||||
virtual void ProcessBlock(const float* const* input,
|
void ProcessBlock(const float* const* input,
|
||||||
int num_frames,
|
int num_frames,
|
||||||
int num_input_channels,
|
int num_input_channels,
|
||||||
int num_output_channels,
|
int num_output_channels,
|
||||||
float* const* output) OVERRIDE {
|
float* const* output) override {
|
||||||
for (int i = 0; i < num_output_channels; ++i) {
|
for (int i = 0; i < num_output_channels; ++i) {
|
||||||
for (int j = 0; j < num_frames; ++j) {
|
for (int j = 0; j < num_frames; ++j) {
|
||||||
output[i][j] = input[i][j] + 3;
|
output[i][j] = input[i][j] + 3;
|
||||||
@ -33,11 +33,11 @@ class PlusThreeBlockerCallback : public webrtc::BlockerCallback {
|
|||||||
// No-op Callback Function.
|
// No-op Callback Function.
|
||||||
class CopyBlockerCallback : public webrtc::BlockerCallback {
|
class CopyBlockerCallback : public webrtc::BlockerCallback {
|
||||||
public:
|
public:
|
||||||
virtual void ProcessBlock(const float* const* input,
|
void ProcessBlock(const float* const* input,
|
||||||
int num_frames,
|
int num_frames,
|
||||||
int num_input_channels,
|
int num_input_channels,
|
||||||
int num_output_channels,
|
int num_output_channels,
|
||||||
float* const* output) OVERRIDE {
|
float* const* output) override {
|
||||||
for (int i = 0; i < num_output_channels; ++i) {
|
for (int i = 0; i < num_output_channels; ++i) {
|
||||||
for (int j = 0; j < num_frames; ++j) {
|
for (int j = 0; j < num_frames; ++j) {
|
||||||
output[i][j] = input[i][j];
|
output[i][j] = input[i][j];
|
||||||
|
@ -25,7 +25,7 @@ class FIRFilterC : public FIRFilter {
|
|||||||
FIRFilterC(const float* coefficients,
|
FIRFilterC(const float* coefficients,
|
||||||
size_t coefficients_length);
|
size_t coefficients_length);
|
||||||
|
|
||||||
virtual void Filter(const float* in, size_t length, float* out) OVERRIDE;
|
void Filter(const float* in, size_t length, float* out) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
size_t coefficients_length_;
|
size_t coefficients_length_;
|
||||||
|
@ -23,7 +23,7 @@ class FIRFilterNEON : public FIRFilter {
|
|||||||
size_t coefficients_length,
|
size_t coefficients_length,
|
||||||
size_t max_input_length);
|
size_t max_input_length);
|
||||||
|
|
||||||
virtual void Filter(const float* in, size_t length, float* out) OVERRIDE;
|
void Filter(const float* in, size_t length, float* out) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
size_t coefficients_length_;
|
size_t coefficients_length_;
|
||||||
|
@ -23,7 +23,7 @@ class FIRFilterSSE2 : public FIRFilter {
|
|||||||
size_t coefficients_length,
|
size_t coefficients_length,
|
||||||
size_t max_input_length);
|
size_t max_input_length);
|
||||||
|
|
||||||
virtual void Filter(const float* in, size_t length, float* out) OVERRIDE;
|
void Filter(const float* in, size_t length, float* out) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
size_t coefficients_length_;
|
size_t coefficients_length_;
|
||||||
|
@ -31,7 +31,7 @@ class SinusoidalLinearChirpSource : public SincResamplerCallback {
|
|||||||
|
|
||||||
virtual ~SinusoidalLinearChirpSource() {}
|
virtual ~SinusoidalLinearChirpSource() {}
|
||||||
|
|
||||||
virtual void Run(int frames, float* destination) OVERRIDE;
|
void Run(int frames, float* destination) override;
|
||||||
|
|
||||||
double Frequency(int position);
|
double Frequency(int position);
|
||||||
|
|
||||||
|
@ -12,11 +12,19 @@
|
|||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
#include "webrtc/base/checks.h"
|
||||||
|
|
||||||
namespace webrtc {
|
namespace webrtc {
|
||||||
|
|
||||||
int InStream::Rewind() { return -1; }
|
int InStream::Rewind() {
|
||||||
|
DCHECK(false);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
int OutStream::Rewind() { return -1; }
|
int OutStream::Rewind() {
|
||||||
|
DCHECK(false);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
StreamDataCounters::StreamDataCounters() : first_packet_time_ms(-1) {}
|
StreamDataCounters::StreamDataCounters() : first_packet_time_ms(-1) {}
|
||||||
|
|
||||||
|
@ -56,6 +56,8 @@ class Config;
|
|||||||
class InStream
|
class InStream
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
// Reads |length| bytes from file to |buf|. Returns the number of bytes read
|
||||||
|
// or -1 on error.
|
||||||
virtual int Read(void *buf, size_t len) = 0;
|
virtual int Read(void *buf, size_t len) = 0;
|
||||||
virtual int Rewind();
|
virtual int Rewind();
|
||||||
virtual ~InStream() {}
|
virtual ~InStream() {}
|
||||||
@ -66,6 +68,8 @@ protected:
|
|||||||
class OutStream
|
class OutStream
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
// Writes |length| bytes from |buf| to file. The actual writing may happen
|
||||||
|
// some time later. Call Flush() to force a write.
|
||||||
virtual bool Write(const void *buf, size_t len) = 0;
|
virtual bool Write(const void *buf, size_t len) = 0;
|
||||||
virtual int Rewind();
|
virtual int Rewind();
|
||||||
virtual ~OutStream() {}
|
virtual ~OutStream() {}
|
||||||
|
@ -46,7 +46,7 @@ class AudioEncoderCngTest : public ::testing::Test {
|
|||||||
config_.payload_type = kCngPayloadType;
|
config_.payload_type = kCngPayloadType;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void TearDown() OVERRIDE {
|
void TearDown() override {
|
||||||
EXPECT_CALL(*mock_vad_, Die()).Times(1);
|
EXPECT_CALL(*mock_vad_, Die()).Times(1);
|
||||||
cng_.reset();
|
cng_.reset();
|
||||||
// Don't expect the cng_ object to delete the AudioEncoder object. But it
|
// Don't expect the cng_ object to delete the AudioEncoder object. But it
|
||||||
@ -407,7 +407,7 @@ class AudioEncoderCngDeathTest : public AudioEncoderCngTest {
|
|||||||
// Override AudioEncoderCngTest::TearDown, since that one expects a call to
|
// Override AudioEncoderCngTest::TearDown, since that one expects a call to
|
||||||
// the destructor of |mock_vad_|. In this case, that object is already
|
// the destructor of |mock_vad_|. In this case, that object is already
|
||||||
// deleted.
|
// deleted.
|
||||||
virtual void TearDown() OVERRIDE {
|
void TearDown() override {
|
||||||
cng_.reset();
|
cng_.reset();
|
||||||
// Don't expect the cng_ object to delete the AudioEncoder object. But it
|
// Don't expect the cng_ object to delete the AudioEncoder object. But it
|
||||||
// will be deleted with the test fixture. This is why we explicitly delete
|
// will be deleted with the test fixture. This is why we explicitly delete
|
||||||
|
@ -44,22 +44,22 @@ class AudioEncoderCng final : public AudioEncoder {
|
|||||||
|
|
||||||
explicit AudioEncoderCng(const Config& config);
|
explicit AudioEncoderCng(const Config& config);
|
||||||
|
|
||||||
virtual ~AudioEncoderCng();
|
~AudioEncoderCng() override;
|
||||||
|
|
||||||
virtual int SampleRateHz() const OVERRIDE;
|
int SampleRateHz() const override;
|
||||||
virtual int NumChannels() const OVERRIDE;
|
int NumChannels() const override;
|
||||||
int RtpTimestampRateHz() const override;
|
int RtpTimestampRateHz() const override;
|
||||||
virtual int Num10MsFramesInNextPacket() const OVERRIDE;
|
int Num10MsFramesInNextPacket() const override;
|
||||||
virtual int Max10MsFramesInAPacket() const OVERRIDE;
|
int Max10MsFramesInAPacket() const override;
|
||||||
void SetTargetBitrate(int bits_per_second) override;
|
void SetTargetBitrate(int bits_per_second) override;
|
||||||
void SetProjectedPacketLossRate(double fraction) override;
|
void SetProjectedPacketLossRate(double fraction) override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void EncodeInternal(uint32_t rtp_timestamp,
|
void EncodeInternal(uint32_t rtp_timestamp,
|
||||||
const int16_t* audio,
|
const int16_t* audio,
|
||||||
size_t max_encoded_bytes,
|
size_t max_encoded_bytes,
|
||||||
uint8_t* encoded,
|
uint8_t* encoded,
|
||||||
EncodedInfo* info) OVERRIDE;
|
EncodedInfo* info) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Deleter for use with scoped_ptr. E.g., use as
|
// Deleter for use with scoped_ptr. E.g., use as
|
||||||
|
@ -30,21 +30,21 @@ class AudioEncoderPcm : public AudioEncoder {
|
|||||||
: frame_size_ms(20), num_channels(1), payload_type(pt) {}
|
: frame_size_ms(20), num_channels(1), payload_type(pt) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
virtual ~AudioEncoderPcm();
|
~AudioEncoderPcm() override;
|
||||||
|
|
||||||
virtual int SampleRateHz() const OVERRIDE;
|
int SampleRateHz() const override;
|
||||||
virtual int NumChannels() const OVERRIDE;
|
int NumChannels() const override;
|
||||||
virtual int Num10MsFramesInNextPacket() const OVERRIDE;
|
int Num10MsFramesInNextPacket() const override;
|
||||||
virtual int Max10MsFramesInAPacket() const OVERRIDE;
|
int Max10MsFramesInAPacket() const override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
AudioEncoderPcm(const Config& config, int sample_rate_hz);
|
AudioEncoderPcm(const Config& config, int sample_rate_hz);
|
||||||
|
|
||||||
virtual void EncodeInternal(uint32_t rtp_timestamp,
|
void EncodeInternal(uint32_t rtp_timestamp,
|
||||||
const int16_t* audio,
|
const int16_t* audio,
|
||||||
size_t max_encoded_bytes,
|
size_t max_encoded_bytes,
|
||||||
uint8_t* encoded,
|
uint8_t* encoded,
|
||||||
EncodedInfo* info) OVERRIDE;
|
EncodedInfo* info) override;
|
||||||
|
|
||||||
virtual int16_t EncodeCall(const int16_t* audio,
|
virtual int16_t EncodeCall(const int16_t* audio,
|
||||||
size_t input_len,
|
size_t input_len,
|
||||||
@ -70,9 +70,9 @@ class AudioEncoderPcmA : public AudioEncoderPcm {
|
|||||||
: AudioEncoderPcm(config, kSampleRateHz) {}
|
: AudioEncoderPcm(config, kSampleRateHz) {}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual int16_t EncodeCall(const int16_t* audio,
|
int16_t EncodeCall(const int16_t* audio,
|
||||||
size_t input_len,
|
size_t input_len,
|
||||||
uint8_t* encoded) OVERRIDE;
|
uint8_t* encoded) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static const int kSampleRateHz = 8000;
|
static const int kSampleRateHz = 8000;
|
||||||
@ -88,9 +88,9 @@ class AudioEncoderPcmU : public AudioEncoderPcm {
|
|||||||
: AudioEncoderPcm(config, kSampleRateHz) {}
|
: AudioEncoderPcm(config, kSampleRateHz) {}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual int16_t EncodeCall(const int16_t* audio,
|
int16_t EncodeCall(const int16_t* audio,
|
||||||
size_t input_len,
|
size_t input_len,
|
||||||
uint8_t* encoded) OVERRIDE;
|
uint8_t* encoded) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static const int kSampleRateHz = 8000;
|
static const int kSampleRateHz = 8000;
|
||||||
|
@ -28,20 +28,20 @@ class AudioEncoderG722 : public AudioEncoder {
|
|||||||
};
|
};
|
||||||
|
|
||||||
explicit AudioEncoderG722(const Config& config);
|
explicit AudioEncoderG722(const Config& config);
|
||||||
virtual ~AudioEncoderG722();
|
~AudioEncoderG722() override;
|
||||||
|
|
||||||
virtual int SampleRateHz() const OVERRIDE;
|
int SampleRateHz() const override;
|
||||||
int RtpTimestampRateHz() const override;
|
int RtpTimestampRateHz() const override;
|
||||||
virtual int NumChannels() const OVERRIDE;
|
int NumChannels() const override;
|
||||||
virtual int Num10MsFramesInNextPacket() const OVERRIDE;
|
int Num10MsFramesInNextPacket() const override;
|
||||||
virtual int Max10MsFramesInAPacket() const OVERRIDE;
|
int Max10MsFramesInAPacket() const override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void EncodeInternal(uint32_t rtp_timestamp,
|
void EncodeInternal(uint32_t rtp_timestamp,
|
||||||
const int16_t* audio,
|
const int16_t* audio,
|
||||||
size_t max_encoded_bytes,
|
size_t max_encoded_bytes,
|
||||||
uint8_t* encoded,
|
uint8_t* encoded,
|
||||||
EncodedInfo* info) OVERRIDE;
|
EncodedInfo* info) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// The encoder state for one channel.
|
// The encoder state for one channel.
|
||||||
|
@ -29,19 +29,19 @@ class AudioEncoderIlbc : public AudioEncoder {
|
|||||||
};
|
};
|
||||||
|
|
||||||
explicit AudioEncoderIlbc(const Config& config);
|
explicit AudioEncoderIlbc(const Config& config);
|
||||||
virtual ~AudioEncoderIlbc();
|
~AudioEncoderIlbc() override;
|
||||||
|
|
||||||
virtual int SampleRateHz() const OVERRIDE;
|
int SampleRateHz() const override;
|
||||||
virtual int NumChannels() const OVERRIDE;
|
int NumChannels() const override;
|
||||||
virtual int Num10MsFramesInNextPacket() const OVERRIDE;
|
int Num10MsFramesInNextPacket() const override;
|
||||||
virtual int Max10MsFramesInAPacket() const OVERRIDE;
|
int Max10MsFramesInAPacket() const override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void EncodeInternal(uint32_t rtp_timestamp,
|
void EncodeInternal(uint32_t rtp_timestamp,
|
||||||
const int16_t* audio,
|
const int16_t* audio,
|
||||||
size_t max_encoded_bytes,
|
size_t max_encoded_bytes,
|
||||||
uint8_t* encoded,
|
uint8_t* encoded,
|
||||||
EncodedInfo* info) OVERRIDE;
|
EncodedInfo* info) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static const int kMaxSamplesPerPacket = 480;
|
static const int kMaxSamplesPerPacket = 480;
|
||||||
|
@ -66,42 +66,42 @@ class AudioEncoderDecoderIsacT : public AudioEncoder, public AudioDecoder {
|
|||||||
|
|
||||||
explicit AudioEncoderDecoderIsacT(const Config& config);
|
explicit AudioEncoderDecoderIsacT(const Config& config);
|
||||||
explicit AudioEncoderDecoderIsacT(const ConfigAdaptive& config);
|
explicit AudioEncoderDecoderIsacT(const ConfigAdaptive& config);
|
||||||
virtual ~AudioEncoderDecoderIsacT() OVERRIDE;
|
~AudioEncoderDecoderIsacT() override;
|
||||||
|
|
||||||
// AudioEncoder public methods.
|
// AudioEncoder public methods.
|
||||||
virtual int SampleRateHz() const OVERRIDE;
|
int SampleRateHz() const override;
|
||||||
virtual int NumChannels() const OVERRIDE;
|
int NumChannels() const override;
|
||||||
virtual int Num10MsFramesInNextPacket() const OVERRIDE;
|
int Num10MsFramesInNextPacket() const override;
|
||||||
virtual int Max10MsFramesInAPacket() const OVERRIDE;
|
int Max10MsFramesInAPacket() const override;
|
||||||
|
|
||||||
// AudioDecoder methods.
|
// AudioDecoder methods.
|
||||||
virtual int Decode(const uint8_t* encoded,
|
int Decode(const uint8_t* encoded,
|
||||||
size_t encoded_len,
|
size_t encoded_len,
|
||||||
int sample_rate_hz,
|
int sample_rate_hz,
|
||||||
int16_t* decoded,
|
int16_t* decoded,
|
||||||
SpeechType* speech_type) OVERRIDE;
|
SpeechType* speech_type) override;
|
||||||
virtual int DecodeRedundant(const uint8_t* encoded,
|
int DecodeRedundant(const uint8_t* encoded,
|
||||||
size_t encoded_len,
|
size_t encoded_len,
|
||||||
int sample_rate_hz,
|
int sample_rate_hz,
|
||||||
int16_t* decoded,
|
int16_t* decoded,
|
||||||
SpeechType* speech_type) OVERRIDE;
|
SpeechType* speech_type) override;
|
||||||
virtual bool HasDecodePlc() const OVERRIDE;
|
bool HasDecodePlc() const override;
|
||||||
virtual int DecodePlc(int num_frames, int16_t* decoded) OVERRIDE;
|
int DecodePlc(int num_frames, int16_t* decoded) override;
|
||||||
virtual int Init() OVERRIDE;
|
int Init() override;
|
||||||
virtual int IncomingPacket(const uint8_t* payload,
|
int IncomingPacket(const uint8_t* payload,
|
||||||
size_t payload_len,
|
size_t payload_len,
|
||||||
uint16_t rtp_sequence_number,
|
uint16_t rtp_sequence_number,
|
||||||
uint32_t rtp_timestamp,
|
uint32_t rtp_timestamp,
|
||||||
uint32_t arrival_timestamp) OVERRIDE;
|
uint32_t arrival_timestamp) override;
|
||||||
virtual int ErrorCode() OVERRIDE;
|
int ErrorCode() override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// AudioEncoder protected method.
|
// AudioEncoder protected method.
|
||||||
virtual void EncodeInternal(uint32_t rtp_timestamp,
|
void EncodeInternal(uint32_t rtp_timestamp,
|
||||||
const int16_t* audio,
|
const int16_t* audio,
|
||||||
size_t max_encoded_bytes,
|
size_t max_encoded_bytes,
|
||||||
uint8_t* encoded,
|
uint8_t* encoded,
|
||||||
EncodedInfo* info) OVERRIDE;
|
EncodedInfo* info) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// This value is taken from STREAM_SIZE_MAX_60 for iSAC float (60 ms) and
|
// This value is taken from STREAM_SIZE_MAX_60 for iSAC float (60 ms) and
|
||||||
|
@ -23,8 +23,8 @@ static const int kIsacOutputSamplingKhz = 16;
|
|||||||
class IsacSpeedTest : public AudioCodecSpeedTest {
|
class IsacSpeedTest : public AudioCodecSpeedTest {
|
||||||
protected:
|
protected:
|
||||||
IsacSpeedTest();
|
IsacSpeedTest();
|
||||||
virtual void SetUp() OVERRIDE;
|
void SetUp() override;
|
||||||
virtual void TearDown() OVERRIDE;
|
void TearDown() override;
|
||||||
virtual float EncodeABlock(int16_t* in_data, uint8_t* bit_stream,
|
virtual float EncodeABlock(int16_t* in_data, uint8_t* bit_stream,
|
||||||
int max_bytes, int* encoded_bytes);
|
int max_bytes, int* encoded_bytes);
|
||||||
virtual float DecodeABlock(const uint8_t* bit_stream, int encoded_bytes,
|
virtual float DecodeABlock(const uint8_t* bit_stream, int encoded_bytes,
|
||||||
|
@ -43,23 +43,23 @@ class AudioEncoderOpus final : public AudioEncoder {
|
|||||||
};
|
};
|
||||||
|
|
||||||
explicit AudioEncoderOpus(const Config& config);
|
explicit AudioEncoderOpus(const Config& config);
|
||||||
virtual ~AudioEncoderOpus() OVERRIDE;
|
~AudioEncoderOpus() override;
|
||||||
|
|
||||||
virtual int SampleRateHz() const OVERRIDE;
|
int SampleRateHz() const override;
|
||||||
virtual int NumChannels() const OVERRIDE;
|
int NumChannels() const override;
|
||||||
virtual int Num10MsFramesInNextPacket() const OVERRIDE;
|
int Num10MsFramesInNextPacket() const override;
|
||||||
virtual int Max10MsFramesInAPacket() const OVERRIDE;
|
int Max10MsFramesInAPacket() const override;
|
||||||
void SetTargetBitrate(int bits_per_second) override;
|
void SetTargetBitrate(int bits_per_second) override;
|
||||||
void SetProjectedPacketLossRate(double fraction) override;
|
void SetProjectedPacketLossRate(double fraction) override;
|
||||||
double packet_loss_rate() const { return packet_loss_rate_; }
|
double packet_loss_rate() const { return packet_loss_rate_; }
|
||||||
ApplicationMode application() const { return application_; }
|
ApplicationMode application() const { return application_; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void EncodeInternal(uint32_t rtp_timestamp,
|
void EncodeInternal(uint32_t rtp_timestamp,
|
||||||
const int16_t* audio,
|
const int16_t* audio,
|
||||||
size_t max_encoded_bytes,
|
size_t max_encoded_bytes,
|
||||||
uint8_t* encoded,
|
uint8_t* encoded,
|
||||||
EncodedInfo* info) OVERRIDE;
|
EncodedInfo* info) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
const int num_10ms_frames_per_packet_;
|
const int num_10ms_frames_per_packet_;
|
||||||
|
@ -21,8 +21,8 @@ static const int kOpusSamplingKhz = 48;
|
|||||||
class OpusSpeedTest : public AudioCodecSpeedTest {
|
class OpusSpeedTest : public AudioCodecSpeedTest {
|
||||||
protected:
|
protected:
|
||||||
OpusSpeedTest();
|
OpusSpeedTest();
|
||||||
virtual void SetUp() OVERRIDE;
|
void SetUp() override;
|
||||||
virtual void TearDown() OVERRIDE;
|
void TearDown() override;
|
||||||
virtual float EncodeABlock(int16_t* in_data, uint8_t* bit_stream,
|
virtual float EncodeABlock(int16_t* in_data, uint8_t* bit_stream,
|
||||||
int max_bytes, int* encoded_bytes);
|
int max_bytes, int* encoded_bytes);
|
||||||
virtual float DecodeABlock(const uint8_t* bit_stream, int encoded_bytes,
|
virtual float DecodeABlock(const uint8_t* bit_stream, int encoded_bytes,
|
||||||
|
@ -28,9 +28,9 @@ class AudioEncoderPcm16B : public AudioEncoderPcm {
|
|||||||
: AudioEncoderPcm(config, config.sample_rate_hz) {}
|
: AudioEncoderPcm(config, config.sample_rate_hz) {}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual int16_t EncodeCall(const int16_t* audio,
|
int16_t EncodeCall(const int16_t* audio,
|
||||||
size_t input_len,
|
size_t input_len,
|
||||||
uint8_t* encoded) OVERRIDE;
|
uint8_t* encoded) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace webrtc
|
} // namespace webrtc
|
||||||
|
@ -33,22 +33,22 @@ class AudioEncoderCopyRed : public AudioEncoder {
|
|||||||
// Caller keeps ownership of the AudioEncoder object.
|
// Caller keeps ownership of the AudioEncoder object.
|
||||||
explicit AudioEncoderCopyRed(const Config& config);
|
explicit AudioEncoderCopyRed(const Config& config);
|
||||||
|
|
||||||
virtual ~AudioEncoderCopyRed();
|
~AudioEncoderCopyRed() override;
|
||||||
|
|
||||||
virtual int SampleRateHz() const OVERRIDE;
|
int SampleRateHz() const override;
|
||||||
int RtpTimestampRateHz() const override;
|
int RtpTimestampRateHz() const override;
|
||||||
virtual int NumChannels() const OVERRIDE;
|
int NumChannels() const override;
|
||||||
virtual int Num10MsFramesInNextPacket() const OVERRIDE;
|
int Num10MsFramesInNextPacket() const override;
|
||||||
virtual int Max10MsFramesInAPacket() const OVERRIDE;
|
int Max10MsFramesInAPacket() const override;
|
||||||
void SetTargetBitrate(int bits_per_second) override;
|
void SetTargetBitrate(int bits_per_second) override;
|
||||||
void SetProjectedPacketLossRate(double fraction) override;
|
void SetProjectedPacketLossRate(double fraction) override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void EncodeInternal(uint32_t rtp_timestamp,
|
void EncodeInternal(uint32_t rtp_timestamp,
|
||||||
const int16_t* audio,
|
const int16_t* audio,
|
||||||
size_t max_encoded_bytes,
|
size_t max_encoded_bytes,
|
||||||
uint8_t* encoded,
|
uint8_t* encoded,
|
||||||
EncodedInfo* info) OVERRIDE;
|
EncodedInfo* info) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
AudioEncoder* speech_encoder_;
|
AudioEncoder* speech_encoder_;
|
||||||
|
@ -46,7 +46,7 @@ class AudioEncoderCopyRedTest : public ::testing::Test {
|
|||||||
.WillRepeatedly(Return(sample_rate_hz_));
|
.WillRepeatedly(Return(sample_rate_hz_));
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void TearDown() OVERRIDE {
|
void TearDown() override {
|
||||||
red_.reset();
|
red_.reset();
|
||||||
// Don't expect the red_ object to delete the AudioEncoder object. But it
|
// Don't expect the red_ object to delete the AudioEncoder object. But it
|
||||||
// will be deleted with the test fixture. This is why we explicitly delete
|
// will be deleted with the test fixture. This is why we explicitly delete
|
||||||
|
@ -75,7 +75,7 @@ class AcmReceiveTestToggleOutputFreqOldApi : public AcmReceiveTestOldApi {
|
|||||||
NumOutputChannels exptected_output_channels);
|
NumOutputChannels exptected_output_channels);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void AfterGetAudio() OVERRIDE;
|
void AfterGetAudio() override;
|
||||||
|
|
||||||
const int output_freq_hz_1_;
|
const int output_freq_hz_1_;
|
||||||
const int output_freq_hz_2_;
|
const int output_freq_hz_2_;
|
||||||
|
@ -55,7 +55,7 @@ class AcmReceiverTest : public AudioPacketizationCallback,
|
|||||||
|
|
||||||
~AcmReceiverTest() {}
|
~AcmReceiverTest() {}
|
||||||
|
|
||||||
virtual void SetUp() OVERRIDE {
|
void SetUp() override {
|
||||||
ASSERT_TRUE(receiver_.get() != NULL);
|
ASSERT_TRUE(receiver_.get() != NULL);
|
||||||
ASSERT_TRUE(acm_.get() != NULL);
|
ASSERT_TRUE(acm_.get() != NULL);
|
||||||
for (int n = 0; n < ACMCodecDB::kNumCodecs; n++) {
|
for (int n = 0; n < ACMCodecDB::kNumCodecs; n++) {
|
||||||
@ -72,8 +72,7 @@ class AcmReceiverTest : public AudioPacketizationCallback,
|
|||||||
rtp_header_.type.Audio.isCNG = false;
|
rtp_header_.type.Audio.isCNG = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void TearDown() OVERRIDE {
|
void TearDown() override {}
|
||||||
}
|
|
||||||
|
|
||||||
void InsertOnePacketOfSilence(int codec_id) {
|
void InsertOnePacketOfSilence(int codec_id) {
|
||||||
CodecInst codec;
|
CodecInst codec;
|
||||||
@ -115,13 +114,12 @@ class AcmReceiverTest : public AudioPacketizationCallback,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual int32_t SendData(
|
int32_t SendData(FrameType frame_type,
|
||||||
FrameType frame_type,
|
|
||||||
uint8_t payload_type,
|
uint8_t payload_type,
|
||||||
uint32_t timestamp,
|
uint32_t timestamp,
|
||||||
const uint8_t* payload_data,
|
const uint8_t* payload_data,
|
||||||
size_t payload_len_bytes,
|
size_t payload_len_bytes,
|
||||||
const RTPFragmentationHeader* fragmentation) OVERRIDE {
|
const RTPFragmentationHeader* fragmentation) override {
|
||||||
if (frame_type == kFrameEmpty)
|
if (frame_type == kFrameEmpty)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
@ -54,7 +54,7 @@ class AcmReceiverTestOldApi : public AudioPacketizationCallback,
|
|||||||
|
|
||||||
~AcmReceiverTestOldApi() {}
|
~AcmReceiverTestOldApi() {}
|
||||||
|
|
||||||
virtual void SetUp() OVERRIDE {
|
void SetUp() override {
|
||||||
ASSERT_TRUE(receiver_.get() != NULL);
|
ASSERT_TRUE(receiver_.get() != NULL);
|
||||||
ASSERT_TRUE(acm_.get() != NULL);
|
ASSERT_TRUE(acm_.get() != NULL);
|
||||||
for (int n = 0; n < ACMCodecDB::kNumCodecs; n++) {
|
for (int n = 0; n < ACMCodecDB::kNumCodecs; n++) {
|
||||||
@ -75,8 +75,7 @@ class AcmReceiverTestOldApi : public AudioPacketizationCallback,
|
|||||||
rtp_header_.type.Audio.isCNG = false;
|
rtp_header_.type.Audio.isCNG = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void TearDown() OVERRIDE {
|
void TearDown() override {}
|
||||||
}
|
|
||||||
|
|
||||||
void InsertOnePacketOfSilence(int codec_id) {
|
void InsertOnePacketOfSilence(int codec_id) {
|
||||||
CodecInst codec;
|
CodecInst codec;
|
||||||
@ -115,13 +114,12 @@ class AcmReceiverTestOldApi : public AudioPacketizationCallback,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual int SendData(
|
int SendData(FrameType frame_type,
|
||||||
FrameType frame_type,
|
|
||||||
uint8_t payload_type,
|
uint8_t payload_type,
|
||||||
uint32_t timestamp,
|
uint32_t timestamp,
|
||||||
const uint8_t* payload_data,
|
const uint8_t* payload_data,
|
||||||
size_t payload_len_bytes,
|
size_t payload_len_bytes,
|
||||||
const RTPFragmentationHeader* fragmentation) OVERRIDE {
|
const RTPFragmentationHeader* fragmentation) override {
|
||||||
if (frame_type == kFrameEmpty)
|
if (frame_type == kFrameEmpty)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
@ -41,16 +41,15 @@ class AcmSendTest : public AudioPacketizationCallback, public PacketSource {
|
|||||||
// Returns the next encoded packet. Returns NULL if the test duration was
|
// Returns the next encoded packet. Returns NULL if the test duration was
|
||||||
// exceeded. Ownership of the packet is handed over to the caller.
|
// exceeded. Ownership of the packet is handed over to the caller.
|
||||||
// Inherited from PacketSource.
|
// Inherited from PacketSource.
|
||||||
virtual Packet* NextPacket() OVERRIDE;
|
Packet* NextPacket() override;
|
||||||
|
|
||||||
// Inherited from AudioPacketizationCallback.
|
// Inherited from AudioPacketizationCallback.
|
||||||
virtual int32_t SendData(
|
int32_t SendData(FrameType frame_type,
|
||||||
FrameType frame_type,
|
|
||||||
uint8_t payload_type,
|
uint8_t payload_type,
|
||||||
uint32_t timestamp,
|
uint32_t timestamp,
|
||||||
const uint8_t* payload_data,
|
const uint8_t* payload_data,
|
||||||
size_t payload_len_bytes,
|
size_t payload_len_bytes,
|
||||||
const RTPFragmentationHeader* fragmentation) OVERRIDE;
|
const RTPFragmentationHeader* fragmentation) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static const int kBlockSizeMs = 10;
|
static const int kBlockSizeMs = 10;
|
||||||
|
@ -46,13 +46,12 @@ class AcmSendTestOldApi : public AudioPacketizationCallback,
|
|||||||
Packet* NextPacket();
|
Packet* NextPacket();
|
||||||
|
|
||||||
// Inherited from AudioPacketizationCallback.
|
// Inherited from AudioPacketizationCallback.
|
||||||
virtual int32_t SendData(
|
int32_t SendData(FrameType frame_type,
|
||||||
FrameType frame_type,
|
|
||||||
uint8_t payload_type,
|
uint8_t payload_type,
|
||||||
uint32_t timestamp,
|
uint32_t timestamp,
|
||||||
const uint8_t* payload_data,
|
const uint8_t* payload_data,
|
||||||
size_t payload_len_bytes,
|
size_t payload_len_bytes,
|
||||||
const RTPFragmentationHeader* fragmentation) OVERRIDE;
|
const RTPFragmentationHeader* fragmentation) override;
|
||||||
|
|
||||||
AudioCodingModule* acm() { return acm_.get(); }
|
AudioCodingModule* acm() { return acm_.get(); }
|
||||||
|
|
||||||
|
@ -43,59 +43,58 @@ class AudioCodingModuleImpl : public AudioCodingModule {
|
|||||||
//
|
//
|
||||||
|
|
||||||
// Initialize send codec.
|
// Initialize send codec.
|
||||||
virtual int InitializeSender() OVERRIDE;
|
int InitializeSender() override;
|
||||||
|
|
||||||
// Reset send codec.
|
// Reset send codec.
|
||||||
virtual int ResetEncoder() OVERRIDE;
|
int ResetEncoder() override;
|
||||||
|
|
||||||
// Can be called multiple times for Codec, CNG, RED.
|
// Can be called multiple times for Codec, CNG, RED.
|
||||||
virtual int RegisterSendCodec(const CodecInst& send_codec) OVERRIDE;
|
int RegisterSendCodec(const CodecInst& send_codec) override;
|
||||||
|
|
||||||
// Get current send codec.
|
// Get current send codec.
|
||||||
virtual int SendCodec(CodecInst* current_codec) const OVERRIDE;
|
int SendCodec(CodecInst* current_codec) const override;
|
||||||
|
|
||||||
// Get current send frequency.
|
// Get current send frequency.
|
||||||
virtual int SendFrequency() const OVERRIDE;
|
int SendFrequency() const override;
|
||||||
|
|
||||||
// Get encode bit-rate.
|
// Get encode bit-rate.
|
||||||
// Adaptive rate codecs return their current encode target rate, while other
|
// Adaptive rate codecs return their current encode target rate, while other
|
||||||
// codecs return there long-term average or their fixed rate.
|
// codecs return there long-term average or their fixed rate.
|
||||||
virtual int SendBitrate() const OVERRIDE;
|
int SendBitrate() const override;
|
||||||
|
|
||||||
// Set available bandwidth, inform the encoder about the
|
// Set available bandwidth, inform the encoder about the
|
||||||
// estimated bandwidth received from the remote party.
|
// estimated bandwidth received from the remote party.
|
||||||
virtual int SetReceivedEstimatedBandwidth(int bw) OVERRIDE;
|
int SetReceivedEstimatedBandwidth(int bw) override;
|
||||||
|
|
||||||
// Register a transport callback which will be
|
// Register a transport callback which will be
|
||||||
// called to deliver the encoded buffers.
|
// called to deliver the encoded buffers.
|
||||||
virtual int RegisterTransportCallback(
|
int RegisterTransportCallback(AudioPacketizationCallback* transport) override;
|
||||||
AudioPacketizationCallback* transport) OVERRIDE;
|
|
||||||
|
|
||||||
// Add 10 ms of raw (PCM) audio data to the encoder.
|
// Add 10 ms of raw (PCM) audio data to the encoder.
|
||||||
virtual int Add10MsData(const AudioFrame& audio_frame) OVERRIDE;
|
int Add10MsData(const AudioFrame& audio_frame) override;
|
||||||
|
|
||||||
/////////////////////////////////////////
|
/////////////////////////////////////////
|
||||||
// (RED) Redundant Coding
|
// (RED) Redundant Coding
|
||||||
//
|
//
|
||||||
|
|
||||||
// Configure RED status i.e. on/off.
|
// Configure RED status i.e. on/off.
|
||||||
virtual int SetREDStatus(bool enable_red) OVERRIDE;
|
int SetREDStatus(bool enable_red) override;
|
||||||
|
|
||||||
// Get RED status.
|
// Get RED status.
|
||||||
virtual bool REDStatus() const OVERRIDE;
|
bool REDStatus() const override;
|
||||||
|
|
||||||
/////////////////////////////////////////
|
/////////////////////////////////////////
|
||||||
// (FEC) Forward Error Correction (codec internal)
|
// (FEC) Forward Error Correction (codec internal)
|
||||||
//
|
//
|
||||||
|
|
||||||
// Configure FEC status i.e. on/off.
|
// Configure FEC status i.e. on/off.
|
||||||
virtual int SetCodecFEC(bool enabled_codec_fec) OVERRIDE;
|
int SetCodecFEC(bool enabled_codec_fec) override;
|
||||||
|
|
||||||
// Get FEC status.
|
// Get FEC status.
|
||||||
virtual bool CodecFEC() const OVERRIDE;
|
bool CodecFEC() const override;
|
||||||
|
|
||||||
// Set target packet loss rate
|
// Set target packet loss rate
|
||||||
virtual int SetPacketLossRate(int loss_rate) OVERRIDE;
|
int SetPacketLossRate(int loss_rate) override;
|
||||||
|
|
||||||
/////////////////////////////////////////
|
/////////////////////////////////////////
|
||||||
// (VAD) Voice Activity Detection
|
// (VAD) Voice Activity Detection
|
||||||
@ -103,98 +102,97 @@ class AudioCodingModuleImpl : public AudioCodingModule {
|
|||||||
// (CNG) Comfort Noise Generation
|
// (CNG) Comfort Noise Generation
|
||||||
//
|
//
|
||||||
|
|
||||||
virtual int SetVAD(bool enable_dtx = true,
|
int SetVAD(bool enable_dtx = true,
|
||||||
bool enable_vad = false,
|
bool enable_vad = false,
|
||||||
ACMVADMode mode = VADNormal) OVERRIDE;
|
ACMVADMode mode = VADNormal) override;
|
||||||
|
|
||||||
virtual int VAD(bool* dtx_enabled,
|
int VAD(bool* dtx_enabled,
|
||||||
bool* vad_enabled,
|
bool* vad_enabled,
|
||||||
ACMVADMode* mode) const OVERRIDE;
|
ACMVADMode* mode) const override;
|
||||||
|
|
||||||
virtual int RegisterVADCallback(ACMVADCallback* vad_callback) OVERRIDE;
|
int RegisterVADCallback(ACMVADCallback* vad_callback) override;
|
||||||
|
|
||||||
/////////////////////////////////////////
|
/////////////////////////////////////////
|
||||||
// Receiver
|
// Receiver
|
||||||
//
|
//
|
||||||
|
|
||||||
// Initialize receiver, resets codec database etc.
|
// Initialize receiver, resets codec database etc.
|
||||||
virtual int InitializeReceiver() OVERRIDE;
|
int InitializeReceiver() override;
|
||||||
|
|
||||||
// Reset the decoder state.
|
// Reset the decoder state.
|
||||||
virtual int ResetDecoder() OVERRIDE;
|
int ResetDecoder() override;
|
||||||
|
|
||||||
// Get current receive frequency.
|
// Get current receive frequency.
|
||||||
virtual int ReceiveFrequency() const OVERRIDE;
|
int ReceiveFrequency() const override;
|
||||||
|
|
||||||
// Get current playout frequency.
|
// Get current playout frequency.
|
||||||
virtual int PlayoutFrequency() const OVERRIDE;
|
int PlayoutFrequency() const override;
|
||||||
|
|
||||||
// Register possible receive codecs, can be called multiple times,
|
// Register possible receive codecs, can be called multiple times,
|
||||||
// for codecs, CNG, DTMF, RED.
|
// for codecs, CNG, DTMF, RED.
|
||||||
virtual int RegisterReceiveCodec(const CodecInst& receive_codec) OVERRIDE;
|
int RegisterReceiveCodec(const CodecInst& receive_codec) override;
|
||||||
|
|
||||||
// Get current received codec.
|
// Get current received codec.
|
||||||
virtual int ReceiveCodec(CodecInst* current_codec) const OVERRIDE;
|
int ReceiveCodec(CodecInst* current_codec) const override;
|
||||||
|
|
||||||
// Incoming packet from network parsed and ready for decode.
|
// Incoming packet from network parsed and ready for decode.
|
||||||
virtual int IncomingPacket(const uint8_t* incoming_payload,
|
int IncomingPacket(const uint8_t* incoming_payload,
|
||||||
const size_t payload_length,
|
const size_t payload_length,
|
||||||
const WebRtcRTPHeader& rtp_info) OVERRIDE;
|
const WebRtcRTPHeader& rtp_info) override;
|
||||||
|
|
||||||
// Incoming payloads, without rtp-info, the rtp-info will be created in ACM.
|
// Incoming payloads, without rtp-info, the rtp-info will be created in ACM.
|
||||||
// One usage for this API is when pre-encoded files are pushed in ACM.
|
// One usage for this API is when pre-encoded files are pushed in ACM.
|
||||||
virtual int IncomingPayload(const uint8_t* incoming_payload,
|
int IncomingPayload(const uint8_t* incoming_payload,
|
||||||
const size_t payload_length,
|
const size_t payload_length,
|
||||||
uint8_t payload_type,
|
uint8_t payload_type,
|
||||||
uint32_t timestamp) OVERRIDE;
|
uint32_t timestamp) override;
|
||||||
|
|
||||||
// Minimum playout delay.
|
// Minimum playout delay.
|
||||||
virtual int SetMinimumPlayoutDelay(int time_ms) OVERRIDE;
|
int SetMinimumPlayoutDelay(int time_ms) override;
|
||||||
|
|
||||||
// Maximum playout delay.
|
// Maximum playout delay.
|
||||||
virtual int SetMaximumPlayoutDelay(int time_ms) OVERRIDE;
|
int SetMaximumPlayoutDelay(int time_ms) override;
|
||||||
|
|
||||||
// Smallest latency NetEq will maintain.
|
// Smallest latency NetEq will maintain.
|
||||||
virtual int LeastRequiredDelayMs() const OVERRIDE;
|
int LeastRequiredDelayMs() const override;
|
||||||
|
|
||||||
// Impose an initial delay on playout. ACM plays silence until |delay_ms|
|
// Impose an initial delay on playout. ACM plays silence until |delay_ms|
|
||||||
// audio is accumulated in NetEq buffer, then starts decoding payloads.
|
// audio is accumulated in NetEq buffer, then starts decoding payloads.
|
||||||
virtual int SetInitialPlayoutDelay(int delay_ms) OVERRIDE;
|
int SetInitialPlayoutDelay(int delay_ms) override;
|
||||||
|
|
||||||
// TODO(turajs): DTMF playout is always activated in NetEq these APIs should
|
// TODO(turajs): DTMF playout is always activated in NetEq these APIs should
|
||||||
// be removed, as well as all VoE related APIs and methods.
|
// be removed, as well as all VoE related APIs and methods.
|
||||||
//
|
//
|
||||||
// Configure Dtmf playout status i.e on/off playout the incoming outband Dtmf
|
// Configure Dtmf playout status i.e on/off playout the incoming outband Dtmf
|
||||||
// tone.
|
// tone.
|
||||||
virtual int SetDtmfPlayoutStatus(bool enable) OVERRIDE { return 0; }
|
int SetDtmfPlayoutStatus(bool enable) override { return 0; }
|
||||||
|
|
||||||
// Get Dtmf playout status.
|
// Get Dtmf playout status.
|
||||||
virtual bool DtmfPlayoutStatus() const OVERRIDE { return true; }
|
bool DtmfPlayoutStatus() const override { return true; }
|
||||||
|
|
||||||
// Estimate the Bandwidth based on the incoming stream, needed
|
// Estimate the Bandwidth based on the incoming stream, needed
|
||||||
// for one way audio where the RTCP send the BW estimate.
|
// for one way audio where the RTCP send the BW estimate.
|
||||||
// This is also done in the RTP module .
|
// This is also done in the RTP module .
|
||||||
virtual int DecoderEstimatedBandwidth() const OVERRIDE;
|
int DecoderEstimatedBandwidth() const override;
|
||||||
|
|
||||||
// Set playout mode voice, fax.
|
// Set playout mode voice, fax.
|
||||||
virtual int SetPlayoutMode(AudioPlayoutMode mode) OVERRIDE;
|
int SetPlayoutMode(AudioPlayoutMode mode) override;
|
||||||
|
|
||||||
// Get playout mode voice, fax.
|
// Get playout mode voice, fax.
|
||||||
virtual AudioPlayoutMode PlayoutMode() const OVERRIDE;
|
AudioPlayoutMode PlayoutMode() const override;
|
||||||
|
|
||||||
// Get playout timestamp.
|
// Get playout timestamp.
|
||||||
virtual int PlayoutTimestamp(uint32_t* timestamp) OVERRIDE;
|
int PlayoutTimestamp(uint32_t* timestamp) override;
|
||||||
|
|
||||||
// Get 10 milliseconds of raw audio data to play out, and
|
// Get 10 milliseconds of raw audio data to play out, and
|
||||||
// automatic resample to the requested frequency if > 0.
|
// automatic resample to the requested frequency if > 0.
|
||||||
virtual int PlayoutData10Ms(int desired_freq_hz,
|
int PlayoutData10Ms(int desired_freq_hz, AudioFrame* audio_frame) override;
|
||||||
AudioFrame* audio_frame) OVERRIDE;
|
|
||||||
|
|
||||||
/////////////////////////////////////////
|
/////////////////////////////////////////
|
||||||
// Statistics
|
// Statistics
|
||||||
//
|
//
|
||||||
|
|
||||||
virtual int GetNetworkStatistics(NetworkStatistics* statistics) OVERRIDE;
|
int GetNetworkStatistics(NetworkStatistics* statistics) override;
|
||||||
|
|
||||||
// GET RED payload for iSAC. The method id called when 'this' ACM is
|
// GET RED payload for iSAC. The method id called when 'this' ACM is
|
||||||
// the default ACM.
|
// the default ACM.
|
||||||
@ -204,40 +202,37 @@ class AudioCodingModuleImpl : public AudioCodingModule {
|
|||||||
uint8_t* payload,
|
uint8_t* payload,
|
||||||
int16_t* length_bytes);
|
int16_t* length_bytes);
|
||||||
|
|
||||||
virtual int ReplaceInternalDTXWithWebRtc(bool use_webrtc_dtx) OVERRIDE;
|
int ReplaceInternalDTXWithWebRtc(bool use_webrtc_dtx) override;
|
||||||
|
|
||||||
virtual int IsInternalDTXReplacedWithWebRtc(bool* uses_webrtc_dtx) OVERRIDE;
|
int IsInternalDTXReplacedWithWebRtc(bool* uses_webrtc_dtx) override;
|
||||||
|
|
||||||
virtual int SetISACMaxRate(int max_bit_per_sec) OVERRIDE;
|
int SetISACMaxRate(int max_bit_per_sec) override;
|
||||||
|
|
||||||
virtual int SetISACMaxPayloadSize(int max_size_bytes) OVERRIDE;
|
int SetISACMaxPayloadSize(int max_size_bytes) override;
|
||||||
|
|
||||||
virtual int ConfigISACBandwidthEstimator(
|
int ConfigISACBandwidthEstimator(int frame_size_ms,
|
||||||
int frame_size_ms,
|
|
||||||
int rate_bit_per_sec,
|
int rate_bit_per_sec,
|
||||||
bool enforce_frame_size = false) OVERRIDE;
|
bool enforce_frame_size = false) override;
|
||||||
|
|
||||||
int SetOpusApplication(OpusApplicationMode application) override;
|
int SetOpusApplication(OpusApplicationMode application) override;
|
||||||
|
|
||||||
// If current send codec is Opus, informs it about the maximum playback rate
|
// If current send codec is Opus, informs it about the maximum playback rate
|
||||||
// the receiver will render.
|
// the receiver will render.
|
||||||
virtual int SetOpusMaxPlaybackRate(int frequency_hz) OVERRIDE;
|
int SetOpusMaxPlaybackRate(int frequency_hz) override;
|
||||||
|
|
||||||
int EnableOpusDtx() override;
|
int EnableOpusDtx() override;
|
||||||
|
|
||||||
int DisableOpusDtx() override;
|
int DisableOpusDtx() override;
|
||||||
|
|
||||||
virtual int UnregisterReceiveCodec(uint8_t payload_type) OVERRIDE;
|
int UnregisterReceiveCodec(uint8_t payload_type) override;
|
||||||
|
|
||||||
virtual int EnableNack(size_t max_nack_list_size) OVERRIDE;
|
int EnableNack(size_t max_nack_list_size) override;
|
||||||
|
|
||||||
virtual void DisableNack() OVERRIDE;
|
void DisableNack() override;
|
||||||
|
|
||||||
virtual std::vector<uint16_t> GetNackList(
|
std::vector<uint16_t> GetNackList(int64_t round_trip_time_ms) const override;
|
||||||
int64_t round_trip_time_ms) const OVERRIDE;
|
|
||||||
|
|
||||||
virtual void GetDecodingCallStatistics(
|
void GetDecodingCallStatistics(AudioDecodingCallStats* stats) const override;
|
||||||
AudioDecodingCallStats* stats) const OVERRIDE;
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
struct InputData {
|
struct InputData {
|
||||||
@ -372,62 +367,57 @@ class AudioCodingImpl : public AudioCoding {
|
|||||||
playout_frequency_hz_ = config.playout_frequency_hz;
|
playout_frequency_hz_ = config.playout_frequency_hz;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual ~AudioCodingImpl() OVERRIDE {};
|
~AudioCodingImpl() override{};
|
||||||
|
|
||||||
virtual bool RegisterSendCodec(AudioEncoder* send_codec) OVERRIDE;
|
bool RegisterSendCodec(AudioEncoder* send_codec) override;
|
||||||
|
|
||||||
virtual bool RegisterSendCodec(int encoder_type,
|
bool RegisterSendCodec(int encoder_type,
|
||||||
uint8_t payload_type,
|
uint8_t payload_type,
|
||||||
int frame_size_samples = 0) OVERRIDE;
|
int frame_size_samples = 0) override;
|
||||||
|
|
||||||
virtual const AudioEncoder* GetSenderInfo() const OVERRIDE;
|
const AudioEncoder* GetSenderInfo() const override;
|
||||||
|
|
||||||
virtual const CodecInst* GetSenderCodecInst() OVERRIDE;
|
const CodecInst* GetSenderCodecInst() override;
|
||||||
|
|
||||||
virtual int Add10MsAudio(const AudioFrame& audio_frame) OVERRIDE;
|
int Add10MsAudio(const AudioFrame& audio_frame) override;
|
||||||
|
|
||||||
virtual const ReceiverInfo* GetReceiverInfo() const OVERRIDE;
|
const ReceiverInfo* GetReceiverInfo() const override;
|
||||||
|
|
||||||
virtual bool RegisterReceiveCodec(AudioDecoder* receive_codec) OVERRIDE;
|
bool RegisterReceiveCodec(AudioDecoder* receive_codec) override;
|
||||||
|
|
||||||
virtual bool RegisterReceiveCodec(int decoder_type,
|
bool RegisterReceiveCodec(int decoder_type, uint8_t payload_type) override;
|
||||||
uint8_t payload_type) OVERRIDE;
|
|
||||||
|
|
||||||
virtual bool InsertPacket(const uint8_t* incoming_payload,
|
bool InsertPacket(const uint8_t* incoming_payload,
|
||||||
size_t payload_len_bytes,
|
size_t payload_len_bytes,
|
||||||
const WebRtcRTPHeader& rtp_info) OVERRIDE;
|
const WebRtcRTPHeader& rtp_info) override;
|
||||||
|
|
||||||
virtual bool InsertPayload(const uint8_t* incoming_payload,
|
bool InsertPayload(const uint8_t* incoming_payload,
|
||||||
size_t payload_len_byte,
|
size_t payload_len_byte,
|
||||||
uint8_t payload_type,
|
uint8_t payload_type,
|
||||||
uint32_t timestamp) OVERRIDE;
|
uint32_t timestamp) override;
|
||||||
|
|
||||||
virtual bool SetMinimumPlayoutDelay(int time_ms) OVERRIDE;
|
bool SetMinimumPlayoutDelay(int time_ms) override;
|
||||||
|
|
||||||
virtual bool SetMaximumPlayoutDelay(int time_ms) OVERRIDE;
|
bool SetMaximumPlayoutDelay(int time_ms) override;
|
||||||
|
|
||||||
virtual int LeastRequiredDelayMs() const OVERRIDE;
|
int LeastRequiredDelayMs() const override;
|
||||||
|
|
||||||
virtual bool PlayoutTimestamp(uint32_t* timestamp) OVERRIDE;
|
bool PlayoutTimestamp(uint32_t* timestamp) override;
|
||||||
|
|
||||||
virtual bool Get10MsAudio(AudioFrame* audio_frame) OVERRIDE;
|
bool Get10MsAudio(AudioFrame* audio_frame) override;
|
||||||
|
|
||||||
virtual bool GetNetworkStatistics(
|
bool GetNetworkStatistics(NetworkStatistics* network_statistics) override;
|
||||||
NetworkStatistics* network_statistics) OVERRIDE;
|
|
||||||
|
|
||||||
virtual bool EnableNack(size_t max_nack_list_size) OVERRIDE;
|
bool EnableNack(size_t max_nack_list_size) override;
|
||||||
|
|
||||||
virtual void DisableNack() OVERRIDE;
|
void DisableNack() override;
|
||||||
|
|
||||||
virtual bool SetVad(bool enable_dtx,
|
bool SetVad(bool enable_dtx, bool enable_vad, ACMVADMode vad_mode) override;
|
||||||
bool enable_vad,
|
|
||||||
ACMVADMode vad_mode) OVERRIDE;
|
|
||||||
|
|
||||||
virtual std::vector<uint16_t> GetNackList(
|
std::vector<uint16_t> GetNackList(int round_trip_time_ms) const override;
|
||||||
int round_trip_time_ms) const OVERRIDE;
|
|
||||||
|
|
||||||
virtual void GetDecodingCallStatistics(
|
void GetDecodingCallStatistics(
|
||||||
AudioDecodingCallStats* call_stats) const OVERRIDE;
|
AudioDecodingCallStats* call_stats) const override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Temporary method to be used during redesign phase.
|
// Temporary method to be used during redesign phase.
|
||||||
|
@ -81,13 +81,12 @@ class PacketizationCallbackStub : public AudioPacketizationCallback {
|
|||||||
: num_calls_(0),
|
: num_calls_(0),
|
||||||
crit_sect_(CriticalSectionWrapper::CreateCriticalSection()) {}
|
crit_sect_(CriticalSectionWrapper::CreateCriticalSection()) {}
|
||||||
|
|
||||||
virtual int32_t SendData(
|
int32_t SendData(FrameType frame_type,
|
||||||
FrameType frame_type,
|
|
||||||
uint8_t payload_type,
|
uint8_t payload_type,
|
||||||
uint32_t timestamp,
|
uint32_t timestamp,
|
||||||
const uint8_t* payload_data,
|
const uint8_t* payload_data,
|
||||||
size_t payload_len_bytes,
|
size_t payload_len_bytes,
|
||||||
const RTPFragmentationHeader* fragmentation) OVERRIDE {
|
const RTPFragmentationHeader* fragmentation) override {
|
||||||
CriticalSectionScoped lock(crit_sect_.get());
|
CriticalSectionScoped lock(crit_sect_.get());
|
||||||
++num_calls_;
|
++num_calls_;
|
||||||
last_payload_vec_.assign(payload_data, payload_data + payload_len_bytes);
|
last_payload_vec_.assign(payload_data, payload_data + payload_len_bytes);
|
||||||
@ -124,9 +123,9 @@ class AudioCodingModuleTest : public ::testing::Test {
|
|||||||
|
|
||||||
~AudioCodingModuleTest() {}
|
~AudioCodingModuleTest() {}
|
||||||
|
|
||||||
void TearDown() OVERRIDE {}
|
void TearDown() override {}
|
||||||
|
|
||||||
void SetUp() OVERRIDE {
|
void SetUp() override {
|
||||||
rtp_utility_->Populate(&rtp_header_);
|
rtp_utility_->Populate(&rtp_header_);
|
||||||
|
|
||||||
input_frame_.sample_rate_hz_ = kSampleRateHz;
|
input_frame_.sample_rate_hz_ = kSampleRateHz;
|
||||||
@ -308,7 +307,7 @@ class AudioCodingModuleMtTest : public AudioCodingModuleTest {
|
|||||||
config_.clock = fake_clock_.get();
|
config_.clock = fake_clock_.get();
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void SetUp() OVERRIDE {
|
void SetUp() override {
|
||||||
AudioCodingModuleTest::SetUp();
|
AudioCodingModuleTest::SetUp();
|
||||||
CreateAcm();
|
CreateAcm();
|
||||||
StartThreads();
|
StartThreads();
|
||||||
@ -321,7 +320,7 @@ class AudioCodingModuleMtTest : public AudioCodingModuleTest {
|
|||||||
ASSERT_TRUE(pull_audio_thread_->Start(thread_id));
|
ASSERT_TRUE(pull_audio_thread_->Start(thread_id));
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void TearDown() OVERRIDE {
|
void TearDown() override {
|
||||||
AudioCodingModuleTest::TearDown();
|
AudioCodingModuleTest::TearDown();
|
||||||
pull_audio_thread_->Stop();
|
pull_audio_thread_->Stop();
|
||||||
send_thread_->Stop();
|
send_thread_->Stop();
|
||||||
@ -436,7 +435,7 @@ class AcmIsacMtTest : public AudioCodingModuleMtTest {
|
|||||||
|
|
||||||
~AcmIsacMtTest() {}
|
~AcmIsacMtTest() {}
|
||||||
|
|
||||||
virtual void SetUp() OVERRIDE {
|
void SetUp() override {
|
||||||
AudioCodingModuleTest::SetUp();
|
AudioCodingModuleTest::SetUp();
|
||||||
CreateAcm();
|
CreateAcm();
|
||||||
|
|
||||||
@ -459,7 +458,7 @@ class AcmIsacMtTest : public AudioCodingModuleMtTest {
|
|||||||
StartThreads();
|
StartThreads();
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void RegisterCodec() OVERRIDE {
|
void RegisterCodec() override {
|
||||||
static_assert(kSampleRateHz == 16000, "test designed for iSAC 16 kHz");
|
static_assert(kSampleRateHz == 16000, "test designed for iSAC 16 kHz");
|
||||||
|
|
||||||
// Register iSAC codec in ACM, effectively unregistering the PCM16B codec
|
// Register iSAC codec in ACM, effectively unregistering the PCM16B codec
|
||||||
@ -469,7 +468,7 @@ class AcmIsacMtTest : public AudioCodingModuleMtTest {
|
|||||||
acm_->RegisterReceiveCodec(acm2::ACMCodecDB::kISAC, kPayloadType));
|
acm_->RegisterReceiveCodec(acm2::ACMCodecDB::kISAC, kPayloadType));
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void InsertPacket() OVERRIDE {
|
void InsertPacket() override {
|
||||||
int num_calls = packet_cb_.num_calls(); // Store locally for thread safety.
|
int num_calls = packet_cb_.num_calls(); // Store locally for thread safety.
|
||||||
if (num_calls > last_packet_number_) {
|
if (num_calls > last_packet_number_) {
|
||||||
// Get the new payload out from the callback handler.
|
// Get the new payload out from the callback handler.
|
||||||
@ -486,14 +485,14 @@ class AcmIsacMtTest : public AudioCodingModuleMtTest {
|
|||||||
&last_payload_vec_[0], last_payload_vec_.size(), rtp_header_));
|
&last_payload_vec_[0], last_payload_vec_.size(), rtp_header_));
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void InsertAudio() OVERRIDE {
|
void InsertAudio() override {
|
||||||
memcpy(input_frame_.data_, audio_loop_.GetNextBlock(), kNumSamples10ms);
|
memcpy(input_frame_.data_, audio_loop_.GetNextBlock(), kNumSamples10ms);
|
||||||
AudioCodingModuleTest::InsertAudio();
|
AudioCodingModuleTest::InsertAudio();
|
||||||
}
|
}
|
||||||
|
|
||||||
// This method is the same as AudioCodingModuleMtTest::TestDone(), but here
|
// This method is the same as AudioCodingModuleMtTest::TestDone(), but here
|
||||||
// it is using the constants defined in this class (i.e., shorter test run).
|
// it is using the constants defined in this class (i.e., shorter test run).
|
||||||
virtual bool TestDone() OVERRIDE {
|
bool TestDone() override {
|
||||||
if (packet_cb_.num_calls() > kNumPackets) {
|
if (packet_cb_.num_calls() > kNumPackets) {
|
||||||
CriticalSectionScoped lock(crit_sect_.get());
|
CriticalSectionScoped lock(crit_sect_.get());
|
||||||
if (pull_audio_count_ > kNumPullCalls) {
|
if (pull_audio_count_ > kNumPullCalls) {
|
||||||
@ -708,7 +707,7 @@ class AcmSenderBitExactness : public ::testing::Test,
|
|||||||
// Returns a pointer to the next packet. Returns NULL if the source is
|
// Returns a pointer to the next packet. Returns NULL if the source is
|
||||||
// depleted (i.e., the test duration is exceeded), or if an error occurred.
|
// depleted (i.e., the test duration is exceeded), or if an error occurred.
|
||||||
// Inherited from test::PacketSource.
|
// Inherited from test::PacketSource.
|
||||||
virtual test::Packet* NextPacket() OVERRIDE {
|
test::Packet* NextPacket() override {
|
||||||
// Get the next packet from AcmSendTest. Ownership of |packet| is
|
// Get the next packet from AcmSendTest. Ownership of |packet| is
|
||||||
// transferred to this method.
|
// transferred to this method.
|
||||||
test::Packet* packet = send_test_->NextPacket();
|
test::Packet* packet = send_test_->NextPacket();
|
||||||
|
@ -86,13 +86,12 @@ class PacketizationCallbackStubOldApi : public AudioPacketizationCallback {
|
|||||||
last_payload_type_(-1),
|
last_payload_type_(-1),
|
||||||
crit_sect_(CriticalSectionWrapper::CreateCriticalSection()) {}
|
crit_sect_(CriticalSectionWrapper::CreateCriticalSection()) {}
|
||||||
|
|
||||||
virtual int32_t SendData(
|
int32_t SendData(FrameType frame_type,
|
||||||
FrameType frame_type,
|
|
||||||
uint8_t payload_type,
|
uint8_t payload_type,
|
||||||
uint32_t timestamp,
|
uint32_t timestamp,
|
||||||
const uint8_t* payload_data,
|
const uint8_t* payload_data,
|
||||||
size_t payload_len_bytes,
|
size_t payload_len_bytes,
|
||||||
const RTPFragmentationHeader* fragmentation) OVERRIDE {
|
const RTPFragmentationHeader* fragmentation) override {
|
||||||
CriticalSectionScoped lock(crit_sect_.get());
|
CriticalSectionScoped lock(crit_sect_.get());
|
||||||
++num_calls_;
|
++num_calls_;
|
||||||
last_frame_type_ = frame_type;
|
last_frame_type_ = frame_type;
|
||||||
@ -855,7 +854,7 @@ class AcmSenderBitExactnessOldApi : public ::testing::Test,
|
|||||||
// Returns a pointer to the next packet. Returns NULL if the source is
|
// Returns a pointer to the next packet. Returns NULL if the source is
|
||||||
// depleted (i.e., the test duration is exceeded), or if an error occurred.
|
// depleted (i.e., the test duration is exceeded), or if an error occurred.
|
||||||
// Inherited from test::PacketSource.
|
// Inherited from test::PacketSource.
|
||||||
test::Packet* NextPacket() OVERRIDE {
|
test::Packet* NextPacket() override {
|
||||||
// Get the next packet from AcmSendTest. Ownership of |packet| is
|
// Get the next packet from AcmSendTest. Ownership of |packet| is
|
||||||
// transferred to this method.
|
// transferred to this method.
|
||||||
test::Packet* packet = send_test_->NextPacket();
|
test::Packet* packet = send_test_->NextPacket();
|
||||||
@ -1185,7 +1184,7 @@ class AcmSwitchingOutputFrequencyOldApi : public ::testing::Test,
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Inherited from test::PacketSource.
|
// Inherited from test::PacketSource.
|
||||||
test::Packet* NextPacket() OVERRIDE {
|
test::Packet* NextPacket() override {
|
||||||
// Check if it is time to terminate the test. The packet source is of type
|
// Check if it is time to terminate the test. The packet source is of type
|
||||||
// ConstantPcmPacketSource, which is infinite, so we must end the test
|
// ConstantPcmPacketSource, which is infinite, so we must end the test
|
||||||
// "manually".
|
// "manually".
|
||||||
|
@ -50,13 +50,12 @@ class Channel : public AudioPacketizationCallback {
|
|||||||
Channel(int16_t chID = -1);
|
Channel(int16_t chID = -1);
|
||||||
~Channel();
|
~Channel();
|
||||||
|
|
||||||
virtual int32_t SendData(
|
int32_t SendData(FrameType frameType,
|
||||||
FrameType frameType,
|
|
||||||
uint8_t payloadType,
|
uint8_t payloadType,
|
||||||
uint32_t timeStamp,
|
uint32_t timeStamp,
|
||||||
const uint8_t* payloadData,
|
const uint8_t* payloadData,
|
||||||
size_t payloadSize,
|
size_t payloadSize,
|
||||||
const RTPFragmentationHeader* fragmentation) OVERRIDE;
|
const RTPFragmentationHeader* fragmentation) override;
|
||||||
|
|
||||||
void RegisterReceiverACM(AudioCodingModule *acm);
|
void RegisterReceiverACM(AudioCodingModule *acm);
|
||||||
|
|
||||||
|
@ -29,13 +29,12 @@ class TestPacketization : public AudioPacketizationCallback {
|
|||||||
public:
|
public:
|
||||||
TestPacketization(RTPStream *rtpStream, uint16_t frequency);
|
TestPacketization(RTPStream *rtpStream, uint16_t frequency);
|
||||||
~TestPacketization();
|
~TestPacketization();
|
||||||
virtual int32_t SendData(
|
int32_t SendData(const FrameType frameType,
|
||||||
const FrameType frameType,
|
|
||||||
const uint8_t payloadType,
|
const uint8_t payloadType,
|
||||||
const uint32_t timeStamp,
|
const uint32_t timeStamp,
|
||||||
const uint8_t* payloadData,
|
const uint8_t* payloadData,
|
||||||
const size_t payloadSize,
|
const size_t payloadSize,
|
||||||
const RTPFragmentationHeader* fragmentation) OVERRIDE;
|
const RTPFragmentationHeader* fragmentation) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static void MakeRTPheader(uint8_t* rtpHeader, uint8_t payloadType,
|
static void MakeRTPheader(uint8_t* rtpHeader, uint8_t payloadType,
|
||||||
@ -103,7 +102,7 @@ class EncodeDecodeTest : public ACMTest {
|
|||||||
public:
|
public:
|
||||||
EncodeDecodeTest();
|
EncodeDecodeTest();
|
||||||
explicit EncodeDecodeTest(int testMode);
|
explicit EncodeDecodeTest(int testMode);
|
||||||
virtual void Perform() OVERRIDE;
|
void Perform() override;
|
||||||
|
|
||||||
uint16_t _playoutFreq;
|
uint16_t _playoutFreq;
|
||||||
uint8_t _testMode;
|
uint8_t _testMode;
|
||||||
|
@ -23,7 +23,8 @@ class ReceiverWithPacketLoss : public Receiver {
|
|||||||
void Setup(AudioCodingModule *acm, RTPStream *rtpStream,
|
void Setup(AudioCodingModule *acm, RTPStream *rtpStream,
|
||||||
std::string out_file_name, int channels, int loss_rate,
|
std::string out_file_name, int channels, int loss_rate,
|
||||||
int burst_length);
|
int burst_length);
|
||||||
bool IncomingPacket() OVERRIDE;
|
bool IncomingPacket() override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
bool PacketLost();
|
bool PacketLost();
|
||||||
int loss_rate_;
|
int loss_rate_;
|
||||||
|
@ -65,14 +65,19 @@ class RTPBuffer : public RTPStream {
|
|||||||
|
|
||||||
~RTPBuffer();
|
~RTPBuffer();
|
||||||
|
|
||||||
virtual void Write(const uint8_t payloadType, const uint32_t timeStamp,
|
void Write(const uint8_t payloadType,
|
||||||
const int16_t seqNo, const uint8_t* payloadData,
|
const uint32_t timeStamp,
|
||||||
const size_t payloadSize, uint32_t frequency) OVERRIDE;
|
const int16_t seqNo,
|
||||||
|
const uint8_t* payloadData,
|
||||||
|
const size_t payloadSize,
|
||||||
|
uint32_t frequency) override;
|
||||||
|
|
||||||
virtual size_t Read(WebRtcRTPHeader* rtpInfo, uint8_t* payloadData,
|
size_t Read(WebRtcRTPHeader* rtpInfo,
|
||||||
size_t payloadSize, uint32_t* offset) OVERRIDE;
|
uint8_t* payloadData,
|
||||||
|
size_t payloadSize,
|
||||||
|
uint32_t* offset) override;
|
||||||
|
|
||||||
virtual bool EndOfFile() const OVERRIDE;
|
bool EndOfFile() const override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
RWLockWrapper* _queueRWLock;
|
RWLockWrapper* _queueRWLock;
|
||||||
@ -97,16 +102,19 @@ class RTPFile : public RTPStream {
|
|||||||
|
|
||||||
void ReadHeader();
|
void ReadHeader();
|
||||||
|
|
||||||
virtual void Write(const uint8_t payloadType, const uint32_t timeStamp,
|
void Write(const uint8_t payloadType,
|
||||||
const int16_t seqNo, const uint8_t* payloadData,
|
const uint32_t timeStamp,
|
||||||
const size_t payloadSize, uint32_t frequency) OVERRIDE;
|
const int16_t seqNo,
|
||||||
|
const uint8_t* payloadData,
|
||||||
|
const size_t payloadSize,
|
||||||
|
uint32_t frequency) override;
|
||||||
|
|
||||||
virtual size_t Read(WebRtcRTPHeader* rtpInfo, uint8_t* payloadData,
|
size_t Read(WebRtcRTPHeader* rtpInfo,
|
||||||
size_t payloadSize, uint32_t* offset) OVERRIDE;
|
uint8_t* payloadData,
|
||||||
|
size_t payloadSize,
|
||||||
|
uint32_t* offset) override;
|
||||||
|
|
||||||
virtual bool EndOfFile() const OVERRIDE {
|
bool EndOfFile() const override { return _rtpEOF; }
|
||||||
return _rtpEOF;
|
|
||||||
}
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
FILE* _rtpFile;
|
FILE* _rtpFile;
|
||||||
|
@ -28,13 +28,12 @@ class TestPack : public AudioPacketizationCallback {
|
|||||||
|
|
||||||
void RegisterReceiverACM(AudioCodingModule* acm);
|
void RegisterReceiverACM(AudioCodingModule* acm);
|
||||||
|
|
||||||
virtual int32_t SendData(
|
int32_t SendData(FrameType frame_type,
|
||||||
FrameType frame_type,
|
|
||||||
uint8_t payload_type,
|
uint8_t payload_type,
|
||||||
uint32_t timestamp,
|
uint32_t timestamp,
|
||||||
const uint8_t* payload_data,
|
const uint8_t* payload_data,
|
||||||
size_t payload_size,
|
size_t payload_size,
|
||||||
const RTPFragmentationHeader* fragmentation) OVERRIDE;
|
const RTPFragmentationHeader* fragmentation) override;
|
||||||
|
|
||||||
size_t payload_size();
|
size_t payload_size();
|
||||||
uint32_t timestamp_diff();
|
uint32_t timestamp_diff();
|
||||||
@ -55,7 +54,7 @@ class TestAllCodecs : public ACMTest {
|
|||||||
explicit TestAllCodecs(int test_mode);
|
explicit TestAllCodecs(int test_mode);
|
||||||
~TestAllCodecs();
|
~TestAllCodecs();
|
||||||
|
|
||||||
virtual void Perform() OVERRIDE;
|
void Perform() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// The default value of '-1' indicates that the registration is based only on
|
// The default value of '-1' indicates that the registration is based only on
|
||||||
|
@ -35,13 +35,12 @@ class TestPackStereo : public AudioPacketizationCallback {
|
|||||||
|
|
||||||
void RegisterReceiverACM(AudioCodingModule* acm);
|
void RegisterReceiverACM(AudioCodingModule* acm);
|
||||||
|
|
||||||
virtual int32_t SendData(
|
int32_t SendData(const FrameType frame_type,
|
||||||
const FrameType frame_type,
|
|
||||||
const uint8_t payload_type,
|
const uint8_t payload_type,
|
||||||
const uint32_t timestamp,
|
const uint32_t timestamp,
|
||||||
const uint8_t* payload_data,
|
const uint8_t* payload_data,
|
||||||
const size_t payload_size,
|
const size_t payload_size,
|
||||||
const RTPFragmentationHeader* fragmentation) OVERRIDE;
|
const RTPFragmentationHeader* fragmentation) override;
|
||||||
|
|
||||||
uint16_t payload_size();
|
uint16_t payload_size();
|
||||||
uint32_t timestamp_diff();
|
uint32_t timestamp_diff();
|
||||||
@ -66,7 +65,8 @@ class TestStereo : public ACMTest {
|
|||||||
explicit TestStereo(int test_mode);
|
explicit TestStereo(int test_mode);
|
||||||
~TestStereo();
|
~TestStereo();
|
||||||
|
|
||||||
virtual void Perform() OVERRIDE;
|
void Perform() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// The default value of '-1' indicates that the registration is based only on
|
// The default value of '-1' indicates that the registration is based only on
|
||||||
// codec name and a sampling frequncy matching is not required. This is useful
|
// codec name and a sampling frequncy matching is not required. This is useful
|
||||||
|
@ -49,16 +49,18 @@ class Accelerate : public TimeStretch {
|
|||||||
protected:
|
protected:
|
||||||
// Sets the parameters |best_correlation| and |peak_index| to suitable
|
// Sets the parameters |best_correlation| and |peak_index| to suitable
|
||||||
// values when the signal contains no active speech.
|
// values when the signal contains no active speech.
|
||||||
virtual void SetParametersForPassiveSpeech(size_t len,
|
void SetParametersForPassiveSpeech(size_t len,
|
||||||
int16_t* best_correlation,
|
int16_t* best_correlation,
|
||||||
int* peak_index) const OVERRIDE;
|
int* peak_index) const override;
|
||||||
|
|
||||||
// Checks the criteria for performing the time-stretching operation and,
|
// Checks the criteria for performing the time-stretching operation and,
|
||||||
// if possible, performs the time-stretching.
|
// if possible, performs the time-stretching.
|
||||||
virtual ReturnCodes CheckCriteriaAndStretch(
|
ReturnCodes CheckCriteriaAndStretch(const int16_t* input,
|
||||||
const int16_t* input, size_t input_length, size_t peak_index,
|
size_t input_length,
|
||||||
int16_t best_correlation, bool active_speech,
|
size_t peak_index,
|
||||||
AudioMultiVector* output) const OVERRIDE;
|
int16_t best_correlation,
|
||||||
|
bool active_speech,
|
||||||
|
AudioMultiVector* output) const override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
DISALLOW_COPY_AND_ASSIGN(Accelerate);
|
DISALLOW_COPY_AND_ASSIGN(Accelerate);
|
||||||
|
@ -233,7 +233,7 @@ class AudioDecoderCng : public AudioDecoder {
|
|||||||
uint32_t rtp_timestamp,
|
uint32_t rtp_timestamp,
|
||||||
uint32_t arrival_timestamp) { return -1; }
|
uint32_t arrival_timestamp) { return -1; }
|
||||||
|
|
||||||
virtual CNG_dec_inst* CngDecoderInstance() OVERRIDE { return dec_state_; }
|
CNG_dec_inst* CngDecoderInstance() override { return dec_state_; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
CNG_dec_inst* dec_state_;
|
CNG_dec_inst* dec_state_;
|
||||||
|
@ -47,13 +47,13 @@ class DecisionLogicFax : public DecisionLogic {
|
|||||||
// should be set to true. The output variable |reset_decoder| will be set to
|
// should be set to true. The output variable |reset_decoder| will be set to
|
||||||
// true if a reset is required; otherwise it is left unchanged (i.e., it can
|
// true if a reset is required; otherwise it is left unchanged (i.e., it can
|
||||||
// remain true if it was true before the call).
|
// remain true if it was true before the call).
|
||||||
virtual Operations GetDecisionSpecialized(const SyncBuffer& sync_buffer,
|
Operations GetDecisionSpecialized(const SyncBuffer& sync_buffer,
|
||||||
const Expand& expand,
|
const Expand& expand,
|
||||||
int decoder_frame_length,
|
int decoder_frame_length,
|
||||||
const RTPHeader* packet_header,
|
const RTPHeader* packet_header,
|
||||||
Modes prev_mode,
|
Modes prev_mode,
|
||||||
bool play_dtmf,
|
bool play_dtmf,
|
||||||
bool* reset_decoder) OVERRIDE;
|
bool* reset_decoder) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
DISALLOW_COPY_AND_ASSIGN(DecisionLogicFax);
|
DISALLOW_COPY_AND_ASSIGN(DecisionLogicFax);
|
||||||
|
@ -378,7 +378,7 @@ TEST_F(LargeTimestampJumpTest, JumpLongerThanHalfRangeAndWrap) {
|
|||||||
|
|
||||||
class ShortTimestampJumpTest : public LargeTimestampJumpTest {
|
class ShortTimestampJumpTest : public LargeTimestampJumpTest {
|
||||||
protected:
|
protected:
|
||||||
void UpdateState(NetEqOutputType output_type) OVERRIDE {
|
void UpdateState(NetEqOutputType output_type) override {
|
||||||
switch (test_state_) {
|
switch (test_state_) {
|
||||||
case kInitialPhase: {
|
case kInitialPhase: {
|
||||||
if (output_type == kOutputNormal) {
|
if (output_type == kOutputNormal) {
|
||||||
|
@ -79,10 +79,10 @@ class NetEqImpl : public webrtc::NetEq {
|
|||||||
// of the time when the packet was received, and should be measured with
|
// of the time when the packet was received, and should be measured with
|
||||||
// the same tick rate as the RTP timestamp of the current payload.
|
// the same tick rate as the RTP timestamp of the current payload.
|
||||||
// Returns 0 on success, -1 on failure.
|
// Returns 0 on success, -1 on failure.
|
||||||
virtual int InsertPacket(const WebRtcRTPHeader& rtp_header,
|
int InsertPacket(const WebRtcRTPHeader& rtp_header,
|
||||||
const uint8_t* payload,
|
const uint8_t* payload,
|
||||||
size_t length_bytes,
|
size_t length_bytes,
|
||||||
uint32_t receive_timestamp) OVERRIDE;
|
uint32_t receive_timestamp) override;
|
||||||
|
|
||||||
// Inserts a sync-packet into packet queue. Sync-packets are decoded to
|
// Inserts a sync-packet into packet queue. Sync-packets are decoded to
|
||||||
// silence and are intended to keep AV-sync intact in an event of long packet
|
// silence and are intended to keep AV-sync intact in an event of long packet
|
||||||
@ -93,8 +93,8 @@ class NetEqImpl : public webrtc::NetEq {
|
|||||||
// type, i.e. they cannot have DTMF or CNG payload type, nor a codec change
|
// type, i.e. they cannot have DTMF or CNG payload type, nor a codec change
|
||||||
// can be implied by inserting a sync-packet.
|
// can be implied by inserting a sync-packet.
|
||||||
// Returns kOk on success, kFail on failure.
|
// Returns kOk on success, kFail on failure.
|
||||||
virtual int InsertSyncPacket(const WebRtcRTPHeader& rtp_header,
|
int InsertSyncPacket(const WebRtcRTPHeader& rtp_header,
|
||||||
uint32_t receive_timestamp) OVERRIDE;
|
uint32_t receive_timestamp) override;
|
||||||
|
|
||||||
// Instructs NetEq to deliver 10 ms of audio data. The data is written to
|
// Instructs NetEq to deliver 10 ms of audio data. The data is written to
|
||||||
// |output_audio|, which can hold (at least) |max_length| elements.
|
// |output_audio|, which can hold (at least) |max_length| elements.
|
||||||
@ -104,97 +104,98 @@ class NetEqImpl : public webrtc::NetEq {
|
|||||||
// the samples are interleaved.
|
// the samples are interleaved.
|
||||||
// The speech type is written to |type|, if |type| is not NULL.
|
// The speech type is written to |type|, if |type| is not NULL.
|
||||||
// Returns kOK on success, or kFail in case of an error.
|
// Returns kOK on success, or kFail in case of an error.
|
||||||
virtual int GetAudio(size_t max_length, int16_t* output_audio,
|
int GetAudio(size_t max_length,
|
||||||
int* samples_per_channel, int* num_channels,
|
int16_t* output_audio,
|
||||||
NetEqOutputType* type) OVERRIDE;
|
int* samples_per_channel,
|
||||||
|
int* num_channels,
|
||||||
|
NetEqOutputType* type) override;
|
||||||
|
|
||||||
// Associates |rtp_payload_type| with |codec| and stores the information in
|
// Associates |rtp_payload_type| with |codec| and stores the information in
|
||||||
// the codec database. Returns kOK on success, kFail on failure.
|
// the codec database. Returns kOK on success, kFail on failure.
|
||||||
virtual int RegisterPayloadType(enum NetEqDecoder codec,
|
int RegisterPayloadType(enum NetEqDecoder codec,
|
||||||
uint8_t rtp_payload_type) OVERRIDE;
|
uint8_t rtp_payload_type) override;
|
||||||
|
|
||||||
// Provides an externally created decoder object |decoder| to insert in the
|
// Provides an externally created decoder object |decoder| to insert in the
|
||||||
// decoder database. The decoder implements a decoder of type |codec| and
|
// decoder database. The decoder implements a decoder of type |codec| and
|
||||||
// associates it with |rtp_payload_type|. Returns kOK on success, kFail on
|
// associates it with |rtp_payload_type|. Returns kOK on success, kFail on
|
||||||
// failure.
|
// failure.
|
||||||
virtual int RegisterExternalDecoder(AudioDecoder* decoder,
|
int RegisterExternalDecoder(AudioDecoder* decoder,
|
||||||
enum NetEqDecoder codec,
|
enum NetEqDecoder codec,
|
||||||
uint8_t rtp_payload_type) OVERRIDE;
|
uint8_t rtp_payload_type) override;
|
||||||
|
|
||||||
// Removes |rtp_payload_type| from the codec database. Returns 0 on success,
|
// Removes |rtp_payload_type| from the codec database. Returns 0 on success,
|
||||||
// -1 on failure.
|
// -1 on failure.
|
||||||
virtual int RemovePayloadType(uint8_t rtp_payload_type) OVERRIDE;
|
int RemovePayloadType(uint8_t rtp_payload_type) override;
|
||||||
|
|
||||||
virtual bool SetMinimumDelay(int delay_ms) OVERRIDE;
|
bool SetMinimumDelay(int delay_ms) override;
|
||||||
|
|
||||||
virtual bool SetMaximumDelay(int delay_ms) OVERRIDE;
|
bool SetMaximumDelay(int delay_ms) override;
|
||||||
|
|
||||||
virtual int LeastRequiredDelayMs() const OVERRIDE;
|
int LeastRequiredDelayMs() const override;
|
||||||
|
|
||||||
virtual int SetTargetDelay() OVERRIDE { return kNotImplemented; }
|
int SetTargetDelay() override { return kNotImplemented; }
|
||||||
|
|
||||||
virtual int TargetDelay() OVERRIDE { return kNotImplemented; }
|
int TargetDelay() override { return kNotImplemented; }
|
||||||
|
|
||||||
virtual int CurrentDelay() OVERRIDE { return kNotImplemented; }
|
int CurrentDelay() override { return kNotImplemented; }
|
||||||
|
|
||||||
// Sets the playout mode to |mode|.
|
// Sets the playout mode to |mode|.
|
||||||
// Deprecated.
|
// Deprecated.
|
||||||
// TODO(henrik.lundin) Delete.
|
// TODO(henrik.lundin) Delete.
|
||||||
virtual void SetPlayoutMode(NetEqPlayoutMode mode) OVERRIDE;
|
void SetPlayoutMode(NetEqPlayoutMode mode) override;
|
||||||
|
|
||||||
// Returns the current playout mode.
|
// Returns the current playout mode.
|
||||||
// Deprecated.
|
// Deprecated.
|
||||||
// TODO(henrik.lundin) Delete.
|
// TODO(henrik.lundin) Delete.
|
||||||
virtual NetEqPlayoutMode PlayoutMode() const OVERRIDE;
|
NetEqPlayoutMode PlayoutMode() const override;
|
||||||
|
|
||||||
// Writes the current network statistics to |stats|. The statistics are reset
|
// Writes the current network statistics to |stats|. The statistics are reset
|
||||||
// after the call.
|
// after the call.
|
||||||
virtual int NetworkStatistics(NetEqNetworkStatistics* stats) OVERRIDE;
|
int NetworkStatistics(NetEqNetworkStatistics* stats) override;
|
||||||
|
|
||||||
// Writes the last packet waiting times (in ms) to |waiting_times|. The number
|
// Writes the last packet waiting times (in ms) to |waiting_times|. The number
|
||||||
// of values written is no more than 100, but may be smaller if the interface
|
// of values written is no more than 100, but may be smaller if the interface
|
||||||
// is polled again before 100 packets has arrived.
|
// is polled again before 100 packets has arrived.
|
||||||
virtual void WaitingTimes(std::vector<int>* waiting_times) OVERRIDE;
|
void WaitingTimes(std::vector<int>* waiting_times) override;
|
||||||
|
|
||||||
// Writes the current RTCP statistics to |stats|. The statistics are reset
|
// Writes the current RTCP statistics to |stats|. The statistics are reset
|
||||||
// and a new report period is started with the call.
|
// and a new report period is started with the call.
|
||||||
virtual void GetRtcpStatistics(RtcpStatistics* stats) OVERRIDE;
|
void GetRtcpStatistics(RtcpStatistics* stats) override;
|
||||||
|
|
||||||
// Same as RtcpStatistics(), but does not reset anything.
|
// Same as RtcpStatistics(), but does not reset anything.
|
||||||
virtual void GetRtcpStatisticsNoReset(RtcpStatistics* stats) OVERRIDE;
|
void GetRtcpStatisticsNoReset(RtcpStatistics* stats) override;
|
||||||
|
|
||||||
// Enables post-decode VAD. When enabled, GetAudio() will return
|
// Enables post-decode VAD. When enabled, GetAudio() will return
|
||||||
// kOutputVADPassive when the signal contains no speech.
|
// kOutputVADPassive when the signal contains no speech.
|
||||||
virtual void EnableVad() OVERRIDE;
|
void EnableVad() override;
|
||||||
|
|
||||||
// Disables post-decode VAD.
|
// Disables post-decode VAD.
|
||||||
virtual void DisableVad() OVERRIDE;
|
void DisableVad() override;
|
||||||
|
|
||||||
virtual bool GetPlayoutTimestamp(uint32_t* timestamp) OVERRIDE;
|
bool GetPlayoutTimestamp(uint32_t* timestamp) override;
|
||||||
|
|
||||||
virtual int SetTargetNumberOfChannels() OVERRIDE { return kNotImplemented; }
|
int SetTargetNumberOfChannels() override { return kNotImplemented; }
|
||||||
|
|
||||||
virtual int SetTargetSampleRate() OVERRIDE { return kNotImplemented; }
|
int SetTargetSampleRate() override { return kNotImplemented; }
|
||||||
|
|
||||||
// Returns the error code for the last occurred error. If no error has
|
// Returns the error code for the last occurred error. If no error has
|
||||||
// occurred, 0 is returned.
|
// occurred, 0 is returned.
|
||||||
virtual int LastError() const OVERRIDE;
|
int LastError() const override;
|
||||||
|
|
||||||
// Returns the error code last returned by a decoder (audio or comfort noise).
|
// Returns the error code last returned by a decoder (audio or comfort noise).
|
||||||
// When LastError() returns kDecoderErrorCode or kComfortNoiseErrorCode, check
|
// When LastError() returns kDecoderErrorCode or kComfortNoiseErrorCode, check
|
||||||
// this method to get the decoder's error code.
|
// this method to get the decoder's error code.
|
||||||
virtual int LastDecoderError() OVERRIDE;
|
int LastDecoderError() override;
|
||||||
|
|
||||||
// Flushes both the packet buffer and the sync buffer.
|
// Flushes both the packet buffer and the sync buffer.
|
||||||
virtual void FlushBuffers() OVERRIDE;
|
void FlushBuffers() override;
|
||||||
|
|
||||||
virtual void PacketBufferStatistics(int* current_num_packets,
|
void PacketBufferStatistics(int* current_num_packets,
|
||||||
int* max_num_packets) const OVERRIDE;
|
int* max_num_packets) const override;
|
||||||
|
|
||||||
// Get sequence number and timestamp of the latest RTP.
|
// Get sequence number and timestamp of the latest RTP.
|
||||||
// This method is to facilitate NACK.
|
// This method is to facilitate NACK.
|
||||||
virtual int DecodedRtpInfo(int* sequence_number,
|
int DecodedRtpInfo(int* sequence_number, uint32_t* timestamp) const override;
|
||||||
uint32_t* timestamp) const OVERRIDE;
|
|
||||||
|
|
||||||
// This accessor method is only intended for testing purposes.
|
// This accessor method is only intended for testing purposes.
|
||||||
const SyncBuffer* sync_buffer_for_test() const;
|
const SyncBuffer* sync_buffer_for_test() const;
|
||||||
|
@ -15,9 +15,9 @@
|
|||||||
|
|
||||||
class NETEQTEST_DummyRTPpacket : public NETEQTEST_RTPpacket {
|
class NETEQTEST_DummyRTPpacket : public NETEQTEST_RTPpacket {
|
||||||
public:
|
public:
|
||||||
virtual int readFromFile(FILE* fp) OVERRIDE;
|
int readFromFile(FILE* fp) override;
|
||||||
virtual int writeToFile(FILE* fp) OVERRIDE;
|
int writeToFile(FILE* fp) override;
|
||||||
virtual void parseHeader() OVERRIDE;
|
void parseHeader() override;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // NETEQTEST_DUMMYRTPPACKET_H
|
#endif // NETEQTEST_DUMMYRTPPACKET_H
|
||||||
|
@ -88,8 +88,8 @@ static const bool runtime_dummy =
|
|||||||
class NetEqIsacQualityTest : public NetEqQualityTest {
|
class NetEqIsacQualityTest : public NetEqQualityTest {
|
||||||
protected:
|
protected:
|
||||||
NetEqIsacQualityTest();
|
NetEqIsacQualityTest();
|
||||||
virtual void SetUp() OVERRIDE;
|
void SetUp() override;
|
||||||
virtual void TearDown() OVERRIDE;
|
void TearDown() override;
|
||||||
virtual int EncodeBlock(int16_t* in_data, int block_size_samples,
|
virtual int EncodeBlock(int16_t* in_data, int block_size_samples,
|
||||||
uint8_t* payload, int max_bytes);
|
uint8_t* payload, int max_bytes);
|
||||||
private:
|
private:
|
||||||
|
@ -116,8 +116,8 @@ DEFINE_bool(dtx, true, "Whether to enable DTX for encoding.");
|
|||||||
class NetEqOpusFecQualityTest : public NetEqQualityTest {
|
class NetEqOpusFecQualityTest : public NetEqQualityTest {
|
||||||
protected:
|
protected:
|
||||||
NetEqOpusFecQualityTest();
|
NetEqOpusFecQualityTest();
|
||||||
virtual void SetUp() OVERRIDE;
|
void SetUp() override;
|
||||||
virtual void TearDown() OVERRIDE;
|
void TearDown() override;
|
||||||
virtual int EncodeBlock(int16_t* in_data, int block_size_samples,
|
virtual int EncodeBlock(int16_t* in_data, int block_size_samples,
|
||||||
uint8_t* payload, int max_bytes);
|
uint8_t* payload, int max_bytes);
|
||||||
private:
|
private:
|
||||||
|
@ -26,7 +26,7 @@ class AudioChecksum : public AudioSink {
|
|||||||
public:
|
public:
|
||||||
AudioChecksum() : finished_(false) {}
|
AudioChecksum() : finished_(false) {}
|
||||||
|
|
||||||
virtual bool WriteArray(const int16_t* audio, size_t num_samples) OVERRIDE {
|
bool WriteArray(const int16_t* audio, size_t num_samples) override {
|
||||||
if (finished_)
|
if (finished_)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
@ -47,7 +47,7 @@ class AudioSinkFork : public AudioSink {
|
|||||||
AudioSinkFork(AudioSink* left, AudioSink* right)
|
AudioSinkFork(AudioSink* left, AudioSink* right)
|
||||||
: left_sink_(left), right_sink_(right) {}
|
: left_sink_(left), right_sink_(right) {}
|
||||||
|
|
||||||
virtual bool WriteArray(const int16_t* audio, size_t num_samples) OVERRIDE {
|
bool WriteArray(const int16_t* audio, size_t num_samples) override {
|
||||||
return left_sink_->WriteArray(audio, num_samples) &&
|
return left_sink_->WriteArray(audio, num_samples) &&
|
||||||
right_sink_->WriteArray(audio, num_samples);
|
right_sink_->WriteArray(audio, num_samples);
|
||||||
}
|
}
|
||||||
|
@ -33,7 +33,7 @@ class ConstantPcmPacketSource : public PacketSource {
|
|||||||
|
|
||||||
// Returns a pointer to the next packet. Will never return NULL. That is,
|
// Returns a pointer to the next packet. Will never return NULL. That is,
|
||||||
// the source is infinite.
|
// the source is infinite.
|
||||||
Packet* NextPacket() OVERRIDE;
|
Packet* NextPacket() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void WriteHeader(uint8_t* packet_memory);
|
void WriteHeader(uint8_t* packet_memory);
|
||||||
|
@ -33,13 +33,13 @@ class LossModel {
|
|||||||
|
|
||||||
class NoLoss : public LossModel {
|
class NoLoss : public LossModel {
|
||||||
public:
|
public:
|
||||||
virtual bool Lost() OVERRIDE;
|
bool Lost() override;
|
||||||
};
|
};
|
||||||
|
|
||||||
class UniformLoss : public LossModel {
|
class UniformLoss : public LossModel {
|
||||||
public:
|
public:
|
||||||
UniformLoss(double loss_rate);
|
UniformLoss(double loss_rate);
|
||||||
virtual bool Lost() OVERRIDE;
|
bool Lost() override;
|
||||||
void set_loss_rate(double loss_rate) { loss_rate_ = loss_rate; }
|
void set_loss_rate(double loss_rate) { loss_rate_ = loss_rate; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@ -49,7 +49,7 @@ class UniformLoss : public LossModel {
|
|||||||
class GilbertElliotLoss : public LossModel {
|
class GilbertElliotLoss : public LossModel {
|
||||||
public:
|
public:
|
||||||
GilbertElliotLoss(double prob_trans_11, double prob_trans_01);
|
GilbertElliotLoss(double prob_trans_11, double prob_trans_01);
|
||||||
virtual bool Lost() OVERRIDE;
|
bool Lost() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// Prob. of losing current packet, when previous packet is lost.
|
// Prob. of losing current packet, when previous packet is lost.
|
||||||
@ -69,8 +69,8 @@ class NetEqQualityTest : public ::testing::Test {
|
|||||||
int channels,
|
int channels,
|
||||||
std::string in_filename,
|
std::string in_filename,
|
||||||
std::string out_filename);
|
std::string out_filename);
|
||||||
virtual void SetUp() OVERRIDE;
|
void SetUp() override;
|
||||||
virtual void TearDown() OVERRIDE;
|
void TearDown() override;
|
||||||
|
|
||||||
// EncodeBlock(...) does the following:
|
// EncodeBlock(...) does the following:
|
||||||
// 1. encodes a block of audio, saved in |in_data| and has a length of
|
// 1. encodes a block of audio, saved in |in_data| and has a length of
|
||||||
|
@ -34,7 +34,7 @@ class OutputAudioFile : public AudioSink {
|
|||||||
fclose(out_file_);
|
fclose(out_file_);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual bool WriteArray(const int16_t* audio, size_t num_samples) OVERRIDE {
|
bool WriteArray(const int16_t* audio, size_t num_samples) override {
|
||||||
assert(out_file_);
|
assert(out_file_);
|
||||||
return fwrite(audio, sizeof(*audio), num_samples, out_file_) == num_samples;
|
return fwrite(audio, sizeof(*audio), num_samples, out_file_) == num_samples;
|
||||||
}
|
}
|
||||||
|
@ -27,7 +27,7 @@ class OutputWavFile : public AudioSink {
|
|||||||
OutputWavFile(const std::string& file_name, int sample_rate_hz)
|
OutputWavFile(const std::string& file_name, int sample_rate_hz)
|
||||||
: wav_writer_(file_name, sample_rate_hz, 1) {}
|
: wav_writer_(file_name, sample_rate_hz, 1) {}
|
||||||
|
|
||||||
virtual bool WriteArray(const int16_t* audio, size_t num_samples) OVERRIDE {
|
bool WriteArray(const int16_t* audio, size_t num_samples) override {
|
||||||
wav_writer_.WriteSamples(audio, num_samples);
|
wav_writer_.WriteSamples(audio, num_samples);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -41,7 +41,7 @@ class RtpFileSource : public PacketSource {
|
|||||||
|
|
||||||
// Returns a pointer to the next packet. Returns NULL if end of file was
|
// Returns a pointer to the next packet. Returns NULL if end of file was
|
||||||
// reached, or if a the data was corrupt.
|
// reached, or if a the data was corrupt.
|
||||||
virtual Packet* NextPacket() OVERRIDE;
|
Packet* NextPacket() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static const int kFirstLineLength = 40;
|
static const int kFirstLineLength = 40;
|
||||||
|
@ -70,7 +70,7 @@ class TimestampJumpRtpGenerator : public RtpGenerator {
|
|||||||
|
|
||||||
uint32_t GetRtpHeader(uint8_t payload_type,
|
uint32_t GetRtpHeader(uint8_t payload_type,
|
||||||
size_t payload_length_samples,
|
size_t payload_length_samples,
|
||||||
WebRtcRTPHeader* rtp_header) OVERRIDE;
|
WebRtcRTPHeader* rtp_header) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
uint32_t jump_from_timestamp_;
|
uint32_t jump_from_timestamp_;
|
||||||
|
@ -40,8 +40,8 @@ public:
|
|||||||
virtual ~AudioConferenceMixer() {}
|
virtual ~AudioConferenceMixer() {}
|
||||||
|
|
||||||
// Module functions
|
// Module functions
|
||||||
virtual int64_t TimeUntilNextProcess() OVERRIDE = 0;
|
int64_t TimeUntilNextProcess() override = 0;
|
||||||
virtual int32_t Process() OVERRIDE = 0;
|
int32_t Process() override = 0;
|
||||||
|
|
||||||
// Register/unregister a callback class for receiving the mixed audio.
|
// Register/unregister a callback class for receiving the mixed audio.
|
||||||
virtual int32_t RegisterMixedStreamCallback(
|
virtual int32_t RegisterMixedStreamCallback(
|
||||||
|
@ -64,26 +64,27 @@ public:
|
|||||||
bool Init();
|
bool Init();
|
||||||
|
|
||||||
// Module functions
|
// Module functions
|
||||||
virtual int64_t TimeUntilNextProcess() OVERRIDE;
|
int64_t TimeUntilNextProcess() override;
|
||||||
virtual int32_t Process() OVERRIDE;
|
int32_t Process() override;
|
||||||
|
|
||||||
// AudioConferenceMixer functions
|
// AudioConferenceMixer functions
|
||||||
virtual int32_t RegisterMixedStreamCallback(
|
int32_t RegisterMixedStreamCallback(
|
||||||
AudioMixerOutputReceiver& mixReceiver) OVERRIDE;
|
AudioMixerOutputReceiver& mixReceiver) override;
|
||||||
virtual int32_t UnRegisterMixedStreamCallback() OVERRIDE;
|
int32_t UnRegisterMixedStreamCallback() override;
|
||||||
virtual int32_t RegisterMixerStatusCallback(
|
int32_t RegisterMixerStatusCallback(
|
||||||
AudioMixerStatusReceiver& mixerStatusCallback,
|
AudioMixerStatusReceiver& mixerStatusCallback,
|
||||||
const uint32_t amountOf10MsBetweenCallbacks) OVERRIDE;
|
const uint32_t amountOf10MsBetweenCallbacks) override;
|
||||||
virtual int32_t UnRegisterMixerStatusCallback() OVERRIDE;
|
int32_t UnRegisterMixerStatusCallback() override;
|
||||||
virtual int32_t SetMixabilityStatus(MixerParticipant& participant,
|
int32_t SetMixabilityStatus(MixerParticipant& participant,
|
||||||
bool mixable) OVERRIDE;
|
bool mixable) override;
|
||||||
virtual int32_t MixabilityStatus(MixerParticipant& participant,
|
int32_t MixabilityStatus(MixerParticipant& participant,
|
||||||
bool& mixable) OVERRIDE;
|
bool& mixable) override;
|
||||||
virtual int32_t SetMinimumMixingFrequency(Frequency freq) OVERRIDE;
|
int32_t SetMinimumMixingFrequency(Frequency freq) override;
|
||||||
virtual int32_t SetAnonymousMixabilityStatus(
|
int32_t SetAnonymousMixabilityStatus(MixerParticipant& participant,
|
||||||
MixerParticipant& participant, const bool mixable) OVERRIDE;
|
const bool mixable) override;
|
||||||
virtual int32_t AnonymousMixabilityStatus(
|
int32_t AnonymousMixabilityStatus(MixerParticipant& participant,
|
||||||
MixerParticipant& participant, bool& mixable) OVERRIDE;
|
bool& mixable) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
enum{DEFAULT_AUDIO_FRAME_POOLSIZE = 50};
|
enum{DEFAULT_AUDIO_FRAME_POOLSIZE = 50};
|
||||||
|
|
||||||
|
@ -43,8 +43,8 @@ public:
|
|||||||
virtual ~AudioDeviceModuleImpl();
|
virtual ~AudioDeviceModuleImpl();
|
||||||
|
|
||||||
public: // RefCountedModule
|
public: // RefCountedModule
|
||||||
virtual int64_t TimeUntilNextProcess() OVERRIDE;
|
int64_t TimeUntilNextProcess() override;
|
||||||
virtual int32_t Process() OVERRIDE;
|
int32_t Process() override;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// Factory methods (resource allocation/deallocation)
|
// Factory methods (resource allocation/deallocation)
|
||||||
@ -53,155 +53,142 @@ public:
|
|||||||
const AudioLayer audioLayer = kPlatformDefaultAudio);
|
const AudioLayer audioLayer = kPlatformDefaultAudio);
|
||||||
|
|
||||||
// Retrieve the currently utilized audio layer
|
// Retrieve the currently utilized audio layer
|
||||||
virtual int32_t ActiveAudioLayer(AudioLayer* audioLayer) const OVERRIDE;
|
int32_t ActiveAudioLayer(AudioLayer* audioLayer) const override;
|
||||||
|
|
||||||
// Error handling
|
// Error handling
|
||||||
virtual ErrorCode LastError() const OVERRIDE;
|
ErrorCode LastError() const override;
|
||||||
virtual int32_t RegisterEventObserver(
|
int32_t RegisterEventObserver(AudioDeviceObserver* eventCallback) override;
|
||||||
AudioDeviceObserver* eventCallback) OVERRIDE;
|
|
||||||
|
|
||||||
// Full-duplex transportation of PCM audio
|
// Full-duplex transportation of PCM audio
|
||||||
virtual int32_t RegisterAudioCallback(
|
int32_t RegisterAudioCallback(AudioTransport* audioCallback) override;
|
||||||
AudioTransport* audioCallback) OVERRIDE;
|
|
||||||
|
|
||||||
// Main initializaton and termination
|
// Main initializaton and termination
|
||||||
virtual int32_t Init() OVERRIDE;
|
int32_t Init() override;
|
||||||
virtual int32_t Terminate() OVERRIDE;
|
int32_t Terminate() override;
|
||||||
virtual bool Initialized() const OVERRIDE;
|
bool Initialized() const override;
|
||||||
|
|
||||||
// Device enumeration
|
// Device enumeration
|
||||||
virtual int16_t PlayoutDevices() OVERRIDE;
|
int16_t PlayoutDevices() override;
|
||||||
virtual int16_t RecordingDevices() OVERRIDE;
|
int16_t RecordingDevices() override;
|
||||||
virtual int32_t PlayoutDeviceName(
|
int32_t PlayoutDeviceName(uint16_t index,
|
||||||
uint16_t index,
|
|
||||||
char name[kAdmMaxDeviceNameSize],
|
char name[kAdmMaxDeviceNameSize],
|
||||||
char guid[kAdmMaxGuidSize]) OVERRIDE;
|
char guid[kAdmMaxGuidSize]) override;
|
||||||
virtual int32_t RecordingDeviceName(
|
int32_t RecordingDeviceName(uint16_t index,
|
||||||
uint16_t index,
|
|
||||||
char name[kAdmMaxDeviceNameSize],
|
char name[kAdmMaxDeviceNameSize],
|
||||||
char guid[kAdmMaxGuidSize]) OVERRIDE;
|
char guid[kAdmMaxGuidSize]) override;
|
||||||
|
|
||||||
// Device selection
|
// Device selection
|
||||||
virtual int32_t SetPlayoutDevice(uint16_t index) OVERRIDE;
|
int32_t SetPlayoutDevice(uint16_t index) override;
|
||||||
virtual int32_t SetPlayoutDevice(WindowsDeviceType device) OVERRIDE;
|
int32_t SetPlayoutDevice(WindowsDeviceType device) override;
|
||||||
virtual int32_t SetRecordingDevice(uint16_t index) OVERRIDE;
|
int32_t SetRecordingDevice(uint16_t index) override;
|
||||||
virtual int32_t SetRecordingDevice(WindowsDeviceType device) OVERRIDE;
|
int32_t SetRecordingDevice(WindowsDeviceType device) override;
|
||||||
|
|
||||||
// Audio transport initialization
|
// Audio transport initialization
|
||||||
virtual int32_t PlayoutIsAvailable(bool* available) OVERRIDE;
|
int32_t PlayoutIsAvailable(bool* available) override;
|
||||||
virtual int32_t InitPlayout() OVERRIDE;
|
int32_t InitPlayout() override;
|
||||||
virtual bool PlayoutIsInitialized() const OVERRIDE;
|
bool PlayoutIsInitialized() const override;
|
||||||
virtual int32_t RecordingIsAvailable(bool* available) OVERRIDE;
|
int32_t RecordingIsAvailable(bool* available) override;
|
||||||
virtual int32_t InitRecording() OVERRIDE;
|
int32_t InitRecording() override;
|
||||||
virtual bool RecordingIsInitialized() const OVERRIDE;
|
bool RecordingIsInitialized() const override;
|
||||||
|
|
||||||
// Audio transport control
|
// Audio transport control
|
||||||
virtual int32_t StartPlayout() OVERRIDE;
|
int32_t StartPlayout() override;
|
||||||
virtual int32_t StopPlayout() OVERRIDE;
|
int32_t StopPlayout() override;
|
||||||
virtual bool Playing() const OVERRIDE;
|
bool Playing() const override;
|
||||||
virtual int32_t StartRecording() OVERRIDE;
|
int32_t StartRecording() override;
|
||||||
virtual int32_t StopRecording() OVERRIDE;
|
int32_t StopRecording() override;
|
||||||
virtual bool Recording() const OVERRIDE;
|
bool Recording() const override;
|
||||||
|
|
||||||
// Microphone Automatic Gain Control (AGC)
|
// Microphone Automatic Gain Control (AGC)
|
||||||
virtual int32_t SetAGC(bool enable) OVERRIDE;
|
int32_t SetAGC(bool enable) override;
|
||||||
virtual bool AGC() const OVERRIDE;
|
bool AGC() const override;
|
||||||
|
|
||||||
// Volume control based on the Windows Wave API (Windows only)
|
// Volume control based on the Windows Wave API (Windows only)
|
||||||
virtual int32_t SetWaveOutVolume(uint16_t volumeLeft,
|
int32_t SetWaveOutVolume(uint16_t volumeLeft,
|
||||||
uint16_t volumeRight) OVERRIDE;
|
uint16_t volumeRight) override;
|
||||||
virtual int32_t WaveOutVolume(uint16_t* volumeLeft,
|
int32_t WaveOutVolume(uint16_t* volumeLeft,
|
||||||
uint16_t* volumeRight) const OVERRIDE;
|
uint16_t* volumeRight) const override;
|
||||||
|
|
||||||
// Audio mixer initialization
|
// Audio mixer initialization
|
||||||
virtual int32_t InitSpeaker() OVERRIDE;
|
int32_t InitSpeaker() override;
|
||||||
virtual bool SpeakerIsInitialized() const OVERRIDE;
|
bool SpeakerIsInitialized() const override;
|
||||||
virtual int32_t InitMicrophone() OVERRIDE;
|
int32_t InitMicrophone() override;
|
||||||
virtual bool MicrophoneIsInitialized() const OVERRIDE;
|
bool MicrophoneIsInitialized() const override;
|
||||||
|
|
||||||
// Speaker volume controls
|
// Speaker volume controls
|
||||||
virtual int32_t SpeakerVolumeIsAvailable(bool* available) OVERRIDE;
|
int32_t SpeakerVolumeIsAvailable(bool* available) override;
|
||||||
virtual int32_t SetSpeakerVolume(uint32_t volume) OVERRIDE;
|
int32_t SetSpeakerVolume(uint32_t volume) override;
|
||||||
virtual int32_t SpeakerVolume(uint32_t* volume) const OVERRIDE;
|
int32_t SpeakerVolume(uint32_t* volume) const override;
|
||||||
virtual int32_t MaxSpeakerVolume(uint32_t* maxVolume) const OVERRIDE;
|
int32_t MaxSpeakerVolume(uint32_t* maxVolume) const override;
|
||||||
virtual int32_t MinSpeakerVolume(uint32_t* minVolume) const OVERRIDE;
|
int32_t MinSpeakerVolume(uint32_t* minVolume) const override;
|
||||||
virtual int32_t SpeakerVolumeStepSize(
|
int32_t SpeakerVolumeStepSize(uint16_t* stepSize) const override;
|
||||||
uint16_t* stepSize) const OVERRIDE;
|
|
||||||
|
|
||||||
// Microphone volume controls
|
// Microphone volume controls
|
||||||
virtual int32_t MicrophoneVolumeIsAvailable(bool* available) OVERRIDE;
|
int32_t MicrophoneVolumeIsAvailable(bool* available) override;
|
||||||
virtual int32_t SetMicrophoneVolume(uint32_t volume) OVERRIDE;
|
int32_t SetMicrophoneVolume(uint32_t volume) override;
|
||||||
virtual int32_t MicrophoneVolume(uint32_t* volume) const OVERRIDE;
|
int32_t MicrophoneVolume(uint32_t* volume) const override;
|
||||||
virtual int32_t MaxMicrophoneVolume(
|
int32_t MaxMicrophoneVolume(uint32_t* maxVolume) const override;
|
||||||
uint32_t* maxVolume) const OVERRIDE;
|
int32_t MinMicrophoneVolume(uint32_t* minVolume) const override;
|
||||||
virtual int32_t MinMicrophoneVolume(
|
int32_t MicrophoneVolumeStepSize(uint16_t* stepSize) const override;
|
||||||
uint32_t* minVolume) const OVERRIDE;
|
|
||||||
virtual int32_t MicrophoneVolumeStepSize(
|
|
||||||
uint16_t* stepSize) const OVERRIDE;
|
|
||||||
|
|
||||||
// Speaker mute control
|
// Speaker mute control
|
||||||
virtual int32_t SpeakerMuteIsAvailable(bool* available) OVERRIDE;
|
int32_t SpeakerMuteIsAvailable(bool* available) override;
|
||||||
virtual int32_t SetSpeakerMute(bool enable) OVERRIDE;
|
int32_t SetSpeakerMute(bool enable) override;
|
||||||
virtual int32_t SpeakerMute(bool* enabled) const OVERRIDE;
|
int32_t SpeakerMute(bool* enabled) const override;
|
||||||
|
|
||||||
// Microphone mute control
|
// Microphone mute control
|
||||||
virtual int32_t MicrophoneMuteIsAvailable(bool* available) OVERRIDE;
|
int32_t MicrophoneMuteIsAvailable(bool* available) override;
|
||||||
virtual int32_t SetMicrophoneMute(bool enable) OVERRIDE;
|
int32_t SetMicrophoneMute(bool enable) override;
|
||||||
virtual int32_t MicrophoneMute(bool* enabled) const OVERRIDE;
|
int32_t MicrophoneMute(bool* enabled) const override;
|
||||||
|
|
||||||
// Microphone boost control
|
// Microphone boost control
|
||||||
virtual int32_t MicrophoneBoostIsAvailable(bool* available) OVERRIDE;
|
int32_t MicrophoneBoostIsAvailable(bool* available) override;
|
||||||
virtual int32_t SetMicrophoneBoost(bool enable) OVERRIDE;
|
int32_t SetMicrophoneBoost(bool enable) override;
|
||||||
virtual int32_t MicrophoneBoost(bool* enabled) const OVERRIDE;
|
int32_t MicrophoneBoost(bool* enabled) const override;
|
||||||
|
|
||||||
// Stereo support
|
// Stereo support
|
||||||
virtual int32_t StereoPlayoutIsAvailable(bool* available) const OVERRIDE;
|
int32_t StereoPlayoutIsAvailable(bool* available) const override;
|
||||||
virtual int32_t SetStereoPlayout(bool enable) OVERRIDE;
|
int32_t SetStereoPlayout(bool enable) override;
|
||||||
virtual int32_t StereoPlayout(bool* enabled) const OVERRIDE;
|
int32_t StereoPlayout(bool* enabled) const override;
|
||||||
virtual int32_t StereoRecordingIsAvailable(bool* available) const OVERRIDE;
|
int32_t StereoRecordingIsAvailable(bool* available) const override;
|
||||||
virtual int32_t SetStereoRecording(bool enable) OVERRIDE;
|
int32_t SetStereoRecording(bool enable) override;
|
||||||
virtual int32_t StereoRecording(bool* enabled) const OVERRIDE;
|
int32_t StereoRecording(bool* enabled) const override;
|
||||||
virtual int32_t SetRecordingChannel(const ChannelType channel) OVERRIDE;
|
int32_t SetRecordingChannel(const ChannelType channel) override;
|
||||||
virtual int32_t RecordingChannel(ChannelType* channel) const OVERRIDE;
|
int32_t RecordingChannel(ChannelType* channel) const override;
|
||||||
|
|
||||||
// Delay information and control
|
// Delay information and control
|
||||||
virtual int32_t SetPlayoutBuffer(const BufferType type,
|
int32_t SetPlayoutBuffer(const BufferType type,
|
||||||
uint16_t sizeMS = 0) OVERRIDE;
|
uint16_t sizeMS = 0) override;
|
||||||
virtual int32_t PlayoutBuffer(BufferType* type,
|
int32_t PlayoutBuffer(BufferType* type, uint16_t* sizeMS) const override;
|
||||||
uint16_t* sizeMS) const OVERRIDE;
|
int32_t PlayoutDelay(uint16_t* delayMS) const override;
|
||||||
virtual int32_t PlayoutDelay(uint16_t* delayMS) const OVERRIDE;
|
int32_t RecordingDelay(uint16_t* delayMS) const override;
|
||||||
virtual int32_t RecordingDelay(uint16_t* delayMS) const OVERRIDE;
|
|
||||||
|
|
||||||
// CPU load
|
// CPU load
|
||||||
virtual int32_t CPULoad(uint16_t* load) const OVERRIDE;
|
int32_t CPULoad(uint16_t* load) const override;
|
||||||
|
|
||||||
// Recording of raw PCM data
|
// Recording of raw PCM data
|
||||||
virtual int32_t StartRawOutputFileRecording(
|
int32_t StartRawOutputFileRecording(
|
||||||
const char pcmFileNameUTF8[kAdmMaxFileNameSize]) OVERRIDE;
|
const char pcmFileNameUTF8[kAdmMaxFileNameSize]) override;
|
||||||
virtual int32_t StopRawOutputFileRecording() OVERRIDE;
|
int32_t StopRawOutputFileRecording() override;
|
||||||
virtual int32_t StartRawInputFileRecording(
|
int32_t StartRawInputFileRecording(
|
||||||
const char pcmFileNameUTF8[kAdmMaxFileNameSize]) OVERRIDE;
|
const char pcmFileNameUTF8[kAdmMaxFileNameSize]) override;
|
||||||
virtual int32_t StopRawInputFileRecording() OVERRIDE;
|
int32_t StopRawInputFileRecording() override;
|
||||||
|
|
||||||
// Native sample rate controls (samples/sec)
|
// Native sample rate controls (samples/sec)
|
||||||
virtual int32_t SetRecordingSampleRate(
|
int32_t SetRecordingSampleRate(const uint32_t samplesPerSec) override;
|
||||||
const uint32_t samplesPerSec) OVERRIDE;
|
int32_t RecordingSampleRate(uint32_t* samplesPerSec) const override;
|
||||||
virtual int32_t RecordingSampleRate(
|
int32_t SetPlayoutSampleRate(const uint32_t samplesPerSec) override;
|
||||||
uint32_t* samplesPerSec) const OVERRIDE;
|
int32_t PlayoutSampleRate(uint32_t* samplesPerSec) const override;
|
||||||
virtual int32_t SetPlayoutSampleRate(
|
|
||||||
const uint32_t samplesPerSec) OVERRIDE;
|
|
||||||
virtual int32_t PlayoutSampleRate(
|
|
||||||
uint32_t* samplesPerSec) const OVERRIDE;
|
|
||||||
|
|
||||||
// Mobile device specific functions
|
// Mobile device specific functions
|
||||||
virtual int32_t ResetAudioDevice() OVERRIDE;
|
int32_t ResetAudioDevice() override;
|
||||||
virtual int32_t SetLoudspeakerStatus(bool enable) OVERRIDE;
|
int32_t SetLoudspeakerStatus(bool enable) override;
|
||||||
virtual int32_t GetLoudspeakerStatus(bool* enabled) const OVERRIDE;
|
int32_t GetLoudspeakerStatus(bool* enabled) const override;
|
||||||
|
|
||||||
virtual bool BuiltInAECIsAvailable() const OVERRIDE;
|
bool BuiltInAECIsAvailable() const override;
|
||||||
|
|
||||||
virtual int32_t EnableBuiltInAEC(bool enable) OVERRIDE;
|
int32_t EnableBuiltInAEC(bool enable) override;
|
||||||
virtual bool BuiltInAECIsEnabled() const OVERRIDE;
|
bool BuiltInAECIsEnabled() const override;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
int32_t Id() {return _id;}
|
int32_t Id() {return _id;}
|
||||||
|
@ -23,124 +23,123 @@ class AudioDeviceDummy : public AudioDeviceGeneric {
|
|||||||
virtual ~AudioDeviceDummy() {}
|
virtual ~AudioDeviceDummy() {}
|
||||||
|
|
||||||
// Retrieve the currently utilized audio layer
|
// Retrieve the currently utilized audio layer
|
||||||
virtual int32_t ActiveAudioLayer(
|
int32_t ActiveAudioLayer(
|
||||||
AudioDeviceModule::AudioLayer& audioLayer) const OVERRIDE;
|
AudioDeviceModule::AudioLayer& audioLayer) const override;
|
||||||
|
|
||||||
// Main initializaton and termination
|
// Main initializaton and termination
|
||||||
virtual int32_t Init() OVERRIDE;
|
int32_t Init() override;
|
||||||
virtual int32_t Terminate() OVERRIDE;
|
int32_t Terminate() override;
|
||||||
virtual bool Initialized() const OVERRIDE;
|
bool Initialized() const override;
|
||||||
|
|
||||||
// Device enumeration
|
// Device enumeration
|
||||||
virtual int16_t PlayoutDevices() OVERRIDE;
|
int16_t PlayoutDevices() override;
|
||||||
virtual int16_t RecordingDevices() OVERRIDE;
|
int16_t RecordingDevices() override;
|
||||||
virtual int32_t PlayoutDeviceName(uint16_t index,
|
int32_t PlayoutDeviceName(uint16_t index,
|
||||||
char name[kAdmMaxDeviceNameSize],
|
char name[kAdmMaxDeviceNameSize],
|
||||||
char guid[kAdmMaxGuidSize]) OVERRIDE;
|
char guid[kAdmMaxGuidSize]) override;
|
||||||
virtual int32_t RecordingDeviceName(uint16_t index,
|
int32_t RecordingDeviceName(uint16_t index,
|
||||||
char name[kAdmMaxDeviceNameSize],
|
char name[kAdmMaxDeviceNameSize],
|
||||||
char guid[kAdmMaxGuidSize]) OVERRIDE;
|
char guid[kAdmMaxGuidSize]) override;
|
||||||
|
|
||||||
// Device selection
|
// Device selection
|
||||||
virtual int32_t SetPlayoutDevice(uint16_t index) OVERRIDE;
|
int32_t SetPlayoutDevice(uint16_t index) override;
|
||||||
virtual int32_t SetPlayoutDevice(
|
int32_t SetPlayoutDevice(
|
||||||
AudioDeviceModule::WindowsDeviceType device) OVERRIDE;
|
AudioDeviceModule::WindowsDeviceType device) override;
|
||||||
virtual int32_t SetRecordingDevice(uint16_t index) OVERRIDE;
|
int32_t SetRecordingDevice(uint16_t index) override;
|
||||||
virtual int32_t SetRecordingDevice(
|
int32_t SetRecordingDevice(
|
||||||
AudioDeviceModule::WindowsDeviceType device) OVERRIDE;
|
AudioDeviceModule::WindowsDeviceType device) override;
|
||||||
|
|
||||||
// Audio transport initialization
|
// Audio transport initialization
|
||||||
virtual int32_t PlayoutIsAvailable(bool& available) OVERRIDE;
|
int32_t PlayoutIsAvailable(bool& available) override;
|
||||||
virtual int32_t InitPlayout() OVERRIDE;
|
int32_t InitPlayout() override;
|
||||||
virtual bool PlayoutIsInitialized() const OVERRIDE;
|
bool PlayoutIsInitialized() const override;
|
||||||
virtual int32_t RecordingIsAvailable(bool& available) OVERRIDE;
|
int32_t RecordingIsAvailable(bool& available) override;
|
||||||
virtual int32_t InitRecording() OVERRIDE;
|
int32_t InitRecording() override;
|
||||||
virtual bool RecordingIsInitialized() const OVERRIDE;
|
bool RecordingIsInitialized() const override;
|
||||||
|
|
||||||
// Audio transport control
|
// Audio transport control
|
||||||
virtual int32_t StartPlayout() OVERRIDE;
|
int32_t StartPlayout() override;
|
||||||
virtual int32_t StopPlayout() OVERRIDE;
|
int32_t StopPlayout() override;
|
||||||
virtual bool Playing() const OVERRIDE;
|
bool Playing() const override;
|
||||||
virtual int32_t StartRecording() OVERRIDE;
|
int32_t StartRecording() override;
|
||||||
virtual int32_t StopRecording() OVERRIDE;
|
int32_t StopRecording() override;
|
||||||
virtual bool Recording() const OVERRIDE;
|
bool Recording() const override;
|
||||||
|
|
||||||
// Microphone Automatic Gain Control (AGC)
|
// Microphone Automatic Gain Control (AGC)
|
||||||
virtual int32_t SetAGC(bool enable) OVERRIDE;
|
int32_t SetAGC(bool enable) override;
|
||||||
virtual bool AGC() const OVERRIDE;
|
bool AGC() const override;
|
||||||
|
|
||||||
// Volume control based on the Windows Wave API (Windows only)
|
// Volume control based on the Windows Wave API (Windows only)
|
||||||
virtual int32_t SetWaveOutVolume(uint16_t volumeLeft,
|
int32_t SetWaveOutVolume(uint16_t volumeLeft, uint16_t volumeRight) override;
|
||||||
uint16_t volumeRight) OVERRIDE;
|
int32_t WaveOutVolume(uint16_t& volumeLeft,
|
||||||
virtual int32_t WaveOutVolume(uint16_t& volumeLeft,
|
uint16_t& volumeRight) const override;
|
||||||
uint16_t& volumeRight) const OVERRIDE;
|
|
||||||
|
|
||||||
// Audio mixer initialization
|
// Audio mixer initialization
|
||||||
virtual int32_t InitSpeaker() OVERRIDE;
|
int32_t InitSpeaker() override;
|
||||||
virtual bool SpeakerIsInitialized() const OVERRIDE;
|
bool SpeakerIsInitialized() const override;
|
||||||
virtual int32_t InitMicrophone() OVERRIDE;
|
int32_t InitMicrophone() override;
|
||||||
virtual bool MicrophoneIsInitialized() const OVERRIDE;
|
bool MicrophoneIsInitialized() const override;
|
||||||
|
|
||||||
// Speaker volume controls
|
// Speaker volume controls
|
||||||
virtual int32_t SpeakerVolumeIsAvailable(bool& available) OVERRIDE;
|
int32_t SpeakerVolumeIsAvailable(bool& available) override;
|
||||||
virtual int32_t SetSpeakerVolume(uint32_t volume) OVERRIDE;
|
int32_t SetSpeakerVolume(uint32_t volume) override;
|
||||||
virtual int32_t SpeakerVolume(uint32_t& volume) const OVERRIDE;
|
int32_t SpeakerVolume(uint32_t& volume) const override;
|
||||||
virtual int32_t MaxSpeakerVolume(uint32_t& maxVolume) const OVERRIDE;
|
int32_t MaxSpeakerVolume(uint32_t& maxVolume) const override;
|
||||||
virtual int32_t MinSpeakerVolume(uint32_t& minVolume) const OVERRIDE;
|
int32_t MinSpeakerVolume(uint32_t& minVolume) const override;
|
||||||
virtual int32_t SpeakerVolumeStepSize(uint16_t& stepSize) const OVERRIDE;
|
int32_t SpeakerVolumeStepSize(uint16_t& stepSize) const override;
|
||||||
|
|
||||||
// Microphone volume controls
|
// Microphone volume controls
|
||||||
virtual int32_t MicrophoneVolumeIsAvailable(bool& available) OVERRIDE;
|
int32_t MicrophoneVolumeIsAvailable(bool& available) override;
|
||||||
virtual int32_t SetMicrophoneVolume(uint32_t volume) OVERRIDE;
|
int32_t SetMicrophoneVolume(uint32_t volume) override;
|
||||||
virtual int32_t MicrophoneVolume(uint32_t& volume) const OVERRIDE;
|
int32_t MicrophoneVolume(uint32_t& volume) const override;
|
||||||
virtual int32_t MaxMicrophoneVolume(uint32_t& maxVolume) const OVERRIDE;
|
int32_t MaxMicrophoneVolume(uint32_t& maxVolume) const override;
|
||||||
virtual int32_t MinMicrophoneVolume(uint32_t& minVolume) const OVERRIDE;
|
int32_t MinMicrophoneVolume(uint32_t& minVolume) const override;
|
||||||
virtual int32_t MicrophoneVolumeStepSize(uint16_t& stepSize) const OVERRIDE;
|
int32_t MicrophoneVolumeStepSize(uint16_t& stepSize) const override;
|
||||||
|
|
||||||
// Speaker mute control
|
// Speaker mute control
|
||||||
virtual int32_t SpeakerMuteIsAvailable(bool& available) OVERRIDE;
|
int32_t SpeakerMuteIsAvailable(bool& available) override;
|
||||||
virtual int32_t SetSpeakerMute(bool enable) OVERRIDE;
|
int32_t SetSpeakerMute(bool enable) override;
|
||||||
virtual int32_t SpeakerMute(bool& enabled) const OVERRIDE;
|
int32_t SpeakerMute(bool& enabled) const override;
|
||||||
|
|
||||||
// Microphone mute control
|
// Microphone mute control
|
||||||
virtual int32_t MicrophoneMuteIsAvailable(bool& available) OVERRIDE;
|
int32_t MicrophoneMuteIsAvailable(bool& available) override;
|
||||||
virtual int32_t SetMicrophoneMute(bool enable) OVERRIDE;
|
int32_t SetMicrophoneMute(bool enable) override;
|
||||||
virtual int32_t MicrophoneMute(bool& enabled) const OVERRIDE;
|
int32_t MicrophoneMute(bool& enabled) const override;
|
||||||
|
|
||||||
// Microphone boost control
|
// Microphone boost control
|
||||||
virtual int32_t MicrophoneBoostIsAvailable(bool& available) OVERRIDE;
|
int32_t MicrophoneBoostIsAvailable(bool& available) override;
|
||||||
virtual int32_t SetMicrophoneBoost(bool enable) OVERRIDE;
|
int32_t SetMicrophoneBoost(bool enable) override;
|
||||||
virtual int32_t MicrophoneBoost(bool& enabled) const OVERRIDE;
|
int32_t MicrophoneBoost(bool& enabled) const override;
|
||||||
|
|
||||||
// Stereo support
|
// Stereo support
|
||||||
virtual int32_t StereoPlayoutIsAvailable(bool& available) OVERRIDE;
|
int32_t StereoPlayoutIsAvailable(bool& available) override;
|
||||||
virtual int32_t SetStereoPlayout(bool enable) OVERRIDE;
|
int32_t SetStereoPlayout(bool enable) override;
|
||||||
virtual int32_t StereoPlayout(bool& enabled) const OVERRIDE;
|
int32_t StereoPlayout(bool& enabled) const override;
|
||||||
virtual int32_t StereoRecordingIsAvailable(bool& available) OVERRIDE;
|
int32_t StereoRecordingIsAvailable(bool& available) override;
|
||||||
virtual int32_t SetStereoRecording(bool enable) OVERRIDE;
|
int32_t SetStereoRecording(bool enable) override;
|
||||||
virtual int32_t StereoRecording(bool& enabled) const OVERRIDE;
|
int32_t StereoRecording(bool& enabled) const override;
|
||||||
|
|
||||||
// Delay information and control
|
// Delay information and control
|
||||||
virtual int32_t SetPlayoutBuffer(const AudioDeviceModule::BufferType type,
|
int32_t SetPlayoutBuffer(const AudioDeviceModule::BufferType type,
|
||||||
uint16_t sizeMS) OVERRIDE;
|
uint16_t sizeMS) override;
|
||||||
virtual int32_t PlayoutBuffer(AudioDeviceModule::BufferType& type,
|
int32_t PlayoutBuffer(AudioDeviceModule::BufferType& type,
|
||||||
uint16_t& sizeMS) const OVERRIDE;
|
uint16_t& sizeMS) const override;
|
||||||
virtual int32_t PlayoutDelay(uint16_t& delayMS) const OVERRIDE;
|
int32_t PlayoutDelay(uint16_t& delayMS) const override;
|
||||||
virtual int32_t RecordingDelay(uint16_t& delayMS) const OVERRIDE;
|
int32_t RecordingDelay(uint16_t& delayMS) const override;
|
||||||
|
|
||||||
// CPU load
|
// CPU load
|
||||||
virtual int32_t CPULoad(uint16_t& load) const OVERRIDE;
|
int32_t CPULoad(uint16_t& load) const override;
|
||||||
|
|
||||||
virtual bool PlayoutWarning() const OVERRIDE;
|
bool PlayoutWarning() const override;
|
||||||
virtual bool PlayoutError() const OVERRIDE;
|
bool PlayoutError() const override;
|
||||||
virtual bool RecordingWarning() const OVERRIDE;
|
bool RecordingWarning() const override;
|
||||||
virtual bool RecordingError() const OVERRIDE;
|
bool RecordingError() const override;
|
||||||
virtual void ClearPlayoutWarning() OVERRIDE;
|
void ClearPlayoutWarning() override;
|
||||||
virtual void ClearPlayoutError() OVERRIDE;
|
void ClearPlayoutError() override;
|
||||||
virtual void ClearRecordingWarning() OVERRIDE;
|
void ClearRecordingWarning() override;
|
||||||
virtual void ClearRecordingError() OVERRIDE;
|
void ClearRecordingError() override;
|
||||||
|
|
||||||
virtual void AttachAudioBuffer(AudioDeviceBuffer* audioBuffer) OVERRIDE;
|
void AttachAudioBuffer(AudioDeviceBuffer* audioBuffer) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace webrtc
|
} // namespace webrtc
|
||||||
|
@ -24,7 +24,7 @@ public:
|
|||||||
AudioDeviceUtilityDummy(const int32_t id) {}
|
AudioDeviceUtilityDummy(const int32_t id) {}
|
||||||
virtual ~AudioDeviceUtilityDummy() {}
|
virtual ~AudioDeviceUtilityDummy() {}
|
||||||
|
|
||||||
virtual int32_t Init() OVERRIDE;
|
int32_t Init() override;
|
||||||
};
|
};
|
||||||
} // namespace webrtc
|
} // namespace webrtc
|
||||||
|
|
||||||
|
@ -40,124 +40,123 @@ class FileAudioDevice : public AudioDeviceGeneric {
|
|||||||
virtual ~FileAudioDevice();
|
virtual ~FileAudioDevice();
|
||||||
|
|
||||||
// Retrieve the currently utilized audio layer
|
// Retrieve the currently utilized audio layer
|
||||||
virtual int32_t ActiveAudioLayer(
|
int32_t ActiveAudioLayer(
|
||||||
AudioDeviceModule::AudioLayer& audioLayer) const OVERRIDE;
|
AudioDeviceModule::AudioLayer& audioLayer) const override;
|
||||||
|
|
||||||
// Main initializaton and termination
|
// Main initializaton and termination
|
||||||
virtual int32_t Init() OVERRIDE;
|
int32_t Init() override;
|
||||||
virtual int32_t Terminate() OVERRIDE;
|
int32_t Terminate() override;
|
||||||
virtual bool Initialized() const OVERRIDE;
|
bool Initialized() const override;
|
||||||
|
|
||||||
// Device enumeration
|
// Device enumeration
|
||||||
virtual int16_t PlayoutDevices() OVERRIDE;
|
int16_t PlayoutDevices() override;
|
||||||
virtual int16_t RecordingDevices() OVERRIDE;
|
int16_t RecordingDevices() override;
|
||||||
virtual int32_t PlayoutDeviceName(uint16_t index,
|
int32_t PlayoutDeviceName(uint16_t index,
|
||||||
char name[kAdmMaxDeviceNameSize],
|
char name[kAdmMaxDeviceNameSize],
|
||||||
char guid[kAdmMaxGuidSize]) OVERRIDE;
|
char guid[kAdmMaxGuidSize]) override;
|
||||||
virtual int32_t RecordingDeviceName(uint16_t index,
|
int32_t RecordingDeviceName(uint16_t index,
|
||||||
char name[kAdmMaxDeviceNameSize],
|
char name[kAdmMaxDeviceNameSize],
|
||||||
char guid[kAdmMaxGuidSize]) OVERRIDE;
|
char guid[kAdmMaxGuidSize]) override;
|
||||||
|
|
||||||
// Device selection
|
// Device selection
|
||||||
virtual int32_t SetPlayoutDevice(uint16_t index) OVERRIDE;
|
int32_t SetPlayoutDevice(uint16_t index) override;
|
||||||
virtual int32_t SetPlayoutDevice(
|
int32_t SetPlayoutDevice(
|
||||||
AudioDeviceModule::WindowsDeviceType device) OVERRIDE;
|
AudioDeviceModule::WindowsDeviceType device) override;
|
||||||
virtual int32_t SetRecordingDevice(uint16_t index) OVERRIDE;
|
int32_t SetRecordingDevice(uint16_t index) override;
|
||||||
virtual int32_t SetRecordingDevice(
|
int32_t SetRecordingDevice(
|
||||||
AudioDeviceModule::WindowsDeviceType device) OVERRIDE;
|
AudioDeviceModule::WindowsDeviceType device) override;
|
||||||
|
|
||||||
// Audio transport initialization
|
// Audio transport initialization
|
||||||
virtual int32_t PlayoutIsAvailable(bool& available) OVERRIDE;
|
int32_t PlayoutIsAvailable(bool& available) override;
|
||||||
virtual int32_t InitPlayout() OVERRIDE;
|
int32_t InitPlayout() override;
|
||||||
virtual bool PlayoutIsInitialized() const OVERRIDE;
|
bool PlayoutIsInitialized() const override;
|
||||||
virtual int32_t RecordingIsAvailable(bool& available) OVERRIDE;
|
int32_t RecordingIsAvailable(bool& available) override;
|
||||||
virtual int32_t InitRecording() OVERRIDE;
|
int32_t InitRecording() override;
|
||||||
virtual bool RecordingIsInitialized() const OVERRIDE;
|
bool RecordingIsInitialized() const override;
|
||||||
|
|
||||||
// Audio transport control
|
// Audio transport control
|
||||||
virtual int32_t StartPlayout() OVERRIDE;
|
int32_t StartPlayout() override;
|
||||||
virtual int32_t StopPlayout() OVERRIDE;
|
int32_t StopPlayout() override;
|
||||||
virtual bool Playing() const OVERRIDE;
|
bool Playing() const override;
|
||||||
virtual int32_t StartRecording() OVERRIDE;
|
int32_t StartRecording() override;
|
||||||
virtual int32_t StopRecording() OVERRIDE;
|
int32_t StopRecording() override;
|
||||||
virtual bool Recording() const OVERRIDE;
|
bool Recording() const override;
|
||||||
|
|
||||||
// Microphone Automatic Gain Control (AGC)
|
// Microphone Automatic Gain Control (AGC)
|
||||||
virtual int32_t SetAGC(bool enable) OVERRIDE;
|
int32_t SetAGC(bool enable) override;
|
||||||
virtual bool AGC() const OVERRIDE;
|
bool AGC() const override;
|
||||||
|
|
||||||
// Volume control based on the Windows Wave API (Windows only)
|
// Volume control based on the Windows Wave API (Windows only)
|
||||||
virtual int32_t SetWaveOutVolume(uint16_t volumeLeft,
|
int32_t SetWaveOutVolume(uint16_t volumeLeft, uint16_t volumeRight) override;
|
||||||
uint16_t volumeRight) OVERRIDE;
|
int32_t WaveOutVolume(uint16_t& volumeLeft,
|
||||||
virtual int32_t WaveOutVolume(uint16_t& volumeLeft,
|
uint16_t& volumeRight) const override;
|
||||||
uint16_t& volumeRight) const OVERRIDE;
|
|
||||||
|
|
||||||
// Audio mixer initialization
|
// Audio mixer initialization
|
||||||
virtual int32_t InitSpeaker() OVERRIDE;
|
int32_t InitSpeaker() override;
|
||||||
virtual bool SpeakerIsInitialized() const OVERRIDE;
|
bool SpeakerIsInitialized() const override;
|
||||||
virtual int32_t InitMicrophone() OVERRIDE;
|
int32_t InitMicrophone() override;
|
||||||
virtual bool MicrophoneIsInitialized() const OVERRIDE;
|
bool MicrophoneIsInitialized() const override;
|
||||||
|
|
||||||
// Speaker volume controls
|
// Speaker volume controls
|
||||||
virtual int32_t SpeakerVolumeIsAvailable(bool& available) OVERRIDE;
|
int32_t SpeakerVolumeIsAvailable(bool& available) override;
|
||||||
virtual int32_t SetSpeakerVolume(uint32_t volume) OVERRIDE;
|
int32_t SetSpeakerVolume(uint32_t volume) override;
|
||||||
virtual int32_t SpeakerVolume(uint32_t& volume) const OVERRIDE;
|
int32_t SpeakerVolume(uint32_t& volume) const override;
|
||||||
virtual int32_t MaxSpeakerVolume(uint32_t& maxVolume) const OVERRIDE;
|
int32_t MaxSpeakerVolume(uint32_t& maxVolume) const override;
|
||||||
virtual int32_t MinSpeakerVolume(uint32_t& minVolume) const OVERRIDE;
|
int32_t MinSpeakerVolume(uint32_t& minVolume) const override;
|
||||||
virtual int32_t SpeakerVolumeStepSize(uint16_t& stepSize) const OVERRIDE;
|
int32_t SpeakerVolumeStepSize(uint16_t& stepSize) const override;
|
||||||
|
|
||||||
// Microphone volume controls
|
// Microphone volume controls
|
||||||
virtual int32_t MicrophoneVolumeIsAvailable(bool& available) OVERRIDE;
|
int32_t MicrophoneVolumeIsAvailable(bool& available) override;
|
||||||
virtual int32_t SetMicrophoneVolume(uint32_t volume) OVERRIDE;
|
int32_t SetMicrophoneVolume(uint32_t volume) override;
|
||||||
virtual int32_t MicrophoneVolume(uint32_t& volume) const OVERRIDE;
|
int32_t MicrophoneVolume(uint32_t& volume) const override;
|
||||||
virtual int32_t MaxMicrophoneVolume(uint32_t& maxVolume) const OVERRIDE;
|
int32_t MaxMicrophoneVolume(uint32_t& maxVolume) const override;
|
||||||
virtual int32_t MinMicrophoneVolume(uint32_t& minVolume) const OVERRIDE;
|
int32_t MinMicrophoneVolume(uint32_t& minVolume) const override;
|
||||||
virtual int32_t MicrophoneVolumeStepSize(uint16_t& stepSize) const OVERRIDE;
|
int32_t MicrophoneVolumeStepSize(uint16_t& stepSize) const override;
|
||||||
|
|
||||||
// Speaker mute control
|
// Speaker mute control
|
||||||
virtual int32_t SpeakerMuteIsAvailable(bool& available) OVERRIDE;
|
int32_t SpeakerMuteIsAvailable(bool& available) override;
|
||||||
virtual int32_t SetSpeakerMute(bool enable) OVERRIDE;
|
int32_t SetSpeakerMute(bool enable) override;
|
||||||
virtual int32_t SpeakerMute(bool& enabled) const OVERRIDE;
|
int32_t SpeakerMute(bool& enabled) const override;
|
||||||
|
|
||||||
// Microphone mute control
|
// Microphone mute control
|
||||||
virtual int32_t MicrophoneMuteIsAvailable(bool& available) OVERRIDE;
|
int32_t MicrophoneMuteIsAvailable(bool& available) override;
|
||||||
virtual int32_t SetMicrophoneMute(bool enable) OVERRIDE;
|
int32_t SetMicrophoneMute(bool enable) override;
|
||||||
virtual int32_t MicrophoneMute(bool& enabled) const OVERRIDE;
|
int32_t MicrophoneMute(bool& enabled) const override;
|
||||||
|
|
||||||
// Microphone boost control
|
// Microphone boost control
|
||||||
virtual int32_t MicrophoneBoostIsAvailable(bool& available) OVERRIDE;
|
int32_t MicrophoneBoostIsAvailable(bool& available) override;
|
||||||
virtual int32_t SetMicrophoneBoost(bool enable) OVERRIDE;
|
int32_t SetMicrophoneBoost(bool enable) override;
|
||||||
virtual int32_t MicrophoneBoost(bool& enabled) const OVERRIDE;
|
int32_t MicrophoneBoost(bool& enabled) const override;
|
||||||
|
|
||||||
// Stereo support
|
// Stereo support
|
||||||
virtual int32_t StereoPlayoutIsAvailable(bool& available) OVERRIDE;
|
int32_t StereoPlayoutIsAvailable(bool& available) override;
|
||||||
virtual int32_t SetStereoPlayout(bool enable) OVERRIDE;
|
int32_t SetStereoPlayout(bool enable) override;
|
||||||
virtual int32_t StereoPlayout(bool& enabled) const OVERRIDE;
|
int32_t StereoPlayout(bool& enabled) const override;
|
||||||
virtual int32_t StereoRecordingIsAvailable(bool& available) OVERRIDE;
|
int32_t StereoRecordingIsAvailable(bool& available) override;
|
||||||
virtual int32_t SetStereoRecording(bool enable) OVERRIDE;
|
int32_t SetStereoRecording(bool enable) override;
|
||||||
virtual int32_t StereoRecording(bool& enabled) const OVERRIDE;
|
int32_t StereoRecording(bool& enabled) const override;
|
||||||
|
|
||||||
// Delay information and control
|
// Delay information and control
|
||||||
virtual int32_t SetPlayoutBuffer(const AudioDeviceModule::BufferType type,
|
int32_t SetPlayoutBuffer(const AudioDeviceModule::BufferType type,
|
||||||
uint16_t sizeMS) OVERRIDE;
|
uint16_t sizeMS) override;
|
||||||
virtual int32_t PlayoutBuffer(AudioDeviceModule::BufferType& type,
|
int32_t PlayoutBuffer(AudioDeviceModule::BufferType& type,
|
||||||
uint16_t& sizeMS) const OVERRIDE;
|
uint16_t& sizeMS) const override;
|
||||||
virtual int32_t PlayoutDelay(uint16_t& delayMS) const OVERRIDE;
|
int32_t PlayoutDelay(uint16_t& delayMS) const override;
|
||||||
virtual int32_t RecordingDelay(uint16_t& delayMS) const OVERRIDE;
|
int32_t RecordingDelay(uint16_t& delayMS) const override;
|
||||||
|
|
||||||
// CPU load
|
// CPU load
|
||||||
virtual int32_t CPULoad(uint16_t& load) const OVERRIDE;
|
int32_t CPULoad(uint16_t& load) const override;
|
||||||
|
|
||||||
virtual bool PlayoutWarning() const OVERRIDE;
|
bool PlayoutWarning() const override;
|
||||||
virtual bool PlayoutError() const OVERRIDE;
|
bool PlayoutError() const override;
|
||||||
virtual bool RecordingWarning() const OVERRIDE;
|
bool RecordingWarning() const override;
|
||||||
virtual bool RecordingError() const OVERRIDE;
|
bool RecordingError() const override;
|
||||||
virtual void ClearPlayoutWarning() OVERRIDE;
|
void ClearPlayoutWarning() override;
|
||||||
virtual void ClearPlayoutError() OVERRIDE;
|
void ClearPlayoutError() override;
|
||||||
virtual void ClearRecordingWarning() OVERRIDE;
|
void ClearRecordingWarning() override;
|
||||||
virtual void ClearRecordingError() OVERRIDE;
|
void ClearRecordingError() override;
|
||||||
|
|
||||||
virtual void AttachAudioBuffer(AudioDeviceBuffer* audioBuffer) OVERRIDE;
|
void AttachAudioBuffer(AudioDeviceBuffer* audioBuffer) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static bool RecThreadFunc(void*);
|
static bool RecThreadFunc(void*);
|
||||||
|
@ -35,131 +35,126 @@ public:
|
|||||||
virtual ~AudioDeviceLinuxALSA();
|
virtual ~AudioDeviceLinuxALSA();
|
||||||
|
|
||||||
// Retrieve the currently utilized audio layer
|
// Retrieve the currently utilized audio layer
|
||||||
virtual int32_t ActiveAudioLayer(
|
int32_t ActiveAudioLayer(
|
||||||
AudioDeviceModule::AudioLayer& audioLayer) const OVERRIDE;
|
AudioDeviceModule::AudioLayer& audioLayer) const override;
|
||||||
|
|
||||||
// Main initializaton and termination
|
// Main initializaton and termination
|
||||||
virtual int32_t Init() OVERRIDE;
|
int32_t Init() override;
|
||||||
virtual int32_t Terminate() OVERRIDE;
|
int32_t Terminate() override;
|
||||||
virtual bool Initialized() const OVERRIDE;
|
bool Initialized() const override;
|
||||||
|
|
||||||
// Device enumeration
|
// Device enumeration
|
||||||
virtual int16_t PlayoutDevices() OVERRIDE;
|
int16_t PlayoutDevices() override;
|
||||||
virtual int16_t RecordingDevices() OVERRIDE;
|
int16_t RecordingDevices() override;
|
||||||
virtual int32_t PlayoutDeviceName(
|
int32_t PlayoutDeviceName(uint16_t index,
|
||||||
uint16_t index,
|
|
||||||
char name[kAdmMaxDeviceNameSize],
|
char name[kAdmMaxDeviceNameSize],
|
||||||
char guid[kAdmMaxGuidSize]) OVERRIDE;
|
char guid[kAdmMaxGuidSize]) override;
|
||||||
virtual int32_t RecordingDeviceName(
|
int32_t RecordingDeviceName(uint16_t index,
|
||||||
uint16_t index,
|
|
||||||
char name[kAdmMaxDeviceNameSize],
|
char name[kAdmMaxDeviceNameSize],
|
||||||
char guid[kAdmMaxGuidSize]) OVERRIDE;
|
char guid[kAdmMaxGuidSize]) override;
|
||||||
|
|
||||||
// Device selection
|
// Device selection
|
||||||
virtual int32_t SetPlayoutDevice(uint16_t index) OVERRIDE;
|
int32_t SetPlayoutDevice(uint16_t index) override;
|
||||||
virtual int32_t SetPlayoutDevice(
|
int32_t SetPlayoutDevice(
|
||||||
AudioDeviceModule::WindowsDeviceType device) OVERRIDE;
|
AudioDeviceModule::WindowsDeviceType device) override;
|
||||||
virtual int32_t SetRecordingDevice(uint16_t index) OVERRIDE;
|
int32_t SetRecordingDevice(uint16_t index) override;
|
||||||
virtual int32_t SetRecordingDevice(
|
int32_t SetRecordingDevice(
|
||||||
AudioDeviceModule::WindowsDeviceType device) OVERRIDE;
|
AudioDeviceModule::WindowsDeviceType device) override;
|
||||||
|
|
||||||
// Audio transport initialization
|
// Audio transport initialization
|
||||||
virtual int32_t PlayoutIsAvailable(bool& available) OVERRIDE;
|
int32_t PlayoutIsAvailable(bool& available) override;
|
||||||
virtual int32_t InitPlayout() OVERRIDE;
|
int32_t InitPlayout() override;
|
||||||
virtual bool PlayoutIsInitialized() const OVERRIDE;
|
bool PlayoutIsInitialized() const override;
|
||||||
virtual int32_t RecordingIsAvailable(bool& available) OVERRIDE;
|
int32_t RecordingIsAvailable(bool& available) override;
|
||||||
virtual int32_t InitRecording() OVERRIDE;
|
int32_t InitRecording() override;
|
||||||
virtual bool RecordingIsInitialized() const OVERRIDE;
|
bool RecordingIsInitialized() const override;
|
||||||
|
|
||||||
// Audio transport control
|
// Audio transport control
|
||||||
virtual int32_t StartPlayout() OVERRIDE;
|
int32_t StartPlayout() override;
|
||||||
virtual int32_t StopPlayout() OVERRIDE;
|
int32_t StopPlayout() override;
|
||||||
virtual bool Playing() const OVERRIDE;
|
bool Playing() const override;
|
||||||
virtual int32_t StartRecording() OVERRIDE;
|
int32_t StartRecording() override;
|
||||||
virtual int32_t StopRecording() OVERRIDE;
|
int32_t StopRecording() override;
|
||||||
virtual bool Recording() const OVERRIDE;
|
bool Recording() const override;
|
||||||
|
|
||||||
// Microphone Automatic Gain Control (AGC)
|
// Microphone Automatic Gain Control (AGC)
|
||||||
virtual int32_t SetAGC(bool enable) OVERRIDE;
|
int32_t SetAGC(bool enable) override;
|
||||||
virtual bool AGC() const OVERRIDE;
|
bool AGC() const override;
|
||||||
|
|
||||||
// Volume control based on the Windows Wave API (Windows only)
|
// Volume control based on the Windows Wave API (Windows only)
|
||||||
virtual int32_t SetWaveOutVolume(uint16_t volumeLeft,
|
int32_t SetWaveOutVolume(uint16_t volumeLeft,
|
||||||
uint16_t volumeRight) OVERRIDE;
|
uint16_t volumeRight) override;
|
||||||
virtual int32_t WaveOutVolume(uint16_t& volumeLeft,
|
int32_t WaveOutVolume(uint16_t& volumeLeft,
|
||||||
uint16_t& volumeRight) const OVERRIDE;
|
uint16_t& volumeRight) const override;
|
||||||
|
|
||||||
// Audio mixer initialization
|
// Audio mixer initialization
|
||||||
virtual int32_t InitSpeaker() OVERRIDE;
|
int32_t InitSpeaker() override;
|
||||||
virtual bool SpeakerIsInitialized() const OVERRIDE;
|
bool SpeakerIsInitialized() const override;
|
||||||
virtual int32_t InitMicrophone() OVERRIDE;
|
int32_t InitMicrophone() override;
|
||||||
virtual bool MicrophoneIsInitialized() const OVERRIDE;
|
bool MicrophoneIsInitialized() const override;
|
||||||
|
|
||||||
// Speaker volume controls
|
// Speaker volume controls
|
||||||
virtual int32_t SpeakerVolumeIsAvailable(bool& available) OVERRIDE;
|
int32_t SpeakerVolumeIsAvailable(bool& available) override;
|
||||||
virtual int32_t SetSpeakerVolume(uint32_t volume) OVERRIDE;
|
int32_t SetSpeakerVolume(uint32_t volume) override;
|
||||||
virtual int32_t SpeakerVolume(uint32_t& volume) const OVERRIDE;
|
int32_t SpeakerVolume(uint32_t& volume) const override;
|
||||||
virtual int32_t MaxSpeakerVolume(uint32_t& maxVolume) const OVERRIDE;
|
int32_t MaxSpeakerVolume(uint32_t& maxVolume) const override;
|
||||||
virtual int32_t MinSpeakerVolume(uint32_t& minVolume) const OVERRIDE;
|
int32_t MinSpeakerVolume(uint32_t& minVolume) const override;
|
||||||
virtual int32_t SpeakerVolumeStepSize(uint16_t& stepSize) const OVERRIDE;
|
int32_t SpeakerVolumeStepSize(uint16_t& stepSize) const override;
|
||||||
|
|
||||||
// Microphone volume controls
|
// Microphone volume controls
|
||||||
virtual int32_t MicrophoneVolumeIsAvailable(bool& available) OVERRIDE;
|
int32_t MicrophoneVolumeIsAvailable(bool& available) override;
|
||||||
virtual int32_t SetMicrophoneVolume(uint32_t volume) OVERRIDE;
|
int32_t SetMicrophoneVolume(uint32_t volume) override;
|
||||||
virtual int32_t MicrophoneVolume(uint32_t& volume) const OVERRIDE;
|
int32_t MicrophoneVolume(uint32_t& volume) const override;
|
||||||
virtual int32_t MaxMicrophoneVolume(uint32_t& maxVolume) const OVERRIDE;
|
int32_t MaxMicrophoneVolume(uint32_t& maxVolume) const override;
|
||||||
virtual int32_t MinMicrophoneVolume(uint32_t& minVolume) const OVERRIDE;
|
int32_t MinMicrophoneVolume(uint32_t& minVolume) const override;
|
||||||
virtual int32_t MicrophoneVolumeStepSize(
|
int32_t MicrophoneVolumeStepSize(uint16_t& stepSize) const override;
|
||||||
uint16_t& stepSize) const OVERRIDE;
|
|
||||||
|
|
||||||
// Speaker mute control
|
// Speaker mute control
|
||||||
virtual int32_t SpeakerMuteIsAvailable(bool& available) OVERRIDE;
|
int32_t SpeakerMuteIsAvailable(bool& available) override;
|
||||||
virtual int32_t SetSpeakerMute(bool enable) OVERRIDE;
|
int32_t SetSpeakerMute(bool enable) override;
|
||||||
virtual int32_t SpeakerMute(bool& enabled) const OVERRIDE;
|
int32_t SpeakerMute(bool& enabled) const override;
|
||||||
|
|
||||||
// Microphone mute control
|
// Microphone mute control
|
||||||
virtual int32_t MicrophoneMuteIsAvailable(bool& available) OVERRIDE;
|
int32_t MicrophoneMuteIsAvailable(bool& available) override;
|
||||||
virtual int32_t SetMicrophoneMute(bool enable) OVERRIDE;
|
int32_t SetMicrophoneMute(bool enable) override;
|
||||||
virtual int32_t MicrophoneMute(bool& enabled) const OVERRIDE;
|
int32_t MicrophoneMute(bool& enabled) const override;
|
||||||
|
|
||||||
// Microphone boost control
|
// Microphone boost control
|
||||||
virtual int32_t MicrophoneBoostIsAvailable(bool& available) OVERRIDE;
|
int32_t MicrophoneBoostIsAvailable(bool& available) override;
|
||||||
virtual int32_t SetMicrophoneBoost(bool enable) OVERRIDE;
|
int32_t SetMicrophoneBoost(bool enable) override;
|
||||||
virtual int32_t MicrophoneBoost(bool& enabled) const OVERRIDE;
|
int32_t MicrophoneBoost(bool& enabled) const override;
|
||||||
|
|
||||||
// Stereo support
|
// Stereo support
|
||||||
virtual int32_t StereoPlayoutIsAvailable(bool& available) OVERRIDE;
|
int32_t StereoPlayoutIsAvailable(bool& available) override;
|
||||||
virtual int32_t SetStereoPlayout(bool enable) OVERRIDE;
|
int32_t SetStereoPlayout(bool enable) override;
|
||||||
virtual int32_t StereoPlayout(bool& enabled) const OVERRIDE;
|
int32_t StereoPlayout(bool& enabled) const override;
|
||||||
virtual int32_t StereoRecordingIsAvailable(bool& available) OVERRIDE;
|
int32_t StereoRecordingIsAvailable(bool& available) override;
|
||||||
virtual int32_t SetStereoRecording(bool enable) OVERRIDE;
|
int32_t SetStereoRecording(bool enable) override;
|
||||||
virtual int32_t StereoRecording(bool& enabled) const OVERRIDE;
|
int32_t StereoRecording(bool& enabled) const override;
|
||||||
|
|
||||||
// Delay information and control
|
// Delay information and control
|
||||||
virtual int32_t SetPlayoutBuffer(
|
int32_t SetPlayoutBuffer(const AudioDeviceModule::BufferType type,
|
||||||
const AudioDeviceModule::BufferType type,
|
uint16_t sizeMS) override;
|
||||||
uint16_t sizeMS) OVERRIDE;
|
int32_t PlayoutBuffer(AudioDeviceModule::BufferType& type,
|
||||||
virtual int32_t PlayoutBuffer(
|
uint16_t& sizeMS) const override;
|
||||||
AudioDeviceModule::BufferType& type,
|
int32_t PlayoutDelay(uint16_t& delayMS) const override;
|
||||||
uint16_t& sizeMS) const OVERRIDE;
|
int32_t RecordingDelay(uint16_t& delayMS) const override;
|
||||||
virtual int32_t PlayoutDelay(uint16_t& delayMS) const OVERRIDE;
|
|
||||||
virtual int32_t RecordingDelay(uint16_t& delayMS) const OVERRIDE;
|
|
||||||
|
|
||||||
// CPU load
|
// CPU load
|
||||||
virtual int32_t CPULoad(uint16_t& load) const OVERRIDE;
|
int32_t CPULoad(uint16_t& load) const override;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
virtual bool PlayoutWarning() const OVERRIDE;
|
bool PlayoutWarning() const override;
|
||||||
virtual bool PlayoutError() const OVERRIDE;
|
bool PlayoutError() const override;
|
||||||
virtual bool RecordingWarning() const OVERRIDE;
|
bool RecordingWarning() const override;
|
||||||
virtual bool RecordingError() const OVERRIDE;
|
bool RecordingError() const override;
|
||||||
virtual void ClearPlayoutWarning() OVERRIDE;
|
void ClearPlayoutWarning() override;
|
||||||
virtual void ClearPlayoutError() OVERRIDE;
|
void ClearPlayoutError() override;
|
||||||
virtual void ClearRecordingWarning() OVERRIDE;
|
void ClearRecordingWarning() override;
|
||||||
virtual void ClearRecordingError() OVERRIDE;
|
void ClearRecordingError() override;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
virtual void AttachAudioBuffer(AudioDeviceBuffer* audioBuffer) OVERRIDE;
|
void AttachAudioBuffer(AudioDeviceBuffer* audioBuffer) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int32_t GetDevicesInfo(const int32_t function,
|
int32_t GetDevicesInfo(const int32_t function,
|
||||||
|
@ -96,130 +96,126 @@ public:
|
|||||||
virtual ~AudioDeviceLinuxPulse();
|
virtual ~AudioDeviceLinuxPulse();
|
||||||
|
|
||||||
// Retrieve the currently utilized audio layer
|
// Retrieve the currently utilized audio layer
|
||||||
virtual int32_t ActiveAudioLayer(
|
int32_t ActiveAudioLayer(
|
||||||
AudioDeviceModule::AudioLayer& audioLayer) const OVERRIDE;
|
AudioDeviceModule::AudioLayer& audioLayer) const override;
|
||||||
|
|
||||||
// Main initializaton and termination
|
// Main initializaton and termination
|
||||||
virtual int32_t Init() OVERRIDE;
|
int32_t Init() override;
|
||||||
virtual int32_t Terminate() OVERRIDE;
|
int32_t Terminate() override;
|
||||||
virtual bool Initialized() const OVERRIDE;
|
bool Initialized() const override;
|
||||||
|
|
||||||
// Device enumeration
|
// Device enumeration
|
||||||
virtual int16_t PlayoutDevices() OVERRIDE;
|
int16_t PlayoutDevices() override;
|
||||||
virtual int16_t RecordingDevices() OVERRIDE;
|
int16_t RecordingDevices() override;
|
||||||
virtual int32_t PlayoutDeviceName(
|
int32_t PlayoutDeviceName(uint16_t index,
|
||||||
uint16_t index,
|
|
||||||
char name[kAdmMaxDeviceNameSize],
|
char name[kAdmMaxDeviceNameSize],
|
||||||
char guid[kAdmMaxGuidSize]) OVERRIDE;
|
char guid[kAdmMaxGuidSize]) override;
|
||||||
virtual int32_t RecordingDeviceName(
|
int32_t RecordingDeviceName(uint16_t index,
|
||||||
uint16_t index,
|
|
||||||
char name[kAdmMaxDeviceNameSize],
|
char name[kAdmMaxDeviceNameSize],
|
||||||
char guid[kAdmMaxGuidSize]) OVERRIDE;
|
char guid[kAdmMaxGuidSize]) override;
|
||||||
|
|
||||||
// Device selection
|
// Device selection
|
||||||
virtual int32_t SetPlayoutDevice(uint16_t index) OVERRIDE;
|
int32_t SetPlayoutDevice(uint16_t index) override;
|
||||||
virtual int32_t SetPlayoutDevice(
|
int32_t SetPlayoutDevice(
|
||||||
AudioDeviceModule::WindowsDeviceType device) OVERRIDE;
|
AudioDeviceModule::WindowsDeviceType device) override;
|
||||||
virtual int32_t SetRecordingDevice(uint16_t index) OVERRIDE;
|
int32_t SetRecordingDevice(uint16_t index) override;
|
||||||
virtual int32_t SetRecordingDevice(
|
int32_t SetRecordingDevice(
|
||||||
AudioDeviceModule::WindowsDeviceType device) OVERRIDE;
|
AudioDeviceModule::WindowsDeviceType device) override;
|
||||||
|
|
||||||
// Audio transport initialization
|
// Audio transport initialization
|
||||||
virtual int32_t PlayoutIsAvailable(bool& available) OVERRIDE;
|
int32_t PlayoutIsAvailable(bool& available) override;
|
||||||
virtual int32_t InitPlayout() OVERRIDE;
|
int32_t InitPlayout() override;
|
||||||
virtual bool PlayoutIsInitialized() const OVERRIDE;
|
bool PlayoutIsInitialized() const override;
|
||||||
virtual int32_t RecordingIsAvailable(bool& available) OVERRIDE;
|
int32_t RecordingIsAvailable(bool& available) override;
|
||||||
virtual int32_t InitRecording() OVERRIDE;
|
int32_t InitRecording() override;
|
||||||
virtual bool RecordingIsInitialized() const OVERRIDE;
|
bool RecordingIsInitialized() const override;
|
||||||
|
|
||||||
// Audio transport control
|
// Audio transport control
|
||||||
virtual int32_t StartPlayout() OVERRIDE;
|
int32_t StartPlayout() override;
|
||||||
virtual int32_t StopPlayout() OVERRIDE;
|
int32_t StopPlayout() override;
|
||||||
virtual bool Playing() const OVERRIDE;
|
bool Playing() const override;
|
||||||
virtual int32_t StartRecording() OVERRIDE;
|
int32_t StartRecording() override;
|
||||||
virtual int32_t StopRecording() OVERRIDE;
|
int32_t StopRecording() override;
|
||||||
virtual bool Recording() const OVERRIDE;
|
bool Recording() const override;
|
||||||
|
|
||||||
// Microphone Automatic Gain Control (AGC)
|
// Microphone Automatic Gain Control (AGC)
|
||||||
virtual int32_t SetAGC(bool enable) OVERRIDE;
|
int32_t SetAGC(bool enable) override;
|
||||||
virtual bool AGC() const OVERRIDE;
|
bool AGC() const override;
|
||||||
|
|
||||||
// Volume control based on the Windows Wave API (Windows only)
|
// Volume control based on the Windows Wave API (Windows only)
|
||||||
virtual int32_t SetWaveOutVolume(uint16_t volumeLeft,
|
int32_t SetWaveOutVolume(uint16_t volumeLeft,
|
||||||
uint16_t volumeRight) OVERRIDE;
|
uint16_t volumeRight) override;
|
||||||
virtual int32_t WaveOutVolume(uint16_t& volumeLeft,
|
int32_t WaveOutVolume(uint16_t& volumeLeft,
|
||||||
uint16_t& volumeRight) const OVERRIDE;
|
uint16_t& volumeRight) const override;
|
||||||
|
|
||||||
// Audio mixer initialization
|
// Audio mixer initialization
|
||||||
virtual int32_t InitSpeaker() OVERRIDE;
|
int32_t InitSpeaker() override;
|
||||||
virtual bool SpeakerIsInitialized() const OVERRIDE;
|
bool SpeakerIsInitialized() const override;
|
||||||
virtual int32_t InitMicrophone() OVERRIDE;
|
int32_t InitMicrophone() override;
|
||||||
virtual bool MicrophoneIsInitialized() const OVERRIDE;
|
bool MicrophoneIsInitialized() const override;
|
||||||
|
|
||||||
// Speaker volume controls
|
// Speaker volume controls
|
||||||
virtual int32_t SpeakerVolumeIsAvailable(bool& available) OVERRIDE;
|
int32_t SpeakerVolumeIsAvailable(bool& available) override;
|
||||||
virtual int32_t SetSpeakerVolume(uint32_t volume) OVERRIDE;
|
int32_t SetSpeakerVolume(uint32_t volume) override;
|
||||||
virtual int32_t SpeakerVolume(uint32_t& volume) const OVERRIDE;
|
int32_t SpeakerVolume(uint32_t& volume) const override;
|
||||||
virtual int32_t MaxSpeakerVolume(uint32_t& maxVolume) const OVERRIDE;
|
int32_t MaxSpeakerVolume(uint32_t& maxVolume) const override;
|
||||||
virtual int32_t MinSpeakerVolume(uint32_t& minVolume) const OVERRIDE;
|
int32_t MinSpeakerVolume(uint32_t& minVolume) const override;
|
||||||
virtual int32_t SpeakerVolumeStepSize(uint16_t& stepSize) const OVERRIDE;
|
int32_t SpeakerVolumeStepSize(uint16_t& stepSize) const override;
|
||||||
|
|
||||||
// Microphone volume controls
|
// Microphone volume controls
|
||||||
virtual int32_t MicrophoneVolumeIsAvailable(bool& available) OVERRIDE;
|
int32_t MicrophoneVolumeIsAvailable(bool& available) override;
|
||||||
virtual int32_t SetMicrophoneVolume(uint32_t volume) OVERRIDE;
|
int32_t SetMicrophoneVolume(uint32_t volume) override;
|
||||||
virtual int32_t MicrophoneVolume(uint32_t& volume) const OVERRIDE;
|
int32_t MicrophoneVolume(uint32_t& volume) const override;
|
||||||
virtual int32_t MaxMicrophoneVolume(uint32_t& maxVolume) const OVERRIDE;
|
int32_t MaxMicrophoneVolume(uint32_t& maxVolume) const override;
|
||||||
virtual int32_t MinMicrophoneVolume(uint32_t& minVolume) const OVERRIDE;
|
int32_t MinMicrophoneVolume(uint32_t& minVolume) const override;
|
||||||
virtual int32_t MicrophoneVolumeStepSize(
|
int32_t MicrophoneVolumeStepSize(uint16_t& stepSize) const override;
|
||||||
uint16_t& stepSize) const OVERRIDE;
|
|
||||||
|
|
||||||
// Speaker mute control
|
// Speaker mute control
|
||||||
virtual int32_t SpeakerMuteIsAvailable(bool& available) OVERRIDE;
|
int32_t SpeakerMuteIsAvailable(bool& available) override;
|
||||||
virtual int32_t SetSpeakerMute(bool enable) OVERRIDE;
|
int32_t SetSpeakerMute(bool enable) override;
|
||||||
virtual int32_t SpeakerMute(bool& enabled) const OVERRIDE;
|
int32_t SpeakerMute(bool& enabled) const override;
|
||||||
|
|
||||||
// Microphone mute control
|
// Microphone mute control
|
||||||
virtual int32_t MicrophoneMuteIsAvailable(bool& available) OVERRIDE;
|
int32_t MicrophoneMuteIsAvailable(bool& available) override;
|
||||||
virtual int32_t SetMicrophoneMute(bool enable) OVERRIDE;
|
int32_t SetMicrophoneMute(bool enable) override;
|
||||||
virtual int32_t MicrophoneMute(bool& enabled) const OVERRIDE;
|
int32_t MicrophoneMute(bool& enabled) const override;
|
||||||
|
|
||||||
// Microphone boost control
|
// Microphone boost control
|
||||||
virtual int32_t MicrophoneBoostIsAvailable(bool& available) OVERRIDE;
|
int32_t MicrophoneBoostIsAvailable(bool& available) override;
|
||||||
virtual int32_t SetMicrophoneBoost(bool enable) OVERRIDE;
|
int32_t SetMicrophoneBoost(bool enable) override;
|
||||||
virtual int32_t MicrophoneBoost(bool& enabled) const OVERRIDE;
|
int32_t MicrophoneBoost(bool& enabled) const override;
|
||||||
|
|
||||||
// Stereo support
|
// Stereo support
|
||||||
virtual int32_t StereoPlayoutIsAvailable(bool& available) OVERRIDE;
|
int32_t StereoPlayoutIsAvailable(bool& available) override;
|
||||||
virtual int32_t SetStereoPlayout(bool enable) OVERRIDE;
|
int32_t SetStereoPlayout(bool enable) override;
|
||||||
virtual int32_t StereoPlayout(bool& enabled) const OVERRIDE;
|
int32_t StereoPlayout(bool& enabled) const override;
|
||||||
virtual int32_t StereoRecordingIsAvailable(bool& available) OVERRIDE;
|
int32_t StereoRecordingIsAvailable(bool& available) override;
|
||||||
virtual int32_t SetStereoRecording(bool enable) OVERRIDE;
|
int32_t SetStereoRecording(bool enable) override;
|
||||||
virtual int32_t StereoRecording(bool& enabled) const OVERRIDE;
|
int32_t StereoRecording(bool& enabled) const override;
|
||||||
|
|
||||||
// Delay information and control
|
// Delay information and control
|
||||||
virtual int32_t
|
int32_t SetPlayoutBuffer(const AudioDeviceModule::BufferType type,
|
||||||
SetPlayoutBuffer(const AudioDeviceModule::BufferType type,
|
uint16_t sizeMS) override;
|
||||||
uint16_t sizeMS) OVERRIDE;
|
int32_t PlayoutBuffer(AudioDeviceModule::BufferType& type,
|
||||||
virtual int32_t PlayoutBuffer(AudioDeviceModule::BufferType& type,
|
uint16_t& sizeMS) const override;
|
||||||
uint16_t& sizeMS) const OVERRIDE;
|
int32_t PlayoutDelay(uint16_t& delayMS) const override;
|
||||||
virtual int32_t PlayoutDelay(uint16_t& delayMS) const OVERRIDE;
|
int32_t RecordingDelay(uint16_t& delayMS) const override;
|
||||||
virtual int32_t RecordingDelay(uint16_t& delayMS) const OVERRIDE;
|
|
||||||
|
|
||||||
// CPU load
|
// CPU load
|
||||||
virtual int32_t CPULoad(uint16_t& load) const OVERRIDE;
|
int32_t CPULoad(uint16_t& load) const override;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
virtual bool PlayoutWarning() const OVERRIDE;
|
bool PlayoutWarning() const override;
|
||||||
virtual bool PlayoutError() const OVERRIDE;
|
bool PlayoutError() const override;
|
||||||
virtual bool RecordingWarning() const OVERRIDE;
|
bool RecordingWarning() const override;
|
||||||
virtual bool RecordingError() const OVERRIDE;
|
bool RecordingError() const override;
|
||||||
virtual void ClearPlayoutWarning() OVERRIDE;
|
void ClearPlayoutWarning() override;
|
||||||
virtual void ClearPlayoutError() OVERRIDE;
|
void ClearPlayoutError() override;
|
||||||
virtual void ClearRecordingWarning() OVERRIDE;
|
void ClearRecordingWarning() override;
|
||||||
virtual void ClearRecordingError() OVERRIDE;
|
void ClearRecordingError() override;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
virtual void AttachAudioBuffer(AudioDeviceBuffer* audioBuffer) OVERRIDE;
|
void AttachAudioBuffer(AudioDeviceBuffer* audioBuffer) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void Lock() EXCLUSIVE_LOCK_FUNCTION(_critSect) {
|
void Lock() EXCLUSIVE_LOCK_FUNCTION(_critSect) {
|
||||||
|
@ -24,7 +24,7 @@ public:
|
|||||||
AudioDeviceUtilityLinux(const int32_t id);
|
AudioDeviceUtilityLinux(const int32_t id);
|
||||||
virtual ~AudioDeviceUtilityLinux();
|
virtual ~AudioDeviceUtilityLinux();
|
||||||
|
|
||||||
virtual int32_t Init() OVERRIDE;
|
int32_t Init() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
CriticalSectionWrapper& _critSect;
|
CriticalSectionWrapper& _critSect;
|
||||||
|
@ -75,60 +75,49 @@ class GainControlForNewAgc : public GainControl, public VolumeCallbacks {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// GainControl implementation.
|
// GainControl implementation.
|
||||||
virtual int Enable(bool enable) OVERRIDE {
|
int Enable(bool enable) override {
|
||||||
return real_gain_control_->Enable(enable);
|
return real_gain_control_->Enable(enable);
|
||||||
}
|
}
|
||||||
virtual bool is_enabled() const OVERRIDE {
|
bool is_enabled() const override { return real_gain_control_->is_enabled(); }
|
||||||
return real_gain_control_->is_enabled();
|
int set_stream_analog_level(int level) override {
|
||||||
}
|
|
||||||
virtual int set_stream_analog_level(int level) OVERRIDE {
|
|
||||||
volume_ = level;
|
volume_ = level;
|
||||||
return AudioProcessing::kNoError;
|
return AudioProcessing::kNoError;
|
||||||
}
|
}
|
||||||
virtual int stream_analog_level() OVERRIDE {
|
int stream_analog_level() override { return volume_; }
|
||||||
return volume_;
|
int set_mode(Mode mode) override { return AudioProcessing::kNoError; }
|
||||||
}
|
Mode mode() const override { return GainControl::kAdaptiveAnalog; }
|
||||||
virtual int set_mode(Mode mode) OVERRIDE { return AudioProcessing::kNoError; }
|
int set_target_level_dbfs(int level) override {
|
||||||
virtual Mode mode() const OVERRIDE { return GainControl::kAdaptiveAnalog; }
|
|
||||||
virtual int set_target_level_dbfs(int level) OVERRIDE {
|
|
||||||
return AudioProcessing::kNoError;
|
return AudioProcessing::kNoError;
|
||||||
}
|
}
|
||||||
virtual int target_level_dbfs() const OVERRIDE {
|
int target_level_dbfs() const override {
|
||||||
return real_gain_control_->target_level_dbfs();
|
return real_gain_control_->target_level_dbfs();
|
||||||
}
|
}
|
||||||
virtual int set_compression_gain_db(int gain) OVERRIDE {
|
int set_compression_gain_db(int gain) override {
|
||||||
return AudioProcessing::kNoError;
|
return AudioProcessing::kNoError;
|
||||||
}
|
}
|
||||||
virtual int compression_gain_db() const OVERRIDE {
|
int compression_gain_db() const override {
|
||||||
return real_gain_control_->compression_gain_db();
|
return real_gain_control_->compression_gain_db();
|
||||||
}
|
}
|
||||||
virtual int enable_limiter(bool enable) OVERRIDE {
|
int enable_limiter(bool enable) override { return AudioProcessing::kNoError; }
|
||||||
return AudioProcessing::kNoError;
|
bool is_limiter_enabled() const override {
|
||||||
}
|
|
||||||
virtual bool is_limiter_enabled() const OVERRIDE {
|
|
||||||
return real_gain_control_->is_limiter_enabled();
|
return real_gain_control_->is_limiter_enabled();
|
||||||
}
|
}
|
||||||
virtual int set_analog_level_limits(int minimum,
|
int set_analog_level_limits(int minimum, int maximum) override {
|
||||||
int maximum) OVERRIDE {
|
|
||||||
return AudioProcessing::kNoError;
|
return AudioProcessing::kNoError;
|
||||||
}
|
}
|
||||||
virtual int analog_level_minimum() const OVERRIDE {
|
int analog_level_minimum() const override {
|
||||||
return real_gain_control_->analog_level_minimum();
|
return real_gain_control_->analog_level_minimum();
|
||||||
}
|
}
|
||||||
virtual int analog_level_maximum() const OVERRIDE {
|
int analog_level_maximum() const override {
|
||||||
return real_gain_control_->analog_level_maximum();
|
return real_gain_control_->analog_level_maximum();
|
||||||
}
|
}
|
||||||
virtual bool stream_is_saturated() const OVERRIDE {
|
bool stream_is_saturated() const override {
|
||||||
return real_gain_control_->stream_is_saturated();
|
return real_gain_control_->stream_is_saturated();
|
||||||
}
|
}
|
||||||
|
|
||||||
// VolumeCallbacks implementation.
|
// VolumeCallbacks implementation.
|
||||||
virtual void SetMicVolume(int volume) OVERRIDE {
|
void SetMicVolume(int volume) override { volume_ = volume; }
|
||||||
volume_ = volume;
|
int GetMicVolume() override { return volume_; }
|
||||||
}
|
|
||||||
virtual int GetMicVolume() OVERRIDE {
|
|
||||||
return volume_;
|
|
||||||
}
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
GainControl* real_gain_control_;
|
GainControl* real_gain_control_;
|
||||||
|
@ -91,57 +91,55 @@ class AudioProcessingImpl : public AudioProcessing {
|
|||||||
virtual ~AudioProcessingImpl();
|
virtual ~AudioProcessingImpl();
|
||||||
|
|
||||||
// AudioProcessing methods.
|
// AudioProcessing methods.
|
||||||
virtual int Initialize() OVERRIDE;
|
int Initialize() override;
|
||||||
virtual int Initialize(int input_sample_rate_hz,
|
int Initialize(int input_sample_rate_hz,
|
||||||
int output_sample_rate_hz,
|
int output_sample_rate_hz,
|
||||||
int reverse_sample_rate_hz,
|
int reverse_sample_rate_hz,
|
||||||
ChannelLayout input_layout,
|
ChannelLayout input_layout,
|
||||||
ChannelLayout output_layout,
|
ChannelLayout output_layout,
|
||||||
ChannelLayout reverse_layout) OVERRIDE;
|
ChannelLayout reverse_layout) override;
|
||||||
virtual void SetExtraOptions(const Config& config) OVERRIDE;
|
void SetExtraOptions(const Config& config) override;
|
||||||
virtual int set_sample_rate_hz(int rate) OVERRIDE;
|
int set_sample_rate_hz(int rate) override;
|
||||||
virtual int input_sample_rate_hz() const OVERRIDE;
|
int input_sample_rate_hz() const override;
|
||||||
virtual int sample_rate_hz() const OVERRIDE;
|
int sample_rate_hz() const override;
|
||||||
virtual int proc_sample_rate_hz() const OVERRIDE;
|
int proc_sample_rate_hz() const override;
|
||||||
virtual int proc_split_sample_rate_hz() const OVERRIDE;
|
int proc_split_sample_rate_hz() const override;
|
||||||
virtual int num_input_channels() const OVERRIDE;
|
int num_input_channels() const override;
|
||||||
virtual int num_output_channels() const OVERRIDE;
|
int num_output_channels() const override;
|
||||||
virtual int num_reverse_channels() const OVERRIDE;
|
int num_reverse_channels() const override;
|
||||||
virtual void set_output_will_be_muted(bool muted) OVERRIDE;
|
void set_output_will_be_muted(bool muted) override;
|
||||||
virtual bool output_will_be_muted() const OVERRIDE;
|
bool output_will_be_muted() const override;
|
||||||
virtual int ProcessStream(AudioFrame* frame) OVERRIDE;
|
int ProcessStream(AudioFrame* frame) override;
|
||||||
virtual int ProcessStream(const float* const* src,
|
int ProcessStream(const float* const* src,
|
||||||
int samples_per_channel,
|
int samples_per_channel,
|
||||||
int input_sample_rate_hz,
|
int input_sample_rate_hz,
|
||||||
ChannelLayout input_layout,
|
ChannelLayout input_layout,
|
||||||
int output_sample_rate_hz,
|
int output_sample_rate_hz,
|
||||||
ChannelLayout output_layout,
|
ChannelLayout output_layout,
|
||||||
float* const* dest) OVERRIDE;
|
float* const* dest) override;
|
||||||
virtual int AnalyzeReverseStream(AudioFrame* frame) OVERRIDE;
|
int AnalyzeReverseStream(AudioFrame* frame) override;
|
||||||
virtual int AnalyzeReverseStream(const float* const* data,
|
int AnalyzeReverseStream(const float* const* data,
|
||||||
int samples_per_channel,
|
int samples_per_channel,
|
||||||
int sample_rate_hz,
|
int sample_rate_hz,
|
||||||
ChannelLayout layout) OVERRIDE;
|
ChannelLayout layout) override;
|
||||||
virtual int set_stream_delay_ms(int delay) OVERRIDE;
|
int set_stream_delay_ms(int delay) override;
|
||||||
virtual int stream_delay_ms() const OVERRIDE;
|
int stream_delay_ms() const override;
|
||||||
virtual bool was_stream_delay_set() const OVERRIDE;
|
bool was_stream_delay_set() const override;
|
||||||
virtual void set_delay_offset_ms(int offset) OVERRIDE;
|
void set_delay_offset_ms(int offset) override;
|
||||||
virtual int delay_offset_ms() const OVERRIDE;
|
int delay_offset_ms() const override;
|
||||||
virtual void set_stream_key_pressed(bool key_pressed) OVERRIDE;
|
void set_stream_key_pressed(bool key_pressed) override;
|
||||||
virtual bool stream_key_pressed() const OVERRIDE;
|
bool stream_key_pressed() const override;
|
||||||
virtual int StartDebugRecording(
|
int StartDebugRecording(const char filename[kMaxFilenameSize]) override;
|
||||||
const char filename[kMaxFilenameSize]) OVERRIDE;
|
int StartDebugRecording(FILE* handle) override;
|
||||||
virtual int StartDebugRecording(FILE* handle) OVERRIDE;
|
int StartDebugRecordingForPlatformFile(rtc::PlatformFile handle) override;
|
||||||
virtual int StartDebugRecordingForPlatformFile(
|
int StopDebugRecording() override;
|
||||||
rtc::PlatformFile handle) OVERRIDE;
|
EchoCancellation* echo_cancellation() const override;
|
||||||
virtual int StopDebugRecording() OVERRIDE;
|
EchoControlMobile* echo_control_mobile() const override;
|
||||||
virtual EchoCancellation* echo_cancellation() const OVERRIDE;
|
GainControl* gain_control() const override;
|
||||||
virtual EchoControlMobile* echo_control_mobile() const OVERRIDE;
|
HighPassFilter* high_pass_filter() const override;
|
||||||
virtual GainControl* gain_control() const OVERRIDE;
|
LevelEstimator* level_estimator() const override;
|
||||||
virtual HighPassFilter* high_pass_filter() const OVERRIDE;
|
NoiseSuppression* noise_suppression() const override;
|
||||||
virtual LevelEstimator* level_estimator() const OVERRIDE;
|
VoiceDetection* voice_detection() const override;
|
||||||
virtual NoiseSuppression* noise_suppression() const OVERRIDE;
|
|
||||||
virtual VoiceDetection* voice_detection() const OVERRIDE;
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// Overridden in a mock.
|
// Overridden in a mock.
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user