After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 520244 - need g_file_input_stream_query_info() impl for daemon files
need g_file_input_stream_query_info() impl for daemon files
Status: RESOLVED FIXED
Product: gvfs
Classification: Core
Component: daemon
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gvfs-maint
gvfs-maint
: 518835 524579 547580 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2008-03-04 07:13 UTC by David Zeuthen (not reading bugmail)
Modified: 2009-03-02 11:35 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
hacked up patch (not for mainline) (6.48 KB, patch)
2008-03-04 08:07 UTC, David Zeuthen (not reading bugmail)
none Details | Review
hacked up patch, take 2 (3.27 KB, patch)
2008-03-04 08:09 UTC, David Zeuthen (not reading bugmail)
needs-work Details | Review

Description David Zeuthen (not reading bugmail) 2008-03-04 07:13:13 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.
Comment 1 David Zeuthen (not reading bugmail) 2008-03-04 08:07:33 UTC
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.
Comment 2 David Zeuthen (not reading bugmail) 2008-03-04 08:09:22 UTC
Created attachment 106533 [details] [review]
hacked up patch, take 2

Here's a version without noise from another bug.
Comment 3 Bastien Nocera 2008-03-04 18:07:17 UTC
*** Bug 518835 has been marked as a duplicate of this bug. ***
Comment 4 Bastien Nocera 2008-03-04 18:08:01 UTC
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.
Comment 5 David Zeuthen (not reading bugmail) 2008-03-04 18:47:26 UTC
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.

Thread 3087034704 (LWP 31398)

  • #0 gst_base_src_get_range
    at gstbasesrc.c line 1530
  • #1 gst_base_src_pad_get_range
    at gstbasesrc.c line 1894
  • #2 gst_pad_get_range
    at gstpad.c line 3853
  • #3 gst_pad_pull_range
    at gstpad.c line 3986
  • #4 gst_proxy_pad_do_getrange
    at gstghostpad.c line 205
  • #5 gst_pad_get_range
    at gstpad.c line 3853
  • #6 gst_pad_pull_range
    at gstpad.c line 3986
  • #7 gst_type_find_element_getrange
    at gsttypefindelement.c line 678
  • #8 gst_pad_get_range
    at gstpad.c line 3853
  • #9 gst_pad_pull_range
    at gstpad.c line 3986
  • #10 gst_tag_demux_sink_activate
    at gsttagdemux.c line 866
  • #11 gst_pad_set_active
    at gstpad.c line 658
  • #12 activate_pads
    at gstelement.c line 2509
  • #13 gst_iterator_fold
    at gstiterator.c line 503
  • #14 iterator_activate_fold_with_resync
    at gstelement.c line 2541
  • #15 gst_element_pads_activate
    at gstelement.c line 2585
  • #16 gst_element_change_state_func
    at gstelement.c line 2651
  • #17 gst_tag_demux_change_state
    at gsttagdemux.c line 1291
  • #18 gst_element_change_state
    at gstelement.c line 2425
  • #19 gst_element_set_state_func
    at gstelement.c line 2375
  • #20 gst_element_set_state
    at gstelement.c line 2278
  • #21 close_pad_link
    at gstdecodebin.c line 991
  • #22 type_found
    at gstdecodebin.c line 1608
  • #23 gst_marshal_VOID__UINT_BOXED
    at gstmarshal.c line 507
  • #24 IA__g_closure_invoke
    at gclosure.c line 490
  • #25 signal_emit_unlocked_R
    at gsignal.c line 2440
  • #26 IA__g_signal_emit_valist
    at gsignal.c line 2199
  • #27 IA__g_signal_emit
    at gsignal.c line 2243
  • #28 gst_type_find_element_activate
    at gsttypefindelement.c line 763
  • #29 gst_pad_set_active
    at gstpad.c line 658
  • #30 activate_pads
    at gstelement.c line 2509
  • #31 gst_iterator_fold
    at gstiterator.c line 503
  • #32 iterator_activate_fold_with_resync
    at gstelement.c line 2541
  • #33 gst_element_pads_activate
  • #34 gst_element_change_state_func
    at gstelement.c line 2651
  • #35 gst_type_find_element_change_state
    at gsttypefindelement.c line 790
  • #36 gst_element_change_state
    at gstelement.c line 2425
  • #37 gst_element_set_state_func
    at gstelement.c line 2375
  • #38 gst_element_set_state
    at gstelement.c line 2278
  • #39 gst_bin_change_state_func
    at gstbin.c line 1933
  • #40 gst_decode_bin_change_state
    at gstdecodebin.c line 1780
  • #41 gst_element_change_state
    at gstelement.c line 2425
  • #42 gst_element_continue_state
    at gstelement.c line 2132
  • #43 gst_element_change_state
    at gstelement.c line 2462
  • #44 gst_element_set_state_func
    at gstelement.c line 2375
  • #45 gst_element_set_state
    at gstelement.c line 2278
  • #46 gst_bin_change_state_func
    at gstbin.c line 1933
  • #47 gst_pipeline_change_state
    at gstpipeline.c line 463
  • #48 gst_play_base_bin_change_state
    at gstplaybasebin.c line 2688
  • #49 gst_play_bin_change_state
    at gstplaybin.c line 1828
  • #50 gst_element_change_state
    at gstelement.c line 2425
  • #51 gst_element_continue_state
    at gstelement.c line 2132
  • #52 gst_element_change_state
    at gstelement.c line 2462
  • #53 gst_element_set_state_func
    at gstelement.c line 2375
  • #54 gst_element_set_state
    at gstelement.c line 2278
  • #55 bacon_video_widget_open_with_subtitle
  • #56 main

Comment 6 David Zeuthen (not reading bugmail) 2008-03-04 18:50:30 UTC
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='/'
Comment 7 David Zeuthen (not reading bugmail) 2008-03-04 19:12:57 UTC
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.
Comment 8 David Zeuthen (not reading bugmail) 2008-03-04 21:01:18 UTC
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.
Comment 9 Alexander Larsson 2008-03-06 11:21:14 UTC
Marking the patch needs-work. A proper patch should serialize the GFileInfos over the GDaemonFile*Streams.
Comment 10 Alexander Larsson 2008-03-27 09:21:13 UTC
*** Bug 524579 has been marked as a duplicate of this bug. ***
Comment 11 Bastien Nocera 2008-08-13 11:36:03 UTC
*** Bug 547580 has been marked as a duplicate of this bug. ***
Comment 12 Alexander Larsson 2009-03-02 11:35:30 UTC
query info from streams have now landed on trunk.