| 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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 | 90 |
| 91 std::string id() const override { return id_; } | 91 std::string id() const override { return id_; } |
| 92 | 92 |
| 93 void set_stream_id(const std::string& stream_id) override { | 93 void set_stream_id(const std::string& stream_id) override { |
| 94 stream_id_ = stream_id; | 94 stream_id_ = stream_id; |
| 95 } | 95 } |
| 96 std::string stream_id() const override { return stream_id_; } | 96 std::string stream_id() const override { return stream_id_; } |
| 97 | 97 |
| 98 void Stop() override; | 98 void Stop() override; |
| 99 | 99 |
| 100 RtpParameters GetParameters() const; | 100 RtpParameters GetParameters() const override; |
| 101 bool SetParameters(const RtpParameters& parameters); | 101 bool SetParameters(const RtpParameters& parameters) override; |
| 102 | 102 |
| 103 private: | 103 private: |
| 104 // TODO(nisse): Since SSRC == 0 is technically valid, figure out | 104 // TODO(nisse): Since SSRC == 0 is technically valid, figure out |
| 105 // some other way to test if we have a valid SSRC. | 105 // some other way to test if we have a valid SSRC. |
| 106 bool can_send_track() const { return track_ && ssrc_; } | 106 bool can_send_track() const { return track_ && ssrc_; } |
| 107 // Helper function to construct options for | 107 // Helper function to construct options for |
| 108 // AudioProviderInterface::SetAudioSend. | 108 // AudioProviderInterface::SetAudioSend. |
| 109 void SetAudioSend(); | 109 void SetAudioSend(); |
| 110 | 110 |
| 111 std::string id_; | 111 std::string id_; |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 156 | 156 |
| 157 std::string id() const override { return id_; } | 157 std::string id() const override { return id_; } |
| 158 | 158 |
| 159 void set_stream_id(const std::string& stream_id) override { | 159 void set_stream_id(const std::string& stream_id) override { |
| 160 stream_id_ = stream_id; | 160 stream_id_ = stream_id; |
| 161 } | 161 } |
| 162 std::string stream_id() const override { return stream_id_; } | 162 std::string stream_id() const override { return stream_id_; } |
| 163 | 163 |
| 164 void Stop() override; | 164 void Stop() override; |
| 165 | 165 |
| 166 RtpParameters GetParameters() const; | 166 RtpParameters GetParameters() const override; |
| 167 bool SetParameters(const RtpParameters& parameters); | 167 bool SetParameters(const RtpParameters& parameters) override; |
| 168 | 168 |
| 169 private: | 169 private: |
| 170 bool can_send_track() const { return track_ && ssrc_; } | 170 bool can_send_track() const { return track_ && ssrc_; } |
| 171 // Helper function to construct options for | 171 // Helper function to construct options for |
| 172 // VideoProviderInterface::SetVideoSend. | 172 // VideoProviderInterface::SetVideoSend. |
| 173 void SetVideoSend(); | 173 void SetVideoSend(); |
| 174 | 174 |
| 175 std::string id_; | 175 std::string id_; |
| 176 std::string stream_id_; | 176 std::string stream_id_; |
| 177 VideoProviderInterface* provider_; | 177 VideoProviderInterface* provider_; |
| 178 rtc::scoped_refptr<VideoTrackInterface> track_; | 178 rtc::scoped_refptr<VideoTrackInterface> track_; |
| 179 uint32_t ssrc_ = 0; | 179 uint32_t ssrc_ = 0; |
| 180 bool cached_track_enabled_ = false; | 180 bool cached_track_enabled_ = false; |
| 181 bool stopped_ = false; | 181 bool stopped_ = false; |
| 182 }; | 182 }; |
| 183 | 183 |
| 184 } // namespace webrtc | 184 } // namespace webrtc |
| 185 | 185 |
| 186 #endif // WEBRTC_API_RTPSENDER_H_ | 186 #endif // WEBRTC_API_RTPSENDER_H_ |
| OLD | NEW |