| 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 |
| 11 // This file contains classes that implement RtpSenderInterface. | 11 // This file contains classes that implement RtpSenderInterface. |
| 12 // An RtpSender associates a MediaStreamTrackInterface with an underlying | 12 // An RtpSender associates a MediaStreamTrackInterface with an underlying |
| 13 // transport (provided by AudioProviderInterface/VideoProviderInterface) | 13 // transport (provided by AudioProviderInterface/VideoProviderInterface) |
| 14 | 14 |
| 15 #ifndef WEBRTC_API_RTPSENDER_H_ | 15 #ifndef WEBRTC_API_RTPSENDER_H_ |
| 16 #define WEBRTC_API_RTPSENDER_H_ | 16 #define WEBRTC_API_RTPSENDER_H_ |
| 17 | 17 |
| 18 #include <memory> |
| 18 #include <string> | 19 #include <string> |
| 19 | 20 |
| 20 #include "webrtc/api/mediastreamprovider.h" | 21 #include "webrtc/api/mediastreamprovider.h" |
| 21 #include "webrtc/api/rtpsenderinterface.h" | 22 #include "webrtc/api/rtpsenderinterface.h" |
| 22 #include "webrtc/api/statscollector.h" | 23 #include "webrtc/api/statscollector.h" |
| 23 #include "webrtc/base/basictypes.h" | 24 #include "webrtc/base/basictypes.h" |
| 24 #include "webrtc/base/criticalsection.h" | 25 #include "webrtc/base/criticalsection.h" |
| 25 #include "webrtc/base/scoped_ptr.h" | 26 #include "webrtc/base/scoped_ptr.h" |
| 26 #include "webrtc/media/base/audiosource.h" | 27 #include "webrtc/media/base/audiosource.h" |
| 27 | 28 |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 std::string stream_id_; | 113 std::string stream_id_; |
| 113 AudioProviderInterface* provider_; | 114 AudioProviderInterface* provider_; |
| 114 StatsCollector* stats_; | 115 StatsCollector* stats_; |
| 115 rtc::scoped_refptr<AudioTrackInterface> track_; | 116 rtc::scoped_refptr<AudioTrackInterface> track_; |
| 116 uint32_t ssrc_ = 0; | 117 uint32_t ssrc_ = 0; |
| 117 bool cached_track_enabled_ = false; | 118 bool cached_track_enabled_ = false; |
| 118 bool stopped_ = false; | 119 bool stopped_ = false; |
| 119 | 120 |
| 120 // Used to pass the data callback from the |track_| to the other end of | 121 // Used to pass the data callback from the |track_| to the other end of |
| 121 // cricket::AudioSource. | 122 // cricket::AudioSource. |
| 122 rtc::scoped_ptr<LocalAudioSinkAdapter> sink_adapter_; | 123 std::unique_ptr<LocalAudioSinkAdapter> sink_adapter_; |
| 123 }; | 124 }; |
| 124 | 125 |
| 125 class VideoRtpSender : public ObserverInterface, | 126 class VideoRtpSender : public ObserverInterface, |
| 126 public rtc::RefCountedObject<RtpSenderInterface> { | 127 public rtc::RefCountedObject<RtpSenderInterface> { |
| 127 public: | 128 public: |
| 128 VideoRtpSender(VideoTrackInterface* track, | 129 VideoRtpSender(VideoTrackInterface* track, |
| 129 const std::string& stream_id, | 130 const std::string& stream_id, |
| 130 VideoProviderInterface* provider); | 131 VideoProviderInterface* provider); |
| 131 | 132 |
| 132 // Randomly generates stream_id. | 133 // Randomly generates stream_id. |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 VideoProviderInterface* provider_; | 178 VideoProviderInterface* provider_; |
| 178 rtc::scoped_refptr<VideoTrackInterface> track_; | 179 rtc::scoped_refptr<VideoTrackInterface> track_; |
| 179 uint32_t ssrc_ = 0; | 180 uint32_t ssrc_ = 0; |
| 180 bool cached_track_enabled_ = false; | 181 bool cached_track_enabled_ = false; |
| 181 bool stopped_ = false; | 182 bool stopped_ = false; |
| 182 }; | 183 }; |
| 183 | 184 |
| 184 } // namespace webrtc | 185 } // namespace webrtc |
| 185 | 186 |
| 186 #endif // WEBRTC_API_RTPSENDER_H_ | 187 #endif // WEBRTC_API_RTPSENDER_H_ |
| OLD | NEW |