[gst-devel] sample caching

David Given dg at cowlark.com
Fri Nov 26 03:36:07 CET 2004


On Friday 26 November 2004 11:15, Benjamin Otte wrote:
[...]
> OTOH you want to reuse stuff that has previously been cached by a
> different application. You don't want to cache
> "/usr/share/sounds/menu-clicked.ogg" in every gnome app, but just once.
> No clue how to easily do that though.

Have a seperate server process to manage the cache. The cache gstreamer plugin 
communicates with it via IPC, and identifies the set of samples it wants 
cached based on some key (e.g. filename and sample range). The cache server 
then replies with a shared memory ID containing the raw data. The gstreamer 
plugin can then serve the data directly.

This approach should be reasonably fast, although you depending how the IPC 
call was made you may end up with issues due to the cache server not 
responding quickly enough. On some platforms it might even be possible to use 
a mmap'd file to back the cache, which means that you could have a persistant 
cache; whether this would be useful or not depends very much on the relative 
cost of reading the data from disk to recalculating it...

-- 
+- David Given --McQ-+ "...electrons, nuclei and other particles are good
|  dg at cowlark.com    | approximations to perfectly elastic spherical
| (dg at tao-group.com) | cows." --- David M. Palmer on r.a.sf.c
+- www.cowlark.com --+ 




More information about the gstreamer-devel mailing list