| 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 11 matching lines...) Expand all Loading... |
| 22 #include "webrtc/modules/video_coding/include/video_coding.h" | 22 #include "webrtc/modules/video_coding/include/video_coding.h" |
| 23 #include "webrtc/system_wrappers/include/event_wrapper.h" | 23 #include "webrtc/system_wrappers/include/event_wrapper.h" |
| 24 | 24 |
| 25 enum { kMaxNackListSize = 250 }; | 25 enum { kMaxNackListSize = 250 }; |
| 26 enum { kMaxPacketAgeToNack = 450 }; | 26 enum { kMaxPacketAgeToNack = 450 }; |
| 27 | 27 |
| 28 class NullEvent : public webrtc::EventWrapper { | 28 class NullEvent : public webrtc::EventWrapper { |
| 29 public: | 29 public: |
| 30 virtual ~NullEvent() {} | 30 virtual ~NullEvent() {} |
| 31 | 31 |
| 32 bool Set() override { return true; } | 32 virtual bool Set() { return true; } |
| 33 | 33 |
| 34 webrtc::EventTypeWrapper Wait(unsigned long max_time) override { // NOLINT | 34 virtual bool Reset() { return true; } |
| 35 |
| 36 virtual webrtc::EventTypeWrapper Wait(unsigned long max_time) { // NOLINT |
| 35 return webrtc::kEventTimeout; | 37 return webrtc::kEventTimeout; |
| 36 } | 38 } |
| 39 |
| 40 virtual bool StartTimer(bool periodic, unsigned long time) { // NOLINT |
| 41 return true; |
| 42 } |
| 43 |
| 44 virtual bool StopTimer() { return true; } |
| 37 }; | 45 }; |
| 38 | 46 |
| 39 class NullEventFactory : public webrtc::EventFactory { | 47 class NullEventFactory : public webrtc::EventFactory { |
| 40 public: | 48 public: |
| 41 virtual ~NullEventFactory() {} | 49 virtual ~NullEventFactory() {} |
| 42 | 50 |
| 43 webrtc::EventWrapper* CreateEvent() override { return new NullEvent; } | 51 virtual webrtc::EventWrapper* CreateEvent() { return new NullEvent; } |
| 44 }; | 52 }; |
| 45 | 53 |
| 46 class FileOutputFrameReceiver : public webrtc::VCMReceiveCallback { | 54 class FileOutputFrameReceiver : public webrtc::VCMReceiveCallback { |
| 47 public: | 55 public: |
| 48 FileOutputFrameReceiver(const std::string& base_out_filename, uint32_t ssrc); | 56 FileOutputFrameReceiver(const std::string& base_out_filename, uint32_t ssrc); |
| 49 virtual ~FileOutputFrameReceiver(); | 57 virtual ~FileOutputFrameReceiver(); |
| 50 | 58 |
| 51 // VCMReceiveCallback | 59 // VCMReceiveCallback |
| 52 int32_t FrameToRender(webrtc::VideoFrame& video_frame, | 60 virtual int32_t FrameToRender(webrtc::VideoFrame& video_frame); // NOLINT |
| 53 rtc::Optional<uint8_t> qp) override; | |
| 54 | 61 |
| 55 private: | 62 private: |
| 56 std::string out_filename_; | 63 std::string out_filename_; |
| 57 FILE* out_file_; | 64 FILE* out_file_; |
| 58 FILE* timing_file_; | 65 FILE* timing_file_; |
| 59 int width_; | 66 int width_; |
| 60 int height_; | 67 int height_; |
| 61 int count_; | 68 int count_; |
| 62 | 69 |
| 63 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(FileOutputFrameReceiver); | 70 RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(FileOutputFrameReceiver); |
| 64 }; | 71 }; |
| 65 | 72 |
| 66 class CmdArgs { | 73 class CmdArgs { |
| 67 public: | 74 public: |
| 68 CmdArgs(); | 75 CmdArgs(); |
| 69 | 76 |
| 70 std::string codecName; | 77 std::string codecName; |
| 71 webrtc::VideoCodecType codecType; | 78 webrtc::VideoCodecType codecType; |
| 72 int width; | 79 int width; |
| 73 int height; | 80 int height; |
| 74 int rtt; | 81 int rtt; |
| 75 std::string inputFile; | 82 std::string inputFile; |
| 76 std::string outputFile; | 83 std::string outputFile; |
| 77 }; | 84 }; |
| 78 | 85 |
| 79 #endif // WEBRTC_MODULES_VIDEO_CODING_TEST_TEST_UTIL_H_ | 86 #endif // WEBRTC_MODULES_VIDEO_CODING_TEST_TEST_UTIL_H_ |
| OLD | NEW |