GnlObject

GnlObject — Base class for GNonLin objects

Synopsis




            GnlObject;
            GnlObjectClass;
enum        GnlCoverType;
enum        GnlDirection;
void        gnl_object_set_media_start_stop (GnlObject *object,
                                             GstClockTime start,
                                             GstClockTime stop);
void        gnl_object_get_media_start_stop (GnlObject *object,
                                             GstClockTime *start,
                                             GstClockTime *stop);
void        gnl_object_set_start_stop       (GnlObject *object,
                                             GstClockTime start,
                                             GstClockTime stop);
void        gnl_object_get_start_stop       (GnlObject *object,
                                             GstClockTime *start,
                                             GstClockTime *stop);
void        gnl_object_set_priority         (GnlObject *object,
                                             gint priority);
gint        gnl_object_get_priority         (GnlObject *object);
gboolean    gnl_object_is_active            (GnlObject *object);
void        gnl_object_set_active           (GnlObject *object,
                                             gboolean active);
gboolean    gnl_object_covers               (GnlObject *object,
                                             GstClockTime start,
                                             GstClockTime stop,
                                             GnlCoverType type);
gboolean    gnl_object_to_media_time        (GnlObject *object,
                                             GstClockTime objecttime,
                                             GstClockTime *mediatime);
gboolean    gnl_media_to_object_time        (GnlObject *object,
                                             GstClockTime mediatime,
                                             GstClockTime *objecttime);


Object Hierarchy


  GObject
   +----GstObject
         +----GstElement
               +----GstBin
                     +----GnlObject
                           +----GnlSource
                           +----GnlComposition
                           +----GnlOperation

Implemented Interfaces

GnlObject implements GstChildProxy.

Properties


  "active"               gboolean              : Read / Write
  "media-start"          guint64               : Read / Write
  "media-stop"           guint64               : Read / Write
  "priority"             gint                  : Read / Write
  "start"                guint64               : Read / Write
  "stop"                 guint64               : Read / Write

Description

Details

GnlObject

typedef struct _GnlObject GnlObject;


GnlObjectClass

typedef struct {
  GstBinClass		parent_class;
  
  gboolean		(*prepare)		(GnlObject *object, GstEvent *event);
  gboolean		(*covers)		(GnlObject *object, 
		   				 GstClockTime start, GstClockTime stop, GnlCoverType);
} GnlObjectClass;


enum GnlCoverType

typedef enum
{
  GNL_COVER_ALL,
  GNL_COVER_SOME,
  GNL_COVER_START,
  GNL_COVER_STOP,
} GnlCoverType;

Types of cover type queries.

GNL_COVER_ALLThe GnlObject covers start and stop time.
GNL_COVER_SOMEThe GnlObject is partially in between the start and stop time.
GNL_COVER_STARTThe GnlObject covers the given start time.
GNL_COVER_STOPThe GnlObject covers the given stop time.

enum GnlDirection

typedef enum
{
  GNL_DIRECTION_FORWARD,
  GNL_DIRECTION_BACKWARD,
} GnlDirection;

GNL_DIRECTION_FORWARDSearch forward in time.
GNL_DIRECTION_BACKWARDSearch backwards in time.

gnl_object_set_media_start_stop ()

void        gnl_object_set_media_start_stop (GnlObject *object,
                                             GstClockTime start,
                                             GstClockTime stop);

Set the specified media start and stop times on the object.

object : The object element to modify
start : The media start time to configure
stop : The media stop time to configure

gnl_object_get_media_start_stop ()

void        gnl_object_get_media_start_stop (GnlObject *object,
                                             GstClockTime *start,
                                             GstClockTime *stop);

Get the currently configured media start and stop times on this object. You can optionally pass a NULL pointer to stop or start when you are not interested in its value.

object : The object element to query
start : A pointer to a GstClockTime to hold the result media start time
stop : A pointer to a GstClockTime to hold the result media stop time

gnl_object_set_start_stop ()

void        gnl_object_set_start_stop       (GnlObject *object,
                                             GstClockTime start,
                                             GstClockTime stop);

Sets the specified start and stop times on the object.

object : The object element to modify
start : The start time of this object relative to the parent
stop : The stop time of this object relative to the parent

gnl_object_get_start_stop ()

void        gnl_object_get_start_stop       (GnlObject *object,
                                             GstClockTime *start,
                                             GstClockTime *stop);

Get the currently configured start and stop times on this object. You can optionally pass a NULL pointer to stop or start when you are not interested in its value.

object : The object element to query
start : A pointer to a GstClockTime to hold the result start time
stop : A pointer to a GstClockTime to hold the result stop time

gnl_object_set_priority ()

void        gnl_object_set_priority         (GnlObject *object,
                                             gint priority);

Set the priority on the given object

object : The object element to modify
priority : The new priority of the object

gnl_object_get_priority ()

gint        gnl_object_get_priority         (GnlObject *object);

Get the priority of the object

object : The object element to query
Returns : The priority of the object

gnl_object_is_active ()

gboolean    gnl_object_is_active            (GnlObject *object);

Check if the object is active.

object : The object element to query
Returns : The state of the object

gnl_object_set_active ()

void        gnl_object_set_active           (GnlObject *object,
                                             gboolean active);

Activate or dectivate the given object based on the active argument.

object : The object element to activate
active : the new state of the object

gnl_object_covers ()

gboolean    gnl_object_covers               (GnlObject *object,
                                             GstClockTime start,
                                             GstClockTime stop,
                                             GnlCoverType type);

object : The GnlObject
start : The start GstClockTime for the query
stop : The stop GstClockTime for the query
type : The type of GnlCoverType query used
Returns : TRUE if the GnlObject is covered by the given start/stop time and the type of GnlCoverType

gnl_object_to_media_time ()

gboolean    gnl_object_to_media_time        (GnlObject *object,
                                             GstClockTime objecttime,
                                             GstClockTime *mediatime);

Converts a GstClockTime from the object (container) context to the media context

object :
objecttime : The GstClockTime we want to convert
mediatime : A pointer on a GstClockTime to fill
Returns : TRUE if objecttime was within the limits of the object start/stop time, FALSE otherwise

gnl_media_to_object_time ()

gboolean    gnl_media_to_object_time        (GnlObject *object,
                                             GstClockTime mediatime,
                                             GstClockTime *objecttime);

Converts a GstClockTime from the media context to the object (container) context

object :
mediatime : The GstClockTime we want to convert
objecttime : A pointer on a GstClockTime to fill
Returns : TRUE if objecttime was within the limits of the object media start/stop time, FALSE otherwise

Properties

The "active" property

  "active"               gboolean              : Read / Write

The state of the object.

Default value: TRUE


The "media-start" property

  "media-start"          guint64               : Read / Write

The media start position.

Allowed values: <= G_MAXINT64

Default value: 0


The "media-stop" property

  "media-stop"           guint64               : Read / Write

The media stop position.

Allowed values: <= G_MAXINT64

Default value: 0


The "priority" property

  "priority"             gint                  : Read / Write

The priority of the object.

Allowed values: >= 0

Default value: 0


The "start" property

  "start"                guint64               : Read / Write

The start position relative to the parent.

Allowed values: <= G_MAXINT64

Default value: 0


The "stop" property

  "stop"                 guint64               : Read / Write

The stop position relative to the parent.

Allowed values: <= G_MAXINT64

Default value: 0