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

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

Issue 4779001: Added CompoundBuffer that will be used to store data in the encoding/decoding (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_video_reader.cc ('k') | remoting/protocol/rtp_writer.h » ('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_video_writer.h" 5 #include "remoting/protocol/rtp_video_writer.h"
6 6
7 #include "net/base/io_buffer.h"
8 #include "remoting/base/compound_buffer.h"
7 #include "remoting/proto/video.pb.h" 9 #include "remoting/proto/video.pb.h"
10 #include "remoting/protocol/rtp_writer.h"
8 #include "remoting/protocol/session.h" 11 #include "remoting/protocol/session.h"
9 #include "remoting/protocol/rtp_writer.h"
10 12
11 namespace remoting { 13 namespace remoting {
12 namespace protocol { 14 namespace protocol {
13 15
14 RtpVideoWriter::RtpVideoWriter() { } 16 RtpVideoWriter::RtpVideoWriter() { }
15 17
16 RtpVideoWriter::~RtpVideoWriter() { } 18 RtpVideoWriter::~RtpVideoWriter() { }
17 19
18 void RtpVideoWriter::Init(protocol::Session* session) { 20 void RtpVideoWriter::Init(protocol::Session* session) {
19 rtp_writer_.Init(session->video_rtp_channel(), session->video_rtcp_channel()); 21 rtp_writer_.Init(session->video_rtp_channel(), session->video_rtcp_channel());
20 } 22 }
21 23
22 void RtpVideoWriter::SendPacket(const VideoPacket& packet) { 24 void RtpVideoWriter::SendPacket(const VideoPacket& packet) {
23 rtp_writer_.SendPacket(packet.data().data(), packet.data().size(), 25 CompoundBuffer payload;
24 packet.timestamp()); 26 payload.AppendCopyOf(packet.data().data(), packet.data().size());
27
28 rtp_writer_.SendPacket(payload, packet.timestamp());
25 } 29 }
26 30
27 int RtpVideoWriter::GetPendingPackets() { 31 int RtpVideoWriter::GetPendingPackets() {
28 return rtp_writer_.GetPendingPackets(); 32 return rtp_writer_.GetPendingPackets();
29 } 33 }
30 34
31 35
32 void RtpVideoWriter::Close() { 36 void RtpVideoWriter::Close() {
33 rtp_writer_.Close(); 37 rtp_writer_.Close();
34 } 38 }
35 39
36 } // namespace protocol 40 } // namespace protocol
37 } // namespace remoting 41 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/protocol/rtp_video_reader.cc ('k') | remoting/protocol/rtp_writer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698