00001 // VorbisDecoderPlugIn.h 00002 // 00003 // Copyright (c) Symbian Software Ltd 2005-2006. All rights reserved. 00004 // 00005 00006 00007 #ifndef VORBISDECODERPLUGIN_H 00008 #define VORBISDECODERPLUGIN_H 00009 00010 #include <mmf/server/mmfswcodecwrapper.h> 00011 00012 class CVorbisDecoderProcessor; 00013 class CVorbisDecoderPlugInWrapper; 00014 00015 /* 00016 This class is responsible for taking the input buffer with vorbis data and producing a decoded 00017 Output buffer with pcm data. 00018 */ 00019 class CVorbisDecoderPlugIn : public CMMFSwCodec 00020 { 00021 public: 00022 static CVorbisDecoderPlugIn* NewL(); 00023 virtual ~CVorbisDecoderPlugIn(); 00024 00025 //from CMMFSwCodec 00026 TCodecProcessResult ProcessL 00027 (const CMMFBuffer& aSource, CMMFBuffer& aDest); 00028 TUint SourceBufferSize(); 00029 TUint SinkBufferSize(); 00030 private: 00031 CVorbisDecoderPlugIn(); 00032 void ConstructL(); 00033 private: 00034 CVorbisDecoderProcessor* iProc; 00035 }; 00036 00037 /* 00038 This is a framework class which creates the Codec class above and supports setting the Vbr flag 00039 in SwCodecWrapper during starting of the Hardware device. 00040 */ 00041 class CVorbisDecoderPlugInWrapper : public CMMFSwCodecWrapper 00042 { 00043 public: 00044 static CVorbisDecoderPlugInWrapper* NewL(); 00045 virtual ~CVorbisDecoderPlugInWrapper(); 00046 00047 //from CMMFSwCodecWrapper 00048 TInt Start(TDeviceFunc aFuncCmd, TDeviceFlow aFlowCmd); 00049 CMMFSwCodec& Codec(); 00050 private: 00051 CVorbisDecoderPlugInWrapper(); 00052 void ConstructL(); 00053 private: 00054 CVorbisDecoderPlugIn* iDevice; 00055 TBool iCodecReturned; //flag recording if ownership of codec has been transeferred to client 00056 }; 00057 00058 #endif //VORBISDECODERPLUGIN_H