mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-18 14:26:43 +00:00
clip: Fix the spliting method
We should make sure that the newly created trackelement are inside a container when adding them to as this is needed for GESUriClip-s. Also do not try to set a child property on the TrackElement itself. https://bugzilla.gnome.org/show_bug.cgi?id=703152
This commit is contained in:
parent
e8b3eaf0f2
commit
c1451cf48c
3 changed files with 10 additions and 6 deletions
|
@ -1250,7 +1250,7 @@ ges_clip_split (GESClip * clip, guint64 position)
|
||||||
|
|
||||||
new_trackelement =
|
new_trackelement =
|
||||||
GES_TRACK_ELEMENT (ges_timeline_element_copy (GES_TIMELINE_ELEMENT
|
GES_TRACK_ELEMENT (ges_timeline_element_copy (GES_TIMELINE_ELEMENT
|
||||||
(trackelement), TRUE));
|
(trackelement), FALSE));
|
||||||
if (new_trackelement == NULL) {
|
if (new_trackelement == NULL) {
|
||||||
GST_WARNING_OBJECT (trackelement, "Could not create a copy");
|
GST_WARNING_OBJECT (trackelement, "Could not create a copy");
|
||||||
continue;
|
continue;
|
||||||
|
@ -1265,6 +1265,8 @@ ges_clip_split (GESClip * clip, guint64 position)
|
||||||
|
|
||||||
ges_container_add (GES_CONTAINER (new_object),
|
ges_container_add (GES_CONTAINER (new_object),
|
||||||
GES_TIMELINE_ELEMENT (new_trackelement));
|
GES_TIMELINE_ELEMENT (new_trackelement));
|
||||||
|
ges_track_element_copy_properties (GES_TIMELINE_ELEMENT (trackelement),
|
||||||
|
GES_TIMELINE_ELEMENT (new_trackelement));
|
||||||
}
|
}
|
||||||
|
|
||||||
return new_object;
|
return new_object;
|
||||||
|
|
|
@ -276,5 +276,7 @@ GList* ges_clip_create_track_elements (GESClip *clip, GESTrackType t
|
||||||
#define GNL_OBJECT_TRACK_ELEMENT_QUARK (g_quark_from_string ("gnl_object_track_element_quark"))
|
#define GNL_OBJECT_TRACK_ELEMENT_QUARK (g_quark_from_string ("gnl_object_track_element_quark"))
|
||||||
G_GNUC_INTERNAL gboolean ges_track_element_set_track (GESTrackElement * object, GESTrack * track);
|
G_GNUC_INTERNAL gboolean ges_track_element_set_track (GESTrackElement * object, GESTrack * track);
|
||||||
G_GNUC_INTERNAL guint32 _ges_track_element_get_layer_priority (GESTrackElement * element);
|
G_GNUC_INTERNAL guint32 _ges_track_element_get_layer_priority (GESTrackElement * element);
|
||||||
|
G_GNUC_INTERNAL void ges_track_element_copy_properties (GESTimelineElement * element,
|
||||||
|
GESTimelineElement * elementcopy);
|
||||||
|
|
||||||
#endif /* __GES_INTERNAL_H__ */
|
#endif /* __GES_INTERNAL_H__ */
|
||||||
|
|
|
@ -113,8 +113,6 @@ static gboolean _set_inpoint (GESTimelineElement * element,
|
||||||
static gboolean _set_duration (GESTimelineElement * element,
|
static gboolean _set_duration (GESTimelineElement * element,
|
||||||
GstClockTime duration);
|
GstClockTime duration);
|
||||||
static gboolean _set_priority (GESTimelineElement * element, guint32 priority);
|
static gboolean _set_priority (GESTimelineElement * element, guint32 priority);
|
||||||
static void _deep_copy (GESTimelineElement * element,
|
|
||||||
GESTimelineElement * copy);
|
|
||||||
|
|
||||||
static GParamSpec **default_list_children_properties (GESTrackElement * object,
|
static GParamSpec **default_list_children_properties (GESTrackElement * object,
|
||||||
guint * n_properties);
|
guint * n_properties);
|
||||||
|
@ -258,7 +256,7 @@ ges_track_element_class_init (GESTrackElementClass * klass)
|
||||||
element_class->set_duration = _set_duration;
|
element_class->set_duration = _set_duration;
|
||||||
element_class->set_inpoint = _set_inpoint;
|
element_class->set_inpoint = _set_inpoint;
|
||||||
element_class->set_priority = _set_priority;
|
element_class->set_priority = _set_priority;
|
||||||
element_class->deep_copy = _deep_copy;
|
element_class->deep_copy = ges_track_element_copy_properties;
|
||||||
|
|
||||||
klass->create_gnl_object = ges_track_element_create_gnl_object_func;
|
klass->create_gnl_object = ges_track_element_create_gnl_object_func;
|
||||||
/* There is no 'get_props_hashtable' default implementation */
|
/* There is no 'get_props_hashtable' default implementation */
|
||||||
|
@ -1251,7 +1249,8 @@ prop_hash_not_set:
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
_deep_copy (GESTimelineElement * element, GESTimelineElement * elementcopy)
|
ges_track_element_copy_properties (GESTimelineElement * element,
|
||||||
|
GESTimelineElement * elementcopy)
|
||||||
{
|
{
|
||||||
GParamSpec **specs;
|
GParamSpec **specs;
|
||||||
guint n, n_specs;
|
guint n, n_specs;
|
||||||
|
@ -1264,7 +1263,8 @@ _deep_copy (GESTimelineElement * element, GESTimelineElement * elementcopy)
|
||||||
&n_specs);
|
&n_specs);
|
||||||
for (n = 0; n < n_specs; ++n) {
|
for (n = 0; n < n_specs; ++n) {
|
||||||
g_value_init (&val, specs[n]->value_type);
|
g_value_init (&val, specs[n]->value_type);
|
||||||
g_object_get_property (G_OBJECT (element), specs[n]->name, &val);
|
ges_track_element_get_child_property_by_pspec (GES_TRACK_ELEMENT (element),
|
||||||
|
specs[n], &val);
|
||||||
ges_track_element_set_child_property_by_pspec (copy, specs[n], &val);
|
ges_track_element_set_child_property_by_pspec (copy, specs[n], &val);
|
||||||
g_value_unset (&val);
|
g_value_unset (&val);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue