本文整理汇总了C++中GST_IS_ELEMENT_FACTORY函数的典型用法代码示例。如果您正苦于以下问题:C++ GST_IS_ELEMENT_FACTORY函数的具体用法?C++ GST_IS_ELEMENT_FACTORY怎么用?C++ GST_IS_ELEMENT_FACTORY使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了GST_IS_ELEMENT_FACTORY函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: swfdec_gst_feature_filter
/* NB: try to mirror decodebin behavior */
static gboolean
swfdec_gst_feature_filter (GstPluginFeature *feature, gpointer caps, const gchar* klassname, gboolean autoplugonly)
{
const GList *walk;
const gchar *klass;
/* we only care about element factories */
if (!GST_IS_ELEMENT_FACTORY (feature))
return FALSE;
/* only decoders are interesting */
klass = gst_element_factory_get_klass (GST_ELEMENT_FACTORY (feature));
if (strstr (klass, klassname) == NULL)
return FALSE;
/* only select elements with autoplugging rank */
if (autoplugonly && gst_plugin_feature_get_rank (feature) < GST_RANK_MARGINAL)
return FALSE;
/* only care about the right sink caps */
for (walk = gst_element_factory_get_static_pad_templates (GST_ELEMENT_FACTORY (feature));
walk; walk = walk->next) {
GstStaticPadTemplate *template = walk->data;
示例2: gst_element_factory_get_author
/**
* gst_element_factory_get_author:
* @factory: a #GstElementFactory
*
* Gets the author for this factory.
*
* Returns: the author
*/
const gchar *
gst_element_factory_get_author (GstElementFactory * factory)
{
g_return_val_if_fail (GST_IS_ELEMENT_FACTORY (factory), NULL);
return factory->details.author;
}
示例3: cb_feature_filter
static gboolean
cb_feature_filter (GstPluginFeature *feature,
gpointer data)
{
const gchar *klass;
guint rank;
/* we only care about element factories */
if (!GST_IS_ELEMENT_FACTORY (feature))
return FALSE;
/* only parsers, demuxers and decoders */
klass = gst_element_factory_get_klass (GST_ELEMENT_FACTORY (feature));
if (g_strrstr (klass, "Demux") == NULL &&
g_strrstr (klass, "Decoder") == NULL &&
g_strrstr (klass, "Parse") == NULL)
return FALSE;
/* only select elements with autoplugging rank */
rank = gst_plugin_feature_get_rank (feature);
if (rank < GST_RANK_MARGINAL)
return FALSE;
return TRUE;
}
示例4: gst_element_factory_get_uri_type
/**
* gst_element_factory_get_uri_type:
* @factory: a #GstElementFactory
*
* Gets the type of URIs the element supports or #GST_URI_UNKNOWN if none.
*
* Returns: type of URIs this element supports
*/
gint
gst_element_factory_get_uri_type (GstElementFactory * factory)
{
g_return_val_if_fail (GST_IS_ELEMENT_FACTORY (factory), GST_URI_UNKNOWN);
return factory->uri_type;
}
示例5: gst_element_factory_get_description
/**
* gst_element_factory_get_description:
* @factory: a #GstElementFactory
*
* Gets the description for this factory.
*
* Returns: the description
*/
const gchar *
gst_element_factory_get_description (GstElementFactory * factory)
{
g_return_val_if_fail (GST_IS_ELEMENT_FACTORY (factory), NULL);
return factory->details.description;
}
示例6: gst_element_factory_get_num_pad_templates
/**
* gst_element_factory_get_num_pad_templates:
* @factory: a #GstElementFactory
*
* Gets the number of pad_templates in this factory.
*
* Returns: the number of pad_templates
*/
guint
gst_element_factory_get_num_pad_templates (GstElementFactory * factory)
{
g_return_val_if_fail (GST_IS_ELEMENT_FACTORY (factory), 0);
return factory->numpadtemplates;
}
示例7: match_element
static gboolean match_element(GstPluginFeature *feature, gpointer gdata)
{
struct typeinfo *data = (struct typeinfo*)gdata;
GstElementFactory *factory;
const GList *list;
if (!GST_IS_ELEMENT_FACTORY(feature))
return FALSE;
factory = GST_ELEMENT_FACTORY(feature);
if (!strstr(gst_element_factory_get_klass(factory), data->type))
return FALSE;
for (list = gst_element_factory_get_static_pad_templates(factory); list; list = list->next) {
GstStaticPadTemplate *pad = (GstStaticPadTemplate*)list->data;
GstCaps *caps;
gboolean ret;
if (pad->direction != GST_PAD_SINK)
continue;
caps = gst_static_caps_get(&pad->static_caps);
ret = gst_caps_is_always_compatible(caps, data->caps);
gst_caps_unref(caps);
if (ret)
return TRUE;
}
return FALSE;
}
示例8: gst_element_factory_get_element_type
/**
* gst_element_factory_get_element_type:
* @factory: factory to get managed #GType from
*
* Get the #GType for elements managed by this factory. The type can
* only be retrieved if the element factory is loaded, which can be
* assured with gst_plugin_feature_load().
*
* Returns: the #GType for elements managed by this factory or 0 if
* the factory is not loaded.
*/
GType
gst_element_factory_get_element_type (GstElementFactory * factory)
{
g_return_val_if_fail (GST_IS_ELEMENT_FACTORY (factory), 0);
return factory->type;
}
示例9: gst_element_factory_get_static_pad_templates
/**
* gst_element_factory_get_static_pad_templates:
* @factory: a #GstElementFactory
*
* Gets the #GList of #GstStaticPadTemplate for this factory.
*
* Returns: (transfer none) (element-type Gst.StaticPadTemplate): the
* static pad templates
*/
const GList *
gst_element_factory_get_static_pad_templates (GstElementFactory * factory)
{
g_return_val_if_fail (GST_IS_ELEMENT_FACTORY (factory), NULL);
return factory->staticpadtemplates;
}
示例10: setup
static void
setup (void)
{
GList *features, *f;
GList *plugins, *p;
gchar **ignorelist = NULL;
const gchar *STATE_IGNORE_ELEMENTS = NULL;
GstRegistry *def;
GST_DEBUG ("getting elements for package %s", PACKAGE);
STATE_IGNORE_ELEMENTS = g_getenv ("GST_STATE_IGNORE_ELEMENTS");
if (!g_getenv ("GST_NO_STATE_IGNORE_ELEMENTS") && STATE_IGNORE_ELEMENTS) {
GST_DEBUG ("Will ignore element factories: '%s'", STATE_IGNORE_ELEMENTS);
ignorelist = g_strsplit (STATE_IGNORE_ELEMENTS, " ", 0);
}
def = gst_registry_get ();
plugins = gst_registry_get_plugin_list (def);
for (p = plugins; p; p = p->next) {
GstPlugin *plugin = p->data;
if (strcmp (gst_plugin_get_source (plugin), PACKAGE) != 0)
continue;
features =
gst_registry_get_feature_list_by_plugin (def,
gst_plugin_get_name (plugin));
for (f = features; f; f = f->next) {
GstPluginFeature *feature = f->data;
const gchar *name = gst_plugin_feature_get_name (feature);
gboolean ignore = FALSE;
if (!GST_IS_ELEMENT_FACTORY (feature))
continue;
if (ignorelist) {
gchar **s;
for (s = ignorelist; s && *s; ++s) {
if (g_str_has_prefix (name, *s)) {
GST_DEBUG ("ignoring element %s", name);
ignore = TRUE;
}
}
if (ignore)
continue;
}
GST_DEBUG ("adding element %s", name);
elements = g_list_prepend (elements, (gpointer) g_strdup (name));
}
gst_plugin_feature_list_free (features);
}
gst_plugin_list_free (plugins);
g_strfreev (ignorelist);
}
示例11: filter_vis_features
/* Return TRUE if this is a Visualization element */
static gboolean filter_vis_features(GstPluginFeature *feature, gpointer data) {
GstElementFactory *factory;
if (!GST_IS_ELEMENT_FACTORY(feature))
return FALSE;
factory = GST_ELEMENT_FACTORY(feature);
if (!g_strrstr(gst_element_factory_get_klass(factory), "Visualization"))
return FALSE;
return TRUE;
}
示例12: __gst_element_factory_add_interface
/**
* __gst_element_factory_add_interface:
* @elementfactory: The elementfactory to add the interface to
* @interfacename: Name of the interface
*
* Adds the given interfacename to the list of implemented interfaces of the
* element.
*/
void
__gst_element_factory_add_interface (GstElementFactory * elementfactory,
const gchar * interfacename)
{
g_return_if_fail (GST_IS_ELEMENT_FACTORY (elementfactory));
g_return_if_fail (interfacename != NULL);
g_return_if_fail (interfacename[0] != '\0'); /* no empty string */
elementfactory->interfaces =
g_list_prepend (elementfactory->interfaces,
(gpointer) g_intern_string (interfacename));
}
示例13: element_filter
static gboolean
element_filter (GstPluginFeature * feature, FilterData * data)
{
gboolean res;
/* we only care about element factories */
if (!GST_IS_ELEMENT_FACTORY (feature))
return FALSE;
res = gst_factory_list_is_type (GST_ELEMENT_FACTORY (feature), data->type);
return res;
}
示例14: filter_parsers
static gboolean
filter_parsers (GstElementFactory * factory, gpointer user_data)
{
if (GST_IS_ELEMENT_FACTORY (factory) == FALSE)
return FALSE;
if (g_strrstr (gst_element_factory_get_klass (factory), "Parser")) {
if (gst_plugin_feature_get_rank (GST_PLUGIN_FEATURE (factory)) >=
GST_RANK_PRIMARY)
return TRUE;
}
return FALSE;
}
开发者ID:freedesktop-unofficial-mirror,项目名称:gstreamer__attic__insanity-gst,代码行数:14,代码来源:insanity-test-gst-decoder.c
示例15: element_filter
static gboolean
element_filter (GstPluginFeature * feature, FilterData * data)
{
gboolean res;
/* we only care about element factories */
if (G_UNLIKELY (!GST_IS_ELEMENT_FACTORY (feature)))
return FALSE;
res = (gst_plugin_feature_get_rank (feature) >= data->minrank) &&
gst_element_factory_list_is_type (GST_ELEMENT_FACTORY_CAST (feature),
data->type);
return res;
}