1 /* GStreamer Editing Services
2 * Copyright (C) 2009 Edward Hervey <edward.hervey@collabora.co.uk>
3 * 2009 Nokia Corporation
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Library General Public License for more details.
15 * You should have received a copy of the GNU Library General Public
16 * License along with this library; if not, write to the
17 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 * Boston, MA 02111-1307, USA.
22 * SECTION:ges-track-object
23 * @short_description: Base Class for objects contained in a #GESTrack
25 * #GESTrackObject is the Base Class for any object that can be contained in a
28 * It contains the basic information as to the location of the object within
29 * its container, like the start position, the in-point, the duration and the
33 #include "ges-internal.h"
34 #include "ges-track-object.h"
35 #include "ges-timeline-object.h"
37 G_DEFINE_ABSTRACT_TYPE (GESTrackObject, ges_track_object,
38 G_TYPE_INITIALLY_UNOWNED);
40 struct _GESTrackObjectPrivate
42 /* These fields are only used before the gnlobject is available */
43 guint64 pending_start;
44 guint64 pending_inpoint;
45 guint64 pending_duration;
46 guint32 pending_priority;
47 gboolean pending_active;
49 GstElement *gnlobject; /* The GnlObject */
50 GstElement *element; /* The element contained in the gnlobject (can be NULL) */
52 /* We keep a link between properties name and elements internally
53 * The hashtable should look like
54 * {'ClassName-propertyName' ---> element,}*/
55 GHashTable *properties_hashtable;
57 GESTimelineObject *timelineobj;
62 gboolean locked; /* If TRUE, then moves in sync with its controlling
63 * GESTimelineObject */
77 static GParamSpec *properties[PROP_LAST];
79 static GstElement *ges_track_object_create_gnl_object_func (GESTrackObject *
82 static void gnlobject_start_cb (GstElement * gnlobject, GParamSpec * arg
83 G_GNUC_UNUSED, GESTrackObject * obj);
85 static void gnlobject_media_start_cb (GstElement * gnlobject, GParamSpec * arg
86 G_GNUC_UNUSED, GESTrackObject * obj);
88 static void gnlobject_priority_cb (GstElement * gnlobject, GParamSpec * arg
89 G_GNUC_UNUSED, GESTrackObject * obj);
91 static void gnlobject_duration_cb (GstElement * gnlobject, GParamSpec * arg
92 G_GNUC_UNUSED, GESTrackObject * obj);
94 static void gnlobject_active_cb (GstElement * gnlobject, GParamSpec * arg
95 G_GNUC_UNUSED, GESTrackObject * obj);
97 static inline gboolean
98 ges_track_object_set_start_internal (GESTrackObject * object, guint64 start);
99 static inline gboolean
100 ges_track_object_set_inpoint_internal (GESTrackObject * object,
102 static inline gboolean ges_track_object_set_duration_internal (GESTrackObject *
103 object, guint64 duration);
104 static inline gboolean ges_track_object_set_priority_internal (GESTrackObject *
105 object, guint32 priority);
108 ges_track_object_get_property (GObject * object, guint property_id,
109 GValue * value, GParamSpec * pspec)
111 GESTrackObject *tobj = GES_TRACK_OBJECT (object);
113 switch (property_id) {
115 g_value_set_uint64 (value, ges_track_object_get_start (tobj));
118 g_value_set_uint64 (value, ges_track_object_get_inpoint (tobj));
121 g_value_set_uint64 (value, ges_track_object_get_duration (tobj));
124 g_value_set_uint (value, ges_track_object_get_priority (tobj));
127 g_value_set_boolean (value, ges_track_object_is_active (tobj));
130 G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
135 ges_track_object_set_property (GObject * object, guint property_id,
136 const GValue * value, GParamSpec * pspec)
138 GESTrackObject *tobj = GES_TRACK_OBJECT (object);
140 switch (property_id) {
142 ges_track_object_set_start_internal (tobj, g_value_get_uint64 (value));
145 ges_track_object_set_inpoint_internal (tobj, g_value_get_uint64 (value));
148 ges_track_object_set_duration_internal (tobj, g_value_get_uint64 (value));
151 ges_track_object_set_priority_internal (tobj, g_value_get_uint (value));
154 ges_track_object_set_active (tobj, g_value_get_boolean (value));
157 G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
162 ges_track_object_dispose (GObject * object)
164 GESTrackObjectPrivate *priv = GES_TRACK_OBJECT (object)->priv;
165 if (priv->properties_hashtable)
166 g_hash_table_destroy (priv->properties_hashtable);
168 G_OBJECT_CLASS (ges_track_object_parent_class)->dispose (object);
172 ges_track_object_finalize (GObject * object)
174 G_OBJECT_CLASS (ges_track_object_parent_class)->finalize (object);
178 ges_track_object_class_init (GESTrackObjectClass * klass)
180 GObjectClass *object_class = G_OBJECT_CLASS (klass);
182 g_type_class_add_private (klass, sizeof (GESTrackObjectPrivate));
184 object_class->get_property = ges_track_object_get_property;
185 object_class->set_property = ges_track_object_set_property;
186 object_class->dispose = ges_track_object_dispose;
187 object_class->finalize = ges_track_object_finalize;
190 * GESTrackObject:start
192 * The position of the object in the container #GESTrack (in nanoseconds).
194 properties[PROP_START] = g_param_spec_uint64 ("start", "Start",
195 "The position in the container", 0, G_MAXUINT64, 0, G_PARAM_READWRITE);
196 g_object_class_install_property (object_class, PROP_START,
197 properties[PROP_START]);
200 * GESTrackObject:in-point
202 * The in-point at which this #GESTrackObject will start outputting data
203 * from its contents (in nanoseconds).
205 * Ex : an in-point of 5 seconds means that the first outputted buffer will
206 * be the one located 5 seconds in the controlled resource.
208 properties[PROP_INPOINT] =
209 g_param_spec_uint64 ("in-point", "In-point", "The in-point", 0,
210 G_MAXUINT64, 0, G_PARAM_READWRITE);
211 g_object_class_install_property (object_class, PROP_INPOINT,
212 properties[PROP_INPOINT]);
215 * GESTrackObject:duration
217 * The duration (in nanoseconds) which will be used in the container #GESTrack
218 * starting from 'in-point'.
221 properties[PROP_DURATION] =
222 g_param_spec_uint64 ("duration", "Duration", "The duration to use", 0,
223 G_MAXUINT64, GST_SECOND, G_PARAM_READWRITE);
224 g_object_class_install_property (object_class, PROP_DURATION,
225 properties[PROP_DURATION]);
228 * GESTrackObject:priority
230 * The priority of the object within the containing #GESTrack.
231 * If two objects intersect over the same region of time, the @priority
232 * property is used to decide which one takes precedence.
234 * The highest priority (that supercedes everything) is 0, and then lowering
235 * priorities go in increasing numerical value (with #G_MAXUINT64 being the
238 properties[PROP_PRIORITY] = g_param_spec_uint ("priority", "Priority",
239 "The priority of the object", 0, G_MAXUINT, 0, G_PARAM_READWRITE);
240 g_object_class_install_property (object_class, PROP_PRIORITY,
241 properties[PROP_PRIORITY]);
244 * GESTrackObject:active
246 * Whether the object should be taken into account in the #GESTrack output.
247 * If #FALSE, then its contents will not be used in the resulting track.
249 properties[PROP_ACTIVE] =
250 g_param_spec_boolean ("active", "Active", "Use object in output", TRUE,
252 g_object_class_install_property (object_class, PROP_ACTIVE,
253 properties[PROP_ACTIVE]);
255 klass->create_gnl_object = ges_track_object_create_gnl_object_func;
259 ges_track_object_init (GESTrackObject * self)
261 self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
262 GES_TYPE_TRACK_OBJECT, GESTrackObjectPrivate);
264 /* Sane default values */
265 self->priv->pending_start = 0;
266 self->priv->pending_inpoint = 0;
267 self->priv->pending_duration = GST_SECOND;
268 self->priv->pending_priority = 1;
269 self->priv->pending_active = TRUE;
270 self->priv->locked = TRUE;
271 self->priv->properties_hashtable = NULL;
274 static inline gboolean
275 ges_track_object_set_start_internal (GESTrackObject * object, guint64 start)
277 GST_DEBUG ("object:%p, start:%" GST_TIME_FORMAT,
278 object, GST_TIME_ARGS (start));
280 if (object->priv->gnlobject != NULL) {
281 if (G_UNLIKELY (start == object->start))
284 g_object_set (object->priv->gnlobject, "start", start, NULL);
286 object->priv->pending_start = start;
291 * ges_track_object_set_start:
292 * @object: a #GESTrackObject
293 * @start: the start position (in #GstClockTime)
295 * Sets the position of the object in the container #GESTrack.
298 ges_track_object_set_start (GESTrackObject * object, guint64 start)
300 if (ges_track_object_set_start_internal (object, start))
301 #if GLIB_CHECK_VERSION(2,26,0)
302 g_object_notify_by_pspec (G_OBJECT (object), properties[PROP_START]);
304 g_object_notify (G_OBJECT (object), "start");
308 static inline gboolean
309 ges_track_object_set_inpoint_internal (GESTrackObject * object, guint64 inpoint)
312 GST_DEBUG ("object:%p, inpoint:%" GST_TIME_FORMAT,
313 object, GST_TIME_ARGS (inpoint));
315 if (object->priv->gnlobject != NULL) {
316 if (G_UNLIKELY (inpoint == object->inpoint))
319 g_object_set (object->priv->gnlobject, "media-start", inpoint, NULL);
321 object->priv->pending_inpoint = inpoint;
327 * ges_track_object_set_inpoint:
328 * @object: a #GESTrackObject
329 * @inpoint: the in-point (in #GstClockTime)
331 * Set the offset within the contents of this #GESTrackObject
334 ges_track_object_set_inpoint (GESTrackObject * object, guint64 inpoint)
336 if (ges_track_object_set_inpoint_internal (object, inpoint))
337 #if GLIB_CHECK_VERSION(2,26,0)
338 g_object_notify_by_pspec (G_OBJECT (object), properties[PROP_INPOINT]);
340 g_object_notify (G_OBJECT (object), "in-point");
344 static inline gboolean
345 ges_track_object_set_duration_internal (GESTrackObject * object,
348 GST_DEBUG ("object:%p, duration:%" GST_TIME_FORMAT,
349 object, GST_TIME_ARGS (duration));
351 if (object->priv->gnlobject != NULL) {
352 if (G_UNLIKELY (duration == object->duration))
355 g_object_set (object->priv->gnlobject, "duration", duration,
356 "media-duration", duration, NULL);
358 object->priv->pending_duration = duration;
363 * ges_track_object_set_duration:
364 * @object: a #GESTrackObject
365 * @duration: the duration (in #GstClockTime)
367 * Set the duration which will be used in the container #GESTrack
368 * starting from the 'in-point'
371 ges_track_object_set_duration (GESTrackObject * object, guint64 duration)
373 if (ges_track_object_set_duration_internal (object, duration))
374 #if GLIB_CHECK_VERSION(2,26,0)
375 g_object_notify_by_pspec (G_OBJECT (object), properties[PROP_DURATION]);
377 g_object_notify (G_OBJECT (object), "duration");
381 static inline gboolean
382 ges_track_object_set_priority_internal (GESTrackObject * object,
385 GST_DEBUG ("object:%p, priority:%" G_GUINT32_FORMAT, object, priority);
387 if (object->priv->gnlobject != NULL) {
388 if (G_UNLIKELY (priority == object->priority))
391 g_object_set (object->priv->gnlobject, "priority", priority, NULL);
393 object->priv->pending_priority = priority;
398 * ges_track_object_set_priority:
399 * @object: a #GESTrackObject
400 * @priority: the priority
402 * Sets the priority of the object withing the containing #GESTrack.
403 * If two objects intersect over the same region of time, the priority
404 * property is used to decide which one takes precedence.
406 * The highest priority (that supercedes everything) is 0, and then
407 * lowering priorities go in increasing numerical value (with G_MAXUINT32
408 * being the lowest priority).
411 ges_track_object_set_priority (GESTrackObject * object, guint32 priority)
413 if (ges_track_object_set_priority_internal (object, priority))
414 #if GLIB_CHECK_VERSION(2,26,0)
415 g_object_notify_by_pspec (G_OBJECT (object), properties[PROP_PRIORITY]);
417 g_object_notify (G_OBJECT (object), "priority");
423 * ges_track_object_set_active:
424 * @object: a #GESTrackObject
425 * @active: visibility
427 * Sets the usage of the @object. If @active is %TRUE, the object will be used for
428 * playback and rendering, else it will be ignored.
430 * Returns: %TRUE if the property was toggled, else %FALSE
433 ges_track_object_set_active (GESTrackObject * object, gboolean active)
435 GST_DEBUG ("object:%p, active:%d", object, active);
437 if (object->priv->gnlobject != NULL) {
438 if (G_UNLIKELY (active == object->active))
441 g_object_set (object->priv->gnlobject, "active", active, NULL);
443 object->priv->pending_active = active;
447 /* Callbacks from the GNonLin object */
449 gnlobject_start_cb (GstElement * gnlobject, GParamSpec * arg G_GNUC_UNUSED,
450 GESTrackObject * obj)
453 GESTrackObjectClass *klass;
455 klass = GES_TRACK_OBJECT_GET_CLASS (obj);
457 g_object_get (gnlobject, "start", &start, NULL);
459 GST_DEBUG ("gnlobject start : %" GST_TIME_FORMAT " current : %"
460 GST_TIME_FORMAT, GST_TIME_ARGS (start), GST_TIME_ARGS (obj->start));
462 if (start != obj->start) {
464 if (klass->start_changed)
465 klass->start_changed (obj, start);
469 /* Callbacks from the GNonLin object */
471 gnlobject_media_start_cb (GstElement * gnlobject,
472 GParamSpec * arg G_GNUC_UNUSED, GESTrackObject * obj)
475 GESTrackObjectClass *klass;
477 klass = GES_TRACK_OBJECT_GET_CLASS (obj);
479 g_object_get (gnlobject, "media-start", &start, NULL);
481 GST_DEBUG ("gnlobject in-point : %" GST_TIME_FORMAT " current : %"
482 GST_TIME_FORMAT, GST_TIME_ARGS (start), GST_TIME_ARGS (obj->inpoint));
484 if (start != obj->inpoint) {
485 obj->inpoint = start;
486 if (klass->media_start_changed)
487 klass->media_start_changed (obj, start);
492 gnlobject_priority_cb (GstElement * gnlobject, GParamSpec * arg G_GNUC_UNUSED,
493 GESTrackObject * obj)
496 GESTrackObjectClass *klass;
498 klass = GES_TRACK_OBJECT_GET_CLASS (obj);
500 g_object_get (gnlobject, "priority", &priority, NULL);
502 GST_DEBUG ("gnlobject priority : %d current : %d", priority, obj->priority);
504 if (priority != obj->priority) {
505 obj->priority = priority;
506 if (klass->gnl_priority_changed)
507 klass->gnl_priority_changed (obj, priority);
512 gnlobject_duration_cb (GstElement * gnlobject, GParamSpec * arg G_GNUC_UNUSED,
513 GESTrackObject * obj)
516 GESTrackObjectClass *klass;
518 klass = GES_TRACK_OBJECT_GET_CLASS (obj);
520 g_object_get (gnlobject, "duration", &duration, NULL);
522 GST_DEBUG ("gnlobject duration : %" GST_TIME_FORMAT " current : %"
523 GST_TIME_FORMAT, GST_TIME_ARGS (duration), GST_TIME_ARGS (obj->duration));
525 if (duration != obj->duration) {
526 obj->duration = duration;
527 if (klass->duration_changed)
528 klass->duration_changed (obj, duration);
533 gnlobject_active_cb (GstElement * gnlobject, GParamSpec * arg G_GNUC_UNUSED,
534 GESTrackObject * obj)
537 GESTrackObjectClass *klass;
539 klass = GES_TRACK_OBJECT_GET_CLASS (obj);
541 g_object_get (gnlobject, "active", &active, NULL);
543 GST_DEBUG ("gnlobject active : %d current : %d", active, obj->active);
545 if (active != obj->active) {
546 obj->active = active;
547 if (klass->active_changed)
548 klass->active_changed (obj, active);
553 /* default 'create_gnl_object' virtual method implementation */
555 ges_track_object_create_gnl_object_func (GESTrackObject * self)
557 GESTrackObjectClass *klass = NULL;
558 GstElement *child = NULL;
559 GstElement *gnlobject;
561 klass = GES_TRACK_OBJECT_GET_CLASS (self);
563 if (G_UNLIKELY (self->priv->gnlobject != NULL))
564 goto already_have_gnlobject;
566 if (G_UNLIKELY (klass->gnlobject_factorytype == NULL))
569 GST_DEBUG ("Creating a supporting gnlobject of type '%s'",
570 klass->gnlobject_factorytype);
572 gnlobject = gst_element_factory_make (klass->gnlobject_factorytype, NULL);
574 if (G_UNLIKELY (gnlobject == NULL))
577 if (klass->create_element) {
578 GST_DEBUG ("Calling subclass 'create_element' vmethod");
579 child = klass->create_element (self);
581 if (G_UNLIKELY (!child))
584 if (!gst_bin_add (GST_BIN (gnlobject), child))
587 GST_DEBUG ("Succesfully got the element to put in the gnlobject");
588 self->priv->element = child;
597 already_have_gnlobject:
599 GST_ERROR ("Already controlling a GnlObject %s",
600 GST_ELEMENT_NAME (self->priv->gnlobject));
606 GST_ERROR ("No GESTrackObject::gnlobject_factorytype implementation!");
612 GST_ERROR ("Error creating a gnlobject of type '%s'",
613 klass->gnlobject_factorytype);
619 GST_ERROR ("create_element returned NULL");
620 gst_object_unref (gnlobject);
626 GST_ERROR ("Error adding the contents to the gnlobject");
627 gst_object_unref (child);
628 gst_object_unref (gnlobject);
634 ensure_gnl_object (GESTrackObject * object)
636 GESTrackObjectClass *class;
637 GstElement *gnlobject;
638 GHashTable *props_hash;
639 gboolean res = FALSE;
641 if (object->priv->gnlobject && object->priv->valid)
644 /* 1. Create the GnlObject */
645 GST_DEBUG ("Creating GnlObject");
647 class = GES_TRACK_OBJECT_GET_CLASS (object);
649 if (G_UNLIKELY (class->create_gnl_object == NULL)) {
650 GST_ERROR ("No 'create_gnl_object' implementation !");
654 GST_DEBUG ("Calling virtual method");
656 /* call the create_gnl_object virtual method */
657 gnlobject = class->create_gnl_object (object);
659 if (G_UNLIKELY (gnlobject == NULL)) {
661 ("'create_gnl_object' implementation returned TRUE but no GnlObject is available");
665 object->priv->gnlobject = gnlobject;
667 /* 2. Fill in the GnlObject */
669 GST_DEBUG ("Got a valid GnlObject, now filling it in");
672 ges_timeline_object_fill_track_object (object->priv->timelineobj,
673 object, object->priv->gnlobject);
675 /* Connect to property notifications */
676 /* FIXME : remember the signalids so we can remove them later on !!! */
677 g_signal_connect (G_OBJECT (object->priv->gnlobject), "notify::start",
678 G_CALLBACK (gnlobject_start_cb), object);
679 g_signal_connect (G_OBJECT (object->priv->gnlobject),
680 "notify::media-start", G_CALLBACK (gnlobject_media_start_cb), object);
681 g_signal_connect (G_OBJECT (object->priv->gnlobject), "notify::duration",
682 G_CALLBACK (gnlobject_duration_cb), object);
683 g_signal_connect (G_OBJECT (object->priv->gnlobject), "notify::priority",
684 G_CALLBACK (gnlobject_priority_cb), object);
685 g_signal_connect (G_OBJECT (object->priv->gnlobject), "notify::active",
686 G_CALLBACK (gnlobject_active_cb), object);
688 /* Set some properties on the GnlObject */
689 g_object_set (object->priv->gnlobject,
690 "caps", ges_track_get_caps (object->priv->track),
691 "duration", object->priv->pending_duration,
692 "media-duration", object->priv->pending_duration,
693 "start", object->priv->pending_start,
694 "media-start", object->priv->pending_inpoint,
695 "priority", object->priv->pending_priority,
696 "active", object->priv->pending_active, NULL);
698 /* We feed up the props_hashtable if possible */
699 if (class->get_props_hastable) {
700 props_hash = class->get_props_hastable (object);
702 if (props_hash == NULL) {
703 GST_DEBUG ("'get_props_hastable' implementation returned TRUE but no\
704 properties_hashtable is available");
706 object->priv->properties_hashtable = props_hash;
713 object->priv->valid = res;
715 GST_DEBUG ("Returning res:%d", res);
722 ges_track_object_set_track (GESTrackObject * object, GESTrack * track)
724 GST_DEBUG ("object:%p, track:%p", object, track);
726 object->priv->track = track;
728 if (object->priv->track)
729 return ensure_gnl_object (object);
735 * ges_track_object_get_track:
736 * @object: a #GESTrackObject
738 * Get the #GESTrack to which this object belongs.
740 * Returns: (transfer none): The #GESTrack to which this object belongs. Can be %NULL if it
741 * is not in any track
744 ges_track_object_get_track (GESTrackObject * object)
746 g_return_val_if_fail (GES_IS_TRACK_OBJECT (object), NULL);
748 return object->priv->track;
753 ges_track_object_set_timeline_object (GESTrackObject * object,
754 GESTimelineObject * tlobj)
756 GST_DEBUG ("object:%p, timeline-object:%p", object, tlobj);
758 object->priv->timelineobj = tlobj;
762 * ges_track_object_get_timeline_object:
763 * @object: a #GESTrackObject
765 * Get the #GESTimelineObject which is controlling this track object
767 * Returns: (transfer none): the #GESTimelineObject which is controlling
771 ges_track_object_get_timeline_object (GESTrackObject * object)
773 g_return_val_if_fail (GES_IS_TRACK_OBJECT (object), NULL);
775 return object->priv->timelineobj;
779 * ges_track_object_get_gnlobject:
780 * @object: a #GESTrackObject
782 * Get the GNonLin object this object is controlling.
784 * Returns: (transfer none): the GNonLin object this object is controlling.
787 ges_track_object_get_gnlobject (GESTrackObject * object)
789 return object->priv->gnlobject;
793 * ges_track_object_get_element:
794 * @object: a #GESTrackObject
796 * Get the #GstElement this track object is controlling within GNonLin.
798 * Returns: (transfer none): the #GstElement this track object is controlling
802 ges_track_object_get_element (GESTrackObject * object)
804 return object->priv->element;
808 * ges_track_object_set_locked:
809 * @object: a #GESTrackObject
810 * @locked: whether the object is lock to its parent
812 * Set the locking status of the @object in relationship to its controlling
813 * #GESTimelineObject. If @locked is %TRUE, then this object will move synchronously
814 * with its controlling #GESTimelineObject.
817 ges_track_object_set_locked (GESTrackObject * object, gboolean locked)
819 object->priv->locked = locked;
823 * ges_track_object_is_locked:
824 * @object: a #GESTrackObject
826 * Let you know if object us locked or not (moving synchronously).
828 * Returns: %TRUE if the object is moving synchronously to its controlling
829 * #GESTimelineObject, else %FALSE.
832 ges_track_object_is_locked (GESTrackObject * object)
834 return object->priv->locked;
838 * ges_track_object_get_start:
839 * @object: a #GESTrackObject
841 * Get the position of the object in the container #GESTrack.
843 * Returns: the start position (in #GstClockTime)
846 ges_track_object_get_start (GESTrackObject * object)
848 if (G_UNLIKELY (object->priv->gnlobject == NULL))
849 return object->priv->pending_start;
851 return object->start;
855 * ges_track_object_get_inpoint:
856 * @object: a #GESTrackObject
858 * Get the offset within the contents of this #GESTrackObject
860 * Returns: the in-point (in #GstClockTime)
863 ges_track_object_get_inpoint (GESTrackObject * object)
865 if (G_UNLIKELY (object->priv->gnlobject == NULL))
866 return object->priv->pending_inpoint;
868 return object->inpoint;
872 * ges_track_object_get_duration:
873 * @object: a #GESTrackObject
875 * Get the duration which will be used in the container #GESTrack
876 * starting from the 'in-point'
878 * Returns: the duration (in #GstClockTime)
881 ges_track_object_get_duration (GESTrackObject * object)
883 if (G_UNLIKELY (object->priv->gnlobject == NULL))
884 return object->priv->pending_duration;
886 return object->duration;
890 * ges_track_object_get_priority:
891 * @object: a #GESTrackObject
893 * Get the priority of the object withing the containing #GESTrack.
895 * Returns: the priority of @object
898 ges_track_object_get_priority (GESTrackObject * object)
900 if (G_UNLIKELY (object->priv->gnlobject == NULL))
901 return object->priv->pending_priority;
903 return object->priority;
907 * ges_track_object_is_active:
908 * @object: a #GESTrackObject
910 * Lets you know if @object will be used for playback and rendering,
913 * Returns: %TRUE if @object is active, %FALSE otherwize
916 ges_track_object_is_active (GESTrackObject * object)
918 if (G_UNLIKELY (object->priv->gnlobject == NULL))
919 return object->priv->pending_active;
921 return object->active;