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

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

Issue 2337453002: H.264 packetization mode 0 (try 2) (Closed)
Patch Set: Addressed hbos comments Created 4 years, 1 month 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) 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 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 if (fragment_counter == fragmentation.fragmentationVectorSize || 190 if (fragment_counter == fragmentation.fragmentationVectorSize ||
191 i != fragmentation.fragmentationOffset[fragment_counter]) { 191 i != fragmentation.fragmentationOffset[fragment_counter]) {
192 encoded_image._buffer[i] = value++; 192 encoded_image._buffer[i] = value++;
193 } else { 193 } else {
194 ++fragment_counter; 194 ++fragment_counter;
195 } 195 }
196 } 196 }
197 CodecSpecificInfo specifics; 197 CodecSpecificInfo specifics;
198 memset(&specifics, 0, sizeof(specifics)); 198 memset(&specifics, 0, sizeof(specifics));
199 specifics.codecType = kVideoCodecH264; 199 specifics.codecType = kVideoCodecH264;
200 specifics.codecType = kVideoCodecH264;
hbos 2016/10/31 16:27:15 nit: Same line twice here.
201 specifics.codecSpecific.H264.packetization_mode = kH264PacketizationMode1;
200 return callback_->OnEncodedImage(encoded_image, &specifics, &fragmentation); 202 return callback_->OnEncodedImage(encoded_image, &specifics, &fragmentation);
201 } 203 }
202 204
203 DelayedEncoder::DelayedEncoder(Clock* clock, int delay_ms) 205 DelayedEncoder::DelayedEncoder(Clock* clock, int delay_ms)
204 : test::FakeEncoder(clock), 206 : test::FakeEncoder(clock),
205 delay_ms_(delay_ms) {} 207 delay_ms_(delay_ms) {}
206 208
207 int32_t DelayedEncoder::Encode(const VideoFrame& input_image, 209 int32_t DelayedEncoder::Encode(const VideoFrame& input_image,
208 const CodecSpecificInfo* codec_specific_info, 210 const CodecSpecificInfo* codec_specific_info,
209 const std::vector<FrameType>* frame_types) { 211 const std::vector<FrameType>* frame_types) {
210 SleepMs(delay_ms_); 212 SleepMs(delay_ms_);
211 return FakeEncoder::Encode(input_image, codec_specific_info, frame_types); 213 return FakeEncoder::Encode(input_image, codec_specific_info, frame_types);
212 } 214 }
213 } // namespace test 215 } // namespace test
214 } // namespace webrtc 216 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698