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

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

Issue 2348533002: Reland Replace interface VideoCapturerInput with VideoSinkInterface. (Closed)
Patch Set: Fix rtp timestamp in quality test. Created 4 years, 3 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
« no previous file with comments | « webrtc/media/engine/fakewebrtccall.cc ('k') | webrtc/media/engine/webrtcvideoengine2.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/media/engine/webrtcvideoengine2.h
diff --git a/webrtc/media/engine/webrtcvideoengine2.h b/webrtc/media/engine/webrtcvideoengine2.h
index 7e32116608c7e87f572c201e3485f74cf558d8ab..b8d17e8105569e44cb2320ee0cd5369b17d4adc3 100644
--- a/webrtc/media/engine/webrtcvideoengine2.h
+++ b/webrtc/media/engine/webrtcvideoengine2.h
@@ -243,6 +243,7 @@ class WebRtcVideoChannel2 : public VideoMediaChannel, public webrtc::Transport {
// frames are then converted from cricket frames to webrtc frames.
class WebRtcVideoSendStream
: public rtc::VideoSinkInterface<cricket::VideoFrame>,
+ public rtc::VideoSourceInterface<webrtc::VideoFrame>,
public webrtc::LoadObserver {
public:
WebRtcVideoSendStream(
@@ -262,6 +263,16 @@ class WebRtcVideoChannel2 : public VideoMediaChannel, public webrtc::Transport {
bool SetRtpParameters(const webrtc::RtpParameters& parameters);
webrtc::RtpParameters GetRtpParameters() const;
+ // Implements rtc::VideoSourceInterface<webrtc::VideoFrame>.
+ // WebRtcVideoSendStream acts as a source to the webrtc::VideoSendStream
+ // in |stream_|. The reason is that WebRtcVideoSendStream receives
+ // cricket::VideoFrames and forwards webrtc::VideoFrames to |source_|.
+ // TODO(perkj, nisse): Refactor WebRtcVideoSendStream to directly connect
+ // the camera input |source_|
+ void AddOrUpdateSink(VideoSinkInterface<webrtc::VideoFrame>* sink,
+ const rtc::VideoSinkWants& wants) override;
+ void RemoveSink(VideoSinkInterface<webrtc::VideoFrame>* sink) override;
+
void OnFrame(const cricket::VideoFrame& frame) override;
bool SetVideoSend(bool mute,
const VideoOptions* options,
@@ -389,6 +400,8 @@ class WebRtcVideoChannel2 : public VideoMediaChannel, public webrtc::Transport {
rtc::CriticalSection lock_;
webrtc::VideoSendStream* stream_ GUARDED_BY(lock_);
+ rtc::VideoSinkInterface<webrtc::VideoFrame>* encoder_sink_
+ GUARDED_BY(lock_);
// Contains settings that are the same for all streams in the MediaChannel,
// such as codecs, header extensions, and the global bitrate limit for the
// entire channel.
« no previous file with comments | « webrtc/media/engine/fakewebrtccall.cc ('k') | webrtc/media/engine/webrtcvideoengine2.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698