src/ => ges/
[platform/upstream/gstreamer.git] / ges / 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 #define GET_PRIVATE(o) \
34   (G_TYPE_INSTANCE_GET_PRIVATE ((o), GES_TYPE_TIMELINE, GESTimelinePrivate))
35      typedef struct _GESTimelinePrivate GESTimelinePrivate;
36
37      struct _GESTimelinePrivate
38      {
39        GList *tracks;           /* TimelineTracks */
40      };
41
42      static void
43          ges_timeline_get_property (GObject * object, guint property_id,
44     GValue * value, GParamSpec * pspec)
45 {
46   switch (property_id) {
47     default:
48       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
49   }
50 }
51
52 static void
53 ges_timeline_set_property (GObject * object, guint property_id,
54     const GValue * value, GParamSpec * pspec)
55 {
56   switch (property_id) {
57     default:
58       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
59   }
60 }
61
62 static void
63 ges_timeline_dispose (GObject * object)
64 {
65   G_OBJECT_CLASS (ges_timeline_parent_class)->dispose (object);
66 }
67
68 static void
69 ges_timeline_finalize (GObject * object)
70 {
71   G_OBJECT_CLASS (ges_timeline_parent_class)->finalize (object);
72 }
73
74 static void
75 ges_timeline_class_init (GESTimelineClass * klass)
76 {
77   GObjectClass *object_class = G_OBJECT_CLASS (klass);
78
79   g_type_class_add_private (klass, sizeof (GESTimelinePrivate));
80
81   object_class->get_property = ges_timeline_get_property;
82   object_class->set_property = ges_timeline_set_property;
83   object_class->dispose = ges_timeline_dispose;
84   object_class->finalize = ges_timeline_finalize;
85 }
86
87 static void
88 ges_timeline_init (GESTimeline * self)
89 {
90   self->layers = NULL;
91   self->tracks = NULL;
92 }
93
94 GESTimeline *
95 ges_timeline_new (void)
96 {
97   return g_object_new (GES_TYPE_TIMELINE, NULL);
98 }
99
100 GESTimeline *
101 ges_timeline_load_from_uri (gchar * uri)
102 {
103   /* FIXME : IMPLEMENT */
104   return NULL;
105 }
106
107 gboolean
108 ges_timeline_save (GESTimeline * timeline, gchar * uri)
109 {
110   /* FIXME : IMPLEMENT */
111   return FALSE;
112 }
113
114 gboolean
115 ges_timeline_add_layer (GESTimeline * timeline, GESTimelineLayer * layer)
116 {
117   /* FIXME : IMPLEMENT */
118
119   /* Add to the list of layers, make sure we don't already control it */
120
121   /* Assign Tracks to it */
122
123   return FALSE;
124 }
125
126 gboolean
127 ges_timeline_remove_layer (GESTimeline * timeline, GESTimelineLayer * layer)
128 {
129   /* FIXME : IMPLEMENT */
130
131   /* Unassign tracks from the given layer */
132   return FALSE;
133 }
134
135 gboolean
136 ges_timeline_add_track (GESTimeline * timeline, GESTrack * track)
137 {
138   /* FIXME : IMPLEMENT */
139
140   /* Add to the list of tracks, make sure we don't already control it */
141
142
143   return FALSE;
144 }
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   return FALSE;
155 }