• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ GST_IS_ELEMENT_FACTORY函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中GST_IS_ELEMENT_FACTORY函数的典型用法代码示例。如果您正苦于以下问题:C++ GST_IS_ELEMENT_FACTORY函数的具体用法?C++ GST_IS_ELEMENT_FACTORY怎么用?C++ GST_IS_ELEMENT_FACTORY使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了GST_IS_ELEMENT_FACTORY函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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;
开发者ID:ascendancy721,项目名称:gnash,代码行数:26,代码来源:swfdec_codec_gst.c


示例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;
}
开发者ID:AlerIl,项目名称:gstreamer0.10,代码行数:15,代码来源:gstelementfactory.c


示例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;
}
开发者ID:kuailexs,项目名称:symbiandump-mw1,代码行数:25,代码来源:manual_dynamic.c


示例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;
}
开发者ID:AlerIl,项目名称:gstreamer0.10,代码行数:15,代码来源:gstelementfactory.c


示例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;
}
开发者ID:AlerIl,项目名称:gstreamer0.10,代码行数:15,代码来源:gstelementfactory.c


示例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;
}
开发者ID:AlerIl,项目名称:gstreamer0.10,代码行数:15,代码来源:gstelementfactory.c


示例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;
}
开发者ID:AmesianX,项目名称:wine,代码行数:25,代码来源:gsttffilter.c


示例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;
}
开发者ID:AlerIl,项目名称:gstreamer0.10,代码行数:18,代码来源:gstelementfactory.c


示例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;
}
开发者ID:AlerIl,项目名称:gstreamer0.10,代码行数:16,代码来源:gstelementfactory.c


示例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);
}
开发者ID:ConfusedReality,项目名称:pkg_multimedia_gst-plugins-good,代码行数:59,代码来源:states.c


示例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;
}
开发者ID:sbianti,项目名称:gst_tutos,代码行数:13,代码来源:playback-6_audio-visualization.c


示例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));
}
开发者ID:AlerIl,项目名称:gstreamer0.10,代码行数:20,代码来源:gstelementfactory.c


示例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;
}
开发者ID:prajnashi,项目名称:gst-plugins-base,代码行数:13,代码来源:gstfactorylists.c


示例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;
}
开发者ID:AlerIl,项目名称:gstreamer0.10,代码行数:15,代码来源:gstelementfactory.c


示例16: gst_element_factory_has_interface

/**
 * gst_element_factory_has_interface:
 * @factory: a #GstElementFactory
 * @interfacename: an interface name
 *
 * Check if @factory implements the interface with name @interfacename.
 *
 * Returns: #TRUE when @factory implement the interface.
 *
 * Since: 0.10.14
 */
gboolean
gst_element_factory_has_interface (GstElementFactory * factory,
    const gchar * interfacename)
{
  GList *walk;

  g_return_val_if_fail (GST_IS_ELEMENT_FACTORY (factory), FALSE);

  for (walk = factory->interfaces; walk; walk = g_list_next (walk)) {
    gchar *iname = (gchar *) walk->data;

    if (!strcmp (iname, interfacename))
      return TRUE;
  }
  return FALSE;
}
开发者ID:AlerIl,项目名称:gstreamer0.10,代码行数:27,代码来源:gstelementfactory.c


示例17: FactoryFilter

static gboolean FactoryFilter(GstPluginFeature *aFeature, gpointer)
{
  if (!GST_IS_ELEMENT_FACTORY(aFeature)) {
    return FALSE;
  }

  // TODO _get_klass doesn't exist in 1.0
  const gchar *className =
    gst_element_factory_get_klass(GST_ELEMENT_FACTORY_CAST(aFeature));

  if (!strstr(className, "Decoder") && !strstr(className, "Demux")) {
    return FALSE;
  }

  return gst_plugin_feature_get_rank(aFeature) >= GST_RANK_MARGINAL;
}
开发者ID:Incognito,项目名称:mozilla-central,代码行数:16,代码来源:GStreamerFormatHelper.cpp


示例18: iterate_plugins

void
iterate_plugins (GHashTable *hashtable)
{
    GList *plugins, *orig_plugins;

    orig_plugins = plugins = gst_default_registry_get_plugin_list ();
    while (plugins) 
    {
        GList *features, *orig_features;
        GstPlugin *plugin;

        plugin = (GstPlugin *) (plugins->data);
        plugins = g_list_next (plugins);

        if (plugin->flags & GST_PLUGIN_FLAG_BLACKLISTED) 
        {
            continue;
        }

        orig_features = features =
            gst_registry_get_feature_list_by_plugin (gst_registry_get_default (),
                                                     plugin->desc.name);
        while (features) 
        {
            GstPluginFeature *feature;

            if (G_UNLIKELY (features->data == NULL))
                goto next;

            feature = GST_PLUGIN_FEATURE (features->data);
            if (GST_IS_ELEMENT_FACTORY (feature)) 
            {
                GstElementFactory *factory;

                factory = GST_ELEMENT_FACTORY (feature);
                iterate_plugins_elements (factory, hashtable);
            }
            next:
                features = g_list_next (features);
        }

        gst_plugin_feature_list_free (orig_features);
    }

    gst_plugin_list_free (orig_plugins);
}
开发者ID:jCoderZ,项目名称:m3player,代码行数:46,代码来源:gstreamer.c


示例19: FactoryFilter

static gboolean FactoryFilter(GstPluginFeature *aFeature, gpointer)
{
  if (!GST_IS_ELEMENT_FACTORY(aFeature)) {
    return FALSE;
  }

  const gchar *className =
    gst_element_factory_get_klass(GST_ELEMENT_FACTORY_CAST(aFeature));

  if (!strstr(className, "Decoder") && !strstr(className, "Demux") &&
      !strstr(className, "Parser")) {
    return FALSE;
  }

  return
    gst_plugin_feature_get_rank(aFeature) >= GST_RANK_MARGINAL &&
    !GStreamerFormatHelper::IsPluginFeatureBlacklisted(aFeature);
}
开发者ID:AOSC-Dev,项目名称:Pale-Moon,代码行数:18,代码来源:GStreamerFormatHelper.cpp


示例20: FactoryFilter

static gboolean FactoryFilter(GstPluginFeature *aFeature, gpointer)
{
  if (!GST_IS_ELEMENT_FACTORY(aFeature)) {
    return FALSE;
  }

  const gchar *className =
    gst_element_factory_get_klass(GST_ELEMENT_FACTORY_CAST(aFeature));

  // NB: We skip filtering parsers here, because adding them to
  // the list can give false decoder positives to canPlayType().
  if (!strstr(className, "Decoder") && !strstr(className, "Demux")) {
    return FALSE;
  }

  return
    gst_plugin_feature_get_rank(aFeature) >= GST_RANK_MARGINAL &&
    !GStreamerFormatHelper::IsPluginFeatureBlocked(aFeature);
}
开发者ID:Manishearth,项目名称:gecko-dev,代码行数:19,代码来源:GStreamerFormatHelper.cpp



注:本文中的GST_IS_ELEMENT_FACTORY函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ GST_IS_EVENT函数代码示例发布时间:2022-05-30
下一篇:
C++ GST_IS_CAPS函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap