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 719878 - GES needs a ges_clip_find_all_track_elements function
GES needs a ges_clip_find_all_track_elements function
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gst-editing-services
1.2.0
Other Windows
: Normal enhancement
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-12-05 03:38 UTC by Kim Lam
Modified: 2018-11-03 12:52 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Kim Lam 2013-12-05 03:38:32 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;
}
Comment 1 Kim Lam 2013-12-05 04:13:20 UTC
Example of a DualMonoFile:
https://drive.google.com/file/d/0By2pR2Z9O30nSC1rcTdMMXBObUE/edit?usp=sharing
Comment 2 Thibault Saunier 2013-12-05 12:39:54 UTC
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).
Comment 3 GStreamer system administrator 2018-11-03 12:52:03 UTC
-- 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.