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 364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
375 encoded_image_._length); | 375 encoded_image_._length); |
376 int qp = -1; | 376 int qp = -1; |
377 if (h264_bitstream_parser_.GetLastSliceQp(&qp)) | 377 if (h264_bitstream_parser_.GetLastSliceQp(&qp)) |
378 quality_scaler_.ReportQP(qp); | 378 quality_scaler_.ReportQP(qp); |
379 } else { | 379 } else { |
380 quality_scaler_.ReportDroppedFrame(); | 380 quality_scaler_.ReportDroppedFrame(); |
381 } | 381 } |
382 return WEBRTC_VIDEO_CODEC_OK; | 382 return WEBRTC_VIDEO_CODEC_OK; |
383 } | 383 } |
384 | 384 |
| 385 const char* H264EncoderImpl::ImplementationName() const { |
| 386 return "OpenH264"; |
| 387 } |
| 388 |
385 bool H264EncoderImpl::IsInitialized() const { | 389 bool H264EncoderImpl::IsInitialized() const { |
386 return openh264_encoder_ != nullptr; | 390 return openh264_encoder_ != nullptr; |
387 } | 391 } |
388 | 392 |
389 // Initialization parameters. | 393 // Initialization parameters. |
390 // There are two ways to initialize. There is SEncParamBase (cleared with | 394 // There are two ways to initialize. There is SEncParamBase (cleared with |
391 // memset(&p, 0, sizeof(SEncParamBase)) used in Initialize, and SEncParamExt | 395 // memset(&p, 0, sizeof(SEncParamBase)) used in Initialize, and SEncParamExt |
392 // which is a superset of SEncParamBase (cleared with GetDefaultParams) used | 396 // which is a superset of SEncParamBase (cleared with GetDefaultParams) used |
393 // in InitializeExt. | 397 // in InitializeExt. |
394 SEncParamExt H264EncoderImpl::CreateEncoderParams() const { | 398 SEncParamExt H264EncoderImpl::CreateEncoderParams() const { |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
466 | 470 |
467 int32_t H264EncoderImpl::SetPeriodicKeyFrames(bool enable) { | 471 int32_t H264EncoderImpl::SetPeriodicKeyFrames(bool enable) { |
468 return WEBRTC_VIDEO_CODEC_OK; | 472 return WEBRTC_VIDEO_CODEC_OK; |
469 } | 473 } |
470 | 474 |
471 void H264EncoderImpl::OnDroppedFrame() { | 475 void H264EncoderImpl::OnDroppedFrame() { |
472 quality_scaler_.ReportDroppedFrame(); | 476 quality_scaler_.ReportDroppedFrame(); |
473 } | 477 } |
474 | 478 |
475 } // namespace webrtc | 479 } // namespace webrtc |
OLD | NEW |