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 23 matching lines...) Expand all Loading... |
34 class RtpReceiverInternal : public RtpReceiverInterface { | 34 class RtpReceiverInternal : public RtpReceiverInterface { |
35 public: | 35 public: |
36 virtual void Stop() = 0; | 36 virtual void Stop() = 0; |
37 // This SSRC is used as an identifier for the receiver between the API layer | 37 // This SSRC is used as an identifier for the receiver between the API layer |
38 // and the WebRtcVideoEngine, WebRtcVoiceEngine layer. | 38 // and the WebRtcVideoEngine, WebRtcVoiceEngine layer. |
39 virtual uint32_t ssrc() const = 0; | 39 virtual uint32_t ssrc() const = 0; |
40 }; | 40 }; |
41 | 41 |
42 class AudioRtpReceiver : public ObserverInterface, | 42 class AudioRtpReceiver : public ObserverInterface, |
43 public AudioSourceInterface::AudioObserver, | 43 public AudioSourceInterface::AudioObserver, |
44 public rtc::RefCountedObject<RtpReceiverInternal>, | 44 public RtpReceiverInternal, |
45 public sigslot::has_slots<> { | 45 public sigslot::has_slots<> { |
46 public: | 46 public: |
47 // An SSRC of 0 will create a receiver that will match the first SSRC it | 47 // An SSRC of 0 will create a receiver that will match the first SSRC it |
48 // sees. | 48 // sees. |
49 // TODO(deadbeef): Use rtc::Optional, or have another constructor that | 49 // TODO(deadbeef): Use rtc::Optional, or have another constructor that |
50 // doesn't take an SSRC, and make this one DCHECK(ssrc != 0). | 50 // doesn't take an SSRC, and make this one DCHECK(ssrc != 0). |
51 AudioRtpReceiver(const std::string& track_id, | 51 AudioRtpReceiver(const std::string& track_id, |
52 uint32_t ssrc, | 52 uint32_t ssrc, |
53 cricket::VoiceChannel* channel); | 53 cricket::VoiceChannel* channel); |
54 | 54 |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 const uint32_t ssrc_; | 98 const uint32_t ssrc_; |
99 cricket::VoiceChannel* channel_; | 99 cricket::VoiceChannel* channel_; |
100 const rtc::scoped_refptr<AudioTrackInterface> track_; | 100 const rtc::scoped_refptr<AudioTrackInterface> track_; |
101 bool cached_track_enabled_; | 101 bool cached_track_enabled_; |
102 double cached_volume_ = 1; | 102 double cached_volume_ = 1; |
103 bool stopped_ = false; | 103 bool stopped_ = false; |
104 RtpReceiverObserverInterface* observer_ = nullptr; | 104 RtpReceiverObserverInterface* observer_ = nullptr; |
105 bool received_first_packet_ = false; | 105 bool received_first_packet_ = false; |
106 }; | 106 }; |
107 | 107 |
108 class VideoRtpReceiver : public rtc::RefCountedObject<RtpReceiverInternal>, | 108 class VideoRtpReceiver : public RtpReceiverInternal, |
109 public sigslot::has_slots<> { | 109 public sigslot::has_slots<> { |
110 public: | 110 public: |
111 // An SSRC of 0 will create a receiver that will match the first SSRC it | 111 // An SSRC of 0 will create a receiver that will match the first SSRC it |
112 // sees. | 112 // sees. |
113 VideoRtpReceiver(const std::string& track_id, | 113 VideoRtpReceiver(const std::string& track_id, |
114 rtc::Thread* worker_thread, | 114 rtc::Thread* worker_thread, |
115 uint32_t ssrc, | 115 uint32_t ssrc, |
116 cricket::VideoChannel* channel); | 116 cricket::VideoChannel* channel); |
117 | 117 |
118 virtual ~VideoRtpReceiver(); | 118 virtual ~VideoRtpReceiver(); |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 rtc::scoped_refptr<VideoTrackSource> source_; | 160 rtc::scoped_refptr<VideoTrackSource> source_; |
161 rtc::scoped_refptr<VideoTrackInterface> track_; | 161 rtc::scoped_refptr<VideoTrackInterface> track_; |
162 bool stopped_ = false; | 162 bool stopped_ = false; |
163 RtpReceiverObserverInterface* observer_ = nullptr; | 163 RtpReceiverObserverInterface* observer_ = nullptr; |
164 bool received_first_packet_ = false; | 164 bool received_first_packet_ = false; |
165 }; | 165 }; |
166 | 166 |
167 } // namespace webrtc | 167 } // namespace webrtc |
168 | 168 |
169 #endif // PC_RTPRECEIVER_H_ | 169 #endif // PC_RTPRECEIVER_H_ |
OLD | NEW |