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

Side by Side 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, 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/BUILD.gn ('k') | webrtc/test/testsupport/jpeg_frame_writer.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) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 int height, 76 int height,
77 int frame_rate); 77 int frame_rate);
78 ~Y4mFrameWriterImpl() override; 78 ~Y4mFrameWriterImpl() override;
79 bool Init() override; 79 bool Init() override;
80 bool WriteFrame(uint8_t* frame_buffer) override; 80 bool WriteFrame(uint8_t* frame_buffer) override;
81 81
82 private: 82 private:
83 const int frame_rate_; 83 const int frame_rate_;
84 }; 84 };
85 85
86 // LibJpeg is not available on iOS 86 // LibJpeg is not available on iOS. This class will do nothing on iOS.
87 #if !defined(is_ios)
88 class JpegFrameWriter { 87 class JpegFrameWriter {
89 public: 88 public:
90 JpegFrameWriter(const std::string &output_filename); 89 JpegFrameWriter(const std::string &output_filename);
90 // Quality can be from 0 (worst) to 100 (best). Best quality is still lossy.
91 // WriteFrame can be called only once. Subsequent calls will fail.
91 bool WriteFrame(const VideoFrame& input_frame, int quality); 92 bool WriteFrame(const VideoFrame& input_frame, int quality);
92 93
94 #if !defined(WEBRTC_IOS)
93 private: 95 private:
94 bool frame_written_; 96 bool frame_written_;
95 const std::string output_filename_; 97 const std::string output_filename_;
96 FILE* output_file_; 98 FILE* output_file_;
99 #endif
97 }; 100 };
98 #endif
99 101
100 } // namespace test 102 } // namespace test
101 } // namespace webrtc 103 } // namespace webrtc
102 104
103 #endif // WEBRTC_TEST_TESTSUPPORT_FRAME_WRITER_H_ 105 #endif // WEBRTC_TEST_TESTSUPPORT_FRAME_WRITER_H_
OLDNEW
« 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