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

Unified Diff: webrtc/api/rtpreceiver.h

Issue 1765423005: Change VideoRtpReceiver to create remote VideoTrack and VideoTrackSource. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Fixed up the comments. 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
« no previous file with comments | « webrtc/api/remotevideocapturer_unittest.cc ('k') | webrtc/api/rtpreceiver.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/api/rtpreceiver.h
diff --git a/webrtc/api/rtpreceiver.h b/webrtc/api/rtpreceiver.h
index 43adc7294601d0930dcd7c5ad80637056fee7edc..a62ed19dbf101cfc9307e44a8611a068ea70571c 100644
--- a/webrtc/api/rtpreceiver.h
+++ b/webrtc/api/rtpreceiver.h
@@ -19,7 +19,9 @@
#include "webrtc/api/mediastreamprovider.h"
#include "webrtc/api/rtpreceiverinterface.h"
+#include "webrtc/api/videotracksource.h"
#include "webrtc/base/basictypes.h"
+#include "webrtc/media/base/videobroadcaster.h"
namespace webrtc {
@@ -60,12 +62,18 @@ class AudioRtpReceiver : public ObserverInterface,
class VideoRtpReceiver : public rtc::RefCountedObject<RtpReceiverInterface> {
public:
- VideoRtpReceiver(VideoTrackInterface* track,
+ VideoRtpReceiver(MediaStreamInterface* stream,
+ const std::string& track_id,
+ rtc::Thread* worker_thread,
uint32_t ssrc,
VideoProviderInterface* provider);
virtual ~VideoRtpReceiver();
+ rtc::scoped_refptr<VideoTrackInterface> video_track() const {
+ return track_.get();
+ }
+
// RtpReceiverInterface implementation
rtc::scoped_refptr<MediaStreamTrackInterface> track() const override {
return track_.get();
@@ -77,9 +85,16 @@ class VideoRtpReceiver : public rtc::RefCountedObject<RtpReceiverInterface> {
private:
std::string id_;
- rtc::scoped_refptr<VideoTrackInterface> track_;
uint32_t ssrc_;
VideoProviderInterface* provider_;
+ // |broadcaster_| is needed since the decoder can only handle one sink.
+ // It might be better if the decoder can handle multiple sinks and consider
+ // the VideoSinkWants.
+ rtc::VideoBroadcaster broadcaster_;
+ // |source_| is held here to be able to change the state of the source when
+ // the VideoRtpReceiver is stopped.
+ rtc::scoped_refptr<VideoTrackSource> source_;
+ rtc::scoped_refptr<VideoTrackInterface> track_;
};
} // namespace webrtc
« no previous file with comments | « webrtc/api/remotevideocapturer_unittest.cc ('k') | webrtc/api/rtpreceiver.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698