chromium/media/mojo/clients/mojo_stable_video_decoder.h

// 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.

#ifndef MEDIA_MOJO_CLIENTS_MOJO_STABLE_VIDEO_DECODER_H_
#define MEDIA_MOJO_CLIENTS_MOJO_STABLE_VIDEO_DECODER_H_

#include "base/containers/id_map.h"
#include "base/containers/lru_cache.h"
#include "base/memory/raw_ptr.h"
#include "base/memory/scoped_refptr.h"
#include "base/memory/weak_ptr.h"
#include "base/sequence_checker.h"
#include "base/thread_annotations.h"
#include "base/time/time.h"
#include "media/base/video_decoder.h"
#include "media/mojo/mojom/stable/stable_video_decoder.mojom.h"
#include "mojo/public/cpp/bindings/pending_remote.h"
#include "ui/gfx/generic_shared_memory_id.h"

namespace media {

class FrameResource;
class GpuVideoAcceleratorFactories;
class MediaLog;
class OOPVideoDecoder;

extern const char kMojoStableVideoDecoderDecodeLatencyHistogram[];

// A MojoStableVideoDecoder is analogous to a MojoVideoDecoder but for the
// stable::mojom::StableVideoDecoder interface, so in essence, it's just an
// adapter from the VideoDecoder API to the stable::mojom::StableVideoDecoder
// API.
//
// Consistent with the VideoDecoder contract, this class may be constructed on
// any sequence A. After that, it may be used on another sequence B but it must
// continue to be used and destroyed on that same sequence B. More specifically,
// B must correspond to the |media_task_runner| passed in the constructor.
class MojoStableVideoDecoder final : public VideoDecoder {};

}  // namespace media

#endif  // MEDIA_MOJO_CLIENTS_MOJO_STABLE_VIDEO_DECODER_H_