| OLD | NEW |
| 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 "remoting/proto/video.pb.h" |
| 7 #include "remoting/protocol/session.h" | 8 #include "remoting/protocol/session.h" |
| 8 #include "remoting/protocol/rtp_writer.h" | 9 #include "remoting/protocol/rtp_writer.h" |
| 9 | 10 |
| 10 namespace remoting { | 11 namespace remoting { |
| 11 namespace protocol { | 12 namespace protocol { |
| 12 | 13 |
| 13 RtpVideoWriter::RtpVideoWriter() { } | 14 RtpVideoWriter::RtpVideoWriter() { } |
| 14 | 15 |
| 15 RtpVideoWriter::~RtpVideoWriter() { } | 16 RtpVideoWriter::~RtpVideoWriter() { } |
| 16 | 17 |
| 17 void RtpVideoWriter::Init(protocol::Session* session) { | 18 void RtpVideoWriter::Init(protocol::Session* session) { |
| 18 rtp_writer_.Init(session->video_rtp_channel(), | 19 rtp_writer_.Init(session->video_rtp_channel(), session->video_rtcp_channel()); |
| 19 session->video_rtcp_channel()); | |
| 20 } | 20 } |
| 21 | 21 |
| 22 void RtpVideoWriter::SendPacket(const VideoPacket& packet) { | 22 void RtpVideoWriter::SendPacket(const VideoPacket& packet) { |
| 23 rtp_writer_.SendPacket(packet.data().data(), packet.data().length(), | 23 rtp_writer_.SendPacket(packet.data().data(), packet.data().size(), |
| 24 packet.timestamp()); | 24 packet.timestamp()); |
| 25 } | 25 } |
| 26 | 26 |
| 27 int RtpVideoWriter::GetPendingPackets() { | 27 int RtpVideoWriter::GetPendingPackets() { |
| 28 return rtp_writer_.GetPendingPackets(); | 28 return rtp_writer_.GetPendingPackets(); |
| 29 } | 29 } |
| 30 | 30 |
| 31 | 31 |
| 32 void RtpVideoWriter::Close() { | 32 void RtpVideoWriter::Close() { |
| 33 rtp_writer_.Close(); | 33 rtp_writer_.Close(); |
| 34 } | 34 } |
| 35 | 35 |
| 36 } // namespace protocol | 36 } // namespace protocol |
| 37 } // namespace remoting | 37 } // namespace remoting |
| OLD | NEW |