Commit a3a4fb1a authored by Thibault Saunier's avatar Thibault Saunier 🌵

ges:validate: Allow setting keyframes using the clips directly

Part-of: <!204>
parent c834ce5b
......@@ -171,7 +171,19 @@ _ges_add_remove_keyframe_from_struct (GESTimeline * timeline,
GET_AND_CHECK ("timestamp", GST_TYPE_CLOCK_TIME, &timestamp, done);
element =
GES_TRACK_ELEMENT (ges_timeline_get_element (timeline, element_name));
(GESTrackElement *) ges_timeline_get_element (timeline, element_name);
if (GES_IS_CLIP (element)) {
GList *tmp;
for (tmp = GES_CONTAINER_CHILDREN (element); tmp; tmp = tmp->next) {
if (ges_timeline_element_lookup_child (tmp->data, property_name, NULL,
NULL)) {
gst_object_replace ((GstObject **) & element, tmp->data);
break;
}
}
}
if (!GES_IS_TRACK_ELEMENT (element)) {
*error =
......
......@@ -895,9 +895,21 @@ GES_START_VALIDATE_ACTION (_set_control_source)
TRY_GET ("interpolation-mode", G_TYPE_STRING, &interpolation_mode, NULL);
element =
GES_TRACK_ELEMENT (ges_timeline_get_element (timeline, element_name));
(GESTrackElement *) (ges_timeline_get_element (timeline, element_name));
if (GES_IS_CLIP (element)) {
GList *tmp;
for (tmp = GES_CONTAINER_CHILDREN (element); tmp; tmp = tmp->next) {
if (ges_timeline_element_lookup_child (tmp->data, property_name, NULL,
NULL)) {
gst_object_replace ((GstObject **) & element, tmp->data);
break;
}
}
}
REPORT_UNLESS (GES_IS_TRACK_ELEMENT (element), beach,
"Could not find element %s", element_name);
"Could not find track element element %s (got %" GST_PTR_FORMAT ")",
element_name, element);
if (!binding_type)
binding_type = g_strdup ("direct");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment