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 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 // cricket::AudioSource implementation. | 70 // cricket::AudioSource implementation. |
71 void SetSink(cricket::AudioSource::Sink* sink) override; | 71 void SetSink(cricket::AudioSource::Sink* sink) override; |
72 | 72 |
73 cricket::AudioSource::Sink* sink_; | 73 cricket::AudioSource::Sink* sink_; |
74 // Critical section protecting |sink_|. | 74 // Critical section protecting |sink_|. |
75 rtc::CriticalSection lock_; | 75 rtc::CriticalSection lock_; |
76 }; | 76 }; |
77 | 77 |
78 class AudioRtpSender : public DtmfProviderInterface, | 78 class AudioRtpSender : public DtmfProviderInterface, |
79 public ObserverInterface, | 79 public ObserverInterface, |
80 public rtc::RefCountedObject<RtpSenderInternal> { | 80 public RtpSenderInternal { |
81 public: | 81 public: |
82 // StatsCollector provided so that Add/RemoveLocalAudioTrack can be called | 82 // StatsCollector provided so that Add/RemoveLocalAudioTrack can be called |
83 // at the appropriate times. | 83 // at the appropriate times. |
84 // |channel| can be null if one does not exist yet. | 84 // |channel| can be null if one does not exist yet. |
85 AudioRtpSender(AudioTrackInterface* track, | 85 AudioRtpSender(AudioTrackInterface* track, |
86 const std::vector<std::string>& stream_id, | 86 const std::vector<std::string>& stream_id, |
87 cricket::VoiceChannel* channel, | 87 cricket::VoiceChannel* channel, |
88 StatsCollector* stats); | 88 StatsCollector* stats); |
89 | 89 |
90 // Randomly generates stream_id. | 90 // Randomly generates stream_id. |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 rtc::scoped_refptr<DtmfSenderInterface> dtmf_sender_proxy_; | 169 rtc::scoped_refptr<DtmfSenderInterface> dtmf_sender_proxy_; |
170 uint32_t ssrc_ = 0; | 170 uint32_t ssrc_ = 0; |
171 bool cached_track_enabled_ = false; | 171 bool cached_track_enabled_ = false; |
172 bool stopped_ = false; | 172 bool stopped_ = false; |
173 | 173 |
174 // Used to pass the data callback from the |track_| to the other end of | 174 // Used to pass the data callback from the |track_| to the other end of |
175 // cricket::AudioSource. | 175 // cricket::AudioSource. |
176 std::unique_ptr<LocalAudioSinkAdapter> sink_adapter_; | 176 std::unique_ptr<LocalAudioSinkAdapter> sink_adapter_; |
177 }; | 177 }; |
178 | 178 |
179 class VideoRtpSender : public ObserverInterface, | 179 class VideoRtpSender : public ObserverInterface, public RtpSenderInternal { |
180 public rtc::RefCountedObject<RtpSenderInternal> { | |
181 public: | 180 public: |
182 // |channel| can be null if one does not exist yet. | 181 // |channel| can be null if one does not exist yet. |
183 VideoRtpSender(VideoTrackInterface* track, | 182 VideoRtpSender(VideoTrackInterface* track, |
184 const std::vector<std::string>& stream_id, | 183 const std::vector<std::string>& stream_id, |
185 cricket::VideoChannel* channel); | 184 cricket::VideoChannel* channel); |
186 | 185 |
187 // Randomly generates stream_id. | 186 // Randomly generates stream_id. |
188 // |channel| can be null if one does not exist yet. | 187 // |channel| can be null if one does not exist yet. |
189 VideoRtpSender(VideoTrackInterface* track, cricket::VideoChannel* channel); | 188 VideoRtpSender(VideoTrackInterface* track, cricket::VideoChannel* channel); |
190 | 189 |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
252 uint32_t ssrc_ = 0; | 251 uint32_t ssrc_ = 0; |
253 bool cached_track_enabled_ = false; | 252 bool cached_track_enabled_ = false; |
254 VideoTrackInterface::ContentHint cached_track_content_hint_ = | 253 VideoTrackInterface::ContentHint cached_track_content_hint_ = |
255 VideoTrackInterface::ContentHint::kNone; | 254 VideoTrackInterface::ContentHint::kNone; |
256 bool stopped_ = false; | 255 bool stopped_ = false; |
257 }; | 256 }; |
258 | 257 |
259 } // namespace webrtc | 258 } // namespace webrtc |
260 | 259 |
261 #endif // PC_RTPSENDER_H_ | 260 #endif // PC_RTPSENDER_H_ |
OLD | NEW |