| OLD | NEW |
| (Empty) | |
| 1 // Copyright (c) 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CONTENT_RENDERER_MEDIA_WEBRTC_RTC_RTP_SENDER_H_ |
| 6 #define CONTENT_RENDERER_MEDIA_WEBRTC_RTC_RTP_SENDER_H_ |
| 7 |
| 8 #include "base/memory/ref_counted.h" |
| 9 #include "content/common/content_export.h" |
| 10 #include "third_party/WebKit/public/platform/WebMediaStreamTrack.h" |
| 11 #include "third_party/WebKit/public/platform/WebRTCRtpSender.h" |
| 12 #include "third_party/webrtc/api/rtpsenderinterface.h" |
| 13 |
| 14 namespace content { |
| 15 |
| 16 // Used to surface |webrtc::RtpSenderInterface| to blink. Multiple |
| 17 // |RTCRtpSender|s could reference the same webrtc receiver; |id| is the value |
| 18 // of the pointer to the webrtc sender. |
| 19 class CONTENT_EXPORT RTCRtpSender : public blink::WebRTCRtpSender { |
| 20 public: |
| 21 static uintptr_t getId(const webrtc::RtpSenderInterface* webrtc_rtp_sender); |
| 22 |
| 23 RTCRtpSender(webrtc::RtpSenderInterface* webrtc_rtp_sender, |
| 24 std::unique_ptr<blink::WebMediaStreamTrack> web_track); |
| 25 ~RTCRtpSender() override; |
| 26 |
| 27 uintptr_t Id() const override; |
| 28 const blink::WebMediaStreamTrack* Track() const override; |
| 29 |
| 30 const webrtc::MediaStreamTrackInterface* webrtc_track() const; |
| 31 |
| 32 private: |
| 33 const scoped_refptr<webrtc::RtpSenderInterface> webrtc_rtp_sender_; |
| 34 std::unique_ptr<blink::WebMediaStreamTrack> web_track_; |
| 35 }; |
| 36 |
| 37 } // namespace content |
| 38 |
| 39 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_RTC_RTP_SENDER_H_ |
| OLD | NEW |