| Index: content/renderer/media/webrtc/rtc_rtp_receiver.h
|
| diff --git a/content/renderer/media/webrtc/rtc_rtp_receiver.h b/content/renderer/media/webrtc/rtc_rtp_receiver.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..5bba6c395f744680ecdcd0200f1cb2424adb111c
|
| --- /dev/null
|
| +++ b/content/renderer/media/webrtc/rtc_rtp_receiver.h
|
| @@ -0,0 +1,43 @@
|
| +// 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_RECEIVER_H_
|
| +#define CONTENT_RENDERER_MEDIA_WEBRTC_RTC_RTP_RECEIVER_H_
|
| +
|
| +#include "base/macros.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/WebRTCRtpReceiver.h"
|
| +#include "third_party/webrtc/api/rtpreceiverinterface.h"
|
| +
|
| +namespace content {
|
| +
|
| +// Used to surface |webrtc::RtpReceiverInterface| to blink. Multiple
|
| +// |RTCRtpReceiver|s could reference the same webrtc receiver; |id| is the value
|
| +// of the pointer to the webrtc receiver.
|
| +class CONTENT_EXPORT RTCRtpReceiver : public blink::WebRTCRtpReceiver {
|
| + public:
|
| + static uintptr_t getId(
|
| + const webrtc::RtpReceiverInterface* webrtc_rtp_receiver);
|
| +
|
| + RTCRtpReceiver(webrtc::RtpReceiverInterface* webrtc_rtp_receiver,
|
| + const blink::WebMediaStreamTrack& web_track);
|
| + ~RTCRtpReceiver() override;
|
| +
|
| + uintptr_t id() const override;
|
| +
|
| + const blink::WebMediaStreamTrack& track() const override;
|
| + const webrtc::MediaStreamTrackInterface& webrtc_track() const;
|
| +
|
| + private:
|
| + const scoped_refptr<webrtc::RtpReceiverInterface> webrtc_rtp_receiver_;
|
| + const blink::WebMediaStreamTrack web_track_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(RTCRtpReceiver);
|
| +};
|
| +
|
| +} // namespace content
|
| +
|
| +#endif // CONTENT_RENDERER_MEDIA_WEBRTC_RTC_RTP_RECEIVER_H_
|
|
|