summaryrefslogtreecommitdiff
path: root/core/multimedia/opieplayer/vorbis/libtremorpluginimpl.cpp
Unidiff
Diffstat (limited to 'core/multimedia/opieplayer/vorbis/libtremorpluginimpl.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--core/multimedia/opieplayer/vorbis/libtremorpluginimpl.cpp71
1 files changed, 71 insertions, 0 deletions
diff --git a/core/multimedia/opieplayer/vorbis/libtremorpluginimpl.cpp b/core/multimedia/opieplayer/vorbis/libtremorpluginimpl.cpp
new file mode 100644
index 0000000..440747a
--- a/dev/null
+++ b/core/multimedia/opieplayer/vorbis/libtremorpluginimpl.cpp
@@ -0,0 +1,71 @@
1/****************************************************************************
2* libtremorpluginimpl.cpp
3*
4* Copyright (C) 2002 Latchesar Ionkov <lucho@ionkov.net>
5*
6* This program is free software; you can redistribute it and/or modify
7* it under the terms of the GNU General Public License as published by
8* the Free Software Foundation; either version 2 of the License, or
9* (at your option) any later version.
10*
11* This program is distributed in the hope that it will be useful,
12* but WITHOUT ANY WARRANTY; without even the implied warranty of
13* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14* GNU General Public License for more details.
15*
16* You should have received a copy of the GNU General Public License
17* along with this program; if not, write to the Free Software
18* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19****************************************************************************/
20
21#include "libtremorplugin.h"
22#include "libtremorpluginimpl.h"
23
24
25LibTremorPluginImpl::LibTremorPluginImpl()
26 : libtremorplugin(0), ref(0)
27{
28}
29
30
31LibTremorPluginImpl::~LibTremorPluginImpl()
32{
33 if ( libtremorplugin )
34 delete libtremorplugin;
35}
36
37
38MediaPlayerDecoder *LibTremorPluginImpl::decoder()
39{
40 if ( !libtremorplugin )
41 libtremorplugin = new LibTremorPlugin;
42 return libtremorplugin;
43}
44
45
46MediaPlayerEncoder *LibTremorPluginImpl::encoder()
47{
48 return NULL;
49}
50
51
52#ifndef QT_NO_COMPONENT
53
54
55QRESULT LibTremorPluginImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface )
56{
57 *iface = 0;
58 if ( ( uuid == IID_QUnknown ) || ( uuid == IID_MediaPlayerPlugin ) )
59 *iface = this, (*iface)->addRef();
60 return QS_OK;
61}
62
63
64Q_EXPORT_INTERFACE()
65{
66 Q_CREATE_INSTANCE( LibTremorPluginImpl )
67}
68
69
70#endif
71