gBroutin / gstreamer-java

Automatically exported from code.google.com/p/gstreamer-java
0 stars 0 forks source link

Playbin failed to play file with Russian characters in a file name #55

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
This command works fine
gst-launch playbin uri="file:///<skip>/русские буквы.mp3"

When I try to play same file with Playbin class I get this message.
(AudioPlayer:34506): GStreamer-WARNING **: Trying to set string on structure 
field 'debug', but string is not valid UTF-8. Please file a bug.

After the message I do not hear any sound. If the file is named "russian 
letters.mp3" it plays fine.

My code is equivalent to the code below.

player = new PlayBin("MusicPlayer");
player.setURI(file.toURI());
player.setVideoSink(ElementFactory.make("fakesink", "videosink"));
player.setState(State.PLAYING);

Mac OS 10.6.4. Java 1.6.0_20

I guess problem related to a way how strings are passed from java to gstreamer.

Original issue reported on code.google.com by andrey.v...@gmail.com on 8 Sep 2010 at 2:25

GoogleCodeExporter commented 8 years ago
Search this group for Jna.encoding  

Original comment by tsha...@gmail.com on 13 Sep 2010 at 10:43

GoogleCodeExporter commented 8 years ago
>Search this group for Jna.encoding  

Thanks for the pointer :) 

I resolved the issue by passing -Dfile.encoding=UTF-8 to JVM. When GStreamer 
start playback it check if URI (file name) being passed is a valid UTF-8 
string. Without this flag this test fails and GStreamer abort playback and does 
not report any errors thru error callback.

Original comment by andrey.v...@gmail.com on 13 Sep 2010 at 10:51

GoogleCodeExporter commented 8 years ago

Original comment by lfar...@gmail.com on 24 Sep 2010 at 10:37