OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2013 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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 }; | 54 }; |
55 | 55 |
56 class FakeH264Encoder : public FakeEncoder, public EncodedImageCallback { | 56 class FakeH264Encoder : public FakeEncoder, public EncodedImageCallback { |
57 public: | 57 public: |
58 explicit FakeH264Encoder(Clock* clock); | 58 explicit FakeH264Encoder(Clock* clock); |
59 virtual ~FakeH264Encoder() {} | 59 virtual ~FakeH264Encoder() {} |
60 | 60 |
61 int32_t RegisterEncodeCompleteCallback( | 61 int32_t RegisterEncodeCompleteCallback( |
62 EncodedImageCallback* callback) override; | 62 EncodedImageCallback* callback) override; |
63 | 63 |
64 Result OnEncodedImage(const EncodedImage& encodedImage, | 64 int32_t Encoded(const EncodedImage& encodedImage, |
65 const CodecSpecificInfo* codecSpecificInfo, | 65 const CodecSpecificInfo* codecSpecificInfo, |
66 const RTPFragmentationHeader* fragments) override; | 66 const RTPFragmentationHeader* fragments) override; |
67 | 67 |
68 private: | 68 private: |
69 EncodedImageCallback* callback_; | 69 EncodedImageCallback* callback_; |
70 int idr_counter_; | 70 int idr_counter_; |
71 }; | 71 }; |
72 | 72 |
73 class DelayedEncoder : public test::FakeEncoder { | 73 class DelayedEncoder : public test::FakeEncoder { |
74 public: | 74 public: |
75 DelayedEncoder(Clock* clock, int delay_ms); | 75 DelayedEncoder(Clock* clock, int delay_ms); |
76 virtual ~DelayedEncoder() {} | 76 virtual ~DelayedEncoder() {} |
77 | 77 |
78 int32_t Encode(const VideoFrame& input_image, | 78 int32_t Encode(const VideoFrame& input_image, |
79 const CodecSpecificInfo* codec_specific_info, | 79 const CodecSpecificInfo* codec_specific_info, |
80 const std::vector<FrameType>* frame_types) override; | 80 const std::vector<FrameType>* frame_types) override; |
81 | 81 |
82 private: | 82 private: |
83 const int delay_ms_; | 83 const int delay_ms_; |
84 }; | 84 }; |
85 } // namespace test | 85 } // namespace test |
86 } // namespace webrtc | 86 } // namespace webrtc |
87 | 87 |
88 #endif // WEBRTC_TEST_FAKE_ENCODER_H_ | 88 #endif // WEBRTC_TEST_FAKE_ENCODER_H_ |
OLD | NEW |