chromium/media/renderers/renderer_impl_factory.cc

// Copyright 2014 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "media/renderers/renderer_impl_factory.h"

#include <memory>
#include <utility>

#include "base/functional/bind.h"
#include "base/task/sequenced_task_runner.h"
#include "build/build_config.h"
#include "media/base/audio_buffer.h"
#include "media/base/decoder_factory.h"
#include "media/renderers/audio_renderer_impl.h"
#include "media/renderers/renderer_impl.h"
#include "media/renderers/video_renderer_impl.h"
#include "media/video/gpu_memory_buffer_video_frame_pool.h"
#include "media/video/gpu_video_accelerator_factories.h"

namespace media {

#if BUILDFLAG(IS_ANDROID)
RendererImplFactory::RendererImplFactory(
    MediaLog* media_log,
    DecoderFactory* decoder_factory,
    const GetGpuFactoriesCB& get_gpu_factories_cb,
    MediaPlayerLoggingID media_player_id)
    : media_log_(media_log),
      decoder_factory_(decoder_factory),
      get_gpu_factories_cb_(get_gpu_factories_cb),
      media_player_id_(media_player_id) {
  DCHECK(decoder_factory_);
}
#else
RendererImplFactory::RendererImplFactory(
    MediaLog* media_log,
    DecoderFactory* decoder_factory,
    const GetGpuFactoriesCB& get_gpu_factories_cb,
    MediaPlayerLoggingID media_player_id,
    std::unique_ptr<SpeechRecognitionClient> speech_recognition_client)
    :{}
#endif

RendererImplFactory::~RendererImplFactory() = default;

std::vector<std::unique_ptr<AudioDecoder>>
RendererImplFactory::CreateAudioDecoders(
    const scoped_refptr<base::SequencedTaskRunner>& media_task_runner) {}

std::vector<std::unique_ptr<VideoDecoder>>
RendererImplFactory::CreateVideoDecoders(
    const scoped_refptr<base::SequencedTaskRunner>& media_task_runner,
    RequestOverlayInfoCB request_overlay_info_cb,
    const gfx::ColorSpace& target_color_space,
    GpuVideoAcceleratorFactories* gpu_factories) {}

std::unique_ptr<Renderer> RendererImplFactory::CreateRenderer(
    const scoped_refptr<base::SequencedTaskRunner>& media_task_runner,
    const scoped_refptr<base::TaskRunner>& worker_task_runner,
    AudioRendererSink* audio_renderer_sink,
    VideoRendererSink* video_renderer_sink,
    RequestOverlayInfoCB request_overlay_info_cb,
    const gfx::ColorSpace& target_color_space) {}

}  // namespace media