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

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

Issue 1012573002: Remove rtcp_interval from cast_config (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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/audio_sender.cc ('k') | media/cast/sender/frame_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 // This is the base class for an object that send frames to a receiver. 5 // This is the base class for an object that send frames to a receiver.
6 // TODO(hclam): Refactor such that there is no separate AudioSender vs. 6 // TODO(hclam): Refactor such that there is no separate AudioSender vs.
7 // VideoSender, and the functionality of both is rolled into this class. 7 // VideoSender, and the functionality of both is rolled into this class.
8 8
9 #ifndef MEDIA_CAST_SENDER_FRAME_SENDER_H_ 9 #ifndef MEDIA_CAST_SENDER_FRAME_SENDER_H_
10 #define MEDIA_CAST_SENDER_FRAME_SENDER_H_ 10 #define MEDIA_CAST_SENDER_FRAME_SENDER_H_
11 11
12 #include "base/basictypes.h" 12 #include "base/basictypes.h"
13 #include "base/memory/ref_counted.h" 13 #include "base/memory/ref_counted.h"
14 #include "base/memory/weak_ptr.h" 14 #include "base/memory/weak_ptr.h"
15 #include "base/time/time.h" 15 #include "base/time/time.h"
16 #include "media/cast/cast_environment.h" 16 #include "media/cast/cast_environment.h"
17 #include "media/cast/net/rtcp/rtcp.h" 17 #include "media/cast/net/rtcp/rtcp.h"
18 #include "media/cast/sender/congestion_control.h" 18 #include "media/cast/sender/congestion_control.h"
19 19
20 namespace media { 20 namespace media {
21 namespace cast { 21 namespace cast {
22 22
23 class FrameSender { 23 class FrameSender {
24 public: 24 public:
25 FrameSender(scoped_refptr<CastEnvironment> cast_environment, 25 FrameSender(scoped_refptr<CastEnvironment> cast_environment,
26 bool is_audio, 26 bool is_audio,
27 CastTransportSender* const transport_sender, 27 CastTransportSender* const transport_sender,
28 base::TimeDelta rtcp_interval,
29 int rtp_timebase, 28 int rtp_timebase,
30 uint32 ssrc, 29 uint32 ssrc,
31 double max_frame_rate, 30 double max_frame_rate,
32 base::TimeDelta min_playout_delay, 31 base::TimeDelta min_playout_delay,
33 base::TimeDelta max_playout_delay, 32 base::TimeDelta max_playout_delay,
34 CongestionControl* congestion_control); 33 CongestionControl* congestion_control);
35 virtual ~FrameSender(); 34 virtual ~FrameSender();
36 35
37 int rtp_timebase() const { return rtp_timebase_; } 36 int rtp_timebase() const { return rtp_timebase_; }
38 37
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 // media::cast::kMaxUnackedFrames. 99 // media::cast::kMaxUnackedFrames.
101 void RecordLatestFrameTimestamps(uint32 frame_id, 100 void RecordLatestFrameTimestamps(uint32 frame_id,
102 base::TimeTicks reference_time, 101 base::TimeTicks reference_time,
103 RtpTimestamp rtp_timestamp); 102 RtpTimestamp rtp_timestamp);
104 base::TimeTicks GetRecordedReferenceTime(uint32 frame_id) const; 103 base::TimeTicks GetRecordedReferenceTime(uint32 frame_id) const;
105 RtpTimestamp GetRecordedRtpTimestamp(uint32 frame_id) const; 104 RtpTimestamp GetRecordedRtpTimestamp(uint32 frame_id) const;
106 105
107 // Returns the number of frames that were sent but not yet acknowledged. 106 // Returns the number of frames that were sent but not yet acknowledged.
108 int GetUnacknowledgedFrameCount() const; 107 int GetUnacknowledgedFrameCount() const;
109 108
110 const base::TimeDelta rtcp_interval_;
111
112 // The total amount of time between a frame's capture/recording on the sender 109 // The total amount of time between a frame's capture/recording on the sender
113 // and its playback on the receiver (i.e., shown to a user). This is fixed as 110 // and its playback on the receiver (i.e., shown to a user). This is fixed as
114 // a value large enough to give the system sufficient time to encode, 111 // a value large enough to give the system sufficient time to encode,
115 // transmit/retransmit, receive, decode, and render; given its run-time 112 // transmit/retransmit, receive, decode, and render; given its run-time
116 // environment (sender/receiver hardware performance, network conditions, 113 // environment (sender/receiver hardware performance, network conditions,
117 // etc.). 114 // etc.).
118 base::TimeDelta target_playout_delay_; 115 base::TimeDelta target_playout_delay_;
119 base::TimeDelta min_playout_delay_; 116 base::TimeDelta min_playout_delay_;
120 base::TimeDelta max_playout_delay_; 117 base::TimeDelta max_playout_delay_;
121 118
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 // NOTE: Weak pointers must be invalidated before all other member variables. 173 // NOTE: Weak pointers must be invalidated before all other member variables.
177 base::WeakPtrFactory<FrameSender> weak_factory_; 174 base::WeakPtrFactory<FrameSender> weak_factory_;
178 175
179 DISALLOW_COPY_AND_ASSIGN(FrameSender); 176 DISALLOW_COPY_AND_ASSIGN(FrameSender);
180 }; 177 };
181 178
182 } // namespace cast 179 } // namespace cast
183 } // namespace media 180 } // namespace media
184 181
185 #endif // MEDIA_CAST_SENDER_FRAME_SENDER_H_ 182 #endif // MEDIA_CAST_SENDER_FRAME_SENDER_H_
OLDNEW
« no previous file with comments | « media/cast/sender/audio_sender.cc ('k') | media/cast/sender/frame_sender.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698