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

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

Issue 1631703002: Make WebRtcVideoChannel2::WebRtcVideoSendStream implement rtc::VideoRendererInterface. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Addressed Per's comments. Created 4 years, 11 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: talk/media/webrtc/webrtcvideoengine2.h
diff --git a/talk/media/webrtc/webrtcvideoengine2.h b/talk/media/webrtc/webrtcvideoengine2.h
index eb2480c4cbde614ff43b6afc8ed6397aebb79787..e39c35ce1356c5ee41cbbd659bef19e44b14e602 100644
--- a/talk/media/webrtc/webrtcvideoengine2.h
+++ b/talk/media/webrtc/webrtcvideoengine2.h
@@ -167,6 +167,7 @@ class WebRtcVideoChannel2 : public rtc::MessageHandler,
bool SetVideoSend(uint32_t ssrc,
bool mute,
const VideoOptions* options) override;
+ rtc::VideoSinkInterface<cricket::VideoFrame>* GetSink(uint32_t ssrc) override;
bool AddSendStream(const StreamParams& sp) override;
bool RemoveSendStream(uint32_t ssrc) override;
bool AddRecvStream(const StreamParams& sp) override;
@@ -233,7 +234,8 @@ class WebRtcVideoChannel2 : public rtc::MessageHandler,
// Wrapper for the sender part, this is where the capturer is connected and
// frames are then converted from cricket frames to webrtc frames.
- class WebRtcVideoSendStream : public sigslot::has_slots<> {
+ class WebRtcVideoSendStream :
+ public rtc::VideoSinkInterface<cricket::VideoFrame> {
public:
WebRtcVideoSendStream(
webrtc::Call* call,
@@ -245,7 +247,7 @@ class WebRtcVideoChannel2 : public rtc::MessageHandler,
const rtc::Optional<VideoCodecSettings>& codec_settings,
const std::vector<webrtc::RtpExtension>& rtp_extensions,
const VideoSendParameters& send_params);
- ~WebRtcVideoSendStream();
+ virtual ~WebRtcVideoSendStream();
void SetOptions(const VideoOptions& options);
void SetCodec(const VideoCodecSettings& codec);
@@ -255,7 +257,7 @@ class WebRtcVideoChannel2 : public rtc::MessageHandler,
// into this method. Currently this method only sets the RTCP mode.
void SetSendParameters(const VideoSendParameters& send_params);
- void InputFrame(VideoCapturer* capturer, const VideoFrame* frame);
+ void OnFrame(const cricket::VideoFrame& frame) override;
bool SetCapturer(VideoCapturer* capturer);
bool SetVideoFormat(const VideoFormat& format);
void MuteStream(bool mute);
@@ -366,6 +368,10 @@ class WebRtcVideoChannel2 : public rtc::MessageHandler,
Dimensions last_dimensions_ GUARDED_BY(lock_);
VideoCapturer* capturer_ GUARDED_BY(lock_);
+ // TODO(nisse): Keeping this flag here, caching
+ // capturer_->IsScreencast(), is a temporary hack. The plan is to
+ // move the screencast flag into VideoOptions.
+ bool is_screencast_;
bool sending_ GUARDED_BY(lock_);
bool muted_ GUARDED_BY(lock_);
VideoFormat format_ GUARDED_BY(lock_);

Powered by Google App Engine
This is Rietveld 408576698