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)) {
GstElement *new_pipeline = gst_pipeline_new ("");
gst_bin_add (GST_BIN (new_pipeline), pipeline);
pipeline = new_pipeline;
}
#ifdef G_OS_UNIX
signal_watch_id =
g_unix_signal_add (SIGINT, (GSourceFunc) intr_handler, pipeline);
#endif
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) {
g_printerr ("Failed to setup Validate Runner\n");
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);
gst_bus_add_signal_watch (bus);
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):
pipe = self._pipeline
if options.mute:
fakesink = "fakesink"
try:
if scenario and bool(scenario.seek) == True:
fakesink = "'" + fakesink + " sync=true'"
except AttributeError:
pass
fakesink = "fakesink sync=true"
pipe += " audio-sink=%s video-sink=%s" %(fakesink, fakesink)
pipe += " uri=%s" % uri