00001 // 00002 // CascadeAudioCodecPlugin.h - implementation of CascadeAudioCodec plugin exported functions 00003 // 00004 // Copyright (c) 2005, Roku, LLC. All rights reserved. 00005 // 00007 00009 // HOW TO USE: 00010 // 00011 // Assume you made a CascadeAudioCodec derived class for a flac codec called 00012 // DonsFlacCodec with the declaration class DonsFlacCodec : public CascadeAudioCodec... 00013 // 00014 // Include this file into the source file for DonsFlacCodec and use the macro 00015 // PLUGIN_EXPORT_CASCADE_AUDIO_CODEC as follows: 00016 // 00017 // // // File: DonsFlacCodec.cpp 00018 // // 00019 // // #include <cascade/av/CascadeAudioCodecPlugin.h> 00020 // // EXPORT_CASCADE_AUDIO_CODEC_PLUGIN(DonsFlacCodec) 00021 // 00022 // Your codec-plugin shared library will then auto-magically export the 00023 // required functions to be a codec-plugin. 00024 00026 // CascadeAudioCodecPlugin.h implementation 00027 #if defined (AD_VDK_OS) || defined(WIN32) 00028 #define EXPORT_CASCADE_AUDIO_CODEC_PLUGIN(codecName) 00029 #else 00030 00031 #include <deschutes/version.h> 00032 00033 #define EXPORT_CASCADE_AUDIO_CODEC_PLUGIN(codecName) \ 00034 extern "C" const char * _CascadeAudioCodec_Plugin_GetPluginVersion() \ 00035 { \ 00036 return DESCHUTES_VERSION; \ 00037 } \ 00038 \ 00039 extern "C" CascadeAudioCodec * _CascadeAudioCodec_Plugin_CreateCodec() \ 00040 { \ 00041 return new codecName; \ 00042 } \ 00043 \ 00044 extern "C" void _CascadeAudioCodec_Plugin_DestroyCodec(CascadeAudioCodec * pCodec) \ 00045 { \ 00046 delete pCodec; \ 00047 } 00048 00049 #endif 00050 00051 // LOG 00053 // 28-Mar-05 dwoodward created