gstreamer/ges/ges-timeline-object.h

104 lines
3.5 KiB
C

/* GStreamer Editing Services
* Copyright (C) 2009 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., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#ifndef _GES_TIMELINE_OBJECT
#define _GES_TIMELINE_OBJECT
#include <glib-object.h>
#include <gst/gst.h>
#include <ges/ges-types.h>
G_BEGIN_DECLS
#define GES_TYPE_TIMELINE_OBJECT ges_timeline_object_get_type()
#define GES_TIMELINE_OBJECT(obj) \
(G_TYPE_CHECK_INSTANCE_CAST ((obj), GES_TYPE_TIMELINE_OBJECT, GESTimelineObject))
#define GES_TIMELINE_OBJECT_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST ((klass), GES_TYPE_TIMELINE_OBJECT, GESTimelineObjectClass))
#define GES_IS_TIMELINE_OBJECT(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), GES_TYPE_TIMELINE_OBJECT))
#define GES_IS_TIMELINE_OBJECT_CLASS(klass) \
(G_TYPE_CHECK_CLASS_TYPE ((klass), GES_TYPE_TIMELINE_OBJECT))
#define GES_TIMELINE_OBJECT_GET_CLASS(obj) \
(G_TYPE_INSTANCE_GET_CLASS ((obj), GES_TYPE_TIMELINE_OBJECT, GESTimelineObjectClass))
typedef gboolean (*FillTrackObjectFunc) (GESTimelineObject * object,
GESTrackObject * trobject,
GstElement * gnlobj);
struct _GESTimelineObject {
GObject parent;
GESTimelineLayer * layer; /* The layer where this object is being used */
GList *trackobjects; /* A list of TrackObject controlled by this TimelineObject */
/* start, inpoint, duration and fullduration are in nanoseconds */
guint64 start; /* position (in time) of the object in the layer */
guint64 inpoint; /* in-point */
guint64 duration; /* duration of the object used in the layer */
guint32 priority; /* priority of the object in the layer (0:top priority) */
guint64 fullduration; /* Full usable duration of the object (-1: no duration) */
};
struct _GESTimelineObjectClass {
GObjectClass parent_class;
GESTrackObject* (*create_track_object) (GESTimelineObject * object,
GESTrack * track);
/* FIXME : might need a release_track_object */
FillTrackObjectFunc fill_track_object;
};
GType ges_timeline_object_get_type (void);
GESTimelineObject*
ges_timeline_object_new (void);
void ges_timeline_object_set_start (GESTimelineObject * object, guint64 start);
void ges_timeline_object_set_inpoint (GESTimelineObject * object, guint64 inpoint);
void ges_timeline_object_set_duration (GESTimelineObject * object, guint64 duration);
void ges_timeline_object_set_priority (GESTimelineObject * object, guint priority);
void ges_timeline_object_set_layer (GESTimelineObject * object,
GESTimelineLayer * layer);
GESTrackObject *
ges_timeline_object_create_track_object (GESTimelineObject * object,
GESTrack * track);
gboolean
ges_timeline_object_release_track_object (GESTimelineObject * object,
GESTrackObject * trackobject);
gboolean
ges_timeline_object_fill_track_object (GESTimelineObject * object,
GESTrackObject * trackobj,
GstElement * gnlobj);
G_END_DECLS
#endif /* _GES_TIMELINE_OBJECT */