android_AudioToCbRenderer.h revision 2b06e20ae32388f6e1dfd088d9773c34e6b1cb45
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#include "android/android_AudioSfDecoder.h" 18 19//-------------------------------------------------------------------------------------------------- 20namespace android { 21 22class AudioToCbRenderer : public AudioSfDecoder 23{ 24public: 25 26 AudioToCbRenderer(AudioPlayback_Parameters* params); 27 virtual ~AudioToCbRenderer(); 28 29 void setDataPushListener(const data_push_cbf_t pushCbf, void* pushUser); 30 31protected: 32 33 // Async event handlers (called from GenericPlayer's event loop) 34 virtual void onPrepare(); 35 virtual void onRender(); 36 37 // overridden from AudioSfDecoder 38 virtual void createAudioSink(); 39 virtual void updateAudioSink(); 40 virtual void startAudioSink(); 41 virtual void pauseAudioSink(); 42 43private: 44 45 data_push_cbf_t mDecodeCbf; 46 void* mDecodeUser; 47 48private: 49 DISALLOW_EVIL_CONSTRUCTORS(AudioToCbRenderer); 50 51}; 52 53} // namespace android 54