17 #include "elementfactory.h"
19 #include <gst/gstelement.h>
20 #include <gst/gstelementfactory.h>
21 #include <gst/gstutils.h>
26 ElementFactoryPtr ElementFactory::find(
const char *factoryName)
32 ElementPtr ElementFactory::make(
const char *factoryName,
const char *elementName)
34 GstElement *e = gst_element_factory_make(factoryName, elementName);
36 gst_object_ref_sink(e);
43 return gst_element_factory_get_element_type(object<GstElementFactory>());
46 QString ElementFactory::longName()
const
48 return QString::fromUtf8(gst_element_factory_get_longname(object<GstElementFactory>()));
51 QString ElementFactory::klass()
const
53 return QString::fromUtf8(gst_element_factory_get_klass(object<GstElementFactory>()));
56 QString ElementFactory::description()
const
58 return QString::fromUtf8(gst_element_factory_get_description(object<GstElementFactory>()));
61 QString ElementFactory::author()
const
63 return QString::fromUtf8(gst_element_factory_get_author(object<GstElementFactory>()));
66 QString ElementFactory::documentationUri()
const
68 return QString::fromUtf8(gst_element_factory_get_documentation_uri(object<GstElementFactory>()));
71 QString ElementFactory::iconName()
const
73 return QString::fromUtf8(gst_element_factory_get_icon_name(object<GstElementFactory>()));
76 uint ElementFactory::padTemplatesCount()
const
78 return gst_element_factory_get_num_pad_templates(object<GstElementFactory>());
81 int ElementFactory::uriType()
const
83 return gst_element_factory_get_uri_type(object<GstElementFactory>());
86 bool ElementFactory::hasInterface(
const char *interfaceName)
const
88 return gst_element_factory_has_interface(object<GstElementFactory>(), interfaceName);
91 bool ElementFactory::canSinkCaps(
const CapsPtr & caps)
const
93 return gst_element_factory_can_sink_caps(object<GstElementFactory>(), caps);
96 bool ElementFactory::canSrcCaps(
const CapsPtr & caps)
const
98 return gst_element_factory_can_src_caps(object<GstElementFactory>(), caps);
101 ElementPtr ElementFactory::create(
const char *elementName)
const
103 GstElement *e = gst_element_factory_create(object<GstElementFactory>(), elementName);
105 gst_object_ref_sink(e);