[Bug 691299] API: GstFileMemAllocator - an allocator that uses disk storage to provide memory space

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Wed Jan 16 07:54:43 PST 2013


https://bugzilla.gnome.org/show_bug.cgi?id=691299
  GStreamer | gstreamer (core) | git

--- Comment #3 from krzysztof.konopko at youview.com 2013-01-16 15:54:39 UTC ---
> Problems
> --------
> 
> - portability
> What is the best approach to not break other platforms support?
> It should be possible to add the support for this allocator on other platform
> as needed but at the moment ideally the allocator files should be complied only
> for *nix system. I'll have a look how to best achieve it unless someone can
> suggest me patterns already used (I haven't been looking for these yet).
> 

In the second version of the patch [1] I added simple handling for unsupported
platforms. If the required features are not available, the implementation code
is not compiled. The allocator initialization function reports an error on the
runtime instead.

> - initialization
> I feel that the initialization is a bit awkward, i. e. the allocator needs to
> know some information in advance (the file size and where to store it). It sort
> of make sense if one think of the allocator as a global resource but I was
> wondering whether it'd be useful to have an ability to create them on a whim,
> i. e. not necessarily add them to the registry.
> 

I'm leaning towards the allocator as a global resource. I have a full
production use case where the application initializes the allocator in the main
context and passed its name around through object properties. The object
(element) that wants to use different allocation schemes uses the allocator
name as a property. By default the property is set to NULL for such an object
which ends up using the default allocator. Otherwise it picks up selected (e.
g. "FileMemory") allocator. 

[1] https://bugzilla.gnome.org/review?bug=691299&attachment=233601

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list