QtGStreamer 0.10.1
|
00001 /* 00002 Copyright (C) 2009-2010 George Kiagiadakis <kiagiadakis.george@gmail.com> 00003 00004 This library is free software; you can redistribute it and/or modify 00005 it under the terms of the GNU Lesser General Public License as published 00006 by the Free Software Foundation; either version 2.1 of the License, or 00007 (at your option) any later version. 00008 00009 This program is distributed in the hope that it will be useful, 00010 but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 GNU General Public License for more details. 00013 00014 You should have received a copy of the GNU Lesser General Public License 00015 along with this program. If not, see <http://www.gnu.org/licenses/>. 00016 */ 00017 #ifndef QGST_ELEMENTFACTORY_H 00018 #define QGST_ELEMENTFACTORY_H 00019 00020 #include "pluginfeature.h" 00021 #include "element.h" 00022 00023 namespace QGst { 00024 00028 class QTGSTREAMER_EXPORT ElementFactory : public PluginFeature 00029 { 00030 QGST_WRAPPER(ElementFactory) 00031 public: 00032 static ElementFactoryPtr find(const char *factoryName); 00033 static inline ElementFactoryPtr find(const QString & factoryName); 00034 00035 static ElementPtr make(const char *factoryName, const char *elementName = NULL); 00036 static inline ElementPtr make(const QString & factoryName, const char *elementName = NULL); 00037 00038 QGlib::Type elementType() const; 00039 QString longName() const; 00040 QString klass() const; 00041 QString description() const; 00042 QString author() const; 00043 QString documentationUri() const; 00044 QString iconName() const; 00045 00046 uint padTemplatesCount() const; 00047 int uriType() const; 00048 bool hasInterface(const char *interfaceName) const; 00049 bool canSinkCaps(const CapsPtr & caps) const; 00050 bool canSrcCaps(const CapsPtr & caps) const; 00051 00052 ElementPtr create(const char *elementName = NULL) const; 00053 }; 00054 00055 //static 00056 inline ElementFactoryPtr ElementFactory::find(const QString & factoryName) 00057 { 00058 return find(factoryName.toUtf8().constData()); 00059 } 00060 00061 //static 00062 inline ElementPtr ElementFactory::make(const QString & factoryName, const char *elementName) 00063 { 00064 return make(factoryName.toUtf8().constData(), elementName); 00065 } 00066 00067 } //namespace QGst 00068 00069 QGST_REGISTER_TYPE(QGst::ElementFactory) 00070 00071 #endif