OLD | NEW |
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_TRANSPORT_TRANSPORT_AUDIO_SENDER_H_ | 5 #ifndef MEDIA_CAST_TRANSPORT_TRANSPORT_AUDIO_SENDER_H_ |
6 #define MEDIA_CAST_TRANSPORT_TRANSPORT_AUDIO_SENDER_H_ | 6 #define MEDIA_CAST_TRANSPORT_TRANSPORT_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/threading/non_thread_safe.h" | 11 #include "base/threading/non_thread_safe.h" |
12 #include "media/cast/transport/rtp_sender/rtp_sender.h" | 12 #include "media/cast/transport/rtp_sender/rtp_sender.h" |
13 #include "media/cast/transport/utility/transport_encryption_handler.h" | 13 #include "media/cast/transport/utility/transport_encryption_handler.h" |
14 | 14 |
15 namespace media { | 15 namespace media { |
16 namespace cast { | 16 namespace cast { |
17 | 17 |
18 class LoggingImpl; | |
19 | |
20 namespace transport { | 18 namespace transport { |
21 | 19 |
22 class PacedSender; | 20 class PacedSender; |
23 | 21 |
24 // It's only called from the main cast transport thread. | 22 // It's only called from the main cast transport thread. |
25 class TransportAudioSender : public base::NonThreadSafe { | 23 class TransportAudioSender : public base::NonThreadSafe { |
26 public: | 24 public: |
27 TransportAudioSender( | 25 TransportAudioSender( |
28 const CastTransportAudioConfig& config, | 26 const CastTransportAudioConfig& config, |
29 base::TickClock* clock, | 27 base::TickClock* clock, |
30 LoggingImpl* logging, | |
31 const scoped_refptr<base::SingleThreadTaskRunner>& transport_task_runner, | 28 const scoped_refptr<base::SingleThreadTaskRunner>& transport_task_runner, |
32 PacedSender* const paced_packet_sender); | 29 PacedSender* const paced_packet_sender); |
33 | 30 |
34 virtual ~TransportAudioSender(); | 31 virtual ~TransportAudioSender(); |
35 | 32 |
36 // Handles the encoded audio frames to be processed. | 33 // Handles the encoded audio frames to be processed. |
37 // Frames will be encrypted, packetized and transmitted to the network. | 34 // Frames will be encrypted, packetized and transmitted to the network. |
38 void InsertCodedAudioFrame(const EncodedAudioFrame* audio_frame, | 35 void InsertCodedAudioFrame(const EncodedAudioFrame* audio_frame, |
39 const base::TimeTicks& recorded_time); | 36 const base::TimeTicks& recorded_time); |
40 | 37 |
(...skipping 20 matching lines...) Expand all Loading... |
61 bool initialized_; | 58 bool initialized_; |
62 | 59 |
63 DISALLOW_IMPLICIT_CONSTRUCTORS(TransportAudioSender); | 60 DISALLOW_IMPLICIT_CONSTRUCTORS(TransportAudioSender); |
64 }; | 61 }; |
65 | 62 |
66 } // namespace transport | 63 } // namespace transport |
67 } // namespace cast | 64 } // namespace cast |
68 } // namespace media | 65 } // namespace media |
69 | 66 |
70 #endif // MEDIA_CAST_TRANSPORT_TRANSPORT_AUDIO_SENDER_H_ | 67 #endif // MEDIA_CAST_TRANSPORT_TRANSPORT_AUDIO_SENDER_H_ |
OLD | NEW |