| 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_SENDER_AUDIO_ENCODER_H_ | 5 #ifndef MEDIA_CAST_SENDER_AUDIO_ENCODER_H_ |
| 6 #define MEDIA_CAST_SENDER_AUDIO_ENCODER_H_ | 6 #define MEDIA_CAST_SENDER_AUDIO_ENCODER_H_ |
| 7 | 7 |
| 8 #include "base/memory/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/threading/thread_checker.h" | 10 #include "base/threading/thread_checker.h" |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 int GetSamplesPerFrame() const; | 38 int GetSamplesPerFrame() const; |
| 39 base::TimeDelta GetFrameDuration() const; | 39 base::TimeDelta GetFrameDuration() const; |
| 40 | 40 |
| 41 void InsertAudio(scoped_ptr<AudioBus> audio_bus, | 41 void InsertAudio(scoped_ptr<AudioBus> audio_bus, |
| 42 const base::TimeTicks& recorded_time); | 42 const base::TimeTicks& recorded_time); |
| 43 | 43 |
| 44 private: | 44 private: |
| 45 class ImplBase; | 45 class ImplBase; |
| 46 class OpusImpl; | 46 class OpusImpl; |
| 47 class Pcm16Impl; | 47 class Pcm16Impl; |
| 48 class AppleAacImpl; |
| 48 | 49 |
| 49 const scoped_refptr<CastEnvironment> cast_environment_; | 50 const scoped_refptr<CastEnvironment> cast_environment_; |
| 50 scoped_refptr<ImplBase> impl_; | 51 scoped_refptr<ImplBase> impl_; |
| 51 | 52 |
| 52 // Used to ensure only one thread invokes InsertAudio(). | 53 // Used to ensure only one thread invokes InsertAudio(). |
| 53 base::ThreadChecker insert_thread_checker_; | 54 base::ThreadChecker insert_thread_checker_; |
| 54 | 55 |
| 55 DISALLOW_COPY_AND_ASSIGN(AudioEncoder); | 56 DISALLOW_COPY_AND_ASSIGN(AudioEncoder); |
| 56 }; | 57 }; |
| 57 | 58 |
| 58 } // namespace cast | 59 } // namespace cast |
| 59 } // namespace media | 60 } // namespace media |
| 60 | 61 |
| 61 #endif // MEDIA_CAST_SENDER_AUDIO_ENCODER_H_ | 62 #endif // MEDIA_CAST_SENDER_AUDIO_ENCODER_H_ |
| OLD | NEW |