* GESTimelineElement:priority:
*
* The priority of the object.
+ *
+ * Setting GESTimelineElement priorities is deprecated
+ * as all priority management is done by GES itself now.
*/
properties[PROP_PRIORITY] = g_param_spec_uint ("priority", "Priority",
"The priority of the object", 0, G_MAXUINT, 0, G_PARAM_READWRITE);
* @priority: the priority
*
* Sets the priority of the object within the containing layer
+ *
+ * Deprecated: All priority management is done by GES itself now.
+ * To set #GESEffect priorities #ges_clip_set_top_effect_index should
+ * be used.
*/
void
ges_timeline_element_set_priority (GESTimelineElement * self, guint32 priority)
gboolean (*set_inpoint) (GESTimelineElement * self, GstClockTime inpoint);
gboolean (*set_duration) (GESTimelineElement * self, GstClockTime duration);
gboolean (*set_max_duration) (GESTimelineElement * self, GstClockTime maxduration);
- gboolean (*set_priority) (GESTimelineElement * self, guint32 priority);
+ gboolean (*set_priority) (GESTimelineElement * self, guint32 priority); /* set_priority is now protected */
gboolean (*ripple) (GESTimelineElement *self, guint64 start);
gboolean (*ripple_end) (GESTimelineElement *self, guint64 end);
fail_unless_equals_int (MIN_NLE_PRIO + TRANSITIONS_HEIGHT + 2,
_PRIORITY (effect2));
- fail_unless (ges_clip_set_top_effect_priority (clip, GES_BASE_EFFECT (effect),
+ fail_unless (ges_clip_set_top_effect_index (clip, GES_BASE_EFFECT (effect),
2));
fail_unless_equals_int (MIN_NLE_PRIO + TRANSITIONS_HEIGHT + 0,
_PRIORITY (effect1));
fail_unless_equals_int (MIN_NLE_PRIO + TRANSITIONS_HEIGHT + 2,
_PRIORITY (effect));
- fail_unless (ges_clip_set_top_effect_priority (clip, GES_BASE_EFFECT (effect),
+ fail_unless (ges_clip_set_top_effect_index (clip, GES_BASE_EFFECT (effect),
0));
fail_unless_equals_int (MIN_NLE_PRIO + TRANSITIONS_HEIGHT + 0,
_PRIORITY (effect));
fail_unless_equals_int (LAYER_HEIGHT + MIN_NLE_PRIO + TRANSITIONS_HEIGHT + 2,
_PRIORITY (effect2));
- fail_unless (ges_clip_set_top_effect_priority (clip, GES_BASE_EFFECT (effect),
+ fail_unless (ges_clip_set_top_effect_index (clip, GES_BASE_EFFECT (effect),
2));
fail_unless_equals_int (LAYER_HEIGHT + MIN_NLE_PRIO + TRANSITIONS_HEIGHT + 0,
_PRIORITY (effect1));
fail_unless_equals_int (LAYER_HEIGHT + MIN_NLE_PRIO + TRANSITIONS_HEIGHT + 2,
_PRIORITY (effect));
- fail_unless (ges_clip_set_top_effect_priority (clip, GES_BASE_EFFECT (effect),
+ fail_unless (ges_clip_set_top_effect_index (clip, GES_BASE_EFFECT (effect),
0));
fail_unless_equals_int (LAYER_HEIGHT + MIN_NLE_PRIO + TRANSITIONS_HEIGHT + 0,
_PRIORITY (effect));
}
g_list_free (effects);
- ges_timeline_element_set_priority (GES_TIMELINE_ELEMENT (effect_clip), 2);
- assert_equals_int (_PRIORITY (effect_clip), 2);
assert_equals_int (GES_CONTAINER_HEIGHT (effect_clip), 4);
effects = ges_clip_get_top_effects (GES_CLIP (effect_clip));
effect_prio = 0;
fail_unless (clip2 != NULL);
fail_unless (clip3 != NULL);
- /* Set priorities on the objects */
- g_object_set (clip1, "priority", 0, "start", 0, "duration", 10, NULL);
- assert_equals_int (_PRIORITY (clip1), 0);
- g_object_set (clip2, "priority", 1, "start", 10, "duration", 10, NULL);
- assert_equals_int (_PRIORITY (clip2), 1);
- g_object_set (clip3, "priority", LAYER_HEIGHT + 1, "start", 20, "duration",
- 10, NULL);
- assert_equals_int (_PRIORITY (clip3), LAYER_HEIGHT + 1);
+ g_object_set (clip1, "start", 0, "duration", 10, NULL);
+ g_object_set (clip2, "start", 10, "duration", 10, NULL);
+ g_object_set (clip3, "start", 20, "duration", 10, NULL);
/* Add objects to the timeline */
fail_unless (ges_layer_add_clip (layer1, clip1));
assert_equals_int (prio3,
2 * LAYER_HEIGHT + 2 + MIN_NLE_PRIO + TRANSITIONS_HEIGHT);
- /* And change TrackElement-s priorities and check that changes are not
- * refected on it containing Clip
- * FIXME : We should rework the way we handle the case were a trackobject
- * prio is set outside the layer it is in.
- * ges_timeline_element_set_priority (GES_TIMELINE_ELEMENT (trackelement3),
- * ges_timeline_commit (timeline);
- * LAYER_HEIGHT * 2);
- * g_object_get (nleobj3, "priority", &prio3, NULL);
- * assert_equals_int (prio3, 2 * LAYER_HEIGHT);
- * assert_equals_int (_PRIORITY (clip3), LAYER_HEIGHT - 1); */
-
gst_object_unref (trackelement1);
gst_object_unref (trackelement2);
gst_object_unref (trackelement3);