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