mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 19:51:11 +00:00
GESTimelineOperation: New abstract class for operations
This is a new class for all timeline objects that both produce and consume data. The existing subclasses of it are now: * GESTimelineOverlay * GESTimelineTransition
This commit is contained in:
parent
f352404159
commit
d8b2781ddc
12 changed files with 167 additions and 11 deletions
|
@ -38,6 +38,7 @@ platform as well as Windows. It is released under the GNU Library General Public
|
||||||
<xi:include href="xml/ges-timeline-layer.xml"/>
|
<xi:include href="xml/ges-timeline-layer.xml"/>
|
||||||
<xi:include href="xml/ges-timeline-object.xml"/>
|
<xi:include href="xml/ges-timeline-object.xml"/>
|
||||||
<xi:include href="xml/ges-timeline-source.xml"/>
|
<xi:include href="xml/ges-timeline-source.xml"/>
|
||||||
|
<xi:include href="xml/ges-timeline-operation.xml"/>
|
||||||
<xi:include href="xml/ges-timeline-overlay.xml"/>
|
<xi:include href="xml/ges-timeline-overlay.xml"/>
|
||||||
<xi:include href="xml/ges-track.xml"/>
|
<xi:include href="xml/ges-track.xml"/>
|
||||||
<xi:include href="xml/ges-track-object.xml"/>
|
<xi:include href="xml/ges-track-object.xml"/>
|
||||||
|
|
|
@ -353,6 +353,22 @@ GES_TIMELINE_FILE_SOURCE_GET_CLASS
|
||||||
GES_TYPE_TIMELINE_FILE_SOURCE
|
GES_TYPE_TIMELINE_FILE_SOURCE
|
||||||
</SECTION>
|
</SECTION>
|
||||||
|
|
||||||
|
<SECTION>
|
||||||
|
<FILE>ges-timeline-operation</FILE>
|
||||||
|
<TITLE>GESTimelineOperation</TITLE>
|
||||||
|
GESTimelineOperation
|
||||||
|
<SUBSECTION Standard>
|
||||||
|
GESTimelineOperationClass
|
||||||
|
GESTimelineOperationPrivate
|
||||||
|
GES_TIMELINE_OPERATION
|
||||||
|
GES_IS_TIMELINE_OPERATION
|
||||||
|
GES_TYPE_TIMELINE_OPERATION
|
||||||
|
ges_timeline_operation_get_type
|
||||||
|
GES_TIMELINE_OPERATION_CLASS
|
||||||
|
GES_IS_TIMELINE_OPERATION_CLASS
|
||||||
|
GES_TIMELINE_OPERATION_GET_CLASS
|
||||||
|
</SECTION>
|
||||||
|
|
||||||
<SECTION>
|
<SECTION>
|
||||||
<FILE>ges-timeline-overlay</FILE>
|
<FILE>ges-timeline-overlay</FILE>
|
||||||
<TITLE>GESTimelineOverlay</TITLE>
|
<TITLE>GESTimelineOverlay</TITLE>
|
||||||
|
|
|
@ -10,6 +10,7 @@ ges_text_valign_get_type
|
||||||
ges_timeline_get_type
|
ges_timeline_get_type
|
||||||
ges_timeline_layer_get_type
|
ges_timeline_layer_get_type
|
||||||
ges_timeline_object_get_type
|
ges_timeline_object_get_type
|
||||||
|
ges_timeline_operation_get_type
|
||||||
ges_timeline_overlay_get_type
|
ges_timeline_overlay_get_type
|
||||||
ges_timeline_pipeline_get_type
|
ges_timeline_pipeline_get_type
|
||||||
ges_timeline_source_get_type
|
ges_timeline_source_get_type
|
||||||
|
|
|
@ -19,6 +19,7 @@ libges_@GST_MAJORMINOR@_la_SOURCES = \
|
||||||
ges-timeline-pipeline.c \
|
ges-timeline-pipeline.c \
|
||||||
ges-timeline-source.c \
|
ges-timeline-source.c \
|
||||||
ges-timeline-file-source.c \
|
ges-timeline-file-source.c \
|
||||||
|
ges-timeline-operation.c \
|
||||||
ges-timeline-transition.c \
|
ges-timeline-transition.c \
|
||||||
ges-timeline-test-source.c \
|
ges-timeline-test-source.c \
|
||||||
ges-timeline-title-source.c \
|
ges-timeline-title-source.c \
|
||||||
|
@ -57,6 +58,7 @@ libges_@GST_MAJORMINOR@include_HEADERS = \
|
||||||
ges-timeline-pipeline.h \
|
ges-timeline-pipeline.h \
|
||||||
ges-timeline-source.h \
|
ges-timeline-source.h \
|
||||||
ges-timeline-file-source.h \
|
ges-timeline-file-source.h \
|
||||||
|
ges-timeline-operation.h \
|
||||||
ges-timeline-transition.h \
|
ges-timeline-transition.h \
|
||||||
ges-timeline-test-source.h \
|
ges-timeline-test-source.h \
|
||||||
ges-timeline-title-source.h \
|
ges-timeline-title-source.h \
|
||||||
|
|
51
ges/ges-timeline-operation.c
Normal file
51
ges/ges-timeline-operation.c
Normal file
|
@ -0,0 +1,51 @@
|
||||||
|
/* GStreamer Editing Services
|
||||||
|
* Copyright (C) 2009 Edward Hervey <edward.hervey@collabora.co.uk>
|
||||||
|
* 2009 Nokia Corporation
|
||||||
|
*
|
||||||
|
* 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* SECTION:ges-timeline-operation
|
||||||
|
* @short_description: Base Class for operations in a #GESTimelineLayer
|
||||||
|
*
|
||||||
|
* Operations are any kind of object that both outputs AND consumes data.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "ges.h"
|
||||||
|
#include "ges-internal.h"
|
||||||
|
#include "ges-timeline-operation.h"
|
||||||
|
|
||||||
|
G_DEFINE_ABSTRACT_TYPE (GESTimelineOperation, ges_timeline_operation,
|
||||||
|
GES_TYPE_TIMELINE_OBJECT);
|
||||||
|
|
||||||
|
struct _GESTimelineOperationPrivate
|
||||||
|
{
|
||||||
|
void *nada;
|
||||||
|
};
|
||||||
|
|
||||||
|
static void
|
||||||
|
ges_timeline_operation_class_init (GESTimelineOperationClass * klass)
|
||||||
|
{
|
||||||
|
g_type_class_add_private (klass, sizeof (GESTimelineOperationPrivate));
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
ges_timeline_operation_init (GESTimelineOperation * self)
|
||||||
|
{
|
||||||
|
self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
|
||||||
|
GES_TYPE_TIMELINE_OPERATION, GESTimelineOperationPrivate);
|
||||||
|
}
|
82
ges/ges-timeline-operation.h
Normal file
82
ges/ges-timeline-operation.h
Normal file
|
@ -0,0 +1,82 @@
|
||||||
|
/* GStreamer Editing Services
|
||||||
|
* Copyright (C) 2010 Edward Hervey <edward.hervey@collabora.co.uk>
|
||||||
|
* 2010 Nokia Corporation
|
||||||
|
*
|
||||||
|
* 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_OPERATION
|
||||||
|
#define _GES_TIMELINE_OPERATION
|
||||||
|
|
||||||
|
#include <glib-object.h>
|
||||||
|
#include <gst/gst.h>
|
||||||
|
#include <ges/ges-types.h>
|
||||||
|
#include <ges/ges-timeline-object.h>
|
||||||
|
|
||||||
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
|
#define GES_TYPE_TIMELINE_OPERATION ges_timeline_operation_get_type()
|
||||||
|
|
||||||
|
#define GES_TIMELINE_OPERATION(obj) \
|
||||||
|
(G_TYPE_CHECK_INSTANCE_CAST ((obj), GES_TYPE_TIMELINE_OPERATION, GESTimelineOperation))
|
||||||
|
|
||||||
|
#define GES_TIMELINE_OPERATION_CLASS(klass) \
|
||||||
|
(G_TYPE_CHECK_CLASS_CAST ((klass), GES_TYPE_TIMELINE_OPERATION, GESTimelineOperationClass))
|
||||||
|
|
||||||
|
#define GES_IS_TIMELINE_OPERATION(obj) \
|
||||||
|
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), GES_TYPE_TIMELINE_OPERATION))
|
||||||
|
|
||||||
|
#define GES_IS_TIMELINE_OPERATION_CLASS(klass) \
|
||||||
|
(G_TYPE_CHECK_CLASS_TYPE ((klass), GES_TYPE_TIMELINE_OPERATION))
|
||||||
|
|
||||||
|
#define GES_TIMELINE_OPERATION_GET_CLASS(obj) \
|
||||||
|
(G_TYPE_INSTANCE_GET_CLASS ((obj), GES_TYPE_TIMELINE_OPERATION, GESTimelineOperationClass))
|
||||||
|
|
||||||
|
typedef struct _GESTimelineOperationPrivate GESTimelineOperationPrivate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* GESTimelineOperation:
|
||||||
|
*
|
||||||
|
* The GESTimelineOperation subclass. Subclasses can access these fields.
|
||||||
|
*/
|
||||||
|
struct _GESTimelineOperation {
|
||||||
|
/*< private >*/
|
||||||
|
GESTimelineObject parent;
|
||||||
|
|
||||||
|
GESTimelineOperationPrivate *priv;
|
||||||
|
|
||||||
|
/* Padding for API extension */
|
||||||
|
gpointer _ges_reserved[GES_PADDING];
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* GESTimelineOperationClass:
|
||||||
|
*/
|
||||||
|
struct _GESTimelineOperationClass {
|
||||||
|
/*< private >*/
|
||||||
|
GESTimelineObjectClass parent_class;
|
||||||
|
|
||||||
|
/*< private >*/
|
||||||
|
/* Padding for API extension */
|
||||||
|
gpointer _ges_reserved[GES_PADDING];
|
||||||
|
};
|
||||||
|
|
||||||
|
GType ges_timeline_operation_get_type (void);
|
||||||
|
|
||||||
|
G_END_DECLS
|
||||||
|
|
||||||
|
#endif /* _GES_TIMELINE_OPERATION */
|
||||||
|
|
|
@ -31,11 +31,11 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "ges-internal.h"
|
#include "ges-internal.h"
|
||||||
#include "ges-timeline-object.h"
|
#include "ges-timeline-operation.h"
|
||||||
#include "ges-timeline-overlay.h"
|
#include "ges-timeline-overlay.h"
|
||||||
|
|
||||||
G_DEFINE_TYPE (GESTimelineOverlay, ges_timeline_overlay,
|
G_DEFINE_ABSTRACT_TYPE (GESTimelineOverlay, ges_timeline_overlay,
|
||||||
GES_TYPE_TIMELINE_OBJECT);
|
GES_TYPE_TIMELINE_OPERATION);
|
||||||
|
|
||||||
struct _GESTimelineOverlayPrivate
|
struct _GESTimelineOverlayPrivate
|
||||||
{
|
{
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
|
|
||||||
#include <glib-object.h>
|
#include <glib-object.h>
|
||||||
#include <ges/ges-types.h>
|
#include <ges/ges-types.h>
|
||||||
#include <ges/ges-timeline-object.h>
|
#include <ges/ges-timeline-operation.h>
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
|
@ -52,8 +52,7 @@ typedef struct _GESTimelineOverlayPrivate GESTimelineOverlayPrivate;
|
||||||
|
|
||||||
struct _GESTimelineOverlay {
|
struct _GESTimelineOverlay {
|
||||||
/*< private >*/
|
/*< private >*/
|
||||||
|
GESTimelineOperation parent;
|
||||||
GESTimelineObject parent;
|
|
||||||
|
|
||||||
GESTimelineOverlayPrivate *priv;
|
GESTimelineOverlayPrivate *priv;
|
||||||
|
|
||||||
|
@ -67,7 +66,7 @@ struct _GESTimelineOverlay {
|
||||||
*/
|
*/
|
||||||
|
|
||||||
struct _GESTimelineOverlayClass {
|
struct _GESTimelineOverlayClass {
|
||||||
GESTimelineObjectClass parent_class;
|
GESTimelineOperationClass parent_class;
|
||||||
|
|
||||||
/*< private >*/
|
/*< private >*/
|
||||||
/* Padding for API extension */
|
/* Padding for API extension */
|
||||||
|
|
|
@ -54,7 +54,7 @@ enum
|
||||||
};
|
};
|
||||||
|
|
||||||
G_DEFINE_TYPE (GESTimelineTransition, ges_timeline_transition,
|
G_DEFINE_TYPE (GESTimelineTransition, ges_timeline_transition,
|
||||||
GES_TYPE_TIMELINE_OBJECT);
|
GES_TYPE_TIMELINE_OPERATION);
|
||||||
|
|
||||||
static GESTrackObject *ges_tl_transition_create_track_object (GESTimelineObject
|
static GESTrackObject *ges_tl_transition_create_track_object (GESTimelineObject
|
||||||
* self, GESTrack * track);
|
* self, GESTrack * track);
|
||||||
|
|
|
@ -52,7 +52,7 @@ typedef struct _GESTimelineTransitionPrivate GESTimelineTransitionPrivate;
|
||||||
*/
|
*/
|
||||||
struct _GESTimelineTransition {
|
struct _GESTimelineTransition {
|
||||||
/*< private >*/
|
/*< private >*/
|
||||||
GESTimelineObject parent;
|
GESTimelineOperation parent;
|
||||||
|
|
||||||
/*< public >*/
|
/*< public >*/
|
||||||
GESVideoTransitionType vtype;
|
GESVideoTransitionType vtype;
|
||||||
|
@ -71,7 +71,7 @@ struct _GESTimelineTransition {
|
||||||
|
|
||||||
struct _GESTimelineTransitionClass {
|
struct _GESTimelineTransitionClass {
|
||||||
/*< private >*/
|
/*< private >*/
|
||||||
GESTimelineObjectClass parent_class;
|
GESTimelineOperationClass parent_class;
|
||||||
|
|
||||||
/* Padding for API extension */
|
/* Padding for API extension */
|
||||||
gpointer _ges_reserved[GES_PADDING];
|
gpointer _ges_reserved[GES_PADDING];
|
||||||
|
|
|
@ -41,6 +41,9 @@ typedef struct _GESTimelineLayerClass GESTimelineLayerClass;
|
||||||
typedef struct _GESTimelineObject GESTimelineObject;
|
typedef struct _GESTimelineObject GESTimelineObject;
|
||||||
typedef struct _GESTimelineObjectClass GESTimelineObjectClass;
|
typedef struct _GESTimelineObjectClass GESTimelineObjectClass;
|
||||||
|
|
||||||
|
typedef struct _GESTimelineOperation GESTimelineOperation;
|
||||||
|
typedef struct _GESTimelineOperationClass GESTimelineOperationClass;
|
||||||
|
|
||||||
typedef struct _GESTimelinePipeline GESTimelinePipeline;
|
typedef struct _GESTimelinePipeline GESTimelinePipeline;
|
||||||
typedef struct _GESTimelinePipelineClass GESTimelinePipelineClass;
|
typedef struct _GESTimelinePipelineClass GESTimelinePipelineClass;
|
||||||
|
|
||||||
|
|
|
@ -33,11 +33,12 @@
|
||||||
#include <ges/ges-timeline-object.h>
|
#include <ges/ges-timeline-object.h>
|
||||||
#include <ges/ges-timeline-pipeline.h>
|
#include <ges/ges-timeline-pipeline.h>
|
||||||
#include <ges/ges-timeline-source.h>
|
#include <ges/ges-timeline-source.h>
|
||||||
#include <ges/ges-timeline-transition.h>
|
|
||||||
#include <ges/ges-timeline-test-source.h>
|
#include <ges/ges-timeline-test-source.h>
|
||||||
#include <ges/ges-timeline-title-source.h>
|
#include <ges/ges-timeline-title-source.h>
|
||||||
|
#include <ges/ges-timeline-operation.h>
|
||||||
#include <ges/ges-timeline-overlay.h>
|
#include <ges/ges-timeline-overlay.h>
|
||||||
#include <ges/ges-timeline-text-overlay.h>
|
#include <ges/ges-timeline-text-overlay.h>
|
||||||
|
#include <ges/ges-timeline-transition.h>
|
||||||
#include <ges/ges-track.h>
|
#include <ges/ges-track.h>
|
||||||
#include <ges/ges-track-object.h>
|
#include <ges/ges-track-object.h>
|
||||||
#include <ges/ges-track-source.h>
|
#include <ges/ges-track-source.h>
|
||||||
|
|
Loading…
Reference in a new issue