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

Side by Side Diff: webrtc/video/replay.cc

Issue 3004603002: Update jpeg writer to compile on iOS and document it better (Closed)
Patch Set: Rename jpeg_frame_writer_dummy.cc to jpeg_frame_writer_ios.cc Created 3 years, 3 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/test/testsupport/jpeg_frame_writer_ios.cc ('k') | webrtc/video/video_quality_test.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) 2014 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2014 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 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 if (renderer_) 171 if (renderer_)
172 renderer_->OnFrame(video_frame); 172 renderer_->OnFrame(video_frame);
173 173
174 if (basename_.empty()) 174 if (basename_.empty())
175 return; 175 return;
176 176
177 std::stringstream filename; 177 std::stringstream filename;
178 filename << basename_ << count_++ << "_" << video_frame.timestamp() 178 filename << basename_ << count_++ << "_" << video_frame.timestamp()
179 << ".jpg"; 179 << ".jpg";
180 180
181 #if !defined(WEBRTC_IOS)
182 test::JpegFrameWriter frame_writer(filename.str()); 181 test::JpegFrameWriter frame_writer(filename.str());
183 RTC_CHECK(frame_writer.WriteFrame(video_frame, 100)); 182 RTC_CHECK(frame_writer.WriteFrame(video_frame, 100));
184 #endif
185 } 183 }
186 184
187 const std::string basename_; 185 const std::string basename_;
188 rtc::VideoSinkInterface<VideoFrame>* const renderer_; 186 rtc::VideoSinkInterface<VideoFrame>* const renderer_;
189 FILE* file_; 187 FILE* file_;
190 size_t count_; 188 size_t count_;
191 }; 189 };
192 190
193 class DecoderBitstreamFileWriter : public EncodedFrameObserver { 191 class DecoderBitstreamFileWriter : public EncodedFrameObserver {
194 public: 192 public:
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 } 328 }
331 } // namespace webrtc 329 } // namespace webrtc
332 330
333 int main(int argc, char* argv[]) { 331 int main(int argc, char* argv[]) {
334 ::testing::InitGoogleTest(&argc, argv); 332 ::testing::InitGoogleTest(&argc, argv);
335 google::ParseCommandLineFlags(&argc, &argv, true); 333 google::ParseCommandLineFlags(&argc, &argv, true);
336 334
337 webrtc::test::RunTest(webrtc::RtpReplay); 335 webrtc::test::RunTest(webrtc::RtpReplay);
338 return 0; 336 return 0;
339 } 337 }
OLDNEW
« no previous file with comments | « webrtc/test/testsupport/jpeg_frame_writer_ios.cc ('k') | webrtc/video/video_quality_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698