| 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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 RTC_DCHECK_GE(stride_u, half_width); | 54 RTC_DCHECK_GE(stride_u, half_width); |
| 55 RTC_DCHECK_GE(stride_v, half_width); | 55 RTC_DCHECK_GE(stride_v, half_width); |
| 56 | 56 |
| 57 // Creating empty frame - reset all values. | 57 // Creating empty frame - reset all values. |
| 58 timestamp_ = 0; | 58 timestamp_ = 0; |
| 59 ntp_time_ms_ = 0; | 59 ntp_time_ms_ = 0; |
| 60 render_time_ms_ = 0; | 60 render_time_ms_ = 0; |
| 61 rotation_ = kVideoRotation_0; | 61 rotation_ = kVideoRotation_0; |
| 62 | 62 |
| 63 // Allocate a new buffer. | 63 // Allocate a new buffer. |
| 64 video_frame_buffer_ = new rtc::RefCountedObject<I420Buffer>( | 64 video_frame_buffer_ = I420Buffer::Create( |
| 65 width, height, stride_y, stride_u, stride_v); | 65 width, height, stride_y, stride_u, stride_v); |
| 66 } | 66 } |
| 67 | 67 |
| 68 void VideoFrame::CreateFrame(const uint8_t* buffer_y, | 68 void VideoFrame::CreateFrame(const uint8_t* buffer_y, |
| 69 const uint8_t* buffer_u, | 69 const uint8_t* buffer_u, |
| 70 const uint8_t* buffer_v, | 70 const uint8_t* buffer_v, |
| 71 int width, | 71 int width, |
| 72 int height, | 72 int height, |
| 73 int stride_y, | 73 int stride_y, |
| 74 int stride_u, | 74 int stride_u, |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 case kVideoCodecULPFEC: | 181 case kVideoCodecULPFEC: |
| 182 case kVideoCodecGeneric: | 182 case kVideoCodecGeneric: |
| 183 case kVideoCodecUnknown: | 183 case kVideoCodecUnknown: |
| 184 return 0; | 184 return 0; |
| 185 } | 185 } |
| 186 RTC_NOTREACHED(); | 186 RTC_NOTREACHED(); |
| 187 return 0; | 187 return 0; |
| 188 } | 188 } |
| 189 | 189 |
| 190 } // namespace webrtc | 190 } // namespace webrtc |
| OLD | NEW |