00001 /**************************************************************************** 00002 * libtremorpluginimpl.cpp 00003 * 00004 * Copyright (C) 2002 Latchesar Ionkov <lucho@ionkov.net> 00005 * 00006 * This program is free software; you can redistribute it and/or modify 00007 * it under the terms of the GNU General Public License as published by 00008 * the Free Software Foundation; either version 2 of the License, or 00009 * (at your option) any later version. 00010 * 00011 * This program is distributed in the hope that it will be useful, 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 * GNU General Public License for more details. 00015 * 00016 * You should have received a copy of the GNU General Public License 00017 * along with this program; if not, write to the Free Software 00018 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00019 ****************************************************************************/ 00020 00021 #include "libtremorplugin.h" 00022 #include "libtremorpluginimpl.h" 00023 00024 00025 LibTremorPluginImpl::LibTremorPluginImpl() 00026 : libtremorplugin(0), ref(0) 00027 { 00028 } 00029 00030 00031 LibTremorPluginImpl::~LibTremorPluginImpl() 00032 { 00033 if ( libtremorplugin ) 00034 delete libtremorplugin; 00035 } 00036 00037 00038 MediaPlayerDecoder *LibTremorPluginImpl::decoder() 00039 { 00040 if ( !libtremorplugin ) 00041 libtremorplugin = new LibTremorPlugin; 00042 return libtremorplugin; 00043 } 00044 00045 00046 MediaPlayerEncoder *LibTremorPluginImpl::encoder() 00047 { 00048 return NULL; 00049 } 00050 00051 00052 #ifndef QT_NO_COMPONENT 00053 00054 00055 QRESULT LibTremorPluginImpl::queryInterface( const QUuid &uuid, QUnknownInterface **iface ) 00056 { 00057 *iface = 0; 00058 if ( ( uuid == IID_QUnknown ) || ( uuid == IID_MediaPlayerPlugin ) ) 00059 *iface = this, (*iface)->addRef(); 00060 else 00061 return QS_FALSE; 00062 return QS_OK; 00063 } 00064 00065 00066 Q_EXPORT_INTERFACE() 00067 { 00068 Q_CREATE_INSTANCE( LibTremorPluginImpl ) 00069 } 00070 00071 00072 #endif 00073
1.4.2