| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2015 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2015 The WebRTC project authors. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 | 49 |
| 50 // RtpReceiverInterface implementation | 50 // RtpReceiverInterface implementation |
| 51 rtc::scoped_refptr<MediaStreamTrackInterface> track() const override { | 51 rtc::scoped_refptr<MediaStreamTrackInterface> track() const override { |
| 52 return track_.get(); | 52 return track_.get(); |
| 53 } | 53 } |
| 54 | 54 |
| 55 std::string id() const override { return id_; } | 55 std::string id() const override { return id_; } |
| 56 | 56 |
| 57 void Stop() override; | 57 void Stop() override; |
| 58 | 58 |
| 59 RtpParameters GetParameters() const override; |
| 60 bool SetParameters(const RtpParameters& parameters) override; |
| 61 |
| 59 private: | 62 private: |
| 60 void Reconfigure(); | 63 void Reconfigure(); |
| 61 | 64 |
| 62 const std::string id_; | 65 const std::string id_; |
| 63 const uint32_t ssrc_; | 66 const uint32_t ssrc_; |
| 64 AudioProviderInterface* provider_; // Set to null in Stop(). | 67 AudioProviderInterface* provider_; // Set to null in Stop(). |
| 65 const rtc::scoped_refptr<AudioTrackInterface> track_; | 68 const rtc::scoped_refptr<AudioTrackInterface> track_; |
| 66 bool cached_track_enabled_; | 69 bool cached_track_enabled_; |
| 67 }; | 70 }; |
| 68 | 71 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 82 | 85 |
| 83 // RtpReceiverInterface implementation | 86 // RtpReceiverInterface implementation |
| 84 rtc::scoped_refptr<MediaStreamTrackInterface> track() const override { | 87 rtc::scoped_refptr<MediaStreamTrackInterface> track() const override { |
| 85 return track_.get(); | 88 return track_.get(); |
| 86 } | 89 } |
| 87 | 90 |
| 88 std::string id() const override { return id_; } | 91 std::string id() const override { return id_; } |
| 89 | 92 |
| 90 void Stop() override; | 93 void Stop() override; |
| 91 | 94 |
| 95 RtpParameters GetParameters() const override; |
| 96 bool SetParameters(const RtpParameters& parameters) override; |
| 97 |
| 92 private: | 98 private: |
| 93 std::string id_; | 99 std::string id_; |
| 94 uint32_t ssrc_; | 100 uint32_t ssrc_; |
| 95 VideoProviderInterface* provider_; | 101 VideoProviderInterface* provider_; |
| 96 // |broadcaster_| is needed since the decoder can only handle one sink. | 102 // |broadcaster_| is needed since the decoder can only handle one sink. |
| 97 // It might be better if the decoder can handle multiple sinks and consider | 103 // It might be better if the decoder can handle multiple sinks and consider |
| 98 // the VideoSinkWants. | 104 // the VideoSinkWants. |
| 99 rtc::VideoBroadcaster broadcaster_; | 105 rtc::VideoBroadcaster broadcaster_; |
| 100 // |source_| is held here to be able to change the state of the source when | 106 // |source_| is held here to be able to change the state of the source when |
| 101 // the VideoRtpReceiver is stopped. | 107 // the VideoRtpReceiver is stopped. |
| 102 rtc::scoped_refptr<VideoTrackSource> source_; | 108 rtc::scoped_refptr<VideoTrackSource> source_; |
| 103 rtc::scoped_refptr<VideoTrackInterface> track_; | 109 rtc::scoped_refptr<VideoTrackInterface> track_; |
| 104 }; | 110 }; |
| 105 | 111 |
| 106 } // namespace webrtc | 112 } // namespace webrtc |
| 107 | 113 |
| 108 #endif // WEBRTC_API_RTPRECEIVER_H_ | 114 #endif // WEBRTC_API_RTPRECEIVER_H_ |
| OLD | NEW |