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

Side by Side Diff: media/cast/sender/frame_sender.cc

Issue 1878883003: Refactor: simplify interface of SenderRtcpSession and CastTransport. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 7 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
« no previous file with comments | « media/cast/sender/frame_sender.h ('k') | media/cast/sender/video_sender.cc » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/sender/frame_sender.h" 5 #include "media/cast/sender/frame_sender.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 13 matching lines...) Expand all
24 24
25 // The additional number of frames that can be in-flight when input exceeds the 25 // The additional number of frames that can be in-flight when input exceeds the
26 // maximum frame rate. 26 // maximum frame rate.
27 const int kMaxFrameBurst = 5; 27 const int kMaxFrameBurst = 5;
28 28
29 } // namespace 29 } // namespace
30 30
31 // Convenience macro used in logging statements throughout this file. 31 // Convenience macro used in logging statements throughout this file.
32 #define SENDER_SSRC (is_audio_ ? "AUDIO[" : "VIDEO[") << ssrc_ << "] " 32 #define SENDER_SSRC (is_audio_ ? "AUDIO[" : "VIDEO[") << ssrc_ << "] "
33 33
34 FrameSender::RtcpClient::RtcpClient(base::WeakPtr<FrameSender> frame_sender)
35 : frame_sender_(frame_sender) {}
36
37 FrameSender::RtcpClient::~RtcpClient() {}
38
39 void FrameSender::RtcpClient::OnReceivedCastMessage(
40 const RtcpCastMessage& cast_message) {
41 if (frame_sender_)
42 frame_sender_->OnReceivedCastFeedback(cast_message);
43 }
44
45 void FrameSender::RtcpClient::OnReceivedRtt(base::TimeDelta round_trip_time) {
46 if (frame_sender_)
47 frame_sender_->OnMeasuredRoundTripTime(round_trip_time);
48 }
49
50 void FrameSender::RtcpClient::OnReceivedPli() {
51 if (frame_sender_)
52 frame_sender_->OnReceivedPli();
53 }
54
34 FrameSender::FrameSender(scoped_refptr<CastEnvironment> cast_environment, 55 FrameSender::FrameSender(scoped_refptr<CastEnvironment> cast_environment,
35 bool is_audio, 56 bool is_audio,
36 CastTransport* const transport_sender, 57 CastTransport* const transport_sender,
37 int rtp_timebase, 58 int rtp_timebase,
38 uint32_t ssrc, 59 uint32_t ssrc,
39 double max_frame_rate, 60 double max_frame_rate,
40 base::TimeDelta min_playout_delay, 61 base::TimeDelta min_playout_delay,
41 base::TimeDelta max_playout_delay, 62 base::TimeDelta max_playout_delay,
42 base::TimeDelta animated_playout_delay, 63 base::TimeDelta animated_playout_delay,
43 CongestionControl* congestion_control) 64 CongestionControl* congestion_control)
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after
439 VLOG(1) << SENDER_SSRC << "Dropping: In-flight duration would be too high."; 460 VLOG(1) << SENDER_SSRC << "Dropping: In-flight duration would be too high.";
440 return true; 461 return true;
441 } 462 }
442 463
443 // Next frame is accepted. 464 // Next frame is accepted.
444 return false; 465 return false;
445 } 466 }
446 467
447 } // namespace cast 468 } // namespace cast
448 } // namespace media 469 } // namespace media
OLDNEW
« no previous file with comments | « media/cast/sender/frame_sender.h ('k') | media/cast/sender/video_sender.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698