summaryrefslogtreecommitdiff
path: root/ges/ges-uri-clip.c
diff options
context:
space:
mode:
authorThibault Saunier <thibault.saunier@collabora.com>2013-02-28 22:27:50 -0300
committerThibault Saunier <thibault.saunier@collabora.com>2013-03-15 00:13:08 -0300
commit795b8df1b6a17b888b21ebea7a54a57482e34655 (patch)
treee838d6763cdee1bc4147e4f84d727a4826e867c5 /ges/ges-uri-clip.c
parent0673739893b1f2d5397767babb849dfa50380294 (diff)
Implement GESContainer
+ Fix unit tests + Minor enhancement in unit tests API changes: ----------- * ges_track_element_get_clip -> ges_timeline_element_get_parent * ges_clip_add_track_element -> ges_container_add * ges_clip_release_track_element -> ges_container_remove * ges_clip_get_track_elements -> ges_container_get_children (or GES_CONTAINER_CHILDREN)
Diffstat (limited to 'ges/ges-uri-clip.c')
-rw-r--r--ges/ges-uri-clip.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/ges/ges-uri-clip.c b/ges/ges-uri-clip.c
index 19dcab8b..b3be3309 100644
--- a/ges/ges-uri-clip.c
+++ b/ges/ges-uri-clip.c
@@ -280,25 +280,20 @@ ges_uri_clip_init (GESUriClip * self)
void
ges_uri_clip_set_mute (GESUriClip * self, gboolean mute)
{
- GList *tmp, *trackelements;
- GESClip *clip = (GESClip *) self;
+ GList *tmp;
GST_DEBUG ("self:%p, mute:%d", self, mute);
self->priv->mute = mute;
/* Go over tracked objects, and update 'active' status on all audio objects */
- trackelements = ges_clip_get_track_elements (clip);
- for (tmp = trackelements; tmp; tmp = tmp->next) {
+ for (tmp = GES_CONTAINER_CHILDREN (self); tmp; tmp = g_list_next (tmp)) {
GESTrackElement *trackelement = (GESTrackElement *) tmp->data;
if (ges_track_element_get_track (trackelement)->type ==
GES_TRACK_TYPE_AUDIO)
ges_track_element_set_active (trackelement, !mute);
-
- g_object_unref (GES_TRACK_ELEMENT (tmp->data));
}
- g_list_free (trackelements);
}
gboolean
@@ -445,12 +440,9 @@ ges_uri_clip_new (gchar * uri)
void
ges_uri_clip_set_uri (GESUriClip * self, gchar * uri)
{
- GESClip *clip = GES_CLIP (self);
- GList *trackelements = ges_clip_get_track_elements (clip);
-
- if (trackelements) {
+ if (GES_CONTAINER_CHILDREN (self)) {
/* FIXME handle this case properly */
- GST_WARNING_OBJECT (clip, "Can not change uri when already"
+ GST_WARNING_OBJECT (self, "Can not change uri when already"
"containing TrackElements");
return;