Update LibVpxVp8Encoder to use GetEncoderInfo
Bug: webrtc:9890 Change-Id: I76566bc38137c81b029fa848da89c96454260895 Reviewed-on: https://webrtc-review.googlesource.com/c/109920 Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org> Commit-Queue: Erik Språng <sprang@webrtc.org> Cr-Commit-Position: refs/heads/master@{#25552}
This commit is contained in:
@ -261,10 +261,6 @@ int LibvpxVp8Encoder::SetRateAllocation(const VideoBitrateAllocation& bitrate,
|
|||||||
return WEBRTC_VIDEO_CODEC_OK;
|
return WEBRTC_VIDEO_CODEC_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* LibvpxVp8Encoder::ImplementationName() const {
|
|
||||||
return "libvpx";
|
|
||||||
}
|
|
||||||
|
|
||||||
void LibvpxVp8Encoder::SetStreamState(bool send_stream, int stream_idx) {
|
void LibvpxVp8Encoder::SetStreamState(bool send_stream, int stream_idx) {
|
||||||
if (send_stream && !send_stream_[stream_idx]) {
|
if (send_stream && !send_stream_[stream_idx]) {
|
||||||
// Need a key frame if we have not sent this stream before.
|
// Need a key frame if we have not sent this stream before.
|
||||||
@ -916,13 +912,20 @@ int LibvpxVp8Encoder::GetEncodedPartitions(const VideoFrame& input_image) {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
VideoEncoder::ScalingSettings LibvpxVp8Encoder::GetScalingSettings() const {
|
VideoEncoder::EncoderInfo LibvpxVp8Encoder::GetEncoderInfo() const {
|
||||||
|
EncoderInfo info;
|
||||||
|
info.supports_native_handle = false;
|
||||||
|
info.implementation_name = "libvpx";
|
||||||
|
|
||||||
const bool enable_scaling = encoders_.size() == 1 &&
|
const bool enable_scaling = encoders_.size() == 1 &&
|
||||||
configurations_[0].rc_dropframe_thresh > 0 &&
|
configurations_[0].rc_dropframe_thresh > 0 &&
|
||||||
codec_.VP8().automaticResizeOn;
|
codec_.VP8().automaticResizeOn;
|
||||||
return enable_scaling ? VideoEncoder::ScalingSettings(kLowVp8QpThreshold,
|
info.scaling_settings = enable_scaling
|
||||||
kHighVp8QpThreshold)
|
? VideoEncoder::ScalingSettings(
|
||||||
|
kLowVp8QpThreshold, kHighVp8QpThreshold)
|
||||||
: VideoEncoder::ScalingSettings::kOff;
|
: VideoEncoder::ScalingSettings::kOff;
|
||||||
|
|
||||||
|
return info;
|
||||||
}
|
}
|
||||||
|
|
||||||
int LibvpxVp8Encoder::RegisterEncodeCompleteCallback(
|
int LibvpxVp8Encoder::RegisterEncodeCompleteCallback(
|
||||||
|
@ -50,9 +50,7 @@ class LibvpxVp8Encoder : public VideoEncoder {
|
|||||||
int SetRateAllocation(const VideoBitrateAllocation& bitrate,
|
int SetRateAllocation(const VideoBitrateAllocation& bitrate,
|
||||||
uint32_t new_framerate) override;
|
uint32_t new_framerate) override;
|
||||||
|
|
||||||
ScalingSettings GetScalingSettings() const override;
|
EncoderInfo GetEncoderInfo() const override;
|
||||||
|
|
||||||
const char* ImplementationName() const override;
|
|
||||||
|
|
||||||
static vpx_enc_frame_flags_t EncodeFlags(
|
static vpx_enc_frame_flags_t EncodeFlags(
|
||||||
const Vp8TemporalLayers::FrameConfig& references);
|
const Vp8TemporalLayers::FrameConfig& references);
|
||||||
|
Reference in New Issue
Block a user