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

Side by Side Diff: media/cast/audio_sender/audio_sender.h

Issue 281453003: Cast: Simplify code path for RTCP sender report (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merged Created 6 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 | Annotate | Revision Log
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 #ifndef MEDIA_CAST_AUDIO_SENDER_H_ 5 #ifndef MEDIA_CAST_AUDIO_SENDER_H_
6 #define MEDIA_CAST_AUDIO_SENDER_H_ 6 #define MEDIA_CAST_AUDIO_SENDER_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/memory/ref_counted.h" 9 #include "base/memory/ref_counted.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
11 #include "base/memory/weak_ptr.h" 11 #include "base/memory/weak_ptr.h"
12 #include "base/threading/non_thread_safe.h" 12 #include "base/threading/non_thread_safe.h"
13 #include "base/time/tick_clock.h" 13 #include "base/time/tick_clock.h"
14 #include "base/time/time.h" 14 #include "base/time/time.h"
15 #include "media/base/audio_bus.h" 15 #include "media/base/audio_bus.h"
16 #include "media/cast/cast_config.h" 16 #include "media/cast/cast_config.h"
17 #include "media/cast/rtcp/rtcp.h" 17 #include "media/cast/rtcp/rtcp.h"
18 #include "media/cast/rtp_timestamp_helper.h"
18 #include "media/cast/transport/rtp_sender/rtp_sender.h" 19 #include "media/cast/transport/rtp_sender/rtp_sender.h"
19 20
20 namespace media { 21 namespace media {
21 namespace cast { 22 namespace cast {
22 23
23 class AudioEncoder; 24 class AudioEncoder;
24 class LocalRtcpAudioSenderFeedback; 25 class LocalRtcpAudioSenderFeedback;
25 26
26 // This class is not thread safe. 27 // This class is not thread safe.
27 // It's only called from the main cast thread. 28 // It's only called from the main cast thread.
(...skipping 20 matching lines...) Expand all
48 void SendEncodedAudioFrame( 49 void SendEncodedAudioFrame(
49 scoped_ptr<transport::EncodedAudioFrame> audio_frame, 50 scoped_ptr<transport::EncodedAudioFrame> audio_frame,
50 const base::TimeTicks& recorded_time); 51 const base::TimeTicks& recorded_time);
51 52
52 private: 53 private:
53 friend class LocalRtcpAudioSenderFeedback; 54 friend class LocalRtcpAudioSenderFeedback;
54 55
55 void ResendPackets( 56 void ResendPackets(
56 const MissingFramesAndPacketsMap& missing_frames_and_packets); 57 const MissingFramesAndPacketsMap& missing_frames_and_packets);
57 58
58 void StoreStatistics(const transport::RtcpSenderInfo& sender_info,
59 base::TimeTicks time_sent,
60 uint32 rtp_timestamp);
61
62 void ScheduleNextRtcpReport(); 59 void ScheduleNextRtcpReport();
63 void SendRtcpReport(); 60 void SendRtcpReport();
64 61
65 void InitializeTimers(); 62 void InitializeTimers();
66 63
67 scoped_refptr<CastEnvironment> cast_environment_; 64 scoped_refptr<CastEnvironment> cast_environment_;
68 transport::CastTransportSender* const transport_sender_; 65 transport::CastTransportSender* const transport_sender_;
69 scoped_ptr<AudioEncoder> audio_encoder_; 66 scoped_ptr<AudioEncoder> audio_encoder_;
70 RtpSenderStatistics rtp_stats_; 67 RtpTimestampHelper rtp_timestamp_helper_;
71 scoped_ptr<LocalRtcpAudioSenderFeedback> rtcp_feedback_; 68 scoped_ptr<LocalRtcpAudioSenderFeedback> rtcp_feedback_;
72 Rtcp rtcp_; 69 Rtcp rtcp_;
73 bool timers_initialized_; 70 bool timers_initialized_;
74 CastInitializationStatus cast_initialization_cb_; 71 CastInitializationStatus cast_initialization_cb_;
75 72
76 // NOTE: Weak pointers must be invalidated before all other member variables. 73 // NOTE: Weak pointers must be invalidated before all other member variables.
77 base::WeakPtrFactory<AudioSender> weak_factory_; 74 base::WeakPtrFactory<AudioSender> weak_factory_;
78 75
79 DISALLOW_COPY_AND_ASSIGN(AudioSender); 76 DISALLOW_COPY_AND_ASSIGN(AudioSender);
80 }; 77 };
81 78
82 } // namespace cast 79 } // namespace cast
83 } // namespace media 80 } // namespace media
84 81
85 #endif // MEDIA_CAST_AUDIO_SENDER_H_ 82 #endif // MEDIA_CAST_AUDIO_SENDER_H_
OLDNEW
« no previous file with comments | « chrome/renderer/media/cast_transport_sender_ipc.cc ('k') | media/cast/audio_sender/audio_sender.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698