2005-09-09 12:02:41 +00:00
|
|
|
/* GStreamer
|
|
|
|
* Copyright (C) 2005 Thomas Vander Stichele <thomas at apestaart dot org>
|
|
|
|
*
|
|
|
|
* gstpipeline.c: Unit test for GstPipeline
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Library General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Library General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Library General Public
|
|
|
|
* License along with this library; if not, write to the
|
2012-11-03 20:44:48 +00:00
|
|
|
* Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
|
|
|
|
* Boston, MA 02110-1301, USA.
|
2005-09-09 12:02:41 +00:00
|
|
|
*/
|
2008-04-25 10:01:46 +00:00
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
#include "config.h"
|
|
|
|
#endif
|
2005-09-09 12:02:41 +00:00
|
|
|
|
|
|
|
#include <gst/check/gstcheck.h>
|
2008-04-25 10:01:46 +00:00
|
|
|
#include <gst/gst.h>
|
2018-10-17 20:38:42 +00:00
|
|
|
#include <gst/check/gsttestclock.h>
|
2005-09-09 12:02:41 +00:00
|
|
|
|
2005-09-12 17:01:18 +00:00
|
|
|
/* an empty pipeline can go to PLAYING in one go */
|
2005-09-09 12:02:41 +00:00
|
|
|
GST_START_TEST (test_async_state_change_empty)
|
|
|
|
{
|
|
|
|
GstPipeline *pipeline;
|
|
|
|
|
|
|
|
pipeline = GST_PIPELINE (gst_pipeline_new (NULL));
|
|
|
|
fail_unless (pipeline != NULL, "Could not create pipeline");
|
|
|
|
|
|
|
|
fail_unless_equals_int (gst_element_set_state (GST_ELEMENT (pipeline),
|
2005-09-12 17:01:18 +00:00
|
|
|
GST_STATE_PLAYING), GST_STATE_CHANGE_SUCCESS);
|
2005-09-09 12:02:41 +00:00
|
|
|
|
2012-08-12 15:40:03 +00:00
|
|
|
gst_element_set_state (GST_ELEMENT (pipeline), GST_STATE_NULL);
|
2005-09-09 12:02:41 +00:00
|
|
|
gst_object_unref (pipeline);
|
|
|
|
}
|
|
|
|
|
|
|
|
GST_END_TEST;
|
|
|
|
|
|
|
|
GST_START_TEST (test_async_state_change_fake_ready)
|
|
|
|
{
|
|
|
|
GstPipeline *pipeline;
|
|
|
|
GstElement *src, *sink;
|
|
|
|
|
|
|
|
pipeline = GST_PIPELINE (gst_pipeline_new (NULL));
|
|
|
|
fail_unless (pipeline != NULL, "Could not create pipeline");
|
|
|
|
|
|
|
|
src = gst_element_factory_make ("fakesrc", NULL);
|
|
|
|
sink = gst_element_factory_make ("fakesink", NULL);
|
|
|
|
|
|
|
|
gst_bin_add_many (GST_BIN (pipeline), src, sink, NULL);
|
|
|
|
gst_element_link (src, sink);
|
|
|
|
|
|
|
|
fail_unless_equals_int (gst_element_set_state (GST_ELEMENT (pipeline),
|
2005-09-12 17:01:18 +00:00
|
|
|
GST_STATE_READY), GST_STATE_CHANGE_SUCCESS);
|
2005-09-09 12:02:41 +00:00
|
|
|
|
2012-08-12 15:40:03 +00:00
|
|
|
gst_element_set_state (GST_ELEMENT (pipeline), GST_STATE_NULL);
|
2005-09-09 12:02:41 +00:00
|
|
|
gst_object_unref (pipeline);
|
|
|
|
}
|
|
|
|
|
|
|
|
GST_END_TEST;
|
|
|
|
|
|
|
|
GST_START_TEST (test_async_state_change_fake)
|
|
|
|
{
|
|
|
|
GstPipeline *pipeline;
|
|
|
|
GstElement *src, *sink;
|
|
|
|
GstBus *bus;
|
2008-05-27 19:47:49 +00:00
|
|
|
gboolean done = FALSE;
|
2005-09-09 12:02:41 +00:00
|
|
|
|
|
|
|
pipeline = GST_PIPELINE (gst_pipeline_new (NULL));
|
|
|
|
fail_unless (pipeline != NULL, "Could not create pipeline");
|
|
|
|
|
|
|
|
src = gst_element_factory_make ("fakesrc", NULL);
|
|
|
|
sink = gst_element_factory_make ("fakesink", NULL);
|
|
|
|
|
|
|
|
gst_bin_add_many (GST_BIN (pipeline), src, sink, NULL);
|
|
|
|
gst_element_link (src, sink);
|
|
|
|
|
|
|
|
bus = gst_pipeline_get_bus (pipeline);
|
|
|
|
|
check/: Check fixes, use API as stated in design docs, remove hacks.
Original commit message from CVS:
* check/Makefile.am:
* check/generic/states.c: (GST_START_TEST):
* check/gst/gstbin.c: (GST_START_TEST):
* check/gst/gstpipeline.c: (GST_START_TEST), (gst_pipeline_suite):
* check/states/sinks.c: (GST_START_TEST):
* check/states/sinks2.c: (GST_START_TEST), (gst_object_suite),
(main):
Check fixes, use API as stated in design docs, remove hacks.
* gst/base/gstbasesink.c: (gst_base_sink_handle_object),
(gst_base_sink_change_state):
Catch stopping our task while we're shutting down.
* gst/gstbin.c: (gst_bin_init), (gst_bin_add_func),
(gst_bin_remove_func), (gst_bin_get_state_func),
(gst_bin_recalc_state), (gst_bin_change_state_func),
(bin_bus_handler):
* gst/gstbin.h:
* gst/gstelement.c: (gst_element_init),
(gst_element_get_state_func), (gst_element_abort_state),
(gst_element_commit_state), (gst_element_lost_state),
(gst_element_set_state), (gst_element_change_state),
(gst_element_change_state_func):
* gst/gstelement.h:
New state change algorithm (see #318116)
* gst/gstpipeline.c: (gst_pipeline_class_init),
(gst_pipeline_init), (gst_pipeline_set_property),
(gst_pipeline_get_property), (do_pipeline_seek),
(gst_pipeline_change_state), (gst_pipeline_provide_clock_func):
* gst/gstpipeline.h:
Remove crude state change hacks.
* gst/gstutils.h:
Remove crude hacks.
* tools/gst-launch.c: (main):
Fixes for state change. Needs some more work to fully use the
new stuff.
2005-10-10 16:38:26 +00:00
|
|
|
fail_unless_equals_int (gst_element_set_state (GST_ELEMENT (pipeline),
|
2005-09-09 12:02:41 +00:00
|
|
|
GST_STATE_PLAYING), GST_STATE_CHANGE_ASYNC);
|
|
|
|
|
2005-09-12 18:14:03 +00:00
|
|
|
while (!done) {
|
2005-09-09 12:02:41 +00:00
|
|
|
GstMessage *message;
|
2005-10-08 08:58:45 +00:00
|
|
|
GstState old, new, pending;
|
GstBusHandler -> GstBusFunc, return value has the same meaning as any other GSource (FALSE == remove source).
Original commit message from CVS:
* check/gst/gstbin.c: (pop_messages), (GST_START_TEST):
* check/gst/gstbus.c: (message_func_eos), (message_func_app),
(send_messages), (GST_START_TEST), (gstbus_suite):
* check/gst/gstpipeline.c: (GST_START_TEST):
* check/pipelines/cleanup.c: (run_pipeline):
* check/pipelines/simple_launch_lines.c: (run_pipeline),
(GST_START_TEST):
* gst/gstbus.c: (gst_bus_have_pending), (gst_bus_source_prepare),
(gst_bus_source_check), (gst_bus_source_dispatch),
(gst_bus_create_watch), (gst_bus_add_watch_full),
(gst_bus_add_watch), (poll_func), (poll_timeout), (gst_bus_poll):
* gst/gstbus.h:
* tools/gst-launch.c: (event_loop):
* tools/gst-md5sum.c: (event_loop):
GstBusHandler -> GstBusFunc, return value has the same meaning as
any other GSource (FALSE == remove source).
_add_watch() and _add_watch_full() now take a MessageType mask to
only handle specific types of messages.
_poll() returns the GstMessage instead of the message type to avoid
race conditions.
_have_pending() takes a MessageType mask now too.
Added testsuite for multiple bus watches.
Fix testsuites and applications for new bus API.
2005-09-19 11:18:03 +00:00
|
|
|
|
|
|
|
message = gst_bus_poll (bus, GST_MESSAGE_STATE_CHANGED, -1);
|
|
|
|
if (message) {
|
Seriously, this is better than a previous commit as we only need to notify the fact that an element changed state in ...
Original commit message from CVS:
* check/gst/gstbin.c: (GST_START_TEST):
* check/gst/gstmessage.c: (GST_START_TEST):
* check/gst/gstpipeline.c: (GST_START_TEST), (message_received):
* gst/gstbin.c: (gst_bin_class_init), (gst_bin_recalc_func),
(bin_bus_handler):
* gst/gstelement.c: (gst_element_abort_state),
(gst_element_commit_state), (gst_element_lost_state):
* gst/gstmessage.c: (gst_message_new_state_changed),
(gst_message_new_state_dirty), (gst_message_new_segment_start),
(gst_message_new_segment_done), (gst_message_new_duration),
(gst_message_parse_state_changed),
(gst_message_parse_segment_start),
(gst_message_parse_segment_done), (gst_message_parse_duration):
* gst/gstmessage.h:
* tools/gst-launch.c: (event_loop):
Seriously, this is better than a previous commit as we only need
to notify the fact that an element changed state in a streaming
thread, marking the state of the parents dirty, hence the
STATE_DIRTY message instead of abusing a boolean in a STATE_CHANGE
message.
2005-10-18 16:25:38 +00:00
|
|
|
gst_message_parse_state_changed (message, &old, &new, &pending);
|
GstBusHandler -> GstBusFunc, return value has the same meaning as any other GSource (FALSE == remove source).
Original commit message from CVS:
* check/gst/gstbin.c: (pop_messages), (GST_START_TEST):
* check/gst/gstbus.c: (message_func_eos), (message_func_app),
(send_messages), (GST_START_TEST), (gstbus_suite):
* check/gst/gstpipeline.c: (GST_START_TEST):
* check/pipelines/cleanup.c: (run_pipeline):
* check/pipelines/simple_launch_lines.c: (run_pipeline),
(GST_START_TEST):
* gst/gstbus.c: (gst_bus_have_pending), (gst_bus_source_prepare),
(gst_bus_source_check), (gst_bus_source_dispatch),
(gst_bus_create_watch), (gst_bus_add_watch_full),
(gst_bus_add_watch), (poll_func), (poll_timeout), (gst_bus_poll):
* gst/gstbus.h:
* tools/gst-launch.c: (event_loop):
* tools/gst-md5sum.c: (event_loop):
GstBusHandler -> GstBusFunc, return value has the same meaning as
any other GSource (FALSE == remove source).
_add_watch() and _add_watch_full() now take a MessageType mask to
only handle specific types of messages.
_poll() returns the GstMessage instead of the message type to avoid
race conditions.
_have_pending() takes a MessageType mask now too.
Added testsuite for multiple bus watches.
Fix testsuites and applications for new bus API.
2005-09-19 11:18:03 +00:00
|
|
|
GST_DEBUG_OBJECT (message->src, "state change from %d to %d", old, new);
|
|
|
|
if (message->src == GST_OBJECT (pipeline) && new == GST_STATE_PLAYING)
|
|
|
|
done = TRUE;
|
|
|
|
gst_message_unref (message);
|
|
|
|
}
|
2005-09-09 12:02:41 +00:00
|
|
|
}
|
2005-09-12 17:01:18 +00:00
|
|
|
|
2005-09-12 18:14:03 +00:00
|
|
|
fail_unless_equals_int (gst_element_set_state (GST_ELEMENT (pipeline),
|
|
|
|
GST_STATE_NULL), GST_STATE_CHANGE_SUCCESS);
|
|
|
|
|
2008-05-27 19:47:49 +00:00
|
|
|
/* here we don't get the state change messages, because of auto-flush in
|
|
|
|
* the bus */
|
2008-05-27 18:31:39 +00:00
|
|
|
|
2005-09-12 18:14:03 +00:00
|
|
|
gst_object_unref (bus);
|
2005-09-09 12:02:41 +00:00
|
|
|
gst_object_unref (pipeline);
|
|
|
|
}
|
|
|
|
|
|
|
|
GST_END_TEST;
|
|
|
|
|
2005-09-29 18:37:48 +00:00
|
|
|
GST_START_TEST (test_get_bus)
|
2005-09-28 15:45:21 +00:00
|
|
|
{
|
|
|
|
GstPipeline *pipeline;
|
|
|
|
GstBus *bus;
|
|
|
|
|
|
|
|
pipeline = GST_PIPELINE (gst_pipeline_new (NULL));
|
|
|
|
fail_unless (pipeline != NULL, "Could not create pipeline");
|
|
|
|
ASSERT_OBJECT_REFCOUNT (pipeline, "pipeline", 1);
|
|
|
|
|
|
|
|
bus = gst_pipeline_get_bus (pipeline);
|
|
|
|
ASSERT_OBJECT_REFCOUNT (pipeline, "pipeline after get_bus", 1);
|
|
|
|
ASSERT_OBJECT_REFCOUNT (bus, "bus", 2);
|
|
|
|
|
2012-07-02 23:07:11 +00:00
|
|
|
/* bindings don't like the floating flag to be set here */
|
|
|
|
fail_if (g_object_is_floating (bus));
|
|
|
|
|
2005-09-28 15:45:21 +00:00
|
|
|
gst_object_unref (pipeline);
|
|
|
|
|
|
|
|
ASSERT_OBJECT_REFCOUNT (bus, "bus after unref pipeline", 1);
|
|
|
|
gst_object_unref (bus);
|
|
|
|
}
|
|
|
|
|
|
|
|
GST_END_TEST;
|
|
|
|
|
Correct all relevant warnings found by the sparse semantic code analyzer. This include marking several symbols static...
Original commit message from CVS:
* gst/gstconfig.h.in:
* libs/gst/base/gstcollectpads.c: (gst_collect_pads_read_buffer):
* libs/gst/check/gstcheck.c: (gst_check_log_message_func),
(gst_check_log_critical_func), (gst_check_drop_buffers),
(gst_check_element_push_buffer_list):
* libs/gst/controller/gstcontroller.c: (gst_controller_get),
(gst_controller_get_type):
* libs/gst/controller/gsthelper.c: (gst_object_control_properties),
(gst_object_get_controller), (gst_object_get_control_source):
* libs/gst/controller/gstinterpolationcontrolsource.c:
(gst_interpolation_control_source_new):
* libs/gst/controller/gstlfocontrolsource.c:
(gst_lfo_control_source_new):
* libs/gst/dataprotocol/dataprotocol.c:
(gst_dp_event_from_packet_0_2):
* plugins/elements/gstfdsrc.c:
* plugins/elements/gstmultiqueue.c:
* plugins/elements/gsttee.c:
* plugins/elements/gsttypefindelement.c:
* plugins/indexers/gstfileindex.c: (_file_index_id_save_xml),
(gst_file_index_add_association):
* plugins/indexers/gstmemindex.c:
* tests/benchmarks/gstpollstress.c: (mess_some_more):
* tests/check/elements/queue.c: (setup_queue):
* tests/check/gst/gstpipeline.c:
* tests/check/libs/collectpads.c: (setup), (teardown),
(gst_collect_pads_suite):
* tests/examples/adapter/adapter_test.c:
* tests/examples/metadata/read-metadata.c: (make_pipeline):
* tests/examples/xml/createxml.c:
* tests/examples/xml/runxml.c:
* tools/gst-inspect.c:
* tools/gst-run.c:
Correct all relevant warnings found by the sparse semantic code
analyzer. This include marking several symbols static, using
NULL instead of 0 for pointers, not using variable sized arrays
on the stack, moving variable declarations to the beginning of
a block and using "foo (void)" instead of "foo ()" for declarations.
2008-02-29 12:41:33 +00:00
|
|
|
static GMainLoop *loop = NULL;
|
2005-09-29 18:37:48 +00:00
|
|
|
|
Correct all relevant warnings found by the sparse semantic code analyzer. This include marking several symbols static...
Original commit message from CVS:
* gst/gstconfig.h.in:
* libs/gst/base/gstcollectpads.c: (gst_collect_pads_read_buffer):
* libs/gst/check/gstcheck.c: (gst_check_log_message_func),
(gst_check_log_critical_func), (gst_check_drop_buffers),
(gst_check_element_push_buffer_list):
* libs/gst/controller/gstcontroller.c: (gst_controller_get),
(gst_controller_get_type):
* libs/gst/controller/gsthelper.c: (gst_object_control_properties),
(gst_object_get_controller), (gst_object_get_control_source):
* libs/gst/controller/gstinterpolationcontrolsource.c:
(gst_interpolation_control_source_new):
* libs/gst/controller/gstlfocontrolsource.c:
(gst_lfo_control_source_new):
* libs/gst/dataprotocol/dataprotocol.c:
(gst_dp_event_from_packet_0_2):
* plugins/elements/gstfdsrc.c:
* plugins/elements/gstmultiqueue.c:
* plugins/elements/gsttee.c:
* plugins/elements/gsttypefindelement.c:
* plugins/indexers/gstfileindex.c: (_file_index_id_save_xml),
(gst_file_index_add_association):
* plugins/indexers/gstmemindex.c:
* tests/benchmarks/gstpollstress.c: (mess_some_more):
* tests/check/elements/queue.c: (setup_queue):
* tests/check/gst/gstpipeline.c:
* tests/check/libs/collectpads.c: (setup), (teardown),
(gst_collect_pads_suite):
* tests/examples/adapter/adapter_test.c:
* tests/examples/metadata/read-metadata.c: (make_pipeline):
* tests/examples/xml/createxml.c:
* tests/examples/xml/runxml.c:
* tools/gst-inspect.c:
* tools/gst-run.c:
Correct all relevant warnings found by the sparse semantic code
analyzer. This include marking several symbols static, using
NULL instead of 0 for pointers, not using variable sized arrays
on the stack, moving variable declarations to the beginning of
a block and using "foo (void)" instead of "foo ()" for declarations.
2008-02-29 12:41:33 +00:00
|
|
|
static gboolean
|
2005-09-29 18:37:48 +00:00
|
|
|
message_received (GstBus * bus, GstMessage * message, gpointer data)
|
|
|
|
{
|
|
|
|
GstElement *pipeline = GST_ELEMENT (data);
|
|
|
|
GstMessageType type = message->type;
|
|
|
|
|
|
|
|
GST_DEBUG ("message received");
|
|
|
|
switch (type) {
|
|
|
|
case GST_MESSAGE_STATE_CHANGED:
|
|
|
|
{
|
2005-10-08 08:58:45 +00:00
|
|
|
GstState old, new, pending;
|
2005-09-29 18:37:48 +00:00
|
|
|
|
|
|
|
GST_DEBUG ("state change message received");
|
Seriously, this is better than a previous commit as we only need to notify the fact that an element changed state in ...
Original commit message from CVS:
* check/gst/gstbin.c: (GST_START_TEST):
* check/gst/gstmessage.c: (GST_START_TEST):
* check/gst/gstpipeline.c: (GST_START_TEST), (message_received):
* gst/gstbin.c: (gst_bin_class_init), (gst_bin_recalc_func),
(bin_bus_handler):
* gst/gstelement.c: (gst_element_abort_state),
(gst_element_commit_state), (gst_element_lost_state):
* gst/gstmessage.c: (gst_message_new_state_changed),
(gst_message_new_state_dirty), (gst_message_new_segment_start),
(gst_message_new_segment_done), (gst_message_new_duration),
(gst_message_parse_state_changed),
(gst_message_parse_segment_start),
(gst_message_parse_segment_done), (gst_message_parse_duration):
* gst/gstmessage.h:
* tools/gst-launch.c: (event_loop):
Seriously, this is better than a previous commit as we only need
to notify the fact that an element changed state in a streaming
thread, marking the state of the parents dirty, hence the
STATE_DIRTY message instead of abusing a boolean in a STATE_CHANGE
message.
2005-10-18 16:25:38 +00:00
|
|
|
gst_message_parse_state_changed (message, &old, &new, &pending);
|
2005-09-29 18:37:48 +00:00
|
|
|
GST_DEBUG ("new state %d", new);
|
|
|
|
if (message->src == GST_OBJECT (pipeline) && new == GST_STATE_PLAYING) {
|
|
|
|
GST_DEBUG ("quitting main loop");
|
|
|
|
g_main_loop_quit (loop);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case GST_MESSAGE_ERROR:
|
|
|
|
{
|
|
|
|
g_print ("error\n");
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
GST_START_TEST (test_bus)
|
|
|
|
{
|
|
|
|
GstElement *pipeline;
|
|
|
|
GstElement *src, *sink;
|
|
|
|
GstBus *bus;
|
|
|
|
guint id;
|
|
|
|
GstState current;
|
Use GstClockTime in _get_state() instead of GTimeVal.
Original commit message from CVS:
* check/gst/gstbin.c: (GST_START_TEST):
* check/gst/gstelement.c: (GST_START_TEST):
* check/gst/gstevent.c: (GST_START_TEST), (test_event):
* check/gst/gstghostpad.c: (GST_START_TEST):
* check/gst/gstpipeline.c: (GST_START_TEST):
* check/pipelines/simple_launch_lines.c: (run_pipeline):
* check/states/sinks.c: (GST_START_TEST):
* gst/elements/gsttypefindelement.c: (stop_typefinding):
* gst/gstbin.c: (gst_bin_provide_clock_func), (gst_bin_add_func),
(gst_bin_remove_func), (gst_bin_get_state_func),
(gst_bin_recalc_state), (gst_bin_change_state_func),
(bin_bus_handler):
* gst/gstelement.c: (gst_element_get_state_func),
(gst_element_get_state), (gst_element_abort_state),
(gst_element_commit_state), (gst_element_set_state),
(gst_element_change_state), (gst_element_change_state_func):
* gst/gstelement.h:
* gst/gstpipeline.c: (gst_pipeline_class_init), (do_pipeline_seek),
(gst_pipeline_provide_clock_func):
* gst/gstutils.c: (gst_element_link_pads_filtered):
* tools/gst-launch.c: (main):
* tools/gst-typefind.c: (main):
Use GstClockTime in _get_state() instead of GTimeVal.
Remove old code in gstutils.c
2005-10-12 12:18:48 +00:00
|
|
|
GstStateChangeReturn ret;
|
2005-09-29 18:37:48 +00:00
|
|
|
|
|
|
|
pipeline = gst_pipeline_new (NULL);
|
|
|
|
fail_unless (pipeline != NULL, "Could not create pipeline");
|
|
|
|
ASSERT_OBJECT_REFCOUNT (pipeline, "pipeline", 1);
|
|
|
|
|
|
|
|
src = gst_element_factory_make ("fakesrc", NULL);
|
|
|
|
fail_unless (src != NULL);
|
|
|
|
sink = gst_element_factory_make ("fakesink", NULL);
|
|
|
|
fail_unless (sink != NULL);
|
|
|
|
|
|
|
|
gst_bin_add_many (GST_BIN (pipeline), src, sink, NULL);
|
|
|
|
fail_unless (gst_element_link (src, sink));
|
|
|
|
|
|
|
|
bus = gst_pipeline_get_bus (GST_PIPELINE (pipeline));
|
|
|
|
ASSERT_OBJECT_REFCOUNT (pipeline, "pipeline after get_bus", 1);
|
|
|
|
ASSERT_OBJECT_REFCOUNT (bus, "bus", 2);
|
|
|
|
|
|
|
|
id = gst_bus_add_watch (bus, message_received, pipeline);
|
|
|
|
ASSERT_OBJECT_REFCOUNT (pipeline, "pipeline after add_watch", 1);
|
2016-02-29 21:33:03 +00:00
|
|
|
ASSERT_OBJECT_REFCOUNT (bus, "bus after add_watch", 3);
|
2005-09-29 18:37:48 +00:00
|
|
|
|
Use GstClockTime in _get_state() instead of GTimeVal.
Original commit message from CVS:
* check/gst/gstbin.c: (GST_START_TEST):
* check/gst/gstelement.c: (GST_START_TEST):
* check/gst/gstevent.c: (GST_START_TEST), (test_event):
* check/gst/gstghostpad.c: (GST_START_TEST):
* check/gst/gstpipeline.c: (GST_START_TEST):
* check/pipelines/simple_launch_lines.c: (run_pipeline):
* check/states/sinks.c: (GST_START_TEST):
* gst/elements/gsttypefindelement.c: (stop_typefinding):
* gst/gstbin.c: (gst_bin_provide_clock_func), (gst_bin_add_func),
(gst_bin_remove_func), (gst_bin_get_state_func),
(gst_bin_recalc_state), (gst_bin_change_state_func),
(bin_bus_handler):
* gst/gstelement.c: (gst_element_get_state_func),
(gst_element_get_state), (gst_element_abort_state),
(gst_element_commit_state), (gst_element_set_state),
(gst_element_change_state), (gst_element_change_state_func):
* gst/gstelement.h:
* gst/gstpipeline.c: (gst_pipeline_class_init), (do_pipeline_seek),
(gst_pipeline_provide_clock_func):
* gst/gstutils.c: (gst_element_link_pads_filtered):
* tools/gst-launch.c: (main):
* tools/gst-typefind.c: (main):
Use GstClockTime in _get_state() instead of GTimeVal.
Remove old code in gstutils.c
2005-10-12 12:18:48 +00:00
|
|
|
ret = gst_element_set_state (pipeline, GST_STATE_PLAYING);
|
|
|
|
fail_unless (ret == GST_STATE_CHANGE_ASYNC);
|
|
|
|
|
2005-09-29 18:37:48 +00:00
|
|
|
loop = g_main_loop_new (NULL, FALSE);
|
|
|
|
GST_DEBUG ("going into main loop");
|
|
|
|
g_main_loop_run (loop);
|
|
|
|
GST_DEBUG ("left main loop");
|
|
|
|
|
|
|
|
/* PLAYING now */
|
|
|
|
|
|
|
|
ASSERT_OBJECT_REFCOUNT_BETWEEN (pipeline, "pipeline after gone to playing", 1,
|
|
|
|
3);
|
|
|
|
|
|
|
|
/* cleanup */
|
|
|
|
GST_DEBUG ("cleanup");
|
|
|
|
|
Use GstClockTime in _get_state() instead of GTimeVal.
Original commit message from CVS:
* check/gst/gstbin.c: (GST_START_TEST):
* check/gst/gstelement.c: (GST_START_TEST):
* check/gst/gstevent.c: (GST_START_TEST), (test_event):
* check/gst/gstghostpad.c: (GST_START_TEST):
* check/gst/gstpipeline.c: (GST_START_TEST):
* check/pipelines/simple_launch_lines.c: (run_pipeline):
* check/states/sinks.c: (GST_START_TEST):
* gst/elements/gsttypefindelement.c: (stop_typefinding):
* gst/gstbin.c: (gst_bin_provide_clock_func), (gst_bin_add_func),
(gst_bin_remove_func), (gst_bin_get_state_func),
(gst_bin_recalc_state), (gst_bin_change_state_func),
(bin_bus_handler):
* gst/gstelement.c: (gst_element_get_state_func),
(gst_element_get_state), (gst_element_abort_state),
(gst_element_commit_state), (gst_element_set_state),
(gst_element_change_state), (gst_element_change_state_func):
* gst/gstelement.h:
* gst/gstpipeline.c: (gst_pipeline_class_init), (do_pipeline_seek),
(gst_pipeline_provide_clock_func):
* gst/gstutils.c: (gst_element_link_pads_filtered):
* tools/gst-launch.c: (main):
* tools/gst-typefind.c: (main):
Use GstClockTime in _get_state() instead of GTimeVal.
Remove old code in gstutils.c
2005-10-12 12:18:48 +00:00
|
|
|
ret = gst_element_set_state (pipeline, GST_STATE_NULL);
|
|
|
|
fail_unless (ret == GST_STATE_CHANGE_SUCCESS);
|
|
|
|
ret = gst_element_get_state (pipeline, ¤t, NULL, GST_CLOCK_TIME_NONE);
|
|
|
|
fail_unless (ret == GST_STATE_CHANGE_SUCCESS);
|
2005-09-29 18:37:48 +00:00
|
|
|
fail_unless (current == GST_STATE_NULL, "state is not NULL but %d", current);
|
2005-09-29 20:16:42 +00:00
|
|
|
|
2019-01-02 21:35:11 +00:00
|
|
|
/* We have to ensure that all background threads from thread pools are shut
|
|
|
|
* down, or otherwise they might not have had a chance yet to drop
|
|
|
|
* their last reference to the pipeline and then the assertion below fails
|
|
|
|
*/
|
|
|
|
gst_task_cleanup_all ();
|
|
|
|
|
Use GstClockTime in _get_state() instead of GTimeVal.
Original commit message from CVS:
* check/gst/gstbin.c: (GST_START_TEST):
* check/gst/gstelement.c: (GST_START_TEST):
* check/gst/gstevent.c: (GST_START_TEST), (test_event):
* check/gst/gstghostpad.c: (GST_START_TEST):
* check/gst/gstpipeline.c: (GST_START_TEST):
* check/pipelines/simple_launch_lines.c: (run_pipeline):
* check/states/sinks.c: (GST_START_TEST):
* gst/elements/gsttypefindelement.c: (stop_typefinding):
* gst/gstbin.c: (gst_bin_provide_clock_func), (gst_bin_add_func),
(gst_bin_remove_func), (gst_bin_get_state_func),
(gst_bin_recalc_state), (gst_bin_change_state_func),
(bin_bus_handler):
* gst/gstelement.c: (gst_element_get_state_func),
(gst_element_get_state), (gst_element_abort_state),
(gst_element_commit_state), (gst_element_set_state),
(gst_element_change_state), (gst_element_change_state_func):
* gst/gstelement.h:
* gst/gstpipeline.c: (gst_pipeline_class_init), (do_pipeline_seek),
(gst_pipeline_provide_clock_func):
* gst/gstutils.c: (gst_element_link_pads_filtered):
* tools/gst-launch.c: (main):
* tools/gst-typefind.c: (main):
Use GstClockTime in _get_state() instead of GTimeVal.
Remove old code in gstutils.c
2005-10-12 12:18:48 +00:00
|
|
|
ASSERT_OBJECT_REFCOUNT (pipeline, "pipeline at start of cleanup", 1);
|
2016-02-29 21:33:03 +00:00
|
|
|
ASSERT_OBJECT_REFCOUNT (bus, "bus at start of cleanup", 3);
|
2005-09-29 18:37:48 +00:00
|
|
|
|
|
|
|
fail_unless (g_source_remove (id));
|
Use GstClockTime in _get_state() instead of GTimeVal.
Original commit message from CVS:
* check/gst/gstbin.c: (GST_START_TEST):
* check/gst/gstelement.c: (GST_START_TEST):
* check/gst/gstevent.c: (GST_START_TEST), (test_event):
* check/gst/gstghostpad.c: (GST_START_TEST):
* check/gst/gstpipeline.c: (GST_START_TEST):
* check/pipelines/simple_launch_lines.c: (run_pipeline):
* check/states/sinks.c: (GST_START_TEST):
* gst/elements/gsttypefindelement.c: (stop_typefinding):
* gst/gstbin.c: (gst_bin_provide_clock_func), (gst_bin_add_func),
(gst_bin_remove_func), (gst_bin_get_state_func),
(gst_bin_recalc_state), (gst_bin_change_state_func),
(bin_bus_handler):
* gst/gstelement.c: (gst_element_get_state_func),
(gst_element_get_state), (gst_element_abort_state),
(gst_element_commit_state), (gst_element_set_state),
(gst_element_change_state), (gst_element_change_state_func):
* gst/gstelement.h:
* gst/gstpipeline.c: (gst_pipeline_class_init), (do_pipeline_seek),
(gst_pipeline_provide_clock_func):
* gst/gstutils.c: (gst_element_link_pads_filtered):
* tools/gst-launch.c: (main):
* tools/gst-typefind.c: (main):
Use GstClockTime in _get_state() instead of GTimeVal.
Remove old code in gstutils.c
2005-10-12 12:18:48 +00:00
|
|
|
ASSERT_OBJECT_REFCOUNT (bus, "bus after removing source", 2);
|
2005-09-29 18:37:48 +00:00
|
|
|
|
|
|
|
GST_DEBUG ("unreffing pipeline");
|
|
|
|
gst_object_unref (pipeline);
|
|
|
|
|
Use GstClockTime in _get_state() instead of GTimeVal.
Original commit message from CVS:
* check/gst/gstbin.c: (GST_START_TEST):
* check/gst/gstelement.c: (GST_START_TEST):
* check/gst/gstevent.c: (GST_START_TEST), (test_event):
* check/gst/gstghostpad.c: (GST_START_TEST):
* check/gst/gstpipeline.c: (GST_START_TEST):
* check/pipelines/simple_launch_lines.c: (run_pipeline):
* check/states/sinks.c: (GST_START_TEST):
* gst/elements/gsttypefindelement.c: (stop_typefinding):
* gst/gstbin.c: (gst_bin_provide_clock_func), (gst_bin_add_func),
(gst_bin_remove_func), (gst_bin_get_state_func),
(gst_bin_recalc_state), (gst_bin_change_state_func),
(bin_bus_handler):
* gst/gstelement.c: (gst_element_get_state_func),
(gst_element_get_state), (gst_element_abort_state),
(gst_element_commit_state), (gst_element_set_state),
(gst_element_change_state), (gst_element_change_state_func):
* gst/gstelement.h:
* gst/gstpipeline.c: (gst_pipeline_class_init), (do_pipeline_seek),
(gst_pipeline_provide_clock_func):
* gst/gstutils.c: (gst_element_link_pads_filtered):
* tools/gst-launch.c: (main):
* tools/gst-typefind.c: (main):
Use GstClockTime in _get_state() instead of GTimeVal.
Remove old code in gstutils.c
2005-10-12 12:18:48 +00:00
|
|
|
ASSERT_OBJECT_REFCOUNT (bus, "bus after unref pipeline", 1);
|
2005-09-29 18:37:48 +00:00
|
|
|
gst_object_unref (bus);
|
|
|
|
}
|
|
|
|
|
|
|
|
GST_END_TEST;
|
|
|
|
|
2005-11-15 12:29:07 +00:00
|
|
|
GST_START_TEST (test_base_time)
|
|
|
|
{
|
|
|
|
GstElement *pipeline, *fakesrc, *fakesink;
|
2019-01-02 16:41:24 +00:00
|
|
|
GstClockTime base, start;
|
|
|
|
gint64 position;
|
2005-11-15 12:29:07 +00:00
|
|
|
GstClock *clock;
|
|
|
|
|
2019-01-02 16:41:24 +00:00
|
|
|
clock = gst_test_clock_new ();
|
|
|
|
gst_test_clock_set_time (GST_TEST_CLOCK (clock), 100 * GST_SECOND);
|
|
|
|
|
2005-11-15 12:29:07 +00:00
|
|
|
pipeline = gst_element_factory_make ("pipeline", "pipeline");
|
|
|
|
fakesrc = gst_element_factory_make ("fakesrc", "fakesrc");
|
|
|
|
fakesink = gst_element_factory_make ("fakesink", "fakesink");
|
|
|
|
|
2019-01-02 16:41:24 +00:00
|
|
|
gst_pipeline_use_clock (GST_PIPELINE (pipeline), clock);
|
|
|
|
|
2005-11-15 12:29:07 +00:00
|
|
|
fail_unless (pipeline && fakesrc && fakesink, "couldn't make elements");
|
|
|
|
|
2019-01-02 16:41:24 +00:00
|
|
|
g_object_set (fakesrc, "is-live", (gboolean) TRUE, "do-timestamp", TRUE,
|
|
|
|
"format", GST_FORMAT_TIME, "sizetype", 2, "sizemax", 4096, "datarate",
|
|
|
|
4096 * 100, NULL);
|
|
|
|
g_object_set (fakesink, "sync", TRUE, NULL);
|
2005-11-15 12:29:07 +00:00
|
|
|
|
|
|
|
gst_bin_add_many (GST_BIN (pipeline), fakesrc, fakesink, NULL);
|
|
|
|
gst_element_link (fakesrc, fakesink);
|
|
|
|
|
|
|
|
fail_unless (gst_element_set_state (pipeline, GST_STATE_PAUSED)
|
|
|
|
== GST_STATE_CHANGE_NO_PREROLL, "expected no-preroll from live pipeline");
|
|
|
|
|
2019-01-02 16:41:24 +00:00
|
|
|
fail_unless_equals_uint64 (gst_element_get_start_time (pipeline), 0);
|
2005-11-15 16:27:04 +00:00
|
|
|
|
|
|
|
/* test the first: that base time is being distributed correctly, timestamps
|
|
|
|
are correct relative to the running clock and base time */
|
|
|
|
{
|
|
|
|
gst_element_set_state (pipeline, GST_STATE_PLAYING);
|
|
|
|
fail_unless (gst_element_get_state (pipeline, NULL, NULL,
|
|
|
|
GST_CLOCK_TIME_NONE)
|
|
|
|
== GST_STATE_CHANGE_SUCCESS, "failed state change");
|
2005-11-15 12:29:07 +00:00
|
|
|
|
2019-01-02 16:41:24 +00:00
|
|
|
/* Wait for time for 1s to pass */
|
|
|
|
for (;;) {
|
|
|
|
gst_test_clock_wait_for_next_pending_id (GST_TEST_CLOCK (clock), NULL);
|
|
|
|
if (gst_test_clock_get_next_entry_time (GST_TEST_CLOCK (clock)) >
|
|
|
|
101 * GST_SECOND)
|
|
|
|
break;
|
|
|
|
gst_test_clock_crank (GST_TEST_CLOCK (clock));
|
|
|
|
}
|
2005-11-15 12:29:07 +00:00
|
|
|
|
2019-01-02 16:41:24 +00:00
|
|
|
/* Now the base time should be exactly the clock time when we start and the
|
|
|
|
* position should be at 1s because we waited 1s */
|
2005-11-15 16:27:04 +00:00
|
|
|
base = gst_element_get_base_time (pipeline);
|
2019-01-02 16:41:24 +00:00
|
|
|
fail_unless_equals_uint64 (base, 100 * GST_SECOND);
|
|
|
|
|
|
|
|
fail_unless (gst_element_query_position (fakesink, GST_FORMAT_TIME,
|
|
|
|
&position));
|
|
|
|
fail_unless_equals_uint64 (position, 1 * GST_SECOND);
|
|
|
|
|
|
|
|
/* wait for another 1s of buffers to pass */
|
|
|
|
for (;;) {
|
|
|
|
gst_test_clock_wait_for_next_pending_id (GST_TEST_CLOCK (clock), NULL);
|
|
|
|
if (gst_test_clock_get_next_entry_time (GST_TEST_CLOCK (clock)) >
|
|
|
|
102 * GST_SECOND)
|
|
|
|
break;
|
|
|
|
gst_test_clock_crank (GST_TEST_CLOCK (clock));
|
|
|
|
}
|
2005-11-15 12:29:07 +00:00
|
|
|
|
2019-01-02 16:41:24 +00:00
|
|
|
/* set start time by pausing */
|
2005-11-15 16:27:04 +00:00
|
|
|
gst_element_set_state (pipeline, GST_STATE_PAUSED);
|
2005-11-15 12:29:07 +00:00
|
|
|
|
2005-11-15 16:27:04 +00:00
|
|
|
fail_unless (gst_element_get_state (pipeline, NULL, NULL,
|
|
|
|
GST_CLOCK_TIME_NONE)
|
|
|
|
== GST_STATE_CHANGE_NO_PREROLL, "failed state change");
|
2005-11-15 12:29:07 +00:00
|
|
|
|
2019-01-02 16:41:24 +00:00
|
|
|
start = gst_element_get_start_time (pipeline);
|
|
|
|
/* start time should be exactly 2s as that much time advanced, it's
|
|
|
|
* the current running time */
|
|
|
|
fail_unless_equals_uint64 (start, 2 * GST_SECOND);
|
|
|
|
|
|
|
|
fail_unless (gst_element_query_position (fakesink, GST_FORMAT_TIME,
|
|
|
|
&position));
|
|
|
|
fail_unless_equals_uint64 (position, 2 * GST_SECOND);
|
2005-11-15 16:27:04 +00:00
|
|
|
}
|
2005-11-15 12:29:07 +00:00
|
|
|
|
2005-11-15 16:27:04 +00:00
|
|
|
/* test the second: that the base time is redistributed when we go to PLAYING
|
|
|
|
again */
|
|
|
|
{
|
2019-01-02 16:41:24 +00:00
|
|
|
/* Set time to 99s in the future */
|
|
|
|
gst_test_clock_set_time (GST_TEST_CLOCK (clock), 200 * GST_SECOND);
|
2005-11-15 16:27:04 +00:00
|
|
|
|
|
|
|
gst_element_set_state (pipeline, GST_STATE_PLAYING);
|
|
|
|
fail_unless (gst_element_get_state (pipeline, NULL, NULL,
|
|
|
|
GST_CLOCK_TIME_NONE)
|
|
|
|
== GST_STATE_CHANGE_SUCCESS, "failed state change");
|
|
|
|
|
2019-01-02 16:41:24 +00:00
|
|
|
/* wait for 1s of buffers to pass */
|
|
|
|
for (;;) {
|
|
|
|
gst_test_clock_wait_for_next_pending_id (GST_TEST_CLOCK (clock), NULL);
|
|
|
|
if (gst_test_clock_get_next_entry_time (GST_TEST_CLOCK (clock)) >
|
|
|
|
201 * GST_SECOND)
|
|
|
|
break;
|
|
|
|
gst_test_clock_crank (GST_TEST_CLOCK (clock));
|
|
|
|
}
|
2005-11-15 16:27:04 +00:00
|
|
|
|
2019-01-02 16:41:24 +00:00
|
|
|
/* now the base time should have advanced by 98s compared to what it was
|
|
|
|
* before (we played 2s between previous and current play and 100s passed) */
|
2005-11-15 16:27:04 +00:00
|
|
|
base = gst_element_get_base_time (pipeline);
|
2019-01-02 16:41:24 +00:00
|
|
|
fail_unless_equals_uint64 (base, 198 * GST_SECOND);
|
|
|
|
|
|
|
|
/* wait for 1s of buffers to pass */
|
|
|
|
for (;;) {
|
|
|
|
gst_test_clock_wait_for_next_pending_id (GST_TEST_CLOCK (clock), NULL);
|
|
|
|
if (gst_test_clock_get_next_entry_time (GST_TEST_CLOCK (clock)) >
|
|
|
|
202 * GST_SECOND)
|
|
|
|
break;
|
|
|
|
gst_test_clock_crank (GST_TEST_CLOCK (clock));
|
|
|
|
}
|
2005-11-15 16:27:04 +00:00
|
|
|
|
2019-01-02 16:41:24 +00:00
|
|
|
/* set start time by pausing */
|
2005-11-15 16:27:04 +00:00
|
|
|
gst_element_set_state (pipeline, GST_STATE_PAUSED);
|
|
|
|
fail_unless (gst_element_get_state (pipeline, NULL, NULL,
|
|
|
|
GST_CLOCK_TIME_NONE)
|
|
|
|
== GST_STATE_CHANGE_NO_PREROLL, "failed state change");
|
|
|
|
|
2019-01-02 16:41:24 +00:00
|
|
|
/* start time should now be 4s as that's the amount of time that has
|
|
|
|
* passed since we started until we paused above */
|
|
|
|
start = gst_element_get_start_time (pipeline);
|
|
|
|
fail_unless_equals_uint64 (start, 4 * GST_SECOND);
|
|
|
|
|
|
|
|
fail_unless (gst_element_query_position (fakesink, GST_FORMAT_TIME,
|
|
|
|
&position));
|
|
|
|
fail_unless_equals_uint64 (position, 4 * GST_SECOND);
|
2005-11-15 16:27:04 +00:00
|
|
|
}
|
2005-11-15 12:29:07 +00:00
|
|
|
|
2005-11-15 17:57:51 +00:00
|
|
|
/* test the third: that if I set CLOCK_TIME_NONE as the stream time, that the
|
|
|
|
base time is not changed */
|
|
|
|
{
|
2019-01-02 16:41:24 +00:00
|
|
|
GstClockTime oldbase;
|
2005-11-15 17:57:51 +00:00
|
|
|
|
|
|
|
/* bling */
|
2019-01-02 16:41:24 +00:00
|
|
|
oldbase = gst_element_get_base_time (pipeline);
|
2009-05-29 10:21:36 +00:00
|
|
|
gst_element_set_start_time (pipeline, GST_CLOCK_TIME_NONE);
|
2005-11-15 17:57:51 +00:00
|
|
|
|
|
|
|
gst_element_set_state (pipeline, GST_STATE_PLAYING);
|
|
|
|
fail_unless (gst_element_get_state (pipeline, NULL, NULL,
|
|
|
|
GST_CLOCK_TIME_NONE)
|
|
|
|
== GST_STATE_CHANGE_SUCCESS, "failed state change");
|
|
|
|
|
2019-01-02 16:41:24 +00:00
|
|
|
/* wait for 1s of buffers to pass */
|
|
|
|
for (;;) {
|
|
|
|
gst_test_clock_wait_for_next_pending_id (GST_TEST_CLOCK (clock), NULL);
|
|
|
|
if (gst_test_clock_get_next_entry_time (GST_TEST_CLOCK (clock)) >
|
|
|
|
203 * GST_SECOND)
|
|
|
|
break;
|
|
|
|
gst_test_clock_crank (GST_TEST_CLOCK (clock));
|
|
|
|
}
|
2005-11-15 17:57:51 +00:00
|
|
|
|
2019-01-02 16:41:24 +00:00
|
|
|
/* now the base time should be the same as it was */
|
2005-11-15 17:57:51 +00:00
|
|
|
|
|
|
|
base = gst_element_get_base_time (pipeline);
|
|
|
|
|
2019-01-02 16:41:24 +00:00
|
|
|
/* wait for 1s of buffers to pass */
|
|
|
|
for (;;) {
|
|
|
|
gst_test_clock_wait_for_next_pending_id (GST_TEST_CLOCK (clock), NULL);
|
|
|
|
if (gst_test_clock_get_next_entry_time (GST_TEST_CLOCK (clock)) >
|
|
|
|
204 * GST_SECOND)
|
|
|
|
break;
|
|
|
|
gst_test_clock_crank (GST_TEST_CLOCK (clock));
|
|
|
|
}
|
2005-11-15 17:57:51 +00:00
|
|
|
|
2019-01-02 16:41:24 +00:00
|
|
|
/* set start time by pausing */
|
|
|
|
gst_element_set_state (pipeline, GST_STATE_PAUSED);
|
2005-11-15 17:57:51 +00:00
|
|
|
|
|
|
|
fail_unless (gst_element_get_state (pipeline, NULL, NULL,
|
|
|
|
GST_CLOCK_TIME_NONE)
|
|
|
|
== GST_STATE_CHANGE_NO_PREROLL, "failed state change");
|
|
|
|
|
2009-05-29 10:21:36 +00:00
|
|
|
fail_unless (gst_element_get_start_time (pipeline)
|
2005-11-15 17:57:51 +00:00
|
|
|
== GST_CLOCK_TIME_NONE, "stream time was reset");
|
|
|
|
|
|
|
|
fail_unless (base == oldbase, "base time was reset");
|
|
|
|
}
|
|
|
|
|
2012-08-12 15:37:02 +00:00
|
|
|
gst_element_set_state (pipeline, GST_STATE_NULL);
|
|
|
|
|
2005-11-15 12:29:07 +00:00
|
|
|
gst_object_unref (pipeline);
|
2019-01-02 16:41:24 +00:00
|
|
|
gst_object_unref (clock);
|
2005-11-15 12:29:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
GST_END_TEST;
|
|
|
|
|
2008-04-25 10:01:46 +00:00
|
|
|
static gpointer
|
|
|
|
pipeline_thread (gpointer data)
|
|
|
|
{
|
|
|
|
GstElement *pipeline, *src, *sink;
|
|
|
|
|
|
|
|
src = gst_element_factory_make ("fakesrc", NULL);
|
|
|
|
g_object_set (src, "num-buffers", 20, NULL);
|
|
|
|
sink = gst_element_factory_make ("fakesink", NULL);
|
|
|
|
g_object_set (sink, "sync", TRUE, NULL);
|
|
|
|
pipeline = gst_pipeline_new (NULL);
|
|
|
|
gst_bin_add (GST_BIN (pipeline), src);
|
|
|
|
gst_bin_add (GST_BIN (pipeline), sink);
|
|
|
|
gst_element_link (src, sink);
|
|
|
|
gst_element_set_state (pipeline, GST_STATE_PLAYING);
|
|
|
|
g_usleep (G_USEC_PER_SEC / 10);
|
|
|
|
gst_element_set_state (pipeline, GST_STATE_NULL);
|
|
|
|
gst_object_unref (pipeline);
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
GST_START_TEST (test_concurrent_create)
|
|
|
|
{
|
|
|
|
GThread *threads[30];
|
|
|
|
int i;
|
|
|
|
|
|
|
|
for (i = 0; i < G_N_ELEMENTS (threads); ++i) {
|
2012-09-12 09:52:25 +00:00
|
|
|
threads[i] = g_thread_try_new ("gst-check", pipeline_thread, NULL, NULL);
|
2008-04-25 10:01:46 +00:00
|
|
|
}
|
|
|
|
for (i = 0; i < G_N_ELEMENTS (threads); ++i) {
|
|
|
|
if (threads[i])
|
|
|
|
g_thread_join (threads[i]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
GST_END_TEST;
|
|
|
|
|
2011-04-21 11:33:10 +00:00
|
|
|
GST_START_TEST (test_pipeline_in_pipeline)
|
|
|
|
{
|
|
|
|
GstElement *pipeline, *bin, *fakesrc, *fakesink;
|
|
|
|
GstMessage *msg;
|
|
|
|
|
|
|
|
pipeline = gst_element_factory_make ("pipeline", "pipeline");
|
|
|
|
bin = gst_element_factory_make ("pipeline", "pipeline-as-bin");
|
|
|
|
fakesrc = gst_element_factory_make ("fakesrc", "fakesrc");
|
|
|
|
fakesink = gst_element_factory_make ("fakesink", "fakesink");
|
|
|
|
|
|
|
|
fail_unless (pipeline && bin && fakesrc && fakesink);
|
|
|
|
|
|
|
|
g_object_set (fakesrc, "num-buffers", 100, NULL);
|
|
|
|
|
|
|
|
gst_bin_add (GST_BIN (pipeline), bin);
|
|
|
|
gst_bin_add_many (GST_BIN (bin), fakesrc, fakesink, NULL);
|
|
|
|
gst_element_link (fakesrc, fakesink);
|
|
|
|
|
|
|
|
fail_unless_equals_int (gst_element_set_state (pipeline, GST_STATE_PLAYING),
|
|
|
|
GST_STATE_CHANGE_ASYNC);
|
|
|
|
|
|
|
|
msg = gst_bus_timed_pop_filtered (GST_ELEMENT_BUS (pipeline), -1,
|
|
|
|
GST_MESSAGE_EOS);
|
|
|
|
gst_message_unref (msg);
|
|
|
|
|
|
|
|
gst_element_set_state (pipeline, GST_STATE_NULL);
|
|
|
|
|
|
|
|
gst_object_unref (pipeline);
|
|
|
|
}
|
|
|
|
|
|
|
|
GST_END_TEST;
|
|
|
|
|
2014-07-17 14:05:00 +00:00
|
|
|
GST_START_TEST (test_pipeline_reset_start_time)
|
|
|
|
{
|
|
|
|
GstElement *pipeline, *fakesrc, *fakesink;
|
|
|
|
GstState state;
|
|
|
|
GstClock *clock;
|
|
|
|
gint64 position;
|
|
|
|
|
2019-01-02 16:41:24 +00:00
|
|
|
clock = gst_test_clock_new ();
|
2014-07-17 14:05:00 +00:00
|
|
|
pipeline = gst_element_factory_make ("pipeline", "pipeline");
|
|
|
|
fakesrc = gst_element_factory_make ("fakesrc", "fakesrc");
|
|
|
|
fakesink = gst_element_factory_make ("fakesink", "fakesink");
|
|
|
|
|
2019-01-02 16:41:24 +00:00
|
|
|
gst_pipeline_use_clock (GST_PIPELINE (pipeline), clock);
|
|
|
|
|
2018-02-15 13:36:26 +00:00
|
|
|
/* no more than 100 buffers per second */
|
|
|
|
g_object_set (fakesrc, "do-timestamp", TRUE, "format", GST_FORMAT_TIME,
|
|
|
|
"sizetype", 2, "sizemax", 4096, "datarate", 4096 * 100, NULL);
|
|
|
|
|
|
|
|
g_object_set (fakesink, "sync", TRUE, NULL);
|
2014-07-17 14:05:00 +00:00
|
|
|
|
|
|
|
fail_unless (pipeline && fakesrc && fakesink);
|
|
|
|
|
|
|
|
gst_bin_add_many (GST_BIN (pipeline), fakesrc, fakesink, NULL);
|
|
|
|
gst_element_link (fakesrc, fakesink);
|
|
|
|
|
|
|
|
fail_unless (gst_element_get_start_time (fakesink) == 0);
|
|
|
|
|
|
|
|
fail_unless_equals_int (gst_element_set_state (pipeline, GST_STATE_PLAYING),
|
|
|
|
GST_STATE_CHANGE_ASYNC);
|
|
|
|
fail_unless_equals_int (gst_element_get_state (pipeline, &state, NULL, -1),
|
|
|
|
GST_STATE_CHANGE_SUCCESS);
|
|
|
|
fail_unless_equals_int (state, GST_STATE_PLAYING);
|
|
|
|
|
|
|
|
/* We just started and never paused, start time must be 0 */
|
|
|
|
fail_unless (gst_element_get_start_time (fakesink) == 0);
|
|
|
|
|
2019-01-02 16:41:24 +00:00
|
|
|
/* Wait for time to reach 50 msecs */
|
|
|
|
for (;;) {
|
|
|
|
gst_test_clock_wait_for_next_pending_id (GST_TEST_CLOCK (clock), NULL);
|
|
|
|
if (gst_test_clock_get_next_entry_time (GST_TEST_CLOCK (clock)) >
|
|
|
|
50 * GST_MSECOND)
|
|
|
|
break;
|
|
|
|
gst_test_clock_crank (GST_TEST_CLOCK (clock));
|
|
|
|
}
|
2014-07-17 14:05:00 +00:00
|
|
|
|
2019-01-02 16:41:24 +00:00
|
|
|
/* We waited 50ms, so the position should be now == 50ms */
|
2014-07-17 14:05:00 +00:00
|
|
|
fail_unless (gst_element_query_position (fakesink, GST_FORMAT_TIME,
|
|
|
|
&position));
|
2019-01-02 16:41:24 +00:00
|
|
|
fail_unless_equals_uint64 (position, 50 * GST_MSECOND);
|
2014-07-17 14:05:00 +00:00
|
|
|
|
|
|
|
fail_unless_equals_int (gst_element_set_state (pipeline, GST_STATE_PAUSED),
|
|
|
|
GST_STATE_CHANGE_ASYNC);
|
|
|
|
fail_unless_equals_int (gst_element_get_state (pipeline, &state, NULL, -1),
|
|
|
|
GST_STATE_CHANGE_SUCCESS);
|
|
|
|
fail_unless_equals_int (state, GST_STATE_PAUSED);
|
|
|
|
|
|
|
|
/* And now after pausing the start time should be bigger than the last
|
|
|
|
* position */
|
2019-01-02 16:41:24 +00:00
|
|
|
fail_unless_equals_uint64 (gst_element_get_start_time (fakesink),
|
|
|
|
50 * GST_MSECOND);
|
2014-07-17 14:05:00 +00:00
|
|
|
fail_unless (gst_element_query_position (fakesink, GST_FORMAT_TIME,
|
|
|
|
&position));
|
2019-01-02 16:41:24 +00:00
|
|
|
fail_unless_equals_uint64 (position, 50 * GST_MSECOND);
|
2014-07-17 14:05:00 +00:00
|
|
|
|
|
|
|
fail_unless_equals_int (gst_element_set_state (pipeline, GST_STATE_READY),
|
|
|
|
GST_STATE_CHANGE_SUCCESS);
|
|
|
|
|
|
|
|
/* When going back to ready the start time should be reset everywhere */
|
|
|
|
fail_unless (gst_element_get_start_time (fakesink) == 0);
|
|
|
|
|
|
|
|
fail_unless_equals_int (gst_element_set_state (pipeline, GST_STATE_PAUSED),
|
|
|
|
GST_STATE_CHANGE_ASYNC);
|
|
|
|
fail_unless_equals_int (gst_element_get_state (pipeline, &state, NULL, -1),
|
|
|
|
GST_STATE_CHANGE_SUCCESS);
|
|
|
|
fail_unless_equals_int (state, GST_STATE_PAUSED);
|
|
|
|
|
|
|
|
/* And the start time should still be set to 0 when we go to paused for the
|
|
|
|
* first time. Same goes for the position */
|
|
|
|
fail_unless (gst_element_query_position (fakesink, GST_FORMAT_TIME,
|
|
|
|
&position));
|
2019-01-02 16:41:24 +00:00
|
|
|
fail_unless_equals_uint64 (position, 0 * GST_MSECOND);
|
2014-07-17 14:05:00 +00:00
|
|
|
|
|
|
|
fail_unless (gst_element_get_start_time (fakesink) == 0);
|
|
|
|
|
|
|
|
gst_element_set_state (pipeline, GST_STATE_NULL);
|
|
|
|
|
|
|
|
gst_object_unref (pipeline);
|
2019-01-02 16:41:24 +00:00
|
|
|
gst_object_unref (clock);
|
2014-07-17 14:05:00 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
GST_END_TEST;
|
|
|
|
|
2018-07-16 15:50:36 +00:00
|
|
|
GST_START_TEST (test_pipeline_processing_deadline)
|
|
|
|
{
|
|
|
|
GstElement *pipeline, *fakesrc, *queue, *fakesink;
|
|
|
|
GstState state;
|
|
|
|
GstClock *clock;
|
|
|
|
gint64 position;
|
|
|
|
GstQuery *q;
|
|
|
|
gboolean live;
|
|
|
|
GstClockTime min, max;
|
|
|
|
GstBus *bus;
|
|
|
|
GstMessage *msg;
|
|
|
|
|
2018-10-17 20:38:42 +00:00
|
|
|
clock = gst_test_clock_new ();
|
2018-07-16 15:50:36 +00:00
|
|
|
pipeline = gst_element_factory_make ("pipeline", "pipeline");
|
|
|
|
fakesrc = gst_element_factory_make ("fakesrc", "fakesrc");
|
|
|
|
queue = gst_element_factory_make ("queue", "queue");
|
|
|
|
fakesink = gst_element_factory_make ("fakesink", "fakesink");
|
|
|
|
|
2018-10-17 20:38:42 +00:00
|
|
|
gst_pipeline_use_clock (GST_PIPELINE (pipeline), clock);
|
|
|
|
|
2018-07-16 15:50:36 +00:00
|
|
|
/* no more than 100 buffers per second */
|
|
|
|
g_object_set (fakesrc, "do-timestamp", TRUE, "format", GST_FORMAT_TIME,
|
|
|
|
"sizetype", 2, "sizemax", 4096, "datarate", 4096 * 100, "is-live", TRUE,
|
|
|
|
NULL);
|
|
|
|
|
|
|
|
g_object_set (fakesink, "sync", TRUE, NULL);
|
|
|
|
|
|
|
|
fail_unless (pipeline && fakesrc && queue && fakesink);
|
|
|
|
|
|
|
|
gst_bin_add_many (GST_BIN (pipeline), fakesrc, queue, fakesink, NULL);
|
|
|
|
gst_element_link_many (fakesrc, queue, fakesink, NULL);
|
|
|
|
|
|
|
|
gst_element_set_state (pipeline, GST_STATE_PLAYING);
|
|
|
|
fail_unless_equals_int (gst_element_get_state (pipeline, &state, NULL, -1),
|
|
|
|
GST_STATE_CHANGE_SUCCESS);
|
|
|
|
fail_unless_equals_int (state, GST_STATE_PLAYING);
|
|
|
|
|
|
|
|
q = gst_query_new_latency ();
|
|
|
|
fail_unless (gst_element_query (pipeline, q));
|
|
|
|
gst_query_parse_latency (q, &live, &min, &max);
|
|
|
|
fail_unless (live == TRUE);
|
|
|
|
fail_unless (min == 20 * GST_MSECOND);
|
|
|
|
fail_unless (max >= min);
|
|
|
|
gst_query_unref (q);
|
|
|
|
|
2018-10-17 20:38:42 +00:00
|
|
|
/* Wait for time to reach 50 msecs */
|
|
|
|
for (;;) {
|
|
|
|
gst_test_clock_wait_for_next_pending_id (GST_TEST_CLOCK (clock), NULL);
|
|
|
|
if (gst_test_clock_get_next_entry_time (GST_TEST_CLOCK (clock)) >
|
|
|
|
50 * GST_MSECOND)
|
|
|
|
break;
|
|
|
|
gst_test_clock_crank (GST_TEST_CLOCK (clock));
|
|
|
|
}
|
2018-07-16 15:50:36 +00:00
|
|
|
|
2019-01-02 16:41:24 +00:00
|
|
|
/* We waited 50ms, but the position should be 50ms - 20ms latency == 30ms */
|
2018-07-16 15:50:36 +00:00
|
|
|
fail_unless (gst_element_query_position (fakesink, GST_FORMAT_TIME,
|
|
|
|
&position));
|
2019-01-02 16:41:24 +00:00
|
|
|
fail_unless_equals_uint64 (position, 30 * GST_MSECOND);
|
2018-07-16 15:50:36 +00:00
|
|
|
|
|
|
|
fail_unless_equals_int (gst_element_set_state (pipeline, GST_STATE_PAUSED),
|
|
|
|
GST_STATE_CHANGE_NO_PREROLL);
|
|
|
|
fail_unless_equals_int (gst_element_get_state (pipeline, &state, NULL, -1),
|
|
|
|
GST_STATE_CHANGE_NO_PREROLL);
|
|
|
|
fail_unless_equals_int (state, GST_STATE_PAUSED);
|
|
|
|
|
2019-01-02 16:41:24 +00:00
|
|
|
/* And now after pausing the start time should be exactly 50ms */
|
|
|
|
fail_unless_equals_uint64 (gst_element_get_start_time (fakesink),
|
|
|
|
50 * GST_MSECOND);
|
2018-07-16 15:50:36 +00:00
|
|
|
fail_unless (gst_element_query_position (fakesink, GST_FORMAT_TIME,
|
|
|
|
&position));
|
2019-01-02 16:41:24 +00:00
|
|
|
/* but position should still be exactly 50ms - 20ms latency == 30ms */
|
|
|
|
fail_unless_equals_uint64 (position, 30 * GST_MSECOND);
|
2018-07-16 15:50:36 +00:00
|
|
|
|
|
|
|
fail_unless_equals_int (gst_element_set_state (pipeline, GST_STATE_READY),
|
|
|
|
GST_STATE_CHANGE_SUCCESS);
|
|
|
|
|
|
|
|
fail_unless_equals_int (gst_element_set_state (pipeline, GST_STATE_PAUSED),
|
|
|
|
GST_STATE_CHANGE_NO_PREROLL);
|
|
|
|
fail_unless_equals_int (gst_element_get_state (pipeline, &state, NULL, -1),
|
|
|
|
GST_STATE_CHANGE_NO_PREROLL);
|
|
|
|
fail_unless_equals_int (state, GST_STATE_PAUSED);
|
|
|
|
|
|
|
|
bus = gst_pipeline_get_bus (GST_PIPELINE (pipeline));
|
|
|
|
msg = gst_bus_pop_filtered (bus, GST_MESSAGE_WARNING);
|
|
|
|
fail_unless (msg == NULL);
|
|
|
|
gst_object_unref (bus);
|
|
|
|
|
|
|
|
gst_element_set_state (pipeline, GST_STATE_NULL);
|
|
|
|
|
|
|
|
gst_object_unref (pipeline);
|
2018-10-17 20:38:42 +00:00
|
|
|
gst_object_unref (clock);
|
2018-07-16 15:50:36 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
GST_END_TEST;
|
|
|
|
|
|
|
|
|
|
|
|
GST_START_TEST (test_pipeline_processing_deadline_no_queue)
|
|
|
|
{
|
|
|
|
GstElement *pipeline, *fakesrc, *fakesink;
|
|
|
|
GstState state;
|
|
|
|
GstBus *bus;
|
|
|
|
GstMessage *msg;
|
|
|
|
GError *gerror = NULL;
|
|
|
|
|
|
|
|
pipeline = gst_element_factory_make ("pipeline", "pipeline");
|
|
|
|
fakesrc = gst_element_factory_make ("fakesrc", "fakesrc");
|
|
|
|
fakesink = gst_element_factory_make ("fakesink", "fakesink");
|
|
|
|
|
|
|
|
/* no more than 100 buffers per second */
|
|
|
|
g_object_set (fakesrc, "do-timestamp", TRUE, "format", GST_FORMAT_TIME,
|
|
|
|
"sizetype", 2, "sizemax", 4096, "datarate", 4096 * 100, "is-live", TRUE,
|
|
|
|
NULL);
|
|
|
|
|
|
|
|
g_object_set (fakesink, "sync", TRUE, "processing-deadline", 60 * GST_MSECOND,
|
|
|
|
NULL);
|
|
|
|
|
|
|
|
fail_unless (pipeline && fakesrc && fakesink);
|
|
|
|
|
|
|
|
gst_bin_add_many (GST_BIN (pipeline), fakesrc, fakesink, NULL);
|
|
|
|
gst_element_link (fakesrc, fakesink);
|
|
|
|
|
|
|
|
fail_unless_equals_int (gst_element_set_state (pipeline, GST_STATE_PLAYING),
|
|
|
|
GST_STATE_CHANGE_ASYNC);
|
|
|
|
fail_unless_equals_int (gst_element_get_state (pipeline, &state, NULL, -1),
|
|
|
|
GST_STATE_CHANGE_SUCCESS);
|
|
|
|
|
|
|
|
bus = gst_pipeline_get_bus (GST_PIPELINE (pipeline));
|
|
|
|
msg = gst_bus_timed_pop_filtered (bus, GST_CLOCK_TIME_NONE,
|
|
|
|
GST_MESSAGE_WARNING);
|
|
|
|
fail_unless (msg != NULL);
|
|
|
|
gst_message_parse_warning (msg, &gerror, NULL);
|
|
|
|
fail_unless (g_error_matches (gerror, GST_CORE_ERROR, GST_CORE_ERROR_CLOCK));
|
|
|
|
gst_message_unref (msg);
|
|
|
|
gst_object_unref (bus);
|
2018-10-16 09:48:40 +00:00
|
|
|
g_clear_error (&gerror);
|
2018-07-16 15:50:36 +00:00
|
|
|
|
|
|
|
gst_element_set_state (pipeline, GST_STATE_NULL);
|
|
|
|
|
|
|
|
gst_object_unref (pipeline);
|
|
|
|
}
|
|
|
|
|
|
|
|
GST_END_TEST;
|
|
|
|
|
|
|
|
|
Correct all relevant warnings found by the sparse semantic code analyzer. This include marking several symbols static...
Original commit message from CVS:
* gst/gstconfig.h.in:
* libs/gst/base/gstcollectpads.c: (gst_collect_pads_read_buffer):
* libs/gst/check/gstcheck.c: (gst_check_log_message_func),
(gst_check_log_critical_func), (gst_check_drop_buffers),
(gst_check_element_push_buffer_list):
* libs/gst/controller/gstcontroller.c: (gst_controller_get),
(gst_controller_get_type):
* libs/gst/controller/gsthelper.c: (gst_object_control_properties),
(gst_object_get_controller), (gst_object_get_control_source):
* libs/gst/controller/gstinterpolationcontrolsource.c:
(gst_interpolation_control_source_new):
* libs/gst/controller/gstlfocontrolsource.c:
(gst_lfo_control_source_new):
* libs/gst/dataprotocol/dataprotocol.c:
(gst_dp_event_from_packet_0_2):
* plugins/elements/gstfdsrc.c:
* plugins/elements/gstmultiqueue.c:
* plugins/elements/gsttee.c:
* plugins/elements/gsttypefindelement.c:
* plugins/indexers/gstfileindex.c: (_file_index_id_save_xml),
(gst_file_index_add_association):
* plugins/indexers/gstmemindex.c:
* tests/benchmarks/gstpollstress.c: (mess_some_more):
* tests/check/elements/queue.c: (setup_queue):
* tests/check/gst/gstpipeline.c:
* tests/check/libs/collectpads.c: (setup), (teardown),
(gst_collect_pads_suite):
* tests/examples/adapter/adapter_test.c:
* tests/examples/metadata/read-metadata.c: (make_pipeline):
* tests/examples/xml/createxml.c:
* tests/examples/xml/runxml.c:
* tools/gst-inspect.c:
* tools/gst-run.c:
Correct all relevant warnings found by the sparse semantic code
analyzer. This include marking several symbols static, using
NULL instead of 0 for pointers, not using variable sized arrays
on the stack, moving variable declarations to the beginning of
a block and using "foo (void)" instead of "foo ()" for declarations.
2008-02-29 12:41:33 +00:00
|
|
|
static Suite *
|
2005-09-09 12:02:41 +00:00
|
|
|
gst_pipeline_suite (void)
|
|
|
|
{
|
|
|
|
Suite *s = suite_create ("GstPipeline");
|
|
|
|
TCase *tc_chain = tcase_create ("pipeline tests");
|
|
|
|
|
check/: Check fixes, use API as stated in design docs, remove hacks.
Original commit message from CVS:
* check/Makefile.am:
* check/generic/states.c: (GST_START_TEST):
* check/gst/gstbin.c: (GST_START_TEST):
* check/gst/gstpipeline.c: (GST_START_TEST), (gst_pipeline_suite):
* check/states/sinks.c: (GST_START_TEST):
* check/states/sinks2.c: (GST_START_TEST), (gst_object_suite),
(main):
Check fixes, use API as stated in design docs, remove hacks.
* gst/base/gstbasesink.c: (gst_base_sink_handle_object),
(gst_base_sink_change_state):
Catch stopping our task while we're shutting down.
* gst/gstbin.c: (gst_bin_init), (gst_bin_add_func),
(gst_bin_remove_func), (gst_bin_get_state_func),
(gst_bin_recalc_state), (gst_bin_change_state_func),
(bin_bus_handler):
* gst/gstbin.h:
* gst/gstelement.c: (gst_element_init),
(gst_element_get_state_func), (gst_element_abort_state),
(gst_element_commit_state), (gst_element_lost_state),
(gst_element_set_state), (gst_element_change_state),
(gst_element_change_state_func):
* gst/gstelement.h:
New state change algorithm (see #318116)
* gst/gstpipeline.c: (gst_pipeline_class_init),
(gst_pipeline_init), (gst_pipeline_set_property),
(gst_pipeline_get_property), (do_pipeline_seek),
(gst_pipeline_change_state), (gst_pipeline_provide_clock_func):
* gst/gstpipeline.h:
Remove crude state change hacks.
* gst/gstutils.h:
Remove crude hacks.
* tools/gst-launch.c: (main):
Fixes for state change. Needs some more work to fully use the
new stuff.
2005-10-10 16:38:26 +00:00
|
|
|
tcase_set_timeout (tc_chain, 0);
|
|
|
|
|
2005-09-09 12:02:41 +00:00
|
|
|
suite_add_tcase (s, tc_chain);
|
|
|
|
tcase_add_test (tc_chain, test_async_state_change_empty);
|
|
|
|
tcase_add_test (tc_chain, test_async_state_change_fake_ready);
|
|
|
|
tcase_add_test (tc_chain, test_async_state_change_fake);
|
2005-09-29 18:37:48 +00:00
|
|
|
tcase_add_test (tc_chain, test_get_bus);
|
2005-09-28 15:45:21 +00:00
|
|
|
tcase_add_test (tc_chain, test_bus);
|
2005-11-15 12:29:07 +00:00
|
|
|
tcase_add_test (tc_chain, test_base_time);
|
2008-04-25 10:01:46 +00:00
|
|
|
tcase_add_test (tc_chain, test_concurrent_create);
|
2011-04-21 11:33:10 +00:00
|
|
|
tcase_add_test (tc_chain, test_pipeline_in_pipeline);
|
2014-07-17 14:05:00 +00:00
|
|
|
tcase_add_test (tc_chain, test_pipeline_reset_start_time);
|
2018-07-16 15:50:36 +00:00
|
|
|
tcase_add_test (tc_chain, test_pipeline_processing_deadline);
|
|
|
|
tcase_add_test (tc_chain, test_pipeline_processing_deadline_no_queue);
|
2005-09-09 12:02:41 +00:00
|
|
|
|
|
|
|
return s;
|
|
|
|
}
|
|
|
|
|
2006-07-01 20:56:56 +00:00
|
|
|
GST_CHECK_MAIN (gst_pipeline);
|