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:
@@ -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,
|
||||
AudioTrackInterface* audio_track,
|
||||
uint32 ssrc) OVERRIDE;
|
||||
virtual 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,
|
||||
AudioTrackInterface* audio_track,
|
||||
uint32 ssrc) OVERRIDE;
|
||||
virtual void OnAddLocalVideoTrack(MediaStreamInterface* stream,
|
||||
VideoTrackInterface* video_track,
|
||||
uint32 ssrc) OVERRIDE;
|
||||
virtual void OnRemoveLocalAudioTrack(
|
||||
MediaStreamInterface* stream,
|
||||
AudioTrackInterface* audio_track,
|
||||
uint32 ssrc) OVERRIDE;
|
||||
virtual void OnRemoveLocalVideoTrack(
|
||||
MediaStreamInterface* stream,
|
||||
VideoTrackInterface* video_track) OVERRIDE;
|
||||
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;
|
||||
void OnAddRemoteVideoTrack(MediaStreamInterface* stream,
|
||||
VideoTrackInterface* video_track,
|
||||
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;
|
||||
void OnAddLocalVideoTrack(MediaStreamInterface* stream,
|
||||
VideoTrackInterface* video_track,
|
||||
uint32 ssrc) override;
|
||||
void OnRemoveLocalAudioTrack(MediaStreamInterface* stream,
|
||||
AudioTrackInterface* audio_track,
|
||||
uint32 ssrc) override;
|
||||
void OnRemoveLocalVideoTrack(MediaStreamInterface* stream,
|
||||
VideoTrackInterface* video_track) override;
|
||||
virtual void OnRemoveLocalStream(MediaStreamInterface* stream);
|
||||
|
||||
// Implements IceObserver
|
||||
|
||||
@@ -312,72 +312,70 @@ class MethodCall5 : public rtc::Message,
|
||||
T5 a5_;
|
||||
};
|
||||
|
||||
#define BEGIN_PROXY_MAP(c) \
|
||||
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() {\
|
||||
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) {\
|
||||
return new rtc::RefCountedObject<c##Proxy>(thread, c);\
|
||||
}\
|
||||
#define BEGIN_PROXY_MAP(c) \
|
||||
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() { \
|
||||
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) { \
|
||||
return new rtc::RefCountedObject<c##Proxy>(thread, c); \
|
||||
}
|
||||
|
||||
#define PROXY_METHOD0(r, method)\
|
||||
r method() OVERRIDE {\
|
||||
MethodCall0<C, r> call(c_.get(), &C::method);\
|
||||
return call.Marshal(owner_thread_);\
|
||||
}\
|
||||
#define PROXY_METHOD0(r, method) \
|
||||
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 {\
|
||||
ConstMethodCall0<C, r> call(c_.get(), &C::method);\
|
||||
return call.Marshal(owner_thread_);\
|
||||
}\
|
||||
#define PROXY_CONSTMETHOD0(r, method) \
|
||||
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 {\
|
||||
MethodCall1<C, r, t1> call(c_.get(), &C::method, a1);\
|
||||
return call.Marshal(owner_thread_);\
|
||||
}\
|
||||
#define PROXY_METHOD1(r, method, t1) \
|
||||
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 {\
|
||||
ConstMethodCall1<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 { \
|
||||
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 {\
|
||||
MethodCall2<C, r, t1, t2> call(c_.get(), &C::method, a1, a2);\
|
||||
return call.Marshal(owner_thread_);\
|
||||
}\
|
||||
#define PROXY_METHOD2(r, method, t1, t2) \
|
||||
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 {\
|
||||
MethodCall3<C, r, t1, t2, t3> call(c_.get(), &C::method, a1, a2, a3);\
|
||||
return call.Marshal(owner_thread_);\
|
||||
}\
|
||||
#define PROXY_METHOD3(r, method, t1, t2, t3) \
|
||||
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);\
|
||||
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); \
|
||||
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);\
|
||||
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); \
|
||||
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,
|
||||
char name[webrtc::kAdmMaxDeviceNameSize],
|
||||
char guid[webrtc::kAdmMaxGuidSize]) OVERRIDE;
|
||||
virtual int32_t RecordingDeviceName(
|
||||
uint16_t index,
|
||||
char name[webrtc::kAdmMaxDeviceNameSize],
|
||||
char guid[webrtc::kAdmMaxGuidSize]) OVERRIDE;
|
||||
int16_t PlayoutDevices() override;
|
||||
int16_t RecordingDevices() override;
|
||||
int32_t PlayoutDeviceName(uint16_t index,
|
||||
char name[webrtc::kAdmMaxDeviceNameSize],
|
||||
char guid[webrtc::kAdmMaxGuidSize]) override;
|
||||
int32_t RecordingDeviceName(uint16_t index,
|
||||
char name[webrtc::kAdmMaxDeviceNameSize],
|
||||
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,
|
||||
const rtc::Buffer& payload,
|
||||
cricket::SendDataResult* result) OVERRIDE {
|
||||
bool SendData(const cricket::SendDataParams& params,
|
||||
const rtc::Buffer& payload,
|
||||
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,
|
||||
const cricket::AudioOptions& options,
|
||||
cricket::AudioRenderer* renderer) OVERRIDE;
|
||||
virtual void SetAudioPlayoutVolume(uint32 ssrc, double volume) OVERRIDE;
|
||||
void SetAudioPlayout(uint32 ssrc,
|
||||
bool enable,
|
||||
cricket::AudioRenderer* renderer) override;
|
||||
void SetAudioSend(uint32 ssrc,
|
||||
bool enable,
|
||||
const cricket::AudioOptions& options,
|
||||
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 enable,
|
||||
cricket::VideoRenderer* renderer) OVERRIDE;
|
||||
virtual void SetVideoSend(uint32 ssrc, bool enable,
|
||||
const cricket::VideoOptions* options) OVERRIDE;
|
||||
bool SetCaptureDevice(uint32 ssrc, cricket::VideoCapturer* camera) override;
|
||||
void SetVideoPlayout(uint32 ssrc,
|
||||
bool enable,
|
||||
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,
|
||||
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;
|
||||
bool SendData(const cricket::SendDataParams& params,
|
||||
const rtc::Buffer& payload,
|
||||
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,
|
||||
int bits_per_sample,
|
||||
int sample_rate,
|
||||
int number_of_channels,
|
||||
int number_of_frames) OVERRIDE {}
|
||||
virtual void OnClose() OVERRIDE {
|
||||
renderer_ = NULL;
|
||||
}
|
||||
void OnData(const void* audio_data,
|
||||
int bits_per_sample,
|
||||
int sample_rate,
|
||||
int number_of_channels,
|
||||
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,
|
||||
uint32_t& zOrder,
|
||||
float& left, float& top,
|
||||
float& right, float& bottom) const OVERRIDE {
|
||||
int32_t GetIncomingRenderStreamProperties(const uint32_t stream_id,
|
||||
uint32_t& zOrder,
|
||||
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,
|
||||
const float right,
|
||||
const float bottom) OVERRIDE {
|
||||
int32_t SetStreamCropping(const uint32_t stream_id,
|
||||
const float left,
|
||||
const float top,
|
||||
const float right,
|
||||
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,
|
||||
const unsigned int zOrder,
|
||||
const float left, const float top,
|
||||
const float right,
|
||||
const float bottom) OVERRIDE {
|
||||
int32_t ConfigureRenderer(const uint32_t stream_id,
|
||||
const unsigned int zOrder,
|
||||
const float left,
|
||||
const float top,
|
||||
const float right,
|
||||
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 {
|
||||
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 {
|
||||
return -1;
|
||||
}
|
||||
|
||||
virtual 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 {
|
||||
int32_t SetStartImage(const uint32_t stream_id,
|
||||
const webrtc::I420VideoFrame& videoFrame) override {
|
||||
return -1;
|
||||
}
|
||||
|
||||
virtual int32_t SetStartImage(
|
||||
const uint32_t stream_id,
|
||||
const webrtc::I420VideoFrame& videoFrame) OVERRIDE {
|
||||
return -1;
|
||||
}
|
||||
|
||||
virtual int32_t SetTimeoutImage(
|
||||
const uint32_t stream_id,
|
||||
const webrtc::I420VideoFrame& videoFrame,
|
||||
const uint32_t timeout) OVERRIDE {
|
||||
int32_t SetTimeoutImage(const uint32_t stream_id,
|
||||
const webrtc::I420VideoFrame& videoFrame,
|
||||
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,
|
||||
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 mute) 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 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,
|
||||
int time_to_render_ms) override;
|
||||
virtual bool IsTextureSupported() const override;
|
||||
void RenderFrame(const webrtc::I420VideoFrame& frame,
|
||||
int time_to_render_ms) 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,
|
||||
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 {
|
||||
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,
|
||||
webrtc::ProcessingTypes type,
|
||||
int16_t audio10ms[],
|
||||
int length,
|
||||
int sampling_freq,
|
||||
bool is_stereo) OVERRIDE;
|
||||
void Process(int channel,
|
||||
webrtc::ProcessingTypes type,
|
||||
int16_t audio10ms[],
|
||||
int length,
|
||||
int sampling_freq,
|
||||
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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user