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