OLD | NEW |
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 Loading... |
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_ |
OLD | NEW |