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 566881 - [GstIndex] support/caching in GstBin
[GstIndex] support/caching in GstBin
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
git master
Other Linux
: Normal normal
: 0.10.25
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2009-01-07 10:15 UTC by Edward Hervey
Modified: 2009-08-28 16:43 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Edward Hervey 2009-01-07 10:15:14 UTC
Currently GstBin implements index support in a very 'simple' way, i.e. it just forwards _set_index()/_get_index() on its *current* children.

What it should ideally do is the following:

* When _set_index() is called:
 * cache internally (with refcount) the new index
 * call _set_index on all current children (current behaviour)

* When a new child is added to a bin:
 * call _set_index on the new child with the currently cached index

* When _get_index() is called:
 * If we have a cached index, return that one
 * If not, call _get_index() on each child until we get one and return that one.
Comment 1 Edward Hervey 2009-01-07 10:25:18 UTC
One use-case this is meant to solve is the following (from an application point of view):

Create playbin
Set an index on it
Set a URI
Set it to PLAYING
==> All elements added use the index given at creation and the application can have an aggregated view of all index entries.
Comment 2 Wim Taymans 2009-01-07 15:27:50 UTC
* When _get_index() is called:
 * If we have a cached index, return that one
 * if not, return NULL

We don't want to retrieve indexes from elements, only supply them
Comment 3 Wim Taymans 2009-08-28 16:43:01 UTC
This should work.

commit d4012be4698e5aa4dc24d14c7fc95f0af0ee0d54
Author: Wim Taymans <wim.taymans@collabora.co.uk>
Date:   Fri Aug 28 18:37:44 2009 +0200

    bin: cache index
    
    Cache the last index that was set with _set_index() and return this in the
    _get_index() call.
    Set the cached index on newly added elements.
    
    Fixes #566881