mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-27 18:50:48 +00:00
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
This commit is contained in:
parent
4071d60b0f
commit
5c0c42ed6d
4 changed files with 10 additions and 3 deletions
|
@ -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");
|
||||
|
||||
|
|
|
@ -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 "
|
||||
|
|
|
@ -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++) {
|
||||
|
|
|
@ -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},
|
||||
|
|
Loading…
Reference in a new issue