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

Side by Side Diff: webrtc/modules/video_coding/codecs/test/videoprocessor.h

Issue 2695653002: Add support for creating HW codecs in VideoProcessor tests. (Closed)
Patch Set: Don't forget the mac! Created 3 years, 10 months 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 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
198 public: 198 public:
199 explicit VideoProcessorDecodeCompleteCallback(VideoProcessorImpl* vp) 199 explicit VideoProcessorDecodeCompleteCallback(VideoProcessorImpl* vp)
200 : video_processor_(vp) {} 200 : video_processor_(vp) {}
201 int32_t Decoded(webrtc::VideoFrame& image) override { 201 int32_t Decoded(webrtc::VideoFrame& image) override {
202 // Forward to parent class. 202 // Forward to parent class.
203 video_processor_->FrameDecoded(image); 203 video_processor_->FrameDecoded(image);
204 return 0; 204 return 0;
205 } 205 }
206 int32_t Decoded(webrtc::VideoFrame& image, 206 int32_t Decoded(webrtc::VideoFrame& image,
207 int64_t decode_time_ms) override { 207 int64_t decode_time_ms) override {
208 RTC_NOTREACHED(); 208 return Decoded(image);
209 return -1;
210 } 209 }
211 void Decoded(VideoFrame& frame, 210 void Decoded(webrtc::VideoFrame& image,
212 rtc::Optional<int32_t> decode_time_ms, 211 rtc::Optional<int32_t> decode_time_ms,
213 rtc::Optional<uint8_t> qp) override { 212 rtc::Optional<uint8_t> qp) override {
214 RTC_NOTREACHED(); 213 Decoded(image,
214 decode_time_ms ? static_cast<int32_t>(*decode_time_ms) : -1);
215 } 215 }
216 216
217 private: 217 private:
218 VideoProcessorImpl* const video_processor_; 218 VideoProcessorImpl* const video_processor_;
219 }; 219 };
220 220
221 // Invoked by the callback when a frame has completed encoding. 221 // Invoked by the callback when a frame has completed encoding.
222 void FrameEncoded(webrtc::VideoCodecType codec, 222 void FrameEncoded(webrtc::VideoCodecType codec,
223 const webrtc::EncodedImage& encodedImage, 223 const webrtc::EncodedImage& encodedImage,
224 const webrtc::RTPFragmentationHeader* fragmentation); 224 const webrtc::RTPFragmentationHeader* fragmentation);
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 // Statistics. 277 // Statistics.
278 double bit_rate_factor_; // Multiply frame length with this to get bit rate. 278 double bit_rate_factor_; // Multiply frame length with this to get bit rate.
279 int64_t encode_start_ns_; 279 int64_t encode_start_ns_;
280 int64_t decode_start_ns_; 280 int64_t decode_start_ns_;
281 }; 281 };
282 282
283 } // namespace test 283 } // namespace test
284 } // namespace webrtc 284 } // namespace webrtc
285 285
286 #endif // WEBRTC_MODULES_VIDEO_CODING_CODECS_TEST_VIDEOPROCESSOR_H_ 286 #endif // WEBRTC_MODULES_VIDEO_CODING_CODECS_TEST_VIDEOPROCESSOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698