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

Unified Diff: remoting/protocol/rtp_video_reader.cc

Issue 4476003: Add VideoPacket struct for video packets. Refactor Decode interface to use it. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merged 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/protobuf_video_writer.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 8660371beb8536da7059d94c01fedf797fd27fcf..dbc25557074c08fbd88a37f022a6fbaa464dba97 100644
--- a/remoting/protocol/rtp_video_reader.cc
+++ b/remoting/protocol/rtp_video_reader.cc
@@ -5,6 +5,7 @@
#include "remoting/protocol/rtp_video_reader.h"
#include "base/task.h"
+#include "remoting/proto/video.pb.h"
#include "remoting/protocol/session.h"
namespace remoting {
@@ -13,8 +14,7 @@ namespace protocol {
RtpVideoReader::RtpVideoReader() { }
RtpVideoReader::~RtpVideoReader() { }
-void RtpVideoReader::Init(protocol::Session* session,
- VideoStub* video_stub) {
+void RtpVideoReader::Init(protocol::Session* session, VideoStub* video_stub) {
rtp_reader_.Init(session->video_rtp_channel(),
NewCallback(this, &RtpVideoReader::OnRtpPacket));
video_stub_ = video_stub;
@@ -26,15 +26,10 @@ 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->set_data(rtp_packet.payload, rtp_packet.payload_size);
packet->mutable_format()->set_encoding(VideoPacketFormat::ENCODING_VP8);
packet->set_flags(rtp_packet.header.marker ? VideoPacket::LAST_PACKET : 0);
- packet->mutable_format()->set_pixel_format(PIXEL_FORMAT_RGB32);
- packet->mutable_format()->set_x(0);
- packet->mutable_format()->set_y(0);
- packet->mutable_format()->set_width(800);
- packet->mutable_format()->set_height(600);
video_stub_->ProcessVideoPacket(packet, new DeleteTask<VideoPacket>(packet));
}
« no previous file with comments | « remoting/protocol/protobuf_video_writer.cc ('k') | remoting/protocol/rtp_video_writer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698