OLD | NEW |
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" |
(...skipping 28 matching lines...) Expand all Loading... |
39 return cast_initialization_cb_; | 39 return cast_initialization_cb_; |
40 } | 40 } |
41 | 41 |
42 void InsertAudio(scoped_ptr<AudioBus> audio_bus, | 42 void InsertAudio(scoped_ptr<AudioBus> audio_bus, |
43 const base::TimeTicks& recorded_time); | 43 const base::TimeTicks& recorded_time); |
44 | 44 |
45 // Only called from the main cast thread. | 45 // Only called from the main cast thread. |
46 void IncomingRtcpPacket(scoped_ptr<Packet> packet); | 46 void IncomingRtcpPacket(scoped_ptr<Packet> packet); |
47 | 47 |
48 protected: | 48 protected: |
49 void SendEncodedAudioFrame( | 49 void SendEncodedAudioFrame(scoped_ptr<transport::EncodedFrame> audio_frame); |
50 scoped_ptr<transport::EncodedAudioFrame> audio_frame, | |
51 const base::TimeTicks& recorded_time); | |
52 | 50 |
53 private: | 51 private: |
54 friend class LocalRtcpAudioSenderFeedback; | 52 friend class LocalRtcpAudioSenderFeedback; |
55 | 53 |
56 void ResendPackets( | 54 void ResendPackets( |
57 const MissingFramesAndPacketsMap& missing_frames_and_packets); | 55 const MissingFramesAndPacketsMap& missing_frames_and_packets); |
58 | 56 |
59 void ScheduleNextRtcpReport(); | 57 void ScheduleNextRtcpReport(); |
60 void SendRtcpReport(); | 58 void SendRtcpReport(); |
61 | 59 |
(...skipping 11 matching lines...) Expand all Loading... |
73 // NOTE: Weak pointers must be invalidated before all other member variables. | 71 // NOTE: Weak pointers must be invalidated before all other member variables. |
74 base::WeakPtrFactory<AudioSender> weak_factory_; | 72 base::WeakPtrFactory<AudioSender> weak_factory_; |
75 | 73 |
76 DISALLOW_COPY_AND_ASSIGN(AudioSender); | 74 DISALLOW_COPY_AND_ASSIGN(AudioSender); |
77 }; | 75 }; |
78 | 76 |
79 } // namespace cast | 77 } // namespace cast |
80 } // namespace media | 78 } // namespace media |
81 | 79 |
82 #endif // MEDIA_CAST_AUDIO_SENDER_H_ | 80 #endif // MEDIA_CAST_AUDIO_SENDER_H_ |
OLD | NEW |