chromium/media/gpu/vaapi/test/fake_libva_driver/av1_decoder_delegate.cc

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

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/40285824): Remove this and convert code to safer constructs.
#pragma allow_unsafe_buffers
#endif

#include "media/gpu/vaapi/test/fake_libva_driver/av1_decoder_delegate.h"

#include "base/check_op.h"
#include "base/numerics/safe_conversions.h"
#include "media/gpu/vaapi/test/fake_libva_driver/fake_buffer.h"
#include "media/gpu/vaapi/test/fake_libva_driver/fake_surface.h"
#include "third_party/dav1d/libdav1d/include/dav1d/dav1d.h"
#include "third_party/libyuv/include/libyuv.h"

namespace media::internal {
namespace {

// std::unique_ptr release helpers. We need to release both the containing
// structs as well as refs held within the structures.
struct ScopedDav1dDataFree {};

struct ScopedDav1dPictureFree {};

void NullFreeCallback(const uint8_t* buffer, void* opaque) {}

}  // namespace

void Av1DecoderDelegate::Dav1dContextDeleter::operator()(Dav1dContext* ptr) {}

Av1DecoderDelegate::Av1DecoderDelegate(VAProfile profile) {}

Av1DecoderDelegate::~Av1DecoderDelegate() {}

void Av1DecoderDelegate::SetRenderTarget(const FakeSurface& surface) {}

void Av1DecoderDelegate::EnqueueWork(
    const std::vector<raw_ptr<const FakeBuffer>>& buffers) {}

void Av1DecoderDelegate::Run() {}

}  // namespace media::internal