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

Unified Diff: webrtc/test/testsupport/jpeg_frame_writer.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, 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/test/testsupport/frame_writer.h ('k') | webrtc/test/testsupport/jpeg_frame_writer_ios.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/test/testsupport/jpeg_frame_writer.cc
diff --git a/webrtc/test/testsupport/jpeg_frame_writer.cc b/webrtc/test/testsupport/jpeg_frame_writer.cc
index 483a2e02c538121e524e6cdc709d582a2ba2346b..8174cc207c04ef1dfaac34c74cf2edbebf679102 100644
--- a/webrtc/test/testsupport/jpeg_frame_writer.cc
+++ b/webrtc/test/testsupport/jpeg_frame_writer.cc
@@ -35,7 +35,10 @@ JpegFrameWriter::JpegFrameWriter(const std::string &output_filename)
output_file_(nullptr) {}
bool JpegFrameWriter::WriteFrame(const VideoFrame& input_frame, int quality) {
- RTC_CHECK(!frame_written_) << "Only a single frame can be saved to Jpeg.";
+ if (frame_written_) {
+ LOG(LS_ERROR) << "Only a single frame can be saved to Jpeg.";
+ return false;
+ }
const int kColorPlanes = 3; // R, G and B.
size_t rgb_len = input_frame.height() * input_frame.width() * kColorPlanes;
std::unique_ptr<uint8_t[]> rgb_buf(new uint8_t[rgb_len]);
« no previous file with comments | « webrtc/test/testsupport/frame_writer.h ('k') | webrtc/test/testsupport/jpeg_frame_writer_ios.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698