Create VP9Encoder with a VP9 codec object
Empty codec objects do not make sense. Instead of creating an empty object to be used as a placeholder in the API, at least create a video codec with the right name. Bug: webrtc:15214 Change-Id: I705d9d1361f353fe5dc538a6fe972c8a346f1247 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/307221 Reviewed-by: Harald Alvestrand <hta@webrtc.org> Commit-Queue: Florent Castelli <orphis@webrtc.org> Cr-Commit-Position: refs/heads/main@{#40218}
This commit is contained in:
parent
968e3c09db
commit
816f5b1a39
@ -710,6 +710,7 @@ rtc_library("webrtc_vp9") {
|
||||
"../../api/video_codecs:video_codecs_api",
|
||||
"../../common_video",
|
||||
"../../media:codec",
|
||||
"../../media:media_constants",
|
||||
"../../media:rtc_media_base",
|
||||
"../../rtc_base:buffer",
|
||||
"../../rtc_base:checks",
|
||||
|
||||
@ -17,6 +17,7 @@
|
||||
#include "api/video_codecs/scalability_mode.h"
|
||||
#include "api/video_codecs/sdp_video_format.h"
|
||||
#include "api/video_codecs/vp9_profile.h"
|
||||
#include "media/base/media_constants.h"
|
||||
#include "modules/video_coding/codecs/vp9/libvpx_vp9_decoder.h"
|
||||
#include "modules/video_coding/codecs/vp9/libvpx_vp9_encoder.h"
|
||||
#include "modules/video_coding/svc/create_scalability_structure.h"
|
||||
@ -82,9 +83,9 @@ std::vector<SdpVideoFormat> SupportedVP9DecoderCodecs() {
|
||||
|
||||
std::unique_ptr<VP9Encoder> VP9Encoder::Create() {
|
||||
#ifdef RTC_ENABLE_VP9
|
||||
return std::make_unique<LibvpxVp9Encoder>(cricket::VideoCodec(),
|
||||
LibvpxInterface::Create(),
|
||||
FieldTrialBasedConfig());
|
||||
return std::make_unique<LibvpxVp9Encoder>(
|
||||
cricket::CreateVideoCodec(cricket::kVp9CodecName),
|
||||
LibvpxInterface::Create(), FieldTrialBasedConfig());
|
||||
#else
|
||||
RTC_DCHECK_NOTREACHED();
|
||||
return nullptr;
|
||||
|
||||
@ -657,6 +657,7 @@ if (rtc_build_libvpx) {
|
||||
"../../api:field_trials_view",
|
||||
"../../api/video:video_frame",
|
||||
"../../api/video_codecs:video_codecs_api",
|
||||
"../../media:media_constants",
|
||||
"../../modules/video_coding:frame_dependencies_calculator",
|
||||
"../../modules/video_coding:webrtc_libvpx_interface",
|
||||
"../../modules/video_coding:webrtc_vp9",
|
||||
|
||||
@ -18,6 +18,7 @@
|
||||
#include "api/video/video_frame.h"
|
||||
#include "api/video_codecs/video_codec.h"
|
||||
#include "api/video_codecs/video_encoder.h"
|
||||
#include "media/base/media_constants.h"
|
||||
#include "modules/video_coding/codecs/interface/libvpx_interface.h"
|
||||
#include "modules/video_coding/codecs/vp9/libvpx_vp9_encoder.h"
|
||||
#include "modules/video_coding/frame_dependencies_calculator.h"
|
||||
@ -529,7 +530,7 @@ void FuzzOneInput(const uint8_t* data, size_t size) {
|
||||
LibvpxState state;
|
||||
|
||||
// Initialize encoder
|
||||
LibvpxVp9Encoder encoder(cricket::VideoCodec(),
|
||||
LibvpxVp9Encoder encoder(cricket::CreateVideoCodec(cricket::kVp9CodecName),
|
||||
std::make_unique<StubLibvpx>(&state), field_trials);
|
||||
VideoCodec codec = CodecSettings(helper);
|
||||
if (encoder.InitEncode(&codec, EncoderSettings()) != WEBRTC_VIDEO_CODEC_OK) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user