当前位置: 首页>>代码示例>>C++>>正文


C++ GST_RTSP_MEDIA_FACTORY_LOCK函数代码示例

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


在下文中一共展示了GST_RTSP_MEDIA_FACTORY_LOCK函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: default_configure

static void
default_configure (GstRTSPMediaFactory * factory, GstRTSPMedia * media)
{
  gboolean shared, eos_shutdown;
  guint size;
  GstRTSPAuth *auth;
  GstRTSPLowerTrans protocols;
  gchar *mc;

  /* configure the sharedness */
  GST_RTSP_MEDIA_FACTORY_LOCK (factory);
  shared = factory->shared;
  eos_shutdown = factory->eos_shutdown;
  size = factory->buffer_size;
  protocols = factory->protocols;
  GST_RTSP_MEDIA_FACTORY_UNLOCK (factory);

  gst_rtsp_media_set_shared (media, shared);
  gst_rtsp_media_set_eos_shutdown (media, eos_shutdown);
  gst_rtsp_media_set_buffer_size (media, size);
  gst_rtsp_media_set_protocols (media, protocols);

  if ((auth = gst_rtsp_media_factory_get_auth (factory))) {
    gst_rtsp_media_set_auth (media, auth);
    g_object_unref (auth);
  }
  if ((mc = gst_rtsp_media_factory_get_multicast_group (factory))) {
    gst_rtsp_media_set_multicast_group (media, mc);
    g_free (mc);
  }
}
开发者ID:alessandrod,项目名称:gst-rtsp-server,代码行数:31,代码来源:rtsp-media-factory.c

示例2: default_configure

static void
default_configure (GstRTSPMediaFactory * factory, GstRTSPMedia * media)
{
  GstRTSPMediaFactoryPrivate *priv = factory->priv;
  gboolean shared, eos_shutdown, stop_on_disconnect;
  guint size;
  GstRTSPSuspendMode suspend_mode;
  GstRTSPProfile profiles;
  GstRTSPLowerTrans protocols;
  GstRTSPAddressPool *pool;
  GstRTSPPermissions *perms;
  GstClockTime rtx_time;
  guint latency;
  GstRTSPTransportMode transport_mode;
  GstClock *clock;

  /* configure the sharedness */
  GST_RTSP_MEDIA_FACTORY_LOCK (factory);
  suspend_mode = priv->suspend_mode;
  shared = priv->shared;
  eos_shutdown = priv->eos_shutdown;
  size = priv->buffer_size;
  profiles = priv->profiles;
  protocols = priv->protocols;
  rtx_time = priv->rtx_time;
  latency = priv->latency;
  transport_mode = priv->transport_mode;
  stop_on_disconnect = priv->stop_on_disconnect;
  clock = priv->clock ? gst_object_ref (priv->clock) : NULL;
  GST_RTSP_MEDIA_FACTORY_UNLOCK (factory);

  gst_rtsp_media_set_suspend_mode (media, suspend_mode);
  gst_rtsp_media_set_shared (media, shared);
  gst_rtsp_media_set_eos_shutdown (media, eos_shutdown);
  gst_rtsp_media_set_buffer_size (media, size);
  gst_rtsp_media_set_profiles (media, profiles);
  gst_rtsp_media_set_protocols (media, protocols);
  gst_rtsp_media_set_retransmission_time (media, rtx_time);
  gst_rtsp_media_set_latency (media, latency);
  gst_rtsp_media_set_transport_mode (media, transport_mode);
  gst_rtsp_media_set_stop_on_disconnect (media, stop_on_disconnect);

  if (clock) {
    gst_rtsp_media_set_clock (media, clock);
    gst_object_unref (clock);
  }

  if ((pool = gst_rtsp_media_factory_get_address_pool (factory))) {
    gst_rtsp_media_set_address_pool (media, pool);
    g_object_unref (pool);
  }
  if ((perms = gst_rtsp_media_factory_get_permissions (factory))) {
    gst_rtsp_media_set_permissions (media, perms);
    gst_rtsp_permissions_unref (perms);
  }
}
开发者ID:macntouch,项目名称:gst-rtsp-server,代码行数:56,代码来源:rtsp-media-factory.c

示例3: gst_rtsp_media_factory_set_buffer_size

/**
 * gst_rtsp_media_factory_set_buffer_size:
 * @factory: a #GstRTSPMedia
 * @size: the new value
 *
 * Set the kernel UDP buffer size.
 */
void
gst_rtsp_media_factory_set_buffer_size (GstRTSPMediaFactory * factory,
    guint size)
{
  g_return_if_fail (GST_IS_RTSP_MEDIA_FACTORY (factory));

  GST_RTSP_MEDIA_FACTORY_LOCK (factory);
  factory->buffer_size = size;
  GST_RTSP_MEDIA_FACTORY_UNLOCK (factory);
}
开发者ID:alessandrod,项目名称:gst-rtsp-server,代码行数:17,代码来源:rtsp-media-factory.c

示例4: gst_rtsp_media_factory_set_shared

/**
 * gst_rtsp_media_factory_set_shared:
 * @factory: a #GstRTSPMediaFactory
 * @shared: the new value
 *
 * Configure if media created from this factory can be shared between clients.
 */
void
gst_rtsp_media_factory_set_shared (GstRTSPMediaFactory * factory,
    gboolean shared)
{
  g_return_if_fail (GST_IS_RTSP_MEDIA_FACTORY (factory));

  GST_RTSP_MEDIA_FACTORY_LOCK (factory);
  factory->shared = shared;
  GST_RTSP_MEDIA_FACTORY_UNLOCK (factory);
}
开发者ID:alessandrod,项目名称:gst-rtsp-server,代码行数:17,代码来源:rtsp-media-factory.c

示例5: gst_rtsp_media_factory_set_eos_shutdown

/**
 * gst_rtsp_media_factory_set_eos_shutdown:
 * @factory: a #GstRTSPMediaFactory
 * @eos_shutdown: the new value
 *
 * Configure if media created from this factory will have an EOS sent to the
 * pipeline before shutdown.
 */
void
gst_rtsp_media_factory_set_eos_shutdown (GstRTSPMediaFactory * factory,
    gboolean eos_shutdown)
{
  g_return_if_fail (GST_IS_RTSP_MEDIA_FACTORY (factory));

  GST_RTSP_MEDIA_FACTORY_LOCK (factory);
  factory->eos_shutdown = eos_shutdown;
  GST_RTSP_MEDIA_FACTORY_UNLOCK (factory);
}
开发者ID:alessandrod,项目名称:gst-rtsp-server,代码行数:18,代码来源:rtsp-media-factory.c

示例6: gst_rtsp_media_factory_set_multicast_group

/**
 * gst_rtsp_media_factory_set_multicast_group:
 * @factory: a #GstRTSPMedia
 * @mc: the new multicast group
 *
 * Set the multicast group that media from @factory will be streamed to.
 */
void
gst_rtsp_media_factory_set_multicast_group (GstRTSPMediaFactory * factory,
    const gchar * mc)
{
  g_return_if_fail (GST_IS_RTSP_MEDIA_FACTORY (factory));

  GST_RTSP_MEDIA_FACTORY_LOCK (factory);
  g_free (factory->multicast_group);
  factory->multicast_group = g_strdup (mc);
  GST_RTSP_MEDIA_FACTORY_UNLOCK (factory);
}
开发者ID:alessandrod,项目名称:gst-rtsp-server,代码行数:18,代码来源:rtsp-media-factory.c

示例7: gst_rtsp_media_factory_set_launch

/**
 * gst_rtsp_media_factory_set_launch:
 * @factory: a #GstRTSPMediaFactory
 * @launch: the launch description
 *
 *
 * The gst_parse_launch() line to use for constructing the pipeline in the
 * default prepare vmethod.
 *
 * The pipeline description should return a GstBin as the toplevel element
 * which can be accomplished by enclosing the dscription with brackets '('
 * ')'.
 *
 * The description should return a pipeline with payloaders named pay0, pay1,
 * etc.. Each of the payloaders will result in a stream.
 */
void
gst_rtsp_media_factory_set_launch (GstRTSPMediaFactory * factory,
    const gchar * launch)
{
  g_return_if_fail (GST_IS_RTSP_MEDIA_FACTORY (factory));
  g_return_if_fail (launch != NULL);

  GST_RTSP_MEDIA_FACTORY_LOCK (factory);
  g_free (factory->launch);
  factory->launch = g_strdup (launch);
  GST_RTSP_MEDIA_FACTORY_UNLOCK (factory);
}
开发者ID:alessandrod,项目名称:gst-rtsp-server,代码行数:28,代码来源:rtsp-media-factory.c

示例8: gst_rtsp_media_factory_get_clock

/**
 * gst_rtsp_media_factory_get_clock:
 * @factory: a #GstRTSPMediaFactory
 *
 * Returns the clock that is going to be used by the pipelines
 * of all medias created from this factory.
 *
 * Returns: (transfer full): The GstClock
 *
 * Since: 1.8
 */
GstClock *
gst_rtsp_media_factory_get_clock (GstRTSPMediaFactory * factory)
{
  GstRTSPMediaFactoryPrivate *priv;
  GstClock *ret;

  GST_RTSP_MEDIA_FACTORY_LOCK (factory);
  priv = factory->priv;
  ret = priv->clock ? gst_object_ref (priv->clock) : NULL;
  GST_RTSP_MEDIA_FACTORY_UNLOCK (factory);

  return ret;
}
开发者ID:jawahirkashim,项目名称:gst-rtsp-server,代码行数:24,代码来源:rtsp-media-factory.c

示例9: gst_rtsp_media_factory_get_multicast_group

/**
 * gst_rtsp_media_factory_get_multicast_group:
 * @factory: a #GstRTSPMedia
 *
 * Get the multicast group that media from @factory will be streamed to.
 *
 * Returns: the multicast group
 */
gchar *
gst_rtsp_media_factory_get_multicast_group (GstRTSPMediaFactory * factory)
{
  gchar *result;

  g_return_val_if_fail (GST_IS_RTSP_MEDIA_FACTORY (factory), NULL);

  GST_RTSP_MEDIA_FACTORY_LOCK (factory);
  result = g_strdup (factory->multicast_group);
  GST_RTSP_MEDIA_FACTORY_UNLOCK (factory);

  return result;
}
开发者ID:alessandrod,项目名称:gst-rtsp-server,代码行数:21,代码来源:rtsp-media-factory.c

示例10: gst_rtsp_media_factory_get_buffer_size

/**
 * gst_rtsp_media_factory_get_buffer_size:
 * @factory: a #GstRTSPMedia
 *
 * Get the kernel UDP buffer size.
 *
 * Returns: the kernel UDP buffer size.
 */
guint
gst_rtsp_media_factory_get_buffer_size (GstRTSPMediaFactory * factory)
{
  guint result;

  g_return_val_if_fail (GST_IS_RTSP_MEDIA_FACTORY (factory), 0);

  GST_RTSP_MEDIA_FACTORY_LOCK (factory);
  result = factory->buffer_size;
  GST_RTSP_MEDIA_FACTORY_UNLOCK (factory);

  return result;
}
开发者ID:alessandrod,项目名称:gst-rtsp-server,代码行数:21,代码来源:rtsp-media-factory.c

示例11: gst_rtsp_media_factory_get_media_gtype

/**
 * gst_rtsp_media_factory_get_media_gtype:
 * @factory: a #GstRTSPMediaFactory
 *
 * Return the GType of the GstRTSPMedia subclass this
 * factory will create.
 *
 * Since: 1.6
 */
GType
gst_rtsp_media_factory_get_media_gtype (GstRTSPMediaFactory * factory)
{
  GstRTSPMediaFactoryPrivate *priv;
  GType ret;

  GST_RTSP_MEDIA_FACTORY_LOCK (factory);
  priv = factory->priv;
  ret = priv->media_gtype;
  GST_RTSP_MEDIA_FACTORY_UNLOCK (factory);

  return ret;
}
开发者ID:jawahirkashim,项目名称:gst-rtsp-server,代码行数:22,代码来源:rtsp-media-factory.c

示例12: gst_rtsp_media_factory_set_clock

/**
 * gst_rtsp_media_factory_set_clock:
 * @factory: a #GstRTSPMediaFactory
 * @clockd: the clock to be used by the media factory
 *
 * Configures a specific clock to be used by the pipelines
 * of all medias created from this factory.
 *
 * Since: 1.8
 */
void
gst_rtsp_media_factory_set_clock (GstRTSPMediaFactory * factory,
    GstClock * clock)
{
  GstRTSPMediaFactoryPrivate *priv;

  g_return_if_fail (GST_IS_CLOCK (clock) || clock == NULL);

  GST_RTSP_MEDIA_FACTORY_LOCK (factory);
  priv = factory->priv;
  priv->clock = clock ? gst_object_ref (clock) : NULL;
  GST_RTSP_MEDIA_FACTORY_UNLOCK (factory);
}
开发者ID:jawahirkashim,项目名称:gst-rtsp-server,代码行数:23,代码来源:rtsp-media-factory.c

示例13: gst_rtsp_media_factory_set_media_gtype

/**
 * gst_rtsp_media_factory_set_media_gtype:
 * @factory: a #GstRTSPMediaFactory
 * @media_gtype: the GType of the class to create
 *
 * Configure the GType of the GstRTSPMedia subclass to
 * create (by default, overridden construct vmethods
 * may of course do something different)
 *
 * Since: 1.6
 */
void
gst_rtsp_media_factory_set_media_gtype (GstRTSPMediaFactory * factory,
    GType media_gtype)
{
  GstRTSPMediaFactoryPrivate *priv;

  g_return_if_fail (g_type_is_a (media_gtype, GST_TYPE_RTSP_MEDIA));

  GST_RTSP_MEDIA_FACTORY_LOCK (factory);
  priv = factory->priv;
  priv->media_gtype = media_gtype;
  GST_RTSP_MEDIA_FACTORY_UNLOCK (factory);
}
开发者ID:jawahirkashim,项目名称:gst-rtsp-server,代码行数:24,代码来源:rtsp-media-factory.c

示例14: gst_rtsp_media_factory_is_eos_shutdown

/**
 * gst_rtsp_media_factory_is_eos_shutdown:
 * @factory: a #GstRTSPMediaFactory
 *
 * Get if media created from this factory will have an EOS event sent to the
 * pipeline before shutdown.
 *
 * Returns: %TRUE if the media will receive EOS before shutdown.
 */
gboolean
gst_rtsp_media_factory_is_eos_shutdown (GstRTSPMediaFactory * factory)
{
  gboolean result;

  g_return_val_if_fail (GST_IS_RTSP_MEDIA_FACTORY (factory), FALSE);

  GST_RTSP_MEDIA_FACTORY_LOCK (factory);
  result = factory->eos_shutdown;
  GST_RTSP_MEDIA_FACTORY_UNLOCK (factory);

  return result;
}
开发者ID:alessandrod,项目名称:gst-rtsp-server,代码行数:22,代码来源:rtsp-media-factory.c

示例15: default_construct

static GstRTSPMedia *
default_construct (GstRTSPMediaFactory * factory, const GstRTSPUrl * url)
{
  GstRTSPMedia *media;
  GstElement *element, *pipeline;
  GstRTSPMediaFactoryClass *klass;
  GType media_gtype;

  klass = GST_RTSP_MEDIA_FACTORY_GET_CLASS (factory);

  if (!klass->create_pipeline)
    goto no_create;

  element = gst_rtsp_media_factory_create_element (factory, url);
  if (element == NULL)
    goto no_element;

  GST_RTSP_MEDIA_FACTORY_LOCK (factory);
  media_gtype = factory->priv->media_gtype;
  GST_RTSP_MEDIA_FACTORY_UNLOCK (factory);

  /* create a new empty media */
  media = g_object_new (media_gtype, "element", element, NULL);

  gst_rtsp_media_collect_streams (media);

  pipeline = klass->create_pipeline (factory, media);
  if (pipeline == NULL)
    goto no_pipeline;

  return media;

  /* ERRORS */
no_create:
  {
    g_critical ("no create_pipeline function");
    return NULL;
  }
no_element:
  {
    g_critical ("could not create element");
    return NULL;
  }
no_pipeline:
  {
    g_critical ("can't create pipeline");
    g_object_unref (media);
    return NULL;
  }
}
开发者ID:jawahirkashim,项目名称:gst-rtsp-server,代码行数:50,代码来源:rtsp-media-factory.c


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