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


C++ GST_TRACE函数代码示例

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


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

示例1: convert_line_v210

static void
convert_line_v210 (GstVideoVBIParser * parser, const guint8 * data)
{
  guint i;
  guint16 *y = (guint16 *) parser->work_data;
  guint16 *uv = y + parser->info.width;
  guint32 a, b, c, d;

  /* Convert the line */
  for (i = 0; i < parser->info.width - 5; i += 6) {
    a = GST_READ_UINT32_LE (data + (i / 6) * 16 + 0);
    b = GST_READ_UINT32_LE (data + (i / 6) * 16 + 4);
    c = GST_READ_UINT32_LE (data + (i / 6) * 16 + 8);
    d = GST_READ_UINT32_LE (data + (i / 6) * 16 + 12);

    *uv++ = (a >> 0) & 0x3ff;
    *y++ = (a >> 10) & 0x3ff;
    *uv++ = (a >> 20) & 0x3ff;
    *y++ = (b >> 0) & 0x3ff;

    *uv++ = (b >> 10) & 0x3ff;
    *y++ = (b >> 20) & 0x3ff;
    *uv++ = (c >> 0) & 0x3ff;
    *y++ = (c >> 10) & 0x3ff;

    *uv++ = (c >> 20) & 0x3ff;
    *y++ = (d >> 0) & 0x3ff;
    *uv++ = (d >> 10) & 0x3ff;
    *y++ = (d >> 20) & 0x3ff;
  }

  if (0) {
    guint off = 0;
    gsize length = parser->info.width * 2;

    GST_TRACE ("--------"
        "-------------------------------------------------------------------");

    while (off < length) {
      gchar buf[128];

      /* gst_info_dump_mem_line will process 16 bytes (8 16bit chunks) at most */
      gst_info_dump_mem16_line (buf, sizeof (buf),
          (guint16 *) parser->work_data, off, length - off);
      GST_TRACE ("%s", buf);
      off += 8;
    }
    GST_TRACE ("--------"
        "-------------------------------------------------------------------");
  }
}
开发者ID:thiblahute,项目名称:gst-plugins-base,代码行数:51,代码来源:video-anc.c

示例2: gst_glimage_sink_show_frame

static GstFlowReturn
gst_glimage_sink_show_frame (GstVideoSink * vsink, GstBuffer * buf)
{
  GstGLImageSink *glimage_sink;
  GstBuffer *stored_buffer;

  GST_TRACE ("rendering buffer:%p", buf);

  glimage_sink = GST_GLIMAGE_SINK (vsink);

  GST_TRACE ("redisplay texture:%u of size:%ux%u, window size:%ux%u",
      glimage_sink->next_tex, GST_VIDEO_INFO_WIDTH (&glimage_sink->info),
      GST_VIDEO_INFO_HEIGHT (&glimage_sink->info),
      GST_VIDEO_SINK_WIDTH (glimage_sink),
      GST_VIDEO_SINK_HEIGHT (glimage_sink));

  /* Avoid to release the texture while drawing */
  GST_GLIMAGE_SINK_LOCK (glimage_sink);
  glimage_sink->redisplay_texture = glimage_sink->next_tex;
  stored_buffer = glimage_sink->stored_buffer;
  glimage_sink->stored_buffer = gst_buffer_ref (buf);
  GST_GLIMAGE_SINK_UNLOCK (glimage_sink);
  if (stored_buffer)
    gst_buffer_unref (stored_buffer);

  /* Ask the underlying window to redraw its content */
  if (!gst_glimage_sink_redisplay (glimage_sink))
    goto redisplay_failed;

  GST_TRACE ("post redisplay");

  if (g_atomic_int_get (&glimage_sink->to_quit) != 0) {
    GST_ELEMENT_ERROR (glimage_sink, RESOURCE, NOT_FOUND,
        ("%s", gst_gl_context_get_error ()), (NULL));
    gst_gl_upload_release_buffer (glimage_sink->upload);
    return GST_FLOW_ERROR;
  }

  return GST_FLOW_OK;

/* ERRORS */
redisplay_failed:
  {
    gst_gl_upload_release_buffer (glimage_sink->upload);
    GST_ELEMENT_ERROR (glimage_sink, RESOURCE, NOT_FOUND,
        ("%s", gst_gl_context_get_error ()), (NULL));
    return GST_FLOW_ERROR;
  }
}
开发者ID:asdlei00,项目名称:gst-plugins-bad,代码行数:49,代码来源:gstglimagesink.c

示例3: bus_msg_cb

static void
bus_msg_cb (GstBus * bus, GstMessage * msg, gpointer pipeline)
{
  switch (msg->type) {
    case GST_MESSAGE_ERROR:{
      GST_ERROR ("%s bus error: %" GST_PTR_FORMAT, GST_ELEMENT_NAME (pipeline),
          msg);
      GST_DEBUG_BIN_TO_DOT_FILE_WITH_TS (GST_BIN (pipeline),
          GST_DEBUG_GRAPH_SHOW_ALL, "bus_error");
      fail ("Error received on %s bus", GST_ELEMENT_NAME (pipeline));
      break;
    }
    case GST_MESSAGE_WARNING:{
      GST_WARNING ("%s bus: %" GST_PTR_FORMAT, GST_ELEMENT_NAME (pipeline),
          msg);
      GST_DEBUG_BIN_TO_DOT_FILE_WITH_TS (GST_BIN (pipeline),
          GST_DEBUG_GRAPH_SHOW_ALL, "warning");
      break;
    }
    case GST_MESSAGE_STATE_CHANGED:{
      GST_TRACE ("%s bus event: %" GST_PTR_FORMAT, GST_ELEMENT_NAME (pipeline),
          msg);
      break;
    }
    default:
      break;
  }
}
开发者ID:chadsmith,项目名称:kms-elements,代码行数:28,代码来源:httpendpoint.c

示例4: gst_gl_query_result

guint64
gst_gl_query_result (GstGLQuery * query)
{
  const GstGLFuncs *gl;
  guint64 ret;

  g_return_val_if_fail (query != NULL, 0);
  g_return_val_if_fail (!query->start_called, 0);

  if (!query->supported)
    return 0;

  gl = query->context->gl_vtable;
  if (gl->GetQueryObjectui64v) {
    gl->GetQueryObjectui64v (query->query_id, GL_QUERY_RESULT, &ret);
  } else {
    guint tmp;
    gl->GetQueryObjectuiv (query->query_id, GL_QUERY_RESULT, &tmp);
    ret = tmp;
  }

  GST_TRACE ("%p get result %" G_GUINT64_FORMAT " type \'%s\' id %u", query,
      ret, _query_type_to_string (query->query_type), query->query_id);

  return ret;
}
开发者ID:Haifen,项目名称:gst-plugins-bad,代码行数:26,代码来源:gstglquery.c

示例5: remb_event_manager_calc_min

static void
remb_event_manager_calc_min (RembEventManager * manager)
{
  guint remb_min = 0;
  GstClockTime time = kms_utils_get_time_nsecs ();
  GstClockTime oldest_time = GST_CLOCK_TIME_NONE;
  GHashTableIter iter;
  gpointer key, v;

  g_hash_table_iter_init (&iter, manager->remb_hash);
  while (g_hash_table_iter_next (&iter, &key, &v)) {
    guint br = ((RembHashValue *) v)->bitrate;
    GstClockTime ts = ((RembHashValue *) v)->ts;

    if (time - ts > REMB_HASH_CLEAR_INTERVAL) {
      GST_TRACE ("Remove entry %" G_GUINT32_FORMAT, GPOINTER_TO_UINT (key));
      g_hash_table_iter_remove (&iter);
      continue;
    }

    if (remb_min == 0) {
      remb_min = br;
    } else {
      remb_min = MIN (remb_min, br);
    }

    oldest_time = MIN (oldest_time, ts);
  }

  manager->oldest_remb_value = oldest_time;
  remb_event_manager_set_min (manager, remb_min);
}
开发者ID:2bees-rd,项目名称:kms-core,代码行数:32,代码来源:kmsutils.c

示例6: bus_msg

static void
bus_msg (GstBus * bus, GstMessage * msg, gpointer pipe)
{
    switch (GST_MESSAGE_TYPE (msg)) {
    case GST_MESSAGE_ERROR: {
        GError *err = NULL;
        gchar *dbg_info = NULL;
        gchar *err_str;

        GST_ERROR ("Error: %" GST_PTR_FORMAT, msg);
        GST_DEBUG_BIN_TO_DOT_FILE_WITH_TS (GST_BIN (pipe),
                                           GST_DEBUG_GRAPH_SHOW_ALL, "bus_error");
        gst_message_parse_error (msg, &err, &dbg_info);

        err_str = g_strdup_printf ("Error received on bus: %s: %s", err->message,
                                   dbg_info);
        g_error_free (err);
        g_free (dbg_info);

        fail (err_str);
        g_free (err_str);

        break;
    }
    case GST_MESSAGE_STATE_CHANGED: {
        GST_TRACE ("Event: %" GST_PTR_FORMAT, msg);
        break;
    }
    default:
        break;
    }
}
开发者ID:rveejay,项目名称:kms-core,代码行数:32,代码来源:audiomixer.c

示例7: _init_download

static gboolean
_init_download (GstGLDownload * download)
{
  GstVideoFormat v_format;
  guint out_width, out_height;
  GstVideoInfo in_info;

  v_format = GST_VIDEO_INFO_FORMAT (&download->info);
  out_width = GST_VIDEO_INFO_WIDTH (&download->info);
  out_height = GST_VIDEO_INFO_HEIGHT (&download->info);

  if (download->initted)
    return TRUE;

  GST_TRACE ("initializing texture download for format %s",
      gst_video_format_to_string (v_format));

  if (USING_GLES2 (download->context) && !USING_GLES3 (download->context)) {
    /* GL_RGBA is the only officially supported texture format in GLES2 */
    if (v_format == GST_VIDEO_FORMAT_RGB || v_format == GST_VIDEO_FORMAT_BGR) {
      gst_gl_context_set_error (download->context, "Cannot download RGB "
          "textures in GLES2");
      return FALSE;
    }
  }

  gst_video_info_set_format (&in_info, GST_VIDEO_FORMAT_RGBA, out_width,
      out_height);

  gst_gl_color_convert_set_format (download->convert, &in_info,
      &download->info);

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

示例8: gst_tracer_record_build_format

static void
gst_tracer_record_build_format (GstTracerRecord * self)
{
  GstStructure *structure = self->spec;
  GString *s;
  gchar *name = (gchar *) g_quark_to_string (structure->name);
  gchar *p;

  g_return_if_fail (g_str_has_suffix (name, ".class"));

  /* announce the format */
  GST_TRACE ("%" GST_PTR_FORMAT, structure);

  /* cut off '.class' suffix */
  name = g_strdup (name);
  p = strrchr (name, '.');
  g_assert (p != NULL);
  *p = '\0';

  s = g_string_sized_new (STRUCTURE_ESTIMATED_STRING_LEN (structure));
  g_string_append (s, name);
  gst_structure_foreach (structure, build_field_template, s);
  g_string_append_c (s, ';');

  self->format = g_string_free (s, FALSE);
  GST_DEBUG ("new format string: %s", self->format);
  g_free (name);
}
开发者ID:like0403,项目名称:gstreamer,代码行数:28,代码来源:gsttracerrecord.c

示例9: load_modules_from_dir

static void
load_modules_from_dir (std::string &location,
                       std::map<std::string, KurentoModule *> &modules)
{
  DIR *dir;
  struct dirent *ent;
  std::string name;

  GST_TRACE ("Looking for modules in %s", location.c_str() );

  dir = opendir (location.c_str() );

  if (dir == NULL) {
    GST_ERROR ("Unable to load modules from: %s", location.c_str() );
    return;
  }

  /* print all the files and directories within directory */
  while ( (ent = readdir (dir) ) != NULL) {
    name = ent->d_name;

    if (ent->d_type == DT_REG) {
      std::string name = location + "/" + ent->d_name;
      load_module (name, modules);
    } else if (ent->d_type == DT_DIR && "." != name && ".." != name) {
      std::string dirName = location + "/" + ent->d_name;

      load_modules_from_dir (dirName, modules);
    } else if (ent->d_type == DT_LNK) {
      // TODO: Follow sym link and try to load plugins
    }
  }

  closedir (dir);
}
开发者ID:apismontana,项目名称:kurento-media-server,代码行数:35,代码来源:ModuleLoader.cpp

示例10: msg_cb

static void
msg_cb (GstGLWindowWin32 * window_win32, MSG * msg, gpointer user_data)
{
  GST_TRACE ("handle message");
  TranslateMessage (msg);
  DispatchMessage (msg);
}
开发者ID:ikonst,项目名称:gst-plugins-bad,代码行数:7,代码来源:gstglwindow_win32.c

示例11: kms_rtcp_demux_chain

static GstFlowReturn
kms_rtcp_demux_chain (GstPad * chain, GstObject * parent, GstBuffer * buffer)
{
  KmsRtcpDemux *self = KMS_RTCP_DEMUX (parent);
  GstMapInfo map;
  guint8 pt;

  if (!gst_buffer_map (buffer, &map, GST_MAP_READ)) {
    gst_buffer_unref (buffer);
    GST_ERROR_OBJECT (parent, "Buffer cannot be mapped");
    return GST_FLOW_ERROR;
  }

  pt = map.data[1];
  gst_buffer_unmap (buffer, &map);

  /* 200-204 is the range of valid values for a rtcp pt according to rfc3550 */
  if (pt >= 200 && pt <= 204) {
    GST_TRACE ("Buffer is rtcp: %d", pt);
    gst_pad_push (self->priv->rtcp_src, buffer);
  } else {
    gst_pad_push (self->priv->rtp_src, buffer);
  }

  return GST_FLOW_OK;
}
开发者ID:oldcookie,项目名称:kms-dtls-plugins,代码行数:26,代码来源:kmsrtcpdemux.c

示例12: _gst_gl_context_thread_run_generic

static void
_gst_gl_context_thread_run_generic (RunGenericData * data)
{
  GST_TRACE ("running function:%p data:%p", data->func, data->data);

  data->func (data->context, data->data);
}
开发者ID:Lachann,项目名称:gst-plugins-bad,代码行数:7,代码来源:gstglcontext.c

示例13: gst_gl_window_win32_run

static void
gst_gl_window_win32_run (GstGLWindow * window)
{
  gint bRet;
  MSG msg;

  GST_INFO ("begin message loop");

  while (TRUE) {
    bRet = GetMessage (&msg, NULL, 0, 0);
    if (bRet == 0)
      break;
    else if (bRet == -1) {
      GST_WARNING ("Failed to get message 0x%x",
          (unsigned int) GetLastError ());
      break;
    } else {
      GST_TRACE ("handle message");
      TranslateMessage (&msg);
      DispatchMessage (&msg);
    }
  }

  GST_INFO ("end message loop");
}
开发者ID:freedesktop-unofficial-mirror,项目名称:gstreamer__attic__gst-plugins-gl,代码行数:25,代码来源:gstglwindow_win32.c

示例14: _gen_texture

static void
_gen_texture (GstGLContext * context, GenTexture * data)
{
  const GstGLFuncs *gl = context->gl_vtable;
  GLenum internal_format;

  GST_TRACE ("Generating texture format:%u dimensions:%ux%u", data->format,
      data->width, data->height);

  gl->GenTextures (1, &data->result);
  gl->BindTexture (GL_TEXTURE_2D, data->result);

  internal_format =
      gst_gl_sized_gl_format_from_gl_format_type (context, GL_RGBA,
      GL_UNSIGNED_BYTE);
  if (data->width > 0 && data->height > 0)
    gl->TexImage2D (GL_TEXTURE_2D, 0, internal_format,
        data->width, data->height, 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL);

  gl->TexParameteri (GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
  gl->TexParameteri (GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
  gl->TexParameteri (GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
  gl->TexParameteri (GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);

  GST_LOG ("generated texture id:%d", data->result);
}
开发者ID:ndufresne,项目名称:gst-plugins-bad,代码行数:26,代码来源:gstglutils.c

示例15: kms_webrtc_transport_nice_agent_recv_cb

void
kms_webrtc_transport_nice_agent_recv_cb (NiceAgent * agent, guint stream_id,
    guint component_id, guint len, gchar * buf, gpointer user_data)
{
  /* Nothing to do, this callback is only for negotiation */
  GST_TRACE ("ICE data received on stream_id: '%" G_GUINT32_FORMAT
      "' component_id: '%" G_GUINT32_FORMAT "'", stream_id, component_id);
}
开发者ID:chadsmith,项目名称:kms-elements,代码行数:8,代码来源:kmswebrtctransport.c


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