Adds VideoDecoder::GetDecoderInfo()
This adds a new way to poll decoder metadata. A default implementation still delegates to the old methods. Root call site is updates to not use the olds methods. Follow-ups will dismantle usage of the olds methods in wrappers. Bug: webrtc:12271 Change-Id: Id0fa6863c96ff9e3b849da452d6540e7c5da4512 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/196520 Commit-Queue: Erik Språng <sprang@webrtc.org> Reviewed-by: Per Kjellander <perkj@webrtc.org> Reviewed-by: Philip Eliasson <philipel@webrtc.org> Cr-Commit-Position: refs/heads/master@{#32976}
This commit is contained in:
@ -53,6 +53,7 @@ class LibaomAv1Decoder final : public VideoDecoder {
|
||||
|
||||
int32_t Release() override;
|
||||
|
||||
DecoderInfo GetDecoderInfo() const override;
|
||||
const char* ImplementationName() const override;
|
||||
|
||||
private:
|
||||
@ -182,6 +183,13 @@ int32_t LibaomAv1Decoder::Release() {
|
||||
return WEBRTC_VIDEO_CODEC_OK;
|
||||
}
|
||||
|
||||
VideoDecoder::DecoderInfo LibaomAv1Decoder::GetDecoderInfo() const {
|
||||
DecoderInfo info;
|
||||
info.implementation_name = "libaom";
|
||||
info.is_hardware_accelerated = false;
|
||||
return info;
|
||||
}
|
||||
|
||||
const char* LibaomAv1Decoder::ImplementationName() const {
|
||||
return "libaom";
|
||||
}
|
||||
|
||||
@ -748,7 +748,7 @@ void VideoCodecTestFixtureImpl::PrintSettings(
|
||||
task_queue->SendTask(
|
||||
[this, &encoder_name, &decoder_name] {
|
||||
encoder_name = encoder_->GetEncoderInfo().implementation_name;
|
||||
decoder_name = decoders_.at(0)->ImplementationName();
|
||||
decoder_name = decoders_.at(0)->GetDecoderInfo().implementation_name;
|
||||
},
|
||||
RTC_FROM_HERE);
|
||||
RTC_LOG(LS_INFO) << "enc_impl_name: " << encoder_name;
|
||||
|
||||
@ -397,6 +397,13 @@ int LibvpxVp8Decoder::Release() {
|
||||
return ret_val;
|
||||
}
|
||||
|
||||
VideoDecoder::DecoderInfo LibvpxVp8Decoder::GetDecoderInfo() const {
|
||||
DecoderInfo info;
|
||||
info.implementation_name = "libvpx";
|
||||
info.is_hardware_accelerated = false;
|
||||
return info;
|
||||
}
|
||||
|
||||
const char* LibvpxVp8Decoder::ImplementationName() const {
|
||||
return "libvpx";
|
||||
}
|
||||
|
||||
@ -38,6 +38,7 @@ class LibvpxVp8Decoder : public VideoDecoder {
|
||||
int RegisterDecodeCompleteCallback(DecodedImageCallback* callback) override;
|
||||
int Release() override;
|
||||
|
||||
DecoderInfo GetDecoderInfo() const override;
|
||||
const char* ImplementationName() const override;
|
||||
|
||||
struct DeblockParams {
|
||||
|
||||
@ -391,6 +391,13 @@ int LibvpxVp9Decoder::Release() {
|
||||
return ret_val;
|
||||
}
|
||||
|
||||
VideoDecoder::DecoderInfo LibvpxVp9Decoder::GetDecoderInfo() const {
|
||||
DecoderInfo info;
|
||||
info.implementation_name = "libvpx";
|
||||
info.is_hardware_accelerated = false;
|
||||
return info;
|
||||
}
|
||||
|
||||
const char* LibvpxVp9Decoder::ImplementationName() const {
|
||||
return "libvpx";
|
||||
}
|
||||
|
||||
@ -40,6 +40,7 @@ class LibvpxVp9Decoder : public VP9Decoder {
|
||||
|
||||
int Release() override;
|
||||
|
||||
DecoderInfo GetDecoderInfo() const override;
|
||||
const char* ImplementationName() const override;
|
||||
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user