#include "media/mojo/clients/mojo_decoder_factory.h"
#include <memory>
#include "base/feature_list.h"
#include "base/task/sequenced_task_runner.h"
#include "build/build_config.h"
#include "media/base/media_switches.h"
#include "media/mojo/buildflags.h"
#include "media/mojo/clients/mojo_audio_decoder.h"
#include "media/mojo/clients/mojo_video_decoder.h"
#include "media/mojo/mojom/audio_decoder.mojom.h"
#include "media/mojo/mojom/interface_factory.mojom.h"
#include "mojo/public/cpp/bindings/pending_remote.h"
#if BUILDFLAG(ALLOW_OOP_VIDEO_DECODER)
#include "media/mojo/clients/mojo_stable_video_decoder.h"
#endif
namespace media {
namespace {
#if BUILDFLAG(ENABLE_MOJO_VIDEO_DECODER)
void CreateMojoVideoDecoder(
media::mojom::InterfaceFactory* interface_factory,
scoped_refptr<base::SequencedTaskRunner> task_runner,
GpuVideoAcceleratorFactories* gpu_factories,
MediaLog* media_log,
RequestOverlayInfoCB request_overlay_info_cb,
const gfx::ColorSpace& target_color_space,
std::vector<std::unique_ptr<VideoDecoder>>* video_decoders) { … }
#endif
}
MojoDecoderFactory::MojoDecoderFactory(
media::mojom::InterfaceFactory* interface_factory)
: … { … }
MojoDecoderFactory::~MojoDecoderFactory() = default;
void MojoDecoderFactory::CreateAudioDecoders(
scoped_refptr<base::SequencedTaskRunner> task_runner,
MediaLog* media_log,
std::vector<std::unique_ptr<AudioDecoder>>* audio_decoders) { … }
void MojoDecoderFactory::CreateVideoDecoders(
scoped_refptr<base::SequencedTaskRunner> task_runner,
GpuVideoAcceleratorFactories* gpu_factories,
MediaLog* media_log,
RequestOverlayInfoCB request_overlay_info_cb,
const gfx::ColorSpace& target_color_space,
std::vector<std::unique_ptr<VideoDecoder>>* video_decoders) { … }
}