summaryrefslogtreecommitdiffstats
path: root/remoting/host/session_manager.cc
diff options
context:
space:
mode:
Diffstat (limited to 'remoting/host/session_manager.cc')
-rw-r--r--remoting/host/session_manager.cc17
1 files changed, 9 insertions, 8 deletions
diff --git a/remoting/host/session_manager.cc b/remoting/host/session_manager.cc
index 1867f07..a61a6bdd 100644
--- a/remoting/host/session_manager.cc
+++ b/remoting/host/session_manager.cc
@@ -328,16 +328,18 @@ void SessionManager::DoRateControl() {
ScheduleNextRateControl();
}
-void SessionManager::DoSendVideoPacket(VideoPacket* packet) {
+void SessionManager::DoSendUpdate(ChromotingHostMessage* message,
+ Encoder::EncodingState state) {
DCHECK_EQ(network_loop_, MessageLoop::current());
TraceContext::tracer()->PrintString("DoSendUpdate");
for (ClientConnectionList::const_iterator i = clients_.begin();
i < clients_.end(); ++i) {
- (*i)->SendVideoPacket(*packet);
+ (*i)->SendUpdateStreamPacketMessage(*message);
}
- delete packet;
+
+ delete message;
TraceContext::tracer()->PrintString("DoSendUpdate done");
}
@@ -397,20 +399,19 @@ void SessionManager::DoEncode(
TraceContext::tracer()->PrintString("Encode Done");
}
-void SessionManager::EncodeDataAvailableTask(VideoPacket* packet) {
+void SessionManager::EncodeDataAvailableTask(
+ ChromotingHostMessage* message, Encoder::EncodingState state) {
DCHECK_EQ(encode_loop_, MessageLoop::current());
- bool last = (packet->flags() & VideoPacket::LAST_PACKET) != 0;
-
// Before a new encode task starts, notify clients a new update
// stream is coming.
// Notify this will keep a reference to the DataBuffer in the
// task. The ownership will eventually pass to the ClientConnections.
network_loop_->PostTask(
FROM_HERE,
- NewTracedMethod(this, &SessionManager::DoSendVideoPacket, packet));
+ NewTracedMethod(this, &SessionManager::DoSendUpdate, message, state));
- if (last) {
+ if (state & Encoder::EncodingEnded) {
capture_loop_->PostTask(
FROM_HERE, NewTracedMethod(this, &SessionManager::DoFinishEncode));
}