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


C++ GST_OBJECT_FLAG_SET函数代码示例

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


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

示例1: gst_funnel_request_new_pad

static GstPad *
gst_funnel_request_new_pad (GstElement * element, GstPadTemplate * templ,
    const gchar * name, const GstCaps * caps)
{
  GstPad *sinkpad;

  GST_DEBUG_OBJECT (element, "requesting pad");

  sinkpad = GST_PAD_CAST (g_object_new (GST_TYPE_FUNNEL_PAD,
          "name", name, "direction", templ->direction, "template", templ,
          NULL));

  gst_pad_set_chain_function (sinkpad,
      GST_DEBUG_FUNCPTR (gst_funnel_sink_chain));
  gst_pad_set_chain_list_function (sinkpad,
      GST_DEBUG_FUNCPTR (gst_funnel_sink_chain_list));
  gst_pad_set_event_function (sinkpad,
      GST_DEBUG_FUNCPTR (gst_funnel_sink_event));

  GST_OBJECT_FLAG_SET (sinkpad, GST_PAD_FLAG_PROXY_CAPS);
  GST_OBJECT_FLAG_SET (sinkpad, GST_PAD_FLAG_PROXY_ALLOCATION);

  gst_pad_set_active (sinkpad, TRUE);

  gst_element_add_pad (element, sinkpad);

  GST_DEBUG_OBJECT (element, "requested pad %s:%s",
      GST_DEBUG_PAD_NAME (sinkpad));

  return sinkpad;
}
开发者ID:Kurento,项目名称:gstreamer,代码行数:31,代码来源:gstfunnel.c

示例2: gst_flutsindex_init

static void
gst_flutsindex_init (GstFluTSIndex * index)
{
  index->writers = g_hash_table_new (NULL, NULL);
  index->last_id = 0;
  index->id = -1;

  GST_OBJECT_FLAG_SET (index, GST_FLUTSINDEX_WRITABLE);
  GST_OBJECT_FLAG_SET (index, GST_FLUTSINDEX_READABLE);
}
开发者ID:svagionitis,项目名称:gst-fluendo-timeshift,代码行数:10,代码来源:flutsindex.c

示例3: gst_timestampoverlay_init

static void
gst_timestampoverlay_init (GstTimeStampOverlay *timestampoverlay)
{
  GST_OBJECT_FLAG_SET (timestampoverlay, GST_ELEMENT_FLAG_REQUIRE_CLOCK);

  timestampoverlay->latency = GST_CLOCK_TIME_NONE;
  timestampoverlay->realtime_clock = g_object_new (GST_TYPE_SYSTEM_CLOCK,
      "clock-type", GST_CLOCK_TYPE_REALTIME, NULL);
  GST_OBJECT_FLAG_SET (timestampoverlay->realtime_clock,
      GST_CLOCK_FLAG_CAN_SET_MASTER);
}
开发者ID:stb-tester,项目名称:latency-clock,代码行数:11,代码来源:gsttimestampoverlay.c

示例4: gst_pad_template_init

static void
gst_pad_template_init (GstPadTemplate * templ)
{
  /* GstPadTemplate objects are usually leaked */
  GST_OBJECT_FLAG_SET (templ, GST_OBJECT_FLAG_MAY_BE_LEAKED);
  GST_PAD_TEMPLATE_GTYPE (templ) = G_TYPE_NONE;
}
开发者ID:teamfx,项目名称:openjfx-8u-dev-rt,代码行数:7,代码来源:gstpadtemplate.c

示例5: gst_rdt_manager_init

static void
gst_rdt_manager_init (GstRDTManager * rdtmanager)
{
  rdtmanager->provided_clock = gst_system_clock_obtain ();
  rdtmanager->latency = DEFAULT_LATENCY_MS;
  GST_OBJECT_FLAG_SET (rdtmanager, GST_ELEMENT_FLAG_PROVIDE_CLOCK);
}
开发者ID:lubing521,项目名称:gst-embedded-builder,代码行数:7,代码来源:rdtmanager.c

示例6: nle_operation_init

static void
nle_operation_init (NleOperation * operation)
{
  GST_OBJECT_FLAG_SET (operation, NLE_OBJECT_OPERATION);
  nle_operation_reset (operation);
  operation->element = NULL;
}
开发者ID:GStreamer,项目名称:gst-editing-services,代码行数:7,代码来源:nleoperation.c

示例7: gst_bus_set_flushing

/**
 * gst_bus_set_flushing:
 * @bus: a #GstBus
 * @flushing: whether or not to flush the bus
 *
 * If @flushing, flush out and unref any messages queued in the bus. Releases
 * references to the message origin objects. Will flush future messages until
 * gst_bus_set_flushing() sets @flushing to %FALSE.
 *
 * MT safe.
 */
void
gst_bus_set_flushing (GstBus * bus, gboolean flushing)
{
  GstMessage *message;
  GList *message_list = NULL;

  g_return_if_fail (GST_IS_BUS (bus));

  GST_OBJECT_LOCK (bus);

  if (flushing) {
    GST_OBJECT_FLAG_SET (bus, GST_BUS_FLUSHING);

    GST_DEBUG_OBJECT (bus, "set bus flushing");

    while ((message = gst_bus_pop (bus)))
      message_list = g_list_prepend (message_list, message);
  } else {
    GST_DEBUG_OBJECT (bus, "unset bus flushing");
    GST_OBJECT_FLAG_UNSET (bus, GST_BUS_FLUSHING);
  }

  GST_OBJECT_UNLOCK (bus);

  g_list_free_full (message_list, (GDestroyNotify) gst_message_unref);
}
开发者ID:like0403,项目名称:gstreamer,代码行数:37,代码来源:gstbus.c

示例8: gst_artsdsink_open_audio

     static gboolean gst_artsdsink_open_audio (GstArtsdsink * sink)
{
  const char connname[] = "gstreamer";
  int errcode;

  /* Name used by aRtsd for this connection. */
  if (sink->connect_name != NULL)
    connname = sink->connect_name;

  /* FIXME: this should only ever happen once per process. */
  /* Really, artsc needs to be made thread safe to fix this (and other related */
  /* problems). */
  errcode = arts_init ();
  if (errcode < 0) {
    fprintf (stderr, "arts_init error: %s\n", arts_error_text (errcode));
    return FALSE;
  }

  GST_DEBUG ("artsdsink: attempting to open connection to aRtsd server");
  sink->stream = arts_play_stream (sink->frequency, sink->depth,
      sink->channels, connname);
  /* FIXME: check connection */
  /*   GST_DEBUG ("artsdsink: can't open connection to aRtsd server"); */

  GST_OBJECT_FLAG_SET (sink, GST_ARTSDSINK_OPEN);
  sink->connected = TRUE;

  return TRUE;
}
开发者ID:LCW523,项目名称:gst-plugins-bad,代码行数:29,代码来源:gstartsdsink.c

示例9: owr_inter_src_init

static void owr_inter_src_init(OwrInterSrc *self)
{
    GstPad *srcpad, *sinkpad;

    GST_OBJECT_FLAG_SET(self, GST_ELEMENT_FLAG_SOURCE);

    self->queue = gst_element_factory_make("queue", NULL);
    gst_bin_add(GST_BIN(self), self->queue);

    srcpad = gst_element_get_static_pad(self->queue, "src");
    self->srcpad = gst_ghost_pad_new_from_template("src", srcpad, gst_static_pad_template_get(&src_template));
    gst_object_unref(srcpad);

    gst_element_add_pad(GST_ELEMENT(self), self->srcpad);

    /* Just to allow linking... */
    self->dummy_sinkpad = gst_pad_new("dummy_sinkpad", GST_PAD_SINK);
    gst_object_set_parent(GST_OBJECT(self->dummy_sinkpad), GST_OBJECT(self));

    self->internal_srcpad = gst_pad_new("internal_src", GST_PAD_SRC);
    gst_object_set_parent(GST_OBJECT(self->internal_srcpad), GST_OBJECT(self->dummy_sinkpad));
    gst_pad_set_event_function(self->internal_srcpad, owr_inter_src_internal_src_event);
    gst_pad_set_query_function(self->internal_srcpad, owr_inter_src_internal_src_query);

    sinkpad = gst_element_get_static_pad(self->queue, "sink");
    gst_pad_link(self->internal_srcpad, sinkpad);
    gst_object_unref(sinkpad);
}
开发者ID:AIMA2015,项目名称:openwebrtc,代码行数:28,代码来源:owr_inter_src.c

示例10: gst_hls_sink_init

static void
gst_hls_sink_init (GstHlsSink * sink)
{
  GstPadTemplate *templ = gst_static_pad_template_get (&sink_template);
  sink->ghostpad = gst_ghost_pad_new_no_target_from_template ("sink", templ);
  gst_object_unref (templ);
  gst_element_add_pad (GST_ELEMENT_CAST (sink), sink->ghostpad);
  gst_pad_add_probe (sink->ghostpad, GST_PAD_PROBE_TYPE_EVENT_DOWNSTREAM,
      gst_hls_sink_ghost_event_probe, sink, NULL);
  gst_pad_add_probe (sink->ghostpad, GST_PAD_PROBE_TYPE_BUFFER,
      gst_hls_sink_ghost_buffer_probe, sink, NULL);
  gst_pad_set_chain_list_function (sink->ghostpad, gst_hls_sink_chain_list);

  sink->location = g_strdup (DEFAULT_LOCATION);
  sink->playlist_location = g_strdup (DEFAULT_PLAYLIST_LOCATION);
  sink->playlist_root = g_strdup (DEFAULT_PLAYLIST_ROOT);
  sink->playlist_length = DEFAULT_PLAYLIST_LENGTH;
  sink->max_files = DEFAULT_MAX_FILES;
  sink->target_duration = DEFAULT_TARGET_DURATION;

  /* haven't added a sink yet, make it is detected as a sink meanwhile */
  GST_OBJECT_FLAG_SET (sink, GST_ELEMENT_FLAG_SINK);

  gst_hls_sink_reset (sink);
}
开发者ID:asrashley,项目名称:gst-plugins-bad,代码行数:25,代码来源:gsthlssink.c

示例11: gst_v4lmjpegsink_init

static void
gst_v4lmjpegsink_init (GstV4lMjpegSink * v4lmjpegsink)
{
  GstElementClass *klass = GST_ELEMENT_GET_CLASS (v4lmjpegsink);

  v4lmjpegsink->sinkpad =
      gst_pad_new_from_template (gst_element_class_get_pad_template (klass,
          "sink"), "sink");
  gst_element_add_pad (GST_ELEMENT (v4lmjpegsink), v4lmjpegsink->sinkpad);

  gst_pad_set_chain_function (v4lmjpegsink->sinkpad, gst_v4lmjpegsink_chain);
  gst_pad_set_link_function (v4lmjpegsink->sinkpad,
      gst_v4lmjpegsink_sinkconnect);

  v4lmjpegsink->clock = NULL;

  v4lmjpegsink->width = -1;
  v4lmjpegsink->height = -1;

  v4lmjpegsink->x_offset = -1;
  v4lmjpegsink->y_offset = -1;

  v4lmjpegsink->numbufs = 64;
  v4lmjpegsink->bufsize = 256;

  GST_OBJECT_FLAG_SET (v4lmjpegsink, GST_ELEMENT_THREAD_SUGGESTED);
}
开发者ID:genesi,项目名称:gst-base-plugins,代码行数:27,代码来源:gstv4lmjpegsink.c

示例12: kms_agnostic_bin2_src_reconfigure_probe

static GstPadProbeReturn
kms_agnostic_bin2_src_reconfigure_probe (GstPad * pad, GstPadProbeInfo * info,
    gpointer user_data)
{
  KmsAgnosticBin2 *self = KMS_AGNOSTIC_BIN2 (gst_pad_get_parent_element (pad));
  GstPadProbeReturn ret = GST_PAD_PROBE_OK;
  GstEvent *event;

  if (self == NULL) {
    return GST_PAD_PROBE_OK;
  }

  if (GST_PAD_PROBE_INFO_TYPE (info) & GST_PAD_PROBE_TYPE_EVENT_BOTH) {
    event = gst_pad_probe_info_get_event (info);

    if (GST_EVENT_TYPE (event) == GST_EVENT_RECONFIGURE) {
      KmsAgnosticBin2 *self = user_data;

      GST_DEBUG_OBJECT (pad, "Received reconfigure event");

      KMS_AGNOSTIC_BIN2_LOCK (self);
      GST_OBJECT_FLAG_SET (pad, KMS_AGNOSTIC_PAD_STARTED);
      kms_agnostic_bin2_process_pad (self, pad);
      KMS_AGNOSTIC_BIN2_UNLOCK (self);
    }
  }

  g_object_unref (self);

  return ret;
}
开发者ID:ArenaCloud,项目名称:kms-core,代码行数:31,代码来源:kmsagnosticbin.c

示例13: gst_hls_sink2_init

static void
gst_hls_sink2_init (GstHlsSink2 * sink)
{
  GstElement *mux;

  sink->location = g_strdup (DEFAULT_LOCATION);
  sink->playlist_location = g_strdup (DEFAULT_PLAYLIST_LOCATION);
  sink->playlist_root = g_strdup (DEFAULT_PLAYLIST_ROOT);
  sink->playlist_length = DEFAULT_PLAYLIST_LENGTH;
  sink->max_files = DEFAULT_MAX_FILES;
  sink->target_duration = DEFAULT_TARGET_DURATION;
  g_queue_init (&sink->old_locations);

  sink->splitmuxsink = gst_element_factory_make ("splitmuxsink", NULL);
  gst_bin_add (GST_BIN (sink), sink->splitmuxsink);

  mux = gst_element_factory_make ("mpegtsmux", NULL);
  g_object_set (sink->splitmuxsink, "location", sink->location, "max-size-time",
      ((GstClockTime) sink->target_duration * GST_SECOND),
      "send-keyframe-requests", TRUE, "muxer", mux, "reset-muxer", FALSE, NULL);

  GST_OBJECT_FLAG_SET (sink, GST_ELEMENT_FLAG_SINK);

  gst_hls_sink2_reset (sink);
}
开发者ID:MaZderMind,项目名称:gst-plugins-bad,代码行数:25,代码来源:gsthlssink2.c

示例14: dxr3videosink_open

static gboolean
dxr3videosink_open (Dxr3VideoSink * sink)
{
  g_return_val_if_fail (!GST_OBJECT_FLAG_IS_SET (sink, DXR3VIDEOSINK_OPEN),
      FALSE);

  /* Compute the name of the video device file. */
  sink->video_filename = g_strdup_printf ("/dev/em8300_mv-%d",
      sink->card_number);

  sink->video_fd = open (sink->video_filename, O_WRONLY);
  if (sink->video_fd < 0) {
    GST_ELEMENT_ERROR (sink, RESOURCE, OPEN_WRITE,
        (_("Could not open video device \"%s\" for writing."),
            sink->video_filename), GST_ERROR_SYSTEM);
    return FALSE;
  }

  /* Open the control device. */
  sink->control_filename = g_strdup_printf ("/dev/em8300-%d",
      sink->card_number);

  sink->control_fd = open (sink->control_filename, O_WRONLY);
  if (sink->control_fd < 0) {
    GST_ELEMENT_ERROR (sink, RESOURCE, OPEN_WRITE,
        (_("Could not open control device \"%s\" for writing."),
            sink->control_filename), GST_ERROR_SYSTEM);
    return FALSE;
  }

  GST_OBJECT_FLAG_SET (sink, DXR3VIDEOSINK_OPEN);

  return TRUE;
}
开发者ID:Distrotech,项目名称:gst-plugins-bad,代码行数:34,代码来源:dxr3videosink.c

示例15: dxr3videosink_init

static void
dxr3videosink_init (Dxr3VideoSink * sink)
{
  GstPad *pad;

  pad = gst_pad_new_from_static_template (&dxr3videosink_sink_factory, "sink");
  gst_element_add_pad (GST_ELEMENT (sink), pad);
  gst_pad_set_chain_function (pad, dxr3videosink_chain);

  GST_OBJECT_FLAG_SET (GST_ELEMENT (sink), GST_ELEMENT_EVENT_AWARE);

  sink->card_number = 0;

  sink->video_filename = NULL;
  sink->video_fd = -1;
  sink->control_filename = NULL;
  sink->control_fd = -1;

  sink->clock = NULL;

  sink->last_ts = GST_CLOCK_TIME_NONE;

  sink->cur_buf = NULL;
  dxr3videosink_reset_parser (sink);
}
开发者ID:Distrotech,项目名称:gst-plugins-bad,代码行数:25,代码来源:dxr3videosink.c


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