OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "remoting/protocol/client_video_dispatcher.h" | 5 #include "remoting/protocol/client_video_dispatcher.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/callback_helpers.h" | 10 #include "base/callback_helpers.h" |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 PendingFramesList::iterator pending_frame) { | 59 PendingFramesList::iterator pending_frame) { |
60 // Mark the frame as done. | 60 // Mark the frame as done. |
61 DCHECK(!pending_frame->done); | 61 DCHECK(!pending_frame->done); |
62 pending_frame->done = true; | 62 pending_frame->done = true; |
63 | 63 |
64 // Send VideoAck for all packets in the head of the queue that have finished | 64 // Send VideoAck for all packets in the head of the queue that have finished |
65 // rendering. | 65 // rendering. |
66 while (!pending_frames_.empty() && pending_frames_.front().done) { | 66 while (!pending_frames_.empty() && pending_frames_.front().done) { |
67 VideoAck ack_message; | 67 VideoAck ack_message; |
68 ack_message.set_frame_id(pending_frames_.front().frame_id); | 68 ack_message.set_frame_id(pending_frames_.front().frame_id); |
69 writer()->Write(SerializeAndFrameMessage(ack_message), base::Closure()); | 69 message_pipe()->Send(&ack_message, base::Closure()); |
70 pending_frames_.pop_front(); | 70 pending_frames_.pop_front(); |
71 } | 71 } |
72 } | 72 } |
73 | 73 |
74 } // namespace protocol | 74 } // namespace protocol |
75 } // namespace remoting | 75 } // namespace remoting |
OLD | NEW |