switch (mode) {
case GES_EDIT_MODE_NORMAL:
- timeline_move_object (timeline, object, layers, edge, position);
+ return timeline_move_object (timeline, object, layers, edge, position);
break;
case GES_EDIT_MODE_TRIM:
- timeline_trim_object (timeline, object, layers, edge, position);
+ return timeline_trim_object (timeline, object, layers, edge, position);
break;
case GES_EDIT_MODE_RIPPLE:
- timeline_ripple_object (timeline, object, layers, edge, position);
+ return timeline_ripple_object (timeline, object, layers, edge, position);
break;
case GES_EDIT_MODE_ROLL:
- timeline_roll_object (timeline, object, layers, edge, position);
+ return timeline_roll_object (timeline, object, layers, edge, position);
break;
case GES_EDIT_MODE_SLIDE:
- timeline_slide_object (timeline, object, layers, edge, position);
+ return timeline_slide_object (timeline, object, layers, edge, position);
break;
default:
GST_ERROR ("Unkown edit mode: %d", mode);
CHECK_OBJECT_PROPS (trackelement2, 62, 0, 60);
/* Make sure that not doing anything when not able to roll */
- fail_unless (ges_container_edit (clip, NULL, -1, GES_EDIT_MODE_ROLL,
- GES_EDGE_START, 65) == TRUE);
- fail_unless (ges_container_edit (clip1, NULL, -1, GES_EDIT_MODE_ROLL,
+ fail_if (ges_container_edit (clip1, NULL, -1, GES_EDIT_MODE_ROLL,
GES_EDGE_END, 65) == TRUE, 0);
CHECK_OBJECT_PROPS (trackelement, 25, 0, 37);
CHECK_OBJECT_PROPS (trackelement1, 20, 0, 5);
CHECK_OBJECT_PROPS (trackelement2, 62, 0, 60);
/* Snaping to edge, so no move */
- fail_unless (ges_container_edit (clip1, NULL, -1, GES_EDIT_MODE_TRIM,
- GES_EDGE_END, 27) == TRUE);
+ fail_if (ges_container_edit (clip1, NULL, -1, GES_EDIT_MODE_TRIM,
+ GES_EDGE_END, 27));
CHECK_OBJECT_PROPS (trackelement, 25, 0, 37);
CHECK_OBJECT_PROPS (trackelement1, 20, 0, 5);
CHECK_OBJECT_PROPS (trackelement2, 62, 0, 60);
GST_START_TEST (test_timeline_edition_mode)
{
- guint i;
GESTrack *track;
GESTimeline *timeline;
GESTrackElement *trackelement, *trackelement1, *trackelement2;
assert_equals_int (ges_layer_get_priority (layer), 2);
gst_object_unref (layer);
- /* Some more intensive roll testing */
- for (i = 0; i < 20; i++) {
- gint32 random = g_random_int_range (35, 94);
- guint64 tck3_inpoint = random - 35;
-
- fail_unless (ges_container_edit (clip, NULL, -1, GES_EDIT_MODE_ROLL,
- GES_EDGE_END, random) == TRUE);
- CHECK_OBJECT_PROPS (trackelement, 32, 5, random - 32);
- CHECK_OBJECT_PROPS (trackelement1, 20, 0, 10);
- CHECK_OBJECT_PROPS (trackelement2, random, tck3_inpoint, 95 - random);
- }
-
/* Roll end clip back to 35
* New timeline:
* ------------
CHECK_OBJECT_PROPS (trackelement2, 62, 0, 60);
/* Make sure that not doing anything when not able to roll */
- fail_unless (ges_container_edit (clip, NULL, -1, GES_EDIT_MODE_ROLL,
- GES_EDGE_START, 65) == TRUE);
- fail_unless (ges_container_edit (clip1, NULL, -1, GES_EDIT_MODE_ROLL,
- GES_EDGE_END, 65) == TRUE, 0);
+ fail_if (ges_container_edit (clip, NULL, -1, GES_EDIT_MODE_ROLL,
+ GES_EDGE_START, 65));
CHECK_OBJECT_PROPS (trackelement, 25, 0, 37);
CHECK_OBJECT_PROPS (trackelement1, 20, 0, 5);
CHECK_OBJECT_PROPS (trackelement2, 62, 0, 60);
/* Snaping to edge, so no move */
g_object_set (timeline, "snapping-distance", (guint64) 3, NULL);
- fail_unless (ges_container_edit (clip1, NULL, -1, GES_EDIT_MODE_TRIM,
- GES_EDGE_END, 27) == TRUE);
+ fail_if (ges_container_edit (clip1, NULL, -1, GES_EDIT_MODE_TRIM,
+ GES_EDGE_END, 27));
CHECK_OBJECT_PROPS (trackelement, 25, 0, 37);
CHECK_OBJECT_PROPS (trackelement1, 20, 0, 5);
CHECK_OBJECT_PROPS (trackelement2, 62, 0, 60);
/* Snaping to edge, so no move */
- fail_unless (ges_container_edit (clip1, NULL, -1, GES_EDIT_MODE_TRIM,
- GES_EDGE_END, 27) == TRUE);
+ fail_if (ges_container_edit (clip1, NULL, -1, GES_EDIT_MODE_TRIM,
+ GES_EDGE_END, 27));
CHECK_OBJECT_PROPS (trackelement, 25, 0, 37);
CHECK_OBJECT_PROPS (trackelement1, 20, 0, 5);