Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1100)

Side by Side Diff: webrtc/modules/video_coding/video_coding_impl.h

Issue 2575473004: Create VideoReceiver with external VCMTiming object. (Closed)
Patch Set: Feedback Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 std::vector<FrameType> next_frame_types_ GUARDED_BY(params_crit_); 141 std::vector<FrameType> next_frame_types_ GUARDED_BY(params_crit_);
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 VCMTiming* timing,
151 NackSender* nack_sender = nullptr, 152 NackSender* nack_sender = nullptr,
152 KeyFrameRequestSender* keyframe_request_sender = nullptr); 153 KeyFrameRequestSender* keyframe_request_sender = nullptr);
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);
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 VCMTiming* _timing;
212 VCMReceiver _receiver; 213 VCMReceiver _receiver;
213 VCMDecodedFrameCallback _decodedFrameCallback; 214 VCMDecodedFrameCallback _decodedFrameCallback;
214 VCMFrameTypeCallback* _frameTypeCallback GUARDED_BY(process_crit_); 215 VCMFrameTypeCallback* _frameTypeCallback GUARDED_BY(process_crit_);
215 VCMReceiveStatisticsCallback* _receiveStatsCallback GUARDED_BY(process_crit_); 216 VCMReceiveStatisticsCallback* _receiveStatsCallback GUARDED_BY(process_crit_);
216 VCMDecoderTimingCallback* _decoderTimingCallback GUARDED_BY(process_crit_); 217 VCMDecoderTimingCallback* _decoderTimingCallback GUARDED_BY(process_crit_);
217 VCMPacketRequestCallback* _packetRequestCallback GUARDED_BY(process_crit_); 218 VCMPacketRequestCallback* _packetRequestCallback GUARDED_BY(process_crit_);
218 VCMGenericDecoder* _decoder; 219 VCMGenericDecoder* _decoder;
219 220
220 VCMFrameBuffer _frameFromFile; 221 VCMFrameBuffer _frameFromFile;
221 bool _scheduleKeyRequest GUARDED_BY(process_crit_); 222 bool _scheduleKeyRequest GUARDED_BY(process_crit_);
222 bool drop_frames_until_keyframe_ GUARDED_BY(process_crit_); 223 bool drop_frames_until_keyframe_ GUARDED_BY(process_crit_);
223 size_t max_nack_list_size_ GUARDED_BY(process_crit_); 224 size_t max_nack_list_size_ GUARDED_BY(process_crit_);
224 225
225 VCMCodecDataBase _codecDataBase GUARDED_BY(receive_crit_); 226 VCMCodecDataBase _codecDataBase GUARDED_BY(receive_crit_);
226 EncodedImageCallback* pre_decode_image_callback_; 227 EncodedImageCallback* pre_decode_image_callback_;
227 228
228 VCMProcessTimer _receiveStatsTimer; 229 VCMProcessTimer _receiveStatsTimer;
229 VCMProcessTimer _retransmissionTimer; 230 VCMProcessTimer _retransmissionTimer;
230 VCMProcessTimer _keyRequestTimer; 231 VCMProcessTimer _keyRequestTimer;
231 QpParser qp_parser_; 232 QpParser qp_parser_;
232 ThreadUnsafeOneTimeEvent first_frame_received_; 233 ThreadUnsafeOneTimeEvent first_frame_received_;
233 }; 234 };
234 235
235 } // namespace vcm 236 } // namespace vcm
236 } // namespace webrtc 237 } // namespace webrtc
237 #endif // WEBRTC_MODULES_VIDEO_CODING_VIDEO_CODING_IMPL_H_ 238 #endif // WEBRTC_MODULES_VIDEO_CODING_VIDEO_CODING_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698