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

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: Delete VideoCapturer::frame_stats_crit_ 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 27eadb299ae69160ba7d9a41ca38c74463f4b691..5ae0c71bf135a84305b647b7a6df96c75946e012 100644
--- a/webrtc/media/engine/webrtcvideoengine2.h
+++ b/webrtc/media/engine/webrtcvideoengine2.h
@@ -161,7 +161,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;
@@ -207,8 +209,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);
@@ -225,7 +225,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 {
bool SetRtpParameters(const webrtc::RtpParameters& parameters);
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 Start();
void Stop();
@@ -353,12 +352,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_);
@@ -376,19 +375,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