Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(533)

Unified Diff: remoting/host/session_manager.cc

Issue 4255001: Revert 64672 - Cleanups in the video encoding decoding code. Reenable VP8.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/host/session_manager.h ('k') | remoting/host/session_manager_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/session_manager.cc
===================================================================
--- remoting/host/session_manager.cc (revision 64676)
+++ remoting/host/session_manager.cc (working copy)
@@ -328,17 +328,19 @@
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 @@
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));
}
« no previous file with comments | « remoting/host/session_manager.h ('k') | remoting/host/session_manager_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698