diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/ges-simple-timeline-layer.c | 88 | ||||
-rw-r--r-- | src/ges-simple-timeline-layer.h | 60 | ||||
-rw-r--r-- | src/ges-timeline-layer.c | 94 | ||||
-rw-r--r-- | src/ges-timeline-layer.h | 59 | ||||
-rw-r--r-- | src/ges-timeline-object.c | 97 | ||||
-rw-r--r-- | src/ges-timeline-object.h | 59 | ||||
-rw-r--r-- | src/ges-timeline-pipeline.c | 92 | ||||
-rw-r--r-- | src/ges-timeline-pipeline.h | 59 | ||||
-rw-r--r-- | src/ges-timeline-source.c | 88 | ||||
-rw-r--r-- | src/ges-timeline-source.h | 59 | ||||
-rw-r--r-- | src/ges-timeline-transition.c | 88 | ||||
-rw-r--r-- | src/ges-timeline-transition.h | 58 | ||||
-rw-r--r-- | src/ges-timeline.c | 154 | ||||
-rw-r--r-- | src/ges-timeline.h | 74 | ||||
-rw-r--r-- | src/ges-track.c | 96 | ||||
-rw-r--r-- | src/ges-track.h | 61 |
16 files changed, 1286 insertions, 0 deletions
diff --git a/src/ges-simple-timeline-layer.c b/src/ges-simple-timeline-layer.c new file mode 100644 index 00000000..8a08b269 --- /dev/null +++ b/src/ges-simple-timeline-layer.c @@ -0,0 +1,88 @@ +/* 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. + */ + +#include "ges-simple-timeline-layer.h" + +G_DEFINE_TYPE (GESSimpleTimelineLayer, ges_simple_timeline_layer, GES_TIMELINE_LAYER) + +#define GET_PRIVATE(o) \ + (G_TYPE_INSTANCE_GET_PRIVATE ((o), GES_TYPE_SIMPLE_TIMELINE_LAYER, GESSimpleTimelineLayerPrivate)) + +typedef struct _GESSimpleTimelineLayerPrivate GESSimpleTimelineLayerPrivate; + +struct _GESSimpleTimelineLayerPrivate { + int dummy; +}; + +static void +ges_simple_timeline_layer_get_property (GObject *object, guint property_id, + GValue *value, GParamSpec *pspec) +{ + switch (property_id) { + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); + } +} + +static void +ges_simple_timeline_layer_set_property (GObject *object, guint property_id, + const GValue *value, GParamSpec *pspec) +{ + switch (property_id) { + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); + } +} + +static void +ges_simple_timeline_layer_dispose (GObject *object) +{ + G_OBJECT_CLASS (ges_simple_timeline_layer_parent_class)->dispose (object); +} + +static void +ges_simple_timeline_layer_finalize (GObject *object) +{ + G_OBJECT_CLASS (ges_simple_timeline_layer_parent_class)->finalize (object); +} + +static void +ges_simple_timeline_layer_class_init (GESSimpleTimelineLayerClass *klass) +{ + GObjectClass *object_class = G_OBJECT_CLASS (klass); + + g_type_class_add_private (klass, sizeof (GESSimpleTimelineLayerPrivate)); + + object_class->get_property = ges_simple_timeline_layer_get_property; + object_class->set_property = ges_simple_timeline_layer_set_property; + object_class->dispose = ges_simple_timeline_layer_dispose; + object_class->finalize = ges_simple_timeline_layer_finalize; +} + +static void +ges_simple_timeline_layer_init (GESSimpleTimelineLayer *self) +{ +} + +GESSimpleTimelineLayer* +ges_simple_timeline_layer_new (void) +{ + return g_object_new (GES_TYPE_SIMPLE_TIMELINE_LAYER, NULL); +} + diff --git a/src/ges-simple-timeline-layer.h b/src/ges-simple-timeline-layer.h new file mode 100644 index 00000000..a04922af --- /dev/null +++ b/src/ges-simple-timeline-layer.h @@ -0,0 +1,60 @@ +/* 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_SIMPLE_TIMELINE_LAYER +#define _GES_SIMPLE_TIMELINE_LAYER + +#include <glib-object.h> +#include "ges-timeline-layer.h" + +G_BEGIN_DECLS + +#define GES_TYPE_SIMPLE_TIMELINE_LAYER ges_simple_timeline_layer_get_type() + +#define GES_SIMPLE_TIMELINE_LAYER(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST ((obj), GES_TYPE_SIMPLE_TIMELINE_LAYER, GESSimpleTimelineLayer)) + +#define GES_SIMPLE_TIMELINE_LAYER_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST ((klass), GES_TYPE_SIMPLE_TIMELINE_LAYER, GESSimpleTimelineLayerClass)) + +#define GES_IS_SIMPLE_TIMELINE_LAYER(obj) \ + (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GES_TYPE_SIMPLE_TIMELINE_LAYER)) + +#define GES_IS_SIMPLE_TIMELINE_LAYER_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_TYPE ((klass), GES_TYPE_SIMPLE_TIMELINE_LAYER)) + +#define GES_SIMPLE_TIMELINE_LAYER_GET_CLASS(obj) \ + (G_TYPE_INSTANCE_GET_CLASS ((obj), GES_TYPE_SIMPLE_TIMELINE_LAYER, GESSimpleTimelineLayerClass)) + +typedef struct { + GESTimelineLayer parent; +} GESSimpleTimelineLayer; + +typedef struct { + GESTimelineLayerClass parent_class; +} GESSimpleTimelineLayerClass; + +GType ges_simple_timeline_layer_get_type (void); + +GESSimpleTimelineLayer* ges_simple_timeline_layer_new (void); + +G_END_DECLS + +#endif /* _GES_SIMPLE_TIMELINE_LAYER */ + diff --git a/src/ges-timeline-layer.c b/src/ges-timeline-layer.c new file mode 100644 index 00000000..2e9ef0ae --- /dev/null +++ b/src/ges-timeline-layer.c @@ -0,0 +1,94 @@ +/* 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. + */ + +#include "ges-timeline-layer.h" + +/** + * GESTimelineLayer + * + * Responsible for the ordering of the various contained TimelineObject(s) + */ + +G_DEFINE_TYPE (GESTimelineLayer, ges_timeline_layer, G_TYPE_OBJECT) + +#define GET_PRIVATE(o) \ + (G_TYPE_INSTANCE_GET_PRIVATE ((o), GES_TYPE_TIMELINE_LAYER, GESTimelineLayerPrivate)) + +typedef struct _GESTimelineLayerPrivate GESTimelineLayerPrivate; + +struct _GESTimelineLayerPrivate { + int dummy; +}; + +static void +ges_timeline_layer_get_property (GObject *object, guint property_id, + GValue *value, GParamSpec *pspec) +{ + switch (property_id) { + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); + } +} + +static void +ges_timeline_layer_set_property (GObject *object, guint property_id, + const GValue *value, GParamSpec *pspec) +{ + switch (property_id) { + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); + } +} + +static void +ges_timeline_layer_dispose (GObject *object) +{ + G_OBJECT_CLASS (ges_timeline_layer_parent_class)->dispose (object); +} + +static void +ges_timeline_layer_finalize (GObject *object) +{ + G_OBJECT_CLASS (ges_timeline_layer_parent_class)->finalize (object); +} + +static void +ges_timeline_layer_class_init (GESTimelineLayerClass *klass) +{ + GObjectClass *object_class = G_OBJECT_CLASS (klass); + + g_type_class_add_private (klass, sizeof (GESTimelineLayerPrivate)); + + object_class->get_property = ges_timeline_layer_get_property; + object_class->set_property = ges_timeline_layer_set_property; + object_class->dispose = ges_timeline_layer_dispose; + object_class->finalize = ges_timeline_layer_finalize; +} + +static void +ges_timeline_layer_init (GESTimelineLayer *self) +{ +} + +GESTimelineLayer* +ges_timeline_layer_new (void) +{ + return g_object_new (GES_TYPE_TIMELINE_LAYER, NULL); +} + diff --git a/src/ges-timeline-layer.h b/src/ges-timeline-layer.h new file mode 100644 index 00000000..f83b9e53 --- /dev/null +++ b/src/ges-timeline-layer.h @@ -0,0 +1,59 @@ +/* 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_LAYER +#define _GES_TIMELINE_LAYER + +#include <glib-object.h> + +G_BEGIN_DECLS + +#define GES_TYPE_TIMELINE_LAYER ges_timeline_layer_get_type() + +#define GES_TIMELINE_LAYER(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST ((obj), GES_TYPE_TIMELINE_LAYER, GESTimelineLayer)) + +#define GES_TIMELINE_LAYER_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST ((klass), GES_TYPE_TIMELINE_LAYER, GESTimelineLayerClass)) + +#define GES_IS_TIMELINE_LAYER(obj) \ + (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GES_TYPE_TIMELINE_LAYER)) + +#define GES_IS_TIMELINE_LAYER_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_TYPE ((klass), GES_TYPE_TIMELINE_LAYER)) + +#define GES_TIMELINE_LAYER_GET_CLASS(obj) \ + (G_TYPE_INSTANCE_GET_CLASS ((obj), GES_TYPE_TIMELINE_LAYER, GESTimelineLayerClass)) + +typedef struct { + GObject parent; +} GESTimelineLayer; + +typedef struct { + GObjectClass parent_class; +} GESTimelineLayerClass; + +GType ges_timeline_layer_get_type (void); + +GESTimelineLayer* ges_timeline_layer_new (void); + +G_END_DECLS + +#endif /* _GES_TIMELINE_LAYER */ + diff --git a/src/ges-timeline-object.c b/src/ges-timeline-object.c new file mode 100644 index 00000000..fffe8082 --- /dev/null +++ b/src/ges-timeline-object.c @@ -0,0 +1,97 @@ +/* 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. + */ + +#include "ges-timeline-object.h" + +/** + * GESTimelineObject + * + * Responsible for creating the TrackObject(s) for given TimelineTrack(s) + * + * Keeps a reference to the TrackObject(s) it created and sets/updates their properties. + */ + + +G_DEFINE_TYPE (GESTimelineObject, ges_timeline_object, G_TYPE_OBJECT) + +#define GET_PRIVATE(o) \ + (G_TYPE_INSTANCE_GET_PRIVATE ((o), GES_TYPE_TIMELINE_OBJECT, GESTimelineObjectPrivate)) + +typedef struct _GESTimelineObjectPrivate GESTimelineObjectPrivate; + +struct _GESTimelineObjectPrivate { + int dummy; +}; + +static void +ges_timeline_object_get_property (GObject *object, guint property_id, + GValue *value, GParamSpec *pspec) +{ + switch (property_id) { + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); + } +} + +static void +ges_timeline_object_set_property (GObject *object, guint property_id, + const GValue *value, GParamSpec *pspec) +{ + switch (property_id) { + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); + } +} + +static void +ges_timeline_object_dispose (GObject *object) +{ + G_OBJECT_CLASS (ges_timeline_object_parent_class)->dispose (object); +} + +static void +ges_timeline_object_finalize (GObject *object) +{ + G_OBJECT_CLASS (ges_timeline_object_parent_class)->finalize (object); +} + +static void +ges_timeline_object_class_init (GESTimelineObjectClass *klass) +{ + GObjectClass *object_class = G_OBJECT_CLASS (klass); + + g_type_class_add_private (klass, sizeof (GESTimelineObjectPrivate)); + + object_class->get_property = ges_timeline_object_get_property; + object_class->set_property = ges_timeline_object_set_property; + object_class->dispose = ges_timeline_object_dispose; + object_class->finalize = ges_timeline_object_finalize; +} + +static void +ges_timeline_object_init (GESTimelineObject *self) +{ +} + +GESTimelineObject* +ges_timeline_object_new (void) +{ + return g_object_new (GES_TYPE_TIMELINE_OBJECT, NULL); +} + diff --git a/src/ges-timeline-object.h b/src/ges-timeline-object.h new file mode 100644 index 00000000..438c9967 --- /dev/null +++ b/src/ges-timeline-object.h @@ -0,0 +1,59 @@ +/* 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> + +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 struct { + GObject parent; +} GESTimelineObject; + +typedef struct { + GObjectClass parent_class; +} GESTimelineObjectClass; + +GType ges_timeline_object_get_type (void); + +GESTimelineObject* ges_timeline_object_new (void); + +G_END_DECLS + +#endif /* _GES_TIMELINE_OBJECT */ + diff --git a/src/ges-timeline-pipeline.c b/src/ges-timeline-pipeline.c new file mode 100644 index 00000000..18faeb05 --- /dev/null +++ b/src/ges-timeline-pipeline.c @@ -0,0 +1,92 @@ +/* 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. + */ + +#include "ges-timeline-pipeline.h" + +/* TimelinePipeline + * + */ + +G_DEFINE_TYPE (GESTimelinePipeline, ges_timeline_pipeline, GST_TYPE_PIPELINE) + +#define GET_PRIVATE(o) \ + (G_TYPE_INSTANCE_GET_PRIVATE ((o), GEST_TYPE_TIMELINE_PIPELINE, GESTimelinePipelinePrivate)) + +typedef struct _GESTimelinePipelinePrivate GESTimelinePipelinePrivate; + +struct _GESTimelinePipelinePrivate { + int dummy; +}; + +static void +ges_timeline_pipeline_get_property (GObject *object, guint property_id, + GValue *value, GParamSpec *pspec) +{ + switch (property_id) { + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); + } +} + +static void +ges_timeline_pipeline_set_property (GObject *object, guint property_id, + const GValue *value, GParamSpec *pspec) +{ + switch (property_id) { + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); + } +} + +static void +ges_timeline_pipeline_dispose (GObject *object) +{ + G_OBJECT_CLASS (ges_timeline_pipeline_parent_class)->dispose (object); +} + +static void +ges_timeline_pipeline_finalize (GObject *object) +{ + G_OBJECT_CLASS (ges_timeline_pipeline_parent_class)->finalize (object); +} + +static void +ges_timeline_pipeline_class_init (GESTimelinePipelineClass *klass) +{ + GObjectClass *object_class = G_OBJECT_CLASS (klass); + + g_type_class_add_private (klass, sizeof (GESTimelinePipelinePrivate)); + + object_class->get_property = ges_timeline_pipeline_get_property; + object_class->set_property = ges_timeline_pipeline_set_property; + object_class->dispose = ges_timeline_pipeline_dispose; + object_class->finalize = ges_timeline_pipeline_finalize; +} + +static void +ges_timeline_pipeline_init (GESTimelinePipeline *self) +{ +} + +GESTimelinePipeline* +ges_timeline_pipeline_new (void) +{ + return g_object_new (GEST_TYPE_TIMELINE_PIPELINE, NULL); +} + diff --git a/src/ges-timeline-pipeline.h b/src/ges-timeline-pipeline.h new file mode 100644 index 00000000..3e61c516 --- /dev/null +++ b/src/ges-timeline-pipeline.h @@ -0,0 +1,59 @@ +/* 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_PIPELINE +#define _GES_TIMELINE_PIPELINE + +#include <glib-object.h> + +G_BEGIN_DECLS + +#define GEST_TYPE_TIMELINE_PIPELINE ges_timeline_pipeline_get_type() + +#define GEST_TIMELINE_PIPELINE(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEST_TYPE_TIMELINE_PIPELINE, GESTimelinePipeline)) + +#define GEST_TIMELINE_PIPELINE_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST ((klass), GEST_TYPE_TIMELINE_PIPELINE, GESTimelinePipelineClass)) + +#define GEST_IS_TIMELINE_PIPELINE(obj) \ + (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEST_TYPE_TIMELINE_PIPELINE)) + +#define GEST_IS_TIMELINE_PIPELINE_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_TYPE ((klass), GEST_TYPE_TIMELINE_PIPELINE)) + +#define GEST_TIMELINE_PIPELINE_GET_CLASS(obj) \ + (G_TYPE_INSTANCE_GET_CLASS ((obj), GEST_TYPE_TIMELINE_PIPELINE, GESTimelinePipelineClass)) + +typedef struct { + GstPipeline parent; +} GESTimelinePipeline; + +typedef struct { + GstPipelineClass parent_class; +} GESTimelinePipelineClass; + +GType ges_timeline_pipeline_get_type (void); + +GESTimelinePipeline* ges_timeline_pipeline_new (void); + +G_END_DECLS + +#endif /* _GES_TIMELINE_PIPELINE */ + diff --git a/src/ges-timeline-source.c b/src/ges-timeline-source.c new file mode 100644 index 00000000..229c74a4 --- /dev/null +++ b/src/ges-timeline-source.c @@ -0,0 +1,88 @@ +/* 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. + */ + +#include "ges-timeline-source.h" + +G_DEFINE_TYPE (GESTimelineSource, ges_timeline_source, GES_TIMELINE_OBJECT) + +#define GET_PRIVATE(o) \ + (G_TYPE_INSTANCE_GET_PRIVATE ((o), GES_TYPE_TIMELINE_SOURCE, GESTimelineSourcePrivate)) + +typedef struct _GESTimelineSourcePrivate GESTimelineSourcePrivate; + +struct _GESTimelineSourcePrivate { + int dummy; +}; + +static void +ges_timeline_source_get_property (GObject *object, guint property_id, + GValue *value, GParamSpec *pspec) +{ + switch (property_id) { + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); + } +} + +static void +ges_timeline_source_set_property (GObject *object, guint property_id, + const GValue *value, GParamSpec *pspec) +{ + switch (property_id) { + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); + } +} + +static void +ges_timeline_source_dispose (GObject *object) +{ + G_OBJECT_CLASS (ges_timeline_source_parent_class)->dispose (object); +} + +static void +ges_timeline_source_finalize (GObject *object) +{ + G_OBJECT_CLASS (ges_timeline_source_parent_class)->finalize (object); +} + +static void +ges_timeline_source_class_init (GESTimelineSourceClass *klass) +{ + GObjectClass *object_class = G_OBJECT_CLASS (klass); + + g_type_class_add_private (klass, sizeof (GESTimelineSourcePrivate)); + + object_class->get_property = ges_timeline_source_get_property; + object_class->set_property = ges_timeline_source_set_property; + object_class->dispose = ges_timeline_source_dispose; + object_class->finalize = ges_timeline_source_finalize; +} + +static void +ges_timeline_source_init (GESTimelineSource *self) +{ +} + +GESTimelineSource* +ges_timeline_source_new (void) +{ + return g_object_new (GES_TYPE_TIMELINE_SOURCE, NULL); +} + diff --git a/src/ges-timeline-source.h b/src/ges-timeline-source.h new file mode 100644 index 00000000..d0162935 --- /dev/null +++ b/src/ges-timeline-source.h @@ -0,0 +1,59 @@ +/* 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_SOURCE +#define _GES_TIMELINE_SOURCE + +#include <glib-object.h> + +G_BEGIN_DECLS + +#define GES_TYPE_TIMELINE_SOURCE ges_timeline_source_get_type() + +#define GES_TIMELINE_SOURCE(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST ((obj), GES_TYPE_TIMELINE_SOURCE, GESTimelineSource)) + +#define GES_TIMELINE_SOURCE_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST ((klass), GES_TYPE_TIMELINE_SOURCE, GESTimelineSourceClass)) + +#define GES_IS_TIMELINE_SOURCE(obj) \ + (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GES_TYPE_TIMELINE_SOURCE)) + +#define GES_IS_TIMELINE_SOURCE_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_TYPE ((klass), GES_TYPE_TIMELINE_SOURCE)) + +#define GES_TIMELINE_SOURCE_GET_CLASS(obj) \ + (G_TYPE_INSTANCE_GET_CLASS ((obj), GES_TYPE_TIMELINE_SOURCE, GESTimelineSourceClass)) + +typedef struct { + GESTimelineObject parent; +} GESTimelineSource; + +typedef struct { + GESTimelineObjectClass parent_class; +} GESTimelineSourceClass; + +GType ges_timeline_source_get_type (void); + +GESTimelineSource* ges_timeline_source_new (void); + +G_END_DECLS + +#endif /* _GES_TIMELINE_SOURCE */ + diff --git a/src/ges-timeline-transition.c b/src/ges-timeline-transition.c new file mode 100644 index 00000000..802b934a --- /dev/null +++ b/src/ges-timeline-transition.c @@ -0,0 +1,88 @@ +/* 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. + */ + +#include "ges-timeline-transition.h" + +G_DEFINE_TYPE (GESTimelineTransition, ges_timeline_transition, GES_TIMELINE_OBJECT) + +#define GET_PRIVATE(o) \ + (G_TYPE_INSTANCE_GET_PRIVATE ((o), GES_TYPE_TIMELINE_TRANSITION, GESTimelineTransitionPrivate)) + +typedef struct _GESTimelineTransitionPrivate GESTimelineTransitionPrivate; + +struct _GESTimelineTransitionPrivate { + int dummy; +}; + +static void +ges_timeline_transition_get_property (GObject *object, guint property_id, + GValue *value, GParamSpec *pspec) +{ + switch (property_id) { + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); + } +} + +static void +ges_timeline_transition_set_property (GObject *object, guint property_id, + const GValue *value, GParamSpec *pspec) +{ + switch (property_id) { + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); + } +} + +static void +ges_timeline_transition_dispose (GObject *object) +{ + G_OBJECT_CLASS (ges_timeline_transition_parent_class)->dispose (object); +} + +static void +ges_timeline_transition_finalize (GObject *object) +{ + G_OBJECT_CLASS (ges_timeline_transition_parent_class)->finalize (object); +} + +static void +ges_timeline_transition_class_init (GESTimelineTransitionClass *klass) +{ + GObjectClass *object_class = G_OBJECT_CLASS (klass); + + g_type_class_add_private (klass, sizeof (GESTimelineTransitionPrivate)); + + object_class->get_property = ges_timeline_transition_get_property; + object_class->set_property = ges_timeline_transition_set_property; + object_class->dispose = ges_timeline_transition_dispose; + object_class->finalize = ges_timeline_transition_finalize; +} + +static void +ges_timeline_transition_init (GESTimelineTransition *self) +{ +} + +GESTimelineTransition* +ges_timeline_transition_new (void) +{ + return g_object_new (GES_TYPE_TIMELINE_TRANSITION, NULL); +} + diff --git a/src/ges-timeline-transition.h b/src/ges-timeline-transition.h new file mode 100644 index 00000000..f4bf03fc --- /dev/null +++ b/src/ges-timeline-transition.h @@ -0,0 +1,58 @@ +/* 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_TRANSITION +#define _GES_TIMELINE_TRANSITION + +#include <glib-object.h> + +G_BEGIN_DECLS + +#define GES_TYPE_TIMELINE_TRANSITION ges_timeline_transition_get_type() + +#define GES_TIMELINE_TRANSITION(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST ((obj), GES_TYPE_TIMELINE_TRANSITION, GESTimelineTransition)) + +#define GES_TIMELINE_TRANSITION_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST ((klass), GES_TYPE_TIMELINE_TRANSITION, GESTimelineTransitionClass)) + +#define GES_IS_TIMELINE_TRANSITION(obj) \ + (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GES_TYPE_TIMELINE_TRANSITION)) + +#define GES_IS_TIMELINE_TRANSITION_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_TYPE ((klass), GES_TYPE_TIMELINE_TRANSITION)) + +#define GES_TIMELINE_TRANSITION_GET_CLASS(obj) \ + (G_TYPE_INSTANCE_GET_CLASS ((obj), GES_TYPE_TIMELINE_TRANSITION, GESTimelineTransitionClass)) + +typedef struct { + GESTimelineObject parent; +} GESTimelineTransition; + +typedef struct { + GESTimelineObjectClass parent_class; +} GESTimelineTransitionClass; + +GType ges_timeline_transition_get_type (void); + +GESTimelineTransition* ges_timeline_transition_new (void); + +G_END_DECLS + +#endif /* _GES_TIMELINE_TRANSITION */ diff --git a/src/ges-timeline.c b/src/ges-timeline.c new file mode 100644 index 00000000..ed26365c --- /dev/null +++ b/src/ges-timeline.c @@ -0,0 +1,154 @@ +/* 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. + */ + +#include "ges-timeline.h" + +/** + * GESTimelinePipeline + * + * Top-level container for pipelines + * + * Contains a list of TimelineLayer which users should use to arrange the + * various timeline objects. + * + */ + +G_DEFINE_TYPE (GESTimeline, ges_timeline, GST_TYPE_BIN) + +#define GET_PRIVATE(o) \ + (G_TYPE_INSTANCE_GET_PRIVATE ((o), GES_TYPE_TIMELINE, GESTimelinePrivate)) + +typedef struct _GESTimelinePrivate GESTimelinePrivate; + +struct _GESTimelinePrivate { + GList *tracks; /* TimelineTracks */ +}; + +static void +ges_timeline_get_property (GObject *object, guint property_id, + GValue *value, GParamSpec *pspec) +{ + switch (property_id) { + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); + } +} + +static void +ges_timeline_set_property (GObject *object, guint property_id, + const GValue *value, GParamSpec *pspec) +{ + switch (property_id) { + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); + } +} + +static void +ges_timeline_dispose (GObject *object) +{ + G_OBJECT_CLASS (ges_timeline_parent_class)->dispose (object); +} + +static void +ges_timeline_finalize (GObject *object) +{ + G_OBJECT_CLASS (ges_timeline_parent_class)->finalize (object); +} + +static void +ges_timeline_class_init (GESTimelineClass *klass) +{ + GObjectClass *object_class = G_OBJECT_CLASS (klass); + + g_type_class_add_private (klass, sizeof (GESTimelinePrivate)); + + object_class->get_property = ges_timeline_get_property; + object_class->set_property = ges_timeline_set_property; + object_class->dispose = ges_timeline_dispose; + object_class->finalize = ges_timeline_finalize; +} + +static void +ges_timeline_init (GESTimeline *self) +{ + self->layers = NULL; + self->tracks = NULL; +} + +GESTimeline* +ges_timeline_new (void) +{ + return g_object_new (GES_TYPE_TIMELINE, NULL); +} + +GESTimeline* +ges_timeline_load_from_uri (gchar *uri) +{ + /* FIXME : IMPLEMENT */ + return NULL; +} + +gboolean +ges_timeline_save (GESTimeline *timeline, gchar *uri) +{ + /* FIXME : IMPLEMENT */ + return FALSE; +} + +gboolean +ges_timeline_add_layer (GESTimeline *timeline, GESTimelineLayer *layer) +{ + /* FIXME : IMPLEMENT */ + + /* Add to the list of layers, make sure we don't already control it */ + + /* Assign Tracks to it */ + + return FALSE; +} + +gboolean +ges_timeline_remove_layer (GESTimeline *timeline, GESTimelineLayer *layer) +{ + /* FIXME : IMPLEMENT */ + + /* Unassign tracks from the given layer */ + return FALSE; +} + +gboolean +ges_timeline_add_track (GESTimeline *timeline, GESTrack *track) +{ + /* FIXME : IMPLEMENT */ + + /* Add to the list of tracks, make sure we don't already control it */ + + + return FALSE; +} +gboolean +ges_timeline_remove_track (GESTimeline *timeline, GESTrack *track) +{ + /* FIXME : IMPLEMENT */ + + /* Signal track removal to all layers/objects */ + + /* */ +} diff --git a/src/ges-timeline.h b/src/ges-timeline.h new file mode 100644 index 00000000..55beddd3 --- /dev/null +++ b/src/ges-timeline.h @@ -0,0 +1,74 @@ +/* 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 +#define _GES_TIMELINE + +#include <glib-object.h> +#include <gst/gst.h> + +G_BEGIN_DECLS + +#define GES_TYPE_TIMELINE ges_timeline_get_type() + +#define GES_TIMELINE(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST ((obj), GES_TYPE_TIMELINE, GESTimeline)) + +#define GES_TIMELINE_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST ((klass), GES_TYPE_TIMELINE, GESTimelineClass)) + +#define GES_IS_TIMELINE(obj) \ + (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GES_TYPE_TIMELINE)) + +#define GES_IS_TIMELINE_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_TYPE ((klass), GES_TYPE_TIMELINE)) + +#define GES_TIMELINE_GET_CLASS(obj) \ + (G_TYPE_INSTANCE_GET_CLASS ((obj), GES_TYPE_TIMELINE, GESTimelineClass)) + +typedef struct { + GstBin parent; + + GList *layers; /* TimelineLayer(s) ordered by priority */ + GList *tracks; /* TimelineTrack(s) */ +} GESTimeline; + +typedef struct { + GstBinClass parent_class; +} GESTimelineClass; + +GType ges_timeline_get_type (void); + +GESTimeline* ges_timeline_new (void); + + +GESTimeline* ges_timeline_load_from_uri (gchar *uri); + +gboolean ges_timeline_save (GESTimeline *timeline, gchar *uri); + +gboolean ges_timeline_add_layer (GESTimeline *timeline, GESTimelineLayer *layer); +gboolean ges_timeline_remove_layer (GESTimeline *timeline, GESTimelineLayer *layer); + +gboolean ges_timeline_add_track (GESTimeline *timeline, GESTrack *track); +gboolean ges_timeline_remove_track (GESTimeline *timeline, GESTrack *track); + +G_END_DECLS + +#endif /* _GES_TIMELINE */ + diff --git a/src/ges-track.c b/src/ges-track.c new file mode 100644 index 00000000..22905596 --- /dev/null +++ b/src/ges-track.c @@ -0,0 +1,96 @@ +/* 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. + */ + +#include "ges-track.h" + +/** + * GESTrack + * + * Corresponds to one output format (i.e. audio OR video) + * + * Contains the compatible TrackObject(s) + */ + +G_DEFINE_TYPE (GESTrack, ges_track, GST_TYPE_BIN) + +#define GET_PRIVATE(o) \ + (G_TYPE_INSTANCE_GET_PRIVATE ((o), GES_TYPE_TRACK, GESTrackPrivate)) + +typedef struct _GESTrackPrivate GESTrackPrivate; + +struct _GESTrackPrivate { + int dummy; +}; + +static void +ges_track_get_property (GObject *object, guint property_id, + GValue *value, GParamSpec *pspec) +{ + switch (property_id) { + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); + } +} + +static void +ges_track_set_property (GObject *object, guint property_id, + const GValue *value, GParamSpec *pspec) +{ + switch (property_id) { + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); + } +} + +static void +ges_track_dispose (GObject *object) +{ + G_OBJECT_CLASS (ges_track_parent_class)->dispose (object); +} + +static void +ges_track_finalize (GObject *object) +{ + G_OBJECT_CLASS (ges_track_parent_class)->finalize (object); +} + +static void +ges_track_class_init (GESTrackClass *klass) +{ + GObjectClass *object_class = G_OBJECT_CLASS (klass); + + g_type_class_add_private (klass, sizeof (GESTrackPrivate)); + + object_class->get_property = ges_track_get_property; + object_class->set_property = ges_track_set_property; + object_class->dispose = ges_track_dispose; + object_class->finalize = ges_track_finalize; +} + +static void +ges_track_init (GESTrack *self) +{ +} + +GESTrack* +ges_track_new (void) +{ + return g_object_new (GES_TYPE_TRACK, NULL); +} + diff --git a/src/ges-track.h b/src/ges-track.h new file mode 100644 index 00000000..b3baeea2 --- /dev/null +++ b/src/ges-track.h @@ -0,0 +1,61 @@ +/* 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_TRACK +#define _GES_TRACK + +#include <glib-object.h> + +G_BEGIN_DECLS + +#define GES_TYPE_TRACK ges_track_get_type() + +#define GES_TRACK(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST ((obj), GES_TYPE_TRACK, GESTrack)) + +#define GES_TRACK_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_CAST ((klass), GES_TYPE_TRACK, GESTrackClass)) + +#define GES_IS_TRACK(obj) \ + (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GES_TYPE_TRACK)) + +#define GES_IS_TRACK_CLASS(klass) \ + (G_TYPE_CHECK_CLASS_TYPE ((klass), GES_TYPE_TRACK)) + +#define GES_TRACK_GET_CLASS(obj) \ + (G_TYPE_INSTANCE_GET_CLASS ((obj), GES_TYPE_TRACK, GESTrackClass)) + +typedef struct { + GstBin parent; +} GESTrack; + +typedef struct { + GstBinClass parent_class; +} GESTrackClass; + +GType ges_track_get_type (void); + +GESTrack* ges_track_new (void); + +gboolean ges_track_add_object (GESTrack *track, GESTrackObject * object); + +G_END_DECLS + +#endif /* _GES_TRACK */ + |