| 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 | 13 #include "media/cast/transport/utility/transport_encryption_handler.h" |
| 14 namespace crypto { | |
| 15 class Encryptor; | |
| 16 class SymmetricKey; | |
| 17 } | |
| 18 | 14 |
| 19 namespace media { | 15 namespace media { |
| 20 namespace cast { | 16 namespace cast { |
| 21 namespace transport { | 17 namespace transport { |
| 22 | 18 |
| 23 class PacedSender; | 19 class PacedSender; |
| 24 | 20 |
| 25 // It's only called from the main cast transport thread. | 21 // It's only called from the main cast transport thread. |
| 26 class TransportAudioSender : public base::NonThreadSafe { | 22 class TransportAudioSender : public base::NonThreadSafe { |
| 27 public: | 23 public: |
| (...skipping 19 matching lines...) Expand all Loading... |
| 47 | 43 |
| 48 private: | 44 private: |
| 49 friend class LocalRtcpAudioSenderFeedback; | 45 friend class LocalRtcpAudioSenderFeedback; |
| 50 | 46 |
| 51 // Caller must allocate the destination |encrypted_frame|. The data member | 47 // Caller must allocate the destination |encrypted_frame|. The data member |
| 52 // will be resized to hold the encrypted size. | 48 // will be resized to hold the encrypted size. |
| 53 bool EncryptAudioFrame(const EncodedAudioFrame& audio_frame, | 49 bool EncryptAudioFrame(const EncodedAudioFrame& audio_frame, |
| 54 EncodedAudioFrame* encrypted_frame); | 50 EncodedAudioFrame* encrypted_frame); |
| 55 | 51 |
| 56 RtpSender rtp_sender_; | 52 RtpSender rtp_sender_; |
| 53 TransportEncryptionHandler encryptor_; |
| 57 bool initialized_; | 54 bool initialized_; |
| 58 scoped_ptr<crypto::SymmetricKey> key_; | 55 |
| 59 scoped_ptr<crypto::Encryptor> encryptor_; | |
| 60 std::string iv_mask_; | |
| 61 | 56 |
| 62 DISALLOW_IMPLICIT_CONSTRUCTORS(TransportAudioSender); | 57 DISALLOW_IMPLICIT_CONSTRUCTORS(TransportAudioSender); |
| 63 }; | 58 }; |
| 64 | 59 |
| 65 } // namespace transport | 60 } // namespace transport |
| 66 } // namespace cast | 61 } // namespace cast |
| 67 } // namespace media | 62 } // namespace media |
| 68 | 63 |
| 69 #endif // MEDIA_CAST_TRANSPORT_TRANSPORT_AUDIO_SENDER_H_ | 64 #endif // MEDIA_CAST_TRANSPORT_TRANSPORT_AUDIO_SENDER_H_ |
| OLD | NEW |