| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2016 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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 RTC_CHECK_GT(width_, 0); | 116 RTC_CHECK_GT(width_, 0); |
| 117 RTC_CHECK_GT(height_, 0); | 117 RTC_CHECK_GT(height_, 0); |
| 118 using_capture_timestamps_ = encoded_image._timeStamp == 0; | 118 using_capture_timestamps_ = encoded_image._timeStamp == 0; |
| 119 | 119 |
| 120 codec_type_ = codec_type; | 120 codec_type_ = codec_type; |
| 121 | 121 |
| 122 if (!WriteHeader()) | 122 if (!WriteHeader()) |
| 123 return false; | 123 return false; |
| 124 | 124 |
| 125 const char* codec_name = | 125 const char* codec_name = |
| 126 CodecTypeToPayloadName(codec_type_).value_or("Unknown"); | 126 CodecTypeToPayloadString(codec_type_); |
| 127 LOG(LS_WARNING) << "Created IVF file for codec data of type " << codec_name | 127 LOG(LS_WARNING) << "Created IVF file for codec data of type " << codec_name |
| 128 << " at resolution " << width_ << " x " << height_ | 128 << " at resolution " << width_ << " x " << height_ |
| 129 << ", using " << (using_capture_timestamps_ ? "1" : "90") | 129 << ", using " << (using_capture_timestamps_ ? "1" : "90") |
| 130 << "kHz clock resolution."; | 130 << "kHz clock resolution."; |
| 131 return true; | 131 return true; |
| 132 } | 132 } |
| 133 | 133 |
| 134 bool IvfFileWriter::WriteFrame(const EncodedImage& encoded_image, | 134 bool IvfFileWriter::WriteFrame(const EncodedImage& encoded_image, |
| 135 VideoCodecType codec_type) { | 135 VideoCodecType codec_type) { |
| 136 if (!file_.IsOpen()) | 136 if (!file_.IsOpen()) |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 191 file_.Close(); | 191 file_.Close(); |
| 192 return true; | 192 return true; |
| 193 } | 193 } |
| 194 | 194 |
| 195 bool ret = WriteHeader(); | 195 bool ret = WriteHeader(); |
| 196 file_.Close(); | 196 file_.Close(); |
| 197 return ret; | 197 return ret; |
| 198 } | 198 } |
| 199 | 199 |
| 200 } // namespace webrtc | 200 } // namespace webrtc |
| OLD | NEW |