| 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 21 matching lines...) Expand all Loading... |
| 32 class AudioSender : public base::NonThreadSafe, | 32 class AudioSender : public base::NonThreadSafe, |
| 33 public base::SupportsWeakPtr<AudioSender> { | 33 public base::SupportsWeakPtr<AudioSender> { |
| 34 public: | 34 public: |
| 35 AudioSender(scoped_refptr<CastEnvironment> cast_environment, | 35 AudioSender(scoped_refptr<CastEnvironment> cast_environment, |
| 36 const AudioSenderConfig& audio_config, | 36 const AudioSenderConfig& audio_config, |
| 37 transport::CastTransportSender* const transport_sender); | 37 transport::CastTransportSender* const transport_sender); |
| 38 | 38 |
| 39 virtual ~AudioSender(); | 39 virtual ~AudioSender(); |
| 40 | 40 |
| 41 CastInitializationStatus InitializationResult() const { | 41 CastInitializationStatus InitializationResult() const { |
| 42 return initialization_status_; | 42 return cast_initialization_cb_; |
| 43 } | 43 } |
| 44 | 44 |
| 45 // The |audio_bus| must be valid until the |done_callback| is called. | 45 // The |audio_bus| must be valid until the |done_callback| is called. |
| 46 // The callback is called from the main cast thread as soon as the encoder is | 46 // The callback is called from the main cast thread as soon as the encoder is |
| 47 // done with |audio_bus|; it does not mean that the encoded data has been | 47 // done with |audio_bus|; it does not mean that the encoded data has been |
| 48 // sent out. | 48 // sent out. |
| 49 void InsertAudio(const AudioBus* audio_bus, | 49 void InsertAudio(const AudioBus* audio_bus, |
| 50 const base::TimeTicks& recorded_time, | 50 const base::TimeTicks& recorded_time, |
| 51 const base::Closure& done_callback); | 51 const base::Closure& done_callback); |
| 52 | 52 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 78 | 78 |
| 79 base::WeakPtrFactory<AudioSender> weak_factory_; | 79 base::WeakPtrFactory<AudioSender> weak_factory_; |
| 80 | 80 |
| 81 scoped_refptr<CastEnvironment> cast_environment_; | 81 scoped_refptr<CastEnvironment> cast_environment_; |
| 82 transport::CastTransportSender* const transport_sender_; | 82 transport::CastTransportSender* const transport_sender_; |
| 83 scoped_refptr<AudioEncoder> audio_encoder_; | 83 scoped_refptr<AudioEncoder> audio_encoder_; |
| 84 scoped_ptr<LocalRtpSenderStatistics> rtp_audio_sender_statistics_; | 84 scoped_ptr<LocalRtpSenderStatistics> rtp_audio_sender_statistics_; |
| 85 scoped_ptr<LocalRtcpAudioSenderFeedback> rtcp_feedback_; | 85 scoped_ptr<LocalRtcpAudioSenderFeedback> rtcp_feedback_; |
| 86 Rtcp rtcp_; | 86 Rtcp rtcp_; |
| 87 bool timers_initialized_; | 87 bool timers_initialized_; |
| 88 CastInitializationStatus initialization_status_; | 88 CastInitializationStatus cast_initialization_cb_; |
| 89 | 89 |
| 90 DISALLOW_COPY_AND_ASSIGN(AudioSender); | 90 DISALLOW_COPY_AND_ASSIGN(AudioSender); |
| 91 }; | 91 }; |
| 92 | 92 |
| 93 } // namespace cast | 93 } // namespace cast |
| 94 } // namespace media | 94 } // namespace media |
| 95 | 95 |
| 96 #endif // MEDIA_CAST_AUDIO_SENDER_H_ | 96 #endif // MEDIA_CAST_AUDIO_SENDER_H_ |
| OLD | NEW |