mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 22:36:33 +00:00
validate: Do not print \r in actual files
This commit is contained in:
parent
3c62c315a9
commit
b9774b14b5
2 changed files with 17 additions and 2 deletions
|
@ -31,6 +31,12 @@
|
||||||
|
|
||||||
#define PRINT_POSITION_TIMEOUT 250
|
#define PRINT_POSITION_TIMEOUT 250
|
||||||
|
|
||||||
|
#ifdef HAVE_UNISTD_H
|
||||||
|
#include <unistd.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
static gboolean output_is_tty = TRUE;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SECTION:gst-validate-pipeline-monitor
|
* SECTION:gst-validate-pipeline-monitor
|
||||||
* @short_description: Class that wraps a #GstPipeline for Validate checks
|
* @short_description: Class that wraps a #GstPipeline for Validate checks
|
||||||
|
@ -77,6 +83,11 @@ gst_validate_pipeline_monitor_class_init (GstValidatePipelineMonitorClass *
|
||||||
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
||||||
|
|
||||||
object_class->dispose = gst_validate_pipeline_monitor_dispose;
|
object_class->dispose = gst_validate_pipeline_monitor_dispose;
|
||||||
|
|
||||||
|
#ifdef HAVE_UNISTD_H
|
||||||
|
output_is_tty = isatty (1);
|
||||||
|
#endif
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -132,8 +143,9 @@ print_position (GstValidateMonitor * monitor)
|
||||||
|
|
||||||
gst_validate_printf (NULL,
|
gst_validate_printf (NULL,
|
||||||
"<position: %" GST_TIME_FORMAT " duration: %" GST_TIME_FORMAT
|
"<position: %" GST_TIME_FORMAT " duration: %" GST_TIME_FORMAT
|
||||||
" speed: %f />\r", GST_TIME_ARGS (position), GST_TIME_ARGS (duration),
|
" speed: %f />%c", GST_TIME_ARGS (position), GST_TIME_ARGS (duration),
|
||||||
rate);
|
rate, output_is_tty ? '\r' : '\n');
|
||||||
|
|
||||||
done:
|
done:
|
||||||
gst_object_unref (pipeline);
|
gst_object_unref (pipeline);
|
||||||
|
|
||||||
|
|
|
@ -12,6 +12,9 @@ cdata.set('VALIDATEPLUGINDIR', '"@0@/@1@/gstreamer-1.0/validate"'.format(get_opt
|
||||||
cdata.set('GST_DATADIR', '"@0@/@1@"'.format(prefix, get_option('datadir')))
|
cdata.set('GST_DATADIR', '"@0@/@1@"'.format(prefix, get_option('datadir')))
|
||||||
cdata.set('PACKAGE_NAME', '"GStreamer Validate"')
|
cdata.set('PACKAGE_NAME', '"GStreamer Validate"')
|
||||||
cdata.set('PACKAGE_VERSION', '"@0@"'.format(gst_version))
|
cdata.set('PACKAGE_VERSION', '"@0@"'.format(gst_version))
|
||||||
|
if cc.has_header('unistd.h')
|
||||||
|
cdata.set('HAVE_UNISTD_H', 1)
|
||||||
|
endif
|
||||||
configure_file(output : 'config.h', configuration : cdata)
|
configure_file(output : 'config.h', configuration : cdata)
|
||||||
|
|
||||||
vs_module_defs_dir = meson.current_source_dir() + '/win32/common/'
|
vs_module_defs_dir = meson.current_source_dir() + '/win32/common/'
|
||||||
|
|
Loading…
Reference in a new issue