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

Side by Side Diff: media/cast/video_sender/video_sender.cc

Issue 138753004: Cast: IPC glue between cast library transport and encoders. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: sorted deps Created 6 years, 10 months 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "media/cast/video_sender/video_sender.h" 5 #include "media/cast/video_sender/video_sender.h"
6 6
7 #include <list> 7 #include <list>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 base::TimeDelta time_since_last_send = now - time_sent_; 59 base::TimeDelta time_since_last_send = now - time_sent_;
60 sender_info_.rtp_timestamp = 60 sender_info_.rtp_timestamp =
61 rtp_timestamp_ + 61 rtp_timestamp_ +
62 time_since_last_send.InMilliseconds() * (kVideoFrequency / 1000); 62 time_since_last_send.InMilliseconds() * (kVideoFrequency / 1000);
63 } else { 63 } else {
64 sender_info_.rtp_timestamp = 0; 64 sender_info_.rtp_timestamp = 0;
65 } 65 }
66 memcpy(sender_info, &sender_info_, sizeof(transport::RtcpSenderInfo)); 66 memcpy(sender_info, &sender_info_, sizeof(transport::RtcpSenderInfo));
67 } 67 }
68 68
69 void StoreStatistics(transport::RtcpSenderInfo& sender_info, 69 void StoreStatistics(const transport::RtcpSenderInfo& sender_info,
70 base::TimeTicks time_sent, 70 base::TimeTicks time_sent,
71 uint32 rtp_timestamp) { 71 uint32 rtp_timestamp) {
72 sender_info_ = sender_info; 72 sender_info_ = sender_info;
73 time_sent_ = time_sent; 73 time_sent_ = time_sent;
74 rtp_timestamp_ = rtp_timestamp; 74 rtp_timestamp_ = rtp_timestamp;
75 } 75 }
76 76
77 private: 77 private:
78 transport::CastTransportSender* const transport_sender_; 78 transport::CastTransportSender* const transport_sender_;
79 transport::RtcpSenderInfo sender_info_; 79 transport::RtcpSenderInfo sender_info_;
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after
475 475
476 void VideoSender::ResendPacketsOnTransportThread( 476 void VideoSender::ResendPacketsOnTransportThread(
477 const transport::MissingFramesAndPacketsMap& missing_packets) { 477 const transport::MissingFramesAndPacketsMap& missing_packets) {
478 DCHECK(cast_environment_->CurrentlyOn(CastEnvironment::TRANSPORT)); 478 DCHECK(cast_environment_->CurrentlyOn(CastEnvironment::TRANSPORT));
479 last_send_time_ = cast_environment_->Clock()->NowTicks(); 479 last_send_time_ = cast_environment_->Clock()->NowTicks();
480 transport_sender_->ResendPackets(false, missing_packets); 480 transport_sender_->ResendPackets(false, missing_packets);
481 } 481 }
482 482
483 } // namespace cast 483 } // namespace cast
484 } // namespace media 484 } // namespace media
OLDNEW
« media/cast/transport/cast_transport_config.h ('K') | « media/cast/transport/rtcp/rtcp_builder.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698