| 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" |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 TransportAudioSender( | 25 TransportAudioSender( |
| 26 const CastTransportAudioConfig& config, | 26 const CastTransportAudioConfig& config, |
| 27 base::TickClock* clock, | 27 base::TickClock* clock, |
| 28 const scoped_refptr<base::SingleThreadTaskRunner>& transport_task_runner, | 28 const scoped_refptr<base::SingleThreadTaskRunner>& transport_task_runner, |
| 29 PacedSender* const paced_packet_sender); | 29 PacedSender* const paced_packet_sender); |
| 30 | 30 |
| 31 virtual ~TransportAudioSender(); | 31 virtual ~TransportAudioSender(); |
| 32 | 32 |
| 33 // Handles the encoded audio frames to be processed. | 33 // Handles the encoded audio frames to be processed. |
| 34 // Frames will be encrypted, packetized and transmitted to the network. | 34 // Frames will be encrypted, packetized and transmitted to the network. |
| 35 void InsertCodedAudioFrame(const EncodedAudioFrame* audio_frame, | 35 void SendFrame(const EncodedFrame& audio_frame); |
| 36 const base::TimeTicks& recorded_time); | |
| 37 | 36 |
| 38 // Retransmision request. | 37 // Retransmision request. |
| 39 void ResendPackets( | 38 void ResendPackets( |
| 40 const MissingFramesAndPacketsMap& missing_frames_and_packets); | 39 const MissingFramesAndPacketsMap& missing_frames_and_packets); |
| 41 | 40 |
| 42 size_t send_packet_count() const { return rtp_sender_.send_packet_count(); } | 41 size_t send_packet_count() const { return rtp_sender_.send_packet_count(); } |
| 43 size_t send_octet_count() const { return rtp_sender_.send_octet_count(); } | 42 size_t send_octet_count() const { return rtp_sender_.send_octet_count(); } |
| 44 uint32 ssrc() const { return rtp_sender_.ssrc(); } | 43 uint32 ssrc() const { return rtp_sender_.ssrc(); } |
| 45 bool initialized() const { return initialized_; } | 44 bool initialized() const { return initialized_; } |
| 46 | 45 |
| 47 private: | 46 private: |
| 48 friend class LocalRtcpAudioSenderFeedback; | 47 friend class LocalRtcpAudioSenderFeedback; |
| 49 | 48 |
| 50 // Caller must allocate the destination |encrypted_frame|. The data member | 49 // Caller must allocate the destination |encrypted_frame|. The data member |
| 51 // will be resized to hold the encrypted size. | 50 // will be resized to hold the encrypted size. |
| 52 bool EncryptAudioFrame(const EncodedAudioFrame& audio_frame, | 51 bool EncryptAudioFrame(const EncodedFrame& audio_frame, |
| 53 EncodedAudioFrame* encrypted_frame); | 52 EncodedFrame* encrypted_frame); |
| 54 | 53 |
| 55 RtpSender rtp_sender_; | 54 RtpSender rtp_sender_; |
| 56 TransportEncryptionHandler encryptor_; | 55 TransportEncryptionHandler encryptor_; |
| 57 bool initialized_; | 56 bool initialized_; |
| 58 | 57 |
| 59 DISALLOW_IMPLICIT_CONSTRUCTORS(TransportAudioSender); | 58 DISALLOW_IMPLICIT_CONSTRUCTORS(TransportAudioSender); |
| 60 }; | 59 }; |
| 61 | 60 |
| 62 } // namespace transport | 61 } // namespace transport |
| 63 } // namespace cast | 62 } // namespace cast |
| 64 } // namespace media | 63 } // namespace media |
| 65 | 64 |
| 66 #endif // MEDIA_CAST_TRANSPORT_TRANSPORT_AUDIO_SENDER_H_ | 65 #endif // MEDIA_CAST_TRANSPORT_TRANSPORT_AUDIO_SENDER_H_ |
| OLD | NEW |