GNOME Bugzilla – Bug 520244
need g_file_input_stream_query_info() impl for daemon files
Last modified: 2009-03-02 11:35:30 UTC
The gstreamer gio code (see bug 510417) relies on g_file_input_stream_query_info() to get the G_FILE_ATTRIBUTE_STANDARD_SIZE attribute. Without this it won't work. We should probably get this in for 2.22. Sorry, no patch attached, the code looks pretty hairy.
Created attachment 106532 [details] [review] hacked up patch (not for mainline) This patch implements the missing function to at least get the gstreamer gio elements somewhat working. Or at least further. It's not suitable for mainline inclusion; for example it won't work if you delete the file you're reading from. But it allows to further debug the totem-audio-preview and gstreamer gio stuff.
Created attachment 106533 [details] [review] hacked up patch, take 2 Here's a version without noise from another bug.
*** Bug 518835 has been marked as a duplicate of this bug. ***
From bug 518835: g_file_input_stream_query_info() isn't implemented in gvfs, which means that the progress callbacks from g_file_copy() don't include any size information.
Even with the patch in comment 2 I get crashes with the gstreamer gio plugin on gvfs mounts. So it seems like something fishy is going on but it's not evident where. Anyway, here's the backtrace just for reference $ gdb --args totem-audio-preview gphoto2://[usb:001,004]/MUSIC/Nephew/10.%20Bazooka.mp3 Program received signal SIGSEGV, Segmentation fault.
+ Trace 191287
Thread 3087034704 (LWP 31398)
Also, for reference $ gvfs-info gphoto2://[usb:001,004]/MUSIC/Nephew/10.%20Bazooka.mp3 display name: 10. Bazooka.mp3 name: 10. Bazooka.mp3 type: regular size: 9997404 attributes: standard::name: 10. Bazooka.mp3 standard::display-name: 10. Bazooka.mp3 standard::icon: GThemedIcon:0x999d6b0 standard::type: 1 standard::content-type: audio/mpeg standard::size: 9997404 standard::is-hidden: FALSE access::can-read: TRUE access::can-write: TRUE access::can-delete: TRUE access::can-execute: FALSE access::can-trash: FALSE access::can-rename: TRUE time::modified: 1204495018 time::modified-usec: 0 id::filesystem: host='[usb:001,004]',type='gphoto2',mount_prefix='/'
Debugged this a bit with Bastien.. For the record $ LD_PRELOAD=/lib/libgio-2.0.so gst-launch-0.10 giosrc location="gphoto2://[usb:001,004]/MUSIC/Nephew/10.%20Bazooka.mp3" ! fakesink notes - s/fakesink/mad ! audioconvert ! audioresample ! pulsesink/ works too if you want audio! - need the LD_PRELOAD for some reason; probably libs bustage somewhere works fine though totem-audio-preview still crashes even with the LD_PRELOAD hack. This seems to indicate that once this bug is fixed the gstreamer gio elements will work just fine.
Sorry, seems I had a busted version of the gstreamer gio stuff installed. With the RPM's from Bastien it works $ gst-launch giosrc location="gphoto2://[usb:001,005]/MUSIC/Nephew/10.%20Bazooka.mp3" ! mad ! audioconvert ! audioresample ! pulsesink However totem-audio-preview and totem still SEGV's. That's probably a separate problem.
Marking the patch needs-work. A proper patch should serialize the GFileInfos over the GDaemonFile*Streams.
*** Bug 524579 has been marked as a duplicate of this bug. ***
*** Bug 547580 has been marked as a duplicate of this bug. ***
query info from streams have now landed on trunk.