summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVineeth TM <vineeth.tm@samsung.com>2015-08-11 10:05:41 +0900
committerThibault Saunier <tsaunier@gnome.org>2015-10-02 17:32:19 +0200
commit5c0c42ed6d8c26c19e90fb3a0f8e347141f79db3 (patch)
tree273b0ce4f53042ee7cad10f4a9067212f1237327
parent4071d60b0f6ae353506544222fc16af3359cc039 (diff)
validate:tools: set locale to all and change argument to FILENAME
When file name consists of characters from other languages, say korean, then it throws an error Error initializing: Invalid byte sequence in conversion input Hence setting locale to all to fix this. And changing the media-info argument to type G_OPTION_ARG_FILENAME https://bugzilla.gnome.org/show_bug.cgi?id=753486
-rw-r--r--validate/tools/gst-validate-images-check.c5
-rw-r--r--validate/tools/gst-validate-media-check.c2
-rw-r--r--validate/tools/gst-validate-transcoding.c4
-rw-r--r--validate/tools/gst-validate.c2
4 files changed, 10 insertions, 3 deletions
diff --git a/validate/tools/gst-validate-images-check.c b/validate/tools/gst-validate-images-check.c
index 0f52eaf..496b5d4 100644
--- a/validate/tools/gst-validate-images-check.c
+++ b/validate/tools/gst-validate-images-check.c
@@ -25,6 +25,7 @@
#include <gst/gst.h>
#include <gst/validate/validate.h>
#include <gst/video/video.h>
+#include <locale.h> /* for LC_ALL */
int
main (int argc, char **argv)
@@ -49,7 +50,7 @@ main (int argc, char **argv)
"The minimum 'lowest' similarity under which we consider"
"the test as failing",
NULL},
- {"result-output-folder", 'r', 0, G_OPTION_ARG_STRING,
+ {"result-output-folder", 'r', 0, G_OPTION_ARG_FILENAME,
&outfolder,
"The folder in which to store resulting grey scale images"
" when the test failed. In that folder you will find"
@@ -59,6 +60,8 @@ main (int argc, char **argv)
{NULL}
};
+ setlocale (LC_ALL, "");
+
g_set_prgname ("gst-validate-mages-check-" GST_API_VERSION);
ctx = g_option_context_new ("/reference/file/path /compared/file/path");
diff --git a/validate/tools/gst-validate-media-check.c b/validate/tools/gst-validate-media-check.c
index 8b67823..ccf952f 100644
--- a/validate/tools/gst-validate-media-check.c
+++ b/validate/tools/gst-validate-media-check.c
@@ -34,6 +34,7 @@
#include <gst/validate/media-descriptor-parser.h>
#include <gst/validate/media-descriptor.h>
#include <gst/pbutils/encoding-profile.h>
+#include <locale.h> /* for LC_ALL */
int
main (int argc, gchar ** argv)
@@ -64,6 +65,7 @@ main (int argc, gchar ** argv)
{NULL}
};
+ setlocale (LC_ALL, "");
g_set_prgname ("gst-validate-media-check-" GST_API_VERSION);
ctx = g_option_context_new ("[URI]");
g_option_context_set_summary (ctx, "Analyzes a media file and writes "
diff --git a/validate/tools/gst-validate-transcoding.c b/validate/tools/gst-validate-transcoding.c
index ca15bea..96f2b93 100644
--- a/validate/tools/gst-validate-transcoding.c
+++ b/validate/tools/gst-validate-transcoding.c
@@ -27,6 +27,7 @@
#include <stdlib.h>
#include <string.h>
+#include <locale.h> /* for LC_ALL */
#include <gst/gst.h>
#include <gst/video/video.h>
@@ -815,7 +816,7 @@ main (int argc, gchar ** argv)
"The presence property of the profile can be specified with |<presence>, eg:\n"
"video/webm:video/x-vp8|<presence>:audio/x-vorbis\n",
"properties-values"},
- {"set-scenario", '\0', 0, G_OPTION_ARG_STRING, &scenario,
+ {"set-scenario", '\0', 0, G_OPTION_ARG_FILENAME, &scenario,
"Let you set a scenario, it can be a full path to a scenario file"
" or the name of the scenario (name of the file without the"
" '.scenario' extension).", NULL},
@@ -846,6 +847,7 @@ main (int argc, gchar ** argv)
{NULL}
};
+ setlocale (LC_ALL, "");
/* There is a bug that make gst_init remove the help param when initializing,
* it is FIXED in 1.0 */
for (i = 1; i < argc; i++) {
diff --git a/validate/tools/gst-validate.c b/validate/tools/gst-validate.c
index 994f36e..ddfe065 100644
--- a/validate/tools/gst-validate.c
+++ b/validate/tools/gst-validate.c
@@ -442,7 +442,7 @@ main (int argc, gchar ** argv)
int rep_err;
GOptionEntry options[] = {
- {"set-scenario", '\0', 0, G_OPTION_ARG_STRING, &scenario,
+ {"set-scenario", '\0', 0, G_OPTION_ARG_FILENAME, &scenario,
"Let you set a scenario, it can be a full path to a scenario file"
" or the name of the scenario (name of the file without the"
" '.scenario' extension).", NULL},