ges: Namespace NLE utils function into GES

Avoiding name clashes when built statically
This commit is contained in:
Thibault Saunier 2015-09-18 10:01:44 +02:00
parent c8e9cf962c
commit 5a0393c54a
3 changed files with 15 additions and 15 deletions

View file

@ -380,8 +380,8 @@ G_GNUC_INTERNAL GESMultiFileURI * ges_multi_file_uri_new (const gchar * uri);
* Gnonlin helpers * * Gnonlin helpers *
********************/ ********************/
G_GNUC_INTERNAL gboolean nle_composition_add_object (GstElement *comp, GstElement *object); G_GNUC_INTERNAL gboolean ges_nle_composition_add_object (GstElement *comp, GstElement *object);
G_GNUC_INTERNAL gboolean nle_composition_remove_object (GstElement *comp, GstElement *object); G_GNUC_INTERNAL gboolean ges_nle_composition_remove_object (GstElement *comp, GstElement *object);
G_GNUC_INTERNAL gboolean nle_object_commit (GstElement * nlesource, gboolean recurse); G_GNUC_INTERNAL gboolean ges_nle_object_commit (GstElement * nlesource, gboolean recurse);
#endif /* __GES_INTERNAL_H__ */ #endif /* __GES_INTERNAL_H__ */

View file

@ -132,7 +132,7 @@ gap_new (GESTrack * track, GstClockTime start, GstClockTime duration)
return NULL; return NULL;
} }
if (G_UNLIKELY (nle_composition_add_object (track->priv->composition, if (G_UNLIKELY (ges_nle_composition_add_object (track->priv->composition,
nlesrc) == FALSE)) { nlesrc) == FALSE)) {
GST_WARNING_OBJECT (track, "Could not add gap to the composition"); GST_WARNING_OBJECT (track, "Could not add gap to the composition");
@ -171,7 +171,7 @@ free_gap (Gap * gap)
GST_DEBUG_OBJECT (track, "Removed gap with start %" GST_TIME_FORMAT GST_DEBUG_OBJECT (track, "Removed gap with start %" GST_TIME_FORMAT
" duration %" GST_TIME_FORMAT, GST_TIME_ARGS (gap->start), " duration %" GST_TIME_FORMAT, GST_TIME_ARGS (gap->start),
GST_TIME_ARGS (gap->duration)); GST_TIME_ARGS (gap->duration));
nle_composition_remove_object (track->priv->composition, gap->nleobj); ges_nle_composition_remove_object (track->priv->composition, gap->nleobj);
g_slice_free (Gap, gap); g_slice_free (Gap, gap);
} }
@ -363,7 +363,7 @@ remove_object_internal (GESTrack * track, GESTrackElement * object)
GST_DEBUG ("Removing NleObject '%s' from composition '%s'", GST_DEBUG ("Removing NleObject '%s' from composition '%s'",
GST_ELEMENT_NAME (nleobject), GST_ELEMENT_NAME (priv->composition)); GST_ELEMENT_NAME (nleobject), GST_ELEMENT_NAME (priv->composition));
if (!nle_composition_remove_object (priv->composition, nleobject)) { if (!ges_nle_composition_remove_object (priv->composition, nleobject)) {
GST_WARNING ("Failed to remove nleobject from composition"); GST_WARNING ("Failed to remove nleobject from composition");
return FALSE; return FALSE;
} }
@ -452,7 +452,7 @@ ges_track_dispose (GObject * object)
(GFunc) dispose_trackelements_foreach, track); (GFunc) dispose_trackelements_foreach, track);
g_sequence_free (priv->trackelements_by_start); g_sequence_free (priv->trackelements_by_start);
g_list_free_full (priv->gaps, (GDestroyNotify) free_gap); g_list_free_full (priv->gaps, (GDestroyNotify) free_gap);
nle_object_commit (track->priv->composition, TRUE); ges_nle_object_commit (track->priv->composition, TRUE);
if (priv->mixing_operation) if (priv->mixing_operation)
gst_object_unref (priv->mixing_operation); gst_object_unref (priv->mixing_operation);
@ -529,7 +529,7 @@ ges_track_constructed (GObject * object)
g_object_set (nleobject, "expandable", TRUE, NULL); g_object_set (nleobject, "expandable", TRUE, NULL);
if (self->priv->mixing) { if (self->priv->mixing) {
if (!nle_composition_add_object (self->priv->composition, nleobject)) { if (!ges_nle_composition_add_object (self->priv->composition, nleobject)) {
GST_WARNING_OBJECT (self, "Could not add the mixer to our composition"); GST_WARNING_OBJECT (self, "Could not add the mixer to our composition");
return; return;
@ -877,13 +877,13 @@ ges_track_set_mixing (GESTrack * track, gboolean mixing)
if (mixing) { if (mixing) {
/* increase ref count to hold the object */ /* increase ref count to hold the object */
gst_object_ref (track->priv->mixing_operation); gst_object_ref (track->priv->mixing_operation);
if (!nle_composition_add_object (track->priv->composition, if (!ges_nle_composition_add_object (track->priv->composition,
track->priv->mixing_operation)) { track->priv->mixing_operation)) {
GST_WARNING_OBJECT (track, "Could not add the mixer to our composition"); GST_WARNING_OBJECT (track, "Could not add the mixer to our composition");
return; return;
} }
} else { } else {
if (!nle_composition_remove_object (track->priv->composition, if (!ges_nle_composition_remove_object (track->priv->composition,
track->priv->mixing_operation)) { track->priv->mixing_operation)) {
GST_WARNING_OBJECT (track, GST_WARNING_OBJECT (track,
"Could not remove the mixer from our composition"); "Could not remove the mixer from our composition");
@ -931,7 +931,7 @@ ges_track_add_element (GESTrack * track, GESTrackElement * object)
GST_OBJECT_NAME (ges_track_element_get_nleobject (object)), GST_OBJECT_NAME (ges_track_element_get_nleobject (object)),
GST_OBJECT_NAME (track->priv->composition)); GST_OBJECT_NAME (track->priv->composition));
if (G_UNLIKELY (!nle_composition_add_object (track->priv->composition, if (G_UNLIKELY (!ges_nle_composition_add_object (track->priv->composition,
ges_track_element_get_nleobject (object)))) { ges_track_element_get_nleobject (object)))) {
GST_WARNING ("Couldn't add object to the NleComposition"); GST_WARNING ("Couldn't add object to the NleComposition");
return FALSE; return FALSE;
@ -1095,7 +1095,7 @@ ges_track_commit (GESTrack * track)
track_resort_and_fill_gaps (track); track_resort_and_fill_gaps (track);
return nle_object_commit (track->priv->composition, TRUE); return ges_nle_object_commit (track->priv->composition, TRUE);
} }

View file

@ -163,19 +163,19 @@ ges_get_compositor_factory (void)
} }
gboolean gboolean
nle_composition_add_object (GstElement * comp, GstElement * object) ges_nle_composition_add_object (GstElement * comp, GstElement * object)
{ {
return gst_bin_add (GST_BIN (comp), object); return gst_bin_add (GST_BIN (comp), object);
} }
gboolean gboolean
nle_composition_remove_object (GstElement * comp, GstElement * object) ges_nle_composition_remove_object (GstElement * comp, GstElement * object)
{ {
return gst_bin_remove (GST_BIN (comp), object); return gst_bin_remove (GST_BIN (comp), object);
} }
gboolean gboolean
nle_object_commit (GstElement * nlesource, gboolean recurse) ges_nle_object_commit (GstElement * nlesource, gboolean recurse)
{ {
gboolean ret; gboolean ret;