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

Unified Diff: webrtc/test/testsupport/frame_writer.h

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/BUILD.gn ('k') | webrtc/test/testsupport/jpeg_frame_writer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/test/testsupport/frame_writer.h
diff --git a/webrtc/test/testsupport/frame_writer.h b/webrtc/test/testsupport/frame_writer.h
index 148f23338cec42223b015e9c165a9aca5be293d1..faab50edcf560fac7361d9c64afcdc3e8e9698c8 100644
--- a/webrtc/test/testsupport/frame_writer.h
+++ b/webrtc/test/testsupport/frame_writer.h
@@ -83,19 +83,21 @@ class Y4mFrameWriterImpl : public YuvFrameWriterImpl {
const int frame_rate_;
};
-// LibJpeg is not available on iOS
-#if !defined(is_ios)
+// LibJpeg is not available on iOS. This class will do nothing on iOS.
class JpegFrameWriter {
public:
JpegFrameWriter(const std::string &output_filename);
+ // Quality can be from 0 (worst) to 100 (best). Best quality is still lossy.
+ // WriteFrame can be called only once. Subsequent calls will fail.
bool WriteFrame(const VideoFrame& input_frame, int quality);
+#if !defined(WEBRTC_IOS)
private:
bool frame_written_;
const std::string output_filename_;
FILE* output_file_;
-};
#endif
+};
} // namespace test
} // namespace webrtc
« no previous file with comments | « webrtc/test/BUILD.gn ('k') | webrtc/test/testsupport/jpeg_frame_writer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698