mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 11:45:25 +00:00
asset: Fix asset cache for CLips and TrackElement with same ID
We clearly uniquely identify assets by both their IDs and their extractable type, and we should make sure that you can have a TrackElement and a Clip with the same ID. There is one exception in our implementation which is GESFormatter because we treat their subclasses as 1 type with different IDs.
This commit is contained in:
parent
dcae483bca
commit
8477a3236d
1 changed files with 5 additions and 7 deletions
|
@ -458,16 +458,14 @@ ges_asset_init (GESAsset * self)
|
|||
|
||||
/* Internal methods */
|
||||
|
||||
/* Find the type that implemented the GESExtractable interface */
|
||||
static inline const gchar *
|
||||
_extractable_type_name (GType type)
|
||||
{
|
||||
while (1) {
|
||||
if (g_type_is_a (g_type_parent (type), GES_TYPE_EXTRACTABLE))
|
||||
type = g_type_parent (type);
|
||||
else
|
||||
return g_type_name (type);
|
||||
}
|
||||
/* We can use `ges_asset_request (GES_TYPE_FORMATTER);` */
|
||||
if (g_type_is_a (type, GES_TYPE_FORMATTER))
|
||||
return g_type_name (GES_TYPE_FORMATTER);
|
||||
|
||||
return g_type_name (type);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
Loading…
Reference in a new issue