#include "components/mirroring/service/media_remoter.h"
#include "base/functional/bind.h"
#include "base/logging.h"
#include "components/mirroring/service/remoting_sender.h"
#include "components/mirroring/service/rpc_dispatcher.h"
#include "media/base/media_switches.h"
#include "third_party/openscreen/src/cast/streaming/sender.h"
FrameSenderConfig;
namespace mirroring {
MediaRemoter::MediaRemoter(
Client& client,
const media::mojom::RemotingSinkMetadata& sink_metadata,
RpcDispatcher& rpc_dispatcher)
: … { … }
MediaRemoter::~MediaRemoter() { … }
void MediaRemoter::OnMessageFromSink(const std::vector<uint8_t>& response) { … }
void MediaRemoter::StartRpcMessaging(
scoped_refptr<media::cast::CastEnvironment> cast_environment,
std::unique_ptr<openscreen::cast::Sender> audio_sender,
std::unique_ptr<openscreen::cast::Sender> video_sender,
std::optional<FrameSenderConfig> audio_config,
std::optional<FrameSenderConfig> video_config) { … }
void MediaRemoter::StartRpcMessagingInternal(
scoped_refptr<media::cast::CastEnvironment> cast_environment,
std::optional<FrameSenderConfig> audio_config,
std::optional<FrameSenderConfig> video_config) { … }
void MediaRemoter::OnMirroringResumed(bool is_tab_switching) { … }
void MediaRemoter::OnRemotingFailed() { … }
void MediaRemoter::Stop(media::mojom::RemotingStopReason reason) { … }
void MediaRemoter::Start() { … }
void MediaRemoter::StartWithPermissionAlreadyGranted() { … }
void MediaRemoter::StartDataStreams(
mojo::ScopedDataPipeConsumerHandle audio_pipe,
mojo::ScopedDataPipeConsumerHandle video_pipe,
mojo::PendingReceiver<media::mojom::RemotingDataStreamSender>
audio_sender_receiver,
mojo::PendingReceiver<media::mojom::RemotingDataStreamSender>
video_sender_receiver) { … }
void MediaRemoter::SendMessageToSink(const std::vector<uint8_t>& message) { … }
void MediaRemoter::EstimateTransmissionCapacity(
media::mojom::Remoter::EstimateTransmissionCapacityCallback callback) { … }
void MediaRemoter::OnRemotingDataStreamError() { … }
}