remove clock testsuite, important stuff already moved to check

Original commit message from CVS:
remove clock testsuite, important stuff already moved to check
This commit is contained in:
Thomas Vander Stichele 2005-06-20 11:23:59 +00:00
parent fb4c86ad72
commit 5d58464e8a
13 changed files with 4 additions and 355 deletions

View file

@ -679,7 +679,6 @@ testsuite/Makefile
testsuite/bytestream/Makefile testsuite/bytestream/Makefile
testsuite/caps/Makefile testsuite/caps/Makefile
testsuite/cleanup/Makefile testsuite/cleanup/Makefile
testsuite/clock/Makefile
testsuite/debug/Makefile testsuite/debug/Makefile
testsuite/dlopen/Makefile testsuite/dlopen/Makefile
testsuite/dynparams/Makefile testsuite/dynparams/Makefile

View file

@ -14,7 +14,7 @@ GST_DEBUG_DIRS = debug
endif endif
SUBDIRS = \ SUBDIRS = \
bytestream caps cleanup clock \ bytestream caps cleanup \
$(GST_DEBUG_DIRS) \ $(GST_DEBUG_DIRS) \
dlopen dynparams \ dlopen dynparams \
elements ghostpads indexers negotiation pad \ elements ghostpads indexers negotiation pad \
@ -22,7 +22,7 @@ SUBDIRS = \
plugin refcounting schedulers states threads trigger plugin refcounting schedulers states threads trigger
DIST_SUBDIRS = \ DIST_SUBDIRS = \
bytestream caps cleanup clock \ bytestream caps cleanup \
debug \ debug \
dlopen dynparams \ dlopen dynparams \
elements ghostpads indexers negotiation pad \ elements ghostpads indexers negotiation pad \

View file

@ -1,3 +0,0 @@
clock1
clock2
signedness

View file

@ -1,5 +0,0 @@
include ../Rules
tests_pass = signedness clock1 clock2
tests_fail =
tests_ignore =

View file

@ -1,58 +0,0 @@
/*
* testsuite program to test clock behaviour
*
* creates a fakesrc ! identity ! fakesink pipeline
* registers a callback on fakesrc and one on fakesink
* also register a normal GLib timeout which should not be reached
*/
#include <gst/gst.h>
void
gst_clock_debug (GstClock * clock)
{
g_print ("Clock info: time %" G_GUINT64_FORMAT "\n",
gst_clock_get_time (clock));
}
int
main (int argc, char *argv[])
{
GstElement *src, *id, *sink, *pipeline;
GstClock *clock = NULL;
gst_init (&argc, &argv);
if ((src = gst_element_factory_make ("fakesrc", "source")) == NULL) {
g_print ("Could not create a fakesrc element !\n");
return 1;
}
if ((id = gst_element_factory_make ("identity", "filter")) == NULL) {
g_print ("Could not create a identity element !\n");
return 1;
}
if ((sink = gst_element_factory_make ("fakesink", "sink")) == NULL) {
g_print ("Could not create a fakesink element !\n");
return 1;
}
if ((pipeline = gst_pipeline_new ("pipeline")) == NULL) {
g_print ("Could not create a pipeline element !\n");
return 1;
}
gst_bin_add_many (GST_BIN (pipeline), src, id, sink, NULL);
gst_element_link_many (src, id, sink, NULL);
clock = gst_pipeline_get_clock (GST_PIPELINE (pipeline));
g_assert (clock != NULL);
gst_clock_debug (clock);
gst_clock_debug (clock);
gst_element_set_state (GST_ELEMENT (pipeline), GST_STATE_PLAYING);
gst_clock_debug (clock);
gst_clock_debug (clock);
gst_clock_debug (clock);
/* success */
return 0;
}

View file

@ -1,69 +0,0 @@
/*
* testsuite program to test clock behaviour
*
* creates a fakesrc ! identity ! fakesink pipeline
* registers a callback on fakesrc and one on fakesink
* also register a normal GLib timeout which should not be reached
*/
#include <gst/gst.h>
void
gst_clock_debug (GstClock * clock, GstElement * fakesink)
{
GstClockTime time;
time = gst_clock_get_time (clock);
g_print ("Clock info: time %" G_GUINT64_FORMAT " Element %" GST_TIME_FORMAT
"\n", time, GST_TIME_ARGS (time - fakesink->base_time));
}
static void
element_wait (GstElement * element, GstClockTime time)
{
GstClockID id;
id = gst_clock_new_single_shot_id (clock, time + element->base_time);
gst_clock_id_wait (id, NULL);
gst_clock_id_unref (id);
}
int
main (int argc, char *argv[])
{
GstClock *clock = NULL;
GstElement *pipeline, *fakesrc, *fakesink;
gst_init (&argc, &argv);
clock = gst_system_clock_obtain ();
g_assert (clock != NULL);
/* we check the time on an element */
fakesrc = gst_element_factory_make ("fakesrc", NULL);
g_assert (fakesrc);
fakesink = gst_element_factory_make ("fakesink", NULL);
g_assert (fakesink);
pipeline = gst_element_factory_make ("pipeline", NULL);
g_assert (pipeline);
gst_bin_add_many (GST_BIN (pipeline), fakesink, fakesrc, NULL);
gst_element_link (fakesrc, fakesink);
gst_element_set_state (pipeline, GST_STATE_PLAYING);
gst_clock_debug (clock, fakesink);
g_usleep (G_USEC_PER_SEC);
gst_clock_debug (clock, fakesink);
element_wait (fakesink, 2 * GST_SECOND);
gst_clock_debug (clock, fakesink);
element_wait (fakesink, 5 * GST_SECOND);
gst_clock_debug (clock, fakesink);
g_usleep (G_USEC_PER_SEC);
gst_clock_debug (clock, fakesink);
/* success */
return 0;
}

View file

@ -1,40 +0,0 @@
/*
* testsuite program to make sure GST_SECOND doesn't cause signedness
* conversions
*/
#include <gst/gst.h>
int
main (int argc, char *argv[])
{
GstClockTime time[] = { 0, 1, G_MAXUINT64 / GST_SECOND };
GstClockTimeDiff diff[] =
{ 0, 1, -1, G_MAXINT64 / GST_SECOND, G_MININT64 / GST_SECOND };
guint i;
gst_init (&argc, &argv);
for (i = 0; i < G_N_ELEMENTS (time); i++) {
g_print ("%" G_GUINT64_FORMAT " != %" G_GUINT64_FORMAT
" * GST_SECOND / GST_SECOND ? ... ", time[i], time[i]);
if (time[i] != (time[i] * GST_SECOND / GST_SECOND)) {
g_print ("NO\n");
g_assert_not_reached ();
return 1;
}
g_print ("yes\n");
}
for (i = 0; i < G_N_ELEMENTS (diff); i++) {
g_print ("%" G_GINT64_FORMAT " != %" G_GINT64_FORMAT
" * GST_SECOND / GST_SECOND ? ... ", diff[i], diff[i]);
if (diff[i] != (diff[i] * GST_SECOND / GST_SECOND)) {
g_print ("NO\n");
g_assert_not_reached ();
return 1;
}
g_print ("yes\n");
}
return 0;
}

View file

@ -14,7 +14,7 @@ GST_DEBUG_DIRS = debug
endif endif
SUBDIRS = \ SUBDIRS = \
bytestream caps cleanup clock \ bytestream caps cleanup \
$(GST_DEBUG_DIRS) \ $(GST_DEBUG_DIRS) \
dlopen dynparams \ dlopen dynparams \
elements ghostpads indexers negotiation pad \ elements ghostpads indexers negotiation pad \
@ -22,7 +22,7 @@ SUBDIRS = \
plugin refcounting schedulers states threads trigger plugin refcounting schedulers states threads trigger
DIST_SUBDIRS = \ DIST_SUBDIRS = \
bytestream caps cleanup clock \ bytestream caps cleanup \
debug \ debug \
dlopen dynparams \ dlopen dynparams \
elements ghostpads indexers negotiation pad \ elements ghostpads indexers negotiation pad \

View file

@ -1,3 +0,0 @@
clock1
clock2
signedness

View file

@ -1,5 +0,0 @@
include ../Rules
tests_pass = signedness clock1 clock2
tests_fail =
tests_ignore =

View file

@ -1,58 +0,0 @@
/*
* testsuite program to test clock behaviour
*
* creates a fakesrc ! identity ! fakesink pipeline
* registers a callback on fakesrc and one on fakesink
* also register a normal GLib timeout which should not be reached
*/
#include <gst/gst.h>
void
gst_clock_debug (GstClock * clock)
{
g_print ("Clock info: time %" G_GUINT64_FORMAT "\n",
gst_clock_get_time (clock));
}
int
main (int argc, char *argv[])
{
GstElement *src, *id, *sink, *pipeline;
GstClock *clock = NULL;
gst_init (&argc, &argv);
if ((src = gst_element_factory_make ("fakesrc", "source")) == NULL) {
g_print ("Could not create a fakesrc element !\n");
return 1;
}
if ((id = gst_element_factory_make ("identity", "filter")) == NULL) {
g_print ("Could not create a identity element !\n");
return 1;
}
if ((sink = gst_element_factory_make ("fakesink", "sink")) == NULL) {
g_print ("Could not create a fakesink element !\n");
return 1;
}
if ((pipeline = gst_pipeline_new ("pipeline")) == NULL) {
g_print ("Could not create a pipeline element !\n");
return 1;
}
gst_bin_add_many (GST_BIN (pipeline), src, id, sink, NULL);
gst_element_link_many (src, id, sink, NULL);
clock = gst_pipeline_get_clock (GST_PIPELINE (pipeline));
g_assert (clock != NULL);
gst_clock_debug (clock);
gst_clock_debug (clock);
gst_element_set_state (GST_ELEMENT (pipeline), GST_STATE_PLAYING);
gst_clock_debug (clock);
gst_clock_debug (clock);
gst_clock_debug (clock);
/* success */
return 0;
}

View file

@ -1,69 +0,0 @@
/*
* testsuite program to test clock behaviour
*
* creates a fakesrc ! identity ! fakesink pipeline
* registers a callback on fakesrc and one on fakesink
* also register a normal GLib timeout which should not be reached
*/
#include <gst/gst.h>
void
gst_clock_debug (GstClock * clock, GstElement * fakesink)
{
GstClockTime time;
time = gst_clock_get_time (clock);
g_print ("Clock info: time %" G_GUINT64_FORMAT " Element %" GST_TIME_FORMAT
"\n", time, GST_TIME_ARGS (time - fakesink->base_time));
}
static void
element_wait (GstElement * element, GstClockTime time)
{
GstClockID id;
id = gst_clock_new_single_shot_id (clock, time + element->base_time);
gst_clock_id_wait (id, NULL);
gst_clock_id_unref (id);
}
int
main (int argc, char *argv[])
{
GstClock *clock = NULL;
GstElement *pipeline, *fakesrc, *fakesink;
gst_init (&argc, &argv);
clock = gst_system_clock_obtain ();
g_assert (clock != NULL);
/* we check the time on an element */
fakesrc = gst_element_factory_make ("fakesrc", NULL);
g_assert (fakesrc);
fakesink = gst_element_factory_make ("fakesink", NULL);
g_assert (fakesink);
pipeline = gst_element_factory_make ("pipeline", NULL);
g_assert (pipeline);
gst_bin_add_many (GST_BIN (pipeline), fakesink, fakesrc, NULL);
gst_element_link (fakesrc, fakesink);
gst_element_set_state (pipeline, GST_STATE_PLAYING);
gst_clock_debug (clock, fakesink);
g_usleep (G_USEC_PER_SEC);
gst_clock_debug (clock, fakesink);
element_wait (fakesink, 2 * GST_SECOND);
gst_clock_debug (clock, fakesink);
element_wait (fakesink, 5 * GST_SECOND);
gst_clock_debug (clock, fakesink);
g_usleep (G_USEC_PER_SEC);
gst_clock_debug (clock, fakesink);
/* success */
return 0;
}

View file

@ -1,40 +0,0 @@
/*
* testsuite program to make sure GST_SECOND doesn't cause signedness
* conversions
*/
#include <gst/gst.h>
int
main (int argc, char *argv[])
{
GstClockTime time[] = { 0, 1, G_MAXUINT64 / GST_SECOND };
GstClockTimeDiff diff[] =
{ 0, 1, -1, G_MAXINT64 / GST_SECOND, G_MININT64 / GST_SECOND };
guint i;
gst_init (&argc, &argv);
for (i = 0; i < G_N_ELEMENTS (time); i++) {
g_print ("%" G_GUINT64_FORMAT " != %" G_GUINT64_FORMAT
" * GST_SECOND / GST_SECOND ? ... ", time[i], time[i]);
if (time[i] != (time[i] * GST_SECOND / GST_SECOND)) {
g_print ("NO\n");
g_assert_not_reached ();
return 1;
}
g_print ("yes\n");
}
for (i = 0; i < G_N_ELEMENTS (diff); i++) {
g_print ("%" G_GINT64_FORMAT " != %" G_GINT64_FORMAT
" * GST_SECOND / GST_SECOND ? ... ", diff[i], diff[i]);
if (diff[i] != (diff[i] * GST_SECOND / GST_SECOND)) {
g_print ("NO\n");
g_assert_not_reached ();
return 1;
}
g_print ("yes\n");
}
return 0;
}