~ubuntu-branches/ubuntu/precise/gst-plugins-base0.10/precise-updates

« back to all changes in this revision

Viewing changes to tests/check/pipelines/basetime.c

  • Committer: Package Import Robot
  • Author(s): Sebastian Dröge
  • Date: 2011-12-12 12:40:13 UTC
  • mfrom: (36.1.15 experimental)
  • Revision ID: package-import@ubuntu.com-20111212124013-onyadfb150d8c5dk
Tags: 0.10.35.2-2
* debian/libgstreamer-plugins-base.install:
  + Add license translations file.

Show diffs side-by-side

added added

removed removed

Lines of Context:
44
44
static gboolean
45
45
buffer_probe_cb (GstPad * pad, GstBuffer * buffer)
46
46
{
 
47
  GstClockTime new_ts = GST_BUFFER_TIMESTAMP (buffer);
 
48
 
 
49
  GST_LOG ("ts = %" GST_TIME_FORMAT, GST_TIME_ARGS (new_ts));
47
50
  if (old_ts != GST_CLOCK_TIME_NONE) {
48
 
    fail_unless (GST_BUFFER_TIMESTAMP (buffer) != old_ts,
49
 
        "Two buffers had same timestamp");
 
51
    fail_unless (new_ts != old_ts,
 
52
        "Two buffers had same timestamp: %" GST_TIME_FORMAT,
 
53
        GST_TIME_ARGS (old_ts));
50
54
  }
51
 
  old_ts = GST_BUFFER_TIMESTAMP (buffer);
 
55
  old_ts = new_ts;
52
56
 
53
57
  return TRUE;
54
58
}
60
64
  GstPad *pad;
61
65
  GMainLoop *loop;
62
66
 
63
 
  /* Don't run with osxaudiosrc . This is because libcheck runs the actual
64
 
   * test in a forked process and causes havoc with osx's API. */
65
 
  if (G_UNLIKELY (!g_ascii_strcasecmp (DEFAULT_AUDIOSRC, "osxaudiosrc")))
66
 
    return;
67
 
 
68
67
  loop = g_main_loop_new (NULL, FALSE);
69
68
 
70
69
  /* The "main" pipeline */
72
71
  fail_if (p1 == NULL);
73
72
 
74
73
  /* Create a sub-bin that is activated only in "certain situations" */
75
 
  asrc = gst_element_factory_make (DEFAULT_AUDIOSRC, NULL);
 
74
  asrc = gst_element_factory_make ("audiotestsrc", NULL);
76
75
  if (asrc == NULL) {
77
 
    GST_WARNING ("Cannot run test. test audio source %s not available",
78
 
        DEFAULT_AUDIOSRC);
 
76
    GST_WARNING ("Cannot run test. 'audiotestsrc' not available");
79
77
    gst_element_set_state (p1, GST_STATE_NULL);
80
78
    gst_object_unref (p1);
81
79
    return;
117
115
  gst_object_unref (pad);
118
116
  gst_element_set_state (p1, GST_STATE_NULL);
119
117
  gst_object_unref (p1);
 
118
 
 
119
  g_main_loop_unref (loop);
120
120
}
121
121
 
122
122
GST_END_TEST;