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

Side by Side Diff: webrtc/test/fake_encoder.h

Issue 2089773002: Add EncodedImageCallback::OnEncodedImage(). (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: . Created 4 years, 4 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
« no previous file with comments | « webrtc/modules/video_coding/video_sender_unittest.cc ('k') | webrtc/test/fake_encoder.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 int32_t Encoded(const EncodedImage& encodedImage, 64 Result OnEncodedImage(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_
OLDNEW
« no previous file with comments | « webrtc/modules/video_coding/video_sender_unittest.cc ('k') | webrtc/test/fake_encoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698