<div dir="ltr">1)  gst_rtsp_mount_points_remove_factory() should be changed so that all paths<div>matching with gst_rtsp_mount_points_match() are deleted.</div><div><br></div><div>2) gst_rtsp_mount_points_add_factory() takes ownership of the object. It is freed when the object is removed from the GSequence. If you need to access the factory after _add_factory() you will need to take an additional ref before calling add_factory(). This is done to make the most common case easier to write in C.</div><div><br></div><div>Wim</div></div><div class="gmail_extra"><br><div class="gmail_quote">On 12 February 2015 at 18:08, Gregor Boirie <span dir="ltr"><<a href="mailto:gregor.boirie@parrot.com" target="_blank">gregor.boirie@parrot.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
I'm trying to implement a standalone gst-rtsp-server based daemon serving a<br>
whole local directory hierarchy and I have a couple of questions for<br>
gst-rtsp-server developpers.<br>
<br>
Currently, my prototype is able to recursively monitor a configured root<br>
directory with discovered "playable" children registered to a GstRTSPMountPoints<br>
object.<br>
Pipelines are created using a single custom GstRTSPMediaFactory object, derived<br>
from GstRTSPMediaFactoryURI implementation where the "create_element" method is<br>
overloaded to give uridecodebin a proper URI.<br>
This single factory handles all entries (related to a single top-level<br>
directory) registered to the mount points object mentionned above.<br>
<br>
However, I'm wandering if this approach suits well with the way gst-rtsp-server<br>
is designed and I'd like to hear your suggestions.<br>
<br>
1/ mount points and prefix based URI / factory removal<br>
-------------------------------------------------------<br>
<br>
I want to reuse GstRTSPMountPoints's internal GSequence to manage<br>
individual file entries / URI. References to related real directories<br>
are kept in a separate application level GTree. Directories life-cycle is<br>
monitored through GFileMonitor / inotify combination.<br>
<br>
When a whole sub-directory is removed from file system, application receive a<br>
single "directory deletion" event. Therefore, I need a way to unregister a<br>
whole directory hierarchy from the mount points object. Something like "remove<br>
all entries begining with this path prefix"...<br>
Which means patching rtsp-mount-points.c, something that I'd like to avoid.<br>
<br>
Would you see any other way to implement such a feature ?<br>
<br>
<br>
2/ multiple URI / single factory mappings and ref counting<br>
----------------------------------------------------------<br>
<br>
Factory is g_object_unref'ed at gst_rtsp_mount_points_remove_factory time<br>
although not g_object_ref'ed in gst_rtsp_mount_points_add_factory.<br>
<br>
This leads to reference counting inconsistencies when mount points object is<br>
destroyed (gst_rtsp_mount_points_finalize -> g_sequence_free -><br>
data_item_free).<br>
<br>
An additional "g_object_ref (factory);" in "data_item_new ()" fixes these for<br>
me. Is this a bug or do I miss something ?<br>
<br>
<br>
Regards,<br>
Grégor<br>
_______________________________________________<br>
gstreamer-devel mailing list<br>
<a href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a><br>
</blockquote></div><br></div>