chromium/media/gpu/test/video_encoder/video_encoder.cc

// Copyright 2020 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/test/video_encoder/video_encoder.h"

#include "base/functional/bind.h"
#include "base/memory/ptr_util.h"
#include "media/base/video_bitrate_allocation.h"
#include "media/gpu/macros.h"
#include "media/gpu/test/bitstream_helpers.h"
#include "media/gpu/test/raw_video.h"
#include "media/gpu/test/video_encoder/video_encoder_client.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace media {
namespace test {

namespace {
// Get the name of the specified video encoder |event|.
const char* EventName(VideoEncoder::EncoderEvent event) {}

// Default timeout used when waiting for events.
constexpr base::TimeDelta kDefaultEventWaitTimeout =;

// Default initial size used for |video_encoder_events_|.
constexpr size_t kDefaultEventListSize =;

constexpr std::pair<VideoEncoder::EncoderEvent, size_t> kInvalidEncodeUntil{};
}  // namespace

// static
std::unique_ptr<VideoEncoder> VideoEncoder::Create(
    const VideoEncoderClientConfig& config,
    std::vector<std::unique_ptr<BitstreamProcessor>> bitstream_processors) {}

VideoEncoder::VideoEncoder()
    :{}

VideoEncoder::~VideoEncoder() {}

bool VideoEncoder::CreateEncoderClient(
    const VideoEncoderClientConfig& config,
    std::vector<std::unique_ptr<BitstreamProcessor>> bitstream_processors) {}

void VideoEncoder::SetEventWaitTimeout(base::TimeDelta timeout) {}

bool VideoEncoder::Initialize(const RawVideo* video) {}

void VideoEncoder::Encode() {}

void VideoEncoder::EncodeUntil(EncoderEvent event, size_t event_count) {}

void VideoEncoder::Flush() {}

void VideoEncoder::UpdateBitrate(const VideoBitrateAllocation& bitrate,
                                 uint32_t framerate) {}

void VideoEncoder::ForceKeyFrame() {}

VideoEncoder::EncoderState VideoEncoder::GetState() const {}

bool VideoEncoder::WaitForEvent(EncoderEvent event, size_t times) {}

bool VideoEncoder::WaitUntilIdle() {}

bool VideoEncoder::WaitForFlushDone() {}

bool VideoEncoder::WaitForFrameReleased(size_t times) {}

size_t VideoEncoder::GetEventCount(EncoderEvent event) const {}

bool VideoEncoder::WaitForBitstreamProcessors() {}

VideoEncoderStats VideoEncoder::GetStats() const {}

void VideoEncoder::ResetStats() {}

size_t VideoEncoder::GetFlushDoneCount() const {}

size_t VideoEncoder::GetFrameReleasedCount() const {}

bool VideoEncoder::NotifyEvent(EncoderEvent event) {}
}  // namespace test
}  // namespace media