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

Side by Side Diff: remoting/protocol/rtp_reader.cc

Issue 4229003: Add VideoReader and VideoWriter interfaces. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: - Created 10 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « remoting/protocol/rtp_reader.h ('k') | remoting/protocol/rtp_utils.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/rtp_reader.h" 5 #include "remoting/protocol/rtp_reader.h"
6 6
7 #include "net/base/completion_callback.h" 7 #include "net/base/completion_callback.h"
8 #include "net/base/io_buffer.h" 8 #include "net/base/io_buffer.h"
9 9
10 namespace remoting { 10 namespace remoting {
(...skipping 16 matching lines...) Expand all
27 int header_size = UnpackRtpHeader(reinterpret_cast<uint8*>(buffer->data()), 27 int header_size = UnpackRtpHeader(reinterpret_cast<uint8*>(buffer->data()),
28 data_size, &packet.header); 28 data_size, &packet.header);
29 if (header_size < 0) { 29 if (header_size < 0) {
30 LOG(WARNING) << "Received invalid RTP packet."; 30 LOG(WARNING) << "Received invalid RTP packet.";
31 return; 31 return;
32 } 32 }
33 packet.data = buffer; 33 packet.data = buffer;
34 packet.payload = buffer->data() + header_size; 34 packet.payload = buffer->data() + header_size;
35 packet.payload_size = data_size - header_size; 35 packet.payload_size = data_size - header_size;
36 36
37 on_message_callback_->Run(&packet); 37 on_message_callback_->Run(packet);
38 } 38 }
39 39
40 } // namespace remoting 40 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/protocol/rtp_reader.h ('k') | remoting/protocol/rtp_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698