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

Side by Side Diff: media/cast/receiver/frame_receiver.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/receiver/cast_receiver_impl.cc ('k') | media/cast/receiver/frame_receiver.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_RECEIVER_FRAME_RECEIVER_H_ 5 #ifndef MEDIA_CAST_RECEIVER_FRAME_RECEIVER_H_
6 #define MEDIA_CAST_RECEIVER_FRAME_RECEIVER_H_ 6 #define MEDIA_CAST_RECEIVER_FRAME_RECEIVER_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
11 #include <list> 11 #include <list>
12 12
13 #include "base/macros.h" 13 #include "base/macros.h"
14 #include "base/memory/ref_counted.h" 14 #include "base/memory/ref_counted.h"
15 #include "base/memory/scoped_ptr.h" 15 #include "base/memory/scoped_ptr.h"
16 #include "base/memory/weak_ptr.h" 16 #include "base/memory/weak_ptr.h"
17 #include "base/time/time.h" 17 #include "base/time/time.h"
18 #include "media/cast/cast_receiver.h" 18 #include "media/cast/cast_receiver.h"
19 #include "media/cast/common/clock_drift_smoother.h" 19 #include "media/cast/common/clock_drift_smoother.h"
20 #include "media/cast/common/rtp_time.h"
20 #include "media/cast/common/transport_encryption_handler.h" 21 #include "media/cast/common/transport_encryption_handler.h"
21 #include "media/cast/logging/logging_defines.h" 22 #include "media/cast/logging/logging_defines.h"
22 #include "media/cast/net/rtcp/receiver_rtcp_event_subscriber.h" 23 #include "media/cast/net/rtcp/receiver_rtcp_event_subscriber.h"
23 #include "media/cast/net/rtcp/rtcp.h" 24 #include "media/cast/net/rtcp/rtcp.h"
24 #include "media/cast/net/rtp/framer.h" 25 #include "media/cast/net/rtp/framer.h"
25 #include "media/cast/net/rtp/receiver_stats.h" 26 #include "media/cast/net/rtp/receiver_stats.h"
26 #include "media/cast/net/rtp/rtp_defines.h" 27 #include "media/cast/net/rtp/rtp_defines.h"
27 #include "media/cast/net/rtp/rtp_parser.h" 28 #include "media/cast/net/rtp/rtp_parser.h"
28 29
29 namespace media { 30 namespace media {
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 168
168 // Outstanding callbacks to run to deliver on client requests for frames. 169 // Outstanding callbacks to run to deliver on client requests for frames.
169 std::list<ReceiveEncodedFrameCallback> frame_request_queue_; 170 std::list<ReceiveEncodedFrameCallback> frame_request_queue_;
170 171
171 // True while there's an outstanding task to re-invoke 172 // True while there's an outstanding task to re-invoke
172 // EmitAvailableEncodedFrames(). 173 // EmitAvailableEncodedFrames().
173 bool is_waiting_for_consecutive_frame_; 174 bool is_waiting_for_consecutive_frame_;
174 175
175 // This mapping allows us to log FRAME_ACK_SENT as a frame event. In addition 176 // This mapping allows us to log FRAME_ACK_SENT as a frame event. In addition
176 // it allows the event to be transmitted via RTCP. 177 // it allows the event to be transmitted via RTCP.
177 RtpTimestamp frame_id_to_rtp_timestamp_[256]; 178 RtpTimeTicks frame_id_to_rtp_timestamp_[256];
178 179
179 // Lip-sync values used to compute the playout time of each frame from its RTP 180 // Lip-sync values used to compute the playout time of each frame from its RTP
180 // timestamp. These are updated each time the first packet of a frame is 181 // timestamp. These are updated each time the first packet of a frame is
181 // received. 182 // received.
182 RtpTimestamp lip_sync_rtp_timestamp_; 183 RtpTimeTicks lip_sync_rtp_timestamp_;
183 base::TimeTicks lip_sync_reference_time_; 184 base::TimeTicks lip_sync_reference_time_;
184 ClockDriftSmoother lip_sync_drift_; 185 ClockDriftSmoother lip_sync_drift_;
185 186
186 // NOTE: Weak pointers must be invalidated before all other member variables. 187 // NOTE: Weak pointers must be invalidated before all other member variables.
187 base::WeakPtrFactory<FrameReceiver> weak_factory_; 188 base::WeakPtrFactory<FrameReceiver> weak_factory_;
188 189
189 DISALLOW_COPY_AND_ASSIGN(FrameReceiver); 190 DISALLOW_COPY_AND_ASSIGN(FrameReceiver);
190 }; 191 };
191 192
192 } // namespace cast 193 } // namespace cast
193 } // namespace media 194 } // namespace media
194 195
195 #endif // MEDIA_CAST_RECEIVER_FRAME_RECEIVER_H_ 196 #endif // MEDIA_CAST_RECEIVER_FRAME_RECEIVER_H_
OLDNEW
« no previous file with comments | « media/cast/receiver/cast_receiver_impl.cc ('k') | media/cast/receiver/frame_receiver.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698