OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2015 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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 layer_len += layerInfo.pNalLengthInByte[nal]; | 143 layer_len += layerInfo.pNalLengthInByte[nal]; |
144 } | 144 } |
145 // Copy the entire layer's data (including start codes). | 145 // Copy the entire layer's data (including start codes). |
146 memcpy(encoded_image->_buffer + encoded_image->_length, | 146 memcpy(encoded_image->_buffer + encoded_image->_length, |
147 layerInfo.pBsBuf, | 147 layerInfo.pBsBuf, |
148 layer_len); | 148 layer_len); |
149 encoded_image->_length += layer_len; | 149 encoded_image->_length += layer_len; |
150 } | 150 } |
151 } | 151 } |
152 | 152 |
153 H264EncoderImpl::H264EncoderImpl() | 153 H264EncoderImpl::H264EncoderImpl(const cricket::VideoCodec& codec) |
154 : openh264_encoder_(nullptr), | 154 : openh264_encoder_(nullptr), |
155 number_of_cores_(0), | 155 number_of_cores_(0), |
156 encoded_image_callback_(nullptr), | 156 encoded_image_callback_(nullptr), |
157 has_reported_init_(false), | 157 has_reported_init_(false), |
158 has_reported_error_(false) {} | 158 has_reported_error_(false) {} |
159 | 159 |
160 H264EncoderImpl::~H264EncoderImpl() { | 160 H264EncoderImpl::~H264EncoderImpl() { |
161 Release(); | 161 Release(); |
162 } | 162 } |
163 | 163 |
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
486 | 486 |
487 int32_t H264EncoderImpl::SetPeriodicKeyFrames(bool enable) { | 487 int32_t H264EncoderImpl::SetPeriodicKeyFrames(bool enable) { |
488 return WEBRTC_VIDEO_CODEC_OK; | 488 return WEBRTC_VIDEO_CODEC_OK; |
489 } | 489 } |
490 | 490 |
491 void H264EncoderImpl::OnDroppedFrame() { | 491 void H264EncoderImpl::OnDroppedFrame() { |
492 quality_scaler_.ReportDroppedFrame(); | 492 quality_scaler_.ReportDroppedFrame(); |
493 } | 493 } |
494 | 494 |
495 } // namespace webrtc | 495 } // namespace webrtc |
OLD | NEW |