chromium/components/cast_streaming/renderer/web_codecs/stream_control_channel.h

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

#ifndef COMPONENTS_CAST_STREAMING_RENDERER_WEB_CODECS_STREAM_CONTROL_CHANNEL_H_
#define COMPONENTS_CAST_STREAMING_RENDERER_WEB_CODECS_STREAM_CONTROL_CHANNEL_H_

#include <memory>

#include "base/memory/raw_ptr.h"
#include "base/memory/scoped_refptr.h"
#include "base/sequence_checker.h"
#include "base/task/sequenced_task_runner.h"
#include "components/cast_streaming/common/public/mojom/demuxer_connector.mojom.h"
#include "components/cast_streaming/renderer/common/buffer_requester.h"
#include "components/cast_streaming/renderer/public/decoder_buffer_provider.h"
#include "mojo/public/cpp/bindings/associated_receiver.h"
#include "mojo/public/cpp/bindings/pending_associated_receiver.h"

namespace cast_streaming::webcodecs {

// This class handles synchronization between JavaScript configuration of the
// receiver and the mojo API used for requesting audio and video buffers.
class StreamControlChannel : public mojom::DemuxerConnector,
                             public AudioBufferRequester::Client,
                             public VideoBufferRequester::Client {};

}  // namespace cast_streaming::webcodecs

#endif  // COMPONENTS_CAST_STREAMING_RENDERER_WEB_CODECS_STREAM_CONTROL_CHANNEL_H_