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

C++ GST_OBJECT_NAME函数代码示例

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

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



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

示例1: gst_play_sink_convert_bin_set_targets

static void
gst_play_sink_convert_bin_set_targets (GstPlaySinkConvertBin * self,
    gboolean passthrough)
{
  GstPad *pad;
  GstElement *head, *tail;

  GST_DEBUG_OBJECT (self, "Setting pad targets with passthrough %d",
      passthrough);
  if (self->conversion_elements == NULL || passthrough) {
    GST_DEBUG_OBJECT (self, "no conversion elements, using identity (%p) as "
        "head/tail", self->identity);
    if (!passthrough) {
      GST_WARNING_OBJECT (self,
          "Doing passthrough as no converter elements were added");
    }
    head = tail = self->identity;
  } else {
    head = GST_ELEMENT (g_list_first (self->conversion_elements)->data);
    tail = GST_ELEMENT (g_list_last (self->conversion_elements)->data);
    GST_DEBUG_OBJECT (self, "conversion elements in use, picking "
        "head:%s and tail:%s", GST_OBJECT_NAME (head), GST_OBJECT_NAME (tail));
  }

  g_return_if_fail (head != NULL);
  g_return_if_fail (tail != NULL);

  pad = gst_element_get_static_pad (head, "sink");
  GST_DEBUG_OBJECT (self, "Ghosting bin sink pad to %" GST_PTR_FORMAT, pad);
  gst_ghost_pad_set_target (GST_GHOST_PAD_CAST (self->sinkpad), pad);
  gst_object_unref (pad);

  pad = gst_element_get_static_pad (tail, "src");
  GST_DEBUG_OBJECT (self, "Ghosting bin src pad to %" GST_PTR_FORMAT, pad);
  gst_ghost_pad_set_target (GST_GHOST_PAD_CAST (self->srcpad), pad);
  gst_object_unref (pad);
}
开发者ID:ksophocleous,项目名称:gst-plugins-base,代码行数:37,代码来源:gstplaysinkconvertbin.c


示例2: helper_find_suggest

/*
 * helper_find_suggest:
 * @data: helper data struct
 * @probability: probability of the match
 * @caps: caps of the type
 *
 * If given @probability is higher, replace previously store caps.
 */
static void
helper_find_suggest (gpointer data, GstTypeFindProbability probability,
    GstCaps * caps)
{
  GstTypeFindHelper *helper = (GstTypeFindHelper *) data;

  GST_LOG_OBJECT (helper->obj,
      "'%s' called suggest (%u, %" GST_PTR_FORMAT ")",
      GST_OBJECT_NAME (helper->factory), probability, caps);

  if (probability > helper->best_probability) {
    gst_caps_replace (&helper->caps, caps);
    helper->best_probability = probability;
  }
}
开发者ID:mjparme,项目名称:openjdk-jfx,代码行数:23,代码来源:gsttypefindhelper.c


示例3: error_cb

/* on error print the error and quit the application */
static void
error_cb (GstBus * bus, GstMessage * msg, APP_STATE_T * state)
{
  GError *err;
  gchar *debug_info;

  gst_message_parse_error (msg, &err, &debug_info);
  g_printerr ("Error received from element %s: %s\n",
      GST_OBJECT_NAME (msg->src), err->message);
  g_printerr ("Debugging information: %s\n", debug_info ? debug_info : "none");
  g_clear_error (&err);
  g_free (debug_info);
  flush_start (state);
  gst_element_set_state (state->pipeline, GST_STATE_READY);
}
开发者ID:01org,项目名称:gst-omx,代码行数:16,代码来源:testegl.c


示例4: error_cb

/* This function is called when an error message is posted on the bus */
static void error_cb (GstBus *bus, GstMessage *msg, CustomData *data) {
    GError *err;
    gchar *debug_info;

    /* Print error details on the screen */
    gst_message_parse_error (msg, &err, &debug_info);
    g_printerr ("Error received from element %s: %s\n", GST_OBJECT_NAME (msg->src), err->message);
    update_timelabel (data, err->message);
    g_printerr ("Debugging information: %s\n", debug_info ? debug_info : "none");
    g_clear_error (&err);
    g_free (debug_info);

    /* Set the pipeline to READY (which stops playback) */
    audio_stop_player (data);
}
开发者ID:adiknoth,项目名称:4deckradio,代码行数:16,代码来源:mygstreamer.c


示例5: buf_helper_find_suggest

/*
 * buf_helper_find_suggest:
 * @data: helper data struct
 * @probability: probability of the match
 * @caps: caps of the type
 *
 * If given @probability is higher, replace previously store caps.
 */
static void
buf_helper_find_suggest (gpointer data, guint probability, GstCaps * caps)
{
  GstTypeFindBufHelper *helper = (GstTypeFindBufHelper *) data;

  GST_LOG_OBJECT (helper->obj,
      "'%s' called suggest (%u, %" GST_PTR_FORMAT ")",
      GST_OBJECT_NAME (helper->factory), probability, caps);

  /* Note: not >= as we call typefinders in order of rank, highest first */
  if (probability > helper->best_probability) {
    gst_caps_replace (&helper->caps, caps);
    helper->best_probability = probability;
  }
}
开发者ID:loganek,项目名称:gstreamer,代码行数:23,代码来源:gsttypefindhelper.c


示例6: gst_object_replace

/**
 * gst_object_replace:
 * @oldobj: pointer to a place of a #GstObject to replace
 * @newobj: a new #GstObject
 *
 * Unrefs the #GstObject pointed to by @oldobj, refs @newobj and
 * puts @newobj in *@oldobj. Be carefull when calling this
 * function, it does not take any locks. You might want to lock
 * the object owning @oldobj pointer before calling this
 * function.
 *
 * Make sure not to LOCK @oldobj because it might be unreffed
 * which could cause a deadlock when it is disposed.
 */
void
gst_object_replace (GstObject ** oldobj, GstObject * newobj)
{
  g_return_if_fail (oldobj != NULL);
  g_return_if_fail (*oldobj == NULL || GST_IS_OBJECT (*oldobj));
  g_return_if_fail (newobj == NULL || GST_IS_OBJECT (newobj));

#ifdef DEBUG_REFCOUNT
  GST_CAT_LOG (GST_CAT_REFCOUNTING, "replace %s (%d) with %s (%d)",
      *oldobj ? GST_STR_NULL (GST_OBJECT_NAME (*oldobj)) : "(NONE)",
      *oldobj ? G_OBJECT (*oldobj)->ref_count : 0,
      newobj ? GST_STR_NULL (GST_OBJECT_NAME (newobj)) : "(NONE)",
      newobj ? G_OBJECT (newobj)->ref_count : 0);
#endif

  if (G_LIKELY (*oldobj != newobj)) {
    if (newobj)
      gst_object_ref (newobj);
    if (*oldobj)
      gst_object_unref (*oldobj);

    *oldobj = newobj;
  }
}
开发者ID:WangCrystal,项目名称:gstreamer,代码行数:38,代码来源:gstobject.c


示例7: connect_sink

static void
connect_sink (GstElement * element, GstPad * pad, gpointer user_data)
{
  KmsConnectData *data = user_data;

  GST_DEBUG_OBJECT (pad, "New pad %" GST_PTR_FORMAT, element);

  if (g_strcmp0 (GST_OBJECT_NAME (pad), data->pad_name)) {
    return;
  }

  connect_pads_and_remove_on_unlinked (data->src, element, data->pad_name);

  GST_INFO_OBJECT (pad, "Linking %s", data->pad_name);
}
开发者ID:ryskov,项目名称:kms-elements,代码行数:15,代码来源:recorderendpoint.c


示例8: is_provider_hidden

/* must be called with monitor lock */
static gboolean
is_provider_hidden (GstDeviceMonitor * monitor, GList * hidden,
                    GstDeviceProvider * provider)
{
    GstDeviceProviderFactory *factory;

    if (monitor->priv->show_all)
        return FALSE;

    factory = gst_device_provider_get_factory (provider);
    if (g_list_find_custom (hidden, GST_OBJECT_NAME (factory),
                            (GCompareFunc) g_strcmp0))
        return TRUE;

    return FALSE;
}
开发者ID:carlo0815,项目名称:gstreamer1.7.1,代码行数:17,代码来源:gstdevicemonitor.c


示例9: rtp_ssrc_demux_new_ssrc_pad

static void
rtp_ssrc_demux_new_ssrc_pad (GstElement * ssrcdemux, guint ssrc, GstPad * pad,
    KmsBaseRtpSession * self)
{
  const gchar *rtp_pad_name = GST_OBJECT_NAME (pad);
  gchar *rtcp_pad_name;
  SdpMediaConfig *mconf;
  GstPad *src, *sink;

  GST_DEBUG_OBJECT (self, "pad: %" GST_PTR_FORMAT " ssrc: %" G_GUINT32_FORMAT,
      pad, ssrc);

  KMS_SDP_SESSION_LOCK (self);

  if (self->remote_audio_ssrc == ssrc
      || ssrcs_are_mapped (ssrcdemux, self->local_audio_ssrc, ssrc)) {
    mconf = self->audio_neg_mconf;
  } else if (self->remote_video_ssrc == ssrc
      || ssrcs_are_mapped (ssrcdemux, self->local_video_ssrc, ssrc)) {
    mconf = self->video_neg_mconf;
  } else {
    if (!kms_i_rtp_session_manager_custom_ssrc_management (self->manager, self,
            ssrcdemux, ssrc, pad)) {
      GST_ERROR_OBJECT (pad, "SSRC %" G_GUINT32_FORMAT " not matching.", ssrc);
    }
    goto end;
  }

  /* RTP */
  sink =
      kms_i_rtp_session_manager_request_rtp_sink (self->manager, self, mconf);
  kms_base_rtp_session_link_pads (pad, sink);
  g_object_unref (sink);

  /* RTCP */
  rtcp_pad_name = g_strconcat ("rtcp_", rtp_pad_name, NULL);
  src = gst_element_get_static_pad (ssrcdemux, rtcp_pad_name);
  g_free (rtcp_pad_name);
  sink =
      kms_i_rtp_session_manager_request_rtcp_sink (self->manager, self, mconf);
  kms_base_rtp_session_link_pads (src, sink);
  g_object_unref (src);
  g_object_unref (sink);

end:
  KMS_SDP_SESSION_UNLOCK (self);
}
开发者ID:ArenaCloud,项目名称:kms-core,代码行数:47,代码来源:kmsbasertpsession.c


示例10: bus_call

static gboolean
bus_call(GstBus     *bus,
GstMessage *msg,
gpointer    data)
{
	GMainLoop *loop = (GMainLoop *)data;
	GstState old_state, new_state;

	switch (GST_MESSAGE_TYPE(msg)) {
	case GST_MESSAGE_STATE_CHANGED:
		gst_message_parse_state_changed (msg, &old_state, &new_state, NULL);

		if(msg->src == GST_OBJECT(app.pipeline) && new_state == GST_STATE_READY && old_state == GST_STATE_NULL) {
			g_debug ("Element %s changed state from %s to %s.\n",
				GST_OBJECT_NAME (msg->src),
				gst_element_state_get_name (old_state),
				gst_element_state_get_name (new_state));
			if(app.ready_callback) {
				app.ready_callback();
			}
		}
		break;
	case GST_MESSAGE_EOS:
		g_warning("End of stream\n");
		g_main_loop_quit(loop);
		break;

	case GST_MESSAGE_ERROR: {
		gchar  *debug;
		GError *error;

		gst_message_parse_error(msg, &error, &debug);
		// g_free(debug);

		g_printerr("Error: %s\n", error->message);
		g_printerr("Debug: %s\n", debug);
		g_error_free(error);

		g_main_loop_quit(loop);
		break;
	}
	default:
		break;
	}

	return TRUE;
}
开发者ID:GreatFruitOmsk,项目名称:pboPackGstreamer,代码行数:47,代码来源:streamer.c


示例11: error_cb

void error_cb(GstBus *bus, GstMessage *msg, CustomData *data)
{
	GError *err;
	gchar *debug_info;
	gchar *message_string;

	gst_message_parse_error(msg, &err, &debug_info);
	GPlayerDEBUG("ERROR from element %s: %s\n", GST_OBJECT_NAME(msg->src), err->message);
	GPlayerDEBUG("Debugging info: %s\n", (debug_info) ? debug_info : "none");

	if (strcasestr(err->message, "not") != NULL && strcasestr(err->message, "found") != NULL)
	{
		gplayer_error(NOT_FOUND, data);
		data->target_state = GST_STATE_NULL;
		data->is_live = (gst_element_set_state(data->pipeline, data->target_state) == GST_STATE_CHANGE_NO_PREROLL);
	}
	else if ((strstr(err->message, "missing") != NULL && strstr(err->message, "plug-in") != NULL)
			|| (strstr(err->message, "No URI handler implemented for") != NULL))
	{
		gplayer_error(NOT_SUPPORTED, data);
		data->target_state = GST_STATE_NULL;
		data->is_live = (gst_element_set_state(data->pipeline, data->target_state) == GST_STATE_CHANGE_NO_PREROLL);
	}
	else if (strstr(err->message, "type") != NULL && strstr(err->message, "stream") != NULL)
	{
		gplayer_error(UNKNOWN_ERROR, data);
		data->target_state = GST_STATE_NULL;
		data->is_live = (gst_element_set_state(data->pipeline, data->target_state) == GST_STATE_CHANGE_NO_PREROLL);
	}
	else if (strstr(err->message, "Stream") != NULL && strstr(err->message, "enough") != NULL)
	{
		if (!data->flow_error)
		{
			gplayer_error(UNKNOWN_ERROR, data);
			data->target_state = GST_STATE_PAUSED;
			data->is_live = (gst_element_set_state(data->pipeline, data->target_state) == GST_STATE_CHANGE_NO_PREROLL);
		}
	}
	else if (strstr(err->message, "Internal") != NULL && strstr(err->message, "flow") != NULL)
	{
		data->flow_error = TRUE;
	}

	g_error_free(err);
	g_free(debug_info);
}
开发者ID:profrook,项目名称:GPlayer,代码行数:46,代码来源:gplayer.c


示例12: gst_ss_demux_stream_init

static void
gst_ss_demux_stream_init (GstSSDemux *demux, GstSSDemuxStream *stream, SS_STREAM_TYPE stream_type)
{
  stream->cond = g_cond_new ();
  stream->lock = g_mutex_new ();
  stream->queue = g_queue_new ();
  stream->parent = demux;
  stream->pipe = NULL;
  stream->urisrc = NULL;
  stream->parser = NULL;
  stream->sink = NULL;
  stream->frag_cnt = 0;
  stream->type = stream_type ;
  stream->uri = NULL;
  stream->start_ts = -1;
  stream->sent_ns = FALSE;
  stream->switch_ts = GST_CLOCK_TIME_NONE;
  stream->avg_dur = GST_CLOCK_TIME_NONE;

  if (stream->type == SS_STREAM_VIDEO) {
    stream->pad = gst_pad_new_from_static_template (&ssdemux_videosrc_template, "video");
    stream->name = g_strdup("video");
  } else if (stream->type == SS_STREAM_AUDIO) {
    stream->pad = gst_pad_new_from_static_template (&ssdemux_audiosrc_template, "audio");
    stream->name = g_strdup("audio");
  } else if (stream->type == SS_STREAM_TEXT) {
    stream->pad = gst_pad_new_from_static_template (&ssdemux_subsrc_template, "subtitle");
    stream->name = g_strdup("text");
  }

  GST_PAD_ELEMENT_PRIVATE (stream->pad) = stream;

  gst_pad_use_fixed_caps (stream->pad);
  gst_pad_set_event_function (stream->pad, gst_ss_demux_handle_src_event);
  gst_pad_set_query_function (stream->pad, gst_ss_demux_handle_src_query);

  stream->caps = ssm_parse_get_stream_caps (demux->parser, stream->type);
  g_print ("prepare video caps = %s", gst_caps_to_string(stream->caps));

  GST_DEBUG_OBJECT (demux, "setting caps %" GST_PTR_FORMAT, stream->caps);
  gst_pad_set_caps (stream->pad, stream->caps);

  GST_DEBUG_OBJECT (demux, "adding pad %s %p to demux %p", GST_OBJECT_NAME (stream->pad), stream->pad, demux);
  gst_pad_set_active (stream->pad, TRUE);
  gst_element_add_pad (GST_ELEMENT_CAST (demux), stream->pad);
}
开发者ID:tizenorg,项目名称:framework.multimedia.gst-plugins-ext0.10,代码行数:46,代码来源:gstssdemux.c


示例13: gst_pipeline_use_clock

/**
 * gst_pipeline_use_clock:
 * @pipeline: a [GstPipeline]()
 * @clock: (transfer none) (allow-none): the clock to use
 *
 * Force _pipeline_ to use the given _clock_. The pipeline will
 * always use the given clock even if new clock providers are added
 * to this pipeline.
 *
 * If _clock_ is [NULL]() all clocking will be disabled which will make
 * the pipeline run as fast as possible.
 *
 * MT safe.
 */
void
gst_pipeline_use_clock (GstPipeline * pipeline, GstClock * clock)
{
  GstClock **clock_p;

  g_return_if_fail (GST_IS_PIPELINE (pipeline));

  GST_OBJECT_LOCK (pipeline);
  GST_OBJECT_FLAG_SET (pipeline, GST_PIPELINE_FLAG_FIXED_CLOCK);

  clock_p = &pipeline->fixed_clock;
  gst_object_replace ((GstObject **) clock_p, (GstObject *) clock);
  GST_OBJECT_UNLOCK (pipeline);

  GST_CAT_DEBUG (GST_CAT_CLOCK, "pipeline using fixed clock %p (%s)", clock,
      (clock ? GST_OBJECT_NAME (clock) : "nil"));
}
开发者ID:MathieuDuponchelle,项目名称:gstreamer,代码行数:31,代码来源:gstpipeline.c


示例14: gss_program_add_stream_table

void
gss_program_add_stream_table (GssProgram * program, GString * s)
{
  GList *g;
  gboolean have_hls = FALSE;

  GSS_A ("<table class='table table-striped table-bordered "
      "table-condensed'>\n");
  GSS_A ("<thead>\n");
  GSS_A ("<tr>\n");
  GSS_A ("<th>Type</th>\n");
  GSS_A ("<th>Size</th>\n");
  GSS_A ("<th>Bitrate</th>\n");
  GSS_A ("</tr>\n");
  GSS_A ("</thead>\n");
  GSS_A ("<tbody>\n");
  for (g = program->streams; g; g = g_list_next (g)) {
    GssStream *stream = g->data;

    GSS_A ("<tr>\n");
    GSS_P ("<td>%s</td>\n", gss_stream_type_get_name (stream->type));
    GSS_P ("<td>%dx%d</td>\n", stream->width, stream->height);
    GSS_P ("<td>%d kbps</td>\n", stream->bitrate / 1000);
    GSS_P ("<td><a href=\"%s\">stream</a></td>\n", stream->location);
    GSS_P ("<td><a href=\"%s\">playlist</a></td>\n", stream->playlist_location);
    GSS_A ("</tr>\n");

    if (stream->type == GSS_STREAM_TYPE_M2TS_H264BASE_AAC ||
        stream->type == GSS_STREAM_TYPE_M2TS_H264MAIN_AAC) {
      have_hls = TRUE;
    }
  }
  if (have_hls) {
    GSS_A ("<tr>\n");
    GSS_P ("<td colspan='7'><a href='/%s.m3u8'>HLS</a></td>\n",
        GST_OBJECT_NAME (program));
    GSS_A ("</tr>\n");
  }
  GSS_A ("<tr>\n");
  GSS_P ("<td colspan='7'><a class='btn btn-mini' href='/'>"
      "<i class='icon-plus'></i>Add</a></td>\n");
  GSS_A ("</tr>\n");
  GSS_A ("</tbody>\n");
  GSS_A ("</table>\n");

}
开发者ID:SuchangKo,项目名称:gst-stream-server,代码行数:46,代码来源:gss-program.c


示例15: gst_task_pool_need_schedule_thread

gboolean
gst_task_pool_need_schedule_thread (GstTaskPool * pool, gboolean needed)
{
  gboolean ret;

  g_return_val_if_fail (GST_IS_TASK_POOL (pool), FALSE);
  g_return_val_if_fail (needed || pool->priv->need_schedule_thread > 0, FALSE);

  /* We don't allow this for the default pool */
  if (pool == gst_task_pool_get_default ()) {
    gst_object_unref (pool);
    return FALSE;
  }

  g_mutex_lock (&pool->priv->schedule_lock);
  if (needed) {
    ret = TRUE;
    if (pool->priv->need_schedule_thread == 0) {
      pool->priv->schedule_context = g_main_context_new ();
      pool->priv->schedule_loop =
          g_main_loop_new (pool->priv->schedule_context, FALSE);

      pool->priv->schedule_thread =
          g_thread_new (GST_OBJECT_NAME (pool), gst_task_pool_schedule_func,
          pool);

      g_cond_wait (&pool->priv->schedule_cond, &pool->priv->schedule_lock);
    }
    pool->priv->need_schedule_thread++;
  } else {
    ret = FALSE;
    pool->priv->need_schedule_thread--;
    if (pool->priv->need_schedule_thread == 0) {
      g_main_loop_quit (pool->priv->schedule_loop);
      g_thread_join (pool->priv->schedule_thread);
      g_main_loop_unref (pool->priv->schedule_loop);
      pool->priv->schedule_loop = NULL;
      g_main_context_unref (pool->priv->schedule_context);
      pool->priv->schedule_context = NULL;
      pool->priv->schedule_thread = NULL;
    }
  }
  g_mutex_unlock (&pool->priv->schedule_lock);

  return ret;
}
开发者ID:Kurento,项目名称:gstreamer,代码行数:46,代码来源:gsttaskpool.c


示例16: link_unlinked_pads

static gboolean
link_unlinked_pads (GstElement *bin,
    GstPadDirection dir,
    const gchar *pad_name,
    guint *pad_count,
    GError **error)
{
  GstPad *pad = NULL;
  guint i = 0;

  while ((pad = gst_bin_find_unlinked_pad (GST_BIN (bin), dir)))
  {
    GstPad *ghostpad;
    gchar *tmp;

    if (i)
      tmp = g_strdup_printf ("%s%d", pad_name, i);
    else
      tmp = g_strdup (pad_name);
    i++;

    ghostpad = gst_ghost_pad_new (tmp, pad);
    gst_object_unref (pad);
    g_free (tmp);

    if (!ghostpad)
    {
      g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION,
          "Could not create ghostpad for pad %s:%s",
          GST_DEBUG_PAD_NAME (pad));
      return FALSE;
    }

    if (!gst_element_add_pad (bin, ghostpad))
    {
      g_set_error (error, FS_ERROR, FS_ERROR_CONSTRUCTION,
          "Could not add pad %s to bin", GST_OBJECT_NAME (ghostpad));
      return FALSE;
    }
  }

  if (pad_count)
    *pad_count = i;

  return TRUE;
}
开发者ID:ChinnaSuhas,项目名称:ossbuild,代码行数:46,代码来源:fs-rtp-codec-negotiation.c


示例17: on_error_video

static void
on_error_video (GstBus     *bus,
          GstMessage *message,
          gpointer    user_data)
{
	  GError *err;
	  gchar *debug_info;
	  gchar *message_string;

	  gst_message_parse_error (message, &err, &debug_info);
	  message_string = g_strdup_printf ("Error received from element %s: %s", GST_OBJECT_NAME (message->src), err->message);

	  g_message ("debug_info = %s \n message_string = %s\n", debug_info, message_string);
	  g_clear_error (&err);
	  g_free (debug_info);
	  g_free (message_string);
}
开发者ID:cxp1991,项目名称:WORKING,代码行数:17,代码来源:send_video.c


示例18: gst_message_parse_state_changed

void GstPlayer::handleStateChangeMessage(GstMessage *msg){
    GstState old_state, new_state;

    gst_message_parse_state_changed (msg, &old_state, &new_state, NULL);
    QString objectNamePlayer = gstObjectName;
    if( objectNamePlayer == GST_OBJECT_NAME (msg->src)){

        if(new_state == GST_STATE_PLAYING || old_state == GST_STATE_PLAYING){
            QLOG_TRACE() << "[GST] "<< this <<
                            gst_element_state_get_name (old_state) <<
                            "->"<<  gst_element_state_get_name (new_state);
        }

        switch(new_state){
            case GST_STATE_VOID_PENDING:
                loaded=false;
                playing=false;
                break;
            case GST_STATE_READY:
                loaded=true;
                playing=false;
                break;
            case GST_STATE_NULL:
                loaded=false;
                playing=false;
                break;
            case GST_STATE_PAUSED:
                loaded=true;
                playing=false;
                if(playingRequested){
                    QLOG_TRACE() << "Queued request. Ask to play!";
                    playingRequested = false;
                    this->requestPlay();
                }
                break;
            case GST_STATE_PLAYING:
                loaded=true;
                playing=true;
                break;
        }
        //QLOG_TRACE() << "GstPlayer: emit state change";
        this->stateChanged();
    }
}
开发者ID:jbruggem,项目名称:jingles-impro,代码行数:44,代码来源:gstplayer.cpp


示例19: gst_task_configure_name

/* should be called with the object LOCK */
static void
gst_task_configure_name (GstTask * task)
{
#ifdef HAVE_SYS_PRCTL_H
  const gchar *name;
  gchar thread_name[17] = { 0, };

  name = GST_OBJECT_NAME (task);

  /* set the thread name to something easily identifiable */
  if (!snprintf (thread_name, 17, "%s", GST_STR_NULL (name))) {
    GST_DEBUG_OBJECT (task, "Could not create thread name for '%s'", name);
  } else {
    GST_DEBUG_OBJECT (task, "Setting thread name to '%s'", thread_name);
    if (prctl (PR_SET_NAME, (unsigned long int) thread_name, 0, 0, 0))
      GST_DEBUG_OBJECT (task, "Failed to set thread name");
  }
#endif
}
开发者ID:genesi,项目名称:gstreamer,代码行数:20,代码来源:gsttask.c


示例20: gst_auto_video_src_create_element_with_pretty_name

static GstElement *
gst_auto_video_src_create_element_with_pretty_name (GstAutoVideoSrc * src,
    GstElementFactory * factory)
{
  GstElement *element;
  gchar *name, *marker;

  marker = g_strdup (GST_PLUGIN_FEATURE (factory)->name);
  if (g_str_has_suffix (marker, "src"))
    marker[strlen (marker) - 4] = '\0';
  if (g_str_has_prefix (marker, "gst"))
    g_memmove (marker, marker + 3, strlen (marker + 3) + 1);
  name = g_strdup_printf ("%s-actual-src-%s", GST_OBJECT_NAME (src), marker);
  g_free (marker);

  element = gst_element_factory_create (factory, name);
  g_free (name);

  return element;
}
开发者ID:JJCG,项目名称:gst-plugins-good,代码行数:20,代码来源:gstautovideosrc.c



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C++ GST_OBJECT_PARENT函数代码示例发布时间:2022-05-30
下一篇:
C++ GST_OBJECT_FLAG_SET函数代码示例发布时间: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