| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2011 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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 | 90 |
| 91 FileOutputFrameReceiver::~FileOutputFrameReceiver() { | 91 FileOutputFrameReceiver::~FileOutputFrameReceiver() { |
| 92 if (timing_file_ != NULL) { | 92 if (timing_file_ != NULL) { |
| 93 fclose(timing_file_); | 93 fclose(timing_file_); |
| 94 } | 94 } |
| 95 if (out_file_ != NULL) { | 95 if (out_file_ != NULL) { |
| 96 fclose(out_file_); | 96 fclose(out_file_); |
| 97 } | 97 } |
| 98 } | 98 } |
| 99 | 99 |
| 100 int32_t FileOutputFrameReceiver::FrameToRender( | 100 int32_t FileOutputFrameReceiver::FrameToRender(webrtc::VideoFrame& video_frame, |
| 101 webrtc::VideoFrame& video_frame) { | 101 rtc::Optional<uint8_t> qp) { |
| 102 if (timing_file_ == NULL) { | 102 if (timing_file_ == NULL) { |
| 103 std::string basename; | 103 std::string basename; |
| 104 std::string extension; | 104 std::string extension; |
| 105 SplitFilename(out_filename_, &basename, &extension); | 105 SplitFilename(out_filename_, &basename, &extension); |
| 106 timing_file_ = fopen((basename + "_renderTiming.txt").c_str(), "w"); | 106 timing_file_ = fopen((basename + "_renderTiming.txt").c_str(), "w"); |
| 107 if (timing_file_ == NULL) { | 107 if (timing_file_ == NULL) { |
| 108 return -1; | 108 return -1; |
| 109 } | 109 } |
| 110 } | 110 } |
| 111 if (out_file_ == NULL || video_frame.width() != width_ || | 111 if (out_file_ == NULL || video_frame.width() != width_ || |
| (...skipping 21 matching lines...) Expand all Loading... |
| 133 } | 133 } |
| 134 | 134 |
| 135 webrtc::RtpVideoCodecTypes ConvertCodecType(const char* plname) { | 135 webrtc::RtpVideoCodecTypes ConvertCodecType(const char* plname) { |
| 136 if (strncmp(plname, "VP8", 3) == 0) { | 136 if (strncmp(plname, "VP8", 3) == 0) { |
| 137 return webrtc::kRtpVideoVp8; | 137 return webrtc::kRtpVideoVp8; |
| 138 } else { | 138 } else { |
| 139 // Default value. | 139 // Default value. |
| 140 return webrtc::kRtpVideoGeneric; | 140 return webrtc::kRtpVideoGeneric; |
| 141 } | 141 } |
| 142 } | 142 } |
| OLD | NEW |