2009-08-04 15:13:11 +00:00
|
|
|
/* 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>
|
2009-08-06 15:38:43 +00:00
|
|
|
#include <gst/gst.h>
|
2009-08-06 10:14:37 +00:00
|
|
|
#include <ges/ges-types.h>
|
2009-08-04 15:13:11 +00:00
|
|
|
|
|
|
|
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))
|
|
|
|
|
2009-08-07 14:39:45 +00:00
|
|
|
typedef gboolean (*FillTrackObjectFunc) (GESTimelineObject * object,
|
|
|
|
GESTrackObject * trobject,
|
|
|
|
GstElement * gnlobj);
|
|
|
|
|
2009-08-04 15:16:31 +00:00
|
|
|
struct _GESTimelineObject {
|
2009-08-04 15:13:11 +00:00
|
|
|
GObject parent;
|
2009-08-06 09:23:01 +00:00
|
|
|
|
2009-08-06 15:38:43 +00:00
|
|
|
GESTimelineLayer * layer; /* The layer where this object is being used */
|
|
|
|
|
2009-08-07 14:39:45 +00:00
|
|
|
GList *trackobjects; /* A list of TrackObject controlled by this TimelineObject */
|
|
|
|
|
2009-08-06 09:23:01 +00:00
|
|
|
/* 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) */
|
2009-08-04 15:16:31 +00:00
|
|
|
};
|
2009-08-04 15:13:11 +00:00
|
|
|
|
2009-08-04 15:16:31 +00:00
|
|
|
struct _GESTimelineObjectClass {
|
2009-08-04 15:13:11 +00:00
|
|
|
GObjectClass parent_class;
|
2009-08-06 15:38:43 +00:00
|
|
|
|
|
|
|
GESTrackObject* (*create_track_object) (GESTimelineObject * object,
|
|
|
|
GESTrack * track);
|
2009-08-07 14:39:45 +00:00
|
|
|
/* FIXME : might need a release_track_object */
|
|
|
|
FillTrackObjectFunc fill_track_object;
|
2009-08-04 15:16:31 +00:00
|
|
|
};
|
2009-08-04 15:13:11 +00:00
|
|
|
|
|
|
|
GType ges_timeline_object_get_type (void);
|
|
|
|
|
2009-08-06 10:14:37 +00:00
|
|
|
GESTimelineObject*
|
|
|
|
ges_timeline_object_new (void);
|
2009-08-04 15:13:11 +00:00
|
|
|
|
2009-08-06 15:38:43 +00:00
|
|
|
void ges_timeline_object_set_layer (GESTimelineObject * object,
|
|
|
|
GESTimelineLayer * layer);
|
|
|
|
|
2009-08-06 10:14:37 +00:00
|
|
|
GESTrackObject *
|
|
|
|
ges_timeline_object_create_track_object (GESTimelineObject * object,
|
|
|
|
GESTrack * track);
|
2009-08-06 09:23:01 +00:00
|
|
|
|
2009-08-07 14:39:45 +00:00
|
|
|
gboolean
|
|
|
|
ges_timeline_object_release_track_object (GESTimelineObject * object,
|
|
|
|
GESTrackObject * trackobject);
|
|
|
|
|
2009-08-06 15:38:43 +00:00
|
|
|
gboolean
|
|
|
|
ges_timeline_object_fill_track_object (GESTimelineObject * object,
|
|
|
|
GESTrackObject * trackobj,
|
|
|
|
GstElement * gnlobj);
|
|
|
|
|
2009-08-04 15:13:11 +00:00
|
|
|
G_END_DECLS
|
|
|
|
|
|
|
|
#endif /* _GES_TIMELINE_OBJECT */
|
|
|
|
|