OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 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 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
142 }; | 142 }; |
143 | 143 |
144 class VideoReceiver : public Module { | 144 class VideoReceiver : public Module { |
145 public: | 145 public: |
146 typedef VideoCodingModule::ReceiverRobustness ReceiverRobustness; | 146 typedef VideoCodingModule::ReceiverRobustness ReceiverRobustness; |
147 | 147 |
148 VideoReceiver(Clock* clock, | 148 VideoReceiver(Clock* clock, |
149 EventFactory* event_factory, | 149 EventFactory* event_factory, |
150 EncodedImageCallback* pre_decode_image_callback, | 150 EncodedImageCallback* pre_decode_image_callback, |
151 NackSender* nack_sender = nullptr, | 151 NackSender* nack_sender = nullptr, |
152 KeyFrameRequestSender* keyframe_request_sender = nullptr); | 152 KeyFrameRequestSender* keyframe_request_sender = nullptr, |
153 VCMTiming* timing = nullptr); | |
stefan-webrtc
2016/12/14 13:00:32
Make this required instead.
philipel
2016/12/14 13:21:21
Done.
| |
153 ~VideoReceiver(); | 154 ~VideoReceiver(); |
154 | 155 |
155 int32_t RegisterReceiveCodec(const VideoCodec* receiveCodec, | 156 int32_t RegisterReceiveCodec(const VideoCodec* receiveCodec, |
156 int32_t numberOfCores, | 157 int32_t numberOfCores, |
157 bool requireKeyFrame); | 158 bool requireKeyFrame); |
158 | 159 |
159 void RegisterExternalDecoder(VideoDecoder* externalDecoder, | 160 void RegisterExternalDecoder(VideoDecoder* externalDecoder, |
160 uint8_t payloadType); | 161 uint8_t payloadType); |
161 int32_t RegisterReceiveCallback(VCMReceiveCallback* receiveCallback); | 162 int32_t RegisterReceiveCallback(VCMReceiveCallback* receiveCallback); |
162 int32_t RegisterReceiveStatisticsCallback( | 163 int32_t RegisterReceiveStatisticsCallback( |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
201 protected: | 202 protected: |
202 int32_t Decode(const webrtc::VCMEncodedFrame& frame) | 203 int32_t Decode(const webrtc::VCMEncodedFrame& frame) |
203 EXCLUSIVE_LOCKS_REQUIRED(receive_crit_); | 204 EXCLUSIVE_LOCKS_REQUIRED(receive_crit_); |
204 int32_t RequestKeyFrame(); | 205 int32_t RequestKeyFrame(); |
205 int32_t RequestSliceLossIndication(const uint64_t pictureID) const; | 206 int32_t RequestSliceLossIndication(const uint64_t pictureID) const; |
206 | 207 |
207 private: | 208 private: |
208 Clock* const clock_; | 209 Clock* const clock_; |
209 rtc::CriticalSection process_crit_; | 210 rtc::CriticalSection process_crit_; |
210 rtc::CriticalSection receive_crit_; | 211 rtc::CriticalSection receive_crit_; |
211 VCMTiming _timing; | 212 bool _ownsTiming; |
213 VCMTiming* _timing; | |
212 VCMReceiver _receiver; | 214 VCMReceiver _receiver; |
213 VCMDecodedFrameCallback _decodedFrameCallback; | 215 VCMDecodedFrameCallback _decodedFrameCallback; |
214 VCMFrameTypeCallback* _frameTypeCallback GUARDED_BY(process_crit_); | 216 VCMFrameTypeCallback* _frameTypeCallback GUARDED_BY(process_crit_); |
215 VCMReceiveStatisticsCallback* _receiveStatsCallback GUARDED_BY(process_crit_); | 217 VCMReceiveStatisticsCallback* _receiveStatsCallback GUARDED_BY(process_crit_); |
216 VCMDecoderTimingCallback* _decoderTimingCallback GUARDED_BY(process_crit_); | 218 VCMDecoderTimingCallback* _decoderTimingCallback GUARDED_BY(process_crit_); |
217 VCMPacketRequestCallback* _packetRequestCallback GUARDED_BY(process_crit_); | 219 VCMPacketRequestCallback* _packetRequestCallback GUARDED_BY(process_crit_); |
218 VCMGenericDecoder* _decoder; | 220 VCMGenericDecoder* _decoder; |
219 | 221 |
220 VCMFrameBuffer _frameFromFile; | 222 VCMFrameBuffer _frameFromFile; |
221 bool _scheduleKeyRequest GUARDED_BY(process_crit_); | 223 bool _scheduleKeyRequest GUARDED_BY(process_crit_); |
222 bool drop_frames_until_keyframe_ GUARDED_BY(process_crit_); | 224 bool drop_frames_until_keyframe_ GUARDED_BY(process_crit_); |
223 size_t max_nack_list_size_ GUARDED_BY(process_crit_); | 225 size_t max_nack_list_size_ GUARDED_BY(process_crit_); |
224 | 226 |
225 VCMCodecDataBase _codecDataBase GUARDED_BY(receive_crit_); | 227 VCMCodecDataBase _codecDataBase GUARDED_BY(receive_crit_); |
226 EncodedImageCallback* pre_decode_image_callback_; | 228 EncodedImageCallback* pre_decode_image_callback_; |
227 | 229 |
228 VCMProcessTimer _receiveStatsTimer; | 230 VCMProcessTimer _receiveStatsTimer; |
229 VCMProcessTimer _retransmissionTimer; | 231 VCMProcessTimer _retransmissionTimer; |
230 VCMProcessTimer _keyRequestTimer; | 232 VCMProcessTimer _keyRequestTimer; |
231 QpParser qp_parser_; | 233 QpParser qp_parser_; |
232 ThreadUnsafeOneTimeEvent first_frame_received_; | 234 ThreadUnsafeOneTimeEvent first_frame_received_; |
233 }; | 235 }; |
234 | 236 |
235 } // namespace vcm | 237 } // namespace vcm |
236 } // namespace webrtc | 238 } // namespace webrtc |
237 #endif // WEBRTC_MODULES_VIDEO_CODING_VIDEO_CODING_IMPL_H_ | 239 #endif // WEBRTC_MODULES_VIDEO_CODING_VIDEO_CODING_IMPL_H_ |
OLD | NEW |