#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "media/gpu/test/video_player/decoder_listener.h"
#include "base/functional/bind.h"
#include "base/memory/ptr_util.h"
#include "media/gpu/macros.h"
#include "media/gpu/test/video_bitstream.h"
#include "media/gpu/test/video_frame_helpers.h"
#include "media/gpu/test/video_player/decoder_wrapper.h"
#include "media/gpu/test/video_player/frame_renderer_dummy.h"
namespace media {
namespace test {
namespace {
const char* EventName(DecoderListener::Event event) { … }
}
DecoderListener::~DecoderListener() { … }
std::unique_ptr<DecoderListener> DecoderListener::Create(
const DecoderWrapperConfig& config,
std::unique_ptr<FrameRendererDummy> frame_renderer,
std::vector<std::unique_ptr<VideoFrameProcessor>> frame_processors) { … }
void DecoderListener::SetEventWaitTimeout(base::TimeDelta timeout) { … }
bool DecoderListener::Initialize(const VideoBitstream* video) { … }
void DecoderListener::Play() { … }
void DecoderListener::PlayUntil(Event event) { … }
void DecoderListener::Reset() { … }
void DecoderListener::Flush() { … }
bool DecoderListener::WaitForEvent(Event sought_event, size_t times) { … }
bool DecoderListener::WaitForFlushDone() { … }
bool DecoderListener::WaitForResetDone() { … }
bool DecoderListener::WaitForFrameDecoded(size_t times) { … }
size_t DecoderListener::GetEventCount(Event event) const { … }
bool DecoderListener::WaitForFrameProcessors() { … }
void DecoderListener::WaitForRenderer() { … }
size_t DecoderListener::GetFlushDoneCount() const { … }
size_t DecoderListener::GetResetDoneCount() const { … }
size_t DecoderListener::GetFrameDecodedCount() const { … }
DecoderListener::DecoderListener(
const DecoderWrapperConfig& config,
std::unique_ptr<FrameRendererDummy> frame_renderer,
std::vector<std::unique_ptr<VideoFrameProcessor>> frame_processors)
: … { … }
bool DecoderListener::NotifyEvent(Event event) { … }
}
}