diff options
Diffstat (limited to 'cast/standalone_sender/looping_file_cast_agent.h')
-rw-r--r-- | cast/standalone_sender/looping_file_cast_agent.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/cast/standalone_sender/looping_file_cast_agent.h b/cast/standalone_sender/looping_file_cast_agent.h index cff0f6ba..895d1324 100644 --- a/cast/standalone_sender/looping_file_cast_agent.h +++ b/cast/standalone_sender/looping_file_cast_agent.h @@ -21,6 +21,7 @@ #include "cast/sender/public/sender_socket_factory.h" #include "cast/standalone_sender/connection_settings.h" #include "cast/standalone_sender/looping_file_sender.h" +#include "cast/standalone_sender/remoting_sender.h" #include "cast/streaming/environment.h" #include "cast/streaming/sender_session.h" #include "platform/api/scoped_wake_lock.h" @@ -134,6 +135,15 @@ class LoopingFileCastAgent final SenderSession::RemotingNegotiation negotiation) override; void OnError(const SenderSession* session, Error error) override; + // Callback for when the RemotingSender indicates that the receiver + // is ready. + void OnRemotingReceiverReady(); + + // Starts the remoting sender. This may occur when remoting is "ready" if the + // session is already negotiated, or upon session negotiation if the receiver + // is already ready. + void StartRemotingSenders(); + // Helper for stopping the current session, and/or unwinding a remote // connection request (pre-session). This ensures LoopingFileCastAgent is in a // terminal shutdown state. @@ -168,6 +178,17 @@ class LoopingFileCastAgent final std::unique_ptr<Environment> environment_; std::unique_ptr<SenderSession> current_session_; std::unique_ptr<LoopingFileSender> file_sender_; + + // Remoting specific member variables. + std::unique_ptr<RemotingSender> remoting_sender_; + + // Set when remoting is successfully negotiated. However, remoting streams + // won't start until |is_ready_for_remoting_| is true. + std::unique_ptr<SenderSession::RemotingNegotiation> current_negotiation_; + + // Set to true when the remoting receiver is ready. However, remoting streams + // won't start until remoting is successfully negotiated. + bool is_ready_for_remoting_ = false; }; } // namespace cast |