diff options
Diffstat (limited to 'xbmc/addons/include/kodi_audiodec_dll.h')
| -rw-r--r-- | xbmc/addons/include/kodi_audiodec_dll.h | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/xbmc/addons/include/kodi_audiodec_dll.h b/xbmc/addons/include/kodi_audiodec_dll.h new file mode 100644 index 0000000..78bc3cc --- /dev/null +++ b/xbmc/addons/include/kodi_audiodec_dll.h | |||
| @@ -0,0 +1,60 @@ | |||
| 1 | /* | ||
| 2 | * Copyright (C) 2005-2013 Team XBMC | ||
| 3 | * http://xbmc.org | ||
| 4 | * | ||
| 5 | * This Program is free software; you can redistribute it and/or modify | ||
| 6 | * it under the terms of the GNU General Public License as published by | ||
| 7 | * the Free Software Foundation; either version 2, or (at your option) | ||
| 8 | * any later version. | ||
| 9 | * | ||
| 10 | * This Program is distributed in the hope that it will be useful, | ||
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 13 | * GNU General Public License for more details. | ||
| 14 | * | ||
| 15 | * You should have received a copy of the GNU General Public License | ||
| 16 | * along with XBMC; see the file COPYING. If not, see | ||
| 17 | * <http://www.gnu.org/licenses/>. | ||
| 18 | * | ||
| 19 | */ | ||
| 20 | |||
| 21 | #pragma once | ||
| 22 | |||
| 23 | #include <stdint.h> | ||
| 24 | #include "xbmc_addon_dll.h" | ||
| 25 | #include "kodi_audiodec_types.h" | ||
| 26 | |||
| 27 | extern "C" | ||
| 28 | { | ||
| 29 | //! \copydoc AudioDecoder::Init | ||
| 30 | void* Init(const char* file, unsigned int filecache, int* channels, | ||
| 31 | int* samplerate, int* bitspersample, int64_t* totaltime, | ||
| 32 | int* bitrate, AEDataFormat* format, const AEChannel** channelinfo); | ||
| 33 | |||
| 34 | //! \copydoc AudioDecoder::ReadPCM | ||
| 35 | int ReadPCM(void* context, uint8_t* buffer, int size, int* actualsize); | ||
| 36 | |||
| 37 | //! \copydoc AudioDecoder::Seek | ||
| 38 | int64_t Seek(void* context, int64_t time); | ||
| 39 | |||
| 40 | //! \copydoc AudioDecoder::ReadTag | ||
| 41 | bool ReadTag(const char* file, char* title, | ||
| 42 | char* artist, int* length); | ||
| 43 | |||
| 44 | //! \copydoc AudioDecoder::TrackCount | ||
| 45 | int TrackCount(const char* file); | ||
| 46 | |||
| 47 | //! \copydoc AudioDecoder::DeInit | ||
| 48 | bool DeInit(void* context); | ||
| 49 | |||
| 50 | // function to export the above structure to XBMC | ||
| 51 | void __declspec(dllexport) get_addon(struct AudioDecoder* pScr) | ||
| 52 | { | ||
| 53 | pScr->Init = Init; | ||
| 54 | pScr->ReadPCM = ReadPCM; | ||
| 55 | pScr->Seek = Seek; | ||
| 56 | pScr->ReadTag = ReadTag; | ||
| 57 | pScr->TrackCount = TrackCount; | ||
| 58 | pScr->DeInit = DeInit; | ||
| 59 | }; | ||
| 60 | }; | ||
