GNOME Bugzilla – Bug 719878
GES needs a ges_clip_find_all_track_elements function
Last modified: 2018-11-03 12:52:03 UTC
In order to set volume and mute state for a clip with Dual Mono audio a ges_clip_find_all_track_elements is needed. Dual Mono files produces two audio track elements. Something like the code below would work, but there's probably a more efficient way, since most of code is taken from ges_clip_find_track_element. GList * ges_clip_find_all_track_elements (GESClip * clip, GESTrack * track, GType type) { GList *tmp; GESTrackElement *otmp; GESTrackElement *foundElement; GList *ret = NULL; g_return_val_if_fail (GES_IS_CLIP (clip), NULL); g_return_val_if_fail (!(track == NULL && type == G_TYPE_NONE), NULL); for (tmp = GES_CONTAINER_CHILDREN (clip); tmp; tmp = g_list_next (tmp)) { otmp = (GESTrackElement *) tmp->data; if ((type != G_TYPE_NONE) && !G_TYPE_CHECK_INSTANCE_TYPE (tmp->data, type)) continue; if ((track == NULL) || (ges_track_element_get_track (otmp) == track)) { foundElement = GES_TRACK_ELEMENT (tmp->data); gst_object_ref (foundElement); ret = g_list_append(ret,foundElement); } } return ret; }
Example of a DualMonoFile: https://drive.google.com/file/d/0By2pR2Z9O30nSC1rcTdMMXBObUE/edit?usp=sharing
I think we should figure out a proper searching API, this function makes sense but I am not sure it is generic enough (we might need to be able to specify a TrackType rather than the track itself and things like this).
-- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gst-editing-services/issues/13.