chromium/media/mojo/services/stable_video_decoder_service.cc

// Copyright 2022 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/mojo/services/stable_video_decoder_service.h"

#include "base/notreached.h"
#include "media/gpu/chromeos/mailbox_frame_registry.h"
#include "media/mojo/common/media_type_converters.h"

#if BUILDFLAG(IS_CHROMEOS_ASH) && BUILDFLAG(USE_VAAPI)
#include "media/gpu/vaapi/vaapi_wrapper.h"
#endif

namespace media {

namespace {

// GetGpuMemoryBufferHandle() is a helper function that gets or creates a
// GpuMemoryBufferHandle from |media_frame|. For decoders that use VDA, the
// storage type is STORAGE_GPU_MEMORY_BUFFER. For decoders that use VD directly,
// the storage type is STORAGE_OPAQUE.
gfx::GpuMemoryBufferHandle GetGpuMemoryBufferHandle(
    scoped_refptr<VideoFrame> media_frame,
    scoped_refptr<const MailboxFrameRegistry> mailbox_frame_registry) {}

stable::mojom::VideoFramePtr MediaVideoFrameToMojoVideoFrame(
    scoped_refptr<VideoFrame> media_frame,
    scoped_refptr<const MailboxFrameRegistry> mailbox_frame_registry) {}

}  // namespace

StableVideoDecoderService::StableVideoDecoderService(
    mojo::PendingRemote<stable::mojom::StableVideoDecoderTracker>
        tracker_remote,
    std::unique_ptr<mojom::VideoDecoder> dst_video_decoder,
    MojoCdmServiceContext* cdm_service_context,
    scoped_refptr<const MailboxFrameRegistry> mailbox_frame_registry)
    :{}

StableVideoDecoderService::~StableVideoDecoderService() {}

void StableVideoDecoderService::GetSupportedConfigs(
    GetSupportedConfigsCallback callback) {}

void StableVideoDecoderService::Construct(
    mojo::PendingAssociatedRemote<stable::mojom::VideoDecoderClient>
        stable_video_decoder_client_remote,
    mojo::PendingRemote<stable::mojom::MediaLog> stable_media_log_remote,
    mojo::PendingReceiver<stable::mojom::VideoFrameHandleReleaser>
        stable_video_frame_handle_releaser_receiver,
    mojo::ScopedDataPipeConsumerHandle decoder_buffer_pipe,
    const gfx::ColorSpace& target_color_space) {}

void StableVideoDecoderService::Initialize(
    const VideoDecoderConfig& config,
    bool low_delay,
    mojo::PendingRemote<stable::mojom::StableCdmContext> cdm_context,
    InitializeCallback callback) {}

void StableVideoDecoderService::OnInitializeDone(
    InitializeCallback init_cb,
    bool needs_transcryption,
    const DecoderStatus& status,
    bool needs_bitstream_conversion,
    int32_t max_decode_requests,
    VideoDecoderType decoder_type) {}

void StableVideoDecoderService::Decode(
    const scoped_refptr<DecoderBuffer>& buffer,
    DecodeCallback callback) {}

void StableVideoDecoderService::Reset(ResetCallback callback) {}

void StableVideoDecoderService::ReleaseVideoFrame(
    const base::UnguessableToken& release_token) {}

void StableVideoDecoderService::OnVideoFrameDecoded(
    const scoped_refptr<VideoFrame>& frame,
    bool can_read_without_stalling,
    const std::optional<base::UnguessableToken>& release_token) {}

void StableVideoDecoderService::OnWaiting(WaitingReason reason) {}

void StableVideoDecoderService::RequestOverlayInfo(
    bool restart_for_transitions) {}

void StableVideoDecoderService::AddLogRecord(const MediaLogRecord& event) {}

}  // namespace media