mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-25 01:54:17 +00:00
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:
parent
bbbd5fe2d0
commit
7f54c5dba8
2 changed files with 8 additions and 12 deletions
|
@ -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);
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue