tests: gst_adapter_prev_timestamp -> gst_adapter_prev_pts
authorTim-Philipp Müller <tim@centricular.net>
Tue, 13 Nov 2012 23:11:34 +0000 (23:11 +0000)
committerTim-Philipp Müller <tim@centricular.net>
Tue, 13 Nov 2012 23:11:34 +0000 (23:11 +0000)
https://bugzilla.gnome.org/show_bug.cgi?id=675598

gst/gstcompat.h
libs/gst/base/gstadapter.c
tests/check/libs/adapter.c

index ae3d4b6..4ccfeb0 100644 (file)
@@ -52,10 +52,6 @@ G_BEGIN_DECLS
 #define GST_BUFFER_TIMESTAMP          GST_BUFFER_PTS
 #define GST_BUFFER_TIMESTAMP_IS_VALID GST_BUFFER_PTS_IS_VALID
 
-#define gst_adapter_prev_timestamp    gst_adapter_prev_pts
-
-#define gst_tag_list_free(taglist)    gst_tag_list_unref(taglist)
-
 static inline gboolean
 gst_pad_set_caps (GstPad * pad, GstCaps * caps)
 {
@@ -78,6 +74,10 @@ gst_pad_set_caps (GstPad * pad, GstCaps * caps)
 
 #ifndef GST_DISABLE_DEPRECATED
 
+#define gst_adapter_prev_timestamp    gst_adapter_prev_pts
+
+#define gst_tag_list_free(taglist)    gst_tag_list_unref(taglist)
+
 #define GST_MESSAGE_DURATION GST_MESSAGE_DURATION_CHANGED
 #define gst_message_new_duration(src,fmt,dur) \
     gst_message_new_duration_changed(src)
index 21d2cc3..c9b0e83 100644 (file)
@@ -84,7 +84,7 @@
  *
  * The adapter will keep track of the timestamps of the buffers
  * that were pushed. The last seen timestamp before the current position
- * can be queried with gst_adapter_prev_timestamp(). This function can
+ * can be queried with gst_adapter_prev_pts(). This function can
  * optionally return the amount of bytes between the start of the buffer that
  * carried the timestamp and the current adapter position. The distance is
  * useful when dealing with, for example, raw audio samples because it allows
index 153a08b..df740f9 100644 (file)
@@ -376,7 +376,7 @@ GST_START_TEST (test_timestamp)
   fail_unless (avail == 100);
 
   /* timestamp is now undefined */
-  timestamp = gst_adapter_prev_timestamp (adapter, &dist);
+  timestamp = gst_adapter_prev_pts (adapter, &dist);
   fail_unless (timestamp == GST_CLOCK_TIME_NONE);
   fail_unless (dist == 0);
 
@@ -385,7 +385,7 @@ GST_START_TEST (test_timestamp)
   fail_unless (avail == 50);
 
   /* still undefined, dist changed, though */
-  timestamp = gst_adapter_prev_timestamp (adapter, &dist);
+  timestamp = gst_adapter_prev_pts (adapter, &dist);
   fail_unless (timestamp == GST_CLOCK_TIME_NONE);
   fail_unless (dist == 50);
 
@@ -398,7 +398,7 @@ GST_START_TEST (test_timestamp)
   fail_unless (avail == 150);
 
   /* timestamp is still undefined */
-  timestamp = gst_adapter_prev_timestamp (adapter, &dist);
+  timestamp = gst_adapter_prev_pts (adapter, &dist);
   fail_unless (timestamp == GST_CLOCK_TIME_NONE);
   fail_unless (dist == 50);
 
@@ -407,7 +407,7 @@ GST_START_TEST (test_timestamp)
   avail = gst_adapter_available (adapter);
   fail_unless (avail == 100);
 
-  timestamp = gst_adapter_prev_timestamp (adapter, &dist);
+  timestamp = gst_adapter_prev_pts (adapter, &dist);
   fail_unless (timestamp == 1 * GST_SECOND);
   fail_unless (dist == 0);
 
@@ -416,7 +416,7 @@ GST_START_TEST (test_timestamp)
   avail = gst_adapter_available (adapter);
   fail_unless (avail == 50);
 
-  timestamp = gst_adapter_prev_timestamp (adapter, &dist);
+  timestamp = gst_adapter_prev_pts (adapter, &dist);
   fail_unless (timestamp == 1 * GST_SECOND);
   fail_unless (dist == 50);
 
@@ -433,7 +433,7 @@ GST_START_TEST (test_timestamp)
   fail_unless (avail == 250);
 
   /* timestamp still as it was before the push */
-  timestamp = gst_adapter_prev_timestamp (adapter, &dist);
+  timestamp = gst_adapter_prev_pts (adapter, &dist);
   fail_unless (timestamp == 1 * GST_SECOND);
   fail_unless (dist == 50);
 
@@ -441,7 +441,7 @@ GST_START_TEST (test_timestamp)
   gst_adapter_flush (adapter, 50);
   avail = gst_adapter_available (adapter);
   fail_unless (avail == 200);
-  timestamp = gst_adapter_prev_timestamp (adapter, &dist);
+  timestamp = gst_adapter_prev_pts (adapter, &dist);
   fail_unless (timestamp == 1 * GST_SECOND);
   fail_unless (dist == 100);
 
@@ -449,7 +449,7 @@ GST_START_TEST (test_timestamp)
   gst_adapter_flush (adapter, 50);
   avail = gst_adapter_available (adapter);
   fail_unless (avail == 150);
-  timestamp = gst_adapter_prev_timestamp (adapter, &dist);
+  timestamp = gst_adapter_prev_pts (adapter, &dist);
   fail_unless (timestamp == 1 * GST_SECOND);
   fail_unless (dist == 150);
 
@@ -457,7 +457,7 @@ GST_START_TEST (test_timestamp)
   gst_adapter_flush (adapter, 50);
   avail = gst_adapter_available (adapter);
   fail_unless (avail == 100);
-  timestamp = gst_adapter_prev_timestamp (adapter, &dist);
+  timestamp = gst_adapter_prev_pts (adapter, &dist);
   fail_unless (timestamp == 2 * GST_SECOND);
   fail_unless (dist == 0);
 
@@ -465,7 +465,7 @@ GST_START_TEST (test_timestamp)
   gst_adapter_flush (adapter, 100);
   avail = gst_adapter_available (adapter);
   fail_unless (avail == 0);
-  timestamp = gst_adapter_prev_timestamp (adapter, &dist);
+  timestamp = gst_adapter_prev_pts (adapter, &dist);
   fail_unless (timestamp == 2 * GST_SECOND);
   fail_unless (dist == 100);
 
@@ -473,7 +473,7 @@ GST_START_TEST (test_timestamp)
   gst_adapter_clear (adapter);
   avail = gst_adapter_available (adapter);
   fail_unless (avail == 0);
-  timestamp = gst_adapter_prev_timestamp (adapter, &dist);
+  timestamp = gst_adapter_prev_pts (adapter, &dist);
   fail_unless (timestamp == GST_CLOCK_TIME_NONE);
   fail_unless (dist == 0);
 
@@ -483,7 +483,7 @@ GST_START_TEST (test_timestamp)
   gst_adapter_push (adapter, buffer);
   avail = gst_adapter_available (adapter);
   fail_unless (avail == 0);
-  timestamp = gst_adapter_prev_timestamp (adapter, &dist);
+  timestamp = gst_adapter_prev_pts (adapter, &dist);
   fail_unless (timestamp == 2 * GST_SECOND);
   fail_unless (dist == 0);
 
@@ -493,7 +493,7 @@ GST_START_TEST (test_timestamp)
   gst_adapter_push (adapter, buffer);
   avail = gst_adapter_available (adapter);
   fail_unless (avail == 0);
-  timestamp = gst_adapter_prev_timestamp (adapter, &dist);
+  timestamp = gst_adapter_prev_pts (adapter, &dist);
   fail_unless (timestamp == 2 * GST_SECOND);
   fail_unless (dist == 0);
 
@@ -503,14 +503,14 @@ GST_START_TEST (test_timestamp)
   gst_adapter_push (adapter, buffer);
   avail = gst_adapter_available (adapter);
   fail_unless (avail == 100);
-  timestamp = gst_adapter_prev_timestamp (adapter, &dist);
+  timestamp = gst_adapter_prev_pts (adapter, &dist);
   fail_unless (timestamp == 2 * GST_SECOND);
   fail_unless (dist == 0);
 
   gst_adapter_flush (adapter, 1);
   avail = gst_adapter_available (adapter);
   fail_unless (avail == 99);
-  timestamp = gst_adapter_prev_timestamp (adapter, &dist);
+  timestamp = gst_adapter_prev_pts (adapter, &dist);
   fail_unless (timestamp == 4 * GST_SECOND);
   fail_unless (dist == 1);
 
@@ -520,7 +520,7 @@ GST_START_TEST (test_timestamp)
   gst_adapter_push (adapter, buffer);
   avail = gst_adapter_available (adapter);
   fail_unless (avail == 99);
-  timestamp = gst_adapter_prev_timestamp (adapter, &dist);
+  timestamp = gst_adapter_prev_pts (adapter, &dist);
   fail_unless (timestamp == 4 * GST_SECOND);
   fail_unless (dist == 1);
 
@@ -529,7 +529,7 @@ GST_START_TEST (test_timestamp)
   gst_adapter_push (adapter, buffer);
   avail = gst_adapter_available (adapter);
   fail_unless (avail == 199);
-  timestamp = gst_adapter_prev_timestamp (adapter, &dist);
+  timestamp = gst_adapter_prev_pts (adapter, &dist);
   fail_unless (timestamp == 4 * GST_SECOND);
   fail_unless (dist == 1);
 
@@ -540,7 +540,7 @@ GST_START_TEST (test_timestamp)
   gst_buffer_unref (buffer);
   avail = gst_adapter_available (adapter);
   fail_unless (avail == 100);
-  timestamp = gst_adapter_prev_timestamp (adapter, &dist);
+  timestamp = gst_adapter_prev_pts (adapter, &dist);
   fail_unless (timestamp == 5 * GST_SECOND);
   fail_unless (dist == 0);
 
@@ -554,7 +554,7 @@ GST_START_TEST (test_timestamp)
   g_free (data);
   avail = gst_adapter_available (adapter);
   fail_unless (avail == 50);
-  timestamp = gst_adapter_prev_timestamp (adapter, &dist);
+  timestamp = gst_adapter_prev_pts (adapter, &dist);
   fail_unless (timestamp == 5 * GST_SECOND);
   fail_unless (dist == 50);