[gst-devel] How do I set uri of the playbin2 (win32), when path contains cyrillic letters?

wl2776 wl2776 at gmail.com
Tue Mar 9 15:11:05 CET 2010


For example, my filename is "h:\\some\\path\\with\\cyrillic
letters\\some_movie.mpg"
Cyrillic letters are in CP 1251 encoding.

What should be correct uri to set in playbin2?
If I set 
g_object_set(G_OBJECT(m_player),"uri",filenane,NULL);
then I get the error about non-implemented protocol "h" (It assumes that the
drive letter is a protocol).

If I use
gchar *uri=g_strdup_printf("file:///%s",filename);
then I get the error messages:

Error: Could not open file "h:\AVIK\video\ошибки_склейки\400063_Matrox.mpg"
for reading.
Debug deails: ..\Source\gstreamer\plugins\elements\gstfilesrc.c(1057):
gst_file_src_start ():
/GstPlayBin2:playbin0/GstURIDecodeBin:uridecodebin0/GstFileSrc:source:
system error: Invalid argument
Error: Could not open file "h:\AVIK\video\ошибки_склейки\400063_Matrox.mpg"
for reading.
Debug deails: ..\Source\gstreamer\plugins\elements\gstfilesrc.c(1057):
gst_file_src_start ():
/GstPlayBin2:playbin0/GstURIDecodeBin:uridecodebin0/GstFileSrc:source:
system error: Invalid argument

g_filename_to_utf8() returns null on this filename.

g_filename_to_uri() returns escaped string, where the spaces are replaced
with underscores.

I also tried 
g_uri_unescape_string(escaped_uri,
G_URI_RESERVED_CHARS_GENERIC_DELIMITERS
G_URI_RESERVED_CHARS_ALLOWED_IN_PATH
"АБВГДЕЁЖЗИЙКЛМНОПРСТУФХЦЧШЩЬЫЪЭЮЯ"
"абвгдеёжзийклмнопрстуфхцчшщьыъэюя") 

(the tail is the Cyrillic alphabet) but it also returns null. 
-- 
View this message in context: http://n4.nabble.com/How-do-I-set-uri-of-the-playbin2-win32-when-path-contains-cyrillic-letters-tp1586003p1586003.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.




More information about the gstreamer-devel mailing list