#include "content/browser/media/frameless_media_interface_proxy.h"
#include <tuple>
#include "base/functional/bind.h"
#include "base/logging.h"
#include "build/build_config.h"
#include "content/public/browser/media_service.h"
#include "content/public/browser/render_process_host.h"
#include "media/base/cdm_context.h"
#include "media/mojo/mojom/media_service.mojom.h"
#include "media/mojo/mojom/renderer_extensions.mojom.h"
#include "media/mojo/mojom/stable/stable_video_decoder.mojom.h"
#if BUILDFLAG(ALLOW_OOP_VIDEO_DECODER)
#include "content/public/browser/stable_video_decoder_factory.h"
#include "media/base/media_switches.h"
#include "mojo/public/cpp/bindings/message.h"
#endif
namespace content {
FramelessMediaInterfaceProxy::FramelessMediaInterfaceProxy(
RenderProcessHost* render_process_host)
: … { … }
FramelessMediaInterfaceProxy::~FramelessMediaInterfaceProxy() { … }
void FramelessMediaInterfaceProxy::Add(
mojo::PendingReceiver<media::mojom::InterfaceFactory> receiver) { … }
void FramelessMediaInterfaceProxy::CreateAudioDecoder(
mojo::PendingReceiver<media::mojom::AudioDecoder> receiver) { … }
void FramelessMediaInterfaceProxy::CreateVideoDecoder(
mojo::PendingReceiver<media::mojom::VideoDecoder> receiver,
mojo::PendingRemote<media::stable::mojom::StableVideoDecoder>
dst_video_decoder) { … }
#if BUILDFLAG(ALLOW_OOP_VIDEO_DECODER)
void FramelessMediaInterfaceProxy::CreateStableVideoDecoder(
mojo::PendingReceiver<media::stable::mojom::StableVideoDecoder>
video_decoder) { … }
#endif
void FramelessMediaInterfaceProxy::CreateAudioEncoder(
mojo::PendingReceiver<media::mojom::AudioEncoder> receiver) { … }
void FramelessMediaInterfaceProxy::CreateDefaultRenderer(
const std::string& audio_device_id,
mojo::PendingReceiver<media::mojom::Renderer> receiver) { … }
#if BUILDFLAG(ENABLE_CAST_RENDERER)
void FramelessMediaInterfaceProxy::CreateCastRenderer(
const base::UnguessableToken& overlay_plane_id,
mojo::PendingReceiver<media::mojom::Renderer> receiver) {}
#endif
#if BUILDFLAG(IS_ANDROID)
void FramelessMediaInterfaceProxy::CreateFlingingRenderer(
const std::string& audio_device_id,
mojo::PendingRemote<media::mojom::FlingingRendererClientExtension>
client_extenion,
mojo::PendingReceiver<media::mojom::Renderer> receiver) {}
void FramelessMediaInterfaceProxy::CreateMediaPlayerRenderer(
mojo::PendingRemote<media::mojom::MediaPlayerRendererClientExtension>
client_extension_remote,
mojo::PendingReceiver<media::mojom::Renderer> receiver,
mojo::PendingReceiver<media::mojom::MediaPlayerRendererExtension>
renderer_extension_receiver) {}
#endif
#if BUILDFLAG(IS_WIN)
void FramelessMediaInterfaceProxy::CreateMediaFoundationRenderer(
mojo::PendingRemote<media::mojom::MediaLog> media_log_remote,
mojo::PendingReceiver<media::mojom::Renderer> receiver,
mojo::PendingReceiver<media::mojom::MediaFoundationRendererExtension>
renderer_extension_receiver,
mojo::PendingRemote<media::mojom::MediaFoundationRendererClientExtension>
client_extension_remote) {}
#endif
void FramelessMediaInterfaceProxy::CreateCdm(const media::CdmConfig& cdm_config,
CreateCdmCallback callback) { … }
media::mojom::InterfaceFactory*
FramelessMediaInterfaceProxy::GetMediaInterfaceFactory() { … }
void FramelessMediaInterfaceProxy::ConnectToMediaService() { … }
void FramelessMediaInterfaceProxy::OnMediaServiceConnectionError() { … }
}