summaryrefslogtreecommitdiffstats
path: root/xbmc/addons/AudioEncoder.h
diff options
context:
space:
mode:
authormanuel <manuel@mausz.at>2015-03-03 16:53:59 +0100
committermanuel <manuel@mausz.at>2015-03-03 16:53:59 +0100
commitffca21f2743a7b367fa212799c6e2fea6190dd5d (patch)
tree0608ea3a29cf644ec9ab204e2b4bb9bfaae1c381 /xbmc/addons/AudioEncoder.h
downloadkodi-pvr-build-ffca21f2743a7b367fa212799c6e2fea6190dd5d.tar.gz
kodi-pvr-build-ffca21f2743a7b367fa212799c6e2fea6190dd5d.tar.bz2
kodi-pvr-build-ffca21f2743a7b367fa212799c6e2fea6190dd5d.zip
initial commit for kodi master
Diffstat (limited to 'xbmc/addons/AudioEncoder.h')
-rw-r--r--xbmc/addons/AudioEncoder.h51
1 files changed, 51 insertions, 0 deletions
diff --git a/xbmc/addons/AudioEncoder.h b/xbmc/addons/AudioEncoder.h
new file mode 100644
index 0000000..3900333
--- /dev/null
+++ b/xbmc/addons/AudioEncoder.h
@@ -0,0 +1,51 @@
1/*
2 * Copyright (C) 2013 Arne Morten Kvarving
3 *
4 * This Program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2, or (at your option)
7 * any later version.
8 *
9 * This Program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with XBMC; see the file COPYING. If not, see
16 * <http://www.gnu.org/licenses/>.
17 *
18 */
19#pragma once
20
21#include "AddonDll.h"
22#include "include/xbmc_audioenc_types.h"
23#include "cdrip/IEncoder.h"
24
25typedef DllAddon<AudioEncoder, AUDIOENC_PROPS> DllAudioEncoder;
26namespace ADDON
27{
28 typedef CAddonDll<DllAudioEncoder,
29 AudioEncoder, AUDIOENC_PROPS> AudioEncoderDll;
30
31 class CAudioEncoder : public AudioEncoderDll, public IEncoder
32 {
33 public:
34 CAudioEncoder(const AddonProps &props) : AudioEncoderDll(props) {};
35 CAudioEncoder(const cp_extension_t *ext);
36 virtual ~CAudioEncoder() {}
37 virtual AddonPtr Clone() const;
38
39 // Things that MUST be supplied by the child classes
40 bool Init(audioenc_callbacks &callbacks);
41 int Encode(int nNumBytesRead, uint8_t* pbtStream);
42 bool Close();
43 void Destroy();
44
45 const std::string extension;
46
47 private:
48 void *m_context; ///< audio encoder context
49 };
50
51} /*namespace ADDON*/