예제 #1
0
static gchar *
_log_time (gpointer user_data)
{
  GstGLQuery *query = user_data;
  gint64 result;

  result = gst_gl_query_result (query);

  return gst_info_strdup_printf ("%" GST_TIME_FORMAT, GST_TIME_ARGS (result));
}
예제 #2
0
static void
_test_query_counter_log_gl (GstGLContext * context, gpointer data)
{
  GstGLQuery q2;

  gst_gl_query_init (&q2, context, GST_GL_QUERY_TIMESTAMP);

  gst_gl_query_counter_log (&q2, gst_test_debug_cat, GST_LEVEL_ERROR, NULL,
      "%s",
      "testing query proxy-logging works from gst_gl_query_counter_log()");
  gst_gl_query_result (&q2);

  gst_gl_query_unset (&q2);
}
예제 #3
0
static void
_test_query_start_result_gl (GstGLContext * context, gpointer data)
{
  GstGLQuery *q1;

  /* test mismatched start()/result() */
  q1 = gst_gl_query_new (context, GST_GL_QUERY_TIME_ELAPSED);
  fail_if (q1 == NULL);

  gst_gl_query_start (q1);
  ASSERT_CRITICAL (gst_gl_query_result (q1));
  gst_gl_query_end (q1);

  gst_gl_query_free (q1);
}
예제 #4
0
static void
_test_query_start_log_gl (GstGLContext * context, gpointer data)
{
  GstGLQuery *q1;

  q1 = gst_gl_query_new (context, GST_GL_QUERY_TIME_ELAPSED);
  fail_if (q1 == NULL);

  gst_gl_query_start_log (q1, NULL, GST_LEVEL_ERROR, NULL, "%s",
      "testing query proxy-logging for gst_gl_query_start_log()");
  gst_gl_query_end (q1);
  gst_gl_query_result (q1);

  gst_gl_query_free (q1);
}
예제 #5
0
static void
_test_query_timestamp_gl (GstGLContext * context, gpointer data)
{
  GstGLQuery q2;

  gst_gl_query_init (&q2, context, GST_GL_QUERY_TIMESTAMP);

  /* GST_GL_QUERY_TIMESTAMP doesn't supported start()/end() */
  ASSERT_CRITICAL (gst_gl_query_start (&q2));
  ASSERT_CRITICAL (gst_gl_query_end (&q2));

  gst_gl_query_counter (&q2);
  gst_gl_query_result (&q2);

  gst_gl_query_unset (&q2);
}
예제 #6
0
static void
_test_query_time_elapsed_gl (GstGLContext * context, gpointer data)
{
  GstGLQuery *q1;

  q1 = gst_gl_query_new (context, GST_GL_QUERY_TIME_ELAPSED);
  fail_if (q1 == NULL);

  gst_gl_query_start (q1);
  gst_gl_query_end (q1);
  /* GST_GL_QUERY_TIME_ELAPSED doesn't supported counter() */
  ASSERT_CRITICAL (gst_gl_query_counter (q1));
  gst_gl_query_result (q1);

  gst_gl_query_free (q1);
}