Finish renaming tck_obj and derivate to track_element

This commit is contained in:
Thibault Saunier 2013-02-09 21:49:16 -03:00
parent d21791a8d0
commit 7f3c952737
6 changed files with 38 additions and 40 deletions

View file

@ -1111,16 +1111,16 @@ ges_clip_set_top_effect_priority (GESClip * object,
gint inc;
GList *tmp;
guint current_prio;
GESTrackElement *tck_obj;
GESTrackElement *track_element;
g_return_val_if_fail (GES_IS_CLIP (object), FALSE);
tck_obj = GES_TRACK_ELEMENT (effect);
current_prio = _PRIORITY (tck_obj);
track_element = GES_TRACK_ELEMENT (effect);
current_prio = _PRIORITY (track_element);
/* We don't change the priority */
if (current_prio == newpriority ||
(G_UNLIKELY (ges_track_element_get_clip (tck_obj) != object)))
(G_UNLIKELY (ges_track_element_get_clip (track_element) != object)))
return FALSE;
if (newpriority > (object->priv->nb_effects - 1)) {
@ -1133,12 +1133,12 @@ ges_clip_set_top_effect_priority (GESClip * object,
return FALSE;
}
if (_PRIORITY (tck_obj) < newpriority)
if (_PRIORITY (track_element) < newpriority)
inc = -1;
else
inc = +1;
_set_priority0 (GES_TIMELINE_ELEMENT (tck_obj), newpriority);
_set_priority0 (GES_TIMELINE_ELEMENT (track_element), newpriority);
for (tmp = object->trackelements; tmp; tmp = tmp->next) {
GESTrackElement *tmpo = GES_TRACK_ELEMENT (tmp->data);
guint tck_priority = _PRIORITY (tmpo);

View file

@ -167,9 +167,9 @@ struct _GESClipClass
gboolean snaps;
void (*track_element_added) (GESClip *object,
GESTrackElement *tck_object);
GESTrackElement *track_element);
void (*track_element_released) (GESClip *object,
GESTrackElement *tck_object);
GESTrackElement *track_element);
/*< private >*/
/* Padding for API extension */

View file

@ -50,8 +50,7 @@ enum
};
static void ges_effect_clip_finalize (GObject * object);
static GESTrackElement
* ges_tl_parse_launch_effect_create_track_obj (GESClip * self,
static GESTrackElement *_create_track_element (GESClip * self,
GESTrackType type);
static void
@ -141,8 +140,7 @@ ges_effect_clip_class_init (GESEffectClipClass * klass)
"Bin description of the audio track of the effect",
NULL, G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
timobj_class->create_track_element =
ges_tl_parse_launch_effect_create_track_obj;
timobj_class->create_track_element = _create_track_element;
timobj_class->need_fill_track = FALSE;
}
@ -155,7 +153,7 @@ ges_effect_clip_init (GESEffectClip * self)
}
static GESTrackElement *
ges_tl_parse_launch_effect_create_track_obj (GESClip * self, GESTrackType type)
_create_track_element (GESClip * self, GESTrackType type)
{
const gchar *bin_description = NULL;
GESEffectClip *effect = GES_EFFECT_CLIP (self);

View file

@ -51,7 +51,7 @@ typedef struct SrcMapping
gchar *id;
GESClip *obj;
guint priority;
GList *tck_obj_ids;
GList *track_element_ids;
} SrcMapping;
struct _GESPitiviFormatterPrivate
@ -97,8 +97,8 @@ free_src_map (SrcMapping * srcmap)
{
g_free (srcmap->id);
g_object_unref (srcmap->obj);
g_list_foreach (srcmap->tck_obj_ids, (GFunc) g_free, NULL);
g_list_free (srcmap->tck_obj_ids);
g_list_foreach (srcmap->track_element_ids, (GFunc) g_free, NULL);
g_list_free (srcmap->track_element_ids);
g_slice_free (SrcMapping, srcmap);
}
@ -151,7 +151,7 @@ static void
save_track_elements (xmlTextWriterPtr writer, GList * source_list,
GESTrackType type, gint * id)
{
GList *tmp, *tck_objs, *tmp_tck;
GList *tmp, *track_elements, *tmp_tck;
gchar *bin_desc;
xmlTextWriterStartElement (writer, BAD_CAST "track-objects");
@ -166,8 +166,8 @@ save_track_elements (xmlTextWriterPtr writer, GList * source_list,
object = srcmap->obj;
/* Save track associated objects */
tck_objs = ges_clip_get_track_elements (object);
for (tmp_tck = tck_objs; tmp_tck; tmp_tck = tmp_tck->next) {
track_elements = ges_clip_get_track_elements (object);
for (tmp_tck = track_elements; tmp_tck; tmp_tck = tmp_tck->next) {
xmlChar *cast;
GESTrackElement *trackelement = GES_TRACK_ELEMENT (tmp_tck->data);
GESTrack *track = ges_track_element_get_track (trackelement);
@ -273,10 +273,10 @@ save_track_elements (xmlTextWriterPtr writer, GList * source_list,
/* We add effects at the end of the trackelement list */
if (GES_IS_BASE_EFFECT (trackelement)) {
srcmap->tck_obj_ids = g_list_append (srcmap->tck_obj_ids,
srcmap->track_element_ids = g_list_append (srcmap->track_element_ids,
xmlXPathCastNumberToString (*id));
} else {
srcmap->tck_obj_ids = g_list_prepend (srcmap->tck_obj_ids,
srcmap->track_element_ids = g_list_prepend (srcmap->track_element_ids,
xmlXPathCastNumberToString (*id));
}
*id = *id + 1;
@ -390,7 +390,7 @@ save_sources (GESPitiviFormatter * formatter, GList * layers,
uriclip_uri));
srcmap->obj = g_object_ref (clip);
srcmap->priority = ges_timeline_layer_get_priority (layer);
/* We fill up the tck_obj_ids in save_track_elements */
/* We fill up the track_element_ids in save_track_elements */
source_list = g_list_append (source_list, srcmap);
}
}
@ -405,7 +405,7 @@ save_sources (GESPitiviFormatter * formatter, GList * layers,
static void
save_clips (xmlTextWriterPtr writer, GList * list)
{
GList *tmp, *tck_obj_ids;
GList *tmp, *track_element_ids;
xmlTextWriterStartElement (writer, BAD_CAST "timeline-objects");
@ -421,11 +421,11 @@ save_clips (xmlTextWriterPtr writer, GList * list)
xmlTextWriterEndElement (writer);
xmlTextWriterStartElement (writer, BAD_CAST "track-object-refs");
for (tck_obj_ids = srcmap->tck_obj_ids; tck_obj_ids;
tck_obj_ids = tck_obj_ids->next) {
for (track_element_ids = srcmap->track_element_ids; track_element_ids;
track_element_ids = track_element_ids->next) {
xmlTextWriterStartElement (writer, BAD_CAST "track-object-ref");
xmlTextWriterWriteAttribute (writer, BAD_CAST "id",
BAD_CAST tck_obj_ids->data);
BAD_CAST track_element_ids->data);
xmlTextWriterEndElement (writer);
}
xmlTextWriterEndElement (writer);
@ -752,14 +752,14 @@ track_element_added_cb (GESClip * object,
GESTrackElement * track_element, GHashTable * props_table)
{
gchar *media_type = NULL, *lockedstr;
GList *tck_objs = NULL, *tmp = NULL;
GList *track_elements = NULL, *tmp = NULL;
GESTrack *track;
gint64 start, duration;
gboolean has_effect = FALSE, locked = TRUE;
gint type = 0;
GESPitiviFormatter *formatter;
tck_objs = ges_clip_get_track_elements (object);
track_elements = ges_clip_get_track_elements (object);
media_type = (gchar *) g_hash_table_lookup (props_table, "media_type");
lockedstr = (gchar *) g_hash_table_lookup (props_table, "locked");
@ -782,7 +782,7 @@ track_element_added_cb (GESClip * object,
if (lockedstr && !g_strcmp0 (lockedstr, "(bool)False"))
locked = FALSE;
for (tmp = tck_objs; tmp; tmp = tmp->next) {
for (tmp = track_elements; tmp; tmp = tmp->next) {
if (!GES_IS_TRACK_ELEMENT (tmp->data)) {
/* If we arrive here something massively screwed */
@ -819,13 +819,13 @@ track_element_added_cb (GESClip * object,
}
if (has_effect) {
tck_objs = ges_clip_get_track_elements (object);
track_elements = ges_clip_get_track_elements (object);
/* FIXME make sure this is the way we want to handle that
* ie: set duration and start as the other trackelement
* and no let full control to the user. */
for (tmp = tck_objs; tmp; tmp = tmp->next) {
for (tmp = track_elements; tmp; tmp = tmp->next) {
/* We set the effects start and duration */
track = ges_track_element_get_track (tmp->data);

View file

@ -843,9 +843,9 @@ _create_transitions_on_layer (GESTimeline * timeline, GESTimelineLayer * layer,
}
}
/* @tck_obj must be a GESSource */
/* @track_element must be a GESSource */
static void
create_transitions (GESTimeline * timeline, GESTrackElement * tck_obj)
create_transitions (GESTimeline * timeline, GESTrackElement * track_element)
{
GESTrack *track;
GList *layer_node;
@ -855,15 +855,15 @@ create_transitions (GESTimeline * timeline, GESTrackElement * tck_obj)
if (!priv->needs_transitions_update || !priv->updates_enabled)
return;
GST_DEBUG_OBJECT (timeline, "Creating transitions around %p", tck_obj);
GST_DEBUG_OBJECT (timeline, "Creating transitions around %p", track_element);
track = ges_track_element_get_track (tck_obj);
track = ges_track_element_get_track (track_element);
layer_node = g_list_find_custom (timeline->layers,
GINT_TO_POINTER (_PRIORITY (tck_obj) / LAYER_HEIGHT),
GINT_TO_POINTER (_PRIORITY (track_element) / LAYER_HEIGHT),
(GCompareFunc) find_layer_by_prio);
_create_transitions_on_layer (timeline,
layer_node ? layer_node->data : NULL, track, tck_obj,
layer_node ? layer_node->data : NULL, track, track_element,
_find_transition_from_auto_transitions);
GST_DEBUG_OBJECT (timeline, "Done updating transitions");

View file

@ -56,7 +56,7 @@ enum
PROP_VTYPE = 5,
};
static GESTrackElement *ges_tl_transition_create_track_element (GESClip
static GESTrackElement *_create_track_element (GESClip
* self, GESTrackType type);
static void
ges_transition_clip_track_element_added (GESClip * obj,
@ -249,7 +249,7 @@ ges_transition_clip_class_init (GESTransitionClipClass * klass)
G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
timobj_class->create_track_element = ges_tl_transition_create_track_element;
timobj_class->create_track_element = _create_track_element;
timobj_class->need_fill_track = FALSE;
timobj_class->track_element_added = ges_transition_clip_track_element_added;
timobj_class->track_element_released =
@ -296,7 +296,7 @@ ges_transition_clip_track_element_added (GESClip * obj,
}
static GESTrackElement *
ges_tl_transition_create_track_element (GESClip * obj, GESTrackType type)
_create_track_element (GESClip * obj, GESTrackType type)
{
GESTransitionClip *transition = (GESTransitionClip *) obj;
GESTrackElement *res = NULL;