GESTrackObject

GESTrackObject — Base Class for objects contained in a GESTrack

Synopsis

#include <ges/ges.h>

                    GESTrackObject;
                    GESTrackObjectClass;
void                ges_track_object_set_duration       (GESTrackObject *object,
                                                         guint64 duration);
void                ges_track_object_set_inpoint        (GESTrackObject *object,
                                                         guint64 inpoint);
void                ges_track_object_set_priority       (GESTrackObject *object,
                                                         guint32 priority);
void                ges_track_object_set_start          (GESTrackObject *object,
                                                         guint64 start);
gboolean            ges_track_object_set_active         (GESTrackObject *object,
                                                         gboolean active);
void                ges_track_object_set_locked         (GESTrackObject *object,
                                                         gboolean locked);
gboolean            ges_track_object_is_locked          (GESTrackObject *object);
GESTrack *          ges_track_object_get_track          (GESTrackObject *object);
GESTimelineObject * ges_track_object_get_timeline_object
                                                        (GESTrackObject *object);
GstElement *        ges_track_object_get_gnlobject      (GESTrackObject *object);
GstElement *        ges_track_object_get_element        (GESTrackObject *object);
guint64             ges_track_object_get_start          (GESTrackObject *object);
guint64             ges_track_object_get_inpoint        (GESTrackObject *object);
guint64             ges_track_object_get_duration       (GESTrackObject *object);
guint32             ges_track_object_get_priority       (GESTrackObject *object);
gboolean            ges_track_object_is_active          (GESTrackObject *object);
gboolean            ges_track_object_lookup_child       (GESTrackObject *object,
                                                         const gchar *prop_name,
                                                         GstElement **element,
                                                         GParamSpec **pspec);
GParamSpec **       ges_track_object_list_children_properties
                                                        (GESTrackObject *object,
                                                         guint *n_properties);
void                ges_track_object_set_child_property (GESTrackObject *object,
                                                         const gchar *first_property_name,
                                                         ...);
void                ges_track_object_set_child_property_valist
                                                        (GESTrackObject *object,
                                                         const gchar *first_property_name,
                                                         va_list var_args);
void                ges_track_object_set_child_property_by_pspec
                                                        (GESTrackObject *object,
                                                         GParamSpec *pspec,
                                                         GValue *value);
void                ges_track_object_get_child_property (GESTrackObject *object,
                                                         const gchar *first_property_name,
                                                         ...);
void                ges_track_object_get_child_property_valist
                                                        (GESTrackObject *object,
                                                         const gchar *first_property_name,
                                                         va_list var_args);
void                ges_track_object_get_child_property_by_pspec
                                                        (GESTrackObject *object,
                                                         GParamSpec *pspec,
                                                         GValue *value);

Object Hierarchy

  GObject
   +----GInitiallyUnowned
         +----GESTrackObject
               +----GESTrackSource
               +----GESTrackOperation

Properties

  "active"                   gboolean              : Read / Write
  "duration"                 guint64               : Read / Write
  "in-point"                 guint64               : Read / Write
  "priority"                 guint                 : Read / Write
  "start"                    guint64               : Read / Write

Signals

  "deep-notify"                                    : No Hooks

Description

GESTrackObject is the Base Class for any object that can be contained in a GESTrack.

It contains the basic information as to the location of the object within its container, like the start position, the in-point, the duration and the priority.

Details

GESTrackObject

typedef struct _GESTrackObject GESTrackObject;

The GESTrackObject base class.


GESTrackObjectClass

typedef struct {
  /* virtual methods for subclasses */
  const gchar  *gnlobject_factorytype;
  GstElement*  (*create_gnl_object)        (GESTrackObject * object);
  GstElement*  (*create_element)           (GESTrackObject * object);
  GHashTable*  (*get_props_hastable)       (GESTrackObject * object);
  GParamSpec** (*list_children_properties) (GESTrackObject * object,
					    guint *n_properties);

  void (*start_changed)        (GESTrackObject *object, guint64 start);
  void (*media_start_changed)  (GESTrackObject *object, guint64 media_start);
  void (*gnl_priority_changed) (GESTrackObject *object, guint priority);
  void (*duration_changed)     (GESTrackObject *object, guint64 duration);
  void (*active_changed)       (GESTrackObject *object, gboolean active);
} GESTrackObjectClass;

Subclasses can override the create_gnl_object method to override what type of GNonLin object will be created.

const gchar *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.

get_props_hastable ()

method to list children properties that user could like to configure.

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 create_element.

start_changed ()

start property of gnlobject has changed

media_start_changed ()

media-start property of gnlobject has changed

gnl_priority_changed ()

duration property glnobject has changed

duration_changed ()

duration property glnobject has changed

active_changed ()

active property of gnlobject has changed

ges_track_object_set_duration ()

void                ges_track_object_set_duration       (GESTrackObject *object,
                                                         guint64 duration);

Set the duration which will be used in the container GESTrack starting from the 'in-point'

object :

a GESTrackObject

duration :

the duration (in GstClockTime)

ges_track_object_set_inpoint ()

void                ges_track_object_set_inpoint        (GESTrackObject *object,
                                                         guint64 inpoint);

Set the offset within the contents of this GESTrackObject

object :

a GESTrackObject

inpoint :

the in-point (in GstClockTime)

ges_track_object_set_priority ()

void                ges_track_object_set_priority       (GESTrackObject *object,
                                                         guint32 priority);

Sets the priority of the object withing the containing GESTrack. If two objects intersect over the same region of time, the priority property is used to decide which one takes precedence.

The highest priority (that supercedes everything) is 0, and then lowering priorities go in increasing numerical value (with G_MAXUINT32 being the lowest priority).

object :

a GESTrackObject

priority :

the priority

ges_track_object_set_start ()

void                ges_track_object_set_start          (GESTrackObject *object,
                                                         guint64 start);

Sets the position of the object in the container GESTrack.

object :

a GESTrackObject

start :

the start position (in GstClockTime)

ges_track_object_set_active ()

gboolean            ges_track_object_set_active         (GESTrackObject *object,
                                                         gboolean active);

Sets the usage of the object. If active is TRUE, the object will be used for playback and rendering, else it will be ignored.

object :

a GESTrackObject

active :

visibility

Returns :

TRUE if the property was toggled, else FALSE

ges_track_object_set_locked ()

void                ges_track_object_set_locked         (GESTrackObject *object,
                                                         gboolean locked);

Set the locking status of the object in relationship to its controlling GESTimelineObject. If locked is TRUE, then this object will move synchronously with its controlling GESTimelineObject.

object :

a GESTrackObject

locked :

whether the object is lock to its parent

ges_track_object_is_locked ()

gboolean            ges_track_object_is_locked          (GESTrackObject *object);

Let you know if object us locked or not (moving synchronously).

object :

a GESTrackObject

Returns :

TRUE if the object is moving synchronously to its controlling GESTimelineObject, else FALSE.

ges_track_object_get_track ()

GESTrack *          ges_track_object_get_track          (GESTrackObject *object);

Get the GESTrack to which this object belongs.

object :

a GESTrackObject

Returns :

The GESTrack to which this object belongs. Can be NULL if it is not in any track. [transfer none]

ges_track_object_get_timeline_object ()

GESTimelineObject * ges_track_object_get_timeline_object
                                                        (GESTrackObject *object);

Get the GESTimelineObject which is controlling this track object

object :

a GESTrackObject

Returns :

the GESTimelineObject which is controlling this track object. [transfer none]

ges_track_object_get_gnlobject ()

GstElement *        ges_track_object_get_gnlobject      (GESTrackObject *object);

Get the GNonLin object this object is controlling.

object :

a GESTrackObject

Returns :

the GNonLin object this object is controlling. [transfer none]

ges_track_object_get_element ()

GstElement *        ges_track_object_get_element        (GESTrackObject *object);

Get the GstElement this track object is controlling within GNonLin.

object :

a GESTrackObject

Returns :

the GstElement this track object is controlling within GNonLin. [transfer none]

ges_track_object_get_start ()

guint64             ges_track_object_get_start          (GESTrackObject *object);

Get the position of the object in the container GESTrack.

object :

a GESTrackObject

Returns :

the start position (in GstClockTime)

ges_track_object_get_inpoint ()

guint64             ges_track_object_get_inpoint        (GESTrackObject *object);

Get the offset within the contents of this GESTrackObject

object :

a GESTrackObject

Returns :

the in-point (in GstClockTime)

ges_track_object_get_duration ()

guint64             ges_track_object_get_duration       (GESTrackObject *object);

Get the duration which will be used in the container GESTrack starting from the 'in-point'

object :

a GESTrackObject

Returns :

the duration (in GstClockTime)

ges_track_object_get_priority ()

guint32             ges_track_object_get_priority       (GESTrackObject *object);

Get the priority of the object withing the containing GESTrack.

object :

a GESTrackObject

Returns :

the priority of object

ges_track_object_is_active ()

gboolean            ges_track_object_is_active          (GESTrackObject *object);

Lets you know if object will be used for playback and rendering, or not.

object :

a GESTrackObject

Returns :

TRUE if object is active, FALSE otherwize

ges_track_object_lookup_child ()

gboolean            ges_track_object_lookup_child       (GESTrackObject *object,
                                                         const gchar *prop_name,
                                                         GstElement **element,
                                                         GParamSpec **pspec);

Looks up which element and pspec would be effected by the given name. If various contained elements have this property name you will get the first one, unless you specify the class name in name.

object :

object to lookup the property in

prop_name :

name of the property to look up. You can specify the name of the class as such: "ClassName::property-name", to guarantee that you get the proper GParamSpec in case various GstElement-s contain the same property name. If you don't do so, you will get the first element found, having this property and the and the corresponding GParamSpec.

element :

pointer to a GstElement that takes the real object to set property on. [out][allow-none][transfer full]

pspec :

pointer to take the GParamSpec describing the property. [out][allow-none][transfer full]

Returns :

TRUE if element and pspec could be found. FALSE otherwise. In that case the values for pspec and element are not modified. Unref element after usage.

ges_track_object_list_children_properties ()

GParamSpec **       ges_track_object_list_children_properties
                                                        (GESTrackObject *object,
                                                         guint *n_properties);

Gets an array of GParamSpec* for all configurable properties of the children of object.

object :

The GESTrackObject to get the list of children properties from

n_properties :

return location for the length of the returned array

Returns :

an array of GParamSpec* which should be freed after use or NULL if something went wrong. [transfer full][array]

ges_track_object_set_child_property ()

void                ges_track_object_set_child_property (GESTrackObject *object,
                                                         const gchar *first_property_name,
                                                         ...);

Sets a property of a child of object. If there are various child elements that have the same property name, you can distinguish them using the following synthaxe: 'ClasseName::property_name' as property name. If you don't, the corresponding property of the first element found will be set.

object :

The GESTrackObject parent object

first_property_name :

The name of the first property to set

... :

value for the first property, followed optionally by more name/return location pairs, followed by NULL

ges_track_object_set_child_property_valist ()

void                ges_track_object_set_child_property_valist
                                                        (GESTrackObject *object,
                                                         const gchar *first_property_name,
                                                         va_list var_args);

Sets a property of a child of object. If there are various child elements that have the same property name, you can distinguish them using the following synthaxe: 'ClasseName::property_name' as property name. If you don't, the corresponding property of the first element found will be set.

object :

The GESTrackObject parent object

first_property_name :

The name of the first property to set

var_args :

value for the first property, followed optionally by more name/return location pairs, followed by NULL

ges_track_object_set_child_property_by_pspec ()

void                ges_track_object_set_child_property_by_pspec
                                                        (GESTrackObject *object,
                                                         GParamSpec *pspec,
                                                         GValue *value);

Sets a property of a child of object.

object :

a GESTrackObject

pspec :

The GParamSpec that specifies the property you want to set

value :

the value

ges_track_object_get_child_property ()

void                ges_track_object_get_child_property (GESTrackObject *object,
                                                         const gchar *first_property_name,
                                                         ...);

Gets properties of a child of object.

object :

The origin GESTrackObject

first_property_name :

The name of the first property to get

... :

return location for the first property, followed optionally by more name/return location pairs, followed by NULL

ges_track_object_get_child_property_valist ()

void                ges_track_object_get_child_property_valist
                                                        (GESTrackObject *object,
                                                         const gchar *first_property_name,
                                                         va_list var_args);

Gets a property of a child of object. If there are various child elements that have the same property name, you can distinguish them using the following synthaxe: 'ClasseName::property_name' as property name. If you don't, the corresponding property of the first element found will be set.

object :

The GESTrackObject parent object

first_property_name :

The name of the first property to get

var_args :

value for the first property, followed optionally by more name/return location pairs, followed by NULL

ges_track_object_get_child_property_by_pspec ()

void                ges_track_object_get_child_property_by_pspec
                                                        (GESTrackObject *object,
                                                         GParamSpec *pspec,
                                                         GValue *value);

Gets a property of a child of object.

object :

a GESTrackObject

pspec :

The GParamSpec that specifies the property you want to get

value :

return location for the value

Property Details

The "active" property

  "active"                   gboolean              : Read / Write

Whether the object should be taken into account in the GESTrack output. If FALSE, then its contents will not be used in the resulting track.

Default value: TRUE


The "duration" property

  "duration"                 guint64               : Read / Write

The duration (in nanoseconds) which will be used in the container GESTrack starting from 'in-point'.

Default value: 1000000000


The "in-point" property

  "in-point"                 guint64               : Read / Write

The in-point at which this GESTrackObject will start outputting data from its contents (in nanoseconds).

Ex : an in-point of 5 seconds means that the first outputted buffer will be the one located 5 seconds in the controlled resource.

Default value: 0


The "priority" property

  "priority"                 guint                 : Read / Write

The priority of the object within the containing GESTrack. If two objects intersect over the same region of time, the priority property is used to decide which one takes precedence.

The highest priority (that supercedes everything) is 0, and then lowering priorities go in increasing numerical value (with G_MAXUINT64 being the lowest priority).

Default value: 0


The "start" property

  "start"                    guint64               : Read / Write

The position of the object in the container GESTrack (in nanoseconds).

Default value: 0

Signal Details

The "deep-notify" signal

void                user_function                      (GESTrackObject *track_object,
                                                        GstElement     *prop_object,
                                                        GParamSpec     *prop,
                                                        gpointer        user_data)         : No Hooks

The deep notify signal is used to be notified of property changes of all the childs of track_object

track_object :

a GESTrackObject

prop_object :

the object that originated the signal

prop :

the property that changed

user_data :

user data set when the signal handler was connected.