summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThibault Saunier <tsaunier@gnome.org>2014-08-15 15:48:14 +0200
committerThibault Saunier <tsaunier@gnome.org>2014-10-31 11:58:12 +0100
commit11f9c6e1080e70d9e1ee21d813b561cd636f1521 (patch)
treec1a9cd1f98f51179f3f4dba3adf793acc592421f
parentaa1ba05895de4cdc85320c60202a709bb5596bec (diff)
Cleanup import of GNL and rename gnl to nle for Non Linear Engine
Conflicts: ges/ges-track-element.c gnl/Makefile.am gnl/common Conflicts: ges/ges-internal.h ges/ges-track.c ges/ges-utils.c ges/nle/.gitignore ges/nle/gnlmarshal.list ges/nle/nle.h ges/nle/nlecomposition.c ges/nle/nlecomposition.h ges/nle/nleghostpad.c ges/nle/nleghostpad.h ges/nle/nleobject.c ges/nle/nleoperation.c ges/nle/nleoperation.h ges/nle/nlesource.c ges/nle/nlesource.h ges/nle/nletypes.h ges/nle/nleurisource.c ges/nle/nleurisource.h gnl/Makefile.am gnl/gnl.c gnl/gnl.h gnl/gnl/gnl.h gnl/gnl/gnlcomposition.c gnl/gnl/gnlcomposition.h gnl/gnl/gnlghostpad.c gnl/gnl/gnlghostpad.h gnl/gnl/gnlmarshal.list gnl/gnl/gnlobject.c gnl/gnl/gnloperation.c gnl/gnl/gnloperation.h gnl/gnl/gnlsource.c gnl/gnl/gnlsource.h gnl/gnl/gnltypes.h gnl/gnl/gnlurisource.c gnl/gnl/gnlurisource.h gnl/gnlcomposition.c gnl/gnlcomposition.h gnl/gnlghostpad.c gnl/gnlghostpad.h gnl/gnlmarshal.list gnl/gnlobject.c gnl/gnlobject.h gnl/gnloperation.c gnl/gnloperation.h gnl/gnlsource.c gnl/gnlsource.h gnl/gnltypes.h gnl/gnlurisource.c gnl/gnlurisource.h gnl/tests/check/gnl/common.c gnl/tests/check/gnl/common.h gnl/tests/check/gnl/complex.c gnl/tests/check/gnl/gnlcomposition.c gnl/tests/check/gnl/gnloperation.c gnl/tests/check/gnl/gnlsource.c gnl/tests/check/gnl/seek.c gnl/tests/check/gnl/simple.c tests/check/gnl/common.c tests/check/gnl/common.h tests/check/gnl/complex.c tests/check/gnl/gnlcomposition.c tests/check/gnl/gnloperation.c tests/check/gnl/gnlsource.c tests/check/gnl/seek.c tests/check/gnl/simple.c tests/check/nle/common.c tests/check/nle/common.h tests/check/nle/complex.c tests/check/nle/nlecomposition.c tests/check/nle/nleoperation.c tests/check/nle/nlesource.c tests/check/nle/seek.c tests/check/nle/simple.c
-rw-r--r--docs/libs/ges-sections.txt2
-rw-r--r--docs/random/design6
-rw-r--r--docs/random/lifecycle4
-rw-r--r--docs/random/scenarios22
-rw-r--r--ges/Makefile.am16
-rw-r--r--ges/ges-audio-source.c2
-rw-r--r--ges/ges-audio-transition.c4
-rw-r--r--ges/ges-clip.c8
-rw-r--r--ges/ges-clip.h8
-rw-r--r--ges/ges-internal.h13
-rw-r--r--ges/ges-layer.c8
-rw-r--r--ges/ges-layer.h2
-rw-r--r--ges/ges-operation.c2
-rw-r--r--ges/ges-source.c2
-rw-r--r--ges/ges-timeline.c8
-rw-r--r--ges/ges-track-element.c166
-rw-r--r--ges/ges-track-element.h18
-rw-r--r--ges/ges-track.c79
-rw-r--r--ges/ges-utils.c12
-rw-r--r--ges/ges-video-source.c2
-rw-r--r--ges/ges.c44
-rw-r--r--ges/nle/.gitignore8
-rw-r--r--ges/nle/gnlmarshal.list (renamed from gnl/gnlmarshal.list)0
-rw-r--r--ges/nle/nle.h (renamed from gnl/gnl.h)18
-rw-r--r--ges/nle/nlecomposition.c (renamed from gnl/gnlcomposition.c)660
-rw-r--r--ges/nle/nlecomposition.h (renamed from gnl/gnlcomposition.h)48
-rw-r--r--ges/nle/nleghostpad.c (renamed from gnl/gnlghostpad.c)120
-rw-r--r--ges/nle/nleghostpad.h (renamed from gnl/gnlghostpad.h)22
-rw-r--r--ges/nle/nleobject.c (renamed from gnl/gnlobject.c)217
-rw-r--r--ges/nle/nleobject.h170
-rw-r--r--ges/nle/nleoperation.c (renamed from gnl/gnloperation.c)174
-rw-r--r--ges/nle/nleoperation.h (renamed from gnl/gnloperation.h)50
-rw-r--r--ges/nle/nlesource.c (renamed from gnl/gnlsource.c)130
-rw-r--r--ges/nle/nlesource.h (renamed from gnl/gnlsource.h)50
-rw-r--r--ges/nle/nletypes.h (renamed from gnl/gnltypes.h)26
-rw-r--r--ges/nle/nleurisource.c (renamed from gnl/gnlurisource.c)68
-rw-r--r--ges/nle/nleurisource.h (renamed from gnl/gnlurisource.h)42
-rw-r--r--gnl/Makefile.am46
-rw-r--r--gnl/gnl.c60
-rw-r--r--gnl/gnlobject.h170
-rw-r--r--tests/check/Makefile.am11
-rw-r--r--tests/check/ges/backgroundsource.c40
-rw-r--r--tests/check/ges/clip.c52
-rw-r--r--tests/check/ges/effects.c24
-rw-r--r--tests/check/ges/layer.c68
-rw-r--r--tests/check/ges/overlays.c8
-rw-r--r--tests/check/ges/project.c8
-rw-r--r--tests/check/ges/test-utils.h10
-rw-r--r--tests/check/ges/titles.c8
-rw-r--r--tests/check/ges/transition.c8
-rw-r--r--tests/check/ges/uriclip.c16
-rw-r--r--tests/check/nle/common.c (renamed from tests/check/gnl/common.c)62
-rw-r--r--tests/check/nle/common.h (renamed from tests/check/gnl/common.h)11
-rw-r--r--tests/check/nle/complex.c (renamed from tests/check/gnl/complex.c)87
-rw-r--r--tests/check/nle/nlecomposition.c (renamed from tests/check/gnl/gnlcomposition.c)88
-rw-r--r--tests/check/nle/nleoperation.c (renamed from tests/check/gnl/gnloperation.c)83
-rw-r--r--tests/check/nle/nlesource.c (renamed from tests/check/gnl/gnlsource.c)37
-rw-r--r--tests/check/nle/seek.c (renamed from tests/check/gnl/seek.c)61
-rw-r--r--tests/check/nle/simple.c (renamed from tests/check/gnl/simple.c)60
-rw-r--r--tests/examples/transition.c8
60 files changed, 1599 insertions, 1658 deletions
diff --git a/docs/libs/ges-sections.txt b/docs/libs/ges-sections.txt
index 68a328dc..26b821af 100644
--- a/docs/libs/ges-sections.txt
+++ b/docs/libs/ges-sections.txt
@@ -130,7 +130,7 @@ GESTrackElement
GESTrackElementClass
ges_track_element_set_active
ges_track_element_get_track
-ges_track_element_get_gnlobject
+ges_track_element_get_nleobject
ges_track_element_get_element
ges_track_element_is_active
ges_track_element_lookup_child
diff --git a/docs/random/design b/docs/random/design
index 77f70a41..a9e2c193 100644
--- a/docs/random/design
+++ b/docs/random/design
@@ -342,7 +342,7 @@ Index of features:
GESTimelineObject, which proxies it to the relevant GESTrackObject.
Create a new GESTrack{Audio|Video}Compositing GstElement which will
- be put in each track as a priority 0 expandable GnlOperation.
+ be put in each track as a priority 0 expandable NleOperation.
That object will be able to figure out which
mixing/scaling/conversion elements to use at any given time by
inspecting:
@@ -392,11 +392,11 @@ Index of features:
through publically available APIs (GObject and GStreamer APIs).
The GESTrackObject for example has to duplicate exactly the same
- properties as GnlObject for no reason.
+ properties as NleObject for no reason.
Other properties are also expensive to re-compute and also become
non-MT-safe (like computing the exact 'tree' of objects at a
- certain position in a GnlComposition).
+ certain position in a NleComposition).
Merge the GES and GNonLin modules together into one single module,
and keep the same previous API for both for backward compatibility.
diff --git a/docs/random/lifecycle b/docs/random/lifecycle
index 5e0dbd55..3cd44aa6 100644
--- a/docs/random/lifecycle
+++ b/docs/random/lifecycle
@@ -12,7 +12,7 @@ ges_timeline_layer_add_object(layer, tlobj)
trobj = GESTimelineObject::create_track_objects
ges_track_add_object(TRACK, trobj)
ges_track_object_set_track(troj, TRACK)
- gnlobj = GESTrackObject::create_gnl_object
- ges_timeline_object_fill_track_object(tlobj, trobj, gnlobj)
+ nleobj = GESTrackObject::create_nle_object
+ ges_timeline_object_fill_track_object(tlobj, trobj, nleobj)
GESTimelineObject::fill_track_object
diff --git a/docs/random/scenarios b/docs/random/scenarios
index 9c808acc..61627846 100644
--- a/docs/random/scenarios
+++ b/docs/random/scenarios
@@ -37,7 +37,7 @@ SCENARIOS
==> ges_track_add_object (track, trackobject);
Set the track on the TrackObject
==> ges_track_object_set_track (track)
- The GESTrackObject can create the GnlObject
+ The GESTrackObject can create the NleObject
@@ -108,7 +108,7 @@ Methods
return ges_track_source_new();
* gboolean
- ges_timeline_object_fill_track_object (GESTimelineObject *tlo, GESTrackObject *tro, GstElement *gnlobj);
+ ges_timeline_object_fill_track_object (GESTimelineObject *tlo, GESTrackObject *tro, GstElement *nleobj);
* up to the implementation :)
@@ -120,8 +120,8 @@ Methods
* Set the track on the track_object
ges_track_object_set_track (object, track);
- * Add the GnlObject of the TrackObject to the composition
- gst_bin_add (track->composition, object->gnlobject);
+ * Add the NleObject of the TrackObject to the composition
+ gst_bin_add (track->composition, object->nleobject);
[ GESTrackObject ]
@@ -130,14 +130,14 @@ Methods
ges_track_object_set_track (GESTrackObject * object, GESTrack * track);
* Set the track field of the TrackObject
- * if no GnlObject is available yet:
- * Call the 'create_gnl_object' virtual method
+ * if no NleObject is available yet:
+ * Call the 'create_nle_object' virtual method
-* Virtual-method for GESTrackObject::create_gnl_object
+* Virtual-method for GESTrackObject::create_nle_object
- * Create a GnlObject of the proper type
- Ex : gnlobject = gst_element_factory_make("gnlsource", NULL);
- * Ask the TimelineObject to fill in the GnlObject
- => ges_timeline_object_fill_track_object (GESTimelineObject * tlo, GESTrackObject * tro, GstElement * gnlobj);
+ * Create a NleObject of the proper type
+ Ex : nleobject = gst_element_factory_make("nlesource", NULL);
+ * Ask the TimelineObject to fill in the NleObject
+ => ges_timeline_object_fill_track_object (GESTimelineObject * tlo, GESTrackObject * tro, GstElement * nleobj);
diff --git a/ges/Makefile.am b/ges/Makefile.am
index 5b341cea..d3b741e0 100644
--- a/ges/Makefile.am
+++ b/ges/Makefile.am
@@ -3,12 +3,19 @@ built_source_make =
lib_LTLIBRARIES = libges-@GST_API_VERSION@.la
+
EXTRA_libges_@GST_API_VERSION@_la_SOURCES = gesmarshal.list
CLEANFILES = $(BUILT_SOURCES) $(built_header_make) $(built_source_make) *.gcno *.gcda *.gcov *.gcov.out
libges_@GST_API_VERSION@_la_SOURCES = \
$(built_source_make) \
+ nle/nleobject.c \
+ nle/nlecomposition.c \
+ nle/nleghostpad.c \
+ nle/nleoperation.c \
+ nle/nlesource.c \
+ nle/nleurisource.c \
ges.c \
ges-enums.c \
ges-meta-container.c \
@@ -134,6 +141,15 @@ libges_@GST_API_VERSION@include_HEADERS = \
ges-version.h
noinst_HEADERS = \
+ nle/nle.h \
+ nle/nleobject.h \
+ nle/nlecomposition.h \
+ nle/nletypes.h \
+ nle/nleghostpad.h \
+ nle/nleoperation.h \
+ nle/nlesource.h \
+ nle/nletypes.h \
+ nle/nleurisource.h \
ges-internal.h \
ges-auto-transition.h \
gstframepositionner.h
diff --git a/ges/ges-audio-source.c b/ges/ges-audio-source.c
index 69fd209b..d782eb73 100644
--- a/ges/ges-audio-source.c
+++ b/ges/ges-audio-source.c
@@ -101,7 +101,7 @@ ges_audio_source_class_init (GESAudioSourceClass * klass)
g_type_class_add_private (klass, sizeof (GESAudioSourcePrivate));
- track_class->gnlobject_factorytype = "gnlsource";
+ track_class->nleobject_factorytype = "nlesource";
track_class->create_element = ges_audio_source_create_element;
audio_source_class->create_source = NULL;
}
diff --git a/ges/ges-audio-transition.c b/ges/ges-audio-transition.c
index 9c4dd39a..4b6dd7b9 100644
--- a/ges/ges-audio-transition.c
+++ b/ges/ges-audio-transition.c
@@ -254,12 +254,12 @@ ges_audio_transition_duration_changed (GESTrackElement * track_element,
guint64 duration)
{
GESAudioTransition *self;
- GstElement *gnlobj = ges_track_element_get_gnlobject (track_element);
+ GstElement *nleobj = ges_track_element_get_nleobject (track_element);
GstTimedValueControlSource *ta, *tb;
self = GES_AUDIO_TRANSITION (track_element);
- GST_INFO ("updating controller: gnlobj (%p)", gnlobj);
+ GST_INFO ("updating controller: nleobj (%p)", nleobj);
if (G_UNLIKELY ((!self->priv->a_control_source ||
!self->priv->b_control_source)))
diff --git a/ges/ges-clip.c b/ges/ges-clip.c
index fbe454e2..01cab842 100644
--- a/ges/ges-clip.c
+++ b/ges/ges-clip.c
@@ -92,10 +92,10 @@ _get_priority_range (GESContainer * container, guint32 * min_priority,
GESLayer *layer = GES_CLIP (container)->priv->layer;
if (layer) {
- *min_priority = layer->min_gnl_priority;
- *max_priority = layer->max_gnl_priority;
+ *min_priority = layer->min_nle_priority;
+ *max_priority = layer->max_nle_priority;
} else {
- *min_priority = MIN_GNL_PRIO;
+ *min_priority = MIN_NLE_PRIO;
*max_priority = G_MAXUINT32;
}
}
@@ -223,7 +223,7 @@ _set_priority (GESTimelineElement * element, guint32 priority)
for (tmp = container->children; tmp; tmp = g_list_next (tmp)) {
guint32 real_tck_prio;
GESTimelineElement *child = (GESTimelineElement *) tmp->data;
- gint off = _PRIORITY (child) - _PRIORITY (element) - MIN_GNL_PRIO;
+ gint off = _PRIORITY (child) - _PRIORITY (element) - MIN_NLE_PRIO;
if (off >= LAYER_HEIGHT)
off = 0;
diff --git a/ges/ges-clip.h b/ges/ges-clip.h
index c3985c23..e4a2b93e 100644
--- a/ges/ges-clip.h
+++ b/ges/ges-clip.h
@@ -43,18 +43,18 @@ typedef struct _GESClipPrivate GESClipPrivate;
* GESFillTrackElementFunc:
* @clip: the #GESClip controlling the track elements
* @track_element: the #GESTrackElement
- * @gnlobj: the GNonLin object that needs to be filled.
+ * @nleobj: the GNonLin object that needs to be filled.
*
* A function that will be called when the GNonLin object of a corresponding
* track element needs to be filled.
*
- * The implementer of this function shall add the proper #GstElement to @gnlobj
+ * The implementer of this function shall add the proper #GstElement to @nleobj
* using gst_bin_add().
*
- * Returns: TRUE if the implementer succesfully filled the @gnlobj, else #FALSE.
+ * Returns: TRUE if the implementer succesfully filled the @nleobj, else #FALSE.
*/
typedef gboolean (*GESFillTrackElementFunc) (GESClip *clip, GESTrackElement *track_element,
- GstElement *gnlobj);
+ GstElement *nleobj);
/**
* GESCreateTrackElementFunc:
diff --git a/ges/ges-internal.h b/ges/ges-internal.h
index 9e557e2e..e8a9c980 100644
--- a/ges/ges-internal.h
+++ b/ges/ges-internal.h
@@ -34,11 +34,11 @@
GST_DEBUG_CATEGORY_EXTERN (_ges_debug);
#define GST_CAT_DEFAULT _ges_debug
-/* The first 2 GNL priorities are used for:
+/* The first 2 NLE priorities are used for:
* 0- The Mixing element
* 1- The Gaps
*/
-#define MIN_GNL_PRIO 2
+#define MIN_NLE_PRIO 2
#define LAYER_HEIGHT 1000
#define _START(obj) GES_TIMELINE_ELEMENT_START (obj)
@@ -290,7 +290,7 @@ GList* ges_clip_create_track_elements (GESClip *clip, GESTrackType t
/****************************************************
* GESTrackElement *
****************************************************/
-#define GNL_OBJECT_TRACK_ELEMENT_QUARK (g_quark_from_string ("gnl_object_track_element_quark"))
+#define NLE_OBJECT_TRACK_ELEMENT_QUARK (g_quark_from_string ("nle_object_track_element_quark"))
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 void ges_track_element_copy_properties (GESTimelineElement * element,
@@ -327,4 +327,11 @@ typedef struct GESMultiFileURI
G_GNUC_INTERNAL GESMultiFileURI * ges_multi_file_uri_new (const gchar * uri);
+/********************
+ * Gnonlin helpers *
+ ********************/
+
+G_GNUC_INTERNAL gboolean nle_composition_add_object (GstElement *comp, GstElement *object);
+G_GNUC_INTERNAL gboolean nle_composition_remove_object (GstElement *comp, GstElement *object);
+
#endif /* __GES_INTERNAL_H__ */
diff --git a/ges/ges-layer.c b/ges/ges-layer.c
index 15583dda..48f562d6 100644
--- a/ges/ges-layer.c
+++ b/ges/ges-layer.c
@@ -209,8 +209,8 @@ ges_layer_init (GESLayer * self)
self->priv->priority = 0;
self->priv->auto_transition = FALSE;
- self->min_gnl_priority = MIN_GNL_PRIO;
- self->max_gnl_priority = LAYER_HEIGHT + MIN_GNL_PRIO;
+ self->min_nle_priority = MIN_NLE_PRIO;
+ self->max_nle_priority = LAYER_HEIGHT + MIN_NLE_PRIO;
_register_metas (self);
}
@@ -376,8 +376,8 @@ ges_layer_set_priority (GESLayer * layer, guint priority)
if (priority != layer->priv->priority) {
layer->priv->priority = priority;
- layer->min_gnl_priority = (priority * LAYER_HEIGHT) + MIN_GNL_PRIO;
- layer->max_gnl_priority = ((priority + 1) * LAYER_HEIGHT) + MIN_GNL_PRIO;
+ layer->min_nle_priority = (priority * LAYER_HEIGHT) + MIN_NLE_PRIO;
+ layer->max_nle_priority = ((priority + 1) * LAYER_HEIGHT) + MIN_NLE_PRIO;
ges_layer_resync_priorities (layer);
}
diff --git a/ges/ges-layer.h b/ges/ges-layer.h
index eff5a906..5fbf0bdd 100644
--- a/ges/ges-layer.h
+++ b/ges/ges-layer.h
@@ -57,7 +57,7 @@ struct _GESLayer {
GESTimeline *timeline;
/*< protected >*/
- guint32 min_gnl_priority, max_gnl_priority;
+ guint32 min_nle_priority, max_nle_priority;
GESLayerPrivate *priv;
diff --git a/ges/ges-operation.c b/ges/ges-operation.c
index 539b6941..c412fbef 100644
--- a/ges/ges-operation.c
+++ b/ges/ges-operation.c
@@ -42,7 +42,7 @@ ges_operation_class_init (GESOperationClass * klass)
g_type_class_add_private (klass, sizeof (GESOperationPrivate));
- track_class->gnlobject_factorytype = "gnloperation";
+ track_class->nleobject_factorytype = "nleoperation";
}
static void
diff --git a/ges/ges-source.c b/ges/ges-source.c
index 8ab2e32c..81d4ba25 100644
--- a/ges/ges-source.c
+++ b/ges/ges-source.c
@@ -129,7 +129,7 @@ ges_source_class_init (GESSourceClass * klass)
g_type_class_add_private (klass, sizeof (GESSourcePrivate));
- track_class->gnlobject_factorytype = "gnlsource";
+ track_class->nleobject_factorytype = "nlesource";
track_class->create_element = NULL;
}
diff --git a/ges/ges-timeline.c b/ges/ges-timeline.c
index 37c0f41f..686c9d20 100644
--- a/ges/ges-timeline.c
+++ b/ges/ges-timeline.c
@@ -331,7 +331,7 @@ ges_timeline_dispose (GObject * object)
/* FIXME: it should be possible to remove tracks before removing
* layers, but at the moment this creates a problem because the track
- * objects aren't notified that their gnlobjects have been destroyed.
+ * objects aren't notified that their nleobjects have been destroyed.
*/
while (tl->tracks)
@@ -379,7 +379,7 @@ ges_timeline_handle_message (GstBin * bin, GstMessage * message)
GstMessage *amessage = NULL;
const GstStructure *mstructure = gst_message_get_structure (message);
- if (gst_structure_has_name (mstructure, "GnlCompositionStartUpdate")) {
+ if (gst_structure_has_name (mstructure, "NleCompositionStartUpdate")) {
if (g_strcmp0 (gst_structure_get_string (mstructure, "reason"), "Seek")) {
GST_INFO_OBJECT (timeline,
"A composition is starting an update because of %s"
@@ -398,7 +398,7 @@ ges_timeline_handle_message (GstBin * bin, GstMessage * message)
}
GST_OBJECT_UNLOCK (timeline);
- } else if (gst_structure_has_name (mstructure, "GnlCompositionUpdateDone")) {
+ } else if (gst_structure_has_name (mstructure, "NleCompositionUpdateDone")) {
if (g_strcmp0 (gst_structure_get_string (mstructure, "reason"), "Seek")) {
GST_INFO_OBJECT (timeline,
"A composition is done updating because of %s"
@@ -3042,7 +3042,7 @@ ges_timeline_get_layers (GESTimeline * timeline)
* @timeline.
*
* When timing changes happen in a timeline, the changes are not
- * directly done inside GNL. This method needs to be called so any changes
+ * directly done inside NLE. This method needs to be called so any changes
* on a clip contained in the timeline actually happen at the media
* processing level.
*
diff --git a/ges/ges-track-element.c b/ges/ges-track-element.c
index 90b8092d..dbfe6567 100644
--- a/ges/ges-track-element.c
+++ b/ges/ges-track-element.c
@@ -44,15 +44,15 @@ struct _GESTrackElementPrivate
{
GESTrackType track_type;
- /* These fields are only used before the gnlobject is available */
+ /* These fields are only used before the nleobject is available */
guint64 pending_start;
guint64 pending_inpoint;
guint64 pending_duration;
guint32 pending_priority;
gboolean pending_active;
- GstElement *gnlobject; /* The GnlObject */
- GstElement *element; /* The element contained in the gnlobject (can be NULL) */
+ GstElement *nleobject; /* The NleObject */
+ GstElement *element; /* The element contained in the nleobject (can be NULL) */
/* We keep a link between properties name and elements internally
* The hashtable should look like
@@ -98,7 +98,7 @@ enum
static guint ges_track_element_signals[LAST_SIGNAL] = { 0 };
-static GstElement *ges_track_element_create_gnl_object_func (GESTrackElement *
+static GstElement *ges_track_element_create_nle_object_func (GESTrackElement *
object);
static void connect_properties_signals (GESTrackElement * object);
@@ -169,7 +169,7 @@ ges_track_element_dispose (GObject * object)
if (priv->bindings_hashtable)
g_hash_table_destroy (priv->bindings_hashtable);
- if (priv->gnlobject) {
+ if (priv->nleobject) {
GstState cstate;
if (priv->track != NULL) {
@@ -179,15 +179,15 @@ ges_track_element_dispose (GObject * object)
" reference\n"
"This problem may also be caused by a refcounting bug in"
" the application or GES itself.", object, priv->track);
- gst_element_get_state (priv->gnlobject, &cstate, NULL, 0);
+ gst_element_get_state (priv->nleobject, &cstate, NULL, 0);
if (cstate != GST_STATE_NULL)
- gst_element_set_state (priv->gnlobject, GST_STATE_NULL);
+ gst_element_set_state (priv->nleobject, GST_STATE_NULL);
}
- g_object_set_qdata (G_OBJECT (priv->gnlobject),
- GNL_OBJECT_TRACK_ELEMENT_QUARK, NULL);
- gst_object_unref (priv->gnlobject);
- priv->gnlobject = NULL;
+ g_object_set_qdata (G_OBJECT (priv->nleobject),
+ NLE_OBJECT_TRACK_ELEMENT_QUARK, NULL);
+ gst_object_unref (priv->nleobject);
+ priv->nleobject = NULL;
}
G_OBJECT_CLASS (ges_track_element_parent_class)->dispose (object);
@@ -258,7 +258,7 @@ ges_track_element_class_init (GESTrackElementClass * klass)
element_class->set_priority = _set_priority;
element_class->deep_copy = ges_track_element_copy_properties;
- klass->create_gnl_object = ges_track_element_create_gnl_object_func;
+ klass->create_nle_object = ges_track_element_create_nle_object_func;
klass->list_children_properties = default_list_children_properties;
}
@@ -272,7 +272,7 @@ ges_track_element_init (GESTrackElement * self)
priv->pending_start = 0;
priv->pending_inpoint = 0;
priv->pending_duration = GST_SECOND;
- priv->pending_priority = MIN_GNL_PRIO;
+ priv->pending_priority = MIN_NLE_PRIO;
priv->pending_active = TRUE;
priv->bindings_hashtable = g_hash_table_new_full (g_str_hash, g_str_equal,
g_free, NULL);
@@ -406,11 +406,11 @@ _set_start (GESTimelineElement * element, GstClockTime start)
{
GESTrackElement *object = GES_TRACK_ELEMENT (element);
- if (object->priv->gnlobject != NULL) {
+ if (object->priv->nleobject != NULL) {
if (G_UNLIKELY (start == _START (object)))
return FALSE;
- g_object_set (object->priv->gnlobject, "start", start, NULL);
+ g_object_set (object->priv->nleobject, "start", start, NULL);
} else
object->priv->pending_start = start;
@@ -422,12 +422,12 @@ _set_inpoint (GESTimelineElement * element, GstClockTime inpoint)
{
GESTrackElement *object = GES_TRACK_ELEMENT (element);
- if (object->priv->gnlobject != NULL) {
+ if (object->priv->nleobject != NULL) {
if (G_UNLIKELY (inpoint == _INPOINT (object)))
return FALSE;
- g_object_set (object->priv->gnlobject, "inpoint", inpoint, NULL);
+ g_object_set (object->priv->nleobject, "inpoint", inpoint, NULL);
} else
object->priv->pending_inpoint = inpoint;
@@ -446,11 +446,11 @@ _set_duration (GESTimelineElement * element, GstClockTime duration)
duration > _INPOINT (object) + _MAXDURATION (element))
duration = _MAXDURATION (element) - _INPOINT (object);
- if (priv->gnlobject != NULL) {
+ if (priv->nleobject != NULL) {
if (G_UNLIKELY (duration == _DURATION (object)))
return FALSE;
- g_object_set (priv->gnlobject, "duration", duration, NULL);
+ g_object_set (priv->nleobject, "duration", duration, NULL);
} else
priv->pending_duration = duration;
@@ -465,19 +465,19 @@ _set_priority (GESTimelineElement * element, guint32 priority)
{
GESTrackElement *object = GES_TRACK_ELEMENT (element);
- if (priority < MIN_GNL_PRIO) {
- GST_INFO_OBJECT (element, "Priority (%d) < MIN_GNL_PRIO, setting it to %d",
- priority, MIN_GNL_PRIO);
- priority = MIN_GNL_PRIO;
+ if (priority < MIN_NLE_PRIO) {
+ GST_INFO_OBJECT (element, "Priority (%d) < MIN_NLE_PRIO, setting it to %d",
+ priority, MIN_NLE_PRIO);
+ priority = MIN_NLE_PRIO;
}
GST_DEBUG ("object:%p, priority:%" G_GUINT32_FORMAT, object, priority);
- if (object->priv->gnlobject != NULL) {
+ if (object->priv->nleobject != NULL) {
if (G_UNLIKELY (priority == _PRIORITY (object)))
return FALSE;
- g_object_set (object->priv->gnlobject, "priority", priority, NULL);
+ g_object_set (object->priv->nleobject, "priority", priority, NULL);
} else
object->priv->pending_priority = priority;
@@ -501,11 +501,11 @@ ges_track_element_set_active (GESTrackElement * object, gboolean active)
GST_DEBUG_OBJECT (object, "object:%p, active:%d", object, active);
- if (object->priv->gnlobject != NULL) {
+ if (object->priv->nleobject != NULL) {
if (G_UNLIKELY (active == object->active))
return FALSE;
- g_object_set (object->priv->gnlobject, "active", active, NULL);
+ g_object_set (object->priv->nleobject, "active", active, NULL);
if (active != object->active) {
object->active = active;
@@ -564,29 +564,29 @@ connect_properties_signals (GESTrackElement * object)
(GHFunc) connect_signal, object);
}
-/* default 'create_gnl_object' virtual method implementation */
+/* default 'create_nle_object' virtual method implementation */
static GstElement *
-ges_track_element_create_gnl_object_func (GESTrackElement * self)
+ges_track_element_create_nle_object_func (GESTrackElement * self)
{
GESTrackElementClass *klass = NULL;
GstElement *child = NULL;
- GstElement *gnlobject;
+ GstElement *nleobject;
klass = GES_TRACK_ELEMENT_GET_CLASS (self);
- if (G_UNLIKELY (self->priv->gnlobject != NULL))
- goto already_have_gnlobject;
+ if (G_UNLIKELY (self->priv->nleobject != NULL))
+ goto already_have_nleobject;
- if (G_UNLIKELY (klass->gnlobject_factorytype == NULL))
- goto no_gnlfactory;
+ if (G_UNLIKELY (klass->nleobject_factorytype == NULL))
+ goto no_nlefactory;
- GST_DEBUG ("Creating a supporting gnlobject of type '%s'",
- klass->gnlobject_factorytype);
+ GST_DEBUG ("Creating a supporting nleobject of type '%s'",
+ klass->nleobject_factorytype);
- gnlobject = gst_element_factory_make (klass->gnlobject_factorytype, NULL);
+ nleobject = gst_element_factory_make (klass->nleobject_factorytype, NULL);
- if (G_UNLIKELY (gnlobject == NULL))
- goto no_gnlobject;
+ if (G_UNLIKELY (nleobject == NULL))
+ goto no_nleobject;
if (klass->create_element) {
GST_DEBUG ("Calling subclass 'create_element' vmethod");
@@ -595,97 +595,97 @@ ges_track_element_create_gnl_object_func (GESTrackElement * self)
if (G_UNLIKELY (!child))
goto child_failure;
- if (!gst_bin_add (GST_BIN (gnlobject), child))
+ if (!gst_bin_add (GST_BIN (nleobject), child))
goto add_failure;
- GST_DEBUG ("Succesfully got the element to put in the gnlobject");
+ GST_DEBUG ("Succesfully got the element to put in the nleobject");
self->priv->element = child;
}
GST_DEBUG ("done");
- return gnlobject;
+ return nleobject;
/* ERROR CASES */
-already_have_gnlobject:
+already_have_nleobject:
{
- GST_ERROR ("Already controlling a GnlObject %s",
- GST_ELEMENT_NAME (self->priv->gnlobject));
+ GST_ERROR ("Already controlling a NleObject %s",
+ GST_ELEMENT_NAME (self->priv->nleobject));
return NULL;
}
-no_gnlfactory:
+no_nlefactory:
{
- GST_ERROR ("No GESTrackElement::gnlobject_factorytype implementation!");
+ GST_ERROR ("No GESTrackElement::nleobject_factorytype implementation!");
return NULL;
}
-no_gnlobject:
+no_nleobject:
{
- GST_ERROR ("Error creating a gnlobject of type '%s'",
- klass->gnlobject_factorytype);
+ GST_ERROR ("Error creating a nleobject of type '%s'",
+ klass->nleobject_factorytype);
return NULL;
}
child_failure:
{
GST_ERROR ("create_element returned NULL");
- gst_object_unref (gnlobject);
+ gst_object_unref (nleobject);
return NULL;
}
add_failure:
{
- GST_ERROR ("Error adding the contents to the gnlobject");
+ GST_ERROR ("Error adding the contents to the nleobject");
gst_object_unref (child);
- gst_object_unref (gnlobject);
+ gst_object_unref (nleobject);
return NULL;
}
}
static gboolean
-ensure_gnl_object (GESTrackElement * object)
+ensure_nle_object (GESTrackElement * object)
{
GESTrackElementClass *class;
- GstElement *gnlobject;
+ GstElement *nleobject;
gboolean res = TRUE;
- if (object->priv->gnlobject && object->priv->valid)
+ if (object->priv->nleobject && object->priv->valid)
return FALSE;
- /* 1. Create the GnlObject */
- GST_DEBUG ("Creating GnlObject");
+ /* 1. Create the NleObject */
+ GST_DEBUG ("Creating NleObject");
class = GES_TRACK_ELEMENT_GET_CLASS (object);
- if (G_UNLIKELY (class->create_gnl_object == NULL)) {
- GST_ERROR ("No 'create_gnl_object' implementation !");
+ if (G_UNLIKELY (class->create_nle_object == NULL)) {
+ GST_ERROR ("No 'create_nle_object' implementation !");
goto done;
}
GST_DEBUG ("Calling virtual method");
- /* 2. Fill in the GnlObject */
- if (object->priv->gnlobject == NULL) {
+ /* 2. Fill in the NleObject */
+ if (object->priv->nleobject == NULL) {
- /* call the create_gnl_object virtual method */
- gnlobject = class->create_gnl_object (object);
+ /* call the create_nle_object virtual method */
+ nleobject = class->create_nle_object (object);
- if (G_UNLIKELY (gnlobject == NULL)) {
+ if (G_UNLIKELY (nleobject == NULL)) {
GST_ERROR
- ("'create_gnl_object' implementation returned TRUE but no GnlObject is available");
+ ("'create_nle_object' implementation returned TRUE but no NleObject is available");
goto done;
}
- GST_DEBUG_OBJECT (object, "Got a valid GnlObject, now filling it in");
+ GST_DEBUG_OBJECT (object, "Got a valid NleObject, now filling it in");
- object->priv->gnlobject = gst_object_ref (gnlobject);
- g_object_set_qdata (G_OBJECT (gnlobject), GNL_OBJECT_TRACK_ELEMENT_QUARK,
+ object->priv->nleobject = gst_object_ref (nleobject);
+ g_object_set_qdata (G_OBJECT (nleobject), NLE_OBJECT_TRACK_ELEMENT_QUARK,
object);
- /* Set some properties on the GnlObject */
- g_object_set (object->priv->gnlobject,
+ /* Set some properties on the NleObject */
+ g_object_set (object->priv->nleobject,
"duration", object->priv->pending_duration,
"start", object->priv->pending_start,
"inpoint", object->priv->pending_inpoint,
@@ -701,7 +701,7 @@ ensure_gnl_object (GESTrackElement * object)
if (object->priv->track != NULL)
- g_object_set (object->priv->gnlobject,
+ g_object_set (object->priv->nleobject,
"caps", ges_track_get_caps (object->priv->track), NULL);
}
@@ -881,12 +881,12 @@ ges_track_element_set_track (GESTrackElement * object, GESTrack * track)
object->priv->track = track;
if (object->priv->track) {
- /* If we already have a gnlobject, we just set its caps properly */
- if (object->priv->gnlobject) {
- g_object_set (object->priv->gnlobject,
+ /* If we already have a nleobject, we just set its caps properly */
+ if (object->priv->nleobject) {
+ g_object_set (object->priv->nleobject,
"caps", ges_track_get_caps (object->priv->track), NULL);
} else {
- ret = ensure_gnl_object (object);
+ ret = ensure_nle_object (object);
/* if we had pending control bindings, add them and free them */
if (ret && object->priv->pending_bindings) {
@@ -923,10 +923,10 @@ ges_track_element_get_bindings_hashtable (GESTrackElement * trackelement)
guint32
_ges_track_element_get_layer_priority (GESTrackElement * element)
{
- if (_PRIORITY (element) < LAYER_HEIGHT + MIN_GNL_PRIO)
+ if (_PRIORITY (element) < LAYER_HEIGHT + MIN_NLE_PRIO)
return 0;
- return (_PRIORITY (element) - MIN_GNL_PRIO) / LAYER_HEIGHT;
+ return (_PRIORITY (element) - MIN_NLE_PRIO) / LAYER_HEIGHT;
}
/**
@@ -947,7 +947,7 @@ ges_track_element_get_track (GESTrackElement * object)
}
/**
- * ges_track_element_get_gnlobject:
+ * ges_track_element_get_nleobject:
* @object: a #GESTrackElement
*
* Get the GNonLin object this object is controlling.
@@ -955,11 +955,11 @@ ges_track_element_get_track (GESTrackElement * object)
* Returns: (transfer none): the GNonLin object this object is controlling.
*/
GstElement *
-ges_track_element_get_gnlobject (GESTrackElement * object)
+ges_track_element_get_nleobject (GESTrackElement * object)
{
g_return_val_if_fail (GES_IS_TRACK_ELEMENT (object), NULL);
- return object->priv->gnlobject;
+ return object->priv->nleobject;
}
/**
@@ -993,7 +993,7 @@ ges_track_element_is_active (GESTrackElement * object)
{
g_return_val_if_fail (GES_IS_TRACK_ELEMENT (object), FALSE);
- if (G_UNLIKELY (object->priv->gnlobject == NULL))
+ if (G_UNLIKELY (object->priv->nleobject == NULL))
return object->priv->pending_active;
else
return object->active;
@@ -1449,7 +1449,7 @@ ges_track_element_copy_properties (GESTimelineElement * element,
GValue val = { 0 };
GESTrackElement *copy = GES_TRACK_ELEMENT (elementcopy);
- ensure_gnl_object (copy);
+ ensure_nle_object (copy);
specs =
ges_track_element_list_children_properties (GES_TRACK_ELEMENT (element),
&n_specs);
diff --git a/ges/ges-track-element.h b/ges/ges-track-element.h
index e03643d6..5f2cfb7c 100644
--- a/ges/ges-track-element.h
+++ b/ges/ges-track-element.h
@@ -71,17 +71,17 @@ struct _GESTrackElement {
/**
* GESTrackElementClass:
- * @gnlobject_factorytype: name of the GNonLin GStElementFactory type to use.
- * @create_gnl_object: method to create the GNonLin container object.
- * @create_element: method to return the GstElement to put in the gnlobject.
- * @active_changed: active property of gnlobject has changed
+ * @nleobject_factorytype: name of the GNonLin GStElementFactory type to use.
+ * @create_nle_object: method to create the GNonLin container object.
+ * @create_element: method to return the GstElement to put in the nleobject.
+ * @active_changed: active property of nleobject has changed
* @list_children_properties: method to get children properties that user could
* like to configure.
* The default implementation will create an object
- * of type @gnlobject_factorytype and call
+ * of type @nleobject_factorytype and call
* @create_element.
*
- * Subclasses can override the @create_gnl_object method to override what type
+ * Subclasses can override the @create_nle_object method to override what type
* of GNonLin object will be created.
*/
struct _GESTrackElementClass {
@@ -90,8 +90,8 @@ struct _GESTrackElementClass {
/*< public >*/
/* virtual methods for subclasses */
- const gchar *gnlobject_factorytype;
- GstElement* (*create_gnl_object) (GESTrackElement * object);
+ const gchar *nleobject_factorytype;
+ GstElement* (*create_nle_object) (GESTrackElement * object);
GstElement* (*create_element) (GESTrackElement * object);
void (*active_changed) (GESTrackElement *object, gboolean active);
@@ -117,7 +117,7 @@ GESTrackType ges_track_element_get_track_type (GESTrackElement * object);
void ges_track_element_set_track_type (GESTrackElement * object,
GESTrackType type);
-GstElement * ges_track_element_get_gnlobject (GESTrackElement * object);
+GstElement * ges_track_element_get_nleobject (GESTrackElement * object);
GstElement * ges_track_element_get_element (GESTrackElement * object);
diff --git a/ges/ges-track.c b/ges/ges-track.c
index d9296a48..cb17037a 100644
--- a/ges/ges-track.c
+++ b/ges/ges-track.c
@@ -25,8 +25,6 @@
* Corresponds to one output format (i.e. audio OR video).
*
* Contains the compatible TrackElement(s).
- *
- * Wraps GNonLin's 'gnlcomposition' element.
*/
#include "ges-internal.h"
@@ -43,7 +41,7 @@ G_DEFINE_TYPE_WITH_CODE (GESTrack, ges_track, GST_TYPE_BIN,
* of the gaps filled in the track */
typedef struct
{
- GstElement *gnlobj;
+ GstElement *nleobj;
GstClockTime start;
GstClockTime duration;
@@ -111,17 +109,17 @@ add_trackelement_to_list_foreach (GESTrackElement * trackelement, GList ** list)
static Gap *
gap_new (GESTrack * track, GstClockTime start, GstClockTime duration)
{
- GstElement *gnlsrc, *elem;
+ GstElement *nlesrc, *elem;
Gap *new_gap;
- gnlsrc = gst_element_factory_make ("gnlsource", NULL);
+ nlesrc = gst_element_factory_make ("nlesource", NULL);
elem = track->priv->create_element_for_gaps (track);
- if (G_UNLIKELY (gst_bin_add (GST_BIN (gnlsrc), elem) == FALSE)) {
+ if (G_UNLIKELY (gst_bin_add (GST_BIN (nlesrc), elem) == FALSE)) {
GST_WARNING_OBJECT (track, "Could not create gap filler");
- if (gnlsrc)
- gst_object_unref (gnlsrc);
+ if (nlesrc)
+ gst_object_unref (nlesrc);
if (elem)
gst_object_unref (elem);
@@ -129,12 +127,12 @@ gap_new (GESTrack * track, GstClockTime start, GstClockTime duration)
return NULL;
}
- if (G_UNLIKELY (gst_bin_add (GST_BIN (track->priv->composition),
- gnlsrc) == FALSE)) {
+ if (G_UNLIKELY (nle_composition_add_object (track->priv->composition,
+ nlesrc) == FALSE)) {
GST_WARNING_OBJECT (track, "Could not add gap to the composition");
- if (gnlsrc)
- gst_object_unref (gnlsrc);
+ if (nlesrc)
+ gst_object_unref (nlesrc);
if (elem)
gst_object_unref (elem);
@@ -146,10 +144,10 @@ gap_new (GESTrack * track, GstClockTime start, GstClockTime duration)
new_gap->start = start;
new_gap->duration = duration;
new_gap->track = track;
- new_gap->gnlobj = gst_object_ref (gnlsrc);
+ new_gap->nleobj = nlesrc;
- g_object_set (gnlsrc, "start", new_gap->start, "duration", new_gap->duration,
+ g_object_set (nlesrc, "start", new_gap->start, "duration", new_gap->duration,
"priority", 1, NULL);
GST_DEBUG_OBJECT (track,
@@ -168,9 +166,7 @@ free_gap (Gap * gap)
GST_DEBUG_OBJECT (track, "Removed gap with start %" GST_TIME_FORMAT
" duration %" GST_TIME_FORMAT, GST_TIME_ARGS (gap->start),
GST_TIME_ARGS (gap->duration));
- gst_bin_remove (GST_BIN (track->priv->composition), gap->gnlobj);
- gst_element_set_state (gap->gnlobj, GST_STATE_NULL);
- gst_object_unref (gap->gnlobj);
+ nle_composition_remove_object (track->priv->composition, gap->nleobj);
g_slice_free (Gap, gap);
}
@@ -258,7 +254,7 @@ sort_track_elements_cb (GESTrackElement * child,
}
static void
-pad_added_cb (GstElement * element, GstPad * pad, GESTrack * track)
+_ghost_nlecomposition_srcpad (GESTrack * track)
{
GESTrackPrivate *priv = track->priv;
GstPad *capsfilter_sink;
@@ -328,7 +324,7 @@ static gboolean
remove_object_internal (GESTrack * track, GESTrackElement * object)
{
GESTrackPrivate *priv;
- GstElement *gnlobject;
+ GstElement *nleobject;
GST_DEBUG_OBJECT (track, "object:%p", object);
@@ -339,16 +335,16 @@ remove_object_internal (GESTrack * track, GESTrackElement * object)
return FALSE;
}
- if ((gnlobject = ges_track_element_get_gnlobject (object))) {
- GST_DEBUG ("Removing GnlObject '%s' from composition '%s'",
- GST_ELEMENT_NAME (gnlobject), GST_ELEMENT_NAME (priv->composition));
+ if ((nleobject = ges_track_element_get_nleobject (object))) {
+ GST_DEBUG ("Removing NleObject '%s' from composition '%s'",
+ GST_ELEMENT_NAME (nleobject), GST_ELEMENT_NAME (priv->composition));
- if (!gst_bin_remove (GST_BIN (priv->composition), gnlobject)) {
- GST_WARNING ("Failed to remove gnlobject from composition");
+ if (!nle_composition_remove_object (priv->composition, nleobject)) {
+ GST_WARNING ("Failed to remove nleobject from composition");
return FALSE;
}
- gst_element_set_state (gnlobject, GST_STATE_NULL);
+ gst_element_set_state (nleobject, GST_STATE_NULL);
}
g_signal_handlers_disconnect_by_func (object, sort_track_elements_cb, NULL);
@@ -473,8 +469,9 @@ ges_track_constructed (GObject * object)
if (!gst_bin_add (GST_BIN (self), self->priv->capsfilter))
GST_ERROR ("Couldn't add capsfilter to bin !");
+ _ghost_nlecomposition_srcpad (self);
if (GES_TRACK_GET_CLASS (self)->get_mixing_element) {
- GstElement *gnlobject;
+ GstElement *nleobject;
GstElement *mixer = GES_TRACK_GET_CLASS (self)->get_mixing_element (self);
if (mixer == NULL) {
@@ -483,24 +480,24 @@ ges_track_constructed (GObject * object)
return;
}
- gnlobject = gst_element_factory_make ("gnloperation", "mixing-operation");
- if (!gst_bin_add (GST_BIN (gnlobject), mixer)) {
+ nleobject = gst_element_factory_make ("nleoperation", "mixing-operation");
+ if (!gst_bin_add (GST_BIN (nleobject), mixer)) {
GST_WARNING_OBJECT (self, "Could not add the mixer to our composition");
- gst_object_unref (gnlobject);
+ gst_object_unref (nleobject);
return;
}
- g_object_set (gnlobject, "expandable", TRUE, NULL);
+ g_object_set (nleobject, "expandable", TRUE, NULL);
if (self->priv->mixing) {
- if (!gst_bin_add (GST_BIN (self->priv->composition), gnlobject)) {
+ if (!nle_composition_add_object (self->priv->composition, nleobject)) {
GST_WARNING_OBJECT (self, "Could not add the mixer to our composition");
return;
}
}
- self->priv->mixing_operation = gst_object_ref (gnlobject);
+ self->priv->mixing_operation = gst_object_ref (nleobject);
} else {
GST_INFO_OBJECT (self, "No way to create a main mixer");
@@ -622,7 +619,7 @@ ges_track_init (GESTrack * self)
self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
GES_TYPE_TRACK, GESTrackPrivate);
- self->priv->composition = gst_element_factory_make ("gnlcomposition", NULL);
+ self->priv->composition = gst_element_factory_make ("nlecomposition", NULL);
self->priv->capsfilter = gst_element_factory_make ("capsfilter", NULL);
self->priv->updating = TRUE;
self->priv->trackelements_by_start = g_sequence_new (NULL);
@@ -788,13 +785,13 @@ ges_track_set_mixing (GESTrack * track, gboolean mixing)
if (mixing) {
/* increase ref count to hold the object */
gst_object_ref (track->priv->mixing_operation);
- if (!gst_bin_add (GST_BIN (track->priv->composition),
+ if (!nle_composition_add_object (track->priv->composition,
track->priv->mixing_operation)) {
GST_WARNING_OBJECT (track, "Could not add the mixer to our composition");
return;
}
} else {
- if (!gst_bin_remove (GST_BIN (track->priv->composition),
+ if (!nle_composition_remove_object (track->priv->composition,
track->priv->mixing_operation)) {
GST_WARNING_OBJECT (track,
"Could not remove the mixer from our composition");
@@ -839,12 +836,12 @@ ges_track_add_element (GESTrack * track, GESTrackElement * object)
}
GST_DEBUG ("Adding object %s to ourself %s",
- GST_OBJECT_NAME (ges_track_element_get_gnlobject (object)),
+ GST_OBJECT_NAME (ges_track_element_get_nleobject (object)),
GST_OBJECT_NAME (track->priv->composition));
- if (G_UNLIKELY (!gst_bin_add (GST_BIN (track->priv->composition),
- ges_track_element_get_gnlobject (object)))) {
- GST_WARNING ("Couldn't add object to the GnlComposition");
+ if (G_UNLIKELY (!nle_composition_add_object (track->priv->composition,
+ ges_track_element_get_nleobject (object)))) {
+ GST_WARNING ("Couldn't add object to the NleComposition");
return FALSE;
}
@@ -972,7 +969,7 @@ ges_track_get_timeline (GESTrack * track)
* ges_track_get_mixing:
* @track: a #GESTrack
*
- * Gets if the underlying #GnlComposition contains an expandable mixer.
+ * Gets if the underlying #NleComposition contains an expandable mixer.
*
* Returns: #True if there is a mixer, #False otherwise.
*/
@@ -992,7 +989,7 @@ ges_track_get_mixing (GESTrack * track)
* track.
*
* When timing changes happen in a timeline, the changes are not
- * directly done inside GNL. This method needs to be called so any changes
+ * directly done inside NLE. This method needs to be called so any changes
* on a clip contained in the timeline actually happen at the media
* processing level.
*
diff --git a/ges/ges-utils.c b/ges/ges-utils.c
index d9529e28..21eb5dc9 100644
--- a/ges/ges-utils.c
+++ b/ges/ges-utils.c
@@ -161,3 +161,15 @@ ges_get_compositor_factory (void)
return compositor_factory;
}
+
+gboolean
+nle_composition_add_object (GstElement * comp, GstElement * object)
+{
+ return gst_bin_add (GST_BIN (comp), object);
+}
+
+gboolean
+nle_composition_remove_object (GstElement * comp, GstElement * object)
+{
+ return gst_bin_remove (GST_BIN (comp), object);
+}
diff --git a/ges/ges-video-source.c b/ges/ges-video-source.c
index b24e5f73..9f33ced6 100644
--- a/ges/ges-video-source.c
+++ b/ges/ges-video-source.c
@@ -190,7 +190,7 @@ ges_video_source_class_init (GESVideoSourceClass * klass)
g_type_class_add_private (klass, sizeof (GESVideoSourcePrivate));
element_class->set_parent = _set_parent;
- track_class->gnlobject_factorytype = "gnlsource";
+ track_class->nleobject_factorytype = "nlesource";
track_class->create_element = ges_video_source_create_element;
video_source_class->create_source = NULL;
}
diff --git a/ges/ges.c b/ges/ges.c
index 71452d5f..0e5f63bd 100644
--- a/ges/ges.c
+++ b/ges/ges.c
@@ -21,6 +21,7 @@
#include <ges/ges.h>
#include "ges/gstframepositionner.h"
#include "ges-internal.h"
+#include "ges/nle/nle.h"
#define GES_GNONLIN_VERSION_NEEDED_MAJOR 1
#define GES_GNONLIN_VERSION_NEEDED_MINOR 2
@@ -30,25 +31,19 @@ GST_DEBUG_CATEGORY (_ges_debug);
static gboolean ges_initialized = FALSE;
-/**
- * SECTION:ges-common
- * @short_description: Initialization.
- */
-
-static gboolean
-ges_check_gnonlin_availability (void)
+struct _elements_entry
{
- gboolean ret = TRUE;
- if (!gst_registry_check_feature_version (gst_registry_get (),
- "gnlcomposition", GES_GNONLIN_VERSION_NEEDED_MAJOR,
- GES_GNONLIN_VERSION_NEEDED_MINOR, GES_GNONLIN_VERSION_NEEDED_MICRO)) {
- GST_ERROR ("GNonLin plugins not found, or not at least version %u.%u.%u",
- GES_GNONLIN_VERSION_NEEDED_MAJOR, GES_GNONLIN_VERSION_NEEDED_MINOR,
- GES_GNONLIN_VERSION_NEEDED_MICRO);
- ret = FALSE;
- }
- return ret;
-}
+ const gchar *name;
+ GType (*type) (void);
+};
+
+static struct _elements_entry _elements[] = {
+ {"nlesource", nle_source_get_type},
+ {"nlecomposition", nle_composition_get_type},
+ {"nleoperation", nle_operation_get_type},
+ {"nleurisource", nle_urisource_get_type},
+ {NULL, 0}
+};
/**
* ges_init:
@@ -61,6 +56,8 @@ ges_check_gnonlin_availability (void)
gboolean
ges_init (void)
{
+ gint i = 0;
+
/* initialize debugging category */
GST_DEBUG_CATEGORY_INIT (_ges_debug, "ges", GST_DEBUG_FG_YELLOW,
"GStreamer Editing Services");
@@ -92,14 +89,17 @@ ges_init (void)
ges_asset_cache_init ();
- /* check the gnonlin elements are available */
- if (!ges_check_gnonlin_availability ())
- return FALSE;
-
gst_element_register (NULL, "framepositionner", 0,
GST_TYPE_FRAME_POSITIONNER);
gst_element_register (NULL, "gespipeline", 0, GES_TYPE_PIPELINE);
+ for (; _elements[i].name; i++)
+ if (!(gst_element_register (NULL,
+ _elements[i].name, GST_RANK_NONE, (_elements[i].type) ())))
+ return FALSE;
+
+ nle_init_ghostpad_category ();
+
/* TODO: user-defined types? */
ges_initialized = TRUE;
diff --git a/ges/nle/.gitignore b/ges/nle/.gitignore
new file mode 100644
index 00000000..3ac440bf
--- /dev/null
+++ b/ges/nle/.gitignore
@@ -0,0 +1,8 @@
+Makefile
+Makefile.in
+*.o
+*.lo
+*.la
+.deps
+.libs
+nleversion.h
diff --git a/gnl/gnlmarshal.list b/ges/nle/gnlmarshal.list
index 67c63946..67c63946 100644
--- a/gnl/gnlmarshal.list
+++ b/ges/nle/gnlmarshal.list
diff --git a/gnl/gnl.h b/ges/nle/nle.h
index 303f4b1d..6e00eae4 100644
--- a/gnl/gnl.h
+++ b/ges/nle/nle.h
@@ -18,19 +18,19 @@
* Boston, MA 02110-1301, USA.
*/
-#ifndef __GNL_H__
-#define __GNL_H__
+#ifndef __NLE_H__
+#define __NLE_H__
#include <gst/gst.h>
-#include "gnltypes.h"
+#include "nletypes.h"
-#include "gnlobject.h"
-#include "gnlghostpad.h"
-#include "gnlsource.h"
-#include "gnlcomposition.h"
-#include "gnloperation.h"
+#include "nleobject.h"
+#include "nleghostpad.h"
+#include "nlesource.h"
+#include "nlecomposition.h"
+#include "nleoperation.h"
-#include "gnlurisource.h"
+#include "nleurisource.h"
#endif /* __GST_H__ */
diff --git a/gnl/gnlcomposition.c b/ges/nle/nlecomposition.c
index a0bed515..1dc76357 100644
--- a/gnl/gnlcomposition.c
+++ b/ges/nle/nlecomposition.c
@@ -24,28 +24,28 @@
#include "config.h"
#endif
-#include "gnl.h"
+#include "nle.h"
/**
- * SECTION:element-gnlcomposition
+ * SECTION:element-nlecomposition
*
- * A GnlComposition contains GnlObjects such as GnlSources and GnlOperations,
+ * A NleComposition contains NleObjects such as NleSources and NleOperations,
* and connects them dynamically to create a composition timeline.
*/
-static GstStaticPadTemplate gnl_composition_src_template =
+static GstStaticPadTemplate nle_composition_src_template =
GST_STATIC_PAD_TEMPLATE ("src",
GST_PAD_SRC,
GST_PAD_ALWAYS,
GST_STATIC_CAPS_ANY);
-GST_DEBUG_CATEGORY_STATIC (gnlcomposition_debug);
-#define GST_CAT_DEFAULT gnlcomposition_debug
+GST_DEBUG_CATEGORY_STATIC (nlecomposition_debug);
+#define GST_CAT_DEFAULT nlecomposition_debug
#define _do_init \
- GST_DEBUG_CATEGORY_INIT (gnlcomposition_debug,"gnlcomposition", GST_DEBUG_FG_BLUE | GST_DEBUG_BOLD, "GNonLin Composition");
-#define gnl_composition_parent_class parent_class
-G_DEFINE_TYPE_WITH_CODE (GnlComposition, gnl_composition, GNL_TYPE_OBJECT,
+ GST_DEBUG_CATEGORY_INIT (nlecomposition_debug,"nlecomposition", GST_DEBUG_FG_BLUE | GST_DEBUG_BOLD, "GNonLin Composition");
+#define nle_composition_parent_class parent_class
+G_DEFINE_TYPE_WITH_CODE (NleComposition, nle_composition, NLE_TYPE_OBJECT,
_do_init);
enum
@@ -55,13 +55,13 @@ enum
PROP_LAST,
};
-/* Properties from GnlObject */
+/* Properties from NleObject */
enum
{
- GNLOBJECT_PROP_START,
- GNLOBJECT_PROP_STOP,
- GNLOBJECT_PROP_DURATION,
- GNLOBJECT_PROP_LAST
+ NLEOBJECT_PROP_START,
+ NLEOBJECT_PROP_STOP,
+ NLEOBJECT_PROP_DURATION,
+ NLEOBJECT_PROP_LAST
};
enum
@@ -77,7 +77,7 @@ typedef enum
COMP_UPDATE_STACK_ON_COMMIT,
COMP_UPDATE_STACK_ON_EOS,
COMP_UPDATE_STACK_ON_SEEK
-} GnlUpdateStackReason;
+} NleUpdateStackReason;
static const char *UPDATE_PIPELINE_REASONS[] = {
"Initialize", "Commit", "EOS", "Seek"
@@ -85,30 +85,30 @@ static const char *UPDATE_PIPELINE_REASONS[] = {
typedef struct
{
- GnlComposition *comp;
+ NleComposition *comp;
GstEvent *event;
} SeekData;
typedef struct
{
- GnlComposition *comp;
- GnlObject *object;
+ NleComposition *comp;
+ NleObject *object;
} ChildIOData;
typedef struct
{
- GnlComposition *comp;
+ NleComposition *comp;
gint32 seqnum;
- GnlUpdateStackReason reason;
+ NleUpdateStackReason reason;
} UpdateCompositionData;
-struct _GnlCompositionPrivate
+struct _NleCompositionPrivate
{
gboolean dispose_has_run;
/*
- Sorted List of GnlObjects , ThreadSafe
+ Sorted List of NleObjects , ThreadSafe
objects_start : sorted by start-time then priority
objects_stop : sorted by stop-time then priority
objects_hash : contains all controlled objects
@@ -120,16 +120,16 @@ struct _GnlCompositionPrivate
GList *objects_stop;
GHashTable *objects_hash;
- /* List of GnlObject to be inserted or removed from the composition on the
+ /* List of NleObject to be inserted or removed from the composition on the
* next commit */
GHashTable *pending_io;
gulong ghosteventprobe;
- /* current stack, list of GnlObject* */
+ /* current stack, list of NleObject* */
GNode *current;
- /* List of GnlObject whose start/duration will be the same as the composition */
+ /* List of NleObject whose start/duration will be the same as the composition */
GList *expandables;
/*
@@ -150,9 +150,9 @@ struct _GnlCompositionPrivate
/*
OUR sync_handler on the child_bus
- We are called before gnl_object_sync_handler
+ We are called before nle_object_sync_handler
*/
- GstPadEventFunction gnl_event_pad_func;
+ GstPadEventFunction nle_event_pad_func;
gboolean send_stream_start;
GMainContext *mcontext;
@@ -185,88 +185,88 @@ struct _GnlCompositionPrivate
static guint _signals[LAST_SIGNAL] = { 0 };
-static GParamSpec *gnlobject_properties[GNLOBJECT_PROP_LAST];
+static GParamSpec *nleobject_properties[NLEOBJECT_PROP_LAST];
#define OBJECT_IN_ACTIVE_SEGMENT(comp,element) \
- ((GNL_OBJECT_START(element) < comp->priv->segment_stop) && \
- (GNL_OBJECT_STOP(element) >= comp->priv->segment_start))
+ ((NLE_OBJECT_START(element) < comp->priv->segment_stop) && \
+ (NLE_OBJECT_STOP(element) >= comp->priv->segment_start))
-static void gnl_composition_dispose (GObject * object);
-static void gnl_composition_finalize (GObject * object);
-static void gnl_composition_reset (GnlComposition * comp);
+static void nle_composition_dispose (GObject * object);
+static void nle_composition_finalize (GObject * object);
+static void nle_composition_reset (NleComposition * comp);
-static gboolean gnl_composition_add_object (GstBin * bin, GstElement * element);
+static gboolean nle_composition_add_object (GstBin * bin, GstElement * element);
static gboolean
-gnl_composition_remove_object (GstBin * bin, GstElement * element);
+nle_composition_remove_object (GstBin * bin, GstElement * element);
static GstStateChangeReturn
-gnl_composition_change_state (GstElement * element, GstStateChange transition);
+nle_composition_change_state (GstElement * element, GstStateChange transition);
-static inline void gnl_composition_reset_target_pad (GnlComposition * comp);
+static inline void nle_composition_reset_target_pad (NleComposition * comp);
static gboolean
-seek_handling (GnlComposition * comp, gint32 seqnum,
- GnlUpdateStackReason update_stack_reason);
-static gint objects_start_compare (GnlObject * a, GnlObject * b);
-static gint objects_stop_compare (GnlObject * a, GnlObject * b);
-static GstClockTime get_current_position (GnlComposition * comp);
+seek_handling (NleComposition * comp, gint32 seqnum,
+ NleUpdateStackReason update_stack_reason);
+static gint objects_start_compare (NleObject * a, NleObject * b);
+static gint objects_stop_compare (NleObject * a, NleObject * b);
+static GstClockTime get_current_position (NleComposition * comp);
-static gboolean update_pipeline (GnlComposition * comp,
+static gboolean update_pipeline (NleComposition * comp,
GstClockTime currenttime, gint32 seqnum,
- GnlUpdateStackReason update_stack_reason);
-static gboolean gnl_composition_commit_func (GnlObject * object,
+ NleUpdateStackReason update_stack_reason);
+static gboolean nle_composition_commit_func (NleObject * object,
gboolean recurse);
-static void update_start_stop_duration (GnlComposition * comp);
+static void update_start_stop_duration (NleComposition * comp);
static gboolean
-gnl_composition_event_handler (GstPad * ghostpad, GstObject * parent,
+nle_composition_event_handler (GstPad * ghostpad, GstObject * parent,
GstEvent * event);
-static void _relink_single_node (GnlComposition * comp, GNode * node,
+static void _relink_single_node (NleComposition * comp, GNode * node,
GstEvent * toplevel_seek);
static gboolean _update_pipeline_func (UpdateCompositionData * ucompo);
static gboolean _commit_func (UpdateCompositionData * ucompo);
-static GstEvent *get_new_seek_event (GnlComposition * comp, gboolean initial,
+static GstEvent *get_new_seek_event (NleComposition * comp, gboolean initial,
gboolean updatestoponly);
static gboolean
-_gnl_composition_add_object (GnlComposition * comp, GnlObject * object);
+_nle_composition_add_object (NleComposition * comp, NleObject * object);
static gboolean
-_gnl_composition_remove_object (GnlComposition * comp, GnlObject * object);
-static void _deactivate_stack (GnlComposition * comp,
+_nle_composition_remove_object (NleComposition * comp, NleObject * object);
+static void _deactivate_stack (NleComposition * comp,
gboolean flush_downstream);
-static gboolean _set_real_eos_seqnum_from_seek (GnlComposition * comp,
+static gboolean _set_real_eos_seqnum_from_seek (NleComposition * comp,
GstEvent * event);
-static gboolean _emit_commited_signal_func (GnlComposition * comp);
+static gboolean _emit_commited_signal_func (NleComposition * comp);
static void _restart_task (UpdateCompositionData * ucompo);
/* COMP_REAL_START: actual position to start current playback at. */
#define COMP_REAL_START(comp) \
- (MAX (comp->priv->segment->start, GNL_OBJECT_START (comp)))
+ (MAX (comp->priv->segment->start, NLE_OBJECT_START (comp)))
#define COMP_REAL_STOP(comp) \
(GST_CLOCK_TIME_IS_VALID (comp->priv->segment->stop) ? \
- (MIN (comp->priv->segment->stop, GNL_OBJECT_STOP (comp))) : \
- GNL_OBJECT_STOP (comp))
+ (MIN (comp->priv->segment->stop, NLE_OBJECT_STOP (comp))) : \
+ NLE_OBJECT_STOP (comp))
#define MAIN_CONTEXT_LOCK(comp) G_STMT_START { \
GST_LOG_OBJECT (comp, "Getting MAIN_CONTEXT_LOCK in thread %p", \
g_thread_self()); \
- g_mutex_lock(&((GnlComposition*)comp)->priv->mcontext_lock); \
+ g_mutex_lock(&((NleComposition*)comp)->priv->mcontext_lock); \
GST_LOG_OBJECT (comp, "Got MAIN_CONTEXT_LOCK in thread %p", \
g_thread_self()); \
} G_STMT_END
#define MAIN_CONTEXT_UNLOCK(comp) G_STMT_START { \
- g_mutex_unlock(&((GnlComposition*)comp)->priv->mcontext_lock); \
+ g_mutex_unlock(&((NleComposition*)comp)->priv->mcontext_lock); \
GST_LOG_OBJECT (comp, "Unlocked MAIN_CONTEXT_LOCK in thread %p", \
g_thread_self()); \
} G_STMT_END
-#define GET_TASK_LOCK(comp) (&(GNL_COMPOSITION(comp)->task_rec_lock))
+#define GET_TASK_LOCK(comp) (&(NLE_COMPOSITION(comp)->task_rec_lock))
static inline gboolean
-_have_to_flush_downstream (GnlUpdateStackReason update_reason)
+_have_to_flush_downstream (NleUpdateStackReason update_reason)
{
if (update_reason == COMP_UPDATE_STACK_ON_COMMIT ||
update_reason == COMP_UPDATE_STACK_ON_SEEK ||
@@ -277,7 +277,7 @@ _have_to_flush_downstream (GnlUpdateStackReason update_reason)
}
static void
-_assert_proper_thread (GnlComposition * comp)
+_assert_proper_thread (NleComposition * comp)
{
if (comp->task && gst_task_get_state (comp->task) != GST_TASK_STOPPED &&
g_thread_self () != comp->task->thread) {
@@ -294,7 +294,7 @@ _destroy_gsource (GSource * source)
}
static void
-_remove_all_update_sources (GnlComposition * comp)
+_remove_all_update_sources (NleComposition * comp)
{
MAIN_CONTEXT_LOCK (comp);
g_list_free_full (comp->priv->update_gsources,
@@ -304,7 +304,7 @@ _remove_all_update_sources (GnlComposition * comp)
}
static void
-_remove_all_seek_sources (GnlComposition * comp)
+_remove_all_seek_sources (NleComposition * comp)
{
MAIN_CONTEXT_LOCK (comp);
g_list_free_full (comp->priv->seek_gsources,
@@ -314,7 +314,7 @@ _remove_all_seek_sources (GnlComposition * comp)
}
static void
-iterate_main_context_func (GnlComposition * comp)
+iterate_main_context_func (NleComposition * comp)
{
if (comp->priv->running == FALSE) {
GST_DEBUG_OBJECT (comp, "Not running anymore");
@@ -326,7 +326,7 @@ iterate_main_context_func (GnlComposition * comp)
}
static void
-_start_task (GnlComposition * comp)
+_start_task (NleComposition * comp)
{
GstTask *task;
@@ -348,7 +348,7 @@ _start_task (GnlComposition * comp)
}
static gboolean
-_stop_task (GnlComposition * comp)
+_stop_task (NleComposition * comp)
{
gboolean res = TRUE;
GstTask *task;
@@ -403,13 +403,13 @@ join_failed:
}
static void
-_post_start_composition_update (GnlComposition * comp,
- gint32 seqnum, GnlUpdateStackReason reason)
+_post_start_composition_update (NleComposition * comp,
+ gint32 seqnum, NleUpdateStackReason reason)
{
GstMessage *msg;
msg = gst_message_new_element (GST_OBJECT (comp),
- gst_structure_new ("GnlCompositionStartUpdate",
+ gst_structure_new ("NleCompositionStartUpdate",
"reason", G_TYPE_STRING, UPDATE_PIPELINE_REASONS[reason], NULL));
gst_message_set_seqnum (msg, seqnum);
@@ -417,11 +417,11 @@ _post_start_composition_update (GnlComposition * comp,
}
static void
-_post_start_composition_update_done (GnlComposition * comp,
- gint32 seqnum, GnlUpdateStackReason reason)
+_post_start_composition_update_done (NleComposition * comp,
+ gint32 seqnum, NleUpdateStackReason reason)
{
GstMessage *msg = gst_message_new_element (GST_OBJECT (comp),
- gst_structure_new ("GnlCompositionUpdateDone",
+ gst_structure_new ("NleCompositionUpdateDone",
"reason", G_TYPE_STRING, UPDATE_PIPELINE_REASONS[reason],
NULL));
@@ -444,7 +444,7 @@ _seek_pipeline_func (SeekData * seekd)
GstSeekFlags flags;
GstSeekType cur_type, stop_type;
gint64 cur, stop;
- GnlCompositionPrivate *priv = seekd->comp->priv;
+ NleCompositionPrivate *priv = seekd->comp->priv;
gst_event_parse_seek (seekd->event, &rate, &format, &flags,
&cur_type, &cur, &stop_type, &stop);
@@ -461,11 +461,11 @@ _seek_pipeline_func (SeekData * seekd)
GST_DEBUG_OBJECT (seekd->comp, "Segment now has flags:%d",
priv->segment->flags);
- if (priv->segment->start >= GNL_OBJECT_STOP (seekd->comp)) {
+ if (priv->segment->start >= NLE_OBJECT_STOP (seekd->comp)) {
GST_INFO_OBJECT (seekd->comp,
"Start %" GST_TIME_FORMAT " > comp->stop: %" GST_TIME_FORMAT
" Not seeking", GST_TIME_ARGS (priv->segment->start),
- GST_TIME_ARGS (GNL_OBJECT_STOP (seekd->comp)));
+ GST_TIME_ARGS (NLE_OBJECT_STOP (seekd->comp)));
GST_FIXME_OBJECT (seekd->comp, "HANDLE error async!");
goto beach;
}
@@ -477,9 +477,9 @@ _seek_pipeline_func (SeekData * seekd)
/* Only crop segment start value if we don't have a default object */
if (priv->expandables == NULL)
priv->segment->start =
- MAX (priv->segment->start, GNL_OBJECT_START (seekd->comp));
+ MAX (priv->segment->start, NLE_OBJECT_START (seekd->comp));
priv->segment->stop =
- MIN (priv->segment->stop, GNL_OBJECT_STOP (seekd->comp));
+ MIN (priv->segment->stop, NLE_OBJECT_STOP (seekd->comp));
priv->next_base_time = 0;
@@ -494,11 +494,11 @@ beach:
}
static void
-_add_gsource (GnlComposition * comp, GSourceFunc func,
+_add_gsource (NleComposition * comp, GSourceFunc func,
gpointer data, GDestroyNotify destroy, gint priority)
{
GSource *source;
- GnlCompositionPrivate *priv = comp->priv;
+ NleCompositionPrivate *priv = comp->priv;
GST_INFO_OBJECT (comp, "Adding GSource for function: %s",
GST_DEBUG_FUNCPTR_NAME (func));
@@ -520,7 +520,7 @@ _add_gsource (GnlComposition * comp, GSourceFunc func,
}
static void
-_add_seek_gsource (GnlComposition * comp, GstEvent * event)
+_add_seek_gsource (NleComposition * comp, GstEvent * event)
{
SeekData *seekd = g_slice_new0 (SeekData);
@@ -537,13 +537,13 @@ _add_seek_gsource (GnlComposition * comp, GstEvent * event)
/* Must be called with OBJECTS_LOCK taken */
static void
-_process_pending_entries (GnlComposition * comp)
+_process_pending_entries (NleComposition * comp)
{
- GnlObject *object;
+ NleObject *object;
GHashTableIter iter;
gboolean deactivated_stack = FALSE;
- GnlCompositionPrivate *priv = comp->priv;
+ NleCompositionPrivate *priv = comp->priv;
g_hash_table_iter_init (&iter, priv->pending_io);
while (g_hash_table_iter_next (&iter, (gpointer *) & object, NULL)) {
@@ -556,9 +556,9 @@ _process_pending_entries (GnlComposition * comp)
_deactivate_stack (comp, TRUE);
}
- _gnl_composition_remove_object (comp, object);
+ _nle_composition_remove_object (comp, object);
} else {
- _gnl_composition_add_object (comp, object);
+ _nle_composition_add_object (comp, object);
}
}
@@ -567,27 +567,27 @@ _process_pending_entries (GnlComposition * comp)
static inline gboolean
-_commit_values (GnlComposition * comp)
+_commit_values (NleComposition * comp)
{
GList *tmp;
gboolean commited = FALSE;
- GnlCompositionPrivate *priv = comp->priv;
+ NleCompositionPrivate *priv = comp->priv;
for (tmp = priv->objects_start; tmp; tmp = tmp->next) {
- if (gnl_object_commit (tmp->data, TRUE))
+ if (nle_object_commit (tmp->data, TRUE))
commited = TRUE;
}
GST_DEBUG_OBJECT (comp, "Linking up commit vmethod");
- commited |= GNL_OBJECT_CLASS (parent_class)->commit (GNL_OBJECT (comp), TRUE);
+ commited |= NLE_OBJECT_CLASS (parent_class)->commit (NLE_OBJECT (comp), TRUE);
return commited;
}
static gboolean
-_commit_all_values (GnlComposition * comp)
+_commit_all_values (NleComposition * comp)
{
- GnlCompositionPrivate *priv = comp->priv;
+ NleCompositionPrivate *priv = comp->priv;
priv->next_base_time = 0;
GST_ERROR_OBJECT (comp, "Commiting state");
@@ -611,8 +611,8 @@ _commit_all_values (GnlComposition * comp)
static gboolean
_initialize_stack_func (UpdateCompositionData * ucompo)
{
- GnlComposition *comp = ucompo->comp;
- GnlCompositionPrivate *priv = comp->priv;
+ NleComposition *comp = ucompo->comp;
+ NleCompositionPrivate *priv = comp->priv;
_commit_all_values (comp);
@@ -639,11 +639,11 @@ _free_child_io_data (gpointer childio)
static gboolean
_remove_object_func (ChildIOData * childio)
{
- GnlComposition *comp = childio->comp;
- GnlObject *object = childio->object;
+ NleComposition *comp = childio->comp;
+ NleObject *object = childio->object;
- GnlCompositionPrivate *priv = comp->priv;
- GnlObject *in_pending_io;
+ NleCompositionPrivate *priv = comp->priv;
+ NleObject *in_pending_io;
in_pending_io = g_hash_table_lookup (priv->pending_io, object);
@@ -675,7 +675,7 @@ _remove_object_func (ChildIOData * childio)
}
static void
-_add_remove_object_gsource (GnlComposition * comp, GnlObject * object)
+_add_remove_object_gsource (NleComposition * comp, NleObject * object)
{
ChildIOData *childio = g_slice_new0 (ChildIOData);
@@ -691,10 +691,10 @@ _add_remove_object_gsource (GnlComposition * comp, GnlObject * object)
static gboolean
_add_object_func (ChildIOData * childio)
{
- GnlComposition *comp = childio->comp;
- GnlObject *object = childio->object;
- GnlCompositionPrivate *priv = comp->priv;
- GnlObject *in_pending_io;
+ NleComposition *comp = childio->comp;
+ NleObject *object = childio->object;
+ NleCompositionPrivate *priv = comp->priv;
+ NleObject *in_pending_io;
in_pending_io = g_hash_table_lookup (priv->pending_io, object);
@@ -719,7 +719,7 @@ _add_object_func (ChildIOData * childio)
}
static void
-_add_add_object_gsource (GnlComposition * comp, GnlObject * object)
+_add_add_object_gsource (NleComposition * comp, NleObject * object)
{
ChildIOData *childio = g_slice_new0 (ChildIOData);
@@ -739,8 +739,8 @@ _free_update_compo_data (gpointer updatepipelinedata)
}
static void
-_add_update_compo_gsource (GnlComposition * comp,
- GSourceFunc func, GnlUpdateStackReason reason)
+_add_update_compo_gsource (NleComposition * comp,
+ GSourceFunc func, NleUpdateStackReason reason)
{
UpdateCompositionData *ucompo = g_slice_new0 (UpdateCompositionData);
@@ -756,9 +756,9 @@ _add_update_compo_gsource (GnlComposition * comp,
}
static void
-gnl_composition_handle_message (GstBin * bin, GstMessage * message)
+nle_composition_handle_message (GstBin * bin, GstMessage * message)
{
- GnlComposition *comp = (GnlComposition *) bin;
+ NleComposition *comp = (NleComposition *) bin;
if (comp->priv->tearing_down_stack) {
if (GST_MESSAGE_TYPE (message) == GST_MESSAGE_ERROR) {
@@ -778,55 +778,55 @@ gnl_composition_handle_message (GstBin * bin, GstMessage * message)
}
static void
-gnl_composition_class_init (GnlCompositionClass * klass)
+nle_composition_class_init (NleCompositionClass * klass)
{
GObjectClass *gobject_class;
GstElementClass *gstelement_class;
GstBinClass *gstbin_class;
- GnlObjectClass *gnlobject_class;
+ NleObjectClass *nleobject_class;
gobject_class = (GObjectClass *) klass;
gstelement_class = (GstElementClass *) klass;
gstbin_class = (GstBinClass *) klass;
- gnlobject_class = (GnlObjectClass *) klass;
+ nleobject_class = (NleObjectClass *) klass;
- g_type_class_add_private (klass, sizeof (GnlCompositionPrivate));
+ g_type_class_add_private (klass, sizeof (NleCompositionPrivate));
gst_element_class_set_static_metadata (gstelement_class,
- "GNonLin Composition", "Filter/Editor", "Combines GNL objects",
+ "GNonLin Composition", "Filter/Editor", "Combines NLE objects",
"Wim Taymans <wim.taymans@gmail.com>, Edward Hervey <bilboed@bilboed.com>,"
" Mathieu Duponchelle <mathieu.duponchelle@opencreed.com>,"
" Thibault Saunier <tsaunier@gnome.org>");
- gobject_class->dispose = GST_DEBUG_FUNCPTR (gnl_composition_dispose);
- gobject_class->finalize = GST_DEBUG_FUNCPTR (gnl_composition_finalize);
+ gobject_class->dispose = GST_DEBUG_FUNCPTR (nle_composition_dispose);
+ gobject_class->finalize = GST_DEBUG_FUNCPTR (nle_composition_finalize);
- gstelement_class->change_state = gnl_composition_change_state;
+ gstelement_class->change_state = nle_composition_change_state;
- gstbin_class->add_element = GST_DEBUG_FUNCPTR (gnl_composition_add_object);
+ gstbin_class->add_element = GST_DEBUG_FUNCPTR (nle_composition_add_object);
gstbin_class->remove_element =
- GST_DEBUG_FUNCPTR (gnl_composition_remove_object);
+ GST_DEBUG_FUNCPTR (nle_composition_remove_object);
gstbin_class->handle_message =
- GST_DEBUG_FUNCPTR (gnl_composition_handle_message);
+ GST_DEBUG_FUNCPTR (nle_composition_handle_message);
gst_element_class_add_pad_template (gstelement_class,
- gst_static_pad_template_get (&gnl_composition_src_template));
+ gst_static_pad_template_get (&nle_composition_src_template));
- /* Get the paramspec of the GnlObject klass so we can do
+ /* Get the paramspec of the NleObject klass so we can do
* fast notifies */
- gnlobject_properties[GNLOBJECT_PROP_START] =
+ nleobject_properties[NLEOBJECT_PROP_START] =
g_object_class_find_property (gobject_class, "start");
- gnlobject_properties[GNLOBJECT_PROP_STOP] =
+ nleobject_properties[NLEOBJECT_PROP_STOP] =
g_object_class_find_property (gobject_class, "stop");
- gnlobject_properties[GNLOBJECT_PROP_DURATION] =
+ nleobject_properties[NLEOBJECT_PROP_DURATION] =
g_object_class_find_property (gobject_class, "duration");
/**
- * GnlComposition::commit
- * @comp: a #GnlComposition
- * @recurse: Whether to commit recursiverly into (GnlComposition) children of
+ * NleComposition::commit
+ * @comp: a #NleComposition
+ * @recurse: Whether to commit recursiverly into (NleComposition) children of
* @object. This is used in case we have composition inside
- * a gnlsource composition, telling it to commit the included
+ * a nlesource composition, telling it to commit the included
* composition state.
*
* Action signal to commit all the pending changes of the composition and
@@ -837,7 +837,7 @@ gnl_composition_class_init (GnlCompositionClass * klass)
*/
_signals[COMMIT_SIGNAL] = g_signal_new ("commit", G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
- G_STRUCT_OFFSET (GnlObjectClass, commit_signal_handler), NULL, NULL, NULL,
+ G_STRUCT_OFFSET (NleObjectClass, commit_signal_handler), NULL, NULL, NULL,
G_TYPE_BOOLEAN, 1, G_TYPE_BOOLEAN);
_signals[COMMITED_SIGNAL] =
@@ -845,7 +845,7 @@ gnl_composition_class_init (GnlCompositionClass * klass)
0, NULL, NULL, g_cclosure_marshal_generic, G_TYPE_NONE, 1,
G_TYPE_BOOLEAN);
- gnlobject_class->commit = gnl_composition_commit_func;
+ nleobject_class->commit = nle_composition_commit_func;
GST_DEBUG_FUNCPTR (_seek_pipeline_func);
GST_DEBUG_FUNCPTR (_remove_object_func);
@@ -857,15 +857,15 @@ gnl_composition_class_init (GnlCompositionClass * klass)
}
static void
-gnl_composition_init (GnlComposition * comp)
+nle_composition_init (NleComposition * comp)
{
- GnlCompositionPrivate *priv;
+ NleCompositionPrivate *priv;
- GST_OBJECT_FLAG_SET (comp, GNL_OBJECT_SOURCE);
- GST_OBJECT_FLAG_SET (comp, GNL_OBJECT_COMPOSITION);
+ GST_OBJECT_FLAG_SET (comp, NLE_OBJECT_SOURCE);
+ GST_OBJECT_FLAG_SET (comp, NLE_OBJECT_COMPOSITION);
- priv = G_TYPE_INSTANCE_GET_PRIVATE (comp, GNL_TYPE_COMPOSITION,
- GnlCompositionPrivate);
+ priv = G_TYPE_INSTANCE_GET_PRIVATE (comp, NLE_TYPE_COMPOSITION,
+ NleCompositionPrivate);
priv->objects_start = NULL;
priv->objects_stop = NULL;
@@ -887,19 +887,19 @@ gnl_composition_init (GnlComposition * comp)
priv->current_bin = gst_bin_new ("current-bin");
gst_bin_add (GST_BIN (comp), priv->current_bin);
- gnl_composition_reset (comp);
+ nle_composition_reset (comp);
- priv->gnl_event_pad_func = GST_PAD_EVENTFUNC (GNL_OBJECT_SRC (comp));
- gst_pad_set_event_function (GNL_OBJECT_SRC (comp),
- GST_DEBUG_FUNCPTR (gnl_composition_event_handler));
+ priv->nle_event_pad_func = GST_PAD_EVENTFUNC (NLE_OBJECT_SRC (comp));
+ gst_pad_set_event_function (NLE_OBJECT_SRC (comp),
+ GST_DEBUG_FUNCPTR (nle_composition_event_handler));
}
static void
-gnl_composition_dispose (GObject * object)
+nle_composition_dispose (GObject * object)
{
GList *iter;
- GnlComposition *comp = GNL_COMPOSITION (object);
- GnlCompositionPrivate *priv = comp->priv;
+ NleComposition *comp = NLE_COMPOSITION (object);
+ NleCompositionPrivate *priv = comp->priv;
if (priv->dispose_has_run)
return;
@@ -910,7 +910,7 @@ gnl_composition_dispose (GObject * object)
while (iter) {
GList *next = iter->next;
- _gnl_composition_remove_object (comp, iter->data);
+ _nle_composition_remove_object (comp, iter->data);
iter = next;
}
@@ -924,23 +924,23 @@ gnl_composition_dispose (GObject * object)
while (iter) {
GList *next = iter->next;
- _gnl_composition_remove_object (comp, iter->data);
+ _nle_composition_remove_object (comp, iter->data);
iter = next;
}
priv->expandables = NULL;
}
- gnl_composition_reset_target_pad (comp);
+ nle_composition_reset_target_pad (comp);
G_OBJECT_CLASS (parent_class)->dispose (object);
}
static void
-gnl_composition_finalize (GObject * object)
+nle_composition_finalize (GObject * object)
{
- GnlComposition *comp = GNL_COMPOSITION (object);
- GnlCompositionPrivate *priv = comp->priv;
+ NleComposition *comp = NLE_COMPOSITION (object);
+ NleCompositionPrivate *priv = comp->priv;
_assert_proper_thread (comp);
@@ -966,7 +966,7 @@ gnl_composition_finalize (GObject * object)
* composition duration and sends that on the bus.
*/
static inline void
-signal_duration_change (GnlComposition * comp)
+signal_duration_change (NleComposition * comp)
{
gst_element_post_message (GST_ELEMENT_CAST (comp),
gst_message_new_duration_changed (GST_OBJECT_CAST (comp)));
@@ -977,8 +977,8 @@ _remove_child (GValue * item, GValue * ret G_GNUC_UNUSED, GstBin * bin)
{
GstElement *child = g_value_get_object (item);
- if (GNL_IS_OPERATION (child))
- gnl_operation_hard_cleanup (GNL_OPERATION (child));
+ if (NLE_IS_OPERATION (child))
+ nle_operation_hard_cleanup (NLE_OPERATION (child));
gst_bin_remove (bin, child);
@@ -1003,9 +1003,9 @@ _empty_bin (GstBin * bin)
}
static void
-gnl_composition_reset (GnlComposition * comp)
+nle_composition_reset (NleComposition * comp)
{
- GnlCompositionPrivate *priv = comp->priv;
+ NleCompositionPrivate *priv = comp->priv;
GST_DEBUG_OBJECT (comp, "resetting");
@@ -1022,7 +1022,7 @@ gnl_composition_reset (GnlComposition * comp)
g_node_destroy (priv->current);
priv->current = NULL;
- gnl_composition_reset_target_pad (comp);
+ nle_composition_reset_target_pad (comp);
priv->initialized = FALSE;
priv->send_stream_start = TRUE;
@@ -1037,10 +1037,10 @@ gnl_composition_reset (GnlComposition * comp)
static GstPadProbeReturn
ghost_event_probe_handler (GstPad * ghostpad G_GNUC_UNUSED,
- GstPadProbeInfo * info, GnlComposition * comp)
+ GstPadProbeInfo * info, NleComposition * comp)
{
GstPadProbeReturn retval = GST_PAD_PROBE_OK;
- GnlCompositionPrivate *priv = comp->priv;
+ NleCompositionPrivate *priv = comp->priv;
GstEvent *event = GST_PAD_PROBE_INFO_EVENT (info);
GST_DEBUG_OBJECT (comp, "event: %s", GST_EVENT_TYPE_NAME (event));
@@ -1127,7 +1127,7 @@ ghost_event_probe_handler (GstPad * ghostpad G_GNUC_UNUSED,
ucompo.reason = COMP_UPDATE_STACK_ON_COMMIT;
ucompo.seqnum = seqnum;
- gst_pad_remove_probe (GNL_OBJECT_SRC (comp), priv->commited_probeid);
+ gst_pad_remove_probe (NLE_OBJECT_SRC (comp), priv->commited_probeid);
_restart_task (&ucompo);
}
@@ -1159,7 +1159,7 @@ ghost_event_probe_handler (GstPad * ghostpad G_GNUC_UNUSED,
}
static gint
-priority_comp (GnlObject * a, GnlObject * b)
+priority_comp (NleObject * a, NleObject * b)
{
if (a->priority < b->priority)
return -1;
@@ -1171,10 +1171,10 @@ priority_comp (GnlObject * a, GnlObject * b)
}
static inline gboolean
-have_to_update_pipeline (GnlComposition * comp,
- GnlUpdateStackReason update_stack_reason)
+have_to_update_pipeline (NleComposition * comp,
+ NleUpdateStackReason update_stack_reason)
{
- GnlCompositionPrivate *priv = comp->priv;
+ NleCompositionPrivate *priv = comp->priv;
if (update_stack_reason == COMP_UPDATE_STACK_ON_EOS)
return TRUE;
@@ -1196,9 +1196,9 @@ have_to_update_pipeline (GnlComposition * comp,
}
static gboolean
-gnl_composition_commit_func (GnlObject * object, gboolean recurse)
+nle_composition_commit_func (NleObject * object, gboolean recurse)
{
- _add_update_compo_gsource (GNL_COMPOSITION (object),
+ _add_update_compo_gsource (NLE_COMPOSITION (object),
(GSourceFunc) _commit_func, COMP_UPDATE_STACK_ON_COMMIT);
return TRUE;
@@ -1214,13 +1214,13 @@ gnl_composition_commit_func (GnlObject * object, gboolean recurse)
* before calling this function.
*/
static GstEvent *
-get_new_seek_event (GnlComposition * comp, gboolean initial,
+get_new_seek_event (NleComposition * comp, gboolean initial,
gboolean updatestoponly)
{
GstSeekFlags flags = GST_SEEK_FLAG_ACCURATE | GST_SEEK_FLAG_FLUSH;
gint64 start, stop;
GstSeekType starttype = GST_SEEK_TYPE_SET;
- GnlCompositionPrivate *priv = comp->priv;
+ NleCompositionPrivate *priv = comp->priv;
GST_DEBUG_OBJECT (comp, "initial:%d", initial);
/* remove the seek flag */
@@ -1258,15 +1258,15 @@ get_new_seek_event (GnlComposition * comp, gboolean initial,
/* OBJECTS LOCK must be taken when calling this ! */
static GstClockTime
-get_current_position (GnlComposition * comp)
+get_current_position (NleComposition * comp)
{
GstPad *pad;
- GnlObject *obj;
- GnlCompositionPrivate *priv = comp->priv;
+ NleObject *obj;
+ NleCompositionPrivate *priv = comp->priv;
gboolean res;
gint64 value = GST_CLOCK_TIME_NONE;
- GstPad *peer = gst_pad_get_peer (GNL_OBJECT (comp)->srcpad);
+ GstPad *peer = gst_pad_get_peer (NLE_OBJECT (comp)->srcpad);
/* Try querying position downstream */
@@ -1293,9 +1293,9 @@ get_current_position (GnlComposition * comp)
goto beach;
}
- obj = (GnlObject *) priv->current->data;
+ obj = (NleObject *) priv->current->data;
- pad = GNL_OBJECT_SRC (obj);
+ pad = NLE_OBJECT_SRC (obj);
res = gst_pad_query_position (pad, GST_FORMAT_TIME, &value);
if (G_UNLIKELY (res == FALSE)) {
@@ -1321,15 +1321,15 @@ beach:
static gboolean
update_base_time (GNode * node, GstClockTime * timestamp)
{
- if (GNL_IS_OPERATION (node->data))
- gnl_operation_update_base_time (GNL_OPERATION (node->data), *timestamp);
+ if (NLE_IS_OPERATION (node->data))
+ nle_operation_update_base_time (NLE_OPERATION (node->data), *timestamp);
return FALSE;
}
/* WITH OBJECTS LOCK TAKEN */
static void
-update_operations_base_time (GnlComposition * comp, gboolean reverse)
+update_operations_base_time (NleComposition * comp, gboolean reverse)
{
GstClockTime timestamp;
@@ -1344,12 +1344,12 @@ update_operations_base_time (GnlComposition * comp, gboolean reverse)
/* WITH OBJECTS LOCK TAKEN */
static gboolean
-_seek_current_stack (GnlComposition * comp, GstEvent * event,
+_seek_current_stack (NleComposition * comp, GstEvent * event,
gboolean flush_downstream)
{
gboolean res;
- GnlCompositionPrivate *priv = comp->priv;
- GstPad *peer = gst_pad_get_peer (GNL_OBJECT_SRC (comp));
+ NleCompositionPrivate *priv = comp->priv;
+ GstPad *peer = gst_pad_get_peer (NLE_OBJECT_SRC (comp));
GST_INFO_OBJECT (comp, "Seeking itself %" GST_PTR_FORMAT, event);
@@ -1379,8 +1379,8 @@ _seek_current_stack (GnlComposition * comp, GstEvent * event,
*/
static gboolean
-seek_handling (GnlComposition * comp, gint32 seqnum,
- GnlUpdateStackReason update_stack_reason)
+seek_handling (NleComposition * comp, gint32 seqnum,
+ NleUpdateStackReason update_stack_reason)
{
GST_DEBUG_OBJECT (comp, "Seek hanlding update pipeline reason: %s",
UPDATE_PIPELINE_REASONS[update_stack_reason]);
@@ -1408,11 +1408,11 @@ seek_handling (GnlComposition * comp, gint32 seqnum,
}
static gboolean
-gnl_composition_event_handler (GstPad * ghostpad, GstObject * parent,
+nle_composition_event_handler (GstPad * ghostpad, GstObject * parent,
GstEvent * event)
{
- GnlComposition *comp = (GnlComposition *) parent;
- GnlCompositionPrivate *priv = comp->priv;
+ NleComposition *comp = (NleComposition *) parent;
+ NleCompositionPrivate *priv = comp->priv;
gboolean res = TRUE;
GST_DEBUG_OBJECT (comp, "event type:%s", GST_EVENT_TYPE_NAME (event));
@@ -1508,10 +1508,10 @@ gnl_composition_event_handler (GstPad * ghostpad, GstObject * parent,
}
if (res) {
- GST_DEBUG_OBJECT (comp, "About to call gnl_event_pad_func: %p",
- priv->gnl_event_pad_func);
- res = priv->gnl_event_pad_func (GNL_OBJECT (comp)->srcpad, parent, event);
- GST_DEBUG_OBJECT (comp, "Done calling gnl_event_pad_func() %d", res);
+ GST_DEBUG_OBJECT (comp, "About to call nle_event_pad_func: %p",
+ priv->nle_event_pad_func);
+ res = priv->nle_event_pad_func (NLE_OBJECT (comp)->srcpad, parent, event);
+ GST_DEBUG_OBJECT (comp, "Done calling nle_event_pad_func() %d", res);
}
beach:
@@ -1519,34 +1519,34 @@ beach:
}
static inline void
-gnl_composition_reset_target_pad (GnlComposition * comp)
+nle_composition_reset_target_pad (NleComposition * comp)
{
- GnlCompositionPrivate *priv = comp->priv;
+ NleCompositionPrivate *priv = comp->priv;
GST_DEBUG_OBJECT (comp, "Removing ghostpad");
if (priv->ghosteventprobe) {
GstPad *target;
- target = gst_ghost_pad_get_target ((GstGhostPad *) GNL_OBJECT_SRC (comp));
+ target = gst_ghost_pad_get_target ((GstGhostPad *) NLE_OBJECT_SRC (comp));
if (target)
gst_pad_remove_probe (target, priv->ghosteventprobe);
priv->ghosteventprobe = 0;
}
- gnl_object_ghost_pad_set_target (GNL_OBJECT (comp),
- GNL_OBJECT_SRC (comp), NULL);
+ nle_object_ghost_pad_set_target (NLE_OBJECT (comp),
+ NLE_OBJECT_SRC (comp), NULL);
priv->send_stream_start = TRUE;
}
-/* gnl_composition_ghost_pad_set_target:
+/* nle_composition_ghost_pad_set_target:
* target: The target #GstPad. The refcount will be decremented (given to the ghostpad).
*/
static void
-gnl_composition_ghost_pad_set_target (GnlComposition * comp, GstPad * target)
+nle_composition_ghost_pad_set_target (NleComposition * comp, GstPad * target)
{
GstPad *ptarget;
- GnlCompositionPrivate *priv = comp->priv;
+ NleCompositionPrivate *priv = comp->priv;
if (target)
GST_DEBUG_OBJECT (comp, "target:%s:%s", GST_DEBUG_PAD_NAME (target));
@@ -1555,7 +1555,7 @@ gnl_composition_ghost_pad_set_target (GnlComposition * comp, GstPad * target)
ptarget =
- gst_ghost_pad_get_target (GST_GHOST_PAD (GNL_OBJECT (comp)->srcpad));
+ gst_ghost_pad_get_target (GST_GHOST_PAD (NLE_OBJECT (comp)->srcpad));
if (ptarget) {
gst_object_unref (ptarget);
@@ -1567,8 +1567,8 @@ gnl_composition_ghost_pad_set_target (GnlComposition * comp, GstPad * target)
}
/* Actually set the target */
- gnl_object_ghost_pad_set_target ((GnlObject *) comp,
- GNL_OBJECT (comp)->srcpad, target);
+ nle_object_ghost_pad_set_target ((NleObject *) comp,
+ NLE_OBJECT (comp)->srcpad, target);
if (target && (priv->ghosteventprobe == 0)) {
priv->ghosteventprobe =
@@ -1580,13 +1580,13 @@ gnl_composition_ghost_pad_set_target (GnlComposition * comp, GstPad * target)
}
static void
-refine_start_stop_in_region_above_priority (GnlComposition * composition,
+refine_start_stop_in_region_above_priority (NleComposition * composition,
GstClockTime timestamp, GstClockTime start,
GstClockTime stop,
GstClockTime * rstart, GstClockTime * rstop, guint32 priority)
{
GList *tmp;
- GnlObject *object;
+ NleObject *object;
GstClockTime nstart = start, nstop = stop;
GST_DEBUG_OBJECT (composition,
@@ -1595,7 +1595,7 @@ refine_start_stop_in_region_above_priority (GnlComposition * composition,
GST_TIME_ARGS (start), GST_TIME_ARGS (stop), priority);
for (tmp = composition->priv->objects_start; tmp; tmp = tmp->next) {
- object = (GnlObject *) tmp->data;
+ object = (NleObject *) tmp->data;
GST_LOG_OBJECT (object, "START %" GST_TIME_FORMAT "--%" GST_TIME_FORMAT,
GST_TIME_ARGS (object->start), GST_TIME_ARGS (object->stop));
@@ -1620,7 +1620,7 @@ refine_start_stop_in_region_above_priority (GnlComposition * composition,
}
for (tmp = composition->priv->objects_stop; tmp; tmp = tmp->next) {
- object = (GnlObject *) tmp->data;
+ object = (NleObject *) tmp->data;
GST_LOG_OBJECT (object, "STOP %" GST_TIME_FORMAT "--%" GST_TIME_FORMAT,
GST_TIME_ARGS (object->start), GST_TIME_ARGS (object->stop));
@@ -1668,12 +1668,12 @@ convert_list_to_tree (GList ** stack, GstClockTime * start,
guint nbsinks;
gboolean limit;
GList *tmp;
- GnlObject *object;
+ NleObject *object;
if (!stack || !*stack)
return NULL;
- object = (GnlObject *) (*stack)->data;
+ object = (NleObject *) (*stack)->data;
GST_DEBUG ("object:%s , *start:%" GST_TIME_FORMAT ", *stop:%"
GST_TIME_FORMAT " highprio:%d",
@@ -1695,7 +1695,7 @@ convert_list_to_tree (GList ** stack, GstClockTime * start,
*start = object->start;
}
- if (GNL_OBJECT_IS_SOURCE (object)) {
+ if (NLE_OBJECT_IS_SOURCE (object)) {
*stack = g_list_next (*stack);
/* update highest priority.
@@ -1707,8 +1707,8 @@ convert_list_to_tree (GList ** stack, GstClockTime * start,
goto beach;
} else {
- /* GnlOperation */
- GnlOperation *oper = (GnlOperation *) object;
+ /* NleOperation */
+ NleOperation *oper = (NleOperation *) object;
GST_LOG_OBJECT (oper, "operation, num_sinks:%d", oper->num_sinks);
@@ -1736,7 +1736,7 @@ beach:
/*
* get_stack_list:
- * @comp: The #GnlComposition
+ * @comp: The #NleComposition
* @timestamp: The #GstClockTime to look at
* @priority: The priority level to start looking from
* @activeonly: Only look for active elements if TRUE
@@ -1751,7 +1751,7 @@ beach:
* WITH OBJECTS LOCK TAKEN
*/
static GNode *
-get_stack_list (GnlComposition * comp, GstClockTime timestamp,
+get_stack_list (NleComposition * comp, GstClockTime timestamp,
guint32 priority, gboolean activeonly, GstClockTime * start,
GstClockTime * stop, guint * highprio)
{
@@ -1773,7 +1773,7 @@ get_stack_list (GnlComposition * comp, GstClockTime timestamp,
if (reverse) {
for (tmp = comp->priv->objects_stop; tmp; tmp = g_list_next (tmp)) {
- GnlObject *object = (GnlObject *) tmp->data;
+ NleObject *object = (NleObject *) tmp->data;
GST_LOG_OBJECT (object,
"start: %" GST_TIME_FORMAT ", stop:%" GST_TIME_FORMAT " , duration:%"
@@ -1789,8 +1789,8 @@ get_stack_list (GnlComposition * comp, GstClockTime timestamp,
GST_OBJECT_NAME (object));
stack = g_list_insert_sorted (stack, object,
(GCompareFunc) priority_comp);
- if (GNL_IS_OPERATION (object))
- gnl_operation_update_base_time (GNL_OPERATION (object), timestamp);
+ if (NLE_IS_OPERATION (object))
+ nle_operation_update_base_time (NLE_OPERATION (object), timestamp);
}
} else {
GST_LOG_OBJECT (comp, "too far, stopping iteration");
@@ -1800,7 +1800,7 @@ get_stack_list (GnlComposition * comp, GstClockTime timestamp,
}
} else {
for (tmp = comp->priv->objects_start; tmp; tmp = g_list_next (tmp)) {
- GnlObject *object = (GnlObject *) tmp->data;
+ NleObject *object = (NleObject *) tmp->data;
GST_LOG_OBJECT (object,
"start: %" GST_TIME_FORMAT " , stop:%" GST_TIME_FORMAT " , duration:%"
@@ -1816,8 +1816,8 @@ get_stack_list (GnlComposition * comp, GstClockTime timestamp,
GST_OBJECT_NAME (object));
stack = g_list_insert_sorted (stack, object,
(GCompareFunc) priority_comp);
- if (GNL_IS_OPERATION (object))
- gnl_operation_update_base_time (GNL_OPERATION (object), timestamp);
+ if (NLE_IS_OPERATION (object))
+ nle_operation_update_base_time (NLE_OPERATION (object), timestamp);
}
} else {
GST_LOG_OBJECT (comp, "too far, stopping iteration");
@@ -1828,14 +1828,14 @@ get_stack_list (GnlComposition * comp, GstClockTime timestamp,
}
/* Insert the expandables */
- if (G_LIKELY (timestamp < GNL_OBJECT_STOP (comp)))
+ if (G_LIKELY (timestamp < NLE_OBJECT_STOP (comp)))
for (tmp = comp->priv->expandables; tmp; tmp = tmp->next) {
GST_DEBUG_OBJECT (comp, "Adding expandable %s sorted to the list",
GST_OBJECT_NAME (tmp->data));
stack = g_list_insert_sorted (stack, tmp->data,
(GCompareFunc) priority_comp);
- if (GNL_IS_OPERATION (tmp->data))
- gnl_operation_update_base_time (GNL_OPERATION (tmp->data), timestamp);
+ if (NLE_IS_OPERATION (tmp->data))
+ nle_operation_update_base_time (NLE_OPERATION (tmp->data), timestamp);
}
/* convert that list to a stack */
@@ -1865,17 +1865,17 @@ get_stack_list (GnlComposition * comp, GstClockTime timestamp,
/*
* get_clean_toplevel_stack:
- * @comp: The #GnlComposition
+ * @comp: The #NleComposition
* @timestamp: The #GstClockTime to look at
* @stop_time: Pointer to a #GstClockTime for min stop time of returned stack
* @start_time: Pointer to a #GstClockTime for greatest start time of returned stack
*
- * Returns: The new current stack for the given #GnlComposition and @timestamp.
+ * Returns: The new current stack for the given #NleComposition and @timestamp.
*
* WITH OBJECTS LOCK TAKEN
*/
static GNode *
-get_clean_toplevel_stack (GnlComposition * comp, GstClockTime * timestamp,
+get_clean_toplevel_stack (NleComposition * comp, GstClockTime * timestamp,
GstClockTime * start_time, GstClockTime * stop_time)
{
GNode *stack = NULL;
@@ -1908,7 +1908,7 @@ get_clean_toplevel_stack (GnlComposition * comp, GstClockTime * timestamp,
GST_TIME_ARGS (start), GST_TIME_ARGS (stop));
if (stack) {
- guint32 top_priority = GNL_OBJECT_PRIORITY (stack->data);
+ guint32 top_priority = NLE_OBJECT_PRIORITY (stack->data);
/* Figure out if there's anything blocking us with smaller priority */
refine_start_stop_in_region_above_priority (comp, *timestamp, start,
@@ -1940,23 +1940,23 @@ get_clean_toplevel_stack (GnlComposition * comp, GstClockTime * timestamp,
static GstPadProbeReturn
_drop_all_cb (GstPad * pad G_GNUC_UNUSED,
- GstPadProbeInfo * info, GnlComposition * comp)
+ GstPadProbeInfo * info, NleComposition * comp)
{
return GST_PAD_PROBE_DROP;
}
/* Must be called with OBJECTS_LOCK taken */
static void
-_set_current_bin_to_ready (GnlComposition * comp, gboolean flush_downstream)
+_set_current_bin_to_ready (NleComposition * comp, gboolean flush_downstream)
{
gint probe_id = -1;
GstPad *ptarget = NULL;
- GnlCompositionPrivate *priv = comp->priv;
+ NleCompositionPrivate *priv = comp->priv;
GstEvent *flush_event;
comp->priv->tearing_down_stack = TRUE;
if (flush_downstream) {
- ptarget = gst_ghost_pad_get_target (GST_GHOST_PAD (GNL_OBJECT_SRC (comp)));
+ ptarget = gst_ghost_pad_get_target (GST_GHOST_PAD (NLE_OBJECT_SRC (comp)));
if (ptarget) {
/* Make sure that between the flush_start/flush_stop
@@ -1997,7 +1997,7 @@ _set_current_bin_to_ready (GnlComposition * comp, gboolean flush_downstream)
}
static gboolean
-_emit_commited_signal_func (GnlComposition * comp)
+_emit_commited_signal_func (NleComposition * comp)
{
GST_INFO_OBJECT (comp, "Emiting COMMITED now that the stack " "is ready");
@@ -2009,7 +2009,7 @@ _emit_commited_signal_func (GnlComposition * comp)
static void
_restart_task (UpdateCompositionData * ucompo)
{
- GnlComposition *comp = ucompo->comp;
+ NleComposition *comp = ucompo->comp;
GST_INFO_OBJECT (comp, "Restarting task! after %s DONE",
UPDATE_PIPELINE_REASONS[ucompo->reason]);
@@ -2027,7 +2027,7 @@ _restart_task (UpdateCompositionData * ucompo)
static gboolean
_is_ready_to_restart_task (UpdateCompositionData * ucompo, GstEvent * event)
{
- GnlComposition *comp = ucompo->comp;
+ NleComposition *comp = ucompo->comp;
if (GST_EVENT_TYPE (event) == GST_EVENT_CAPS ||
GST_EVENT_TYPE (event) == GST_EVENT_SEGMENT) {
@@ -2075,8 +2075,8 @@ static gboolean
_commit_func (UpdateCompositionData * ucompo)
{
GstClockTime curpos;
- GnlComposition *comp = ucompo->comp;
- GnlCompositionPrivate *priv = comp->priv;
+ NleComposition *comp = ucompo->comp;
+ NleCompositionPrivate *priv = comp->priv;
_post_start_composition_update (comp, ucompo->seqnum, ucompo->reason);
@@ -2085,7 +2085,7 @@ _commit_func (UpdateCompositionData * ucompo)
curpos = get_current_position (comp);
if (!_commit_all_values (comp)) {
- GST_DEUBG_OBJECT (comp, "Nothing to commit, leaving");
+ GST_DEBUG_OBJECT (comp, "Nothing to commit, leaving");
g_signal_emit (comp, _signals[COMMITED_SIGNAL], 0, FALSE);
_post_start_composition_update_done (comp, ucompo->seqnum, ucompo->reason);
@@ -2123,8 +2123,8 @@ static gboolean
_update_pipeline_func (UpdateCompositionData * ucompo)
{
gboolean reverse;
- GnlComposition *comp = ucompo->comp;
- GnlCompositionPrivate *priv = comp->priv;
+ NleComposition *comp = ucompo->comp;
+ NleCompositionPrivate *priv = comp->priv;
_post_start_composition_update (comp, ucompo->seqnum, ucompo->reason);
@@ -2149,16 +2149,16 @@ _update_pipeline_func (UpdateCompositionData * ucompo)
gint64 epos;
if (GST_CLOCK_TIME_IS_VALID (priv->segment->stop))
- epos = (MIN (priv->segment->stop, GNL_OBJECT_STOP (comp)));
+ epos = (MIN (priv->segment->stop, NLE_OBJECT_STOP (comp)));
else
- epos = GNL_OBJECT_STOP (comp);
+ epos = NLE_OBJECT_STOP (comp);
GST_LOG_OBJECT (comp, "Emitting segment done pos %" GST_TIME_FORMAT,
GST_TIME_ARGS (epos));
gst_element_post_message (GST_ELEMENT_CAST (comp),
gst_message_new_segment_done (GST_OBJECT (comp),
priv->segment->format, epos));
- gst_pad_push_event (GNL_OBJECT (comp)->srcpad,
+ gst_pad_push_event (NLE_OBJECT (comp)->srcpad,
gst_event_new_segment_done (priv->segment->format, epos));
}
@@ -2168,7 +2168,7 @@ _update_pipeline_func (UpdateCompositionData * ucompo)
}
static void
-_set_all_children_state (GnlComposition * comp, GstState state)
+_set_all_children_state (NleComposition * comp, GstState state)
{
GList *tmp;
@@ -2186,9 +2186,9 @@ _set_all_children_state (GnlComposition * comp, GstState state)
}
static GstStateChangeReturn
-gnl_composition_change_state (GstElement * element, GstStateChange transition)
+nle_composition_change_state (GstElement * element, GstStateChange transition)
{
- GnlComposition *comp = (GnlComposition *) element;
+ NleComposition *comp = (NleComposition *) element;
GST_DEBUG_OBJECT (comp, "%s => %s",
gst_element_state_get_name (GST_STATE_TRANSITION_CURRENT (transition)),
@@ -2212,7 +2212,7 @@ gnl_composition_change_state (GstElement * element, GstStateChange transition)
_remove_all_update_sources (comp);
_remove_all_seek_sources (comp);
_set_all_children_state (comp, GST_STATE_READY);
- gnl_composition_reset (comp);
+ nle_composition_reset (comp);
_start_task (comp);
break;
@@ -2231,7 +2231,7 @@ gnl_composition_change_state (GstElement * element, GstStateChange transition)
}
static gint
-objects_start_compare (GnlObject * a, GnlObject * b)
+objects_start_compare (NleObject * a, NleObject * b)
{
if (a->start == b->start) {
if (a->priority < b->priority)
@@ -2248,7 +2248,7 @@ objects_start_compare (GnlObject * a, GnlObject * b)
}
static gint
-objects_stop_compare (GnlObject * a, GnlObject * b)
+objects_stop_compare (NleObject * a, NleObject * b)
{
if (a->stop == b->stop) {
if (a->priority < b->priority)
@@ -2266,11 +2266,11 @@ objects_stop_compare (GnlObject * a, GnlObject * b)
/* WITH OBJECTS LOCK TAKEN */
static void
-update_start_stop_duration (GnlComposition * comp)
+update_start_stop_duration (NleComposition * comp)
{
- GnlObject *obj;
- GnlObject *cobj = (GnlObject *) comp;
- GnlCompositionPrivate *priv = comp->priv;
+ NleObject *obj;
+ NleObject *cobj = (NleObject *) comp;
+ NleCompositionPrivate *priv = comp->priv;
_assert_proper_thread (comp);
@@ -2280,20 +2280,20 @@ update_start_stop_duration (GnlComposition * comp)
if (cobj->start) {
cobj->start = cobj->pending_start = 0;
g_object_notify_by_pspec (G_OBJECT (cobj),
- gnlobject_properties[GNLOBJECT_PROP_START]);
+ nleobject_properties[NLEOBJECT_PROP_START]);
}
if (cobj->duration) {
cobj->pending_duration = cobj->duration = 0;
g_object_notify_by_pspec (G_OBJECT (cobj),
- gnlobject_properties[GNLOBJECT_PROP_DURATION]);
+ nleobject_properties[NLEOBJECT_PROP_DURATION]);
signal_duration_change (comp);
}
if (cobj->stop) {
cobj->stop = 0;
g_object_notify_by_pspec (G_OBJECT (cobj),
- gnlobject_properties[GNLOBJECT_PROP_STOP]);
+ nleobject_properties[NLEOBJECT_PROP_STOP]);
}
return;
@@ -2307,25 +2307,25 @@ update_start_stop_duration (GnlComposition * comp)
if (cobj->start != 0) {
cobj->pending_start = cobj->start = 0;
g_object_notify_by_pspec (G_OBJECT (cobj),
- gnlobject_properties[GNLOBJECT_PROP_START]);
+ nleobject_properties[NLEOBJECT_PROP_START]);
}
} else {
/* Else it's the first object's start value */
- obj = (GnlObject *) priv->objects_start->data;
+ obj = (NleObject *) priv->objects_start->data;
if (obj->start != cobj->start) {
GST_LOG_OBJECT (obj, "setting start from %s to %" GST_TIME_FORMAT,
GST_OBJECT_NAME (obj), GST_TIME_ARGS (obj->start));
cobj->pending_start = cobj->start = obj->start;
g_object_notify_by_pspec (G_OBJECT (cobj),
- gnlobject_properties[GNLOBJECT_PROP_START]);
+ nleobject_properties[NLEOBJECT_PROP_START]);
}
}
- obj = (GnlObject *) priv->objects_stop->data;
+ obj = (NleObject *) priv->objects_stop->data;
if (obj->stop != cobj->stop) {
GST_LOG_OBJECT (obj, "setting stop from %s to %" GST_TIME_FORMAT,
@@ -2337,20 +2337,20 @@ update_start_stop_duration (GnlComposition * comp)
GST_INFO_OBJECT (comp, "RE-setting all expandables duration and commit");
for (tmp = priv->expandables; tmp; tmp = tmp->next) {
g_object_set (tmp->data, "duration", obj->stop, NULL);
- gnl_object_commit (GNL_OBJECT (tmp->data), FALSE);
+ nle_object_commit (NLE_OBJECT (tmp->data), FALSE);
}
}
priv->segment->stop = obj->stop;
cobj->stop = obj->stop;
g_object_notify_by_pspec (G_OBJECT (cobj),
- gnlobject_properties[GNLOBJECT_PROP_STOP]);
+ nleobject_properties[NLEOBJECT_PROP_STOP]);
}
if ((cobj->stop - cobj->start) != cobj->duration) {
cobj->pending_duration = cobj->duration = cobj->stop - cobj->start;
g_object_notify_by_pspec (G_OBJECT (cobj),
- gnlobject_properties[GNLOBJECT_PROP_DURATION]);
+ nleobject_properties[NLEOBJECT_PROP_DURATION]);
signal_duration_change (comp);
}
@@ -2363,14 +2363,14 @@ update_start_stop_duration (GnlComposition * comp)
}
static inline gboolean
-_parent_or_priority_changed (GnlObject * obj, GNode * oldnode,
- GnlObject * newparent, GNode * node)
+_parent_or_priority_changed (NleObject * obj, GNode * oldnode,
+ NleObject * newparent, GNode * node)
{
- GnlObject *oldparent = NULL;
+ NleObject *oldparent = NULL;
if (oldnode)
oldparent =
- G_NODE_IS_ROOT (oldnode) ? NULL : (GnlObject *) oldnode->parent->data;
+ G_NODE_IS_ROOT (oldnode) ? NULL : (NleObject *) oldnode->parent->data;
if (oldparent != newparent)
return TRUE;
@@ -2382,8 +2382,8 @@ _parent_or_priority_changed (GnlObject * obj, GNode * oldnode,
}
static void
-_link_to_parent (GnlComposition * comp, GnlObject * newobj,
- GnlObject * newparent)
+_link_to_parent (NleComposition * comp, NleObject * newobj,
+ NleObject * newparent)
{
GstPad *sinkpad;
@@ -2392,17 +2392,17 @@ _link_to_parent (GnlComposition * comp, GnlObject * newobj,
GST_ELEMENT_NAME (GST_ELEMENT (newobj)),
GST_ELEMENT_NAME (GST_ELEMENT (newparent)));
- sinkpad = get_unlinked_sink_ghost_pad ((GnlOperation *) newparent);
+ sinkpad = get_unlinked_sink_ghost_pad ((NleOperation *) newparent);
if (G_UNLIKELY (sinkpad == NULL)) {
GST_WARNING_OBJECT (comp,
"Couldn't find an unlinked sinkpad from %s",
GST_ELEMENT_NAME (newparent));
} else {
- if (G_UNLIKELY (gst_pad_link_full (GNL_OBJECT_SRC (newobj), sinkpad,
+ if (G_UNLIKELY (gst_pad_link_full (NLE_OBJECT_SRC (newobj), sinkpad,
GST_PAD_LINK_CHECK_NOTHING) != GST_PAD_LINK_OK)) {
GST_WARNING_OBJECT (comp, "Failed to link pads %s:%s - %s:%s",
- GST_DEBUG_PAD_NAME (GNL_OBJECT_SRC (newobj)),
+ GST_DEBUG_PAD_NAME (NLE_OBJECT_SRC (newobj)),
GST_DEBUG_PAD_NAME (sinkpad));
}
gst_object_unref (sinkpad);
@@ -2410,12 +2410,12 @@ _link_to_parent (GnlComposition * comp, GnlObject * newobj,
}
static void
-_relink_children_recursively (GnlComposition * comp,
- GnlObject * newobj, GNode * node, GstEvent * toplevel_seek)
+_relink_children_recursively (NleComposition * comp,
+ NleObject * newobj, GNode * node, GstEvent * toplevel_seek)
{
GNode *child;
guint nbchildren = g_node_n_children (node);
- GnlOperation *oper = (GnlOperation *) newobj;
+ NleOperation *oper = (NleOperation *) newobj;
GST_INFO_OBJECT (newobj, "is a %s operation, analyzing the %d children",
oper->dynamicsinks ? "dynamic" : "regular", nbchildren);
@@ -2446,29 +2446,29 @@ _relink_children_recursively (GnlComposition * comp,
* WITH OBJECTS LOCK TAKEN
*/
static void
-_relink_single_node (GnlComposition * comp, GNode * node,
+_relink_single_node (NleComposition * comp, GNode * node,
GstEvent * toplevel_seek)
{
- GnlObject *newobj;
- GnlObject *newparent;
+ NleObject *newobj;
+ NleObject *newparent;
GstPad *srcpad = NULL, *sinkpad = NULL;
GstEvent *translated_seek;
if (G_UNLIKELY (!node))
return;
- newparent = G_NODE_IS_ROOT (node) ? NULL : (GnlObject *) node->parent->data;
- newobj = (GnlObject *) node->data;
+ newparent = G_NODE_IS_ROOT (node) ? NULL : (NleObject *) node->parent->data;
+ newobj = (NleObject *) node->data;
GST_DEBUG_OBJECT (comp, "newobj:%s",
GST_ELEMENT_NAME ((GstElement *) newobj));
- srcpad = GNL_OBJECT_SRC (newobj);
+ srcpad = NLE_OBJECT_SRC (newobj);
gst_bin_add (GST_BIN (comp->priv->current_bin), gst_object_ref (newobj));
gst_element_sync_state_with_parent (GST_ELEMENT_CAST (newobj));
- translated_seek = gnl_object_translate_incoming_seek (newobj, toplevel_seek);
+ translated_seek = nle_object_translate_incoming_seek (newobj, toplevel_seek);
gst_element_send_event (GST_ELEMENT (newobj), translated_seek);
@@ -2478,13 +2478,13 @@ _relink_single_node (GnlComposition * comp, GNode * node,
/* If there's an operation, inform it about priority changes */
sinkpad = gst_pad_get_peer (srcpad);
- gnl_operation_signal_input_priority_changed ((GnlOperation *)
+ nle_operation_signal_input_priority_changed ((NleOperation *)
newparent, sinkpad, newobj->priority);
gst_object_unref (sinkpad);
}
/* Handle children */
- if (GNL_IS_OPERATION (newobj))
+ if (NLE_IS_OPERATION (newobj))
_relink_children_recursively (comp, newobj, node, toplevel_seek);
GST_LOG_OBJECT (comp, "done with object %s",
@@ -2495,7 +2495,7 @@ _relink_single_node (GnlComposition * comp, GNode * node,
/*
* compare_relink_stack:
- * @comp: The #GnlComposition
+ * @comp: The #NleComposition
* @stack: The new stack
* @modify: TRUE if the timeline has changed and needs downstream flushes.
*
@@ -2503,17 +2503,17 @@ _relink_single_node (GnlComposition * comp, GNode * node,
*
* WITH OBJECTS LOCK TAKEN
*
- * Returns: The #GList of #GnlObject no longer used
+ * Returns: The #GList of #NleObject no longer used
*/
static void
-_deactivate_stack (GnlComposition * comp, gboolean flush_downstream)
+_deactivate_stack (NleComposition * comp, gboolean flush_downstream)
{
GstPad *ptarget;
_set_current_bin_to_ready (comp, flush_downstream);
- ptarget = gst_ghost_pad_get_target (GST_GHOST_PAD (GNL_OBJECT_SRC (comp)));
+ ptarget = gst_ghost_pad_get_target (GST_GHOST_PAD (NLE_OBJECT_SRC (comp)));
_empty_bin (GST_BIN_CAST (comp->priv->current_bin));
if (comp->priv->ghosteventprobe) {
@@ -2531,7 +2531,7 @@ _deactivate_stack (GnlComposition * comp, gboolean flush_downstream)
}
static void
-_relink_new_stack (GnlComposition * comp, GNode * stack,
+_relink_new_stack (NleComposition * comp, GNode * stack,
GstEvent * toplevel_seek)
{
_relink_single_node (comp, stack, toplevel_seek);
@@ -2540,7 +2540,7 @@ _relink_new_stack (GnlComposition * comp, GNode * stack,
}
/* static void
- * unlock_activate_stack (GnlComposition * comp, GNode * node, GstState state)
+ * unlock_activate_stack (NleComposition * comp, GNode * node, GstState state)
* {
* GNode *child;
*
@@ -2600,16 +2600,16 @@ beach:
}
static inline gboolean
-_activate_new_stack (GnlComposition * comp)
+_activate_new_stack (NleComposition * comp)
{
GstPad *pad;
GstElement *topelement;
- GnlCompositionPrivate *priv = comp->priv;
+ NleCompositionPrivate *priv = comp->priv;
if (!priv->current) {
if ((!priv->objects_start)) {
- gnl_composition_reset_target_pad (comp);
+ nle_composition_reset_target_pad (comp);
priv->segment_start = 0;
priv->segment_stop = GST_CLOCK_TIME_NONE;
}
@@ -2622,12 +2622,12 @@ _activate_new_stack (GnlComposition * comp)
/* The stack is entirely ready, send seek out synchronously */
topelement = GST_ELEMENT (priv->current->data);
/* Get toplevel object source pad */
- pad = GNL_OBJECT_SRC (topelement);
+ pad = NLE_OBJECT_SRC (topelement);
GST_INFO_OBJECT (comp,
"We have a valid toplevel element pad %s:%s", GST_DEBUG_PAD_NAME (pad));
- gnl_composition_ghost_pad_set_target (comp, pad);
+ nle_composition_ghost_pad_set_target (comp, pad);
GST_DEBUG_OBJECT (comp, "New stack activated!");
@@ -2642,12 +2642,12 @@ resync_state:
/* WITH OBJECTS LOCK TAKEN */
static gboolean
-_set_real_eos_seqnum_from_seek (GnlComposition * comp, GstEvent * event)
+_set_real_eos_seqnum_from_seek (NleComposition * comp, GstEvent * event)
{
GList *tmp;
gboolean should_check_objects = FALSE;
- GnlCompositionPrivate *priv = comp->priv;
+ NleCompositionPrivate *priv = comp->priv;
gboolean reverse = (priv->segment->rate < 0);
gint stack_seqnum = gst_event_get_seqnum (event);
@@ -2658,9 +2658,9 @@ _set_real_eos_seqnum_from_seek (GnlComposition * comp, GstEvent * event)
if (should_check_objects) {
for (tmp = priv->objects_stop; tmp; tmp = g_list_next (tmp)) {
- GnlObject *object = (GnlObject *) tmp->data;
+ NleObject *object = (NleObject *) tmp->data;
- if (!GNL_IS_SOURCE (object))
+ if (!NLE_IS_SOURCE (object))
continue;
if ((!reverse && priv->segment_stop < object->stop) ||
@@ -2680,7 +2680,7 @@ _set_real_eos_seqnum_from_seek (GnlComposition * comp, GstEvent * event)
/*
* update_pipeline:
- * @comp: The #GnlComposition
+ * @comp: The #NleComposition
* @currenttime: The #GstClockTime to update at, can be GST_CLOCK_TIME_NONE.
* @update_reason: Reason why we are updating the pipeline
*
@@ -2692,8 +2692,8 @@ _set_real_eos_seqnum_from_seek (GnlComposition * comp, GstEvent * event)
* WITH OBJECTS LOCK TAKEN
*/
static gboolean
-update_pipeline (GnlComposition * comp, GstClockTime currenttime, gint32 seqnum,
- GnlUpdateStackReason update_reason)
+update_pipeline (NleComposition * comp, GstClockTime currenttime, gint32 seqnum,
+ NleUpdateStackReason update_reason)
{
GstEvent *toplevel_seek;
@@ -2702,7 +2702,7 @@ update_pipeline (GnlComposition * comp, GstClockTime currenttime, gint32 seqnum,
gboolean samestack = FALSE;
gboolean updatestoponly = FALSE;
GstState state = GST_STATE (comp);
- GnlCompositionPrivate *priv = comp->priv;
+ NleCompositionPrivate *priv = comp->priv;
GstClockTime new_stop = GST_CLOCK_TIME_NONE;
GstClockTime new_start = GST_CLOCK_TIME_NONE;
@@ -2795,7 +2795,7 @@ update_pipeline (GnlComposition * comp, GstClockTime currenttime, gint32 seqnum,
ucompo->reason = update_reason;
ucompo->seqnum = seqnum;
comp->priv->awaited_caps_seqnum = seqnum;
- priv->commited_probeid = gst_pad_add_probe (GNL_OBJECT_SRC (comp),
+ priv->commited_probeid = gst_pad_add_probe (NLE_OBJECT_SRC (comp),
GST_PAD_PROBE_TYPE_EVENT_DOWNSTREAM,
(GstPadProbeCallback) _is_update_done_cb, ucompo,
_free_update_compo_data);
@@ -2821,19 +2821,19 @@ update_pipeline (GnlComposition * comp, GstClockTime currenttime, gint32 seqnum,
}
static gboolean
-gnl_composition_add_object (GstBin * bin, GstElement * element)
+nle_composition_add_object (GstBin * bin, GstElement * element)
{
- GnlObject *object;
- GnlComposition *comp = (GnlComposition *) bin;
+ NleObject *object;
+ NleComposition *comp = (NleComposition *) bin;
if (element == comp->priv->current_bin) {
GST_INFO_OBJECT (comp, "Adding internal bin");
return GST_BIN_CLASS (parent_class)->add_element (bin, element);
}
- g_return_val_if_fail (GNL_IS_OBJECT (element), FALSE);
+ g_return_val_if_fail (NLE_IS_OBJECT (element), FALSE);
- object = GNL_OBJECT (element);
+ object = NLE_OBJECT (element);
object->in_composition = TRUE;
_add_add_object_gsource (comp, object);
@@ -2842,19 +2842,19 @@ gnl_composition_add_object (GstBin * bin, GstElement * element)
}
static gboolean
-_gnl_composition_add_object (GnlComposition * comp, GnlObject * object)
+_nle_composition_add_object (NleComposition * comp, NleObject * object)
{
gboolean ret = TRUE;
- GnlCompositionPrivate *priv = comp->priv;
+ NleCompositionPrivate *priv = comp->priv;
GST_DEBUG_OBJECT (comp, "element %s", GST_OBJECT_NAME (object));
GST_DEBUG_OBJECT (object, "%" GST_TIME_FORMAT "--%" GST_TIME_FORMAT,
- GST_TIME_ARGS (GNL_OBJECT_START (object)),
- GST_TIME_ARGS (GNL_OBJECT_STOP (object)));
+ GST_TIME_ARGS (NLE_OBJECT_START (object)),
+ GST_TIME_ARGS (NLE_OBJECT_STOP (object)));
g_object_ref_sink (object);
- if ((GNL_OBJECT_IS_EXPANDABLE (object)) &&
+ if ((NLE_OBJECT_IS_EXPANDABLE (object)) &&
g_list_find (priv->expandables, object)) {
GST_WARNING_OBJECT (comp,
"We already have an expandable, remove it before adding new one");
@@ -2863,8 +2863,8 @@ _gnl_composition_add_object (GnlComposition * comp, GnlObject * object)
goto chiringuito;
}
- gnl_object_set_caps (object, GNL_OBJECT (comp)->caps);
- gnl_object_set_commit_needed (GNL_OBJECT (comp));
+ nle_object_set_caps (object, NLE_OBJECT (comp)->caps);
+ nle_object_set_commit_needed (NLE_OBJECT (comp));
if (!ret) {
GST_WARNING_OBJECT (comp, "couldn't add object");
@@ -2874,26 +2874,26 @@ _gnl_composition_add_object (GnlComposition * comp, GnlObject * object)
/* lock state of child ! */
GST_LOG_OBJECT (comp, "Locking state of %s", GST_ELEMENT_NAME (object));
- if (GNL_OBJECT_IS_EXPANDABLE (object)) {
+ if (NLE_OBJECT_IS_EXPANDABLE (object)) {
/* Only react on non-default objects properties */
g_object_set (object,
"start", (GstClockTime) 0,
"inpoint", (GstClockTime) 0,
- "duration", (GstClockTimeDiff) GNL_OBJECT_STOP (comp), NULL);
+ "duration", (GstClockTimeDiff) NLE_OBJECT_STOP (comp), NULL);
GST_INFO_OBJECT (object, "Used as expandable, commiting now");
- gnl_object_commit (GNL_OBJECT (object), FALSE);
+ nle_object_commit (NLE_OBJECT (object), FALSE);
}
/* ...and add it to the hash table */
g_hash_table_add (priv->objects_hash, object);
- /* Set the caps of the composition on the GnlObject it handles */
- if (G_UNLIKELY (!gst_caps_is_any (((GnlObject *) comp)->caps)))
- gnl_object_set_caps ((GnlObject *) object, ((GnlObject *) comp)->caps);
+ /* Set the caps of the composition on the NleObject it handles */
+ if (G_UNLIKELY (!gst_caps_is_any (((NleObject *) comp)->caps)))
+ nle_object_set_caps ((NleObject *) object, ((NleObject *) comp)->caps);
/* Special case for default source. */
- if (GNL_OBJECT_IS_EXPANDABLE (object)) {
+ if (NLE_OBJECT_IS_EXPANDABLE (object)) {
/* It doesn't get added to objects_start and objects_stop. */
priv->expandables = g_list_prepend (priv->expandables, object);
goto beach;
@@ -2908,8 +2908,8 @@ _gnl_composition_add_object (GnlComposition * comp, GnlObject * object)
"Head of objects_start is now %s [%" GST_TIME_FORMAT "--%"
GST_TIME_FORMAT "]",
GST_OBJECT_NAME (priv->objects_start->data),
- GST_TIME_ARGS (GNL_OBJECT_START (priv->objects_start->data)),
- GST_TIME_ARGS (GNL_OBJECT_STOP (priv->objects_start->data)));
+ GST_TIME_ARGS (NLE_OBJECT_START (priv->objects_start->data)),
+ GST_TIME_ARGS (NLE_OBJECT_STOP (priv->objects_start->data)));
priv->objects_stop = g_list_insert_sorted
(priv->objects_stop, object, (GCompareFunc) objects_stop_compare);
@@ -2927,19 +2927,19 @@ chiringuito:
}
static gboolean
-gnl_composition_remove_object (GstBin * bin, GstElement * element)
+nle_composition_remove_object (GstBin * bin, GstElement * element)
{
- GnlObject *object;
- GnlComposition *comp = (GnlComposition *) bin;
+ NleObject *object;
+ NleComposition *comp = (NleComposition *) bin;
if (element == comp->priv->current_bin) {
GST_INFO_OBJECT (comp, "Adding internal bin");
return GST_BIN_CLASS (parent_class)->remove_element (bin, element);
}
- g_return_val_if_fail (GNL_IS_OBJECT (element), FALSE);
+ g_return_val_if_fail (NLE_IS_OBJECT (element), FALSE);
- object = GNL_OBJECT (element);
+ object = NLE_OBJECT (element);
object->in_composition = FALSE;
_add_remove_object_gsource (comp, object);
@@ -2948,9 +2948,9 @@ gnl_composition_remove_object (GstBin * bin, GstElement * element)
}
static gboolean
-_gnl_composition_remove_object (GnlComposition * comp, GnlObject * object)
+_nle_composition_remove_object (NleComposition * comp, NleObject * object)
{
- GnlCompositionPrivate *priv = comp->priv;
+ NleCompositionPrivate *priv = comp->priv;
GST_DEBUG_OBJECT (comp, "removing object %s", GST_OBJECT_NAME (object));
@@ -2963,7 +2963,7 @@ _gnl_composition_remove_object (GnlComposition * comp, GnlObject * object)
gst_element_set_state (GST_ELEMENT (object), GST_STATE_NULL);
/* handle default source */
- if (GNL_OBJECT_IS_EXPANDABLE (object)) {
+ if (NLE_OBJECT_IS_EXPANDABLE (object)) {
/* Find it in the list */
priv->expandables = g_list_remove (priv->expandables, object);
} else {
@@ -2973,15 +2973,15 @@ _gnl_composition_remove_object (GnlComposition * comp, GnlObject * object)
GST_LOG_OBJECT (object, "Removed from the objects start/stop list");
}
- if (priv->current && GNL_OBJECT (priv->current->data) == GNL_OBJECT (object))
- gnl_composition_reset_target_pad (comp);
+ if (priv->current && NLE_OBJECT (priv->current->data) == NLE_OBJECT (object))
+ nle_composition_reset_target_pad (comp);
g_hash_table_remove (priv->objects_hash, object);
GST_LOG_OBJECT (object, "Done removing from the composition, now updating");
/* Make it possible to reuse the same object later */
- gnl_object_reset (GNL_OBJECT (object));
+ nle_object_reset (NLE_OBJECT (object));
gst_object_unref (object);
return TRUE;
diff --git a/gnl/gnlcomposition.h b/ges/nle/nlecomposition.h
index 9375f7ea..5fb98394 100644
--- a/gnl/gnlcomposition.h
+++ b/ges/nle/nlecomposition.h
@@ -2,7 +2,7 @@
* Copyright (C) 2001 Wim Taymans <wim.taymans@gmail.com>
* 2004-2008 Edward Hervey <bilboed@bilboed.com>
*
- * gnlcomposition.h: Header for base GnlComposition
+ * nlecomposition.h: Header for base NleComposition
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -21,46 +21,46 @@
*/
-#ifndef __GNL_COMPOSITION_H__
-#define __GNL_COMPOSITION_H__
+#ifndef __NLE_COMPOSITION_H__
+#define __NLE_COMPOSITION_H__
#include <gst/gst.h>
-#include "gnlobject.h"
+#include "nleobject.h"
G_BEGIN_DECLS
-#define GNL_TYPE_COMPOSITION \
- (gnl_composition_get_type())
-#define GNL_COMPOSITION(obj) \
- (G_TYPE_CHECK_INSTANCE_CAST((obj),GNL_TYPE_COMPOSITION,GnlComposition))
-#define GNL_COMPOSITION_CLASS(klass) \
- (G_TYPE_CHECK_CLASS_CAST((klass),GNL_TYPE_COMPOSITION,GnlCompositionClass))
-#define GNL_COMPOSITION_GET_CLASS(obj) \
- (GNL_COMPOSITION_CLASS (G_OBJECT_GET_CLASS (obj)))
-#define GNL_IS_COMPOSITION(obj) \
- (G_TYPE_CHECK_INSTANCE_TYPE((obj),GNL_TYPE_COMPOSITION))
-#define GNL_IS_COMPOSITION_CLASS(obj) \
- (G_TYPE_CHECK_CLASS_TYPE((klass),GNL_TYPE_COMPOSITION))
+#define NLE_TYPE_COMPOSITION \
+ (nle_composition_get_type())
+#define NLE_COMPOSITION(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST((obj),NLE_TYPE_COMPOSITION,NleComposition))
+#define NLE_COMPOSITION_CLASS(klass) \
+ (G_TYPE_CHECK_CLASS_CAST((klass),NLE_TYPE_COMPOSITION,NleCompositionClass))
+#define NLE_COMPOSITION_GET_CLASS(obj) \
+ (NLE_COMPOSITION_CLASS (G_OBJECT_GET_CLASS (obj)))
+#define NLE_IS_COMPOSITION(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE((obj),NLE_TYPE_COMPOSITION))
+#define NLE_IS_COMPOSITION_CLASS(obj) \
+ (G_TYPE_CHECK_CLASS_TYPE((klass),NLE_TYPE_COMPOSITION))
-typedef struct _GnlCompositionPrivate GnlCompositionPrivate;
+typedef struct _NleCompositionPrivate NleCompositionPrivate;
-struct _GnlComposition
+struct _NleComposition
{
- GnlObject parent;
+ NleObject parent;
GstTask * task;
GRecMutex task_rec_lock;
/*< private >*/
- GnlCompositionPrivate * priv;
+ NleCompositionPrivate * priv;
};
-struct _GnlCompositionClass
+struct _NleCompositionClass
{
- GnlObjectClass parent_class;
+ NleObjectClass parent_class;
};
-GType gnl_composition_get_type (void);
+GType nle_composition_get_type (void);
G_END_DECLS
-#endif /* __GNL_COMPOSITION_H__ */
+#endif /* __NLE_COMPOSITION_H__ */
diff --git a/gnl/gnlghostpad.c b/ges/nle/nleghostpad.c
index e287e980..c98364ae 100644
--- a/gnl/gnlghostpad.c
+++ b/ges/nle/nleghostpad.c
@@ -21,17 +21,17 @@
#include "config.h"
#endif
-#include "gnl.h"
+#include "nle.h"
-GST_DEBUG_CATEGORY_STATIC (gnlghostpad);
-#define GST_CAT_DEFAULT gnlghostpad
+GST_DEBUG_CATEGORY_STATIC (nleghostpad);
+#define GST_CAT_DEFAULT nleghostpad
-typedef struct _GnlPadPrivate GnlPadPrivate;
+typedef struct _NlePadPrivate NlePadPrivate;
-struct _GnlPadPrivate
+struct _NlePadPrivate
{
- GnlObject *object;
- GnlPadPrivate *ghostpriv;
+ NleObject *object;
+ NlePadPrivate *ghostpriv;
GstPadDirection dir;
GstPadEventFunction eventfunc;
GstPadQueryFunction queryfunc;
@@ -40,7 +40,7 @@ struct _GnlPadPrivate
};
GstEvent *
-gnl_object_translate_incoming_seek (GnlObject * object, GstEvent * event)
+nle_object_translate_incoming_seek (NleObject * object, GstEvent * event)
{
GstEvent *event2;
GstFormat format;
@@ -68,7 +68,7 @@ gnl_object_translate_incoming_seek (GnlObject * object, GstEvent * event)
/* convert cur */
ncurtype = GST_SEEK_TYPE_SET;
if (G_LIKELY ((curtype == GST_SEEK_TYPE_SET)
- && (gnl_object_to_media_time (object, cur, &ncur)))) {
+ && (nle_object_to_media_time (object, cur, &ncur)))) {
/* cur is TYPE_SET and value is valid */
if (ncur > G_MAXINT64)
GST_WARNING_OBJECT (object, "return value too big...");
@@ -85,14 +85,14 @@ gnl_object_translate_incoming_seek (GnlObject * object, GstEvent * event)
/* convert stop, we also need to limit it to object->stop */
if (G_LIKELY ((stoptype == GST_SEEK_TYPE_SET)
- && (gnl_object_to_media_time (object, stop, &nstop)))) {
+ && (nle_object_to_media_time (object, stop, &nstop)))) {
if (nstop > G_MAXINT64)
GST_WARNING_OBJECT (object, "return value too big...");
GST_LOG_OBJECT (object, "Setting stop to %" GST_TIME_FORMAT,
GST_TIME_ARGS (nstop));
} else {
GST_DEBUG_OBJECT (object, "Limiting end of seek to media_stop");
- gnl_object_to_media_time (object, object->stop, &nstop);
+ nle_object_to_media_time (object, object->stop, &nstop);
if (nstop > G_MAXINT64)
GST_WARNING_OBJECT (object, "return value too big...");
GST_LOG_OBJECT (object, "Setting stop to %" GST_TIME_FORMAT,
@@ -131,7 +131,7 @@ invalid_format:
}
static GstEvent *
-translate_outgoing_seek (GnlObject * object, GstEvent * event)
+translate_outgoing_seek (NleObject * object, GstEvent * event)
{
GstEvent *event2;
GstFormat format;
@@ -159,7 +159,7 @@ translate_outgoing_seek (GnlObject * object, GstEvent * event)
/* convert cur */
ncurtype = GST_SEEK_TYPE_SET;
if (G_LIKELY ((curtype == GST_SEEK_TYPE_SET)
- && (gnl_media_to_object_time (object, cur, &ncur)))) {
+ && (nle_media_to_object_time (object, cur, &ncur)))) {
/* cur is TYPE_SET and value is valid */
if (ncur > G_MAXINT64)
GST_WARNING_OBJECT (object, "return value too big...");
@@ -176,7 +176,7 @@ translate_outgoing_seek (GnlObject * object, GstEvent * event)
/* convert stop, we also need to limit it to object->stop */
if (G_LIKELY ((stoptype == GST_SEEK_TYPE_SET)
- && (gnl_media_to_object_time (object, stop, &nstop)))) {
+ && (nle_media_to_object_time (object, stop, &nstop)))) {
if (nstop > G_MAXINT64)
GST_WARNING_OBJECT (object, "return value too big...");
GST_LOG_OBJECT (object, "Setting stop to %" GST_TIME_FORMAT,
@@ -212,7 +212,7 @@ invalid_format:
}
static GstEvent *
-translate_outgoing_segment (GnlObject * object, GstEvent * event)
+translate_outgoing_segment (NleObject * object, GstEvent * event)
{
const GstSegment *orig;
GstSegment segment;
@@ -235,7 +235,7 @@ translate_outgoing_segment (GnlObject * object, GstEvent * event)
gst_segment_copy_into (orig, &segment);
- gnl_media_to_object_time (object, orig->time, &segment.time);
+ nle_media_to_object_time (object, orig->time, &segment.time);
if (G_UNLIKELY (segment.time > G_MAXINT64))
GST_WARNING_OBJECT (object, "Return value too big...");
@@ -253,7 +253,7 @@ translate_outgoing_segment (GnlObject * object, GstEvent * event)
}
static GstEvent *
-translate_incoming_segment (GnlObject * object, GstEvent * event)
+translate_incoming_segment (NleObject * object, GstEvent * event)
{
GstEvent *event2;
const GstSegment *orig;
@@ -276,15 +276,15 @@ translate_incoming_segment (GnlObject * object, GstEvent * event)
gst_segment_copy_into (orig, &segment);
- if (!gnl_object_to_media_time (object, orig->time, &segment.time)) {
+ if (!nle_object_to_media_time (object, orig->time, &segment.time)) {
GST_DEBUG ("Can't convert media_time, using 0");
segment.time = 0;
};
- if (GNL_IS_OPERATION (object)) {
- segment.base = GNL_OPERATION (object)->next_base_time;
+ if (NLE_IS_OPERATION (object)) {
+ segment.base = NLE_OPERATION (object)->next_base_time;
GST_INFO_OBJECT (object, "Using operation base time %" GST_TIME_FORMAT,
- GST_TIME_ARGS (GNL_OPERATION (object)->next_base_time));
+ GST_TIME_ARGS (NLE_OPERATION (object)->next_base_time));
}
if (G_UNLIKELY (segment.time > G_MAXINT64))
@@ -306,8 +306,8 @@ static gboolean
internalpad_event_function (GstPad * internal, GstObject * parent,
GstEvent * event)
{
- GnlPadPrivate *priv = gst_pad_get_element_private (internal);
- GnlObject *object = priv->object;
+ NlePadPrivate *priv = gst_pad_get_element_private (internal);
+ NleObject *object = priv->object;
gboolean res;
GST_DEBUG_OBJECT (internal, "event:%s (seqnum::%d)",
@@ -362,7 +362,7 @@ internalpad_event_function (GstPad * internal, GstObject * parent,
*/
static gboolean
-translate_incoming_position_query (GnlObject * object, GstQuery * query)
+translate_incoming_position_query (NleObject * object, GstQuery * query)
{
GstFormat format;
gint64 cur, cur2;
@@ -374,7 +374,7 @@ translate_incoming_position_query (GnlObject * object, GstQuery * query)
goto beach;
}
- gnl_media_to_object_time (object, (guint64) cur, (guint64 *) & cur2);
+ nle_media_to_object_time (object, (guint64) cur, (guint64 *) & cur2);
GST_DEBUG_OBJECT (object,
"Adjust position from %" GST_TIME_FORMAT " to %" GST_TIME_FORMAT,
@@ -386,7 +386,7 @@ beach:
}
static gboolean
-translate_outgoing_position_query (GnlObject * object, GstQuery * query)
+translate_outgoing_position_query (NleObject * object, GstQuery * query)
{
GstFormat format;
gint64 cur, cur2;
@@ -398,7 +398,7 @@ translate_outgoing_position_query (GnlObject * object, GstQuery * query)
goto beach;
}
- if (G_UNLIKELY (!(gnl_object_to_media_time (object, (guint64) cur,
+ if (G_UNLIKELY (!(nle_object_to_media_time (object, (guint64) cur,
(guint64 *) & cur2)))) {
GST_WARNING_OBJECT (object,
"Couldn't get media time for %" GST_TIME_FORMAT, GST_TIME_ARGS (cur));
@@ -415,7 +415,7 @@ beach:
}
static gboolean
-translate_incoming_duration_query (GnlObject * object, GstQuery * query)
+translate_incoming_duration_query (NleObject * object, GstQuery * query)
{
GstFormat format;
gint64 cur;
@@ -436,8 +436,8 @@ static gboolean
internalpad_query_function (GstPad * internal, GstObject * parent,
GstQuery * query)
{
- GnlPadPrivate *priv = gst_pad_get_element_private (internal);
- GnlObject *object = priv->object;
+ NlePadPrivate *priv = gst_pad_get_element_private (internal);
+ NleObject *object = priv->object;
gboolean ret;
GST_DEBUG_OBJECT (internal, "querytype:%s",
@@ -474,8 +474,8 @@ static gboolean
ghostpad_event_function (GstPad * ghostpad, GstObject * parent,
GstEvent * event)
{
- GnlPadPrivate *priv;
- GnlObject *object;
+ NlePadPrivate *priv;
+ NleObject *object;
gboolean ret = FALSE;
priv = gst_pad_get_element_private (ghostpad);
@@ -494,7 +494,7 @@ ghostpad_event_function (GstPad * ghostpad, GstObject * parent,
{
GstPad *target;
- event = gnl_object_translate_incoming_seek (object, event);
+ event = nle_object_translate_incoming_seek (object, event);
if (!(target = gst_ghost_pad_get_target (GST_GHOST_PAD (ghostpad)))) {
g_assert ("Seeked a pad with not target SHOULD NOT HAPPEND");
ret = FALSE;
@@ -545,8 +545,8 @@ static gboolean
ghostpad_query_function (GstPad * ghostpad, GstObject * parent,
GstQuery * query)
{
- GnlPadPrivate *priv = gst_pad_get_element_private (ghostpad);
- GnlObject *object = GNL_OBJECT (parent);
+ NlePadPrivate *priv = gst_pad_get_element_private (ghostpad);
+ NleObject *object = NLE_OBJECT (parent);
gboolean pret = TRUE;
GST_DEBUG_OBJECT (ghostpad, "querytype:%s", GST_QUERY_TYPE_NAME (query));
@@ -578,9 +578,9 @@ ghostpad_query_function (GstPad * ghostpad, GstObject * parent,
/* internal pad going away */
static void
-internal_pad_finalizing (GnlPadPrivate * priv, GObject * pad G_GNUC_UNUSED)
+internal_pad_finalizing (NlePadPrivate * priv, GObject * pad G_GNUC_UNUSED)
{
- g_slice_free (GnlPadPrivate, priv);
+ g_slice_free (NlePadPrivate, priv);
}
static inline GstPad *
@@ -602,10 +602,10 @@ get_proxy_pad (GstPad * ghostpad)
}
static void
-control_internal_pad (GstPad * ghostpad, GnlObject * object)
+control_internal_pad (GstPad * ghostpad, NleObject * object)
{
- GnlPadPrivate *priv;
- GnlPadPrivate *privghost;
+ NlePadPrivate *priv;
+ NlePadPrivate *privghost;
GstPad *internal;
if (!ghostpad) {
@@ -620,8 +620,8 @@ control_internal_pad (GstPad * ghostpad, GnlObject * object)
if (G_UNLIKELY (!(priv = gst_pad_get_element_private (internal)))) {
GST_DEBUG_OBJECT (internal,
- "Creating a GnlPadPrivate to put in element_private");
- priv = g_slice_new0 (GnlPadPrivate);
+ "Creating a NlePadPrivate to put in element_private");
+ priv = g_slice_new0 (NlePadPrivate);
/* Remember existing pad functions */
priv->eventfunc = GST_PAD_EVENTFUNC (internal);
@@ -649,14 +649,14 @@ control_internal_pad (GstPad * ghostpad, GnlObject * object)
/**
- * gnl_object_ghost_pad:
- * @object: #GnlObject to add the ghostpad to
+ * nle_object_ghost_pad:
+ * @object: #NleObject to add the ghostpad to
* @name: Name for the new pad
* @target: Target #GstPad to ghost
*
* Adds a #GstGhostPad overridding the correct pad [query|event]_function so
* that time shifting is done correctly
- * The #GstGhostPad is added to the #GnlObject
+ * The #GstGhostPad is added to the #NleObject
*
* /!\ This function doesn't check if the existing [src|sink] pad was removed
* first, so you might end up with more pads than wanted
@@ -664,7 +664,7 @@ control_internal_pad (GstPad * ghostpad, GnlObject * object)
* Returns: The #GstPad if everything went correctly, else NULL.
*/
GstPad *
-gnl_object_ghost_pad (GnlObject * object, const gchar * name, GstPad * target)
+nle_object_ghost_pad (NleObject * object, const gchar * name, GstPad * target)
{
GstPadDirection dir = GST_PAD_DIRECTION (target);
GstPad *ghost;
@@ -674,13 +674,13 @@ gnl_object_ghost_pad (GnlObject * object, const gchar * name, GstPad * target)
g_return_val_if_fail (target, FALSE);
g_return_val_if_fail ((dir != GST_PAD_UNKNOWN), FALSE);
- ghost = gnl_object_ghost_pad_no_target (object, name, dir, NULL);
+ ghost = nle_object_ghost_pad_no_target (object, name, dir, NULL);
if (!ghost) {
GST_WARNING_OBJECT (object, "Couldn't create ghostpad");
return NULL;
}
- if (!(gnl_object_ghost_pad_set_target (object, ghost, target))) {
+ if (!(nle_object_ghost_pad_set_target (object, ghost, target))) {
GST_WARNING_OBJECT (object,
"Couldn't set the target pad... removing ghostpad");
gst_object_unref (ghost);
@@ -700,15 +700,15 @@ gnl_object_ghost_pad (GnlObject * object, const gchar * name, GstPad * target)
}
/*
- * gnl_object_ghost_pad_no_target:
- * /!\ Doesn't add the pad to the GnlObject....
+ * nle_object_ghost_pad_no_target:
+ * /!\ Doesn't add the pad to the NleObject....
*/
GstPad *
-gnl_object_ghost_pad_no_target (GnlObject * object, const gchar * name,
+nle_object_ghost_pad_no_target (NleObject * object, const gchar * name,
GstPadDirection dir, GstPadTemplate * template)
{
GstPad *ghost;
- GnlPadPrivate *priv;
+ NlePadPrivate *priv;
/* create a no_target ghostpad */
if (template)
@@ -720,7 +720,7 @@ gnl_object_ghost_pad_no_target (GnlObject * object, const gchar * name,
/* remember the existing ghostpad event/query/link/unlink functions */
- priv = g_slice_new0 (GnlPadPrivate);
+ priv = g_slice_new0 (NlePadPrivate);
priv->dir = dir;
priv->object = object;
@@ -744,9 +744,9 @@ gnl_object_ghost_pad_no_target (GnlObject * object, const gchar * name,
void
-gnl_object_remove_ghost_pad (GnlObject * object, GstPad * ghost)
+nle_object_remove_ghost_pad (NleObject * object, GstPad * ghost)
{
- GnlPadPrivate *priv;
+ NlePadPrivate *priv;
GST_DEBUG_OBJECT (object, "ghostpad %s:%s", GST_DEBUG_PAD_NAME (ghost));
@@ -754,14 +754,14 @@ gnl_object_remove_ghost_pad (GnlObject * object, GstPad * ghost)
gst_ghost_pad_set_target (GST_GHOST_PAD (ghost), NULL);
gst_element_remove_pad (GST_ELEMENT (object), ghost);
if (priv)
- g_slice_free (GnlPadPrivate, priv);
+ g_slice_free (NlePadPrivate, priv);
}
gboolean
-gnl_object_ghost_pad_set_target (GnlObject * object, GstPad * ghost,
+nle_object_ghost_pad_set_target (NleObject * object, GstPad * ghost,
GstPad * target)
{
- GnlPadPrivate *priv = gst_pad_get_element_private (ghost);
+ NlePadPrivate *priv = gst_pad_get_element_private (ghost);
g_return_val_if_fail (priv, FALSE);
g_return_val_if_fail (GST_IS_PAD (ghost), FALSE);
@@ -795,9 +795,9 @@ gnl_object_ghost_pad_set_target (GnlObject * object, GstPad * ghost,
}
void
-gnl_init_ghostpad_category (void)
+nle_init_ghostpad_category (void)
{
- GST_DEBUG_CATEGORY_INIT (gnlghostpad, "gnlghostpad",
+ GST_DEBUG_CATEGORY_INIT (nleghostpad, "nleghostpad",
GST_DEBUG_FG_BLUE | GST_DEBUG_BOLD, "GNonLin GhostPad");
}
diff --git a/gnl/gnlghostpad.h b/ges/nle/nleghostpad.h
index 539af73f..a8125c13 100644
--- a/gnl/gnlghostpad.h
+++ b/ges/nle/nleghostpad.h
@@ -1,7 +1,7 @@
/* GStreamer
* Copyright (C) 2009 Edward Hervey <bilboed@bilboed.com>
*
- * gnlghostpad.h: Header for helper ghostpad
+ * nleghostpad.h: Header for helper ghostpad
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -20,29 +20,29 @@
*/
-#ifndef __GNL_GHOSTPAD_H__
-#define __GNL_GHOSTPAD_H__
+#ifndef __NLE_GHOSTPAD_H__
+#define __NLE_GHOSTPAD_H__
#include <gst/gst.h>
-#include "gnltypes.h"
+#include "nletypes.h"
G_BEGIN_DECLS
-GstPad *gnl_object_ghost_pad (GnlObject * object,
+GstPad *nle_object_ghost_pad (NleObject * object,
const gchar * name, GstPad * target);
-GstPad *gnl_object_ghost_pad_no_target (GnlObject * object,
+GstPad *nle_object_ghost_pad_no_target (NleObject * object,
const gchar * name, GstPadDirection dir, GstPadTemplate *templ);
-gboolean gnl_object_ghost_pad_set_target (GnlObject * object,
+gboolean nle_object_ghost_pad_set_target (NleObject * object,
GstPad * ghost, GstPad * target);
-void gnl_object_remove_ghost_pad (GnlObject * object, GstPad * ghost);
-GstEvent * gnl_object_translate_incoming_seek (GnlObject * object, GstEvent * event);
+void nle_object_remove_ghost_pad (NleObject * object, GstPad * ghost);
+GstEvent * nle_object_translate_incoming_seek (NleObject * object, GstEvent * event);
-void gnl_init_ghostpad_category (void);
+void nle_init_ghostpad_category (void);
G_END_DECLS
-#endif /* __GNL_GHOSTPAD_H__ */
+#endif /* __NLE_GHOSTPAD_H__ */
diff --git a/gnl/gnlobject.c b/ges/nle/nleobject.c
index be02c53c..c5be1268 100644
--- a/gnl/gnlobject.c
+++ b/ges/nle/nleobject.c
@@ -23,15 +23,15 @@
#endif
#include <string.h>
-#include "gnl.h"
+#include "nle.h"
/**
- * SECTION:gnlobject
+ * SECTION:nleobject
* @short_description: Base class for GNonLin elements
*
* <refsect2>
* <para>
- * GnlObject encapsulates default behaviour and implements standard
+ * NleObject encapsulates default behaviour and implements standard
* properties provided by all the GNonLin elements.
* </para>
* </refsect2>
@@ -39,8 +39,8 @@
*/
-GST_DEBUG_CATEGORY_STATIC (gnlobject_debug);
-#define GST_CAT_DEFAULT gnlobject_debug
+GST_DEBUG_CATEGORY_STATIC (nleobject_debug);
+#define GST_CAT_DEFAULT nleobject_debug
static GObjectClass *parent_class = NULL;
@@ -58,11 +58,11 @@ if (object->pending_##property != object->property) { \
}
#define SET_PENDING_VALUE(property, property_str, type, print_format) \
-gnlobject->pending_##property = g_value_get_##type (value); \
-if (gnlobject->property != gnlobject->pending_##property) { \
+nleobject->pending_##property = g_value_get_##type (value); \
+if (nleobject->property != nleobject->pending_##property) { \
GST_DEBUG_OBJECT(object, "Setting pending " property_str " to %" \
- print_format, gnlobject->pending_##property); \
- gnl_object_set_commit_needed (gnlobject); \
+ print_format, nleobject->pending_##property); \
+ nle_object_set_commit_needed (nleobject); \
} else \
GST_DEBUG_OBJECT(object, "Pending " property_str " did not change");
@@ -82,50 +82,50 @@ enum
static GParamSpec *properties[PROP_LAST];
-static void gnl_object_dispose (GObject * object);
+static void nle_object_dispose (GObject * object);
-static void gnl_object_set_property (GObject * object, guint prop_id,
+static void nle_object_set_property (GObject * object, guint prop_id,
const GValue * value, GParamSpec * pspec);
-static void gnl_object_get_property (GObject * object, guint prop_id,
+static void nle_object_get_property (GObject * object, guint prop_id,
GValue * value, GParamSpec * pspec);
-static GstStateChangeReturn gnl_object_change_state (GstElement * element,
+static GstStateChangeReturn nle_object_change_state (GstElement * element,
GstStateChange transition);
-static gboolean gnl_object_prepare_func (GnlObject * object);
-static gboolean gnl_object_cleanup_func (GnlObject * object);
-static gboolean gnl_object_commit_func (GnlObject * object, gboolean recurse);
+static gboolean nle_object_prepare_func (NleObject * object);
+static gboolean nle_object_cleanup_func (NleObject * object);
+static gboolean nle_object_commit_func (NleObject * object, gboolean recurse);
-static GstStateChangeReturn gnl_object_prepare (GnlObject * object);
+static GstStateChangeReturn nle_object_prepare (NleObject * object);
static void
-gnl_object_class_init (GnlObjectClass * klass)
+nle_object_class_init (NleObjectClass * klass)
{
GObjectClass *gobject_class;
GstElementClass *gstelement_class;
- GnlObjectClass *gnlobject_class;
+ NleObjectClass *nleobject_class;
gobject_class = (GObjectClass *) klass;
gstelement_class = (GstElementClass *) klass;
- gnlobject_class = (GnlObjectClass *) klass;
- GST_DEBUG_CATEGORY_INIT (gnlobject_debug, "gnlobject",
+ nleobject_class = (NleObjectClass *) klass;
+ GST_DEBUG_CATEGORY_INIT (nleobject_debug, "nleobject",
GST_DEBUG_FG_BLUE | GST_DEBUG_BOLD, "GNonLin object");
parent_class = g_type_class_ref (GST_TYPE_BIN);
- gobject_class->set_property = GST_DEBUG_FUNCPTR (gnl_object_set_property);
- gobject_class->get_property = GST_DEBUG_FUNCPTR (gnl_object_get_property);
- gobject_class->dispose = GST_DEBUG_FUNCPTR (gnl_object_dispose);
+ gobject_class->set_property = GST_DEBUG_FUNCPTR (nle_object_set_property);
+ gobject_class->get_property = GST_DEBUG_FUNCPTR (nle_object_get_property);
+ gobject_class->dispose = GST_DEBUG_FUNCPTR (nle_object_dispose);
- gstelement_class->change_state = GST_DEBUG_FUNCPTR (gnl_object_change_state);
+ gstelement_class->change_state = GST_DEBUG_FUNCPTR (nle_object_change_state);
- gnlobject_class->prepare = GST_DEBUG_FUNCPTR (gnl_object_prepare_func);
- gnlobject_class->cleanup = GST_DEBUG_FUNCPTR (gnl_object_cleanup_func);
- gnlobject_class->commit_signal_handler =
- GST_DEBUG_FUNCPTR (gnl_object_commit);
- gnlobject_class->commit = GST_DEBUG_FUNCPTR (gnl_object_commit_func);
+ nleobject_class->prepare = GST_DEBUG_FUNCPTR (nle_object_prepare_func);
+ nleobject_class->cleanup = GST_DEBUG_FUNCPTR (nle_object_cleanup_func);
+ nleobject_class->commit_signal_handler =
+ GST_DEBUG_FUNCPTR (nle_object_commit);
+ nleobject_class->commit = GST_DEBUG_FUNCPTR (nle_object_commit_func);
/**
- * GnlObject:start
+ * NleObject:start
*
* The start position relative to the parent in nanoseconds.
*/
@@ -136,7 +136,7 @@ gnl_object_class_init (GnlObjectClass * klass)
properties[PROP_START]);
/**
- * GnlObject:duration
+ * NleObject:duration
*
* The outgoing duration in nanoseconds.
*/
@@ -147,7 +147,7 @@ gnl_object_class_init (GnlObjectClass * klass)
properties[PROP_DURATION]);
/**
- * GnlObject:stop
+ * NleObject:stop
*
* The stop position relative to the parent in nanoseconds.
*
@@ -160,7 +160,7 @@ gnl_object_class_init (GnlObjectClass * klass)
properties[PROP_STOP]);
/**
- * GnlObject:inpoint
+ * NleObject:inpoint
*
* The media start position in nanoseconds.
*
@@ -175,7 +175,7 @@ gnl_object_class_init (GnlObjectClass * klass)
properties[PROP_INPOINT]);
/**
- * GnlObject:priority
+ * NleObject:priority
*
* The priority of the object in the container.
*
@@ -185,7 +185,7 @@ gnl_object_class_init (GnlObjectClass * klass)
* The lowest priority is G_MAXUINT32.
*
* Objects whose priority is (-1) will be considered as 'default' objects
- * in GnlComposition and their start/stop values will be modified as to
+ * in NleComposition and their start/stop values will be modified as to
* fit the whole duration of the composition.
*/
properties[PROP_PRIORITY] = g_param_spec_uint ("priority", "Priority",
@@ -195,19 +195,19 @@ gnl_object_class_init (GnlObjectClass * klass)
properties[PROP_PRIORITY]);
/**
- * GnlObject:active
+ * NleObject:active
*
* Indicates whether this object should be used by its container.
*
- * Set to #TRUE to temporarily disable this object in a #GnlComposition.
+ * Set to #TRUE to temporarily disable this object in a #NleComposition.
*/
properties[PROP_ACTIVE] = g_param_spec_boolean ("active", "Active",
- "Use this object in the GnlComposition", TRUE, G_PARAM_READWRITE);
+ "Use this object in the NleComposition", TRUE, G_PARAM_READWRITE);
g_object_class_install_property (gobject_class, PROP_ACTIVE,
properties[PROP_ACTIVE]);
/**
- * GnlObject:caps
+ * NleObject:caps
*
* Caps used to filter/choose the output stream.
*
@@ -223,10 +223,10 @@ gnl_object_class_init (GnlObjectClass * klass)
properties[PROP_CAPS]);
/**
- * GnlObject:expandable
+ * NleObject:expandable
*
* Indicates whether this object should expand to the full duration of its
- * container #GnlComposition.
+ * container #NleComposition.
*/
properties[PROP_EXPANDABLE] =
g_param_spec_boolean ("expandable", "Expandable",
@@ -237,7 +237,7 @@ gnl_object_class_init (GnlObjectClass * klass)
}
static void
-gnl_object_init (GnlObject * object, GnlObjectClass * klass)
+nle_object_init (NleObject * object, NleObjectClass * klass)
{
object->start = object->pending_start = 0;
object->duration = object->pending_duration = 0;
@@ -253,7 +253,7 @@ gnl_object_init (GnlObject * object, GnlObjectClass * klass)
object->segment_start = -1;
object->segment_stop = -1;
- object->srcpad = gnl_object_ghost_pad_no_target (object,
+ object->srcpad = nle_object_ghost_pad_no_target (object,
"src", GST_PAD_SRC,
gst_element_class_get_pad_template ((GstElementClass *) klass, "src"));
@@ -261,21 +261,21 @@ gnl_object_init (GnlObject * object, GnlObjectClass * klass)
}
static void
-gnl_object_dispose (GObject * object)
+nle_object_dispose (GObject * object)
{
- GnlObject *gnl = (GnlObject *) object;
+ NleObject *nle = (NleObject *) object;
- if (gnl->caps) {
- gst_caps_unref (gnl->caps);
- gnl->caps = NULL;
+ if (nle->caps) {
+ gst_caps_unref (nle->caps);
+ nle->caps = NULL;
}
G_OBJECT_CLASS (parent_class)->dispose (object);
}
/**
- * gnl_object_to_media_time:
- * @object: a #GnlObject
+ * nle_object_to_media_time:
+ * @object: a #NleObject
* @objecttime: The #GstClockTime we want to convert
* @mediatime: A pointer on a #GstClockTime to fill
*
@@ -285,7 +285,7 @@ gnl_object_dispose (GObject * object)
* FALSE otherwise
*/
gboolean
-gnl_object_to_media_time (GnlObject * object, GstClockTime otime,
+nle_object_to_media_time (NleObject * object, GstClockTime otime,
GstClockTime * mtime)
{
g_return_val_if_fail (mtime, FALSE);
@@ -328,8 +328,8 @@ gnl_object_to_media_time (GnlObject * object, GstClockTime otime,
}
/**
- * gnl_media_to_object_time:
- * @object: The #GnlObject
+ * nle_media_to_object_time:
+ * @object: The #NleObject
* @mediatime: The #GstClockTime we want to convert
* @objecttime: A pointer on a #GstClockTime to fill
*
@@ -340,7 +340,7 @@ gnl_object_to_media_time (GnlObject * object, GstClockTime otime,
*/
gboolean
-gnl_media_to_object_time (GnlObject * object, GstClockTime mtime,
+nle_media_to_object_time (NleObject * object, GstClockTime mtime,
GstClockTime * otime)
{
g_return_val_if_fail (otime, FALSE);
@@ -373,7 +373,7 @@ gnl_media_to_object_time (GnlObject * object, GstClockTime mtime,
}
static gboolean
-gnl_object_prepare_func (GnlObject * object)
+nle_object_prepare_func (NleObject * object)
{
GST_DEBUG_OBJECT (object, "default prepare function, returning TRUE");
@@ -381,13 +381,13 @@ gnl_object_prepare_func (GnlObject * object)
}
static GstStateChangeReturn
-gnl_object_prepare (GnlObject * object)
+nle_object_prepare (NleObject * object)
{
GstStateChangeReturn ret = GST_STATE_CHANGE_SUCCESS;
GST_DEBUG_OBJECT (object, "preparing");
- if (!(GNL_OBJECT_GET_CLASS (object)->prepare (object)))
+ if (!(NLE_OBJECT_GET_CLASS (object)->prepare (object)))
ret = GST_STATE_CHANGE_FAILURE;
GST_DEBUG_OBJECT (object, "finished preparing, returning %d", ret);
@@ -396,7 +396,7 @@ gnl_object_prepare (GnlObject * object)
}
static gboolean
-gnl_object_cleanup_func (GnlObject * object)
+nle_object_cleanup_func (NleObject * object)
{
GST_DEBUG_OBJECT (object, "default cleanup function, returning TRUE");
@@ -404,13 +404,13 @@ gnl_object_cleanup_func (GnlObject * object)
}
GstStateChangeReturn
-gnl_object_cleanup (GnlObject * object)
+nle_object_cleanup (NleObject * object)
{
GstStateChangeReturn ret = GST_STATE_CHANGE_SUCCESS;
GST_DEBUG_OBJECT (object, "cleaning-up");
- if (!(GNL_OBJECT_GET_CLASS (object)->cleanup (object)))
+ if (!(NLE_OBJECT_GET_CLASS (object)->cleanup (object)))
ret = GST_STATE_CHANGE_FAILURE;
GST_DEBUG_OBJECT (object, "finished preparing, returning %d", ret);
@@ -419,7 +419,7 @@ gnl_object_cleanup (GnlObject * object)
}
void
-gnl_object_set_caps (GnlObject * object, const GstCaps * caps)
+nle_object_set_caps (NleObject * object, const GstCaps * caps)
{
if (object->caps)
gst_caps_unref (object->caps);
@@ -428,25 +428,25 @@ gnl_object_set_caps (GnlObject * object, const GstCaps * caps)
}
static inline void
-_update_stop (GnlObject * gnlobject)
+_update_stop (NleObject * nleobject)
{
/* check if start/duration has changed */
- if ((gnlobject->pending_start + gnlobject->pending_duration) !=
- gnlobject->stop) {
- gnlobject->stop = gnlobject->pending_start + gnlobject->pending_duration;
+ if ((nleobject->pending_start + nleobject->pending_duration) !=
+ nleobject->stop) {
+ nleobject->stop = nleobject->pending_start + nleobject->pending_duration;
- GST_LOG_OBJECT (gnlobject,
+ GST_LOG_OBJECT (nleobject,
"Updating stop value : %" GST_TIME_FORMAT " [start:%" GST_TIME_FORMAT
- ", duration:%" GST_TIME_FORMAT "]", GST_TIME_ARGS (gnlobject->stop),
- GST_TIME_ARGS (gnlobject->pending_start),
- GST_TIME_ARGS (gnlobject->pending_duration));
- g_object_notify_by_pspec (G_OBJECT (gnlobject), properties[PROP_STOP]);
+ ", duration:%" GST_TIME_FORMAT "]", GST_TIME_ARGS (nleobject->stop),
+ GST_TIME_ARGS (nleobject->pending_start),
+ GST_TIME_ARGS (nleobject->pending_duration));
+ g_object_notify_by_pspec (G_OBJECT (nleobject), properties[PROP_STOP]);
}
}
static void
-update_values (GnlObject * object)
+update_values (NleObject * object)
{
CHECK_AND_SET (START, start, "start", G_GUINT64_FORMAT);
CHECK_AND_SET (INPOINT, inpoint, "inpoint", G_GUINT64_FORMAT);
@@ -458,7 +458,7 @@ update_values (GnlObject * object)
}
static gboolean
-gnl_object_commit_func (GnlObject * object, gboolean recurse)
+nle_object_commit_func (NleObject * object, gboolean recurse)
{
GST_INFO_OBJECT (object, "Commiting object changed");
@@ -476,12 +476,12 @@ gnl_object_commit_func (GnlObject * object, gboolean recurse)
}
static void
-gnl_object_set_property (GObject * object, guint prop_id,
+nle_object_set_property (GObject * object, guint prop_id,
const GValue * value, GParamSpec * pspec)
{
- GnlObject *gnlobject = (GnlObject *) object;
+ NleObject *nleobject = (NleObject *) object;
- g_return_if_fail (GNL_IS_OBJECT (object));
+ g_return_if_fail (NLE_IS_OBJECT (object));
GST_OBJECT_LOCK (object);
switch (prop_id) {
@@ -501,13 +501,13 @@ gnl_object_set_property (GObject * object, guint prop_id,
SET_PENDING_VALUE (active, "active", boolean, G_GUINT32_FORMAT);
break;
case PROP_CAPS:
- gnl_object_set_caps (gnlobject, gst_value_get_caps (value));
+ nle_object_set_caps (nleobject, gst_value_get_caps (value));
break;
case PROP_EXPANDABLE:
if (g_value_get_boolean (value))
- GST_OBJECT_FLAG_SET (gnlobject, GNL_OBJECT_EXPANDABLE);
+ GST_OBJECT_FLAG_SET (nleobject, NLE_OBJECT_EXPANDABLE);
else
- GST_OBJECT_FLAG_UNSET (gnlobject, GNL_OBJECT_EXPANDABLE);
+ GST_OBJECT_FLAG_UNSET (nleobject, NLE_OBJECT_EXPANDABLE);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
@@ -515,39 +515,39 @@ gnl_object_set_property (GObject * object, guint prop_id,
}
GST_OBJECT_UNLOCK (object);
- _update_stop (gnlobject);
+ _update_stop (nleobject);
}
static void
-gnl_object_get_property (GObject * object, guint prop_id,
+nle_object_get_property (GObject * object, guint prop_id,
GValue * value, GParamSpec * pspec)
{
- GnlObject *gnlobject = (GnlObject *) object;
+ NleObject *nleobject = (NleObject *) object;
switch (prop_id) {
case PROP_START:
- g_value_set_uint64 (value, gnlobject->pending_start);
+ g_value_set_uint64 (value, nleobject->pending_start);
break;
case PROP_DURATION:
- g_value_set_int64 (value, gnlobject->pending_duration);
+ g_value_set_int64 (value, nleobject->pending_duration);
break;
case PROP_STOP:
- g_value_set_uint64 (value, gnlobject->stop);
+ g_value_set_uint64 (value, nleobject->stop);
break;
case PROP_INPOINT:
- g_value_set_uint64 (value, gnlobject->pending_inpoint);
+ g_value_set_uint64 (value, nleobject->pending_inpoint);
break;
case PROP_PRIORITY:
- g_value_set_uint (value, gnlobject->pending_priority);
+ g_value_set_uint (value, nleobject->pending_priority);
break;
case PROP_ACTIVE:
- g_value_set_boolean (value, gnlobject->pending_active);
+ g_value_set_boolean (value, nleobject->pending_active);
break;
case PROP_CAPS:
- gst_value_set_caps (value, gnlobject->caps);
+ gst_value_set_caps (value, nleobject->caps);
break;
case PROP_EXPANDABLE:
- g_value_set_boolean (value, GNL_OBJECT_IS_EXPANDABLE (object));
+ g_value_set_boolean (value, NLE_OBJECT_IS_EXPANDABLE (object));
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
@@ -556,7 +556,7 @@ gnl_object_get_property (GObject * object, guint prop_id,
}
static GstStateChangeReturn
-gnl_object_change_state (GstElement * element, GstStateChange transition)
+nle_object_change_state (GstElement * element, GstStateChange transition)
{
GstStateChangeReturn ret = GST_STATE_CHANGE_SUCCESS;
@@ -568,11 +568,12 @@ gnl_object_change_state (GstElement * element, GstStateChange transition)
/* Going to READY and if we are not in a composition, we need to make
* sure that the object positioning state is properly commited */
if (parent) {
- if (g_strcmp0 (gst_element_get_name (GST_ELEMENT (parent)), "current-bin") &&
- !GNL_OBJECT_IS_COMPOSITION (GNL_OBJECT (element))) {
- GST_INFO ("Adding gnlobject to something that is not a composition,"
+ if (g_strcmp0 (gst_element_get_name (GST_ELEMENT (parent)),
+ "current-bin")
+ && !NLE_OBJECT_IS_COMPOSITION (NLE_OBJECT (element))) {
+ GST_INFO ("Adding nleobject to something that is not a composition,"
" commiting ourself");
- gnl_object_commit (GNL_OBJECT (element), FALSE);
+ nle_object_commit (NLE_OBJECT (element), FALSE);
}
gst_object_unref (parent);
@@ -580,7 +581,7 @@ gnl_object_change_state (GstElement * element, GstStateChange transition)
}
break;
case GST_STATE_CHANGE_READY_TO_PAUSED:
- if (gnl_object_prepare (GNL_OBJECT (element)) == GST_STATE_CHANGE_FAILURE) {
+ if (nle_object_prepare (NLE_OBJECT (element)) == GST_STATE_CHANGE_FAILURE) {
ret = GST_STATE_CHANGE_FAILURE;
goto beach;
}
@@ -600,8 +601,8 @@ gnl_object_change_state (GstElement * element, GstStateChange transition)
switch (transition) {
case GST_STATE_CHANGE_PAUSED_TO_READY:
- /* cleanup gnlobject */
- if (gnl_object_cleanup (GNL_OBJECT (element)) == GST_STATE_CHANGE_FAILURE)
+ /* cleanup nleobject */
+ if (nle_object_cleanup (NLE_OBJECT (element)) == GST_STATE_CHANGE_FAILURE)
ret = GST_STATE_CHANGE_FAILURE;
break;
default:
@@ -613,7 +614,7 @@ beach:
}
void
-gnl_object_set_commit_needed (GnlObject * object)
+nle_object_set_commit_needed (NleObject * object)
{
if (G_UNLIKELY (object->commiting)) {
GST_WARNING_OBJECT (object,
@@ -627,14 +628,14 @@ gnl_object_set_commit_needed (GnlObject * object)
}
gboolean
-gnl_object_commit (GnlObject * object, gboolean recurse)
+nle_object_commit (NleObject * object, gboolean recurse)
{
gboolean ret;
GST_DEBUG_OBJECT (object, "Commiting object state");
object->commiting = TRUE;
- ret = GNL_OBJECT_GET_CLASS (object)->commit (object, recurse);
+ ret = NLE_OBJECT_GET_CLASS (object)->commit (object, recurse);
object->commiting = FALSE;
return ret;
@@ -642,7 +643,7 @@ gnl_object_commit (GnlObject * object, gboolean recurse)
}
void
-gnl_object_reset (GnlObject * object)
+nle_object_reset (NleObject * object)
{
GST_INFO_OBJECT (object, "Resetting child timing values to default");
@@ -655,26 +656,26 @@ gnl_object_reset (GnlObject * object)
}
GType
-gnl_object_get_type (void)
+nle_object_get_type (void)
{
static volatile gsize type = 0;
if (g_once_init_enter (&type)) {
GType _type;
static const GTypeInfo info = {
- sizeof (GnlObjectClass),
+ sizeof (NleObjectClass),
NULL,
NULL,
- (GClassInitFunc) gnl_object_class_init,
+ (GClassInitFunc) nle_object_class_init,
NULL,
NULL,
- sizeof (GnlObject),
+ sizeof (NleObject),
0,
- (GInstanceInitFunc) gnl_object_init,
+ (GInstanceInitFunc) nle_object_init,
};
_type = g_type_register_static (GST_TYPE_BIN,
- "GnlObject", &info, G_TYPE_FLAG_ABSTRACT);
+ "NleObject", &info, G_TYPE_FLAG_ABSTRACT);
g_once_init_leave (&type, _type);
}
return type;
diff --git a/ges/nle/nleobject.h b/ges/nle/nleobject.h
new file mode 100644
index 00000000..02935b74
--- /dev/null
+++ b/ges/nle/nleobject.h
@@ -0,0 +1,170 @@
+/* GStreamer
+ * Copyright (C) 2001 Wim Taymans <wim.taymans@gmail.com>
+ * 2004-2008 Edward Hervey <bilboed@bilboed.com>
+ *
+ * nleobject.h: Header for base NleObject
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+
+#ifndef __NLE_OBJECT_H__
+#define __NLE_OBJECT_H__
+
+#include <gst/gst.h>
+
+#include "nletypes.h"
+
+G_BEGIN_DECLS
+#define NLE_TYPE_OBJECT \
+ (nle_object_get_type())
+#define NLE_OBJECT(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST((obj),NLE_TYPE_OBJECT,NleObject))
+#define NLE_OBJECT_CAST(obj) ((NleObject*) (obj))
+#define NLE_OBJECT_CLASS(klass) \
+ (G_TYPE_CHECK_CLASS_CAST((klass),NLE_TYPE_OBJECT,NleObjectClass))
+#define NLE_OBJECT_GET_CLASS(obj) \
+ (G_TYPE_INSTANCE_GET_CLASS ((obj), NLE_TYPE_OBJECT, NleObjectClass))
+#define NLE_IS_OBJECT(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE((obj),NLE_TYPE_OBJECT))
+#define NLE_IS_OBJECT_CLASS(obj) \
+ (G_TYPE_CHECK_CLASS_TYPE((klass),NLE_TYPE_OBJECT))
+
+#define NLE_OBJECT_SRC(obj) (((NleObject *) obj)->srcpad)
+
+/**
+ * NleObjectFlags:
+ * @NLE_OBJECT_IS_SOURCE:
+ * @NLE_OBJECT_IS_OPERATION:
+ * @NLE_OBJECT_IS_EXPANDABLE: The #NleObject start/stop will extend accross the full composition.
+ * @NLE_OBJECT_LAST_FLAG:
+*/
+
+typedef enum
+{
+ NLE_OBJECT_SOURCE = (GST_BIN_FLAG_LAST << 0),
+ NLE_OBJECT_OPERATION = (GST_BIN_FLAG_LAST << 1),
+ NLE_OBJECT_EXPANDABLE = (GST_BIN_FLAG_LAST << 2),
+ NLE_OBJECT_COMPOSITION = (GST_BIN_FLAG_LAST << 3),
+ /* padding */
+ NLE_OBJECT_LAST_FLAG = (GST_BIN_FLAG_LAST << 5)
+} NleObjectFlags;
+
+
+#define NLE_OBJECT_IS_SOURCE(obj) \
+ (GST_OBJECT_FLAG_IS_SET(obj, NLE_OBJECT_SOURCE))
+#define NLE_OBJECT_IS_OPERATION(obj) \
+ (GST_OBJECT_FLAG_IS_SET(obj, NLE_OBJECT_OPERATION))
+#define NLE_OBJECT_IS_EXPANDABLE(obj) \
+ (GST_OBJECT_FLAG_IS_SET(obj, NLE_OBJECT_EXPANDABLE))
+#define NLE_OBJECT_IS_COMPOSITION(obj) \
+ (GST_OBJECT_FLAG_IS_SET(obj, NLE_OBJECT_COMPOSITION))
+
+/* For internal usage only */
+#define NLE_OBJECT_START(obj) (NLE_OBJECT_CAST (obj)->start)
+#define NLE_OBJECT_STOP(obj) (NLE_OBJECT_CAST (obj)->stop)
+#define NLE_OBJECT_DURATION(obj) (NLE_OBJECT_CAST (obj)->duration)
+#define NLE_OBJECT_INPOINT(obj) (NLE_OBJECT_CAST (obj)->inpoint)
+#define NLE_OBJECT_PRIORITY(obj) (NLE_OBJECT_CAST (obj)->priority)
+
+#define NLE_OBJECT_IS_COMMITING(obj) (NLE_OBJECT_CAST (obj)->commiting)
+
+struct _NleObject
+{
+ GstBin parent;
+
+ GstPad *srcpad;
+
+ /* Time positionning */
+ GstClockTime start;
+ GstClockTime inpoint;
+ GstClockTimeDiff duration;
+
+ /* Pending time positionning
+ * Should be == GST_CLOCK_TIME_NONE when nothing to do
+ */
+ GstClockTime pending_start;
+ GstClockTime pending_inpoint;
+ GstClockTimeDiff pending_duration;
+ guint32 pending_priority;
+ gboolean pending_active;
+
+ gboolean commit_needed;
+ gboolean commiting; /* Set to TRUE during the commiting time only */
+
+ gboolean expandable;
+
+ /* read-only */
+ GstClockTime stop;
+
+ /* priority in parent */
+ guint32 priority;
+
+ /* active in parent */
+ gboolean active;
+
+ /* Filtering caps */
+ GstCaps *caps;
+
+ /* current segment seek <RO> */
+ gdouble segment_rate;
+ GstSeekFlags segment_flags;
+ gint64 segment_start;
+ gint64 segment_stop;
+
+ gboolean in_composition;
+};
+
+struct _NleObjectClass
+{
+ GstBinClass parent_class;
+
+ /* Signal method handler */
+ gboolean (*commit_signal_handler) (NleObject * object, gboolean recurse);
+
+ /* virtual methods for subclasses */
+ gboolean (*prepare) (NleObject * object);
+ gboolean (*cleanup) (NleObject * object);
+ gboolean (*commit) (NleObject * object, gboolean recurse);
+};
+
+GType nle_object_get_type (void);
+
+gboolean
+nle_object_to_media_time (NleObject * object, GstClockTime otime,
+ GstClockTime * mtime);
+
+gboolean
+nle_media_to_object_time (NleObject * object, GstClockTime mtime,
+ GstClockTime * otime);
+
+void
+nle_object_set_caps (NleObject * object, const GstCaps * caps);
+
+void
+nle_object_set_commit_needed (NleObject *object);
+
+gboolean
+nle_object_commit (NleObject *object, gboolean recurse);
+
+void
+nle_object_reset (NleObject *object);
+
+GstStateChangeReturn
+nle_object_cleanup (NleObject * object);
+
+G_END_DECLS
+#endif /* __NLE_OBJECT_H__ */
diff --git a/gnl/gnloperation.c b/ges/nle/nleoperation.c
index 480c70f7..378cae51 100644
--- a/gnl/gnloperation.c
+++ b/ges/nle/nleoperation.c
@@ -23,39 +23,39 @@
#include "config.h"
#endif
-#include "gnl.h"
+#include "nle.h"
/**
- * SECTION:element-gnloperation
+ * SECTION:element-nleoperation
*
* <refsect2>
* <para>
- * A GnlOperation performs a transformation or mixing operation on the
- * data from one or more #GnlSources, which is used to implement filters or
+ * A NleOperation performs a transformation or mixing operation on the
+ * data from one or more #NleSources, which is used to implement filters or
* effects.
* </para>
* </refsect2>
*/
-static GstStaticPadTemplate gnl_operation_src_template =
+static GstStaticPadTemplate nle_operation_src_template =
GST_STATIC_PAD_TEMPLATE ("src",
GST_PAD_SRC,
GST_PAD_ALWAYS,
GST_STATIC_CAPS_ANY);
-static GstStaticPadTemplate gnl_operation_sink_template =
+static GstStaticPadTemplate nle_operation_sink_template =
GST_STATIC_PAD_TEMPLATE ("sink%d",
GST_PAD_SINK,
GST_PAD_REQUEST,
GST_STATIC_CAPS_ANY);
-GST_DEBUG_CATEGORY_STATIC (gnloperation);
-#define GST_CAT_DEFAULT gnloperation
+GST_DEBUG_CATEGORY_STATIC (nleoperation);
+#define GST_CAT_DEFAULT nleoperation
#define _do_init \
- GST_DEBUG_CATEGORY_INIT (gnloperation, "gnloperation", GST_DEBUG_FG_BLUE | GST_DEBUG_BOLD, "GNonLin Operation element");
-#define gnl_operation_parent_class parent_class
-G_DEFINE_TYPE_WITH_CODE (GnlOperation, gnl_operation, GNL_TYPE_OBJECT,
+ GST_DEBUG_CATEGORY_INIT (nleoperation, "nleoperation", GST_DEBUG_FG_BLUE | GST_DEBUG_BOLD, "GNonLin Operation element");
+#define nle_operation_parent_class parent_class
+G_DEFINE_TYPE_WITH_CODE (NleOperation, nle_operation, NLE_TYPE_OBJECT,
_do_init);
enum
@@ -70,50 +70,50 @@ enum
LAST_SIGNAL
};
-static guint gnl_operation_signals[LAST_SIGNAL] = { 0 };
+static guint nle_operation_signals[LAST_SIGNAL] = { 0 };
-static void gnl_operation_dispose (GObject * object);
+static void nle_operation_dispose (GObject * object);
-static void gnl_operation_set_property (GObject * object, guint prop_id,
+static void nle_operation_set_property (GObject * object, guint prop_id,
const GValue * value, GParamSpec * pspec);
-static void gnl_operation_get_property (GObject * object, guint prop_id,
+static void nle_operation_get_property (GObject * object, guint prop_id,
GValue * value, GParamSpec * pspec);
-static gboolean gnl_operation_prepare (GnlObject * object);
-static gboolean gnl_operation_cleanup (GnlObject * object);
+static gboolean nle_operation_prepare (NleObject * object);
+static gboolean nle_operation_cleanup (NleObject * object);
-static gboolean gnl_operation_add_element (GstBin * bin, GstElement * element);
-static gboolean gnl_operation_remove_element (GstBin * bin,
+static gboolean nle_operation_add_element (GstBin * bin, GstElement * element);
+static gboolean nle_operation_remove_element (GstBin * bin,
GstElement * element);
-static GstPad *gnl_operation_request_new_pad (GstElement * element,
+static GstPad *nle_operation_request_new_pad (GstElement * element,
GstPadTemplate * templ, const gchar * name, const GstCaps * caps);
-static void gnl_operation_release_pad (GstElement * element, GstPad * pad);
+static void nle_operation_release_pad (GstElement * element, GstPad * pad);
-static void synchronize_sinks (GnlOperation * operation);
-static gboolean remove_sink_pad (GnlOperation * operation, GstPad * sinkpad);
+static void synchronize_sinks (NleOperation * operation);
+static gboolean remove_sink_pad (NleOperation * operation, GstPad * sinkpad);
static void
-gnl_operation_class_init (GnlOperationClass * klass)
+nle_operation_class_init (NleOperationClass * klass)
{
GObjectClass *gobject_class = (GObjectClass *) klass;
GstBinClass *gstbin_class = (GstBinClass *) klass;
GstElementClass *gstelement_class = (GstElementClass *) klass;
- GnlObjectClass *gnlobject_class = (GnlObjectClass *) klass;
+ NleObjectClass *nleobject_class = (NleObjectClass *) klass;
gst_element_class_set_static_metadata (gstelement_class, "GNonLin Operation",
"Filter/Editor",
- "Encapsulates filters/effects for use with GNL Objects",
+ "Encapsulates filters/effects for use with NLE Objects",
"Wim Taymans <wim.taymans@gmail.com>, Edward Hervey <bilboed@bilboed.com>");
- gobject_class->dispose = GST_DEBUG_FUNCPTR (gnl_operation_dispose);
+ gobject_class->dispose = GST_DEBUG_FUNCPTR (nle_operation_dispose);
- gobject_class->set_property = GST_DEBUG_FUNCPTR (gnl_operation_set_property);
- gobject_class->get_property = GST_DEBUG_FUNCPTR (gnl_operation_get_property);
+ gobject_class->set_property = GST_DEBUG_FUNCPTR (nle_operation_set_property);
+ gobject_class->get_property = GST_DEBUG_FUNCPTR (nle_operation_get_property);
/**
- * GnlOperation:sinks:
+ * NleOperation:sinks:
*
* Specifies the number of sink pads the operation should provide.
* If the sinks property is -1 (the default) pads are only created as
@@ -125,47 +125,47 @@ gnl_operation_class_init (GnlOperationClass * klass)
G_PARAM_READWRITE));
/**
- * GnlOperation:input-priority-changed:
+ * NleOperation:input-priority-changed:
* @pad: The operation's input pad whose priority changed.
* @priority: The new priority
*
* Signals that the @priority of the stream being fed to the given @pad
* might have changed.
*/
- gnl_operation_signals[INPUT_PRIORITY_CHANGED] =
+ nle_operation_signals[INPUT_PRIORITY_CHANGED] =
g_signal_new ("input-priority-changed", G_TYPE_FROM_CLASS (klass),
- G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GnlOperationClass,
+ G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (NleOperationClass,
input_priority_changed), NULL, NULL, g_cclosure_marshal_generic,
G_TYPE_NONE, 2, GST_TYPE_PAD, G_TYPE_UINT);
gstelement_class->request_new_pad =
- GST_DEBUG_FUNCPTR (gnl_operation_request_new_pad);
- gstelement_class->release_pad = GST_DEBUG_FUNCPTR (gnl_operation_release_pad);
+ GST_DEBUG_FUNCPTR (nle_operation_request_new_pad);
+ gstelement_class->release_pad = GST_DEBUG_FUNCPTR (nle_operation_release_pad);
- gstbin_class->add_element = GST_DEBUG_FUNCPTR (gnl_operation_add_element);
+ gstbin_class->add_element = GST_DEBUG_FUNCPTR (nle_operation_add_element);
gstbin_class->remove_element =
- GST_DEBUG_FUNCPTR (gnl_operation_remove_element);
+ GST_DEBUG_FUNCPTR (nle_operation_remove_element);
- gnlobject_class->prepare = GST_DEBUG_FUNCPTR (gnl_operation_prepare);
- gnlobject_class->cleanup = GST_DEBUG_FUNCPTR (gnl_operation_cleanup);
+ nleobject_class->prepare = GST_DEBUG_FUNCPTR (nle_operation_prepare);
+ nleobject_class->cleanup = GST_DEBUG_FUNCPTR (nle_operation_cleanup);
gst_element_class_add_pad_template (gstelement_class,
- gst_static_pad_template_get (&gnl_operation_src_template));
+ gst_static_pad_template_get (&nle_operation_src_template));
gst_element_class_add_pad_template (gstelement_class,
- gst_static_pad_template_get (&gnl_operation_sink_template));
+ gst_static_pad_template_get (&nle_operation_sink_template));
}
static void
-gnl_operation_dispose (GObject * object)
+nle_operation_dispose (GObject * object)
{
- GnlOperation *oper = (GnlOperation *) object;
+ NleOperation *oper = (NleOperation *) object;
GST_DEBUG_OBJECT (object, "Disposing of source pad");
- gnl_object_ghost_pad_set_target (GNL_OBJECT (object),
- GNL_OBJECT (object)->srcpad, NULL);
+ nle_object_ghost_pad_set_target (NLE_OBJECT (object),
+ NLE_OBJECT (object)->srcpad, NULL);
GST_DEBUG_OBJECT (object, "Disposing of sink pad(s)");
while (oper->sinks) {
@@ -178,7 +178,7 @@ gnl_operation_dispose (GObject * object)
}
static void
-gnl_operation_reset (GnlOperation * operation)
+nle_operation_reset (NleOperation * operation)
{
operation->num_sinks = 1;
operation->realsinks = 0;
@@ -186,9 +186,9 @@ gnl_operation_reset (GnlOperation * operation)
}
static void
-gnl_operation_init (GnlOperation * operation)
+nle_operation_init (NleOperation * operation)
{
- gnl_operation_reset (operation);
+ nle_operation_reset (operation);
operation->element = NULL;
}
@@ -296,7 +296,7 @@ get_src_pad (GstElement * element)
* Returns : The number of static sink pads of the controlled element.
*/
static guint
-get_nb_static_sinks (GnlOperation * oper)
+get_nb_static_sinks (NleOperation * oper)
{
GstIterator *sinkpads;
gboolean done = FALSE;
@@ -332,9 +332,9 @@ get_nb_static_sinks (GnlOperation * oper)
}
static gboolean
-gnl_operation_add_element (GstBin * bin, GstElement * element)
+nle_operation_add_element (GstBin * bin, GstElement * element)
{
- GnlOperation *operation = (GnlOperation *) bin;
+ NleOperation *operation = (NleOperation *) bin;
gboolean res = FALSE;
gboolean isdynamic;
@@ -360,8 +360,8 @@ gnl_operation_add_element (GstBin * bin, GstElement * element)
operation->element = element;
operation->dynamicsinks = isdynamic;
- gnl_object_ghost_pad_set_target (GNL_OBJECT (operation),
- GNL_OBJECT (operation)->srcpad, srcpad);
+ nle_object_ghost_pad_set_target (NLE_OBJECT (operation),
+ NLE_OBJECT (operation)->srcpad, srcpad);
/* Remove the reference get_src_pad gave us */
gst_object_unref (srcpad);
@@ -379,9 +379,9 @@ gnl_operation_add_element (GstBin * bin, GstElement * element)
}
static gboolean
-gnl_operation_remove_element (GstBin * bin, GstElement * element)
+nle_operation_remove_element (GstBin * bin, GstElement * element)
{
- GnlOperation *operation = (GnlOperation *) bin;
+ NleOperation *operation = (NleOperation *) bin;
gboolean res = FALSE;
if (operation->element) {
@@ -396,7 +396,7 @@ gnl_operation_remove_element (GstBin * bin, GstElement * element)
}
static void
-gnl_operation_set_sinks (GnlOperation * operation, guint sinks)
+nle_operation_set_sinks (NleOperation * operation, guint sinks)
{
/* FIXME : Check if sinkpad of element is on-demand .... */
@@ -405,14 +405,14 @@ gnl_operation_set_sinks (GnlOperation * operation, guint sinks)
}
static void
-gnl_operation_set_property (GObject * object, guint prop_id,
+nle_operation_set_property (GObject * object, guint prop_id,
const GValue * value, GParamSpec * pspec)
{
- GnlOperation *operation = (GnlOperation *) object;
+ NleOperation *operation = (NleOperation *) object;
switch (prop_id) {
case ARG_SINKS:
- gnl_operation_set_sinks (operation, g_value_get_int (value));
+ nle_operation_set_sinks (operation, g_value_get_int (value));
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
@@ -421,10 +421,10 @@ gnl_operation_set_property (GObject * object, guint prop_id,
}
static void
-gnl_operation_get_property (GObject * object, guint prop_id,
+nle_operation_get_property (GObject * object, guint prop_id,
GValue * value, GParamSpec * pspec)
{
- GnlOperation *operation = (GnlOperation *) object;
+ NleOperation *operation = (NleOperation *) object;
switch (prop_id) {
case ARG_SINKS:
@@ -443,7 +443,7 @@ gnl_operation_get_property (GObject * object, guint prop_id,
* Returns NULL if there's no more unused sink pads.
*/
static GstPad *
-get_unused_static_sink_pad (GnlOperation * operation)
+get_unused_static_sink_pad (NleOperation * operation)
{
GstIterator *pads;
gboolean done = FALSE;
@@ -513,7 +513,7 @@ get_unused_static_sink_pad (GnlOperation * operation)
}
GstPad *
-get_unlinked_sink_ghost_pad (GnlOperation * operation)
+get_unlinked_sink_ghost_pad (NleOperation * operation)
{
GstIterator *pads;
gboolean done = FALSE;
@@ -566,7 +566,7 @@ get_unlinked_sink_ghost_pad (GnlOperation * operation)
}
static GstPad *
-get_request_sink_pad (GnlOperation * operation)
+get_request_sink_pad (NleOperation * operation)
{
GstPad *pad = NULL;
GList *templates;
@@ -597,7 +597,7 @@ get_request_sink_pad (GnlOperation * operation)
}
static GstPad *
-add_sink_pad (GnlOperation * operation)
+add_sink_pad (NleOperation * operation)
{
GstPad *gpad = NULL;
GstPad *ret = NULL;
@@ -614,7 +614,7 @@ add_sink_pad (GnlOperation * operation)
/* static sink pads */
ret = get_unused_static_sink_pad (operation);
if (ret) {
- gpad = gnl_object_ghost_pad ((GnlObject *) operation, GST_PAD_NAME (ret),
+ gpad = nle_object_ghost_pad ((NleObject *) operation, GST_PAD_NAME (ret),
ret);
gst_object_unref (ret);
}
@@ -624,7 +624,7 @@ add_sink_pad (GnlOperation * operation)
/* request sink pads */
ret = get_request_sink_pad (operation);
if (ret) {
- gpad = gnl_object_ghost_pad ((GnlObject *) operation, GST_PAD_NAME (ret),
+ gpad = nle_object_ghost_pad ((NleObject *) operation, GST_PAD_NAME (ret),
ret);
gst_object_unref (ret);
}
@@ -643,7 +643,7 @@ add_sink_pad (GnlOperation * operation)
}
static gboolean
-remove_sink_pad (GnlOperation * operation, GstPad * sinkpad)
+remove_sink_pad (NleOperation * operation, GstPad * sinkpad)
{
gboolean ret = TRUE;
@@ -668,13 +668,13 @@ remove_sink_pad (GnlOperation * operation, GstPad * sinkpad)
if (target) {
/* release the target pad */
- gnl_object_ghost_pad_set_target ((GnlObject *) operation, sinkpad, NULL);
+ nle_object_ghost_pad_set_target ((NleObject *) operation, sinkpad, NULL);
if (operation->dynamicsinks)
gst_element_release_request_pad (operation->element, target);
gst_object_unref (target);
}
operation->sinks = g_list_remove (operation->sinks, sinkpad);
- gnl_object_remove_ghost_pad ((GnlObject *) operation, sinkpad);
+ nle_object_remove_ghost_pad ((NleObject *) operation, sinkpad);
operation->realsinks--;
}
@@ -683,7 +683,7 @@ beach:
}
static void
-synchronize_sinks (GnlOperation * operation)
+synchronize_sinks (NleOperation * operation)
{
GST_DEBUG_OBJECT (operation, "num_sinks:%d , realsinks:%d, dynamicsinks:%d",
@@ -707,29 +707,29 @@ synchronize_sinks (GnlOperation * operation)
}
static gboolean
-gnl_operation_prepare (GnlObject * object)
+nle_operation_prepare (NleObject * object)
{
/* Prepare the pads */
- synchronize_sinks ((GnlOperation *) object);
+ synchronize_sinks ((NleOperation *) object);
return TRUE;
}
static gboolean
-gnl_operation_cleanup (GnlObject * object)
+nle_operation_cleanup (NleObject * object)
{
- GnlOperation *oper = (GnlOperation *) object;
+ NleOperation *oper = (NleOperation *) object;
if (oper->dynamicsinks) {
GST_DEBUG ("Resetting dynamic sinks");
- gnl_operation_set_sinks (oper, 0);
+ nle_operation_set_sinks (oper, 0);
}
return TRUE;
}
void
-gnl_operation_hard_cleanup (GnlOperation * operation)
+nle_operation_hard_cleanup (NleOperation * operation)
{
gboolean done = FALSE;
@@ -764,15 +764,15 @@ gnl_operation_hard_cleanup (GnlOperation * operation)
break;
}
}
- gnl_object_cleanup (GNL_OBJECT (operation));
+ nle_object_cleanup (NLE_OBJECT (operation));
}
static GstPad *
-gnl_operation_request_new_pad (GstElement * element, GstPadTemplate * templ,
+nle_operation_request_new_pad (GstElement * element, GstPadTemplate * templ,
const gchar * name, const GstCaps * caps)
{
- GnlOperation *operation = (GnlOperation *) element;
+ NleOperation *operation = (NleOperation *) element;
GstPad *ret;
GST_DEBUG ("template:%s name:%s", templ->name_template, name);
@@ -784,34 +784,34 @@ gnl_operation_request_new_pad (GstElement * element, GstPadTemplate * templ,
return NULL;
}
- ret = add_sink_pad ((GnlOperation *) element);
+ ret = add_sink_pad ((NleOperation *) element);
return ret;
}
static void
-gnl_operation_release_pad (GstElement * element, GstPad * pad)
+nle_operation_release_pad (GstElement * element, GstPad * pad)
{
GST_DEBUG ("pad %s:%s", GST_DEBUG_PAD_NAME (pad));
- remove_sink_pad ((GnlOperation *) element, pad);
+ remove_sink_pad ((NleOperation *) element, pad);
}
void
-gnl_operation_signal_input_priority_changed (GnlOperation * operation,
+nle_operation_signal_input_priority_changed (NleOperation * operation,
GstPad * pad, guint32 priority)
{
GST_DEBUG_OBJECT (operation, "pad:%s:%s, priority:%d",
GST_DEBUG_PAD_NAME (pad), priority);
- g_signal_emit (operation, gnl_operation_signals[INPUT_PRIORITY_CHANGED],
+ g_signal_emit (operation, nle_operation_signals[INPUT_PRIORITY_CHANGED],
0, pad, priority);
}
void
-gnl_operation_update_base_time (GnlOperation * operation,
+nle_operation_update_base_time (NleOperation * operation,
GstClockTime timestamp)
{
- if (!gnl_object_to_media_time (GNL_OBJECT (operation),
+ if (!nle_object_to_media_time (NLE_OBJECT (operation),
timestamp, &operation->next_base_time)) {
GST_WARNING_OBJECT (operation, "Trying to set a basetime outside of "
"ourself");
diff --git a/gnl/gnloperation.h b/ges/nle/nleoperation.h
index d26d3155..1ad94e69 100644
--- a/gnl/gnloperation.h
+++ b/ges/nle/nleoperation.h
@@ -2,7 +2,7 @@
* Copyright (C) 2001 Wim Taymans <wim.taymans@chello.be>
* 2004 Edward Hervey <bilboed@bilboed.com>
*
- * gnloperation.h: Header for base GnlOperation
+ * nleoperation.h: Header for base NleOperation
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -21,26 +21,26 @@
*/
-#ifndef __GNL_OPERATION_H__
-#define __GNL_OPERATION_H__
+#ifndef __NLE_OPERATION_H__
+#define __NLE_OPERATION_H__
#include <gst/gst.h>
-#include "gnlobject.h"
+#include "nleobject.h"
G_BEGIN_DECLS
-#define GNL_TYPE_OPERATION \
- (gnl_operation_get_type())
-#define GNL_OPERATION(obj) \
- (G_TYPE_CHECK_INSTANCE_CAST((obj),GNL_TYPE_OPERATION,GnlOperation))
-#define GNL_OPERATION_CLASS(klass) \
- (G_TYPE_CHECK_CLASS_CAST((klass),GNL_TYPE_OPERATION,GnlOperationClass))
-#define GNL_IS_OPERATION(obj) \
- (G_TYPE_CHECK_INSTANCE_TYPE((obj),GNL_TYPE_OPERATION))
-#define GNL_IS_OPERATION_CLASS(obj) \
- (G_TYPE_CHECK_CLASS_TYPE((klass),GNL_TYPE_OPERATION))
- struct _GnlOperation
+#define NLE_TYPE_OPERATION \
+ (nle_operation_get_type())
+#define NLE_OPERATION(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST((obj),NLE_TYPE_OPERATION,NleOperation))
+#define NLE_OPERATION_CLASS(klass) \
+ (G_TYPE_CHECK_CLASS_CAST((klass),NLE_TYPE_OPERATION,NleOperationClass))
+#define NLE_IS_OPERATION(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE((obj),NLE_TYPE_OPERATION))
+#define NLE_IS_OPERATION_CLASS(obj) \
+ (G_TYPE_CHECK_CLASS_TYPE((klass),NLE_TYPE_OPERATION))
+ struct _NleOperation
{
- GnlObject parent;
+ NleObject parent;
/* <private> */
@@ -64,27 +64,27 @@ G_BEGIN_DECLS
GstClockTime next_base_time;
};
-struct _GnlOperationClass
+struct _NleOperationClass
{
- GnlObjectClass parent_class;
+ NleObjectClass parent_class;
- void (*input_priority_changed) (GnlOperation * operation, GstPad *pad, guint32 priority);
+ void (*input_priority_changed) (NleOperation * operation, GstPad *pad, guint32 priority);
};
-GstPad * get_unlinked_sink_ghost_pad (GnlOperation * operation);
+GstPad * get_unlinked_sink_ghost_pad (NleOperation * operation);
void
-gnl_operation_signal_input_priority_changed(GnlOperation * operation, GstPad *pad,
+nle_operation_signal_input_priority_changed(NleOperation * operation, GstPad *pad,
guint32 priority);
-void gnl_operation_update_base_time (GnlOperation *operation,
+void nle_operation_update_base_time (NleOperation *operation,
GstClockTime timestamp);
-void gnl_operation_hard_cleanup (GnlOperation *operation);
+void nle_operation_hard_cleanup (NleOperation *operation);
/* normal GOperation stuff */
-GType gnl_operation_get_type (void);
+GType nle_operation_get_type (void);
G_END_DECLS
-#endif /* __GNL_OPERATION_H__ */
+#endif /* __NLE_OPERATION_H__ */
diff --git a/gnl/gnlsource.c b/ges/nle/nlesource.c
index dd21a2b7..b85bf105 100644
--- a/gnl/gnlsource.c
+++ b/ges/nle/nlesource.c
@@ -23,30 +23,30 @@
#include "config.h"
#endif
-#include "gnl.h"
+#include "nle.h"
/**
- * SECTION:element-gnlsource
+ * SECTION:element-nlesource
*
- * The GnlSource encapsulates a pipeline which produces data for processing
- * in a #GnlComposition.
+ * The NleSource encapsulates a pipeline which produces data for processing
+ * in a #NleComposition.
*/
-static GstStaticPadTemplate gnl_source_src_template =
+static GstStaticPadTemplate nle_source_src_template =
GST_STATIC_PAD_TEMPLATE ("src",
GST_PAD_SRC,
GST_PAD_ALWAYS,
GST_STATIC_CAPS_ANY);
-GST_DEBUG_CATEGORY_STATIC (gnlsource);
-#define GST_CAT_DEFAULT gnlsource
+GST_DEBUG_CATEGORY_STATIC (nlesource);
+#define GST_CAT_DEFAULT nlesource
#define _do_init \
- GST_DEBUG_CATEGORY_INIT (gnlsource, "gnlsource", GST_DEBUG_FG_BLUE | GST_DEBUG_BOLD, "GNonLin Source Element");
-#define gnl_source_parent_class parent_class
-G_DEFINE_TYPE_WITH_CODE (GnlSource, gnl_source, GNL_TYPE_OBJECT, _do_init);
+ GST_DEBUG_CATEGORY_INIT (nlesource, "nlesource", GST_DEBUG_FG_BLUE | GST_DEBUG_BOLD, "GNonLin Source Element");
+#define nle_source_parent_class parent_class
+G_DEFINE_TYPE_WITH_CODE (NleSource, nle_source, NLE_TYPE_OBJECT, _do_init);
-struct _GnlSourcePrivate
+struct _NleSourcePrivate
{
gboolean dispose_has_run;
@@ -60,69 +60,69 @@ struct _GnlSourcePrivate
GstPad *staticpad; /* The only pad. We keep an extra ref */
};
-static gboolean gnl_source_prepare (GnlObject * object);
-static gboolean gnl_source_add_element (GstBin * bin, GstElement * element);
-static gboolean gnl_source_remove_element (GstBin * bin, GstElement * element);
-static void gnl_source_dispose (GObject * object);
+static gboolean nle_source_prepare (NleObject * object);
+static gboolean nle_source_add_element (GstBin * bin, GstElement * element);
+static gboolean nle_source_remove_element (GstBin * bin, GstElement * element);
+static void nle_source_dispose (GObject * object);
static gboolean
-gnl_source_control_element_func (GnlSource * source, GstElement * element);
+nle_source_control_element_func (NleSource * source, GstElement * element);
static void
-gnl_source_class_init (GnlSourceClass * klass)
+nle_source_class_init (NleSourceClass * klass)
{
GObjectClass *gobject_class;
GstElementClass *gstelement_class;
GstBinClass *gstbin_class;
- GnlObjectClass *gnlobject_class;
+ NleObjectClass *nleobject_class;
gobject_class = (GObjectClass *) klass;
gstelement_class = (GstElementClass *) klass;
gstbin_class = (GstBinClass *) klass;
- gnlobject_class = (GnlObjectClass *) klass;
+ nleobject_class = (NleObjectClass *) klass;
- g_type_class_add_private (klass, sizeof (GnlSourcePrivate));
+ g_type_class_add_private (klass, sizeof (NleSourcePrivate));
gst_element_class_set_static_metadata (gstelement_class, "GNonLin Source",
"Filter/Editor",
"Manages source elements",
"Wim Taymans <wim.taymans@gmail.com>, Edward Hervey <bilboed@bilboed.com>");
- parent_class = g_type_class_ref (GNL_TYPE_OBJECT);
+ parent_class = g_type_class_ref (NLE_TYPE_OBJECT);
- klass->control_element = GST_DEBUG_FUNCPTR (gnl_source_control_element_func);
+ klass->control_element = GST_DEBUG_FUNCPTR (nle_source_control_element_func);
- gnlobject_class->prepare = GST_DEBUG_FUNCPTR (gnl_source_prepare);
+ nleobject_class->prepare = GST_DEBUG_FUNCPTR (nle_source_prepare);
- gstbin_class->add_element = GST_DEBUG_FUNCPTR (gnl_source_add_element);
- gstbin_class->remove_element = GST_DEBUG_FUNCPTR (gnl_source_remove_element);
+ gstbin_class->add_element = GST_DEBUG_FUNCPTR (nle_source_add_element);
+ gstbin_class->remove_element = GST_DEBUG_FUNCPTR (nle_source_remove_element);
- gobject_class->dispose = GST_DEBUG_FUNCPTR (gnl_source_dispose);
+ gobject_class->dispose = GST_DEBUG_FUNCPTR (nle_source_dispose);
gst_element_class_add_pad_template (gstelement_class,
- gst_static_pad_template_get (&gnl_source_src_template));
+ gst_static_pad_template_get (&nle_source_src_template));
}
static void
-gnl_source_init (GnlSource * source)
+nle_source_init (NleSource * source)
{
- GST_OBJECT_FLAG_SET (source, GNL_OBJECT_SOURCE);
+ GST_OBJECT_FLAG_SET (source, NLE_OBJECT_SOURCE);
source->element = NULL;
source->priv =
- G_TYPE_INSTANCE_GET_PRIVATE (source, GNL_TYPE_SOURCE, GnlSourcePrivate);
+ G_TYPE_INSTANCE_GET_PRIVATE (source, NLE_TYPE_SOURCE, NleSourcePrivate);
GST_DEBUG_OBJECT (source, "Setting GstBin async-handling to TRUE");
g_object_set (G_OBJECT (source), "async-handling", TRUE, NULL);
}
static void
-gnl_source_dispose (GObject * object)
+nle_source_dispose (GObject * object)
{
- GnlObject *gnlobject = (GnlObject *) object;
- GnlSource *source = (GnlSource *) object;
- GnlSourcePrivate *priv = source->priv;
+ NleObject *nleobject = (NleObject *) object;
+ NleSource *source = (NleSource *) object;
+ NleSourcePrivate *priv = source->priv;
GST_DEBUG_OBJECT (object, "dispose");
@@ -136,7 +136,7 @@ gnl_source_dispose (GObject * object)
priv->dispose_has_run = TRUE;
if (priv->ghostedpad)
- gnl_object_ghost_pad_set_target (gnlobject, gnlobject->srcpad, NULL);
+ nle_object_ghost_pad_set_target (nleobject, nleobject->srcpad, NULL);
if (priv->staticpad) {
gst_object_unref (priv->staticpad);
@@ -148,11 +148,11 @@ gnl_source_dispose (GObject * object)
static void
element_pad_added_cb (GstElement * element G_GNUC_UNUSED, GstPad * pad,
- GnlSource * source)
+ NleSource * source)
{
GstCaps *srccaps;
- GnlSourcePrivate *priv = source->priv;
- GnlObject *gnlobject = (GnlObject *) source;
+ NleSourcePrivate *priv = source->priv;
+ NleObject *nleobject = (NleObject *) source;
GST_DEBUG_OBJECT (source, "pad %s:%s", GST_DEBUG_PAD_NAME (pad));
@@ -166,7 +166,7 @@ element_pad_added_cb (GstElement * element G_GNUC_UNUSED, GstPad * pad,
/* FIXME: pass filter caps to query_caps directly */
srccaps = gst_pad_query_caps (pad, NULL);
- if (gnlobject->caps && !gst_caps_can_intersect (srccaps, gnlobject->caps)) {
+ if (nleobject->caps && !gst_caps_can_intersect (srccaps, nleobject->caps)) {
gst_caps_unref (srccaps);
GST_DEBUG_OBJECT (source, "Pad doesn't have valid caps, ignoring");
return;
@@ -174,8 +174,8 @@ element_pad_added_cb (GstElement * element G_GNUC_UNUSED, GstPad * pad,
gst_caps_unref (srccaps);
priv->ghostedpad = pad;
- GST_DEBUG_OBJECT (gnlobject, "SET target %" GST_PTR_FORMAT, pad);
- gnl_object_ghost_pad_set_target (gnlobject, gnlobject->srcpad, pad);
+ GST_DEBUG_OBJECT (nleobject, "SET target %" GST_PTR_FORMAT, pad);
+ nle_object_ghost_pad_set_target (nleobject, nleobject->srcpad, pad);
GST_DEBUG_OBJECT (source, "Using pad pad %s:%s as a target now!",
GST_DEBUG_PAD_NAME (pad));
@@ -183,10 +183,10 @@ element_pad_added_cb (GstElement * element G_GNUC_UNUSED, GstPad * pad,
static void
element_pad_removed_cb (GstElement * element G_GNUC_UNUSED, GstPad * pad,
- GnlSource * source)
+ NleSource * source)
{
- GnlSourcePrivate *priv = source->priv;
- GnlObject *gnlobject = (GnlObject *) source;
+ NleSourcePrivate *priv = source->priv;
+ NleObject *nleobject = (NleObject *) source;
GST_DEBUG_OBJECT (source, "pad %s:%s (controlled pad %s:%s)",
GST_DEBUG_PAD_NAME (pad), GST_DEBUG_PAD_NAME (priv->ghostedpad));
@@ -197,7 +197,7 @@ element_pad_removed_cb (GstElement * element G_GNUC_UNUSED, GstPad * pad,
GST_DEBUG_OBJECT (source, "Clearing up ghostpad");
- gnl_object_ghost_pad_set_target (GNL_OBJECT (source), gnlobject->srcpad,
+ nle_object_ghost_pad_set_target (NLE_OBJECT (source), nleobject->srcpad,
NULL);
priv->ghostedpad = NULL;
} else {
@@ -228,12 +228,12 @@ compare_src_pad (GValue * item, GstCaps * caps)
/*
get_valid_src_pad
- Returns True if there's a src pad compatible with the GnlObject caps in the
+ Returns True if there's a src pad compatible with the NleObject caps in the
given element. Fills in pad if so. The returned pad has an incremented refcount
*/
static gboolean
-get_valid_src_pad (GnlSource * source, GstElement * element, GstPad ** pad)
+get_valid_src_pad (NleSource * source, GstElement * element, GstPad ** pad)
{
gboolean res = FALSE;
GstIterator *srcpads;
@@ -243,7 +243,7 @@ get_valid_src_pad (GnlSource * source, GstElement * element, GstPad ** pad)
srcpads = gst_element_iterate_src_pads (element);
if (gst_iterator_find_custom (srcpads, (GCompareFunc) compare_src_pad, &item,
- GNL_OBJECT (source)->caps)) {
+ NLE_OBJECT (source)->caps)) {
*pad = g_value_get_object (&item);
gst_object_ref (*pad);
g_value_reset (&item);
@@ -285,9 +285,9 @@ has_dynamic_srcpads (GstElement * element)
}
static gboolean
-gnl_source_control_element_func (GnlSource * source, GstElement * element)
+nle_source_control_element_func (NleSource * source, GstElement * element)
{
- GnlSourcePrivate *priv = source->priv;
+ NleSourcePrivate *priv = source->priv;
GstPad *pad = NULL;
g_return_val_if_fail (source->element == NULL, FALSE);
@@ -300,8 +300,8 @@ gnl_source_control_element_func (GnlSource * source, GstElement * element)
if (get_valid_src_pad (source, source->element, &pad)) {
priv->staticpad = pad;
- gnl_object_ghost_pad_set_target (GNL_OBJECT (source),
- GNL_OBJECT_SRC (source), pad);
+ nle_object_ghost_pad_set_target (NLE_OBJECT (source),
+ NLE_OBJECT_SRC (source), pad);
priv->dynamicpads = FALSE;
} else {
priv->dynamicpads = has_dynamic_srcpads (element);
@@ -322,15 +322,15 @@ gnl_source_control_element_func (GnlSource * source, GstElement * element)
}
static gboolean
-gnl_source_add_element (GstBin * bin, GstElement * element)
+nle_source_add_element (GstBin * bin, GstElement * element)
{
- GnlSource *source = (GnlSource *) bin;
+ NleSource *source = (NleSource *) bin;
gboolean pret;
GST_DEBUG_OBJECT (source, "Adding element %s", GST_ELEMENT_NAME (element));
if (source->element) {
- GST_WARNING_OBJECT (bin, "GnlSource can only handle one element at a time");
+ GST_WARNING_OBJECT (bin, "NleSource can only handle one element at a time");
return FALSE;
}
@@ -338,17 +338,17 @@ gnl_source_add_element (GstBin * bin, GstElement * element)
pret = GST_BIN_CLASS (parent_class)->add_element (bin, element);
if (pret) {
- gnl_source_control_element_func (source, element);
+ nle_source_control_element_func (source, element);
}
return pret;
}
static gboolean
-gnl_source_remove_element (GstBin * bin, GstElement * element)
+nle_source_remove_element (GstBin * bin, GstElement * element)
{
- GnlSource *source = (GnlSource *) bin;
- GnlObject *gnlobject = (GnlObject *) element;
- GnlSourcePrivate *priv = source->priv;
+ NleSource *source = (NleSource *) bin;
+ NleObject *nleobject = (NleObject *) element;
+ NleSourcePrivate *priv = source->priv;
gboolean pret;
GST_DEBUG_OBJECT (source, "Removing element %s", GST_ELEMENT_NAME (element));
@@ -361,7 +361,7 @@ gnl_source_remove_element (GstBin * bin, GstElement * element)
}
if (pret) {
- gnl_object_ghost_pad_set_target (GNL_OBJECT (source), gnlobject->srcpad,
+ nle_object_ghost_pad_set_target (NLE_OBJECT (source), nleobject->srcpad,
NULL);
/* remove signal handlers */
@@ -382,17 +382,17 @@ gnl_source_remove_element (GstBin * bin, GstElement * element)
}
static gboolean
-gnl_source_prepare (GnlObject * object)
+nle_source_prepare (NleObject * object)
{
GstPad *pad;
- GnlSource *source = GNL_SOURCE (object);
- GnlSourcePrivate *priv = source->priv;
+ NleSource *source = NLE_SOURCE (object);
+ NleSourcePrivate *priv = source->priv;
GstElement *parent =
(GstElement *) gst_element_get_parent ((GstElement *) object);
if (!source->element) {
GST_WARNING_OBJECT (source,
- "GnlSource doesn't have an element to control !");
+ "NleSource doesn't have an element to control !");
if (parent)
gst_object_unref (parent);
return FALSE;
diff --git a/gnl/gnlsource.h b/ges/nle/nlesource.h
index e488f2fd..e37eaa97 100644
--- a/gnl/gnlsource.h
+++ b/ges/nle/nlesource.h
@@ -2,7 +2,7 @@
* Copyright (C) 2001 Wim Taymans <wim.taymans@gmail.com>
* 2004-2008 Edward Hervey <bilboed@bilboed.com>
*
- * gnlsource.h: Header for base GnlSource
+ * nlesource.h: Header for base NleSource
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -21,46 +21,46 @@
*/
-#ifndef __GNL_SOURCE_H__
-#define __GNL_SOURCE_H__
+#ifndef __NLE_SOURCE_H__
+#define __NLE_SOURCE_H__
#include <gst/gst.h>
-#include "gnlobject.h"
+#include "nleobject.h"
G_BEGIN_DECLS
-#define GNL_TYPE_SOURCE \
- (gnl_source_get_type())
-#define GNL_SOURCE(obj) \
- (G_TYPE_CHECK_INSTANCE_CAST((obj),GNL_TYPE_SOURCE,GnlSource))
-#define GNL_SOURCE_CLASS(klass) \
- (G_TYPE_CHECK_CLASS_CAST((klass),GNL_TYPE_SOURCE,GnlSourceClass))
-#define GNL_SOURCE_GET_CLASS(obj) \
- (G_TYPE_INSTANCE_GET_CLASS ((obj), GNL_TYPE_SOURCE, GnlSourceClass))
-#define GNL_IS_SOURCE(obj) \
- (G_TYPE_CHECK_INSTANCE_TYPE((obj),GNL_TYPE_SOURCE))
-#define GNL_IS_SOURCE_CLASS(obj) \
- (G_TYPE_CHECK_CLASS_TYPE((klass),GNL_TYPE_SOURCE))
-typedef struct _GnlSourcePrivate GnlSourcePrivate;
+#define NLE_TYPE_SOURCE \
+ (nle_source_get_type())
+#define NLE_SOURCE(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST((obj),NLE_TYPE_SOURCE,NleSource))
+#define NLE_SOURCE_CLASS(klass) \
+ (G_TYPE_CHECK_CLASS_CAST((klass),NLE_TYPE_SOURCE,NleSourceClass))
+#define NLE_SOURCE_GET_CLASS(obj) \
+ (G_TYPE_INSTANCE_GET_CLASS ((obj), NLE_TYPE_SOURCE, NleSourceClass))
+#define NLE_IS_SOURCE(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE((obj),NLE_TYPE_SOURCE))
+#define NLE_IS_SOURCE_CLASS(obj) \
+ (G_TYPE_CHECK_CLASS_TYPE((klass),NLE_TYPE_SOURCE))
+typedef struct _NleSourcePrivate NleSourcePrivate;
-struct _GnlSource
+struct _NleSource
{
- GnlObject parent;
+ NleObject parent;
/* controlled source element, acces with gst_bin_[add|remove]_element */
GstElement *element;
- GnlSourcePrivate *priv;
+ NleSourcePrivate *priv;
};
-struct _GnlSourceClass
+struct _NleSourceClass
{
- GnlObjectClass parent_class;
+ NleObjectClass parent_class;
/* control_element() takes care of controlling the given element */
- gboolean (*control_element) (GnlSource * source, GstElement * element);
+ gboolean (*control_element) (NleSource * source, GstElement * element);
};
-GType gnl_source_get_type (void);
+GType nle_source_get_type (void);
G_END_DECLS
-#endif /* __GNL_SOURCE_H__ */
+#endif /* __NLE_SOURCE_H__ */
diff --git a/gnl/gnltypes.h b/ges/nle/nletypes.h
index 559c7d66..f84cb23b 100644
--- a/gnl/gnltypes.h
+++ b/ges/nle/nletypes.h
@@ -1,7 +1,7 @@
/* GStreamer
* Copyright (C) 2004 Edward Hervey <bilboed@bilboed.com>
*
- * gnltypes.h: Header for class definition
+ * nletypes.h: Header for class definition
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -19,24 +19,24 @@
* Boston, MA 02110-1301, USA.
*/
-#ifndef __GNL_TYPES_H__
-#define __GNL_TYPES_H__
+#ifndef __NLE_TYPES_H__
+#define __NLE_TYPES_H__
#include <glib.h>
-typedef struct _GnlObject GnlObject;
-typedef struct _GnlObjectClass GnlObjectClass;
+typedef struct _NleObject NleObject;
+typedef struct _NleObjectClass NleObjectClass;
-typedef struct _GnlComposition GnlComposition;
-typedef struct _GnlCompositionClass GnlCompositionClass;
+typedef struct _NleComposition NleComposition;
+typedef struct _NleCompositionClass NleCompositionClass;
-typedef struct _GnlOperation GnlOperation;
-typedef struct _GnlOperationClass GnlOperationClass;
+typedef struct _NleOperation NleOperation;
+typedef struct _NleOperationClass NleOperationClass;
-typedef struct _GnlSource GnlSource;
-typedef struct _GnlSourceClass GnlSourceClass;
+typedef struct _NleSource NleSource;
+typedef struct _NleSourceClass NleSourceClass;
-typedef struct _GnlURISource GnlURISource;
-typedef struct _GnlURISourceClass GnlURISourceClass;
+typedef struct _NleURISource NleURISource;
+typedef struct _NleURISourceClass NleURISourceClass;
#endif
diff --git a/gnl/gnlurisource.c b/ges/nle/nleurisource.c
index b02a8797..8fd2950a 100644
--- a/gnl/gnlurisource.c
+++ b/ges/nle/nleurisource.c
@@ -22,30 +22,30 @@
#include "config.h"
#endif
-#include "gnl.h"
-#include "gnlurisource.h"
+#include "nle.h"
+#include "nleurisource.h"
/**
- * SECTION:element-gnlurisource
+ * SECTION:element-nleurisource
*
- * GnlURISource is a #GnlSource which reads and decodes the contents
+ * NleURISource is a #NleSource which reads and decodes the contents
* of a given file. The data in the file is decoded using any available
* GStreamer plugins.
*/
-static GstStaticPadTemplate gnl_urisource_src_template =
+static GstStaticPadTemplate nle_urisource_src_template =
GST_STATIC_PAD_TEMPLATE ("src",
GST_PAD_SRC,
GST_PAD_SOMETIMES,
GST_STATIC_CAPS_ANY);
-GST_DEBUG_CATEGORY_STATIC (gnlurisource);
-#define GST_CAT_DEFAULT gnlurisource
+GST_DEBUG_CATEGORY_STATIC (nleurisource);
+#define GST_CAT_DEFAULT nleurisource
#define _do_init \
- GST_DEBUG_CATEGORY_INIT (gnlurisource, "gnlurisource", GST_DEBUG_FG_BLUE | GST_DEBUG_BOLD, "GNonLin URI Source Element");
-#define gnl_urisource_parent_class parent_class
-G_DEFINE_TYPE_WITH_CODE (GnlURISource, gnl_urisource, GNL_TYPE_SOURCE,
+ GST_DEBUG_CATEGORY_INIT (nleurisource, "nleurisource", GST_DEBUG_FG_BLUE | GST_DEBUG_BOLD, "GNonLin URI Source Element");
+#define nle_urisource_parent_class parent_class
+G_DEFINE_TYPE_WITH_CODE (NleURISource, nle_urisource, NLE_TYPE_SOURCE,
_do_init);
enum
@@ -54,51 +54,51 @@ enum
ARG_URI,
};
-static gboolean gnl_urisource_prepare (GnlObject * object);
+static gboolean nle_urisource_prepare (NleObject * object);
static void
-gnl_urisource_set_property (GObject * object, guint prop_id,
+nle_urisource_set_property (GObject * object, guint prop_id,
const GValue * value, GParamSpec * pspec);
static void
-gnl_urisource_get_property (GObject * object, guint prop_id,
+nle_urisource_get_property (GObject * object, guint prop_id,
GValue * value, GParamSpec * pspec);
static void
-gnl_urisource_class_init (GnlURISourceClass * klass)
+nle_urisource_class_init (NleURISourceClass * klass)
{
GObjectClass *gobject_class;
- GnlObjectClass *gnlobject_class;
+ NleObjectClass *nleobject_class;
GstElementClass *gstelement_class;
gobject_class = (GObjectClass *) klass;
gstelement_class = (GstElementClass *) klass;
- gnlobject_class = (GnlObjectClass *) klass;
- parent_class = g_type_class_ref (GNL_TYPE_SOURCE);
+ nleobject_class = (NleObjectClass *) klass;
+ parent_class = g_type_class_ref (NLE_TYPE_SOURCE);
gst_element_class_set_static_metadata (gstelement_class, "GNonLin URI Source",
"Filter/Editor",
"High-level URI Source element", "Edward Hervey <bilboed@bilboed.com>");
- gobject_class->set_property = GST_DEBUG_FUNCPTR (gnl_urisource_set_property);
- gobject_class->get_property = GST_DEBUG_FUNCPTR (gnl_urisource_get_property);
+ gobject_class->set_property = GST_DEBUG_FUNCPTR (nle_urisource_set_property);
+ gobject_class->get_property = GST_DEBUG_FUNCPTR (nle_urisource_get_property);
g_object_class_install_property (gobject_class, ARG_URI,
g_param_spec_string ("uri", "Uri",
"Uri of the file to use", NULL, G_PARAM_READWRITE));
gst_element_class_add_pad_template (gstelement_class,
- gst_static_pad_template_get (&gnl_urisource_src_template));
+ gst_static_pad_template_get (&nle_urisource_src_template));
- gnlobject_class->prepare = gnl_urisource_prepare;
+ nleobject_class->prepare = nle_urisource_prepare;
}
static void
-gnl_urisource_init (GnlURISource * urisource)
+nle_urisource_init (NleURISource * urisource)
{
GstElement *decodebin = NULL;
- GST_OBJECT_FLAG_SET (urisource, GNL_OBJECT_SOURCE);
+ GST_OBJECT_FLAG_SET (urisource, NLE_OBJECT_SOURCE);
/* We create a bin with source and decodebin within */
decodebin =
@@ -109,20 +109,20 @@ gnl_urisource_init (GnlURISource * urisource)
}
static inline void
-gnl_urisource_set_uri (GnlURISource * fs, const gchar * uri)
+nle_urisource_set_uri (NleURISource * fs, const gchar * uri)
{
- g_object_set (GNL_SOURCE (fs)->element, "uri", uri, NULL);
+ g_object_set (NLE_SOURCE (fs)->element, "uri", uri, NULL);
}
static void
-gnl_urisource_set_property (GObject * object, guint prop_id,
+nle_urisource_set_property (GObject * object, guint prop_id,
const GValue * value, GParamSpec * pspec)
{
- GnlURISource *fs = (GnlURISource *) object;
+ NleURISource *fs = (NleURISource *) object;
switch (prop_id) {
case ARG_URI:
- gnl_urisource_set_uri (fs, g_value_get_string (value));
+ nle_urisource_set_uri (fs, g_value_get_string (value));
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
@@ -131,14 +131,14 @@ gnl_urisource_set_property (GObject * object, guint prop_id,
}
static void
-gnl_urisource_get_property (GObject * object, guint prop_id,
+nle_urisource_get_property (GObject * object, guint prop_id,
GValue * value, GParamSpec * pspec)
{
- GnlURISource *fs = (GnlURISource *) object;
+ NleURISource *fs = (NleURISource *) object;
switch (prop_id) {
case ARG_URI:
- g_object_get_property ((GObject *) GNL_SOURCE (fs)->element, "uri",
+ g_object_get_property ((GObject *) NLE_SOURCE (fs)->element, "uri",
value);
break;
default:
@@ -149,9 +149,9 @@ gnl_urisource_get_property (GObject * object, guint prop_id,
}
static gboolean
-gnl_urisource_prepare (GnlObject * object)
+nle_urisource_prepare (NleObject * object)
{
- GnlSource *fs = (GnlSource *) object;
+ NleSource *fs = (NleSource *) object;
GST_DEBUG ("prepare");
@@ -162,5 +162,5 @@ gnl_urisource_prepare (GnlObject * object)
g_object_set (fs->element, "caps", object->caps, NULL);
}
- return GNL_OBJECT_CLASS (parent_class)->prepare (object);
+ return NLE_OBJECT_CLASS (parent_class)->prepare (object);
}
diff --git a/gnl/gnlurisource.h b/ges/nle/nleurisource.h
index 455b20e3..47b8e294 100644
--- a/gnl/gnlurisource.h
+++ b/ges/nle/nleurisource.h
@@ -2,7 +2,7 @@
* Copyright (C) 2001 Wim Taymans <wim.taymans@gmail.com>
* 2004-2008 Edward Hervey <bilboed@bilboed.com>
*
- * gnlurisource.h: Header for GnlURISource
+ * nleurisource.h: Header for NleURISource
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -21,37 +21,37 @@
*/
-#ifndef __GNL_URI_SOURCE_H__
-#define __GNL_URI_SOURCE_H__
+#ifndef __NLE_URI_SOURCE_H__
+#define __NLE_URI_SOURCE_H__
#include <gst/gst.h>
-#include "gnlsource.h"
+#include "nlesource.h"
G_BEGIN_DECLS
-#define GNL_TYPE_URI_SOURCE \
- (gnl_urisource_get_type())
-#define GNL_URI_SOURCE(obj) \
- (G_TYPE_CHECK_INSTANCE_CAST((obj),GNL_TYPE_URI_SOURCE,GnlURIsource))
-#define GNL_URI_SOURCE_CLASS(klass) \
- (G_TYPE_CHECK_CLASS_CAST((klass),GNL_TYPE_URI_SOURCE,GnlURIsourceClass))
-#define GNL_IS_URI_SOURCE(obj) \
- (G_TYPE_CHECK_INSTANCE_TYPE((obj),GNL_TYPE_URI_SOURCE))
-#define GNL_IS_URI_SOURCE_CLASS(obj) \
- (G_TYPE_CHECK_CLASS_TYPE((klass),GNL_TYPE_URI_SOURCE))
-
-struct _GnlURISource
+#define NLE_TYPE_URI_SOURCE \
+ (nle_urisource_get_type())
+#define NLE_URI_SOURCE(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST((obj),NLE_TYPE_URI_SOURCE,NleURIsource))
+#define NLE_URI_SOURCE_CLASS(klass) \
+ (G_TYPE_CHECK_CLASS_CAST((klass),NLE_TYPE_URI_SOURCE,NleURIsourceClass))
+#define NLE_IS_URI_SOURCE(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE((obj),NLE_TYPE_URI_SOURCE))
+#define NLE_IS_URI_SOURCE_CLASS(obj) \
+ (G_TYPE_CHECK_CLASS_TYPE((klass),NLE_TYPE_URI_SOURCE))
+
+struct _NleURISource
{
- GnlSource parent;
+ NleSource parent;
gchar *uri;
};
-struct _GnlURISourceClass
+struct _NleURISourceClass
{
- GnlSourceClass parent_class;
+ NleSourceClass parent_class;
};
-GType gnl_urisource_get_type (void);
+GType nle_urisource_get_type (void);
G_END_DECLS
-#endif /* __GNL_URI_SOURCE_H__ */
+#endif /* __NLE_URI_SOURCE_H__ */
diff --git a/gnl/Makefile.am b/gnl/Makefile.am
deleted file mode 100644
index 0c4876ea..00000000
--- a/gnl/Makefile.am
+++ /dev/null
@@ -1,46 +0,0 @@
-plugin_LTLIBRARIES = libgnl.la
-
-libgnl_la_SOURCES = \
- gnl.c \
- gnlobject.c \
- gnlcomposition.c \
- gnlghostpad.c \
- gnloperation.c \
- gnlsource.c \
- gnlurisource.c
-libgnl_la_CFLAGS = $(GST_CFLAGS)
-libgnl_la_LIBADD = $(GST_LIBS)
-libgnl_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
-libgnl_la_LIBTOOLFLAGS = $(GST_PLUGIN_LIBTOOLFLAGS)
-
-gnl_headers = \
- gnl.h \
- gnlobject.h \
- gnlcomposition.h \
- gnltypes.h \
- gnlghostpad.h \
- gnloperation.h \
- gnlsource.h \
- gnltypes.h \
- gnlurisource.h
-
-DISTCLEANFILE = $(CLEANFILES)
-
-#files built on make all/check/instal
-BUILT_SOURCES = $(built_header_configure)
-
-noinst_HEADERS = $(gnl_headers) $(built_header_configure)
-
-Android.mk: Makefile.am $(BUILT_SOURCES)
- androgenizer \
- -:PROJECT libgnl -:SHARED libgnl \
- -:TAGS eng debug \
- -:REL_TOP $(top_srcdir) -:ABS_TOP $(abs_top_srcdir) \
- -:SOURCES $(libgnl_la_SOURCES) \
- -:CFLAGS $(DEFS) $(DEFAULT_INCLUDES) $(libgnl_la_CFLAGS) \
- -:LDFLAGS $(libgnl_la_LDFLAGS) \
- $(libgnl_la_LIBADD) \
- -ldl \
- -:PASSTHROUGH LOCAL_ARM_MODE:=arm \
- LOCAL_MODULE_PATH:='$$(TARGET_OUT)/lib/gstreamer-@GST_API_VERSION@' \
- > $@
diff --git a/gnl/gnl.c b/gnl/gnl.c
deleted file mode 100644
index 5a986a1d..00000000
--- a/gnl/gnl.c
+++ /dev/null
@@ -1,60 +0,0 @@
-/* Gnonlin
- * Copyright (C) <2001> Wim Taymans <wim.taymans@gmail.com>
- * <2004-2008> Edward Hervey <bilboed@bilboed.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include "gnl.h"
-
-struct _elements_entry
-{
- const gchar *name;
- GType (*type) (void);
-};
-
-static struct _elements_entry _elements[] = {
- {"gnlsource", gnl_source_get_type},
- {"gnlcomposition", gnl_composition_get_type},
- {"gnloperation", gnl_operation_get_type},
- {"gnlurisource", gnl_urisource_get_type},
- {NULL, 0}
-};
-
-static gboolean
-plugin_init (GstPlugin * plugin)
-{
- gint i = 0;
-
- for (; _elements[i].name; i++)
- if (!(gst_element_register (plugin,
- _elements[i].name, GST_RANK_NONE, (_elements[i].type) ())))
- return FALSE;
-
- gnl_init_ghostpad_category ();
-
- return TRUE;
-}
-
-GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
- GST_VERSION_MINOR,
- gnonlin,
- "Standard elements for non-linear multimedia editing",
- plugin_init, VERSION, "LGPL", GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN);
diff --git a/gnl/gnlobject.h b/gnl/gnlobject.h
deleted file mode 100644
index a97eb47b..00000000
--- a/gnl/gnlobject.h
+++ /dev/null
@@ -1,170 +0,0 @@
-/* GStreamer
- * Copyright (C) 2001 Wim Taymans <wim.taymans@gmail.com>
- * 2004-2008 Edward Hervey <bilboed@bilboed.com>
- *
- * gnlobject.h: Header for base GnlObject
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
- * Boston, MA 02110-1301, USA.
- */
-
-
-#ifndef __GNL_OBJECT_H__
-#define __GNL_OBJECT_H__
-
-#include <gst/gst.h>
-
-#include "gnltypes.h"
-
-G_BEGIN_DECLS
-#define GNL_TYPE_OBJECT \
- (gnl_object_get_type())
-#define GNL_OBJECT(obj) \
- (G_TYPE_CHECK_INSTANCE_CAST((obj),GNL_TYPE_OBJECT,GnlObject))
-#define GNL_OBJECT_CAST(obj) ((GnlObject*) (obj))
-#define GNL_OBJECT_CLASS(klass) \
- (G_TYPE_CHECK_CLASS_CAST((klass),GNL_TYPE_OBJECT,GnlObjectClass))
-#define GNL_OBJECT_GET_CLASS(obj) \
- (G_TYPE_INSTANCE_GET_CLASS ((obj), GNL_TYPE_OBJECT, GnlObjectClass))
-#define GNL_IS_OBJECT(obj) \
- (G_TYPE_CHECK_INSTANCE_TYPE((obj),GNL_TYPE_OBJECT))
-#define GNL_IS_OBJECT_CLASS(obj) \
- (G_TYPE_CHECK_CLASS_TYPE((klass),GNL_TYPE_OBJECT))
-
-#define GNL_OBJECT_SRC(obj) (((GnlObject *) obj)->srcpad)
-
-/**
- * GnlObjectFlags:
- * @GNL_OBJECT_IS_SOURCE:
- * @GNL_OBJECT_IS_OPERATION:
- * @GNL_OBJECT_IS_EXPANDABLE: The #GnlObject start/stop will extend accross the full composition.
- * @GNL_OBJECT_LAST_FLAG:
-*/
-
-typedef enum
-{
- GNL_OBJECT_SOURCE = (GST_BIN_FLAG_LAST << 0),
- GNL_OBJECT_OPERATION = (GST_BIN_FLAG_LAST << 1),
- GNL_OBJECT_EXPANDABLE = (GST_BIN_FLAG_LAST << 2),
- GNL_OBJECT_COMPOSITION = (GST_BIN_FLAG_LAST << 3),
- /* padding */
- GNL_OBJECT_LAST_FLAG = (GST_BIN_FLAG_LAST << 5)
-} GnlObjectFlags;
-
-
-#define GNL_OBJECT_IS_SOURCE(obj) \
- (GST_OBJECT_FLAG_IS_SET(obj, GNL_OBJECT_SOURCE))
-#define GNL_OBJECT_IS_OPERATION(obj) \
- (GST_OBJECT_FLAG_IS_SET(obj, GNL_OBJECT_OPERATION))
-#define GNL_OBJECT_IS_EXPANDABLE(obj) \
- (GST_OBJECT_FLAG_IS_SET(obj, GNL_OBJECT_EXPANDABLE))
-#define GNL_OBJECT_IS_COMPOSITION(obj) \
- (GST_OBJECT_FLAG_IS_SET(obj, GNL_OBJECT_COMPOSITION))
-
-/* For internal usage only */
-#define GNL_OBJECT_START(obj) (GNL_OBJECT_CAST (obj)->start)
-#define GNL_OBJECT_STOP(obj) (GNL_OBJECT_CAST (obj)->stop)
-#define GNL_OBJECT_DURATION(obj) (GNL_OBJECT_CAST (obj)->duration)
-#define GNL_OBJECT_INPOINT(obj) (GNL_OBJECT_CAST (obj)->inpoint)
-#define GNL_OBJECT_PRIORITY(obj) (GNL_OBJECT_CAST (obj)->priority)
-
-#define GNL_OBJECT_IS_COMMITING(obj) (GNL_OBJECT_CAST (obj)->commiting)
-
-struct _GnlObject
-{
- GstBin parent;
-
- GstPad *srcpad;
-
- /* Time positionning */
- GstClockTime start;
- GstClockTime inpoint;
- GstClockTimeDiff duration;
-
- /* Pending time positionning
- * Should be == GST_CLOCK_TIME_NONE when nothing to do
- */
- GstClockTime pending_start;
- GstClockTime pending_inpoint;
- GstClockTimeDiff pending_duration;
- guint32 pending_priority;
- gboolean pending_active;
-
- gboolean commit_needed;
- gboolean commiting; /* Set to TRUE during the commiting time only */
-
- gboolean expandable;
-
- /* read-only */
- GstClockTime stop;
-
- /* priority in parent */
- guint32 priority;
-
- /* active in parent */
- gboolean active;
-
- /* Filtering caps */
- GstCaps *caps;
-
- /* current segment seek <RO> */
- gdouble segment_rate;
- GstSeekFlags segment_flags;
- gint64 segment_start;
- gint64 segment_stop;
-
- gboolean in_composition;
-};
-
-struct _GnlObjectClass
-{
- GstBinClass parent_class;
-
- /* Signal method handler */
- gboolean (*commit_signal_handler) (GnlObject * object, gboolean recurse);
-
- /* virtual methods for subclasses */
- gboolean (*prepare) (GnlObject * object);
- gboolean (*cleanup) (GnlObject * object);
- gboolean (*commit) (GnlObject * object, gboolean recurse);
-};
-
-GType gnl_object_get_type (void);
-
-gboolean
-gnl_object_to_media_time (GnlObject * object, GstClockTime otime,
- GstClockTime * mtime);
-
-gboolean
-gnl_media_to_object_time (GnlObject * object, GstClockTime mtime,
- GstClockTime * otime);
-
-void
-gnl_object_set_caps (GnlObject * object, const GstCaps * caps);
-
-void
-gnl_object_set_commit_needed (GnlObject *object);
-
-gboolean
-gnl_object_commit (GnlObject *object, gboolean recurse);
-
-void
-gnl_object_reset (GnlObject *object);
-
-GstStateChangeReturn
-gnl_object_cleanup (GnlObject * object);
-
-G_END_DECLS
-#endif /* __GNL_OBJECT_H__ */
diff --git a/tests/check/Makefile.am b/tests/check/Makefile.am
index dfab0962..0ee3181c 100644
--- a/tests/check/Makefile.am
+++ b/tests/check/Makefile.am
@@ -17,10 +17,10 @@ common_ldadd=$(top_builddir)/ges/libges-@GST_API_VERSION@.la \
$(GST_OBJ_LIBS) $(GST_CHECK_LIBS)
testutils_noisnt_libraries=libtestutils.la
-testutils_noinst_headers=ges/test-utils.h
+testutils_noinst_headers=ges/test-utils.h nle/common.h
libtestutils_la_LIBADD=$(common_ldadd)
libtestutils_la_CFLAGS=$(common_cflags)
-libtestutils_la_SOURCES=ges/test-utils.c
+libtestutils_la_SOURCES=ges/test-utils.c nle/common.c
SUPPRESSIONS = $(top_srcdir)/common/gst.supp # $(srcdir)/gst-plugins-bad.supp
@@ -41,7 +41,12 @@ check_PROGRAMS = \
ges/text_properties\
ges/mixers\
ges/group\
- ges/project
+ ges/project\
+ nle/simple \
+ nle/complex \
+ nle/nlesource \
+ nle/nleoperation \
+ nle/nlecomposition
noinst_LTLIBRARIES=$(testutils_noisnt_libraries)
noinst_HEADERS=$(testutils_noinst_headers)
diff --git a/tests/check/ges/backgroundsource.c b/tests/check/ges/backgroundsource.c
index 2d455d88..2f08b11f 100644
--- a/tests/check/ges/backgroundsource.c
+++ b/tests/check/ges/backgroundsource.c
@@ -84,8 +84,8 @@ GST_START_TEST (test_test_source_properties)
fail_unless (ges_timeline_commit (timeline));
/* And let's also check that it propagated correctly to GNonLin */
- gnl_object_check (ges_track_element_get_gnlobject (trackelement), 42, 51, 12,
- 51, MIN_GNL_PRIO, TRUE);
+ nle_object_check (ges_track_element_get_nleobject (trackelement), 42, 51, 12,
+ 51, MIN_NLE_PRIO, TRUE);
/* Change more properties, see if they propagate */
g_object_set (clip, "start", (guint64) 420, "duration", (guint64) 510,
@@ -99,18 +99,18 @@ GST_START_TEST (test_test_source_properties)
fail_unless (ges_timeline_commit (timeline));
/* And let's also check that it propagated correctly to GNonLin */
- gnl_object_check (ges_track_element_get_gnlobject (trackelement), 420, 510,
- 120, 510, MIN_GNL_PRIO + 0, TRUE);
+ nle_object_check (ges_track_element_get_nleobject (trackelement), 420, 510,
+ 120, 510, MIN_NLE_PRIO + 0, TRUE);
/* Test mute support */
g_object_set (clip, "mute", TRUE, NULL);
fail_unless (ges_timeline_commit (timeline));
- gnl_object_check (ges_track_element_get_gnlobject (trackelement), 420, 510,
- 120, 510, MIN_GNL_PRIO + 0, FALSE);
+ nle_object_check (ges_track_element_get_nleobject (trackelement), 420, 510,
+ 120, 510, MIN_NLE_PRIO + 0, FALSE);
g_object_set (clip, "mute", FALSE, NULL);
fail_unless (ges_timeline_commit (timeline));
- gnl_object_check (ges_track_element_get_gnlobject (trackelement), 420, 510,
- 120, 510, MIN_GNL_PRIO + 0, TRUE);
+ nle_object_check (ges_track_element_get_nleobject (trackelement), 420, 510,
+ 120, 510, MIN_NLE_PRIO + 0, TRUE);
ges_container_remove (GES_CONTAINER (clip),
GES_TIMELINE_ELEMENT (trackelement));
@@ -213,7 +213,7 @@ find_composition_func (const GValue * velement)
GstElementFactory *fac = gst_element_get_factory (element);
const gchar *name = gst_plugin_feature_get_name (GST_PLUGIN_FEATURE (fac));
- if (g_strcmp0 (name, "gnlcomposition") == 0)
+ if (g_strcmp0 (name, "nlecomposition") == 0)
return 0;
return 1;
@@ -236,10 +236,10 @@ find_composition (GESTrack * track)
return ret;
}
-#define gap_object_check(gnlobj, start, duration, priority) \
+#define gap_object_check(nleobj, start, duration, priority) \
{ \
guint64 pstart, pdur, pprio; \
- g_object_get (gnlobj, "start", &pstart, "duration", &pdur, \
+ g_object_get (nleobj, "start", &pstart, "duration", &pdur, \
"priority", &pprio, NULL); \
assert_equals_uint64 (pstart, start); \
assert_equals_uint64 (pdur, duration); \
@@ -255,7 +255,7 @@ GST_START_TEST (test_gap_filling_basic)
GESLayer *layer;
GESClip *clip, *clip1, *clip2;
- GstElement *gnlsrc, *gnlsrc1, *gap = NULL;
+ GstElement *nlesrc, *nlesrc1, *gap = NULL;
GESTrackElement *trackelement, *trackelement1, *trackelement2;
ges_init ();
@@ -288,8 +288,8 @@ GST_START_TEST (test_gap_filling_basic)
fail_unless (trackelement != NULL);
fail_unless (ges_track_element_get_track (trackelement) == track);
- gnlsrc = ges_track_element_get_gnlobject (trackelement);
- fail_unless (gnlsrc != NULL);
+ nlesrc = ges_track_element_get_nleobject (trackelement);
+ fail_unless (nlesrc != NULL);
/* Check that trackelement has the same properties */
assert_equals_uint64 (_START (trackelement), 0);
@@ -312,8 +312,8 @@ GST_START_TEST (test_gap_filling_basic)
trackelement1 = GES_CONTAINER_CHILDREN (clip1)->data;
fail_unless (trackelement1 != NULL);
fail_unless (ges_track_element_get_track (trackelement1) == track);
- gnlsrc1 = ges_track_element_get_gnlobject (trackelement1);
- fail_unless (gnlsrc1 != NULL);
+ nlesrc1 = ges_track_element_get_nleobject (trackelement1);
+ fail_unless (nlesrc1 != NULL);
/* Check that trackelement1 has the same properties */
assert_equals_uint64 (_START (trackelement1), 15);
@@ -324,11 +324,11 @@ GST_START_TEST (test_gap_filling_basic)
for (tmp = GST_BIN_CHILDREN (composition); tmp; tmp = tmp->next) {
guint prio;
- GstElement *tmp_gnlobj = GST_ELEMENT (tmp->data);
+ GstElement *tmp_nleobj = GST_ELEMENT (tmp->data);
- g_object_get (tmp_gnlobj, "priority", &prio, NULL);
- if (tmp_gnlobj != gnlsrc && tmp_gnlobj != gnlsrc1 && prio == 1) {
- gap = tmp_gnlobj;
+ g_object_get (tmp_nleobj, "priority", &prio, NULL);
+ if (tmp_nleobj != nlesrc && tmp_nleobj != nlesrc1 && prio == 1) {
+ gap = tmp_nleobj;
}
}
fail_unless (gap != NULL);
diff --git a/tests/check/ges/clip.c b/tests/check/ges/clip.c
index e33c6118..f96070fe 100644
--- a/tests/check/ges/clip.c
+++ b/tests/check/ges/clip.c
@@ -66,8 +66,8 @@ GST_START_TEST (test_object_properties)
assert_equals_uint64 (_INPOINT (trackelement), 12);
/* And let's also check that it propagated correctly to GNonLin */
- gnl_object_check (ges_track_element_get_gnlobject (trackelement), 42, 51, 12,
- 51, MIN_GNL_PRIO, TRUE);
+ nle_object_check (ges_track_element_get_nleobject (trackelement), 42, 51, 12,
+ 51, MIN_NLE_PRIO, TRUE);
/* Change more properties, see if they propagate */
g_object_set (clip, "start", (guint64) 420, "duration", (guint64) 510,
@@ -81,8 +81,8 @@ GST_START_TEST (test_object_properties)
/* And let's also check that it propagated correctly to GNonLin */
ges_timeline_commit (timeline);
- gnl_object_check (ges_track_element_get_gnlobject (trackelement), 420, 510,
- 120, 510, MIN_GNL_PRIO + 0, TRUE);
+ nle_object_check (ges_track_element_get_nleobject (trackelement), 420, 510,
+ 120, 510, MIN_NLE_PRIO + 0, TRUE);
/* This time, we move the trackelement to see if the changes move
@@ -91,8 +91,8 @@ GST_START_TEST (test_object_properties)
ges_timeline_commit (timeline);
assert_equals_uint64 (_START (clip), 400);
assert_equals_uint64 (_START (trackelement), 400);
- gnl_object_check (ges_track_element_get_gnlobject (trackelement), 400, 510,
- 120, 510, MIN_GNL_PRIO + 0, TRUE);
+ nle_object_check (ges_track_element_get_nleobject (trackelement), 400, 510,
+ 120, 510, MIN_NLE_PRIO + 0, TRUE);
ges_container_remove (GES_CONTAINER (clip),
GES_TIMELINE_ELEMENT (trackelement));
@@ -145,8 +145,8 @@ GST_START_TEST (test_split_object)
assert_equals_uint64 (_INPOINT (trackelement), 12);
/* And let's also check that it propagated correctly to GNonLin */
- gnl_object_check (ges_track_element_get_gnlobject (trackelement), 42, 50, 12,
- 50, MIN_GNL_PRIO, TRUE);
+ nle_object_check (ges_track_element_get_nleobject (trackelement), 42, 50, 12,
+ 50, MIN_NLE_PRIO, TRUE);
splitclip = ges_clip_split (clip, 67);
fail_unless (GES_IS_CLIP (splitclip));
@@ -463,38 +463,38 @@ GST_START_TEST (test_effects_priorities)
fail_unless (ges_container_add (GES_CONTAINER (clip),
GES_TIMELINE_ELEMENT (effect2)));
- fail_unless_equals_int (MIN_GNL_PRIO + 0, _PRIORITY (effect));
- fail_unless_equals_int (MIN_GNL_PRIO + 1, _PRIORITY (effect1));
- fail_unless_equals_int (MIN_GNL_PRIO + 2, _PRIORITY (effect2));
+ fail_unless_equals_int (MIN_NLE_PRIO + 0, _PRIORITY (effect));
+ fail_unless_equals_int (MIN_NLE_PRIO + 1, _PRIORITY (effect1));
+ fail_unless_equals_int (MIN_NLE_PRIO + 2, _PRIORITY (effect2));
fail_unless (ges_clip_set_top_effect_priority (clip, GES_BASE_EFFECT (effect),
2));
- fail_unless_equals_int (MIN_GNL_PRIO + 0, _PRIORITY (effect1));
- fail_unless_equals_int (MIN_GNL_PRIO + 1, _PRIORITY (effect2));
- fail_unless_equals_int (MIN_GNL_PRIO + 2, _PRIORITY (effect));
+ fail_unless_equals_int (MIN_NLE_PRIO + 0, _PRIORITY (effect1));
+ fail_unless_equals_int (MIN_NLE_PRIO + 1, _PRIORITY (effect2));
+ fail_unless_equals_int (MIN_NLE_PRIO + 2, _PRIORITY (effect));
fail_unless (ges_clip_set_top_effect_priority (clip, GES_BASE_EFFECT (effect),
0));
- fail_unless_equals_int (MIN_GNL_PRIO + 0, _PRIORITY (effect));
- fail_unless_equals_int (MIN_GNL_PRIO + 1, _PRIORITY (effect1));
- fail_unless_equals_int (MIN_GNL_PRIO + 2, _PRIORITY (effect2));
+ fail_unless_equals_int (MIN_NLE_PRIO + 0, _PRIORITY (effect));
+ fail_unless_equals_int (MIN_NLE_PRIO + 1, _PRIORITY (effect1));
+ fail_unless_equals_int (MIN_NLE_PRIO + 2, _PRIORITY (effect2));
fail_unless (ges_clip_move_to_layer (clip, layer1));
- fail_unless_equals_int (LAYER_HEIGHT + MIN_GNL_PRIO + 0, _PRIORITY (effect));
- fail_unless_equals_int (LAYER_HEIGHT + MIN_GNL_PRIO + 1, _PRIORITY (effect1));
- fail_unless_equals_int (LAYER_HEIGHT + MIN_GNL_PRIO + 2, _PRIORITY (effect2));
+ fail_unless_equals_int (LAYER_HEIGHT + MIN_NLE_PRIO + 0, _PRIORITY (effect));
+ fail_unless_equals_int (LAYER_HEIGHT + MIN_NLE_PRIO + 1, _PRIORITY (effect1));
+ fail_unless_equals_int (LAYER_HEIGHT + MIN_NLE_PRIO + 2, _PRIORITY (effect2));
fail_unless (ges_clip_set_top_effect_priority (clip, GES_BASE_EFFECT (effect),
2));
- fail_unless_equals_int (LAYER_HEIGHT + MIN_GNL_PRIO + 0, _PRIORITY (effect1));
- fail_unless_equals_int (LAYER_HEIGHT + MIN_GNL_PRIO + 1, _PRIORITY (effect2));
- fail_unless_equals_int (LAYER_HEIGHT + MIN_GNL_PRIO + 2, _PRIORITY (effect));
+ fail_unless_equals_int (LAYER_HEIGHT + MIN_NLE_PRIO + 0, _PRIORITY (effect1));
+ fail_unless_equals_int (LAYER_HEIGHT + MIN_NLE_PRIO + 1, _PRIORITY (effect2));
+ fail_unless_equals_int (LAYER_HEIGHT + MIN_NLE_PRIO + 2, _PRIORITY (effect));
fail_unless (ges_clip_set_top_effect_priority (clip, GES_BASE_EFFECT (effect),
0));
- fail_unless_equals_int (LAYER_HEIGHT + MIN_GNL_PRIO + 0, _PRIORITY (effect));
- fail_unless_equals_int (LAYER_HEIGHT + MIN_GNL_PRIO + 1, _PRIORITY (effect1));
- fail_unless_equals_int (LAYER_HEIGHT + MIN_GNL_PRIO + 2, _PRIORITY (effect2));
+ fail_unless_equals_int (LAYER_HEIGHT + MIN_NLE_PRIO + 0, _PRIORITY (effect));
+ fail_unless_equals_int (LAYER_HEIGHT + MIN_NLE_PRIO + 1, _PRIORITY (effect1));
+ fail_unless_equals_int (LAYER_HEIGHT + MIN_NLE_PRIO + 2, _PRIORITY (effect2));
gst_object_unref (timeline);
}
diff --git a/tests/check/ges/effects.c b/tests/check/ges/effects.c
index e7fac67a..00bd4a25 100644
--- a/tests/check/ges/effects.c
+++ b/tests/check/ges/effects.c
@@ -111,7 +111,7 @@ GST_START_TEST (test_get_effects_from_tl)
assert_equals_int (g_list_length (GES_CONTAINER_CHILDREN (source)), 1);
video_source = GES_CONTAINER_CHILDREN (source)->data;
fail_unless (GES_IS_VIDEO_TEST_SOURCE (video_source));
- assert_equals_int (_PRIORITY (video_source), MIN_GNL_PRIO);
+ assert_equals_int (_PRIORITY (video_source), MIN_NLE_PRIO);
GST_DEBUG ("Create effect");
effect = ges_effect_new ("agingtv");
@@ -127,17 +127,17 @@ GST_START_TEST (test_get_effects_from_tl)
GES_TIMELINE_ELEMENT (effect)));
fail_unless (ges_track_element_get_track (GES_TRACK_ELEMENT (effect)) ==
track_video);
- assert_equals_int (_PRIORITY (effect), MIN_GNL_PRIO + 0);
- assert_equals_int (_PRIORITY (video_source), MIN_GNL_PRIO + 1);
+ assert_equals_int (_PRIORITY (effect), MIN_NLE_PRIO + 0);
+ assert_equals_int (_PRIORITY (video_source), MIN_NLE_PRIO + 1);
GST_DEBUG ("Adding effect 1");
fail_unless (ges_container_add (GES_CONTAINER (source),
GES_TIMELINE_ELEMENT (effect1)));
fail_unless (ges_track_element_get_track (GES_TRACK_ELEMENT (effect1)) ==
track_video);
- assert_equals_int (_PRIORITY (effect), MIN_GNL_PRIO);
- assert_equals_int (_PRIORITY (effect1), MIN_GNL_PRIO + 1);
- assert_equals_int (_PRIORITY (video_source), MIN_GNL_PRIO + 2);
+ assert_equals_int (_PRIORITY (effect), MIN_NLE_PRIO);
+ assert_equals_int (_PRIORITY (effect1), MIN_NLE_PRIO + 1);
+ assert_equals_int (_PRIORITY (video_source), MIN_NLE_PRIO + 2);
GST_DEBUG ("Adding effect 2");
fail_unless (ges_container_add (GES_CONTAINER (source),
@@ -282,8 +282,8 @@ GST_START_TEST (test_priorities_clip)
fail_unless (GES_IS_EFFECT (video_effect));
/* FIXME This is ridiculus, both effects should have the same priority (0) */
- assert_equals_int (_PRIORITY (audio_effect), MIN_GNL_PRIO);
- assert_equals_int (_PRIORITY (video_effect), MIN_GNL_PRIO + 1);
+ assert_equals_int (_PRIORITY (audio_effect), MIN_NLE_PRIO);
+ assert_equals_int (_PRIORITY (video_effect), MIN_NLE_PRIO + 1);
assert_equals_int (GES_CONTAINER_HEIGHT (effect_clip), 2);
effect = ges_effect_new ("agingtv");
@@ -303,14 +303,14 @@ GST_START_TEST (test_priorities_clip)
fail_unless (ges_clip_set_top_effect_priority (GES_CLIP (effect_clip),
GES_BASE_EFFECT (effect1), 0));
- assert_equals_int (_PRIORITY (effect), 3 + MIN_GNL_PRIO);
- assert_equals_int (_PRIORITY (effect1), 0 + MIN_GNL_PRIO);
+ assert_equals_int (_PRIORITY (effect), 3 + MIN_NLE_PRIO);
+ assert_equals_int (_PRIORITY (effect1), 0 + MIN_NLE_PRIO);
assert_equals_int (GES_CONTAINER_HEIGHT (effect_clip), 4);
fail_unless (ges_clip_set_top_effect_priority (GES_CLIP (effect_clip),
GES_BASE_EFFECT (effect1), 3));
- assert_equals_int (_PRIORITY (effect), 2 + MIN_GNL_PRIO);
- assert_equals_int (_PRIORITY (effect1), 3 + MIN_GNL_PRIO);
+ assert_equals_int (_PRIORITY (effect), 2 + MIN_NLE_PRIO);
+ assert_equals_int (_PRIORITY (effect1), 3 + MIN_NLE_PRIO);
assert_equals_int (GES_CONTAINER_HEIGHT (effect_clip), 4);
effects = ges_clip_get_top_effects (GES_CLIP (effect_clip));
diff --git a/tests/check/ges/layer.c b/tests/check/ges/layer.c
index 032e2b15..b45bbfb0 100644
--- a/tests/check/ges/layer.c
+++ b/tests/check/ges/layer.c
@@ -74,32 +74,32 @@ GST_START_TEST (test_layer_properties)
assert_equals_uint64 (_INPOINT (clip), 12);
assert_equals_uint64 (_PRIORITY (clip), 0);
ges_timeline_commit (timeline);
- gnl_object_check (ges_track_element_get_gnlobject (trackelement), 42, 51, 12,
- 51, MIN_GNL_PRIO, TRUE);
+ nle_object_check (ges_track_element_get_nleobject (trackelement), 42, 51, 12,
+ 51, MIN_NLE_PRIO, TRUE);
/* Change the priority of the layer */
g_object_set (layer, "priority", 1, NULL);
assert_equals_int (ges_layer_get_priority (layer), 1);
assert_equals_uint64 (_PRIORITY (clip), 0);
ges_timeline_commit (timeline);
- gnl_object_check (ges_track_element_get_gnlobject (trackelement), 42, 51, 12,
- 51, LAYER_HEIGHT + MIN_GNL_PRIO, TRUE);
+ nle_object_check (ges_track_element_get_nleobject (trackelement), 42, 51, 12,
+ 51, LAYER_HEIGHT + MIN_NLE_PRIO, TRUE);
/* Change it to an insanely high value */
g_object_set (layer, "priority", 31, NULL);
assert_equals_int (ges_layer_get_priority (layer), 31);
assert_equals_uint64 (_PRIORITY (clip), 0);
ges_timeline_commit (timeline);
- gnl_object_check (ges_track_element_get_gnlobject (trackelement), 42, 51, 12,
- 51, MIN_GNL_PRIO + LAYER_HEIGHT * 31, TRUE);
+ nle_object_check (ges_track_element_get_nleobject (trackelement), 42, 51, 12,
+ 51, MIN_NLE_PRIO + LAYER_HEIGHT * 31, TRUE);
/* and back to 0 */
g_object_set (layer, "priority", 0, NULL);
assert_equals_int (ges_layer_get_priority (layer), 0);
assert_equals_uint64 (_PRIORITY (clip), 0);
ges_timeline_commit (timeline);
- gnl_object_check (ges_track_element_get_gnlobject (trackelement), 42, 51, 12,
- 51, MIN_GNL_PRIO + 0, TRUE);
+ nle_object_check (ges_track_element_get_nleobject (trackelement), 42, 51, 12,
+ 51, MIN_NLE_PRIO + 0, TRUE);
gst_object_unref (trackelement);
fail_unless (ges_layer_remove_clip (layer, clip));
@@ -117,7 +117,7 @@ GST_START_TEST (test_layer_priorities)
GESLayer *layer1, *layer2, *layer3;
GESTrackElement *trackelement1, *trackelement2, *trackelement3;
GESClip *clip1, *clip2, *clip3;
- GstElement *gnlobj1, *gnlobj2, *gnlobj3;
+ GstElement *nleobj1, *nleobj2, *nleobj3;
guint prio1, prio2, prio3;
GList *objs, *tmp;
@@ -179,25 +179,25 @@ GST_START_TEST (test_layer_priorities)
ges_timeline_commit (timeline);
assert_equals_int (_PRIORITY (clip1), 0);
- gnlobj1 = ges_track_element_get_gnlobject (trackelement1);
- fail_unless (gnlobj1 != NULL);
- g_object_get (gnlobj1, "priority", &prio1, NULL);
- assert_equals_int (prio1, MIN_GNL_PRIO);
+ nleobj1 = ges_track_element_get_nleobject (trackelement1);
+ fail_unless (nleobj1 != NULL);
+ g_object_get (nleobj1, "priority", &prio1, NULL);
+ assert_equals_int (prio1, MIN_NLE_PRIO);
assert_equals_int (_PRIORITY (clip2), 1);
- gnlobj2 = ges_track_element_get_gnlobject (trackelement2);
- fail_unless (gnlobj2 != NULL);
- g_object_get (gnlobj2, "priority", &prio2, NULL);
+ nleobj2 = ges_track_element_get_nleobject (trackelement2);
+ fail_unless (nleobj2 != NULL);
+ g_object_get (nleobj2, "priority", &prio2, NULL);
/* clip2 is on the second layer and has a priority of 1 */
- assert_equals_int (prio2, MIN_GNL_PRIO + LAYER_HEIGHT + 1);
+ assert_equals_int (prio2, MIN_NLE_PRIO + LAYER_HEIGHT + 1);
assert_equals_int (_PRIORITY (clip3), LAYER_HEIGHT - 1);
- gnlobj3 = ges_track_element_get_gnlobject (trackelement3);
- fail_unless (gnlobj3 != NULL);
+ nleobj3 = ges_track_element_get_nleobject (trackelement3);
+ fail_unless (nleobj3 != NULL);
/* clip3 is on the third layer and has a priority of LAYER_HEIGHT + 1
* it priority must have the maximum priority of this layer*/
- g_object_get (gnlobj3, "priority", &prio3, NULL);
- assert_equals_int (prio3, MIN_GNL_PRIO + LAYER_HEIGHT * 3 - 1);
+ g_object_get (nleobj3, "priority", &prio3, NULL);
+ assert_equals_int (prio3, MIN_NLE_PRIO + LAYER_HEIGHT * 3 - 1);
/* Move layers around */
g_object_set (layer1, "priority", 2, NULL);
@@ -212,12 +212,12 @@ GST_START_TEST (test_layer_priorities)
assert_equals_int (_PRIORITY (clip1), 0);
assert_equals_int (_PRIORITY (clip2), 1);
assert_equals_int (_PRIORITY (clip3), LAYER_HEIGHT - 1);
- g_object_get (gnlobj1, "priority", &prio1, NULL);
- g_object_get (gnlobj2, "priority", &prio2, NULL);
- g_object_get (gnlobj3, "priority", &prio3, NULL);
- assert_equals_int (prio1, 2 * LAYER_HEIGHT + MIN_GNL_PRIO);
- assert_equals_int (prio2, MIN_GNL_PRIO + 1);
- assert_equals_int (prio3, LAYER_HEIGHT * 2 - 1 + MIN_GNL_PRIO);
+ g_object_get (nleobj1, "priority", &prio1, NULL);
+ g_object_get (nleobj2, "priority", &prio2, NULL);
+ g_object_get (nleobj3, "priority", &prio3, NULL);
+ assert_equals_int (prio1, 2 * LAYER_HEIGHT + MIN_NLE_PRIO);
+ assert_equals_int (prio2, MIN_NLE_PRIO + 1);
+ assert_equals_int (prio3, LAYER_HEIGHT * 2 - 1 + MIN_NLE_PRIO);
/* And move objects around */
fail_unless (ges_clip_move_to_layer (clip2, layer1));
@@ -238,12 +238,12 @@ GST_START_TEST (test_layer_priorities)
assert_equals_int (_PRIORITY (clip1), 0);
assert_equals_int (_PRIORITY (clip2), 1);
assert_equals_int (_PRIORITY (clip3), LAYER_HEIGHT - 1);
- g_object_get (gnlobj1, "priority", &prio1, NULL);
- g_object_get (gnlobj2, "priority", &prio2, NULL);
- g_object_get (gnlobj3, "priority", &prio3, NULL);
- assert_equals_int (prio1, 2 * LAYER_HEIGHT + MIN_GNL_PRIO);
- assert_equals_int (prio2, 2 * LAYER_HEIGHT + 1 + MIN_GNL_PRIO);
- assert_equals_int (prio3, LAYER_HEIGHT * 3 - 1 + MIN_GNL_PRIO);
+ g_object_get (nleobj1, "priority", &prio1, NULL);
+ g_object_get (nleobj2, "priority", &prio2, NULL);
+ g_object_get (nleobj3, "priority", &prio3, NULL);
+ assert_equals_int (prio1, 2 * LAYER_HEIGHT + MIN_NLE_PRIO);
+ assert_equals_int (prio2, 2 * LAYER_HEIGHT + 1 + MIN_NLE_PRIO);
+ assert_equals_int (prio3, LAYER_HEIGHT * 3 - 1 + MIN_NLE_PRIO);
/* And change TrackElement-s priorities and check that changes are not
* refected on it containing Clip
@@ -252,7 +252,7 @@ GST_START_TEST (test_layer_priorities)
* ges_timeline_element_set_priority (GES_TIMELINE_ELEMENT (trackelement3),
* ges_timeline_commit (timeline);
* LAYER_HEIGHT * 2);
- * g_object_get (gnlobj3, "priority", &prio3, NULL);
+ * g_object_get (nleobj3, "priority", &prio3, NULL);
* assert_equals_int (prio3, 2 * LAYER_HEIGHT);
* assert_equals_int (_PRIORITY (clip3), LAYER_HEIGHT - 1); */
diff --git a/tests/check/ges/overlays.c b/tests/check/ges/overlays.c
index 63a4b360..85aaa8ac 100644
--- a/tests/check/ges/overlays.c
+++ b/tests/check/ges/overlays.c
@@ -80,8 +80,8 @@ GST_START_TEST (test_overlay_properties)
assert_equals_uint64 (_INPOINT (trackelement), 12);
/* And let's also check that it propagated correctly to GNonLin */
- gnl_object_check (ges_track_element_get_gnlobject (trackelement), 42, 51, 12,
- 51, MIN_GNL_PRIO, TRUE);
+ nle_object_check (ges_track_element_get_nleobject (trackelement), 42, 51, 12,
+ 51, MIN_NLE_PRIO, TRUE);
/* Change more properties, see if they propagate */
g_object_set (clip, "start", (guint64) 420, "duration", (guint64) 510,
@@ -95,8 +95,8 @@ GST_START_TEST (test_overlay_properties)
assert_equals_uint64 (_INPOINT (trackelement), 120);
/* And let's also check that it propagated correctly to GNonLin */
- gnl_object_check (ges_track_element_get_gnlobject (trackelement), 420, 510,
- 120, 510, MIN_GNL_PRIO + 0, TRUE);
+ nle_object_check (ges_track_element_get_nleobject (trackelement), 420, 510,
+ 120, 510, MIN_NLE_PRIO + 0, TRUE);
ges_container_remove (GES_CONTAINER (clip),
GES_TIMELINE_ELEMENT (trackelement));
diff --git a/tests/check/ges/project.c b/tests/check/ges/project.c
index 35966dbc..ce8c6a6c 100644
--- a/tests/check/ges/project.c
+++ b/tests/check/ges/project.c
@@ -267,11 +267,11 @@ _test_project (GESProject * project, GESTimeline * timeline)
"scratch-lines", &nb_scratch_lines, NULL);
assert_equals_int (nb_scratch_lines, 12);
- gnl_object_check (ges_track_element_get_gnlobject (trackelement),
- 0, 1000000000, 0, 1000000000, MIN_GNL_PRIO, TRUE);
+ nle_object_check (ges_track_element_get_nleobject (trackelement),
+ 0, 1000000000, 0, 1000000000, MIN_NLE_PRIO, TRUE);
} else {
- gnl_object_check (ges_track_element_get_gnlobject (trackelement),
- 0, 1000000000, 0, 1000000000, MIN_GNL_PRIO + 1, TRUE);
+ nle_object_check (ges_track_element_get_nleobject (trackelement),
+ 0, 1000000000, 0, 1000000000, MIN_NLE_PRIO + 1, TRUE);
}
}
break;
diff --git a/tests/check/ges/test-utils.h b/tests/check/ges/test-utils.h
index 23db69b6..879c119b 100644
--- a/tests/check/ges/test-utils.h
+++ b/tests/check/ges/test-utils.h
@@ -26,11 +26,11 @@
#include <gst/check/gstcheck.h>
GESPipeline * ges_test_create_pipeline (GESTimeline *timeline);
-/* The first 2 GNL priorities are used for:
+/* The first 2 NLE priorities are used for:
* 0- The Mixing element
* 1- The Gaps
*/
-#define MIN_GNL_PRIO 2
+#define MIN_NLE_PRIO 2
#define LAYER_HEIGHT 1000
@@ -49,9 +49,9 @@ ges_generate_test_file_audio_video (const gchar * filedest,
gboolean
play_timeline (GESTimeline * timeline);
-#define gnl_object_check(gnlobj, start, duration, mstart, mduration, priority, active) { \
+#define nle_object_check(nleobj, start, duration, mstart, mduration, priority, active) { \
guint64 pstart, pdur, inpoint, pprio, pact; \
- g_object_get (gnlobj, "start", &pstart, "duration", &pdur, \
+ g_object_get (nleobj, "start", &pstart, "duration", &pdur, \
"inpoint", &inpoint, "priority", &pprio, "active", &pact, \
NULL); \
assert_equals_uint64 (pstart, start); \
@@ -61,7 +61,7 @@ play_timeline (GESTimeline * timeline);
assert_equals_int (pact, active); \
}
-/* copied from gnl */
+/* copied from nle */
#define fail_error_message(msg) \
G_STMT_START { \
GError *error; \
diff --git a/tests/check/ges/titles.c b/tests/check/ges/titles.c
index 08405db7..3654a638 100644
--- a/tests/check/ges/titles.c
+++ b/tests/check/ges/titles.c
@@ -80,8 +80,8 @@ GST_START_TEST (test_title_source_properties)
assert_equals_uint64 (_INPOINT (trackelement), 12);
/* And let's also check that it propagated correctly to GNonLin */
- gnl_object_check (ges_track_element_get_gnlobject (trackelement), 42, 51, 12,
- 51, MIN_GNL_PRIO, TRUE);
+ nle_object_check (ges_track_element_get_nleobject (trackelement), 42, 51, 12,
+ 51, MIN_NLE_PRIO, TRUE);
/* Change more properties, see if they propagate */
g_object_set (clip, "start", (guint64) 420, "duration", (guint64) 510,
@@ -95,8 +95,8 @@ GST_START_TEST (test_title_source_properties)
assert_equals_uint64 (_INPOINT (trackelement), 120);
/* And let's also check that it propagated correctly to GNonLin */
- gnl_object_check (ges_track_element_get_gnlobject (trackelement), 420, 510,
- 120, 510, MIN_GNL_PRIO + 0, TRUE);
+ nle_object_check (ges_track_element_get_nleobject (trackelement), 420, 510,
+ 120, 510, MIN_NLE_PRIO + 0, TRUE);
ges_container_remove (GES_CONTAINER (clip),
GES_TIMELINE_ELEMENT (trackelement));
diff --git a/tests/check/ges/transition.c b/tests/check/ges/transition.c
index c8906ead..b245f23b 100644
--- a/tests/check/ges/transition.c
+++ b/tests/check/ges/transition.c
@@ -109,8 +109,8 @@ GST_START_TEST (test_transition_properties)
assert_equals_uint64 (_INPOINT (trackelement), 12);
/* And let's also check that it propagated correctly to GNonLin */
- gnl_object_check (ges_track_element_get_gnlobject (trackelement), 42, 51, 12,
- 51, MIN_GNL_PRIO, TRUE);
+ nle_object_check (ges_track_element_get_nleobject (trackelement), 42, 51, 12,
+ 51, MIN_NLE_PRIO, TRUE);
/* Change more properties, see if they propagate */
g_object_set (clip, "start", (guint64) 420, "duration", (guint64) 510,
@@ -124,8 +124,8 @@ GST_START_TEST (test_transition_properties)
assert_equals_uint64 (_INPOINT (trackelement), 120);
/* And let's also check that it propagated correctly to GNonLin */
- gnl_object_check (ges_track_element_get_gnlobject (trackelement), 420, 510,
- 120, 510, MIN_GNL_PRIO + 0, TRUE);
+ nle_object_check (ges_track_element_get_nleobject (trackelement), 420, 510,
+ 120, 510, MIN_NLE_PRIO + 0, TRUE);
/* test changing vtype */
GST_DEBUG ("Setting to crossfade");
diff --git a/tests/check/ges/uriclip.c b/tests/check/ges/uriclip.c
index e624c3ba..e529dde8 100644
--- a/tests/check/ges/uriclip.c
+++ b/tests/check/ges/uriclip.c
@@ -167,8 +167,8 @@ GST_START_TEST (test_filesource_properties)
assert_equals_uint64 (_INPOINT (trackelement), 12);
/* And let's also check that it propagated correctly to GNonLin */
- gnl_object_check (ges_track_element_get_gnlobject (trackelement), 42, 51, 12,
- 51, MIN_GNL_PRIO, TRUE);
+ nle_object_check (ges_track_element_get_nleobject (trackelement), 42, 51, 12,
+ 51, MIN_NLE_PRIO, TRUE);
/* Change more properties, see if they propagate */
g_object_set (clip, "start", (guint64) 420, "duration", (guint64) 510,
@@ -182,18 +182,18 @@ GST_START_TEST (test_filesource_properties)
assert_equals_uint64 (_INPOINT (trackelement), 120);
/* And let's also check that it propagated correctly to GNonLin */
- gnl_object_check (ges_track_element_get_gnlobject (trackelement), 420, 510,
- 120, 510, MIN_GNL_PRIO + 0, TRUE);
+ nle_object_check (ges_track_element_get_nleobject (trackelement), 420, 510,
+ 120, 510, MIN_NLE_PRIO + 0, TRUE);
/* Test mute support */
g_object_set (clip, "mute", TRUE, NULL);
ges_timeline_commit (timeline);
- gnl_object_check (ges_track_element_get_gnlobject (trackelement), 420, 510,
- 120, 510, MIN_GNL_PRIO + 0, FALSE);
+ nle_object_check (ges_track_element_get_nleobject (trackelement), 420, 510,
+ 120, 510, MIN_NLE_PRIO + 0, FALSE);
g_object_set (clip, "mute", FALSE, NULL);
ges_timeline_commit (timeline);
- gnl_object_check (ges_track_element_get_gnlobject (trackelement), 420, 510,
- 120, 510, MIN_GNL_PRIO + 0, TRUE);
+ nle_object_check (ges_track_element_get_nleobject (trackelement), 420, 510,
+ 120, 510, MIN_NLE_PRIO + 0, TRUE);
ges_container_remove (GES_CONTAINER (clip),
GES_TIMELINE_ELEMENT (trackelement));
diff --git a/tests/check/gnl/common.c b/tests/check/nle/common.c
index fb9c0d98..83467df5 100644
--- a/tests/check/gnl/common.c
+++ b/tests/check/nle/common.c
@@ -167,25 +167,25 @@ sinkpad_probe (GstPad * sinkpad, GstPadProbeInfo * info,
}
static GstElement *
-new_gnl_src (const gchar * name, guint64 start, gint64 duration, gint priority)
+new_nle_src (const gchar * name, guint64 start, gint64 duration, gint priority)
{
- GstElement *gnlsource = NULL;
+ GstElement *nlesource = NULL;
- gnlsource = gst_element_factory_make_or_warn ("gnlsource", name);
- fail_if (gnlsource == NULL);
+ nlesource = gst_element_factory_make_or_warn ("nlesource", name);
+ fail_if (nlesource == NULL);
- g_object_set (G_OBJECT (gnlsource),
+ g_object_set (G_OBJECT (nlesource),
"start", start,
"duration", duration, "inpoint", start, "priority", priority, NULL);
- return gnlsource;
+ return nlesource;
}
GstElement *
-videotest_gnl_src (const gchar * name, guint64 start, gint64 duration,
+videotest_nle_src (const gchar * name, guint64 start, gint64 duration,
gint pattern, guint priority)
{
- GstElement *gnlsource = NULL;
+ GstElement *nlesource = NULL;
GstElement *videotestsrc = NULL;
GstCaps *caps =
gst_caps_from_string
@@ -196,35 +196,35 @@ videotest_gnl_src (const gchar * name, guint64 start, gint64 duration,
videotestsrc = gst_element_factory_make_or_warn ("videotestsrc", NULL);
g_object_set (G_OBJECT (videotestsrc), "pattern", pattern, NULL);
- gnlsource = new_gnl_src (name, start, duration, priority);
- g_object_set (G_OBJECT (gnlsource), "caps", caps, NULL);
+ nlesource = new_nle_src (name, start, duration, priority);
+ g_object_set (G_OBJECT (nlesource), "caps", caps, NULL);
gst_caps_unref (caps);
- gst_bin_add (GST_BIN (gnlsource), videotestsrc);
+ gst_bin_add (GST_BIN (nlesource), videotestsrc);
- return gnlsource;
+ return nlesource;
}
GstElement *
-videotest_gnl_src_full (const gchar * name, guint64 start, gint64 duration,
+videotest_nle_src_full (const gchar * name, guint64 start, gint64 duration,
guint64 inpoint, gint pattern, guint priority)
{
- GstElement *gnls;
+ GstElement *nles;
- gnls = videotest_gnl_src (name, start, duration, pattern, priority);
- if (gnls) {
- g_object_set (G_OBJECT (gnls), "inpoint", inpoint, NULL);
+ nles = videotest_nle_src (name, start, duration, pattern, priority);
+ if (nles) {
+ g_object_set (G_OBJECT (nles), "inpoint", inpoint, NULL);
}
- return gnls;
+ return nles;
}
GstElement *
-videotest_in_bin_gnl_src (const gchar * name, guint64 start, gint64 duration,
+videotest_in_bin_nle_src (const gchar * name, guint64 start, gint64 duration,
gint pattern, guint priority)
{
- GstElement *gnlsource = NULL;
+ GstElement *nlesource = NULL;
GstElement *videotestsrc = NULL;
GstElement *bin = NULL;
GstElement *alpha = NULL;
@@ -238,7 +238,7 @@ videotest_in_bin_gnl_src (const gchar * name, guint64 start, gint64 duration,
g_object_set (G_OBJECT (videotestsrc), "pattern", pattern, NULL);
bin = gst_bin_new (NULL);
- gnlsource = new_gnl_src (name, start, duration, priority);
+ nlesource = new_nle_src (name, start, duration, priority);
gst_bin_add (GST_BIN (bin), videotestsrc);
gst_bin_add (GST_BIN (bin), alpha);
@@ -246,7 +246,7 @@ videotest_in_bin_gnl_src (const gchar * name, guint64 start, gint64 duration,
gst_element_link_pads_full (videotestsrc, "src", alpha, "sink",
GST_PAD_LINK_CHECK_NOTHING);
- gst_bin_add (GST_BIN (gnlsource), bin);
+ gst_bin_add (GST_BIN (nlesource), bin);
srcpad = gst_element_get_static_pad (alpha, "src");
@@ -254,7 +254,7 @@ videotest_in_bin_gnl_src (const gchar * name, guint64 start, gint64 duration,
gst_object_unref (srcpad);
- return gnlsource;
+ return nlesource;
}
GstElement *
@@ -272,7 +272,7 @@ audiotest_bin_src (const gchar * name, guint64 start,
audiotestsrc = gst_element_factory_make_or_warn ("audiotestsrc", NULL);
identity = gst_element_factory_make_or_warn ("identity", NULL);
bin = gst_bin_new (NULL);
- source = new_gnl_src (name, start, duration, priority);
+ source = new_nle_src (name, start, duration, priority);
audioconvert = gst_element_factory_make_or_warn ("audioconvert", NULL);
if (intaudio)
@@ -302,18 +302,18 @@ GstElement *
new_operation (const gchar * name, const gchar * factory, guint64 start,
gint64 duration, guint priority)
{
- GstElement *gnloperation = NULL;
+ GstElement *nleoperation = NULL;
GstElement *operation = NULL;
operation = gst_element_factory_make_or_warn (factory, NULL);
- gnloperation = gst_element_factory_make_or_warn ("gnloperation", name);
+ nleoperation = gst_element_factory_make_or_warn ("nleoperation", name);
- g_object_set (G_OBJECT (gnloperation),
+ g_object_set (G_OBJECT (nleoperation),
"start", start, "duration", duration, "priority", priority, NULL);
- gst_bin_add (GST_BIN (gnloperation), operation);
+ gst_bin_add (GST_BIN (nleoperation), operation);
- return gnloperation;
+ return nleoperation;
}
@@ -376,7 +376,7 @@ commit_and_wait (GstElement * comp, gboolean * ret)
}
gboolean
-gnl_composition_remove (GstBin * comp, GstElement * object)
+nle_composition_remove (GstBin * comp, GstElement * object)
{
gboolean ret;
@@ -390,7 +390,7 @@ gnl_composition_remove (GstBin * comp, GstElement * object)
}
gboolean
-gnl_composition_add (GstBin * comp, GstElement * object)
+nle_composition_add (GstBin * comp, GstElement * object)
{
return gst_bin_add (comp, object);
}
diff --git a/tests/check/gnl/common.h b/tests/check/nle/common.h
index cf1bb7cf..1a34c0cc 100644
--- a/tests/check/gnl/common.h
+++ b/tests/check/nle/common.h
@@ -1,5 +1,6 @@
#include <gst/check/gstcheck.h>
+#include <ges/ges.h>
#define fail_error_message(msg) \
G_STMT_START { \
@@ -53,13 +54,13 @@ typedef struct _CollectStructure {
void poll_the_bus(GstBus *bus);
void composition_pad_added_cb (GstElement *composition, GstPad *pad, CollectStructure * collect);
GstPadProbeReturn sinkpad_probe (GstPad *sinkpad, GstPadProbeInfo * info, CollectStructure * collect);
-GstElement *videotest_gnl_src (const gchar * name, guint64 start, gint64 duration,
+GstElement *videotest_nle_src (const gchar * name, guint64 start, gint64 duration,
gint pattern, guint priority);
-GstElement * videotest_gnl_src_full (const gchar * name, guint64 start, gint64 duration,
+GstElement * videotest_nle_src_full (const gchar * name, guint64 start, gint64 duration,
guint64 inpoint,
gint pattern, guint priority);
GstElement *
-videotest_in_bin_gnl_src (const gchar * name, guint64 start, gint64 duration, gint pattern, guint priority);
+videotest_in_bin_nle_src (const gchar * name, guint64 start, gint64 duration, gint pattern, guint priority);
GstElement *
audiotest_bin_src (const gchar * name, guint64 start,
gint64 duration, guint priority, gboolean intaudio);
@@ -73,5 +74,5 @@ Segment *
segment_new (gdouble rate, GstFormat format, gint64 start, gint64 stop, gint64 position);
void commit_and_wait (GstElement *comp, gboolean *ret);
-gboolean gnl_composition_remove (GstBin * comp, GstElement * object);
-gboolean gnl_composition_add (GstBin * comp, GstElement * object);
+gboolean nle_composition_remove (GstBin * comp, GstElement * object);
+gboolean nle_composition_add (GstBin * comp, GstElement * object);
diff --git a/tests/check/gnl/complex.c b/tests/check/nle/complex.c
index 1c05faf2..588dd8b9 100644
--- a/tests/check/gnl/complex.c
+++ b/tests/check/nle/complex.c
@@ -151,7 +151,7 @@ GST_START_TEST (test_one_space_another)
GList *segments = NULL;
comp =
- gst_element_factory_make_or_warn ("gnlcomposition", "test_composition");
+ gst_element_factory_make_or_warn ("nlecomposition", "test_composition");
gst_element_set_state (comp, GST_STATE_READY);
fail_if (comp == NULL);
@@ -168,7 +168,7 @@ GST_START_TEST (test_one_space_another)
Duration : 1s
Priority : 1
*/
- source1 = videotest_gnl_src ("source1", 0, 1 * GST_SECOND, 2, 1);
+ source1 = videotest_nle_src ("source1", 0, 1 * GST_SECOND, 2, 1);
fail_if (source1 == NULL);
check_start_stop_duration (source1, 0, 1 * GST_SECOND, 1 * GST_SECOND);
@@ -178,14 +178,14 @@ GST_START_TEST (test_one_space_another)
Duration : 1s
Priority : 1
*/
- source2 = videotest_gnl_src ("source2", 2 * GST_SECOND, 1 * GST_SECOND, 3, 1);
+ source2 = videotest_nle_src ("source2", 2 * GST_SECOND, 1 * GST_SECOND, 3, 1);
fail_if (source2 == NULL);
check_start_stop_duration (source2, 2 * GST_SECOND, 3 * GST_SECOND,
1 * GST_SECOND);
/* Add one source */
- gnl_composition_add (GST_BIN (comp), source1);
+ nle_composition_add (GST_BIN (comp), source1);
GST_ERROR ("doing one commit");
commit_and_wait (comp, &ret);
check_start_stop_duration (comp, 0, 1 * GST_SECOND, 1 * GST_SECOND);
@@ -193,7 +193,7 @@ GST_START_TEST (test_one_space_another)
/* Second source */
- gnl_composition_add (GST_BIN (comp), source2);
+ nle_composition_add (GST_BIN (comp), source2);
check_start_stop_duration (comp, 0, 1 * GST_SECOND, 1 * GST_SECOND);
commit_and_wait (comp, &ret);
ASSERT_OBJECT_REFCOUNT (source2, "source2", 1);
@@ -201,14 +201,14 @@ GST_START_TEST (test_one_space_another)
/* Remove first source */
gst_object_ref (source1);
- gnl_composition_remove (GST_BIN (comp), source1);
+ nle_composition_remove (GST_BIN (comp), source1);
check_start_stop_duration (comp, 2 * GST_SECOND, 3 * GST_SECOND,
1 * GST_SECOND);
ASSERT_OBJECT_REFCOUNT (source1, "source1", 1);
/* Re-add first source */
- gnl_composition_add (GST_BIN (comp), source1);
+ nle_composition_add (GST_BIN (comp), source1);
commit_and_wait (comp, &ret);
check_start_stop_duration (comp, 0, 3 * GST_SECOND, 3 * GST_SECOND);
gst_object_unref (source1);
@@ -230,7 +230,7 @@ GST_START_TEST (test_one_default_another)
GList *segments = NULL;
comp =
- gst_element_factory_make_or_warn ("gnlcomposition", "test_composition");
+ gst_element_factory_make_or_warn ("nlecomposition", "test_composition");
gst_element_set_state (comp, GST_STATE_READY);
fail_if (comp == NULL);
@@ -251,7 +251,7 @@ GST_START_TEST (test_one_default_another)
*/
defaultsrc =
- videotest_gnl_src ("defaultsrc", 0, 5 * GST_SECOND, 2, G_MAXUINT32);
+ videotest_nle_src ("defaultsrc", 0, 5 * GST_SECOND, 2, G_MAXUINT32);
g_object_set (defaultsrc, "expandable", TRUE, NULL);
fail_if (defaultsrc == NULL);
check_start_stop_duration (defaultsrc, 0, 5 * GST_SECOND, 5 * GST_SECOND);
@@ -262,7 +262,7 @@ GST_START_TEST (test_one_default_another)
Duration : 1s
Priority : 1
*/
- source1 = videotest_gnl_src ("source1", 1 * GST_SECOND, 1 * GST_SECOND, 3, 1);
+ source1 = videotest_nle_src ("source1", 1 * GST_SECOND, 1 * GST_SECOND, 3, 1);
fail_if (source1 == NULL);
check_start_stop_duration (source1, GST_SECOND, 2 * GST_SECOND,
1 * GST_SECOND);
@@ -273,7 +273,7 @@ GST_START_TEST (test_one_default_another)
Duration : 1s
Priority : 1
*/
- source2 = videotest_gnl_src ("source2", 3 * GST_SECOND, 1 * GST_SECOND, 2, 1);
+ source2 = videotest_nle_src ("source2", 3 * GST_SECOND, 1 * GST_SECOND, 2, 1);
fail_if (source2 == NULL);
check_start_stop_duration (source2, 3 * GST_SECOND, 4 * GST_SECOND,
1 * GST_SECOND);
@@ -284,7 +284,7 @@ GST_START_TEST (test_one_default_another)
Duration : 1s
Priority : 1
*/
- source3 = videotest_gnl_src ("source3", 4 * GST_SECOND, 1 * GST_SECOND, 2, 1);
+ source3 = videotest_nle_src ("source3", 4 * GST_SECOND, 1 * GST_SECOND, 2, 1);
fail_if (source3 == NULL);
check_start_stop_duration (source3, 4 * GST_SECOND, 5 * GST_SECOND,
1 * GST_SECOND);
@@ -292,14 +292,14 @@ GST_START_TEST (test_one_default_another)
/* Add one source */
- gnl_composition_add (GST_BIN (comp), source1);
+ nle_composition_add (GST_BIN (comp), source1);
commit_and_wait (comp, &ret);
check_start_stop_duration (comp, GST_SECOND, 2 * GST_SECOND, 1 * GST_SECOND);
ASSERT_OBJECT_REFCOUNT (source1, "source1", 1);
/* defaultsrc source */
- gnl_composition_add (GST_BIN (comp), defaultsrc);
+ nle_composition_add (GST_BIN (comp), defaultsrc);
commit_and_wait (comp, &ret);
check_start_stop_duration (comp, 0, 2 * GST_SECOND, 2 * GST_SECOND);
check_start_stop_duration (defaultsrc, 0, 2 * GST_SECOND, 2 * GST_SECOND);
@@ -308,10 +308,10 @@ GST_START_TEST (test_one_default_another)
/* Second source */
- gnl_composition_add (GST_BIN (comp), source2);
+ nle_composition_add (GST_BIN (comp), source2);
ASSERT_OBJECT_REFCOUNT (source2, "source2", 1);
/* Third source */
- gnl_composition_add (GST_BIN (comp), source3);
+ nle_composition_add (GST_BIN (comp), source3);
commit_and_wait (comp, &ret);
fail_unless (ret);
check_start_stop_duration (comp, 0, 5 * GST_SECOND, 5 * GST_SECOND);
@@ -347,7 +347,7 @@ GST_START_TEST (test_one_expandable_another)
gboolean ret = FALSE;
comp =
- gst_element_factory_make_or_warn ("gnlcomposition", "test_composition");
+ gst_element_factory_make_or_warn ("nlecomposition", "test_composition");
gst_element_set_state (comp, GST_STATE_READY);
fail_if (comp == NULL);
@@ -366,7 +366,7 @@ GST_START_TEST (test_one_expandable_another)
Priority : 1000
*/
- defaultsrc = videotest_gnl_src ("defaultsrc", 0, 5 * GST_SECOND, 2, 1000);
+ defaultsrc = videotest_nle_src ("defaultsrc", 0, 5 * GST_SECOND, 2, 1000);
g_object_set (defaultsrc, "expandable", TRUE, NULL);
fail_if (defaultsrc == NULL);
check_start_stop_duration (defaultsrc, 0, 5 * GST_SECOND, 5 * GST_SECOND);
@@ -377,7 +377,7 @@ GST_START_TEST (test_one_expandable_another)
Duration : 1s
Priority : 1
*/
- source1 = videotest_gnl_src ("source1", 1 * GST_SECOND, 1 * GST_SECOND, 3, 1);
+ source1 = videotest_nle_src ("source1", 1 * GST_SECOND, 1 * GST_SECOND, 3, 1);
fail_if (source1 == NULL);
check_start_stop_duration (source1, GST_SECOND, 2 * GST_SECOND,
1 * GST_SECOND);
@@ -388,7 +388,7 @@ GST_START_TEST (test_one_expandable_another)
Duration : 1s
Priority : 1
*/
- source2 = videotest_gnl_src ("source2", 3 * GST_SECOND, 1 * GST_SECOND, 2, 1);
+ source2 = videotest_nle_src ("source2", 3 * GST_SECOND, 1 * GST_SECOND, 2, 1);
fail_if (source2 == NULL);
check_start_stop_duration (source2, 3 * GST_SECOND, 4 * GST_SECOND,
1 * GST_SECOND);
@@ -399,7 +399,7 @@ GST_START_TEST (test_one_expandable_another)
Duration : 1s
Priority : 1
*/
- source3 = videotest_gnl_src ("source3", 4 * GST_SECOND, 1 * GST_SECOND, 2, 1);
+ source3 = videotest_nle_src ("source3", 4 * GST_SECOND, 1 * GST_SECOND, 2, 1);
fail_if (source3 == NULL);
check_start_stop_duration (source3, 4 * GST_SECOND, 5 * GST_SECOND,
1 * GST_SECOND);
@@ -407,7 +407,7 @@ GST_START_TEST (test_one_expandable_another)
/* Add one source */
- gnl_composition_add (GST_BIN (comp), source1);
+ nle_composition_add (GST_BIN (comp), source1);
commit_and_wait (comp, &ret);
check_start_stop_duration (comp, GST_SECOND, 2 * GST_SECOND, 1 * GST_SECOND);
@@ -415,7 +415,7 @@ GST_START_TEST (test_one_expandable_another)
/* defaultsrc source */
- gnl_composition_add (GST_BIN (comp), defaultsrc);
+ nle_composition_add (GST_BIN (comp), defaultsrc);
commit_and_wait (comp, &ret);
check_start_stop_duration (comp, 0, 2 * GST_SECOND, 2 * GST_SECOND);
check_start_stop_duration (defaultsrc, 0, 2 * GST_SECOND, 2 * GST_SECOND);
@@ -424,7 +424,7 @@ GST_START_TEST (test_one_expandable_another)
/* Second source */
- gnl_composition_add (GST_BIN (comp), source2);
+ nle_composition_add (GST_BIN (comp), source2);
commit_and_wait (comp, &ret);
check_start_stop_duration (comp, 0, 4 * GST_SECOND, 4 * GST_SECOND);
check_start_stop_duration (defaultsrc, 0, 4 * GST_SECOND, 4 * GST_SECOND);
@@ -434,7 +434,7 @@ GST_START_TEST (test_one_expandable_another)
/* Third source */
- gnl_composition_add (GST_BIN (comp), source3);
+ nle_composition_add (GST_BIN (comp), source3);
commit_and_wait (comp, &ret);
check_start_stop_duration (comp, 0, 5 * GST_SECOND, 5 * GST_SECOND);
check_start_stop_duration (defaultsrc, 0, 5 * GST_SECOND, 5 * GST_SECOND);
@@ -479,7 +479,7 @@ GST_START_TEST (test_renegotiation)
pipeline = gst_pipeline_new ("test_pipeline");
comp =
- gst_element_factory_make_or_warn ("gnlcomposition", "test_composition");
+ gst_element_factory_make_or_warn ("nlecomposition", "test_composition");
gst_element_set_state (comp, GST_STATE_READY);
fail_if (comp == NULL);
@@ -518,7 +518,7 @@ GST_START_TEST (test_renegotiation)
/* Add one source */
- gnl_composition_add (GST_BIN (comp), source1);
+ nle_composition_add (GST_BIN (comp), source1);
commit_and_wait (comp, &ret);
check_start_stop_duration (comp, 0, 1 * GST_SECOND, 1 * GST_SECOND);
@@ -526,7 +526,7 @@ GST_START_TEST (test_renegotiation)
/* Second source */
- gnl_composition_add (GST_BIN (comp), source2);
+ nle_composition_add (GST_BIN (comp), source2);
commit_and_wait (comp, &ret);
check_start_stop_duration (comp, 0, 2 * GST_SECOND, 2 * GST_SECOND);
@@ -535,7 +535,7 @@ GST_START_TEST (test_renegotiation)
/* Third source */
- gnl_composition_add (GST_BIN (comp), source3);
+ nle_composition_add (GST_BIN (comp), source3);
commit_and_wait (comp, &ret);
check_start_stop_duration (comp, 0, 3 * GST_SECOND, 3 * GST_SECOND);
@@ -685,7 +685,7 @@ GST_START_TEST (test_one_bin_space_another)
GList *segments = NULL;
comp =
- gst_element_factory_make_or_warn ("gnlcomposition", "test_composition");
+ gst_element_factory_make_or_warn ("nlecomposition", "test_composition");
gst_element_set_state (comp, GST_STATE_READY);
fail_if (comp == NULL);
@@ -695,7 +695,7 @@ GST_START_TEST (test_one_bin_space_another)
Duration : 1s
Priority : 1
*/
- source1 = videotest_in_bin_gnl_src ("source1", 0, 1 * GST_SECOND, 3, 1);
+ source1 = videotest_in_bin_nle_src ("source1", 0, 1 * GST_SECOND, 3, 1);
fail_if (source1 == NULL);
check_start_stop_duration (source1, 0, 1 * GST_SECOND, 1 * GST_SECOND);
@@ -706,7 +706,7 @@ GST_START_TEST (test_one_bin_space_another)
Priority : 1
*/
source2 =
- videotest_in_bin_gnl_src ("source2", 2 * GST_SECOND, 1 * GST_SECOND, 2,
+ videotest_in_bin_nle_src ("source2", 2 * GST_SECOND, 1 * GST_SECOND, 2,
1);
fail_if (source2 == NULL);
check_start_stop_duration (source2, 2 * GST_SECOND, 3 * GST_SECOND,
@@ -714,26 +714,26 @@ GST_START_TEST (test_one_bin_space_another)
/* Add one source */
- gnl_composition_add (GST_BIN (comp), source1);
+ nle_composition_add (GST_BIN (comp), source1);
commit_and_wait (comp, &ret);
check_start_stop_duration (comp, 0, 1 * GST_SECOND, 1 * GST_SECOND);
/* Second source */
- gnl_composition_add (GST_BIN (comp), source2);
+ nle_composition_add (GST_BIN (comp), source2);
commit_and_wait (comp, &ret);
check_start_stop_duration (comp, 0, 3 * GST_SECOND, 3 * GST_SECOND);
/* Remove second source */
gst_object_ref (source1);
- gnl_composition_remove (GST_BIN (comp), source1);
+ nle_composition_remove (GST_BIN (comp), source1);
check_start_stop_duration (comp, 2 * GST_SECOND, 3 * GST_SECOND,
1 * GST_SECOND);
/* Re-add second source */
- gnl_composition_add (GST_BIN (comp), source1);
+ nle_composition_add (GST_BIN (comp), source1);
commit_and_wait (comp, &ret);
check_start_stop_duration (comp, 0, 3 * GST_SECOND, 3 * GST_SECOND);
gst_object_unref (source1);
@@ -754,7 +754,7 @@ GST_START_TEST (test_one_above_another)
GList *segments = NULL;
comp =
- gst_element_factory_make_or_warn ("gnlcomposition", "test_composition");
+ gst_element_factory_make_or_warn ("nlecomposition", "test_composition");
gst_element_set_state (comp, GST_STATE_READY);
fail_if (comp == NULL);
@@ -764,7 +764,7 @@ GST_START_TEST (test_one_above_another)
Duration : 2s
Priority : 2
*/
- source1 = videotest_gnl_src ("source1", 0, 2 * GST_SECOND, 3, 2);
+ source1 = videotest_nle_src ("source1", 0, 2 * GST_SECOND, 3, 2);
fail_if (source1 == NULL);
check_start_stop_duration (source1, 0, 2 * GST_SECOND, 2 * GST_SECOND);
@@ -774,33 +774,33 @@ GST_START_TEST (test_one_above_another)
Duration : 2s
Priority : 1
*/
- source2 = videotest_gnl_src ("source2", 1 * GST_SECOND, 2 * GST_SECOND, 2, 1);
+ source2 = videotest_nle_src ("source2", 1 * GST_SECOND, 2 * GST_SECOND, 2, 1);
fail_if (source2 == NULL);
check_start_stop_duration (source2, 1 * GST_SECOND, 3 * GST_SECOND,
2 * GST_SECOND);
/* Add one source */
- gnl_composition_add (GST_BIN (comp), source1);
+ nle_composition_add (GST_BIN (comp), source1);
commit_and_wait (comp, &ret);
check_start_stop_duration (comp, 0, 2 * GST_SECOND, 2 * GST_SECOND);
/* Second source */
- gnl_composition_add (GST_BIN (comp), source2);
+ nle_composition_add (GST_BIN (comp), source2);
commit_and_wait (comp, &ret);
check_start_stop_duration (comp, 0, 3 * GST_SECOND, 3 * GST_SECOND);
/* Remove second source */
gst_object_ref (source1);
- gnl_composition_remove (GST_BIN (comp), source1);
+ nle_composition_remove (GST_BIN (comp), source1);
check_start_stop_duration (comp, 1 * GST_SECOND, 3 * GST_SECOND,
2 * GST_SECOND);
/* Re-add second source */
- gnl_composition_add (GST_BIN (comp), source1);
+ nle_composition_add (GST_BIN (comp), source1);
commit_and_wait (comp, &ret);
check_start_stop_duration (comp, 0, 3 * GST_SECOND, 3 * GST_SECOND);
gst_object_unref (source1);
@@ -824,6 +824,7 @@ gnonlin_suite (void)
Suite *s = suite_create ("gnonlin-complex");
TCase *tc_chain = tcase_create ("complex");
+ ges_init ();
suite_add_tcase (s, tc_chain);
tcase_add_test (tc_chain, test_one_space_another);
diff --git a/tests/check/gnl/gnlcomposition.c b/tests/check/nle/nlecomposition.c
index 53fe7acf..fb308c59 100644
--- a/tests/check/gnl/gnlcomposition.c
+++ b/tests/check/nle/nlecomposition.c
@@ -47,7 +47,7 @@ GST_START_TEST (test_change_object_start_stop_in_current_stack)
pipeline = gst_pipeline_new ("test_pipeline");
comp =
- gst_element_factory_make_or_warn ("gnlcomposition", "test_composition");
+ gst_element_factory_make_or_warn ("nlecomposition", "test_composition");
gst_element_set_state (comp, GST_STATE_READY);
@@ -63,7 +63,7 @@ GST_START_TEST (test_change_object_start_stop_in_current_stack)
Priority : 2
*/
- source1 = videotest_gnl_src ("source1", 0, 2 * GST_SECOND, 2, 2);
+ source1 = videotest_nle_src ("source1", 0, 2 * GST_SECOND, 2, 2);
srcpad = gst_element_get_static_pad (source1, "src");
gst_pad_add_probe (srcpad, GST_PAD_PROBE_TYPE_EVENT_UPSTREAM,
(GstPadProbeCallback) on_source1_pad_event_cb, NULL, NULL);
@@ -73,7 +73,7 @@ GST_START_TEST (test_change_object_start_stop_in_current_stack)
Priority = G_MAXUINT32
*/
def =
- videotest_gnl_src ("default", 0 * GST_SECOND, 0 * GST_SECOND, 2,
+ videotest_nle_src ("default", 0 * GST_SECOND, 0 * GST_SECOND, 2,
G_MAXUINT32);
g_object_set (def, "expandable", TRUE, NULL);
@@ -82,8 +82,8 @@ GST_START_TEST (test_change_object_start_stop_in_current_stack)
/* Add source 1 */
- gnl_composition_add (GST_BIN (comp), source1);
- gnl_composition_add (GST_BIN (comp), def);
+ nle_composition_add (GST_BIN (comp), source1);
+ nle_composition_add (GST_BIN (comp), def);
commit_and_wait (comp, &ret);
check_start_stop_duration (source1, 0, 2 * GST_SECOND, 2 * GST_SECOND);
check_start_stop_duration (comp, 0, 2 * GST_SECOND, 2 * GST_SECOND);
@@ -137,20 +137,13 @@ GST_START_TEST (test_change_object_start_stop_in_current_stack)
/* keep an extra ref to source1 as we remove it from the bin */
gst_object_ref (source1);
- fail_unless (gnl_composition_remove (GST_BIN (comp), source1));
+ fail_unless (nle_composition_remove (GST_BIN (comp), source1));
g_object_set (source1, "start", (guint64) 0 * GST_SECOND, NULL);
/* add the source again and check that the ghostpad is added again */
- gnl_composition_add (GST_BIN (comp), source1);
+ nle_composition_add (GST_BIN (comp), source1);
gst_object_unref (source1);
commit_and_wait (comp, &ret);
- g_mutex_lock (&pad_added_lock);
- g_cond_wait (&pad_added_cond, &pad_added_lock);
- fail_unless_equals_int (composition_pad_added, 2);
- fail_unless_equals_int (composition_pad_removed, 1);
- g_mutex_unlock (&pad_added_lock);
-
- seek_events_before = seek_events;
g_object_set (source1, "duration", (guint64) 1 * GST_SECOND, NULL);
commit_and_wait (comp, &ret);
@@ -177,16 +170,16 @@ GST_START_TEST (test_remove_invalid_object)
GstBin *composition;
GstElement *source1, *source2;
- composition = GST_BIN (gst_element_factory_make ("gnlcomposition",
+ composition = GST_BIN (gst_element_factory_make ("nlecomposition",
"composition"));
gst_element_set_state (GST_ELEMENT (composition), GST_STATE_READY);
- source1 = gst_element_factory_make ("gnlsource", "source1");
- source2 = gst_element_factory_make ("gnlsource", "source2");
+ source1 = gst_element_factory_make ("nlesource", "source1");
+ source2 = gst_element_factory_make ("nlesource", "source2");
- gnl_composition_add (composition, source1);
- gnl_composition_remove (composition, source2);
- fail_unless (gnl_composition_remove (composition, source1));
+ nle_composition_add (composition, source1);
+ nle_composition_remove (composition, source2);
+ fail_unless (nle_composition_remove (composition, source1));
gst_element_set_state (GST_ELEMENT (composition), GST_STATE_NULL);
gst_object_unref (composition);
@@ -198,21 +191,21 @@ GST_END_TEST;
GST_START_TEST (test_dispose_on_commit)
{
GstElement *composition;
- GstElement *gnlsource;
+ GstElement *nlesource;
GstElement *audiotestsrc;
GstElement *pipeline, *fakesink;
gboolean ret;
- composition = gst_element_factory_make ("gnlcomposition", "composition");
+ composition = gst_element_factory_make ("nlecomposition", "composition");
pipeline = GST_ELEMENT (gst_pipeline_new (NULL));
fakesink = gst_element_factory_make ("fakesink", NULL);
- gnlsource = gst_element_factory_make ("gnlsource", "gnlsource1");
+ nlesource = gst_element_factory_make ("nlesource", "nlesource1");
audiotestsrc = gst_element_factory_make ("audiotestsrc", "audiotestsrc1");
- gst_bin_add (GST_BIN (gnlsource), audiotestsrc);
- g_object_set (gnlsource, "start", (guint64) 0 * GST_SECOND,
+ gst_bin_add (GST_BIN (nlesource), audiotestsrc);
+ g_object_set (nlesource, "start", (guint64) 0 * GST_SECOND,
"duration", 10 * GST_SECOND, "inpoint", (guint64) 0, "priority", 1, NULL);
- fail_unless (gnl_composition_add (GST_BIN (composition), gnlsource));
+ fail_unless (nle_composition_add (GST_BIN (composition), nlesource));
gst_bin_add_many (GST_BIN (pipeline), composition, fakesink, NULL);
fail_unless (gst_element_link (composition, fakesink) == TRUE);
@@ -231,11 +224,11 @@ GST_START_TEST (test_simple_adder)
GstBus *bus;
GstMessage *message;
GstElement *pipeline;
- GstElement *gnl_adder;
+ GstElement *nle_adder;
GstElement *composition;
GstElement *adder, *fakesink;
GstClockTime start_playing_time;
- GstElement *gnlsource1, *gnlsource2;
+ GstElement *nlesource1, *nlesource2;
GstElement *audiotestsrc1, *audiotestsrc2;
gboolean carry_on = TRUE, ret;
@@ -245,34 +238,34 @@ GST_START_TEST (test_simple_adder)
bus = gst_pipeline_get_bus (GST_PIPELINE (pipeline));
GST_ERROR ("Pipeline refcounts: %i", ((GObject *) pipeline)->ref_count);
- composition = gst_element_factory_make ("gnlcomposition", "composition");
+ composition = gst_element_factory_make ("nlecomposition", "composition");
gst_element_set_state (composition, GST_STATE_READY);
fakesink = gst_element_factory_make ("fakesink", NULL);
- /* gnl_adder */
- gnl_adder = gst_element_factory_make ("gnloperation", "gnl_adder");
+ /* nle_adder */
+ nle_adder = gst_element_factory_make ("nleoperation", "nle_adder");
adder = gst_element_factory_make ("adder", "adder");
fail_unless (adder != NULL);
- gst_bin_add (GST_BIN (gnl_adder), adder);
- g_object_set (gnl_adder, "start", (guint64) 0 * GST_SECOND,
+ gst_bin_add (GST_BIN (nle_adder), adder);
+ g_object_set (nle_adder, "start", (guint64) 0 * GST_SECOND,
"duration", total_time, "inpoint", (guint64) 0 * GST_SECOND,
"priority", 0, NULL);
- gnl_composition_add (GST_BIN (composition), gnl_adder);
+ nle_composition_add (GST_BIN (composition), nle_adder);
GST_ERROR ("Pipeline refcounts: %i", ((GObject *) pipeline)->ref_count);
/* source 1 */
- gnlsource1 = gst_element_factory_make ("gnlsource", "gnlsource1");
+ nlesource1 = gst_element_factory_make ("nlesource", "nlesource1");
audiotestsrc1 = gst_element_factory_make ("audiotestsrc", "audiotestsrc1");
- gst_bin_add (GST_BIN (gnlsource1), audiotestsrc1);
- g_object_set (gnlsource1, "start", (guint64) 0 * GST_SECOND,
+ gst_bin_add (GST_BIN (nlesource1), audiotestsrc1);
+ g_object_set (nlesource1, "start", (guint64) 0 * GST_SECOND,
"duration", total_time / 2, "inpoint", (guint64) 0, "priority", 1, NULL);
- fail_unless (gnl_composition_add (GST_BIN (composition), gnlsource1));
+ fail_unless (nle_composition_add (GST_BIN (composition), nlesource1));
- /* gnlsource2 */
- gnlsource2 = gst_element_factory_make ("gnlsource", "gnlsource2");
+ /* nlesource2 */
+ nlesource2 = gst_element_factory_make ("nlesource", "nlesource2");
audiotestsrc2 = gst_element_factory_make ("audiotestsrc", "audiotestsrc2");
- gst_bin_add (GST_BIN (gnlsource2), GST_ELEMENT (audiotestsrc2));
- g_object_set (gnlsource2, "start", (guint64) 0 * GST_SECOND,
+ gst_bin_add (GST_BIN (nlesource2), GST_ELEMENT (audiotestsrc2));
+ g_object_set (nlesource2, "start", (guint64) 0 * GST_SECOND,
"duration", total_time, "inpoint", (guint64) 0 * GST_SECOND, "priority",
2, NULL);
@@ -281,7 +274,7 @@ GST_START_TEST (test_simple_adder)
GST_ERROR ("Pipeline refcounts: %i", ((GObject *) pipeline)->ref_count);
- fail_unless (gnl_composition_add (GST_BIN (composition), gnlsource2));
+ fail_unless (nle_composition_add (GST_BIN (composition), nlesource2));
fail_unless (gst_element_link (composition, fakesink) == TRUE);
GST_DEBUG ("Setting pipeline to PLAYING");
@@ -298,7 +291,7 @@ GST_START_TEST (test_simple_adder)
fail_error_message (message);
GST_DEBUG_BIN_TO_DOT_FILE_WITH_TS (GST_BIN (pipeline),
- GST_DEBUG_GRAPH_SHOW_ALL, "gnl-simple-adder-test-play");
+ GST_DEBUG_GRAPH_SHOW_ALL, "nle-simple-adder-test-play");
/* Now play the 10 second composition */
start_playing_time = gst_util_get_timestamp ();
@@ -309,7 +302,7 @@ GST_START_TEST (test_simple_adder)
GST_ERROR ("No EOS found after %" GST_TIME_FORMAT " sec",
GST_TIME_ARGS ((total_time / GST_SECOND) + 1));
GST_DEBUG_BIN_TO_DOT_FILE_WITH_TS (GST_BIN (pipeline),
- GST_DEBUG_GRAPH_SHOW_ALL, "gnl-simple-adder-test-fail");
+ GST_DEBUG_GRAPH_SHOW_ALL, "nle-simple-adder-test-fail");
fail_unless ("No EOS received" == NULL);
@@ -351,9 +344,10 @@ GST_END_TEST;
static Suite *
gnonlin_suite (void)
{
- Suite *s = suite_create ("gnlcomposition");
- TCase *tc_chain = tcase_create ("gnlcomposition");
+ Suite *s = suite_create ("nlecomposition");
+ TCase *tc_chain = tcase_create ("nlecomposition");
+ ges_init ();
suite_add_tcase (s, tc_chain);
tcase_add_test (tc_chain, test_change_object_start_stop_in_current_stack);
diff --git a/tests/check/gnl/gnloperation.c b/tests/check/nle/nleoperation.c
index 86354f1f..b111c4a3 100644
--- a/tests/check/gnl/gnloperation.c
+++ b/tests/check/nle/nleoperation.c
@@ -131,7 +131,7 @@ GST_START_TEST (test_simple_operation)
GList *segments = NULL;
comp =
- gst_element_factory_make_or_warn ("gnlcomposition", "test_composition");
+ gst_element_factory_make_or_warn ("nlecomposition", "test_composition");
gst_element_set_state (comp, GST_STATE_READY);
/* TOPOLOGY
@@ -149,7 +149,7 @@ GST_START_TEST (test_simple_operation)
Priority : 1
*/
- source = videotest_gnl_src ("source", 0, 3 * GST_SECOND, 2, 1);
+ source = videotest_nle_src ("source", 0, 3 * GST_SECOND, 2, 1);
fail_if (source == NULL);
/*
@@ -166,7 +166,7 @@ GST_START_TEST (test_simple_operation)
ASSERT_OBJECT_REFCOUNT (source, "source", 1);
ASSERT_OBJECT_REFCOUNT (oper, "oper", 1);
- gnl_composition_add (GST_BIN (comp), source);
+ nle_composition_add (GST_BIN (comp), source);
commit_and_wait (comp, &ret);
check_start_stop_duration (comp, 0, 3 * GST_SECOND, 3 * GST_SECOND);
@@ -174,7 +174,7 @@ GST_START_TEST (test_simple_operation)
/* Add operaton */
- gnl_composition_add (GST_BIN (comp), oper);
+ nle_composition_add (GST_BIN (comp), oper);
commit_and_wait (comp, &ret);
check_start_stop_duration (comp, 0, 3 * GST_SECOND, 3 * GST_SECOND);
@@ -183,14 +183,14 @@ GST_START_TEST (test_simple_operation)
/* remove source */
gst_object_ref (source);
- gnl_composition_remove (GST_BIN (comp), source);
+ nle_composition_remove (GST_BIN (comp), source);
check_start_stop_duration (comp, 1 * GST_SECOND, 2 * GST_SECOND,
1 * GST_SECOND);
ASSERT_OBJECT_REFCOUNT (source, "source", 1);
/* re-add source */
- gnl_composition_add (GST_BIN (comp), source);
+ nle_composition_add (GST_BIN (comp), source);
commit_and_wait (comp, &ret);
check_start_stop_duration (comp, 0, 3 * GST_SECOND, 3 * GST_SECOND);
gst_object_unref (source);
@@ -219,7 +219,7 @@ GST_START_TEST (test_pyramid_operations)
GList *segments = NULL;
comp =
- gst_element_factory_make_or_warn ("gnlcomposition", "test_composition");
+ gst_element_factory_make_or_warn ("nlecomposition", "test_composition");
gst_element_set_state (comp, GST_STATE_READY);
/*
@@ -229,7 +229,7 @@ GST_START_TEST (test_pyramid_operations)
Priority : 2
*/
- source = videotest_gnl_src ("source", 0, 10 * GST_SECOND, 2, 2);
+ source = videotest_nle_src ("source", 0, 10 * GST_SECOND, 2, 2);
/*
operation1
@@ -256,7 +256,7 @@ GST_START_TEST (test_pyramid_operations)
ASSERT_OBJECT_REFCOUNT (oper1, "oper1", 1);
ASSERT_OBJECT_REFCOUNT (oper2, "oper2", 1);
- gnl_composition_add (GST_BIN (comp), source);
+ nle_composition_add (GST_BIN (comp), source);
commit_and_wait (comp, &ret);
check_start_stop_duration (source, 0, 10 * GST_SECOND, 10 * GST_SECOND);
check_start_stop_duration (comp, 0, 10 * GST_SECOND, 10 * GST_SECOND);
@@ -265,7 +265,7 @@ GST_START_TEST (test_pyramid_operations)
/* Add operation 1 */
- gnl_composition_add (GST_BIN (comp), oper1);
+ nle_composition_add (GST_BIN (comp), oper1);
commit_and_wait (comp, &ret);
check_start_stop_duration (oper1, 4 * GST_SECOND, 6 * GST_SECOND,
2 * GST_SECOND);
@@ -275,7 +275,7 @@ GST_START_TEST (test_pyramid_operations)
/* Add operation 2 */
- gnl_composition_add (GST_BIN (comp), oper2);
+ nle_composition_add (GST_BIN (comp), oper2);
commit_and_wait (comp, &ret);
check_start_stop_duration (oper2, 2 * GST_SECOND, 8 * GST_SECOND,
6 * GST_SECOND);
@@ -311,7 +311,7 @@ GST_START_TEST (test_pyramid_operations2)
GList *segments = NULL;
comp =
- gst_element_factory_make_or_warn ("gnlcomposition", "test_composition");
+ gst_element_factory_make_or_warn ("nlecomposition", "test_composition");
gst_element_set_state (comp, GST_STATE_READY);
/*
@@ -321,7 +321,7 @@ GST_START_TEST (test_pyramid_operations2)
Priority : 2
*/
- source1 = videotest_gnl_src ("source1", 0, 2 * GST_SECOND, 2, 2);
+ source1 = videotest_nle_src ("source1", 0, 2 * GST_SECOND, 2, 2);
/*
operation
@@ -339,14 +339,14 @@ GST_START_TEST (test_pyramid_operations2)
Priority : 2
*/
- source2 = videotest_gnl_src ("source2", 4 * GST_SECOND, 2 * GST_SECOND, 2, 2);
+ source2 = videotest_nle_src ("source2", 4 * GST_SECOND, 2 * GST_SECOND, 2, 2);
/*
def (default source)
Priority = G_MAXUINT32
*/
def =
- videotest_gnl_src ("default", 0 * GST_SECOND, 0 * GST_SECOND, 2,
+ videotest_nle_src ("default", 0 * GST_SECOND, 0 * GST_SECOND, 2,
G_MAXUINT32);
g_object_set (def, "expandable", TRUE, NULL);
@@ -357,25 +357,25 @@ GST_START_TEST (test_pyramid_operations2)
/* Add source 1 */
- gnl_composition_add (GST_BIN (comp), source1);
+ nle_composition_add (GST_BIN (comp), source1);
commit_and_wait (comp, &ret);
check_start_stop_duration (comp, 0, 2 * GST_SECOND, 2 * GST_SECOND);
/* Add source 2 */
- gnl_composition_add (GST_BIN (comp), source2);
+ nle_composition_add (GST_BIN (comp), source2);
commit_and_wait (comp, &ret);
check_start_stop_duration (comp, 0, 6 * GST_SECOND, 6 * GST_SECOND);
/* Add operation */
- gnl_composition_add (GST_BIN (comp), oper);
+ nle_composition_add (GST_BIN (comp), oper);
commit_and_wait (comp, &ret);
check_start_stop_duration (comp, 0, 6 * GST_SECOND, 6 * GST_SECOND);
/* Add default */
- gnl_composition_add (GST_BIN (comp), def);
+ nle_composition_add (GST_BIN (comp), def);
commit_and_wait (comp, &ret);
check_start_stop_duration (comp, 0, 6 * GST_SECOND, 6 * GST_SECOND);
@@ -408,7 +408,7 @@ GST_START_TEST (test_pyramid_operations_expandable)
GList *segments = NULL;
comp =
- gst_element_factory_make_or_warn ("gnlcomposition", "test_composition");
+ gst_element_factory_make_or_warn ("nlecomposition", "test_composition");
gst_element_set_state (comp, GST_STATE_READY);
/*
@@ -418,7 +418,7 @@ GST_START_TEST (test_pyramid_operations_expandable)
Priority : 2
*/
- source1 = videotest_gnl_src ("source1", 0, 2 * GST_SECOND, 2, 2);
+ source1 = videotest_nle_src ("source1", 0, 2 * GST_SECOND, 2, 2);
/*
operation (expandable)
@@ -437,14 +437,14 @@ GST_START_TEST (test_pyramid_operations_expandable)
Priority : 2
*/
- source2 = videotest_gnl_src ("source2", 4 * GST_SECOND, 2 * GST_SECOND, 2, 2);
+ source2 = videotest_nle_src ("source2", 4 * GST_SECOND, 2 * GST_SECOND, 2, 2);
/*
def (default source)
Priority = G_MAXUINT32
*/
def =
- videotest_gnl_src ("default", 0 * GST_SECOND, 0 * GST_SECOND, 2,
+ videotest_nle_src ("default", 0 * GST_SECOND, 0 * GST_SECOND, 2,
G_MAXUINT32);
g_object_set (def, "expandable", TRUE, NULL);
@@ -454,13 +454,13 @@ GST_START_TEST (test_pyramid_operations_expandable)
ASSERT_OBJECT_REFCOUNT (def, "default", 1);
/* Add source 1 */
- gnl_composition_add (GST_BIN (comp), source1);
+ nle_composition_add (GST_BIN (comp), source1);
/* Add source 2 */
- gnl_composition_add (GST_BIN (comp), source2);
+ nle_composition_add (GST_BIN (comp), source2);
/* Add operation */
- gnl_composition_add (GST_BIN (comp), oper);
+ nle_composition_add (GST_BIN (comp), oper);
/* Add default */
- gnl_composition_add (GST_BIN (comp), def);
+ nle_composition_add (GST_BIN (comp), def);
commit_and_wait (comp, &ret);
check_start_stop_duration (source1, 0, 2 * GST_SECOND, 2 * GST_SECOND);
@@ -493,7 +493,7 @@ GST_START_TEST (test_complex_operations)
GList *segments = NULL;
comp =
- gst_element_factory_make_or_warn ("gnlcomposition", "test_composition");
+ gst_element_factory_make_or_warn ("nlecomposition", "test_composition");
gst_element_set_state (comp, GST_STATE_READY);
/* TOPOLOGY
@@ -512,7 +512,7 @@ GST_START_TEST (test_complex_operations)
Priority : 3
*/
- source1 = videotest_in_bin_gnl_src ("source1", 0, 4 * GST_SECOND, 2, 3);
+ source1 = videotest_in_bin_nle_src ("source1", 0, 4 * GST_SECOND, 2, 3);
fail_if (source1 == NULL);
/*
@@ -523,7 +523,7 @@ GST_START_TEST (test_complex_operations)
*/
source2 =
- videotest_in_bin_gnl_src ("source2", 2 * GST_SECOND, 4 * GST_SECOND, 2,
+ videotest_in_bin_nle_src ("source2", 2 * GST_SECOND, 4 * GST_SECOND, 2,
2);
fail_if (source2 == NULL);
@@ -543,17 +543,17 @@ GST_START_TEST (test_complex_operations)
ASSERT_OBJECT_REFCOUNT (oper, "oper", 1);
/* Add source1 */
- gnl_composition_add (GST_BIN (comp), source1);
+ nle_composition_add (GST_BIN (comp), source1);
check_start_stop_duration (comp, 0, 0, 0);
ASSERT_OBJECT_REFCOUNT (source1, "source1", 1);
/* Add source2 */
- gnl_composition_add (GST_BIN (comp), source2);
+ nle_composition_add (GST_BIN (comp), source2);
check_start_stop_duration (comp, 0, 0, 0);
ASSERT_OBJECT_REFCOUNT (source2, "source2", 1);
/* Add operaton */
- gnl_composition_add (GST_BIN (comp), oper);
+ nle_composition_add (GST_BIN (comp), oper);
check_start_stop_duration (comp, 0, 0, 0);
commit_and_wait (comp, &ret);
@@ -584,7 +584,7 @@ GST_START_TEST (test_complex_operations_bis)
GList *segments = NULL;
comp =
- gst_element_factory_make_or_warn ("gnlcomposition", "test_composition");
+ gst_element_factory_make_or_warn ("nlecomposition", "test_composition");
gst_element_set_state (comp, GST_STATE_READY);
/* TOPOLOGY
@@ -604,7 +604,7 @@ GST_START_TEST (test_complex_operations_bis)
Priority : 2
*/
- source1 = videotest_in_bin_gnl_src ("source1", 0, 4 * GST_SECOND, 3, 2);
+ source1 = videotest_in_bin_nle_src ("source1", 0, 4 * GST_SECOND, 3, 2);
fail_if (source1 == NULL);
/*
@@ -615,7 +615,7 @@ GST_START_TEST (test_complex_operations_bis)
*/
source2 =
- videotest_in_bin_gnl_src ("source2", 2 * GST_SECOND, 4 * GST_SECOND, 2,
+ videotest_in_bin_nle_src ("source2", 2 * GST_SECOND, 4 * GST_SECOND, 2,
3);
fail_if (source2 == NULL);
@@ -637,14 +637,14 @@ GST_START_TEST (test_complex_operations_bis)
ASSERT_OBJECT_REFCOUNT (oper, "oper", 1);
/* Add source1 */
- gnl_composition_add (GST_BIN (comp), source1);
+ nle_composition_add (GST_BIN (comp), source1);
commit_and_wait (comp, &ret);
check_start_stop_duration (comp, 0, 4 * GST_SECOND, 4 * GST_SECOND);
ASSERT_OBJECT_REFCOUNT (source1, "source1", 1);
/* Add source2 */
- gnl_composition_add (GST_BIN (comp), source2);
+ nle_composition_add (GST_BIN (comp), source2);
commit_and_wait (comp, &ret);
check_start_stop_duration (comp, 0, 6 * GST_SECOND, 6 * GST_SECOND);
@@ -652,7 +652,7 @@ GST_START_TEST (test_complex_operations_bis)
/* Add operaton */
- gnl_composition_add (GST_BIN (comp), oper);
+ nle_composition_add (GST_BIN (comp), oper);
commit_and_wait (comp, &ret);
check_start_stop_duration (comp, 0, 6 * GST_SECOND, 6 * GST_SECOND);
/* Since it's expandable, it should have changed to full length */
@@ -681,9 +681,10 @@ GST_END_TEST;
static Suite *
gnonlin_suite (void)
{
- Suite *s = suite_create ("gnloperation");
- TCase *tc_chain = tcase_create ("gnloperation");
+ Suite *s = suite_create ("nleoperation");
+ TCase *tc_chain = tcase_create ("nleoperation");
+ ges_init ();
suite_add_tcase (s, tc_chain);
tcase_add_test (tc_chain, test_simple_operation);
diff --git a/tests/check/gnl/gnlsource.c b/tests/check/nle/nlesource.c
index e10cc4b3..102fed8b 100644
--- a/tests/check/gnl/gnlsource.c
+++ b/tests/check/nle/nlesource.c
@@ -3,7 +3,7 @@
GST_START_TEST (test_simple_videotestsrc)
{
GstElement *pipeline;
- GstElement *gnlsource, *sink;
+ GstElement *nlesource, *sink;
CollectStructure *collect;
GstBus *bus;
GstMessage *message;
@@ -18,20 +18,20 @@ GST_START_TEST (test_simple_videotestsrc)
Duration : 1s
Priority : 1
*/
- gnlsource =
- videotest_gnl_src ("source1", 1 * GST_SECOND, 1 * GST_SECOND, 2, 1);
- fail_if (gnlsource == NULL);
- check_start_stop_duration (gnlsource, 1 * GST_SECOND, 2 * GST_SECOND,
+ nlesource =
+ videotest_nle_src ("source1", 1 * GST_SECOND, 1 * GST_SECOND, 2, 1);
+ fail_if (nlesource == NULL);
+ check_start_stop_duration (nlesource, 1 * GST_SECOND, 2 * GST_SECOND,
1 * GST_SECOND);
sink = gst_element_factory_make_or_warn ("fakesink", "sink");
fail_if (sink == NULL);
- gst_bin_add_many (GST_BIN (pipeline), gnlsource, sink, NULL);
+ gst_bin_add_many (GST_BIN (pipeline), nlesource, sink, NULL);
/* Shared data */
collect = g_new0 (CollectStructure, 1);
- collect->comp = gnlsource;
+ collect->comp = nlesource;
collect->sink = sink;
/* Expected segments */
@@ -39,7 +39,7 @@ GST_START_TEST (test_simple_videotestsrc)
segment_new (1.0, GST_FORMAT_TIME,
1 * GST_SECOND, 2 * GST_SECOND, 1 * GST_SECOND));
- gst_element_link (gnlsource, sink);
+ gst_element_link (nlesource, sink);
sinkpad = gst_element_get_static_pad (sink, "sink");
fail_if (sinkpad == NULL);
@@ -49,7 +49,7 @@ GST_START_TEST (test_simple_videotestsrc)
bus = gst_element_get_bus (pipeline);
GST_DEBUG ("Setting pipeline to PLAYING");
- ASSERT_OBJECT_REFCOUNT (gnlsource, "gnlsource", 1);
+ ASSERT_OBJECT_REFCOUNT (nlesource, "nlesource", 1);
fail_if (gst_element_set_state (GST_ELEMENT (pipeline),
GST_STATE_PLAYING) == GST_STATE_CHANGE_FAILURE);
@@ -104,7 +104,7 @@ GST_END_TEST;
GST_START_TEST (test_videotestsrc_in_bin)
{
GstElement *pipeline;
- GstElement *gnlsource, *sink;
+ GstElement *nlesource, *sink;
CollectStructure *collect;
GstBus *bus;
GstMessage *message;
@@ -119,26 +119,26 @@ GST_START_TEST (test_videotestsrc_in_bin)
Duration : 1s
Priority : 1
*/
- gnlsource = videotest_in_bin_gnl_src ("source1", 0, 1 * GST_SECOND, 2, 1);
+ nlesource = videotest_in_bin_nle_src ("source1", 0, 1 * GST_SECOND, 2, 1);
/* Handle systems which don't have alpha available */
- if (gnlsource == NULL)
+ if (nlesource == NULL)
return;
sink = gst_element_factory_make_or_warn ("fakesink", "sink");
fail_if (sink == NULL);
- gst_bin_add_many (GST_BIN (pipeline), gnlsource, sink, NULL);
+ gst_bin_add_many (GST_BIN (pipeline), nlesource, sink, NULL);
/* Shared data */
collect = g_new0 (CollectStructure, 1);
- collect->comp = gnlsource;
+ collect->comp = nlesource;
collect->sink = sink;
/* Expected segments */
collect->expected_segments = g_list_append (collect->expected_segments,
segment_new (1.0, GST_FORMAT_TIME, 0, 1 * GST_SECOND, 0));
- gst_element_link (gnlsource, sink);
+ gst_element_link (nlesource, sink);
sinkpad = gst_element_get_static_pad (sink, "sink");
fail_if (sinkpad == NULL);
@@ -148,7 +148,7 @@ GST_START_TEST (test_videotestsrc_in_bin)
bus = gst_element_get_bus (pipeline);
GST_DEBUG ("Setting pipeline to PLAYING");
- ASSERT_OBJECT_REFCOUNT (gnlsource, "gnlsource", 1);
+ ASSERT_OBJECT_REFCOUNT (nlesource, "nlesource", 1);
fail_if (gst_element_set_state (GST_ELEMENT (pipeline),
GST_STATE_PLAYING) == GST_STATE_CHANGE_FAILURE);
@@ -203,9 +203,10 @@ GST_END_TEST;
static Suite *
gnonlin_suite (void)
{
- Suite *s = suite_create ("gnlsource");
- TCase *tc_chain = tcase_create ("gnlsource");
+ Suite *s = suite_create ("nlesource");
+ TCase *tc_chain = tcase_create ("nlesource");
+ ges_init ();
suite_add_tcase (s, tc_chain);
if (0)
diff --git a/tests/check/gnl/seek.c b/tests/check/nle/seek.c
index 35ee3078..53d3e179 100644
--- a/tests/check/gnl/seek.c
+++ b/tests/check/nle/seek.c
@@ -166,7 +166,7 @@ test_simplest_full (void)
GList *seeks = NULL;
comp =
- gst_element_factory_make_or_warn ("gnlcomposition", "test_composition");
+ gst_element_factory_make_or_warn ("nlecomposition", "test_composition");
fail_if (comp == NULL);
/*
@@ -177,14 +177,14 @@ test_simplest_full (void)
Priority : 1
*/
source1 =
- videotest_gnl_src_full ("source1", 0, 1 * GST_SECOND, 5 * GST_SECOND, 3,
+ videotest_nle_src_full ("source1", 0, 1 * GST_SECOND, 5 * GST_SECOND, 3,
1);
fail_if (source1 == NULL);
check_start_stop_duration (source1, 0, 1 * GST_SECOND, 1 * GST_SECOND);
/* Add one source */
- gnl_composition_add (GST_BIN (comp), source1);
+ nle_composition_add (GST_BIN (comp), source1);
commit_and_wait (comp, &ret);
check_start_stop_duration (comp, 0, 1 * GST_SECOND, 1 * GST_SECOND);
@@ -230,7 +230,7 @@ test_one_after_other_full (void)
GList *segments = NULL, *seeks = NULL;
comp =
- gst_element_factory_make_or_warn ("gnlcomposition", "test_composition");
+ gst_element_factory_make_or_warn ("nlecomposition", "test_composition");
fail_if (comp == NULL);
/* TOPOLOGY
@@ -249,7 +249,7 @@ test_one_after_other_full (void)
Priority : 1
*/
source1 =
- videotest_gnl_src_full ("source1", 0, 1 * GST_SECOND, 5 * GST_SECOND, 3,
+ videotest_nle_src_full ("source1", 0, 1 * GST_SECOND, 5 * GST_SECOND, 3,
1);
fail_if (source1 == NULL);
check_start_stop_duration (source1, 0, 1 * GST_SECOND, 1 * GST_SECOND);
@@ -261,15 +261,15 @@ test_one_after_other_full (void)
Media start : 2s
Priority : 1
*/
- source2 = videotest_gnl_src_full ("source2", 1 * GST_SECOND, 1 * GST_SECOND,
+ source2 = videotest_nle_src_full ("source2", 1 * GST_SECOND, 1 * GST_SECOND,
2 * GST_SECOND, 2, 1);
fail_if (source2 == NULL);
check_start_stop_duration (source2, 1 * GST_SECOND, 2 * GST_SECOND,
1 * GST_SECOND);
/* Add sources */
- gnl_composition_add (GST_BIN (comp), source1);
- gnl_composition_add (GST_BIN (comp), source2);
+ nle_composition_add (GST_BIN (comp), source1);
+ nle_composition_add (GST_BIN (comp), source2);
commit_and_wait (comp, &ret);
check_start_stop_duration (source1, 0, 1 * GST_SECOND, 1 * GST_SECOND);
check_start_stop_duration (source2, 1 * GST_SECOND, 2 * GST_SECOND,
@@ -315,7 +315,7 @@ test_one_under_another_full (void)
GList *segments = NULL, *seeks = NULL;
comp =
- gst_element_factory_make_or_warn ("gnlcomposition", "test_composition");
+ gst_element_factory_make_or_warn ("nlecomposition", "test_composition");
fail_if (comp == NULL);
/* TOPOLOGY
@@ -333,7 +333,7 @@ test_one_under_another_full (void)
Duration : 2s
Priority : 1
*/
- source1 = videotest_gnl_src ("source1", 0, 2 * GST_SECOND, 3, 1);
+ source1 = videotest_nle_src ("source1", 0, 2 * GST_SECOND, 3, 1);
fail_if (source1 == NULL);
check_start_stop_duration (source1, 0, 2 * GST_SECOND, 2 * GST_SECOND);
@@ -343,15 +343,15 @@ test_one_under_another_full (void)
Duration : 2s
Priority : 2
*/
- source2 = videotest_gnl_src ("source2", 1 * GST_SECOND, 2 * GST_SECOND, 2, 2);
+ source2 = videotest_nle_src ("source2", 1 * GST_SECOND, 2 * GST_SECOND, 2, 2);
fail_if (source2 == NULL);
check_start_stop_duration (source2, 1 * GST_SECOND, 3 * GST_SECOND,
2 * GST_SECOND);
/* Add two sources */
- gnl_composition_add (GST_BIN (comp), source1);
- gnl_composition_add (GST_BIN (comp), source2);
+ nle_composition_add (GST_BIN (comp), source1);
+ nle_composition_add (GST_BIN (comp), source2);
commit_and_wait (comp, &ret);
check_start_stop_duration (source1, 0, 2 * GST_SECOND, 2 * GST_SECOND);
check_start_stop_duration (source2, 1 * GST_SECOND, 3 * GST_SECOND,
@@ -396,7 +396,7 @@ test_one_bin_after_other_full (void)
GList *segments = NULL, *seeks = NULL;
comp =
- gst_element_factory_make_or_warn ("gnlcomposition", "test_composition");
+ gst_element_factory_make_or_warn ("nlecomposition", "test_composition");
fail_if (comp == NULL);
/*
@@ -405,7 +405,7 @@ test_one_bin_after_other_full (void)
Duration : 1s
Priority : 1
*/
- source1 = videotest_in_bin_gnl_src ("source1", 0, 1 * GST_SECOND, 3, 1);
+ source1 = videotest_in_bin_nle_src ("source1", 0, 1 * GST_SECOND, 3, 1);
fail_if (source1 == NULL);
check_start_stop_duration (source1, 0, 1 * GST_SECOND, 1 * GST_SECOND);
@@ -416,17 +416,17 @@ test_one_bin_after_other_full (void)
Priority : 1
*/
source2 =
- videotest_in_bin_gnl_src ("source2", 1 * GST_SECOND, 1 * GST_SECOND, 2,
+ videotest_in_bin_nle_src ("source2", 1 * GST_SECOND, 1 * GST_SECOND, 2,
1);
fail_if (source2 == NULL);
/* Add one source */
- gnl_composition_add (GST_BIN (comp), source1);
+ nle_composition_add (GST_BIN (comp), source1);
/* Second source */
- gnl_composition_add (GST_BIN (comp), source2);
+ nle_composition_add (GST_BIN (comp), source2);
commit_and_wait (comp, &ret);
check_start_stop_duration (source1, 0, 1 * GST_SECOND, 1 * GST_SECOND);
check_start_stop_duration (source2, 1 * GST_SECOND, 2 * GST_SECOND,
@@ -476,7 +476,7 @@ GST_START_TEST (test_complex_operations)
GList *segments = NULL, *seeks = NULL;
comp =
- gst_element_factory_make_or_warn ("gnlcomposition", "test_composition");
+ gst_element_factory_make_or_warn ("nlecomposition", "test_composition");
/* TOPOLOGY
*
@@ -494,7 +494,7 @@ GST_START_TEST (test_complex_operations)
Priority : 3
*/
- source1 = videotest_in_bin_gnl_src ("source1", 0, 4 * GST_SECOND, 2, 3);
+ source1 = videotest_in_bin_nle_src ("source1", 0, 4 * GST_SECOND, 2, 3);
fail_if (source1 == NULL);
check_start_stop_duration (source1, 0, 4 * GST_SECOND, 4 * GST_SECOND);
@@ -506,7 +506,7 @@ GST_START_TEST (test_complex_operations)
*/
source2 =
- videotest_in_bin_gnl_src ("source2", 2 * GST_SECOND, 4 * GST_SECOND, 2,
+ videotest_in_bin_nle_src ("source2", 2 * GST_SECOND, 4 * GST_SECOND, 2,
2);
fail_if (source2 == NULL);
check_start_stop_duration (source2, 2 * GST_SECOND, 6 * GST_SECOND,
@@ -531,14 +531,14 @@ GST_START_TEST (test_complex_operations)
ASSERT_OBJECT_REFCOUNT (oper, "oper", 1);
/* Add source1 */
- gnl_composition_add (GST_BIN (comp), source1);
+ nle_composition_add (GST_BIN (comp), source1);
commit_and_wait (comp, &ret);
check_start_stop_duration (comp, 0, 4 * GST_SECOND, 4 * GST_SECOND);
ASSERT_OBJECT_REFCOUNT (source1, "source1", 1);
/* Add source2 */
- gnl_composition_add (GST_BIN (comp), source2);
+ nle_composition_add (GST_BIN (comp), source2);
commit_and_wait (comp, &ret);
check_start_stop_duration (comp, 0, 6 * GST_SECOND, 6 * GST_SECOND);
@@ -546,7 +546,7 @@ GST_START_TEST (test_complex_operations)
/* Add operaton */
- gnl_composition_add (GST_BIN (comp), oper);
+ nle_composition_add (GST_BIN (comp), oper);
commit_and_wait (comp, &ret);
check_start_stop_duration (comp, 0, 6 * GST_SECOND, 6 * GST_SECOND);
@@ -593,7 +593,7 @@ GST_START_TEST (test_complex_operations_bis)
GList *segments = NULL, *seeks = NULL;
comp =
- gst_element_factory_make_or_warn ("gnlcomposition", "test_composition");
+ gst_element_factory_make_or_warn ("nlecomposition", "test_composition");
/* TOPOLOGY
*
@@ -612,7 +612,7 @@ GST_START_TEST (test_complex_operations_bis)
Priority : 2
*/
- source1 = videotest_in_bin_gnl_src ("source1", 0, 4 * GST_SECOND, 3, 2);
+ source1 = videotest_in_bin_nle_src ("source1", 0, 4 * GST_SECOND, 3, 2);
fail_if (source1 == NULL);
check_start_stop_duration (source1, 0, 4 * GST_SECOND, 4 * GST_SECOND);
@@ -624,7 +624,7 @@ GST_START_TEST (test_complex_operations_bis)
*/
source2 =
- videotest_in_bin_gnl_src ("source2", 2 * GST_SECOND, 4 * GST_SECOND, 2,
+ videotest_in_bin_nle_src ("source2", 2 * GST_SECOND, 4 * GST_SECOND, 2,
3);
fail_if (source2 == NULL);
check_start_stop_duration (source2, 2 * GST_SECOND, 6 * GST_SECOND,
@@ -651,14 +651,14 @@ GST_START_TEST (test_complex_operations_bis)
ASSERT_OBJECT_REFCOUNT (oper, "oper", 1);
/* Add source1 */
- gnl_composition_add (GST_BIN (comp), source1);
+ nle_composition_add (GST_BIN (comp), source1);
commit_and_wait (comp, &ret);
check_start_stop_duration (comp, 0, 4 * GST_SECOND, 4 * GST_SECOND);
ASSERT_OBJECT_REFCOUNT (source1, "source1", 1);
/* Add source2 */
- gnl_composition_add (GST_BIN (comp), source2);
+ nle_composition_add (GST_BIN (comp), source2);
commit_and_wait (comp, &ret);
check_start_stop_duration (comp, 0, 6 * GST_SECOND, 6 * GST_SECOND);
@@ -666,7 +666,7 @@ GST_START_TEST (test_complex_operations_bis)
/* Add operaton */
- gnl_composition_add (GST_BIN (comp), oper);
+ nle_composition_add (GST_BIN (comp), oper);
commit_and_wait (comp, &ret);
check_start_stop_duration (source1, 0, 4 * GST_SECOND, 4 * GST_SECOND);
check_start_stop_duration (source2, 2 * GST_SECOND, 6 * GST_SECOND,
@@ -750,6 +750,7 @@ gnonlin_suite (void)
Suite *s = suite_create ("gnonlin-seek");
TCase *tc_chain = tcase_create ("general");
+ ges_init ();
suite_add_tcase (s, tc_chain);
if (gst_registry_check_feature_version (gst_registry_get (), "compositor", 1,
diff --git a/tests/check/gnl/simple.c b/tests/check/nle/simple.c
index 04b70120..c392e13a 100644
--- a/tests/check/gnl/simple.c
+++ b/tests/check/nle/simple.c
@@ -12,7 +12,7 @@ test_simplest_full (void)
pipeline = gst_pipeline_new ("test_pipeline");
comp =
- gst_element_factory_make_or_warn ("gnlcomposition", "test_composition");
+ gst_element_factory_make_or_warn ("nlecomposition", "test_composition");
gst_element_set_state (comp, GST_STATE_READY);
fail_if (comp == NULL);
@@ -25,14 +25,14 @@ test_simplest_full (void)
Priority : 1
*/
source1 =
- videotest_gnl_src_full ("source1", 0, 1 * GST_SECOND, 5 * GST_SECOND, 3,
+ videotest_nle_src_full ("source1", 0, 1 * GST_SECOND, 5 * GST_SECOND, 3,
1);
fail_if (source1 == NULL);
check_start_stop_duration (source1, 0, 1 * GST_SECOND, 1 * GST_SECOND);
/* Add one source */
- gnl_composition_add (GST_BIN (comp), source1);
+ nle_composition_add (GST_BIN (comp), source1);
commit_and_wait (comp, &ret);
fail_unless (ret);
check_start_stop_duration (source1, 0, 1 * GST_SECOND, 1 * GST_SECOND);
@@ -116,7 +116,7 @@ test_time_duration_full (void)
GstElement *comp, *source1, *source2;
comp =
- gst_element_factory_make_or_warn ("gnlcomposition", "test_composition");
+ gst_element_factory_make_or_warn ("nlecomposition", "test_composition");
gst_element_set_state (comp, GST_STATE_READY);
/*
@@ -125,7 +125,7 @@ test_time_duration_full (void)
Duration : 1s
Priority : 1
*/
- source1 = videotest_gnl_src ("source1", 0, 1 * GST_SECOND, 3, 1);
+ source1 = videotest_nle_src ("source1", 0, 1 * GST_SECOND, 3, 1);
fail_if (source1 == NULL);
check_start_stop_duration (source1, 0, 1 * GST_SECOND, 1 * GST_SECOND);
@@ -135,7 +135,7 @@ test_time_duration_full (void)
Duration : 1s
Priority : 1
*/
- source2 = videotest_gnl_src ("source2", 1 * GST_SECOND, 1 * GST_SECOND, 2, 1);
+ source2 = videotest_nle_src ("source2", 1 * GST_SECOND, 1 * GST_SECOND, 2, 1);
fail_if (source2 == NULL);
check_start_stop_duration (source2, 1 * GST_SECOND, 2 * GST_SECOND,
1 * GST_SECOND);
@@ -144,7 +144,7 @@ test_time_duration_full (void)
ASSERT_OBJECT_REFCOUNT (source1, "source1", 1);
ASSERT_OBJECT_REFCOUNT (source2, "source2", 1);
- gnl_composition_add (GST_BIN (comp), source1);
+ nle_composition_add (GST_BIN (comp), source1);
commit_and_wait (comp, &ret);
fail_unless (ret == TRUE);
check_start_stop_duration (comp, 0, 1 * GST_SECOND, 1 * GST_SECOND);
@@ -154,7 +154,7 @@ test_time_duration_full (void)
/* Second source */
ret = FALSE;
- gnl_composition_add (GST_BIN (comp), source2);
+ nle_composition_add (GST_BIN (comp), source2);
commit_and_wait (comp, &ret);
fail_unless (ret == TRUE);
check_start_stop_duration (comp, 0, 2 * GST_SECOND, 2 * GST_SECOND);
@@ -167,7 +167,7 @@ test_time_duration_full (void)
gst_object_ref (source1);
ASSERT_OBJECT_REFCOUNT (source1, "source1", 2);
GST_ERROR_OBJECT (source1, "Num refs : %i", ((GObject *) source1)->ref_count);
- gnl_composition_remove (GST_BIN (comp), source1);
+ nle_composition_remove (GST_BIN (comp), source1);
commit_and_wait (comp, &ret);
GST_ERROR_OBJECT (source1, "Num refs : %i", ((GObject *) source1)->ref_count);
check_start_stop_duration (comp, 1 * GST_SECOND, 2 * GST_SECOND,
@@ -177,7 +177,7 @@ test_time_duration_full (void)
/* Re-add first source */
- gnl_composition_add (GST_BIN (comp), source1);
+ nle_composition_add (GST_BIN (comp), source1);
commit_and_wait (comp, &ret);
check_start_stop_duration (comp, 0, 2 * GST_SECOND, 2 * GST_SECOND);
gst_object_unref (source1);
@@ -203,7 +203,7 @@ test_one_after_other_full (void)
pipeline = gst_pipeline_new ("test_pipeline");
comp =
- gst_element_factory_make_or_warn ("gnlcomposition", "test_composition");
+ gst_element_factory_make_or_warn ("nlecomposition", "test_composition");
gst_element_set_state (comp, GST_STATE_READY);
fail_if (comp == NULL);
@@ -215,7 +215,7 @@ test_one_after_other_full (void)
Priority : 1
*/
source1 =
- videotest_gnl_src_full ("source1", 0, 1 * GST_SECOND, 5 * GST_SECOND, 3,
+ videotest_nle_src_full ("source1", 0, 1 * GST_SECOND, 5 * GST_SECOND, 3,
1);
fail_if (source1 == NULL);
check_start_stop_duration (source1, 0, 1 * GST_SECOND, 1 * GST_SECOND);
@@ -227,21 +227,21 @@ test_one_after_other_full (void)
Media start : 2s
Priority : 1
*/
- source2 = videotest_gnl_src_full ("source2", 1 * GST_SECOND, 1 * GST_SECOND,
+ source2 = videotest_nle_src_full ("source2", 1 * GST_SECOND, 1 * GST_SECOND,
2 * GST_SECOND, 2, 1);
fail_if (source2 == NULL);
check_start_stop_duration (source2, 1 * GST_SECOND, 2 * GST_SECOND,
1 * GST_SECOND);
/* Add one source */
- gnl_composition_add (GST_BIN (comp), source1);
+ nle_composition_add (GST_BIN (comp), source1);
commit_and_wait (comp, &ret);
check_start_stop_duration (comp, 0, 1 * GST_SECOND, 1 * GST_SECOND);
ASSERT_OBJECT_REFCOUNT (source1, "source1", 1);
/* Second source */
- gnl_composition_add (GST_BIN (comp), source2);
+ nle_composition_add (GST_BIN (comp), source2);
commit_and_wait (comp, &ret);
fail_unless (ret);
check_start_stop_duration (source1, 0 * GST_SECOND, 1 * GST_SECOND,
@@ -391,7 +391,7 @@ test_one_under_another_full (void)
pipeline = gst_pipeline_new ("test_pipeline");
comp =
- gst_element_factory_make_or_warn ("gnlcomposition", "test_composition");
+ gst_element_factory_make_or_warn ("nlecomposition", "test_composition");
gst_element_set_state (comp, GST_STATE_READY);
fail_if (comp == NULL);
@@ -409,7 +409,7 @@ test_one_under_another_full (void)
Duration : 2s
Priority : 1
*/
- source1 = videotest_gnl_src ("source1", 0, 2 * GST_SECOND, 18, 1);
+ source1 = videotest_nle_src ("source1", 0, 2 * GST_SECOND, 18, 1);
fail_if (source1 == NULL);
check_start_stop_duration (source1, 0, 2 * GST_SECOND, 2 * GST_SECOND);
@@ -419,15 +419,15 @@ test_one_under_another_full (void)
Duration : 2s
Priority : 2
*/
- source2 = videotest_gnl_src ("source2", 1 * GST_SECOND, 2 * GST_SECOND, 0, 2);
+ source2 = videotest_nle_src ("source2", 1 * GST_SECOND, 2 * GST_SECOND, 0, 2);
fail_if (source2 == NULL);
check_start_stop_duration (source2, 1 * GST_SECOND, 3 * GST_SECOND,
2 * GST_SECOND);
/* Add two sources */
- gnl_composition_add (GST_BIN (comp), source1);
- gnl_composition_add (GST_BIN (comp), source2);
+ nle_composition_add (GST_BIN (comp), source1);
+ nle_composition_add (GST_BIN (comp), source2);
check_start_stop_duration (comp, 0, 0 * GST_SECOND, 0 * GST_SECOND);
/* Now commiting changes */
commit_and_wait (comp, &ret);
@@ -439,13 +439,13 @@ test_one_under_another_full (void)
/* Remove second source */
gst_object_ref (source1);
- gnl_composition_remove (GST_BIN (comp), source1);
+ nle_composition_remove (GST_BIN (comp), source1);
check_start_stop_duration (comp, 1 * GST_SECOND, 3 * GST_SECOND,
2 * GST_SECOND);
/* Re-add second source */
- gnl_composition_add (GST_BIN (comp), source1);
+ nle_composition_add (GST_BIN (comp), source1);
commit_and_wait (comp, &ret);
check_start_stop_duration (comp, 0, 3 * GST_SECOND, 3 * GST_SECOND);
gst_object_unref (source1);
@@ -534,7 +534,7 @@ test_one_bin_after_other_full (void)
pipeline = gst_pipeline_new ("test_pipeline");
comp =
- gst_element_factory_make_or_warn ("gnlcomposition", "test_composition");
+ gst_element_factory_make_or_warn ("nlecomposition", "test_composition");
gst_element_set_state (comp, GST_STATE_READY);
fail_if (comp == NULL);
@@ -544,7 +544,7 @@ test_one_bin_after_other_full (void)
Duration : 1s
Priority : 1
*/
- source1 = videotest_in_bin_gnl_src ("source1", 0, 1 * GST_SECOND, 3, 1);
+ source1 = videotest_in_bin_nle_src ("source1", 0, 1 * GST_SECOND, 3, 1);
if (source1 == NULL) {
gst_object_unref (pipeline);
gst_object_unref (comp);
@@ -559,7 +559,7 @@ test_one_bin_after_other_full (void)
Priority : 1
*/
source2 =
- videotest_in_bin_gnl_src ("source2", 1 * GST_SECOND, 1 * GST_SECOND, 2,
+ videotest_in_bin_nle_src ("source2", 1 * GST_SECOND, 1 * GST_SECOND, 2,
1);
fail_if (source2 == NULL);
check_start_stop_duration (source2, 1 * GST_SECOND, 2 * GST_SECOND,
@@ -567,7 +567,7 @@ test_one_bin_after_other_full (void)
/* Add one source */
- gnl_composition_add (GST_BIN (comp), source1);
+ nle_composition_add (GST_BIN (comp), source1);
commit_and_wait (comp, &ret);
fail_unless (ret);
check_start_stop_duration (comp, 0, 1 * GST_SECOND, 1 * GST_SECOND);
@@ -577,7 +577,7 @@ test_one_bin_after_other_full (void)
/* Second source */
- gnl_composition_add (GST_BIN (comp), source2);
+ nle_composition_add (GST_BIN (comp), source2);
commit_and_wait (comp, &ret);
check_start_stop_duration (comp, 0, 2 * GST_SECOND, 2 * GST_SECOND);
check_start_stop_duration (source1, 0, 1 * GST_SECOND, 1 * GST_SECOND);
@@ -589,7 +589,7 @@ test_one_bin_after_other_full (void)
/* Remove first source */
gst_object_ref (source1);
- gnl_composition_remove (GST_BIN (comp), source1);
+ nle_composition_remove (GST_BIN (comp), source1);
check_start_stop_duration (comp, 1 * GST_SECOND, 2 * GST_SECOND,
1 * GST_SECOND);
@@ -597,7 +597,7 @@ test_one_bin_after_other_full (void)
/* Re-add first source */
- gnl_composition_add (GST_BIN (comp), source1);
+ nle_composition_add (GST_BIN (comp), source1);
commit_and_wait (comp, &ret);
check_start_stop_duration (comp, 0, 2 * GST_SECOND, 2 * GST_SECOND);
gst_object_unref (source1);
@@ -766,6 +766,8 @@ gnonlin_suite (void)
suite_add_tcase (s, tc_chain);
+ ges_init ();
+
tcase_add_test (tc_chain, test_time_duration);
tcase_add_test (tc_chain, test_simplest);
tcase_add_test (tc_chain, test_one_after_other);
diff --git a/tests/examples/transition.c b/tests/examples/transition.c
index 526cd950..83d46b4c 100644
--- a/tests/examples/transition.c
+++ b/tests/examples/transition.c
@@ -58,7 +58,7 @@ gboolean
print_transition_data (GESClip * tr)
{
GESTrackElement *trackelement;
- GstElement *gnlobj;
+ GstElement *nleobj;
guint64 start, duration;
gint priority;
char *name;
@@ -71,12 +71,12 @@ print_transition_data (GESClip * tr)
return FALSE;
if (!(trackelement = GES_TRACK_ELEMENT (trackelements->data)))
return FALSE;
- if (!(gnlobj = ges_track_element_get_gnlobject (trackelement)))
+ if (!(nleobj = ges_track_element_get_nleobject (trackelement)))
return FALSE;
- g_object_get (gnlobj, "start", &start, "duration", &duration,
+ g_object_get (nleobj, "start", &start, "duration", &duration,
"priority", &priority, "name", &name, NULL);
- g_print ("gnlobject for %s: %f %f %d\n", name,
+ g_print ("nleobject for %s: %f %f %d\n", name,
((gfloat) start) / GST_SECOND,
((gfloat) duration) / GST_SECOND, priority);