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 476916 - Have a source based on gvfs
Have a source based on gvfs
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
git master
Other Linux
: Normal normal
: 0.10.6
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2007-09-14 14:02 UTC by Bastien Nocera
Modified: 2007-09-21 17:09 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Add experimental gio plugin with source and sink elements to -bad (37.25 KB, patch)
2007-09-17 19:02 UTC, René Stadler
committed Details | Review

Description Bastien Nocera 2007-09-14 14:02:35 UTC
gvfs is the new black^Wgnome-vfs.
Comment 1 Sebastian Dröge (slomo) 2007-09-14 14:06:27 UTC
Agreed, would be really nice to have... but is gvfs already in a somewhat usable state to create gvfs elements?
Comment 2 Bastien Nocera 2007-09-14 14:08:09 UTC
The API is obviously still not frozen, but it's a good candidate for -bad in the meanwhile.
Comment 3 René Stadler 2007-09-14 14:31:56 UTC
Does anybody have code yet?  I experimented with gio + gst recently and can polish up the code to drop it here.

Didn't have the guts to open a bug yet since the API is indeed a (slightly) running target for now :-)
Comment 4 Bastien Nocera 2007-09-14 14:56:23 UTC
Don't think anyone has code right now. I guess it's a good way to see if gvfs fits the bill. Mind putting the patch here?
Comment 5 René Stadler 2007-09-17 19:02:24 UTC
Created attachment 95755 [details] [review]
Add experimental gio plugin with source and sink elements to -bad

This patch adds files gst/gio/gio{,src,sink}.{c,h} to gst-plugins-bad.  It's placed into gst/ instead of ext/ since the final gio library is going to end up in glib (alongside libgobject, libgthread etc), which means the plugin will indeed have no external dependency in the future.

For testing purposes, the elements are registered with rank PRIMARY + 1, making them replace not only the gnomevfs elements but even filesrc and filesink.

Use grep -A 3 FIXME gst/gio/*.c to get a list of shortcomings and remarks.  The biggest FIXMEs are probably the missing overwrite support for the sink and the hard coded list of supported protocols.

You are likely to encounter bugs in gio; in particular a crasher where the vfs object pointer is NULL.  This is a bug in the function g_vfs_get_local in gio-standalone/gio/gvfs.c.  To fix it, declare the vfs variable as static there.  I sent a patch to Alex to fix this.

If you use totem, rhythmbox or another DBus-using app, you will probably trigger a GVFS assertion in gdbusutils.c (dbus_watch_get_data (watch) == NULL)).  You can work around that by wiping your registry and using --gst-disable-registry-fork.

The effect of this is that the gst gio plugin will be initialized very early.  It seems that the client of the gvfs daemon hooks into the main context to get the (shared) session bus connection socket's events scheduled.  This seems to collide with dbus-glib own's integration, which is installed by the app.

Bug summary should be changed to "Add GIO (GVFS) source and sink elements".  Component can be changed to -bad (I guess the final module will be -base).
Comment 6 Sebastian Dröge (slomo) 2007-09-21 13:56:10 UTC
I'll take a closer look at it later and probably commit it to -bad :)
Do you have a newer version already? If so, please attach it here ;)
Comment 7 Sebastian Dröge (slomo) 2007-09-21 17:09:29 UTC
Ok, I've committed it to -bad/ext/gio. Wim thought that ext is better because it's not yet in glib and it's not in the glib version that we currently have as minimum required glib version. Can be moved to -good/gst later though if we think it's better placed there :)

We maybe want to change the location property to uri as it's really an URI, not sure... whatever, I've changed the RANK to MARGINAL for now and replaced a renamed gio function with the new name to get it building against latest gio svn version.
The build can be enabled with --enable-experimental.

2007-09-21  Sebastian Dröge  <slomo@circular-chaos.org>

	Patch by: René Stadler <mail at renestadler dot de>

	* configure.ac:
	* ext/Makefile.am:
	* ext/gio/Makefile.am:
	* ext/gio/gstgio.c: (gst_gio_error), (gst_gio_seek),
	(gst_gio_get_supported_protocols),
	(gst_gio_uri_handler_get_type_sink),
	(gst_gio_uri_handler_get_type_src),
	(gst_gio_uri_handler_get_protocols), (gst_gio_uri_handler_get_uri),
	(gst_gio_uri_handler_set_uri), (gst_gio_uri_handler_init),
	(gst_gio_uri_handler_do_init), (plugin_init):
	* ext/gio/gstgio.h:
	* ext/gio/gstgiosink.c: (gst_gio_sink_base_init),
	(gst_gio_sink_class_init), (gst_gio_sink_init),
	(gst_gio_sink_finalize), (gst_gio_sink_set_property),
	(gst_gio_sink_get_property), (gst_gio_sink_start),
	(gst_gio_sink_stop), (gst_gio_sink_unlock),
	(gst_gio_sink_unlock_stop), (gst_gio_sink_event),
	(gst_gio_sink_render), (gst_gio_sink_query):
	* ext/gio/gstgiosink.h:
	* ext/gio/gstgiosrc.c: (gst_gio_src_base_init),
	(gst_gio_src_class_init), (gst_gio_src_init),
	(gst_gio_src_finalize), (gst_gio_src_set_property),
	(gst_gio_src_get_property), (gst_gio_src_start),
	(gst_gio_src_stop), (gst_gio_src_get_size),
	(gst_gio_src_is_seekable), (gst_gio_src_unlock),
	(gst_gio_src_unlock_stop), (gst_gio_src_check_get_range),
	(gst_gio_src_create):
	* ext/gio/gstgiosrc.h:
	Add a GIO/GVFS plugin with source and sink elements. This will
	only be enabled when --enable-experimental is given to configure
	for now as the GIO API is not stable yet. Fixes #476916.