validate:launcher: Always set sync=True on fakesink on playback pipelines

This way we are in closer condition of real sink playback.

+ some minor cleanup in gst-validate.c
This commit is contained in:
Thibault Saunier 2014-04-22 09:42:57 +02:00
parent bbbd5fe2d0
commit 7f54c5dba8
2 changed files with 8 additions and 12 deletions

View file

@ -266,26 +266,27 @@ main (int argc, gchar ** argv)
} }
if (!GST_IS_PIPELINE (pipeline)) { if (!GST_IS_PIPELINE (pipeline)) {
GstElement *new_pipeline = gst_pipeline_new (""); GstElement *new_pipeline = gst_pipeline_new ("");
gst_bin_add (GST_BIN (new_pipeline), pipeline); gst_bin_add (GST_BIN (new_pipeline), pipeline);
pipeline = new_pipeline; pipeline = new_pipeline;
} }
#ifdef G_OS_UNIX #ifdef G_OS_UNIX
signal_watch_id = signal_watch_id =
g_unix_signal_add (SIGINT, (GSourceFunc) intr_handler, pipeline); g_unix_signal_add (SIGINT, (GSourceFunc) intr_handler, pipeline);
#endif #endif
runner = gst_validate_runner_new (); runner = gst_validate_runner_new ();
monitor =
gst_validate_monitor_factory_create (GST_OBJECT_CAST (pipeline), runner,
NULL);
gst_validate_reporter_set_handle_g_logs (GST_VALIDATE_REPORTER (monitor));
mainloop = g_main_loop_new (NULL, FALSE);
if (!runner) { if (!runner) {
g_printerr ("Failed to setup Validate Runner\n"); g_printerr ("Failed to setup Validate Runner\n");
exit (1); exit (1);
} }
monitor = gst_validate_monitor_factory_create (GST_OBJECT_CAST (pipeline),
runner, NULL);
gst_validate_reporter_set_handle_g_logs (GST_VALIDATE_REPORTER (monitor));
mainloop = g_main_loop_new (NULL, FALSE);
bus = gst_element_get_bus (pipeline); bus = gst_element_get_bus (pipeline);
gst_bus_add_signal_watch (bus); gst_bus_add_signal_watch (bus);
g_signal_connect (bus, "message", (GCallback) bus_callback, mainloop); g_signal_connect (bus, "message", (GCallback) bus_callback, mainloop);

View file

@ -51,12 +51,7 @@ class PlaybinDescriptor(PipelineDescriptor):
def get_pipeline(self, options, protocol, scenario, uri): def get_pipeline(self, options, protocol, scenario, uri):
pipe = self._pipeline pipe = self._pipeline
if options.mute: if options.mute:
fakesink = "fakesink" fakesink = "fakesink sync=true"
try:
if scenario and bool(scenario.seek) == True:
fakesink = "'" + fakesink + " sync=true'"
except AttributeError:
pass
pipe += " audio-sink=%s video-sink=%s" %(fakesink, fakesink) pipe += " audio-sink=%s video-sink=%s" %(fakesink, fakesink)
pipe += " uri=%s" % uri pipe += " uri=%s" % uri