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

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

Issue 1515433002: Replace uses of raw uint32's with a type-checked RtpTimeTicks data type. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Speculative workaround fix for win8_chromium_ng compile error. Created 4 years, 11 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/video_encoder_unittest.cc ('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 #ifndef MEDIA_CAST_SENDER_VIDEO_SENDER_H_ 5 #ifndef MEDIA_CAST_SENDER_VIDEO_SENDER_H_
6 #define MEDIA_CAST_SENDER_VIDEO_SENDER_H_ 6 #define MEDIA_CAST_SENDER_VIDEO_SENDER_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
11 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
12 #include "base/memory/weak_ptr.h" 12 #include "base/memory/weak_ptr.h"
13 #include "base/threading/non_thread_safe.h" 13 #include "base/threading/non_thread_safe.h"
14 #include "base/time/tick_clock.h" 14 #include "base/time/tick_clock.h"
15 #include "base/time/time.h" 15 #include "base/time/time.h"
16 #include "media/cast/cast_config.h" 16 #include "media/cast/cast_config.h"
17 #include "media/cast/cast_sender.h" 17 #include "media/cast/cast_sender.h"
18 #include "media/cast/common/rtp_time.h"
18 #include "media/cast/sender/congestion_control.h" 19 #include "media/cast/sender/congestion_control.h"
19 #include "media/cast/sender/frame_sender.h" 20 #include "media/cast/sender/frame_sender.h"
20 21
21 namespace media { 22 namespace media {
22 23
23 class VideoFrame; 24 class VideoFrame;
24 25
25 namespace cast { 26 namespace cast {
26 27
27 class CastTransportSender; 28 class CastTransportSender;
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 // a hardware-based encoder. 84 // a hardware-based encoder.
84 scoped_ptr<VideoEncoder> video_encoder_; 85 scoped_ptr<VideoEncoder> video_encoder_;
85 86
86 // The number of frames queued for encoding, but not yet sent. 87 // The number of frames queued for encoding, but not yet sent.
87 int frames_in_encoder_; 88 int frames_in_encoder_;
88 89
89 // The duration of video queued for encoding, but not yet sent. 90 // The duration of video queued for encoding, but not yet sent.
90 base::TimeDelta duration_in_encoder_; 91 base::TimeDelta duration_in_encoder_;
91 92
92 // The timestamp of the frame that was last enqueued in |video_encoder_|. 93 // The timestamp of the frame that was last enqueued in |video_encoder_|.
93 RtpTimestamp last_enqueued_frame_rtp_timestamp_; 94 RtpTimeTicks last_enqueued_frame_rtp_timestamp_;
94 base::TimeTicks last_enqueued_frame_reference_time_; 95 base::TimeTicks last_enqueued_frame_reference_time_;
95 96
96 // Remember what we set the bitrate to before, no need to set it again if 97 // Remember what we set the bitrate to before, no need to set it again if
97 // we get the same value. 98 // we get the same value.
98 int last_bitrate_; 99 int last_bitrate_;
99 100
100 PlayoutDelayChangeCB playout_delay_change_cb_; 101 PlayoutDelayChangeCB playout_delay_change_cb_;
101 102
102 // Indicates we are operating in a mode where the target playout latency is 103 // Indicates we are operating in a mode where the target playout latency is
103 // low for best user experience. When operating in low latency mode, we 104 // low for best user experience. When operating in low latency mode, we
104 // prefer dropping frames over increasing target playout time. 105 // prefer dropping frames over increasing target playout time.
105 bool low_latency_mode_; 106 bool low_latency_mode_;
106 107
107 // The video encoder's performance metrics as of the last call to 108 // The video encoder's performance metrics as of the last call to
108 // OnEncodedVideoFrame(). See header file comments for SenderEncodedFrame for 109 // OnEncodedVideoFrame(). See header file comments for SenderEncodedFrame for
109 // an explanation of these values. 110 // an explanation of these values.
110 double last_reported_deadline_utilization_; 111 double last_reported_deadline_utilization_;
111 double last_reported_lossy_utilization_; 112 double last_reported_lossy_utilization_;
112 113
113 // NOTE: Weak pointers must be invalidated before all other member variables. 114 // NOTE: Weak pointers must be invalidated before all other member variables.
114 base::WeakPtrFactory<VideoSender> weak_factory_; 115 base::WeakPtrFactory<VideoSender> weak_factory_;
115 116
116 DISALLOW_COPY_AND_ASSIGN(VideoSender); 117 DISALLOW_COPY_AND_ASSIGN(VideoSender);
117 }; 118 };
118 119
119 } // namespace cast 120 } // namespace cast
120 } // namespace media 121 } // namespace media
121 122
122 #endif // MEDIA_CAST_SENDER_VIDEO_SENDER_H_ 123 #endif // MEDIA_CAST_SENDER_VIDEO_SENDER_H_
OLDNEW
« no previous file with comments | « media/cast/sender/video_encoder_unittest.cc ('k') | media/cast/sender/video_sender.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698