| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef WebRTCRtpReceiver_h | 5 #ifndef WebRTCRtpReceiver_h |
| 6 #define WebRTCRtpReceiver_h | 6 #define WebRTCRtpReceiver_h |
| 7 | 7 |
| 8 #include "WebCommon.h" | 8 #include "WebCommon.h" |
| 9 #include "WebString.h" | 9 #include "WebString.h" |
| 10 #include "WebVector.h" | |
| 11 | 10 |
| 12 namespace blink { | 11 namespace blink { |
| 13 | 12 |
| 14 class WebMediaStreamTrack; | 13 class WebMediaStreamTrack; |
| 15 class WebRTCRtpContributingSource; | |
| 16 | 14 |
| 17 // Implementations of this interface keep the corresponding WebRTC-layer | 15 // Implementations of this interface keep the corresponding WebRTC-layer |
| 18 // receiver alive through reference counting. Multiple |WebRTCRtpReceiver|s | 16 // receiver alive through reference counting. Multiple |WebRTCRtpReceiver|s |
| 19 // could reference the same receiver, see |id|. | 17 // could reference the same receiver, see |id|. |
| 20 // https://w3c.github.io/webrtc-pc/#rtcrtpreceiver-interface | 18 // https://w3c.github.io/webrtc-pc/#rtcrtpreceiver-interface |
| 21 class BLINK_PLATFORM_EXPORT WebRTCRtpReceiver { | 19 class BLINK_PLATFORM_EXPORT WebRTCRtpReceiver { |
| 22 public: | 20 public: |
| 23 virtual ~WebRTCRtpReceiver(); | 21 virtual ~WebRTCRtpReceiver(); |
| 24 | 22 |
| 25 // Two |WebRTCRtpReceiver|s referencing the same WebRTC-layer receiver have | 23 // Two |WebRTCRtpReceiver|s referencing the same WebRTC-layer receiver have |
| 26 // the same |id|. | 24 // the same |id|. |
| 27 virtual uintptr_t Id() const = 0; | 25 virtual uintptr_t Id() const = 0; |
| 28 virtual const WebMediaStreamTrack& Track() const = 0; | 26 virtual const WebMediaStreamTrack& Track() const = 0; |
| 29 virtual WebVector<std::unique_ptr<WebRTCRtpContributingSource>> | |
| 30 GetSources() = 0; | |
| 31 }; | 27 }; |
| 32 | 28 |
| 33 } // namespace blink | 29 } // namespace blink |
| 34 | 30 |
| 35 #endif // WebRTCRtpReceiver_h | 31 #endif // WebRTCRtpReceiver_h |
| OLD | NEW |