00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
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
00056 inline ElementFactoryPtr ElementFactory::find(const QString & factoryName)
00057 {
00058 return find(factoryName.toUtf8().constData());
00059 }
00060
00061
00062 inline ElementPtr ElementFactory::make(const QString & factoryName, const char *elementName)
00063 {
00064 return make(factoryName.toUtf8().constData(), elementName);
00065 }
00066
00067 }
00068
00069 QGST_REGISTER_TYPE(QGst::ElementFactory)
00070
00071 #endif