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. |