Initial code drop
[platform/upstream/gstreamer.git] / src / ges-timeline.c
1 /* GStreamer Editing Services
2  * Copyright (C) 2009 Edward Hervey <bilboed@bilboed.com>
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Library General Public
6  * License as published by the Free Software Foundation; either
7  * version 2 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12  * Library General Public License for more details.
13  *
14  * You should have received a copy of the GNU Library General Public
15  * License along with this library; if not, write to the
16  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17  * Boston, MA 02111-1307, USA.
18  */
19
20 #include "ges-timeline.h"
21
22 /**
23  * GESTimelinePipeline
24  *
25  * Top-level container for pipelines
26  * 
27  * Contains a list of TimelineLayer which users should use to arrange the
28  * various timeline objects.
29  *
30  */
31
32 G_DEFINE_TYPE (GESTimeline, ges_timeline, GST_TYPE_BIN)
33
34 #define GET_PRIVATE(o) \
35   (G_TYPE_INSTANCE_GET_PRIVATE ((o), GES_TYPE_TIMELINE, GESTimelinePrivate))
36
37 typedef struct _GESTimelinePrivate GESTimelinePrivate;
38
39 struct _GESTimelinePrivate {
40   GList *tracks;        /* TimelineTracks */
41 };
42
43 static void
44 ges_timeline_get_property (GObject *object, guint property_id,
45                               GValue *value, GParamSpec *pspec)
46 {
47   switch (property_id) {
48   default:
49     G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
50   }
51 }
52
53 static void
54 ges_timeline_set_property (GObject *object, guint property_id,
55                               const GValue *value, GParamSpec *pspec)
56 {
57   switch (property_id) {
58   default:
59     G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
60   }
61 }
62
63 static void
64 ges_timeline_dispose (GObject *object)
65 {
66   G_OBJECT_CLASS (ges_timeline_parent_class)->dispose (object);
67 }
68
69 static void
70 ges_timeline_finalize (GObject *object)
71 {
72   G_OBJECT_CLASS (ges_timeline_parent_class)->finalize (object);
73 }
74
75 static void
76 ges_timeline_class_init (GESTimelineClass *klass)
77 {
78   GObjectClass *object_class = G_OBJECT_CLASS (klass);
79
80   g_type_class_add_private (klass, sizeof (GESTimelinePrivate));
81
82   object_class->get_property = ges_timeline_get_property;
83   object_class->set_property = ges_timeline_set_property;
84   object_class->dispose = ges_timeline_dispose;
85   object_class->finalize = ges_timeline_finalize;
86 }
87
88 static void
89 ges_timeline_init (GESTimeline *self)
90 {
91   self->layers = NULL;
92   self->tracks = NULL;
93 }
94
95 GESTimeline*
96 ges_timeline_new (void)
97 {
98   return g_object_new (GES_TYPE_TIMELINE, NULL);
99 }
100
101 GESTimeline*
102 ges_timeline_load_from_uri (gchar *uri)
103 {
104   /* FIXME : IMPLEMENT */
105   return NULL;
106 }
107
108 gboolean
109 ges_timeline_save (GESTimeline *timeline, gchar *uri)
110 {
111   /* FIXME : IMPLEMENT */
112   return FALSE;
113 }
114
115 gboolean
116 ges_timeline_add_layer (GESTimeline *timeline, GESTimelineLayer *layer)
117 {
118   /* FIXME : IMPLEMENT */
119
120   /* Add to the list of layers, make sure we don't already control it */
121
122   /* Assign Tracks to it */
123
124   return FALSE;
125 }
126
127 gboolean
128 ges_timeline_remove_layer (GESTimeline *timeline, GESTimelineLayer *layer)
129 {
130   /* FIXME : IMPLEMENT */
131
132   /* Unassign tracks from the given layer */
133   return FALSE;
134 }
135
136 gboolean
137 ges_timeline_add_track (GESTimeline *timeline, GESTrack *track)
138 {
139   /* FIXME : IMPLEMENT */
140
141   /* Add to the list of tracks, make sure we don't already control it */
142
143
144   return FALSE;
145 }
146 gboolean
147 ges_timeline_remove_track (GESTimeline *timeline, GESTrack *track)
148 {
149   /* FIXME : IMPLEMENT */
150
151   /* Signal track removal to all layers/objects */
152
153   /* */
154 }