Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(177)

Unified Diff: webrtc/media/engine/webrtcvideoengine2.h

Issue 1766653002: Replace SetCapturer and SetCaptureDevice by SetSource. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebased. Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/media/engine/webrtcvideoengine2.h
diff --git a/webrtc/media/engine/webrtcvideoengine2.h b/webrtc/media/engine/webrtcvideoengine2.h
index ff8624592950a01148acf3754cdc79bd00e4c4d0..cd5f4549ca47d7f93b045e4c247f93f7ff7d870a 100644
--- a/webrtc/media/engine/webrtcvideoengine2.h
+++ b/webrtc/media/engine/webrtcvideoengine2.h
@@ -160,7 +160,9 @@ class WebRtcVideoChannel2 : public VideoMediaChannel, public webrtc::Transport {
bool SetSink(uint32_t ssrc,
rtc::VideoSinkInterface<VideoFrame>* sink) override;
bool GetStats(VideoMediaInfo* info) override;
- bool SetCapturer(uint32_t ssrc, VideoCapturer* capturer) override;
+ void SetSource(
+ uint32_t ssrc,
+ rtc::VideoSourceInterface<cricket::VideoFrame>* source) override;
void OnPacketReceived(rtc::CopyOnWriteBuffer* packet,
const rtc::PacketTime& packet_time) override;
@@ -206,8 +208,6 @@ class WebRtcVideoChannel2 : public VideoMediaChannel, public webrtc::Transport {
bool GetChangedRecvParameters(const VideoRecvParameters& params,
ChangedRecvParameters* changed_params) const;
- bool MuteStream(uint32_t ssrc, bool mute);
-
void SetMaxSendBandwidth(int bps);
void SetOptions(uint32_t ssrc, const VideoOptions& options);
@@ -224,7 +224,7 @@ class WebRtcVideoChannel2 : public VideoMediaChannel, public webrtc::Transport {
static std::string CodecSettingsVectorToString(
const std::vector<VideoCodecSettings>& codecs);
- // Wrapper for the sender part, this is where the capturer is connected and
+ // Wrapper for the sender part, this is where the source is connected and
// frames are then converted from cricket frames to webrtc frames.
class WebRtcVideoSendStream
: public rtc::VideoSinkInterface<cricket::VideoFrame>,
@@ -250,9 +250,8 @@ class WebRtcVideoChannel2 : public VideoMediaChannel, public webrtc::Transport {
webrtc::RtpParameters GetRtpParameters() const;
void OnFrame(const cricket::VideoFrame& frame) override;
- bool SetCapturer(VideoCapturer* capturer);
- void MuteStream(bool mute);
- bool DisconnectCapturer();
+ void SetSource(rtc::VideoSourceInterface<cricket::VideoFrame>* source);
+ void DisconnectSource();
void SetSend(bool send);
@@ -354,12 +353,12 @@ class WebRtcVideoChannel2 : public VideoMediaChannel, public webrtc::Transport {
webrtc::Call* const call_;
rtc::VideoSinkWants sink_wants_;
// Counter used for deciding if the video resolution is currently
- // restricted by CPU usage. It is reset if |capturer_| is changed.
+ // restricted by CPU usage. It is reset if |source_| is changed.
int cpu_restricted_counter_;
// Total number of times resolution as been requested to be changed due to
// CPU adaptation.
int number_of_cpu_adapt_changes_;
- VideoCapturer* capturer_;
+ rtc::VideoSourceInterface<cricket::VideoFrame>* source_;
WebRtcVideoEncoderFactory* const external_encoder_factory_
GUARDED_BY(lock_);
@@ -377,19 +376,21 @@ class WebRtcVideoChannel2 : public VideoMediaChannel, public webrtc::Transport {
bool pending_encoder_reconfiguration_ GUARDED_BY(lock_);
VideoEncoderSettings encoder_settings_ GUARDED_BY(lock_);
AllocatedEncoder allocated_encoder_ GUARDED_BY(lock_);
+ // Original frame dimension, before adaptation due to cpu or
+ // network bottlenecks.
+ Dimensions input_dimensions_ GUARDED_BY(lock_);
Dimensions last_dimensions_ GUARDED_BY(lock_);
webrtc::VideoRotation last_rotation_ GUARDED_BY(lock_) =
webrtc::kVideoRotation_0;
bool sending_ GUARDED_BY(lock_);
- bool muted_ GUARDED_BY(lock_);
// The timestamp of the first frame received
// Used to generate the timestamps of subsequent frames
int64_t first_frame_timestamp_ms_ GUARDED_BY(lock_);
// The timestamp of the last frame received
- // Used to generate timestamp for the black frame when capturer is removed
+ // Used to generate timestamp for the black frame when source is removed
int64_t last_frame_timestamp_ms_ GUARDED_BY(lock_);
};

Powered by Google App Engine
This is Rietveld 408576698