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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 } | 56 } |
57 | 57 |
58 int VideoFrame::height() const { | 58 int VideoFrame::height() const { |
59 return video_frame_buffer_ ? video_frame_buffer_->height() : 0; | 59 return video_frame_buffer_ ? video_frame_buffer_->height() : 0; |
60 } | 60 } |
61 | 61 |
62 bool VideoFrame::IsZeroSize() const { | 62 bool VideoFrame::IsZeroSize() const { |
63 return !video_frame_buffer_; | 63 return !video_frame_buffer_; |
64 } | 64 } |
65 | 65 |
66 const rtc::scoped_refptr<VideoFrameBuffer>& VideoFrame::video_frame_buffer() | 66 rtc::scoped_refptr<VideoFrameBuffer> VideoFrame::video_frame_buffer() const { |
67 const { | |
68 return video_frame_buffer_; | 67 return video_frame_buffer_; |
69 } | 68 } |
70 | 69 |
71 size_t EncodedImage::GetBufferPaddingBytes(VideoCodecType codec_type) { | 70 size_t EncodedImage::GetBufferPaddingBytes(VideoCodecType codec_type) { |
72 switch (codec_type) { | 71 switch (codec_type) { |
73 case kVideoCodecVP8: | 72 case kVideoCodecVP8: |
74 case kVideoCodecVP9: | 73 case kVideoCodecVP9: |
75 return 0; | 74 return 0; |
76 case kVideoCodecH264: | 75 case kVideoCodecH264: |
77 return kBufferPaddingBytesH264; | 76 return kBufferPaddingBytesH264; |
78 case kVideoCodecI420: | 77 case kVideoCodecI420: |
79 case kVideoCodecRED: | 78 case kVideoCodecRED: |
80 case kVideoCodecULPFEC: | 79 case kVideoCodecULPFEC: |
81 case kVideoCodecFlexfec: | 80 case kVideoCodecFlexfec: |
82 case kVideoCodecGeneric: | 81 case kVideoCodecGeneric: |
83 case kVideoCodecUnknown: | 82 case kVideoCodecUnknown: |
84 return 0; | 83 return 0; |
85 } | 84 } |
86 RTC_NOTREACHED(); | 85 RTC_NOTREACHED(); |
87 return 0; | 86 return 0; |
88 } | 87 } |
89 | 88 |
90 } // namespace webrtc | 89 } // namespace webrtc |
OLD | NEW |