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

Unified Diff: content/renderer/media/webrtc/rtc_rtp_sender.h

Issue 2749703005: RTCRtpSender with track behind RuntimeEnabled flag (Closed)
Patch Set: external/wpt/webrtc/RTCPeerConnection-idl-expected.txt updated passing 2 more tests Created 3 years, 7 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: content/renderer/media/webrtc/rtc_rtp_sender.h
diff --git a/content/renderer/media/webrtc/rtc_rtp_sender.h b/content/renderer/media/webrtc/rtc_rtp_sender.h
new file mode 100644
index 0000000000000000000000000000000000000000..716e0b006f237e7ceb06d311a837cb5e67b46754
--- /dev/null
+++ b/content/renderer/media/webrtc/rtc_rtp_sender.h
@@ -0,0 +1,39 @@
+// Copyright (c) 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CONTENT_RENDERER_MEDIA_WEBRTC_RTC_RTP_SENDER_H_
+#define CONTENT_RENDERER_MEDIA_WEBRTC_RTC_RTP_SENDER_H_
+
+#include "base/memory/ref_counted.h"
+#include "content/common/content_export.h"
+#include "third_party/WebKit/public/platform/WebMediaStreamTrack.h"
+#include "third_party/WebKit/public/platform/WebRTCRtpSender.h"
+#include "third_party/webrtc/api/rtpsenderinterface.h"
+
+namespace content {
+
+// Used to surface |webrtc::RtpSenderInterface| to blink. Multiple
+// |RTCRtpSender|s could reference the same webrtc receiver; |id| is the value
+// of the pointer to the webrtc sender.
+class CONTENT_EXPORT RTCRtpSender : public blink::WebRTCRtpSender {
+ public:
+ static uintptr_t getId(const webrtc::RtpSenderInterface* webrtc_rtp_sender);
+
+ RTCRtpSender(webrtc::RtpSenderInterface* webrtc_rtp_sender,
+ std::unique_ptr<blink::WebMediaStreamTrack> web_track);
+ ~RTCRtpSender() override;
+
+ uintptr_t Id() const override;
+ const blink::WebMediaStreamTrack* Track() const override;
+
+ const webrtc::MediaStreamTrackInterface* webrtc_track() const;
+
+ private:
+ const scoped_refptr<webrtc::RtpSenderInterface> webrtc_rtp_sender_;
+ std::unique_ptr<blink::WebMediaStreamTrack> web_track_;
+};
+
+} // namespace content
+
+#endif // CONTENT_RENDERER_MEDIA_WEBRTC_RTC_RTP_SENDER_H_
« no previous file with comments | « content/renderer/media/rtc_peer_connection_handler.cc ('k') | content/renderer/media/webrtc/rtc_rtp_sender.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698