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" |
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 "crypto/encryptor.h" | |
15 #include "media/cast/cast_config.h" | 16 #include "media/cast/cast_config.h" |
16 #include "media/cast/cast_environment.h" | 17 #include "media/cast/cast_environment.h" |
17 #include "media/cast/rtcp/rtcp.h" | 18 #include "media/cast/rtcp/rtcp.h" |
18 #include "media/cast/rtp_sender/rtp_sender.h" | 19 #include "media/cast/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; |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
59 protected: | 60 protected: |
60 void SendEncodedAudioFrame(scoped_ptr<EncodedAudioFrame> audio_frame, | 61 void SendEncodedAudioFrame(scoped_ptr<EncodedAudioFrame> audio_frame, |
61 const base::TimeTicks& recorded_time); | 62 const base::TimeTicks& recorded_time); |
62 | 63 |
63 private: | 64 private: |
64 friend class LocalRtcpAudioSenderFeedback; | 65 friend class LocalRtcpAudioSenderFeedback; |
65 | 66 |
66 void ResendPackets( | 67 void ResendPackets( |
67 const MissingFramesAndPacketsMap& missing_frames_and_packets); | 68 const MissingFramesAndPacketsMap& missing_frames_and_packets); |
68 | 69 |
70 bool EncryptAudioFrame(const EncodedAudioFrame* audio_frame, | |
Alpha Left Google
2013/11/07 01:10:11
Why not just return scoped_ptr<T>?
pwestin
2013/11/07 17:16:04
Same as above; I think this is cleaner since the p
| |
71 EncodedAudioFrame* encrypted_frame); | |
72 | |
69 void ScheduleNextRtcpReport(); | 73 void ScheduleNextRtcpReport(); |
70 void SendRtcpReport(); | 74 void SendRtcpReport(); |
71 | 75 |
72 base::WeakPtrFactory<AudioSender> weak_factory_; | 76 base::WeakPtrFactory<AudioSender> weak_factory_; |
73 | 77 |
74 const uint32 incoming_feedback_ssrc_; | 78 const uint32 incoming_feedback_ssrc_; |
75 scoped_refptr<CastEnvironment> cast_environment_; | 79 scoped_refptr<CastEnvironment> cast_environment_; |
76 scoped_refptr<AudioEncoder> audio_encoder_; | 80 scoped_refptr<AudioEncoder> audio_encoder_; |
77 RtpSender rtp_sender_; | 81 RtpSender rtp_sender_; |
78 scoped_ptr<LocalRtpSenderStatistics> rtp_audio_sender_statistics_; | 82 scoped_ptr<LocalRtpSenderStatistics> rtp_audio_sender_statistics_; |
79 scoped_ptr<LocalRtcpAudioSenderFeedback> rtcp_feedback_; | 83 scoped_ptr<LocalRtcpAudioSenderFeedback> rtcp_feedback_; |
80 Rtcp rtcp_; | 84 Rtcp rtcp_; |
85 scoped_ptr<crypto::Encryptor> encryptor_; | |
86 std::string iv_mask_; | |
81 | 87 |
82 DISALLOW_COPY_AND_ASSIGN(AudioSender); | 88 DISALLOW_COPY_AND_ASSIGN(AudioSender); |
83 }; | 89 }; |
84 | 90 |
85 } // namespace cast | 91 } // namespace cast |
86 } // namespace media | 92 } // namespace media |
87 | 93 |
88 #endif // MEDIA_CAST_AUDIO_SENDER_H_ | 94 #endif // MEDIA_CAST_AUDIO_SENDER_H_ |
89 | 95 |
OLD | NEW |