| 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 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 } | 139 } |
| 140 | 140 |
| 141 int VideoFrame::width() const { | 141 int VideoFrame::width() const { |
| 142 return video_frame_buffer_ ? video_frame_buffer_->width() : 0; | 142 return video_frame_buffer_ ? video_frame_buffer_->width() : 0; |
| 143 } | 143 } |
| 144 | 144 |
| 145 int VideoFrame::height() const { | 145 int VideoFrame::height() const { |
| 146 return video_frame_buffer_ ? video_frame_buffer_->height() : 0; | 146 return video_frame_buffer_ ? video_frame_buffer_->height() : 0; |
| 147 } | 147 } |
| 148 | 148 |
| 149 bool VideoFrame::IsZeroSize() const { | |
| 150 return !video_frame_buffer_; | |
| 151 } | |
| 152 | |
| 153 const rtc::scoped_refptr<VideoFrameBuffer>& VideoFrame::video_frame_buffer() | 149 const rtc::scoped_refptr<VideoFrameBuffer>& VideoFrame::video_frame_buffer() |
| 154 const { | 150 const { |
| 155 return video_frame_buffer_; | 151 return video_frame_buffer_; |
| 156 } | 152 } |
| 157 | 153 |
| 158 size_t EncodedImage::GetBufferPaddingBytes(VideoCodecType codec_type) { | 154 size_t EncodedImage::GetBufferPaddingBytes(VideoCodecType codec_type) { |
| 159 switch (codec_type) { | 155 switch (codec_type) { |
| 160 case kVideoCodecVP8: | 156 case kVideoCodecVP8: |
| 161 case kVideoCodecVP9: | 157 case kVideoCodecVP9: |
| 162 return 0; | 158 return 0; |
| 163 case kVideoCodecH264: | 159 case kVideoCodecH264: |
| 164 return kBufferPaddingBytesH264; | 160 return kBufferPaddingBytesH264; |
| 165 case kVideoCodecI420: | 161 case kVideoCodecI420: |
| 166 case kVideoCodecRED: | 162 case kVideoCodecRED: |
| 167 case kVideoCodecULPFEC: | 163 case kVideoCodecULPFEC: |
| 168 case kVideoCodecGeneric: | 164 case kVideoCodecGeneric: |
| 169 case kVideoCodecUnknown: | 165 case kVideoCodecUnknown: |
| 170 return 0; | 166 return 0; |
| 171 } | 167 } |
| 172 RTC_NOTREACHED(); | 168 RTC_NOTREACHED(); |
| 173 return 0; | 169 return 0; |
| 174 } | 170 } |
| 175 | 171 |
| 176 } // namespace webrtc | 172 } // namespace webrtc |
| OLD | NEW |