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

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

Issue 1655793003: Make cricket::VideoCapturer implement VideoSourceInterface (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Addressed comments. Removed AddSink Created 4 years, 10 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/webrtc/webrtcvideoengine2.h
diff --git a/webrtc/media/webrtc/webrtcvideoengine2.h b/webrtc/media/webrtc/webrtcvideoengine2.h
index 440725376436528c7f07649044e12d5f0743ebeb..214efc007df51072a21d06df8b356f0c2798ef18 100644
--- a/webrtc/media/webrtc/webrtcvideoengine2.h
+++ b/webrtc/media/webrtc/webrtcvideoengine2.h
@@ -12,6 +12,7 @@
#define WEBRTC_MEDIA_WEBRTC_WEBRTCVIDEOENGINE2_H_
#include <map>
+#include <set>
#include <string>
#include <vector>
@@ -20,6 +21,7 @@
#include "webrtc/base/thread_annotations.h"
#include "webrtc/base/thread_checker.h"
#include "webrtc/media/base/videosinkinterface.h"
+#include "webrtc/media/base/videosourceinterface.h"
#include "webrtc/call.h"
#include "webrtc/media/base/mediaengine.h"
#include "webrtc/media/webrtc/webrtcvideochannelfactory.h"
@@ -221,7 +223,8 @@ class WebRtcVideoChannel2 : public VideoMediaChannel,
// 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,
@@ -233,13 +236,13 @@ class WebRtcVideoChannel2 : public VideoMediaChannel,
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);
// TODO(pbos): Move logic from SetOptions into this method.
void SetSendParameters(const ChangedSendParameters& send_params);
- void InputFrame(VideoCapturer* capturer, const VideoFrame* frame);
+ void OnFrame(const cricket::VideoFrame& frame) override;
bool SetCapturer(VideoCapturer* capturer);
void MuteStream(bool mute);
bool DisconnectCapturer();
@@ -335,6 +338,7 @@ class WebRtcVideoChannel2 : public VideoMediaChannel,
const std::vector<uint32_t> ssrcs_;
const std::vector<SsrcGroup> ssrc_groups_;
webrtc::Call* const call_;
+ rtc::VideoWants sink_wants_;
WebRtcVideoEncoderFactory* const external_encoder_factory_
GUARDED_BY(lock_);

Powered by Google App Engine
This is Rietveld 408576698