#include "media/cast/openscreen/rpc_call_message_handler.h"
#include "base/check.h"
#include "base/logging.h"
#include "media/base/demuxer_stream.h"
#include "media/cast/openscreen/remoting_proto_enum_utils.h"
#include "media/cast/openscreen/remoting_proto_utils.h"
#include "third_party/openscreen/src/cast/streaming/remoting.pb.h"
namespace media::cast {
namespace {
template <typename T>
std::optional<media::AudioDecoderConfig> ExtractAudioConfig(
const T& config_container) { … }
template <typename T>
std::optional<media::VideoDecoderConfig> ExtractVideoConfig(
const T& config_container) { … }
bool DispatchInitializationAcquireRendererRpcCall(
openscreen::cast::RpcMessage* message,
RpcInitializationCallMessageHandler* client) { … }
bool DispatchInitializationAcquireDemuxerRpcCall(
openscreen::cast::RpcMessage* message,
RpcInitializationCallMessageHandler* client) { … }
bool DispatchRendererFlushUntilRpcCall(openscreen::cast::RpcMessage* message,
RpcRendererCallMessageHandler* client) { … }
bool DispatchRendererStartPlayingFromRpcCall(
openscreen::cast::RpcMessage* message,
RpcRendererCallMessageHandler* client) { … }
bool DispatchRendererSetPlaybackRateRpcCall(
openscreen::cast::RpcMessage* message,
RpcRendererCallMessageHandler* client) { … }
bool DispatchRendererSetVolumeRpcCall(openscreen::cast::RpcMessage* message,
RpcRendererCallMessageHandler* client) { … }
bool DispatchDemuxerStreamInitializeCBRpcCall(
openscreen::cast::RpcMessage* message,
RpcDemuxerStreamCBMessageHandler* client) { … }
bool DispatchDemuxerStreamReadUntilCBRpcCall(
openscreen::cast::RpcMessage* message,
RpcDemuxerStreamCBMessageHandler* client) { … }
bool DispatchDemuxerStreamEnableBitstreamConverterCBRpcCall(
openscreen::cast::RpcMessage* message,
RpcDemuxerStreamCBMessageHandler* client) { … }
}
RpcInitializationCallMessageHandler::~RpcInitializationCallMessageHandler() =
default;
RpcRendererCallMessageHandler::~RpcRendererCallMessageHandler() = default;
RpcDemuxerStreamCBMessageHandler::~RpcDemuxerStreamCBMessageHandler() = default;
bool DispatchInitializationRpcCall(
openscreen::cast::RpcMessage* message,
RpcInitializationCallMessageHandler* client) { … }
bool DispatchRendererRpcCall(openscreen::cast::RpcMessage* message,
RpcRendererCallMessageHandler* client) { … }
bool DispatchDemuxerStreamCBRpcCall(openscreen::cast::RpcMessage* message,
RpcDemuxerStreamCBMessageHandler* client) { … }
}