mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 23:06:49 +00:00
validatessim: Avoid having ':' in file names
This is unsupported on windows
This commit is contained in:
parent
e4f687e0e7
commit
06f6fd8de1
3 changed files with 9 additions and 6 deletions
|
@ -482,7 +482,8 @@ _filename_get_timestamp (GstValidateSsim * self, const gchar * filename,
|
|||
gchar *other = g_strdup (bname);
|
||||
gboolean res = TRUE;
|
||||
|
||||
if (sscanf (bname, "%" GST_TIME_FORMAT "%s", &h, &m, &s, &ns, other) < 4) {
|
||||
if (sscanf (bname, "%" GST_VALIDATE_SSIM_TIME_FORMAT "%s", &h, &m, &s, &ns,
|
||||
other) < 4) {
|
||||
GST_INFO_OBJECT (self, "Can not sscanf %s", bname);
|
||||
|
||||
goto fail;
|
||||
|
|
|
@ -47,6 +47,8 @@ typedef struct {
|
|||
GstObjectClass parent;
|
||||
} GstValidateSsimClass;
|
||||
|
||||
#define GST_VALIDATE_SSIM_TIME_FORMAT "u-%02u-%02u.%09u"
|
||||
|
||||
#define GST_VALIDATE_SSIM_TYPE (gst_validate_ssim_get_type ())
|
||||
#define GST_VALIDATE_SSIM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GST_VALIDATE_SSIM_TYPE, GstValidateSsim))
|
||||
#define GST_VALIDATE_SSIM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_VALIDATE_SSIM_TYPE, GstValidateSsimClass))
|
||||
|
|
|
@ -523,10 +523,10 @@ _get_filename (ValidateSsimOverride * self, GstValidatePadMonitor * monitor,
|
|||
gchar *outname = NULL, *s;
|
||||
|
||||
if (self->priv->save_format == GST_VIDEO_FORMAT_ENCODED)
|
||||
s = g_strdup_printf ("%" GST_TIME_FORMAT ".%s", GST_TIME_ARGS (position),
|
||||
self->priv->ext);
|
||||
s = g_strdup_printf ("%" GST_VALIDATE_SSIM_TIME_FORMAT ".%s",
|
||||
GST_TIME_ARGS (position), self->priv->ext);
|
||||
else
|
||||
s = g_strdup_printf ("%" GST_TIME_FORMAT ".%dx%d.%s",
|
||||
s = g_strdup_printf ("%" GST_VALIDATE_SSIM_TIME_FORMAT ".%dx%d.%s",
|
||||
GST_TIME_ARGS (position),
|
||||
self->priv->out_info.width,
|
||||
self->priv->out_info.height, self->priv->ext);
|
||||
|
@ -537,10 +537,10 @@ _get_filename (ValidateSsimOverride * self, GstValidatePadMonitor * monitor,
|
|||
while (has_frame (self, outname)) {
|
||||
g_free (outname);
|
||||
if (self->priv->save_format == GST_VIDEO_FORMAT_ENCODED)
|
||||
s = g_strdup_printf ("%" GST_TIME_FORMAT "-%d.%s",
|
||||
s = g_strdup_printf ("%" GST_VALIDATE_SSIM_TIME_FORMAT "-%d.%s",
|
||||
GST_TIME_ARGS (position), i++, self->priv->ext);
|
||||
else
|
||||
s = g_strdup_printf ("%" GST_TIME_FORMAT "-%d.%dx%d.%s",
|
||||
s = g_strdup_printf ("%" GST_VALIDATE_SSIM_TIME_FORMAT "-%d.%dx%d.%s",
|
||||
GST_TIME_ARGS (position), i++, self->priv->out_info.width,
|
||||
self->priv->out_info.height, self->priv->ext);
|
||||
|
||||
|
|
Loading…
Reference in a new issue