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_RECEIVER_H_ |
| 6 #define CONTENT_RENDERER_MEDIA_WEBRTC_RTC_RTP_RECEIVER_H_ |
| 7 |
| 8 #include "base/macros.h" |
| 9 #include "base/memory/ref_counted.h" |
| 10 #include "content/common/content_export.h" |
| 11 #include "third_party/WebKit/public/platform/WebMediaStreamTrack.h" |
| 12 #include "third_party/WebKit/public/platform/WebRTCRtpReceiver.h" |
| 13 #include "third_party/webrtc/api/rtpreceiverinterface.h" |
| 14 |
| 15 namespace content { |
| 16 |
| 17 // Used to surface |webrtc::RtpReceiverInterface| to blink. Multiple |
| 18 // |RTCRtpReceiver|s could reference the same webrtc receiver; |id| is the value |
| 19 // of the pointer to the webrtc receiver. |
| 20 class CONTENT_EXPORT RTCRtpReceiver : public blink::WebRTCRtpReceiver { |
| 21 public: |
| 22 static uintptr_t getId( |
| 23 const webrtc::RtpReceiverInterface* webrtc_rtp_receiver); |
| 24 |
| 25 RTCRtpReceiver(webrtc::RtpReceiverInterface* webrtc_rtp_receiver, |
| 26 const blink::WebMediaStreamTrack& web_track); |
| 27 ~RTCRtpReceiver() override; |
| 28 |
| 29 uintptr_t id() const override; |
| 30 |
| 31 const blink::WebMediaStreamTrack& track() const override; |
| 32 const webrtc::MediaStreamTrackInterface& webrtc_track() const; |
| 33 |
| 34 private: |
| 35 const scoped_refptr<webrtc::RtpReceiverInterface> webrtc_rtp_receiver_; |
| 36 const blink::WebMediaStreamTrack web_track_; |
| 37 |
| 38 DISALLOW_COPY_AND_ASSIGN(RTCRtpReceiver); |
| 39 }; |
| 40 |
| 41 } // namespace content |
| 42 |
| 43 #endif // CONTENT_RENDERER_MEDIA_WEBRTC_RTC_RTP_RECEIVER_H_ |
OLD | NEW |