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_RECEIVER_AUDIO_DECODER_H_ | 5 #ifndef MEDIA_CAST_AUDIO_RECEIVER_AUDIO_DECODER_H_ |
6 #define MEDIA_CAST_AUDIO_RECEIVER_AUDIO_DECODER_H_ | 6 #define MEDIA_CAST_AUDIO_RECEIVER_AUDIO_DECODER_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 "media/base/audio_bus.h" | 10 #include "media/base/audio_bus.h" |
(...skipping 24 matching lines...) Expand all Loading... |
35 // other value, calls to DecodeFrame() will not succeed. | 35 // other value, calls to DecodeFrame() will not succeed. |
36 CastInitializationStatus InitializationResult() const; | 36 CastInitializationStatus InitializationResult() const; |
37 | 37 |
38 // Decode the payload in |encoded_frame| asynchronously. |callback| will be | 38 // Decode the payload in |encoded_frame| asynchronously. |callback| will be |
39 // invoked on the CastEnvironment::MAIN thread with the result. | 39 // invoked on the CastEnvironment::MAIN thread with the result. |
40 // | 40 // |
41 // In the normal case, |encoded_frame->frame_id| will be | 41 // In the normal case, |encoded_frame->frame_id| will be |
42 // monotonically-increasing by 1 for each successive call to this method. | 42 // monotonically-increasing by 1 for each successive call to this method. |
43 // When it is not, the decoder will assume one or more frames have been | 43 // When it is not, the decoder will assume one or more frames have been |
44 // dropped (e.g., due to packet loss), and will perform recovery actions. | 44 // dropped (e.g., due to packet loss), and will perform recovery actions. |
45 void DecodeFrame(scoped_ptr<transport::EncodedAudioFrame> encoded_frame, | 45 void DecodeFrame(scoped_ptr<transport::EncodedFrame> encoded_frame, |
46 const DecodeFrameCallback& callback); | 46 const DecodeFrameCallback& callback); |
47 | 47 |
48 private: | 48 private: |
49 class ImplBase; | 49 class ImplBase; |
50 class OpusImpl; | 50 class OpusImpl; |
51 class Pcm16Impl; | 51 class Pcm16Impl; |
52 | 52 |
53 const scoped_refptr<CastEnvironment> cast_environment_; | 53 const scoped_refptr<CastEnvironment> cast_environment_; |
54 scoped_refptr<ImplBase> impl_; | 54 scoped_refptr<ImplBase> impl_; |
55 | 55 |
56 DISALLOW_COPY_AND_ASSIGN(AudioDecoder); | 56 DISALLOW_COPY_AND_ASSIGN(AudioDecoder); |
57 }; | 57 }; |
58 | 58 |
59 } // namespace cast | 59 } // namespace cast |
60 } // namespace media | 60 } // namespace media |
61 | 61 |
62 #endif // MEDIA_CAST_AUDIO_RECEIVER_AUDIO_DECODER_H_ | 62 #endif // MEDIA_CAST_AUDIO_RECEIVER_AUDIO_DECODER_H_ |
OLD | NEW |