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

Unified Diff: remoting/protocol/rtp_video_reader.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/protocol/rtp_reader.cc ('k') | remoting/protocol/rtp_video_writer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/rtp_video_reader.cc
diff --git a/remoting/protocol/rtp_video_reader.cc b/remoting/protocol/rtp_video_reader.cc
index dbc25557074c08fbd88a37f022a6fbaa464dba97..8a173393d0f4f80e76a51e4258be739416522531 100644
--- a/remoting/protocol/rtp_video_reader.cc
+++ b/remoting/protocol/rtp_video_reader.cc
@@ -27,9 +27,13 @@ void RtpVideoReader::Close() {
void RtpVideoReader::OnRtpPacket(const RtpPacket& rtp_packet) {
VideoPacket* packet = new VideoPacket();
- packet->set_data(rtp_packet.payload, rtp_packet.payload_size);
+ packet->mutable_data()->resize(rtp_packet.payload().total_bytes());
+ rtp_packet.payload().CopyTo(
+ const_cast<char*>(packet->mutable_data()->data()),
+ packet->data().size());
+
packet->mutable_format()->set_encoding(VideoPacketFormat::ENCODING_VP8);
- packet->set_flags(rtp_packet.header.marker ? VideoPacket::LAST_PACKET : 0);
+ packet->set_flags(rtp_packet.header().marker ? VideoPacket::LAST_PACKET : 0);
video_stub_->ProcessVideoPacket(packet, new DeleteTask<VideoPacket>(packet));
}
« no previous file with comments | « remoting/protocol/rtp_reader.cc ('k') | remoting/protocol/rtp_video_writer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698