• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2011 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #ifndef AUDIO_TO_CB_RENDERER_H_
18 #define AUDIO_TO_CB_RENDERER_H_
19 
20 #include "android/android_AudioSfDecoder.h"
21 
22 //--------------------------------------------------------------------------------------------------
23 namespace android {
24 
25 class AudioToCbRenderer : public AudioSfDecoder
26 {
27 public:
28 
29     explicit AudioToCbRenderer(const AudioPlayback_Parameters* params);
30     virtual ~AudioToCbRenderer();
31 
32     void setDataPushListener(const data_push_cbf_t pushCbf, CAudioPlayer* pushUser);
33 
34 protected:
35 
36     // Async event handlers (called from GenericPlayer's event loop)
37     virtual void onRender();
38 
39     // overridden from AudioSfDecoder
40     virtual void createAudioSink();
41     virtual void updateAudioSink();
42     virtual void startAudioSink();
43     virtual void pauseAudioSink();
44 
45 private:
46 
47     data_push_cbf_t mDecodeCbf;
48     CAudioPlayer*   mDecodeUser;
49 
50 private:
51     DISALLOW_EVIL_CONSTRUCTORS(AudioToCbRenderer);
52 
53 };
54 
55 } // namespace android
56 
57 #endif //AUDIO_TO_CB_RENDERER_H_
58