mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-16 13:26:36 +00:00
build fixed again. Moved type declarations in a standalone file.
This commit is contained in:
parent
081f4805ef
commit
f3131a2f6a
17 changed files with 251 additions and 207 deletions
|
@ -1,8 +1,8 @@
|
||||||
DISTCHECK_CONFIGURE_FLAGS=--enable-gtk-doc
|
DISTCHECK_CONFIGURE_FLAGS=--enable-gtk-doc
|
||||||
|
|
||||||
SUBDIRS = src
|
SUBDIRS = ges
|
||||||
|
|
||||||
DIST_SUBDIRS = src
|
DIST_SUBDIRS = ges
|
||||||
|
|
||||||
# include before EXTRA_DIST for win32 assignment
|
# include before EXTRA_DIST for win32 assignment
|
||||||
include $(top_srcdir)/common/win32.mak
|
include $(top_srcdir)/common/win32.mak
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
|
|
||||||
DIE=0
|
DIE=0
|
||||||
package=gst-editing-services
|
package=gst-editing-services
|
||||||
srcfile=src/ges-timeline.c
|
srcfile=ges/ges-timeline.c
|
||||||
|
|
||||||
# Make sure we have common
|
# Make sure we have common
|
||||||
if test ! -f common/gst-autogen.sh;
|
if test ! -f common/gst-autogen.sh;
|
||||||
|
|
|
@ -19,7 +19,7 @@ dnl check if this is a release version
|
||||||
AS_NANO(GST_CVS="no", GST_CVS="yes")
|
AS_NANO(GST_CVS="no", GST_CVS="yes")
|
||||||
|
|
||||||
dnl can autoconf find the source ?
|
dnl can autoconf find the source ?
|
||||||
AC_CONFIG_SRCDIR([src/ges-timeline.c])
|
AC_CONFIG_SRCDIR([ges/ges-timeline.c])
|
||||||
|
|
||||||
dnl define the output header for config
|
dnl define the output header for config
|
||||||
AM_CONFIG_HEADER([config.h])
|
AM_CONFIG_HEADER([config.h])
|
||||||
|
@ -239,6 +239,6 @@ common/shave-libtool
|
||||||
common/m4/Makefile
|
common/m4/Makefile
|
||||||
gst-editing-services.spec
|
gst-editing-services.spec
|
||||||
m4/Makefile
|
m4/Makefile
|
||||||
src/Makefile
|
ges/Makefile
|
||||||
)
|
)
|
||||||
AC_OUTPUT
|
AC_OUTPUT
|
||||||
|
|
|
@ -17,6 +17,7 @@ libges_@GST_MAJORMINOR@_la_SOURCES = \
|
||||||
|
|
||||||
libges_@GST_MAJORMINOR@includedir = $(includedir)/gstreamer-@GST_MAJORMINOR@/ges/
|
libges_@GST_MAJORMINOR@includedir = $(includedir)/gstreamer-@GST_MAJORMINOR@/ges/
|
||||||
libges_@GST_MAJORMINOR@include_HEADERS = \
|
libges_@GST_MAJORMINOR@include_HEADERS = \
|
||||||
|
ges-types.h \
|
||||||
ges.h \
|
ges.h \
|
||||||
ges-simple-timeline-layer.h \
|
ges-simple-timeline-layer.h \
|
||||||
ges-timeline.h \
|
ges-timeline.h \
|
||||||
|
|
|
@ -21,7 +21,8 @@
|
||||||
#define _GES_SIMPLE_TIMELINE_LAYER
|
#define _GES_SIMPLE_TIMELINE_LAYER
|
||||||
|
|
||||||
#include <glib-object.h>
|
#include <glib-object.h>
|
||||||
#include "ges-timeline-layer.h"
|
#include <ges/ges-types.h>
|
||||||
|
#include <ges/ges-timeline-layer.h>
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
|
@ -42,9 +43,6 @@ G_BEGIN_DECLS
|
||||||
#define GES_SIMPLE_TIMELINE_LAYER_GET_CLASS(obj) \
|
#define GES_SIMPLE_TIMELINE_LAYER_GET_CLASS(obj) \
|
||||||
(G_TYPE_INSTANCE_GET_CLASS ((obj), GES_TYPE_SIMPLE_TIMELINE_LAYER, GESSimpleTimelineLayerClass))
|
(G_TYPE_INSTANCE_GET_CLASS ((obj), GES_TYPE_SIMPLE_TIMELINE_LAYER, GESSimpleTimelineLayerClass))
|
||||||
|
|
||||||
typedef struct _GESSimpleTimelineLayer GESSimpleTimelineLayer;
|
|
||||||
typedef struct _GESSimpleTimelineLayerClass GESSimpleTimelineLayerClass;
|
|
||||||
|
|
||||||
struct _GESSimpleTimelineLayer {
|
struct _GESSimpleTimelineLayer {
|
||||||
GESTimelineLayer parent;
|
GESTimelineLayer parent;
|
||||||
};
|
};
|
||||||
|
@ -58,9 +56,16 @@ GType ges_simple_timeline_layer_get_type (void);
|
||||||
GESSimpleTimelineLayer* ges_simple_timeline_layer_new (void);
|
GESSimpleTimelineLayer* ges_simple_timeline_layer_new (void);
|
||||||
|
|
||||||
gboolean
|
gboolean
|
||||||
ges_simple_timeline_layer_add_object (GESSimpleTimelineLayer *layer, GESTimelineObject *object, gint position);
|
ges_simple_timeline_layer_add_object (GESSimpleTimelineLayer *layer,
|
||||||
ges_simple_timeline_layer_remove_object (GESSimpleTimelineLayer *layer, GESTimelineObject *object);
|
GESTimelineObject *object, gint position);
|
||||||
ges_simple_timeline_layer_move_object (GESSimpleTimelineLayer *layer, GESTimelineObject, gint newposition);
|
|
||||||
|
gboolean
|
||||||
|
ges_simple_timeline_layer_remove_object (GESSimpleTimelineLayer *layer,
|
||||||
|
GESTimelineObject *object);
|
||||||
|
|
||||||
|
gboolean
|
||||||
|
ges_simple_timeline_layer_move_object (GESSimpleTimelineLayer *layer,
|
||||||
|
GESTimelineObject, gint newposition);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
#define _GES_TIMELINE_LAYER
|
#define _GES_TIMELINE_LAYER
|
||||||
|
|
||||||
#include <glib-object.h>
|
#include <glib-object.h>
|
||||||
|
#include <ges/ges-types.h>
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
|
@ -41,9 +42,6 @@ G_BEGIN_DECLS
|
||||||
#define GES_TIMELINE_LAYER_GET_CLASS(obj) \
|
#define GES_TIMELINE_LAYER_GET_CLASS(obj) \
|
||||||
(G_TYPE_INSTANCE_GET_CLASS ((obj), GES_TYPE_TIMELINE_LAYER, GESTimelineLayerClass))
|
(G_TYPE_INSTANCE_GET_CLASS ((obj), GES_TYPE_TIMELINE_LAYER, GESTimelineLayerClass))
|
||||||
|
|
||||||
typedef struct _GESTimelineLayer GESTimelineLayer;
|
|
||||||
typedef struct _GESTimelineLayerClass GESTimelineLayerClass;
|
|
||||||
|
|
||||||
struct _GESTimelineLayer {
|
struct _GESTimelineLayer {
|
||||||
GObject parent;
|
GObject parent;
|
||||||
};
|
};
|
||||||
|
|
|
@ -28,18 +28,20 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
G_DEFINE_TYPE (GESTimelineObject, ges_timeline_object, G_TYPE_OBJECT)
|
G_DEFINE_TYPE (GESTimelineObject, ges_timeline_object, G_TYPE_OBJECT);
|
||||||
|
|
||||||
#define GET_PRIVATE(o) \
|
#define GET_PRIVATE(o) \
|
||||||
(G_TYPE_INSTANCE_GET_PRIVATE ((o), GES_TYPE_TIMELINE_OBJECT, GESTimelineObjectPrivate))
|
(G_TYPE_INSTANCE_GET_PRIVATE ((o), GES_TYPE_TIMELINE_OBJECT, GESTimelineObjectPrivate));
|
||||||
typedef struct _GESTimelineObjectPrivate GESTimelineObjectPrivate;
|
|
||||||
|
|
||||||
struct _GESTimelineObjectPrivate
|
typedef struct _GESTimelineObjectPrivate GESTimelineObjectPrivate;
|
||||||
{
|
|
||||||
int dummy;
|
|
||||||
};
|
|
||||||
|
|
||||||
static void
|
struct _GESTimelineObjectPrivate
|
||||||
ges_timeline_object_get_property (GObject * object, guint property_id,
|
{
|
||||||
|
int dummy;
|
||||||
|
};
|
||||||
|
|
||||||
|
static void
|
||||||
|
ges_timeline_object_get_property (GObject * object, guint property_id,
|
||||||
GValue * value, GParamSpec * pspec)
|
GValue * value, GParamSpec * pspec)
|
||||||
{
|
{
|
||||||
switch (property_id) {
|
switch (property_id) {
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
#define _GES_TIMELINE_OBJECT
|
#define _GES_TIMELINE_OBJECT
|
||||||
|
|
||||||
#include <glib-object.h>
|
#include <glib-object.h>
|
||||||
|
#include <ges/ges-types.h>
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
|
@ -41,9 +42,6 @@ G_BEGIN_DECLS
|
||||||
#define GES_TIMELINE_OBJECT_GET_CLASS(obj) \
|
#define GES_TIMELINE_OBJECT_GET_CLASS(obj) \
|
||||||
(G_TYPE_INSTANCE_GET_CLASS ((obj), GES_TYPE_TIMELINE_OBJECT, GESTimelineObjectClass))
|
(G_TYPE_INSTANCE_GET_CLASS ((obj), GES_TYPE_TIMELINE_OBJECT, GESTimelineObjectClass))
|
||||||
|
|
||||||
typedef struct _GESTimelineObject GESTimelineObject;
|
|
||||||
typedef struct _GESTimelineObjectClass GESTimelineObjectClass;
|
|
||||||
|
|
||||||
struct _GESTimelineObject {
|
struct _GESTimelineObject {
|
||||||
GObject parent;
|
GObject parent;
|
||||||
|
|
||||||
|
@ -62,10 +60,12 @@ struct _GESTimelineObjectClass {
|
||||||
|
|
||||||
GType ges_timeline_object_get_type (void);
|
GType ges_timeline_object_get_type (void);
|
||||||
|
|
||||||
GESTimelineObject* ges_timeline_object_new (void);
|
GESTimelineObject*
|
||||||
|
ges_timeline_object_new (void);
|
||||||
|
|
||||||
GESTrackObject * ges_timeline_object_create_track_object (GESTimelineObject * object,
|
GESTrackObject *
|
||||||
GESTrack * track);
|
ges_timeline_object_create_track_object (GESTimelineObject * object,
|
||||||
|
GESTrack * track);
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
#define _GES_TIMELINE_PIPELINE
|
#define _GES_TIMELINE_PIPELINE
|
||||||
|
|
||||||
#include <glib-object.h>
|
#include <glib-object.h>
|
||||||
#include <gst/gst.h>
|
#include <ges/ges.h>
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
|
@ -42,9 +42,6 @@ G_BEGIN_DECLS
|
||||||
#define GEST_TIMELINE_PIPELINE_GET_CLASS(obj) \
|
#define GEST_TIMELINE_PIPELINE_GET_CLASS(obj) \
|
||||||
(G_TYPE_INSTANCE_GET_CLASS ((obj), GEST_TYPE_TIMELINE_PIPELINE, GESTimelinePipelineClass))
|
(G_TYPE_INSTANCE_GET_CLASS ((obj), GEST_TYPE_TIMELINE_PIPELINE, GESTimelinePipelineClass))
|
||||||
|
|
||||||
typedef struct _GESTimelinePipeline GESTimelinePipeline;
|
|
||||||
typedef struct _GESTimelinePipelineClass GESTimelinePipelineClass;
|
|
||||||
|
|
||||||
struct _GESTimelinePipeline {
|
struct _GESTimelinePipeline {
|
||||||
GstPipeline parent;
|
GstPipeline parent;
|
||||||
};
|
};
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
#define _GES_TIMELINE_SOURCE
|
#define _GES_TIMELINE_SOURCE
|
||||||
|
|
||||||
#include <glib-object.h>
|
#include <glib-object.h>
|
||||||
#include <ges-timeline-object.h>
|
#include <ges/ges.h>
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
|
@ -42,9 +42,6 @@ G_BEGIN_DECLS
|
||||||
#define GES_TIMELINE_SOURCE_GET_CLASS(obj) \
|
#define GES_TIMELINE_SOURCE_GET_CLASS(obj) \
|
||||||
(G_TYPE_INSTANCE_GET_CLASS ((obj), GES_TYPE_TIMELINE_SOURCE, GESTimelineSourceClass))
|
(G_TYPE_INSTANCE_GET_CLASS ((obj), GES_TYPE_TIMELINE_SOURCE, GESTimelineSourceClass))
|
||||||
|
|
||||||
typedef struct _GESTimelineSource GESTimelineSource;
|
|
||||||
typedef struct _GESTimelineSourceClass GESTimelineSourceClass;
|
|
||||||
|
|
||||||
struct _GESTimelineSource {
|
struct _GESTimelineSource {
|
||||||
GESTimelineObject parent;
|
GESTimelineObject parent;
|
||||||
};
|
};
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
#define _GES_TIMELINE_TRANSITION
|
#define _GES_TIMELINE_TRANSITION
|
||||||
|
|
||||||
#include <glib-object.h>
|
#include <glib-object.h>
|
||||||
#include <ges-timeline-object.h>
|
#include <ges/ges.h>
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
|
@ -42,9 +42,6 @@ G_BEGIN_DECLS
|
||||||
#define GES_TIMELINE_TRANSITION_GET_CLASS(obj) \
|
#define GES_TIMELINE_TRANSITION_GET_CLASS(obj) \
|
||||||
(G_TYPE_INSTANCE_GET_CLASS ((obj), GES_TYPE_TIMELINE_TRANSITION, GESTimelineTransitionClass))
|
(G_TYPE_INSTANCE_GET_CLASS ((obj), GES_TYPE_TIMELINE_TRANSITION, GESTimelineTransitionClass))
|
||||||
|
|
||||||
typedef struct _GESTimelineTransition GESTimelineTransition;
|
|
||||||
typedef struct _GESTimelineTransitionClass GESTimelineTransitionClass;
|
|
||||||
|
|
||||||
struct _GESTimelineTransition {
|
struct _GESTimelineTransition {
|
||||||
GESTimelineObject parent;
|
GESTimelineObject parent;
|
||||||
};
|
};
|
||||||
|
|
|
@ -22,8 +22,7 @@
|
||||||
|
|
||||||
#include <glib-object.h>
|
#include <glib-object.h>
|
||||||
#include <gst/gst.h>
|
#include <gst/gst.h>
|
||||||
#include <ges/ges-timeline-layer.h>
|
#include <ges/ges-types.h>
|
||||||
#include <ges/ges-track.h>
|
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
|
@ -44,9 +43,6 @@ G_BEGIN_DECLS
|
||||||
#define GES_TIMELINE_GET_CLASS(obj) \
|
#define GES_TIMELINE_GET_CLASS(obj) \
|
||||||
(G_TYPE_INSTANCE_GET_CLASS ((obj), GES_TYPE_TIMELINE, GESTimelineClass))
|
(G_TYPE_INSTANCE_GET_CLASS ((obj), GES_TYPE_TIMELINE, GESTimelineClass))
|
||||||
|
|
||||||
typedef struct _GESTimeline GESTimeline;
|
|
||||||
typedef struct _GESTimelineClass GESTimelineClass;
|
|
||||||
|
|
||||||
struct _GESTimeline {
|
struct _GESTimeline {
|
||||||
GstBin parent;
|
GstBin parent;
|
||||||
|
|
||||||
|
|
|
@ -26,192 +26,194 @@ static GQuark _priority_quark;
|
||||||
|
|
||||||
#define _do_init \
|
#define _do_init \
|
||||||
{ \
|
{ \
|
||||||
gint i; \
|
|
||||||
\
|
|
||||||
_start_quark = g_quark_from_static_string ("start"); \
|
_start_quark = g_quark_from_static_string ("start"); \
|
||||||
_inpoint_quark = g_quark_from_static_string ("inpoint"); \
|
_inpoint_quark = g_quark_from_static_string ("inpoint"); \
|
||||||
_duration_quark = g_quark_from_static_string ("duration"); \
|
_duration_quark = g_quark_from_static_string ("duration"); \
|
||||||
_priority_quark = g_quark_from_static_string ("priority"); \
|
_priority_quark = g_quark_from_static_string ("priority"); \
|
||||||
}
|
}
|
||||||
|
|
||||||
G_DEFINE_TYPE_WITH_CODE (GESTrackObject, ges_track_object, G_TYPE_OBJECT,
|
G_DEFINE_TYPE_WITH_CODE (GESTrackObject, ges_track_object, G_TYPE_OBJECT,
|
||||||
_do_init)
|
_do_init);
|
||||||
|
|
||||||
#define GET_PRIVATE(o) \
|
#define GET_PRIVATE(o) \
|
||||||
(G_TYPE_INSTANCE_GET_PRIVATE ((o), GES_TYPE_TRACK_OBJECT, GESTrackObjectPrivate))
|
(G_TYPE_INSTANCE_GET_PRIVATE ((o), GES_TYPE_TRACK_OBJECT, GESTrackObjectPrivate));
|
||||||
enum
|
|
||||||
{
|
|
||||||
PROP_0,
|
|
||||||
PROP_START,
|
|
||||||
PROP_INPOINT,
|
|
||||||
PROP_DURATION,
|
|
||||||
PROP_PRIORITY,
|
|
||||||
}
|
|
||||||
|
|
||||||
typedef struct _GESTrackObjectPrivate GESTrackObjectPrivate;
|
enum
|
||||||
|
{
|
||||||
|
PROP_0,
|
||||||
|
PROP_START,
|
||||||
|
PROP_INPOINT,
|
||||||
|
PROP_DURATION,
|
||||||
|
PROP_PRIORITY,
|
||||||
|
};
|
||||||
|
|
||||||
struct _GESTrackObjectPrivate
|
typedef struct _GESTrackObjectPrivate GESTrackObjectPrivate;
|
||||||
{
|
|
||||||
int dummy;
|
|
||||||
};
|
|
||||||
|
|
||||||
static void
|
struct _GESTrackObjectPrivate
|
||||||
ges_track_object_get_property (GObject * object, guint property_id,
|
{
|
||||||
GValue * value, GParamSpec * pspec)
|
int dummy;
|
||||||
{
|
};
|
||||||
GESTrackObject *tobj = GES_TRACK_OBJECT (object);
|
|
||||||
|
|
||||||
switch (property_id) {
|
static void
|
||||||
case PROP_START:
|
ges_track_object_get_property (GObject * object, guint property_id,
|
||||||
g_value_set_uint64 (value, tobj->start);
|
GValue * value, GParamSpec * pspec)
|
||||||
break;
|
{
|
||||||
case PROP_INPOINT:
|
GESTrackObject *tobj = GES_TRACK_OBJECT (object);
|
||||||
g_value_set_uint64 (value, tobj->inpoint);
|
|
||||||
break;
|
|
||||||
case PROP_DURATION:
|
|
||||||
g_value_set_uint64 (value, tobj->duration);
|
|
||||||
break;
|
|
||||||
case PROP_PRIORITY:
|
|
||||||
g_value_set_uint (value, tobj->priority);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
switch (property_id) {
|
||||||
ges_track_object_set_property (GObject * object, guint property_id,
|
case PROP_START:
|
||||||
const GValue * value, GParamSpec * pspec)
|
g_value_set_uint64 (value, tobj->start);
|
||||||
{
|
break;
|
||||||
GESTrackObject *tobj = GES_TRACK_OBJECT (object);
|
case PROP_INPOINT:
|
||||||
|
g_value_set_uint64 (value, tobj->inpoint);
|
||||||
|
break;
|
||||||
|
case PROP_DURATION:
|
||||||
|
g_value_set_uint64 (value, tobj->duration);
|
||||||
|
break;
|
||||||
|
case PROP_PRIORITY:
|
||||||
|
g_value_set_uint (value, tobj->priority);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
switch (property_id) {
|
static void
|
||||||
case PROP_START:
|
ges_track_object_set_property (GObject * object, guint property_id,
|
||||||
ges_track_object_set_start_internal (tobj,
|
const GValue * value, GParamSpec * pspec)
|
||||||
g_value_get_uint64 (value));
|
{
|
||||||
break;
|
GESTrackObject *tobj = GES_TRACK_OBJECT (object);
|
||||||
case PROP_INPOINT:
|
|
||||||
ges_track_object_set_inpoint_internal (tobj,
|
|
||||||
g_value_get_uint64 (value));
|
|
||||||
break;
|
|
||||||
case PROP_DURATION:
|
|
||||||
ges_track_object_set_duration_internal (tobj,
|
|
||||||
g_value_get_uint64 (value));
|
|
||||||
break;
|
|
||||||
case PROP_PRIORITY:
|
|
||||||
ges_track_object_set_priority_internal (tobj,
|
|
||||||
g_value_get_uint (value));
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static void ges_track_object_dispose (GObject * object)
|
switch (property_id) {
|
||||||
{
|
case PROP_START:
|
||||||
G_OBJECT_CLASS (ges_track_object_parent_class)->dispose (object);
|
ges_track_object_set_start_internal (tobj, g_value_get_uint64 (value));
|
||||||
}
|
break;
|
||||||
|
case PROP_INPOINT:
|
||||||
|
ges_track_object_set_inpoint_internal (tobj, g_value_get_uint64 (value));
|
||||||
|
break;
|
||||||
|
case PROP_DURATION:
|
||||||
|
ges_track_object_set_duration_internal (tobj, g_value_get_uint64 (value));
|
||||||
|
break;
|
||||||
|
case PROP_PRIORITY:
|
||||||
|
ges_track_object_set_priority_internal (tobj, g_value_get_uint (value));
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static void ges_track_object_finalize (GObject * object)
|
static void
|
||||||
{
|
ges_track_object_dispose (GObject * object)
|
||||||
G_OBJECT_CLASS (ges_track_object_parent_class)->finalize (object);
|
{
|
||||||
}
|
G_OBJECT_CLASS (ges_track_object_parent_class)->dispose (object);
|
||||||
|
}
|
||||||
|
|
||||||
static void ges_track_object_class_init (GESTrackObjectClass * klass)
|
static void
|
||||||
{
|
ges_track_object_finalize (GObject * object)
|
||||||
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
{
|
||||||
|
G_OBJECT_CLASS (ges_track_object_parent_class)->finalize (object);
|
||||||
|
}
|
||||||
|
|
||||||
g_type_class_add_private (klass, sizeof (GESTrackObjectPrivate));
|
static void
|
||||||
|
ges_track_object_class_init (GESTrackObjectClass * klass)
|
||||||
|
{
|
||||||
|
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
||||||
|
|
||||||
object_class->get_property = ges_track_object_get_property;
|
g_type_class_add_private (klass, sizeof (GESTrackObjectPrivate));
|
||||||
object_class->set_property = ges_track_object_set_property;
|
|
||||||
object_class->dispose = ges_track_object_dispose;
|
|
||||||
object_class->finalize = ges_track_object_finalize;
|
|
||||||
|
|
||||||
g_object_class_install_property (object_class, PROP_START,
|
object_class->get_property = ges_track_object_get_property;
|
||||||
g_param_spec_uint64 ("start", "Start",
|
object_class->set_property = ges_track_object_set_property;
|
||||||
"The position in the container", 0, G_MAXUINT64, 0,
|
object_class->dispose = ges_track_object_dispose;
|
||||||
G_PARAM_READWRITE));
|
object_class->finalize = ges_track_object_finalize;
|
||||||
g_object_class_install_property (object_class, PROP_INPOINT,
|
|
||||||
g_param_spec_uint64 ("inpoint", "In-point", "The in-point", 0,
|
|
||||||
G_MAXUINT64, 0, G_PARAM_READWRITE));
|
|
||||||
g_object_class_install_property (object_class, PROP_DURATION,
|
|
||||||
g_param_spec_uint64 ("duration", "Duration", "The duration to use",
|
|
||||||
0, G_MAXUINT64, 0, G_PARAM_READWRITE));
|
|
||||||
g_object_class_install_property (object_class, PROP_PRIORITY,
|
|
||||||
g_param_spec_uint ("priority", "Priority",
|
|
||||||
"The priority of the object", 0, G_MAXUINT, 0,
|
|
||||||
G_PARAM_READWRITE));
|
|
||||||
}
|
|
||||||
|
|
||||||
static void ges_track_object_init (GESTrackObject * self)
|
g_object_class_install_property (object_class, PROP_START,
|
||||||
{
|
g_param_spec_uint64 ("start", "Start",
|
||||||
}
|
"The position in the container", 0, G_MAXUINT64, 0,
|
||||||
|
G_PARAM_READWRITE));
|
||||||
|
g_object_class_install_property (object_class, PROP_INPOINT,
|
||||||
|
g_param_spec_uint64 ("inpoint", "In-point", "The in-point", 0,
|
||||||
|
G_MAXUINT64, 0, G_PARAM_READWRITE));
|
||||||
|
g_object_class_install_property (object_class, PROP_DURATION,
|
||||||
|
g_param_spec_uint64 ("duration", "Duration", "The duration to use",
|
||||||
|
0, G_MAXUINT64, 0, G_PARAM_READWRITE));
|
||||||
|
g_object_class_install_property (object_class, PROP_PRIORITY,
|
||||||
|
g_param_spec_uint ("priority", "Priority",
|
||||||
|
"The priority of the object", 0, G_MAXUINT, 0, G_PARAM_READWRITE));
|
||||||
|
}
|
||||||
|
|
||||||
GESTrackObject *ges_track_object_new (GESTimelineObject * timelineobj,
|
static void
|
||||||
GESTrack * track)
|
ges_track_object_init (GESTrackObject * self)
|
||||||
{
|
{
|
||||||
GESTrackObject *obj;
|
}
|
||||||
|
|
||||||
obj = g_object_new (GES_TYPE_TRACK_OBJECT, NULL);
|
GESTrackObject *
|
||||||
|
ges_track_object_new (GESTimelineObject * timelineobj, GESTrack * track)
|
||||||
|
{
|
||||||
|
GESTrackObject *obj;
|
||||||
|
|
||||||
/* Set the timeline object and track */
|
obj = g_object_new (GES_TYPE_TRACK_OBJECT, NULL);
|
||||||
obj->timelineobj = timelineobj;
|
|
||||||
obj->track = track;
|
|
||||||
|
|
||||||
/* Create the associated GnlObject */
|
/* Set the timeline object and track */
|
||||||
ges_track_object_create_gnl_object (obj);
|
obj->timelineobj = timelineobj;
|
||||||
}
|
obj->track = track;
|
||||||
|
|
||||||
gboolean
|
/* Create the associated GnlObject */
|
||||||
ges_track_object_set_start_internal (GESTrackObject * object,
|
ges_track_object_create_gnl_object (obj);
|
||||||
guint64 start) {
|
}
|
||||||
g_return_val_if_fail (object->gnlobject, FALSE);
|
|
||||||
|
|
||||||
if (G_UNLIKELY (start == object->start))
|
gboolean
|
||||||
return FALSE;
|
ges_track_object_set_start_internal (GESTrackObject * object, guint64 start)
|
||||||
|
{
|
||||||
|
g_return_val_if_fail (object->gnlobject, FALSE);
|
||||||
|
|
||||||
g_object_set (object->gnlobject, "start", start, NULL);
|
if (G_UNLIKELY (start == object->start))
|
||||||
return TRUE;
|
return FALSE;
|
||||||
};
|
|
||||||
|
|
||||||
gboolean
|
g_object_set (object->gnlobject, "start", start, NULL);
|
||||||
ges_track_object_set_inpoint_internal (GESTrackObject * object,
|
return TRUE;
|
||||||
guint64 inpoint) {
|
};
|
||||||
guint64 dur;
|
|
||||||
|
|
||||||
g_return_val_if_fail (object->gnlobject, FALSE);
|
gboolean
|
||||||
|
ges_track_object_set_inpoint_internal (GESTrackObject * object, guint64 inpoint)
|
||||||
|
{
|
||||||
|
guint64 dur;
|
||||||
|
|
||||||
if (G_UNLIKELY (inpoint == object->inpoint))
|
g_return_val_if_fail (object->gnlobject, FALSE);
|
||||||
return FALSE;
|
|
||||||
|
|
||||||
/* Calculate new media-start/duration/media-duration */
|
if (G_UNLIKELY (inpoint == object->inpoint))
|
||||||
dur = object->inpoint - inpoint + object->duration;
|
return FALSE;
|
||||||
|
|
||||||
g_object_set (object->gnlobject, "media-start", inpoint, "duration", dur,
|
/* Calculate new media-start/duration/media-duration */
|
||||||
"media-duration", dur, NULL);
|
dur = object->inpoint - inpoint + object->duration;
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
gboolean
|
g_object_set (object->gnlobject, "media-start", inpoint, "duration", dur,
|
||||||
ges_track_object_set_duration_internal (GESTrackObject * object,
|
"media-duration", dur, NULL);
|
||||||
guint64 duration) {
|
return TRUE;
|
||||||
g_return_val_if_fail (object->gnlobject, FALSE);
|
}
|
||||||
|
|
||||||
if (G_UNLIKELY (duration == object->duration))
|
gboolean
|
||||||
return FALSE;
|
ges_track_object_set_duration_internal (GESTrackObject * object,
|
||||||
|
guint64 duration)
|
||||||
|
{
|
||||||
|
g_return_val_if_fail (object->gnlobject, FALSE);
|
||||||
|
|
||||||
g_object_set (object->gnlobject, "duration", duration, "media-duration",
|
if (G_UNLIKELY (duration == object->duration))
|
||||||
duration, NULL);
|
return FALSE;
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
gboolean
|
g_object_set (object->gnlobject, "duration", duration, "media-duration",
|
||||||
ges_track_object_set_priority_internal (GESTrackObject * object,
|
duration, NULL);
|
||||||
guint32 priority) {
|
return TRUE;
|
||||||
g_return_val_if_fail (object->gnlobject, FALSE);
|
}
|
||||||
|
|
||||||
if (G_UNLIKELY (priority == object->priority))
|
gboolean
|
||||||
return FALSE;
|
ges_track_object_set_priority_internal (GESTrackObject * object,
|
||||||
|
guint32 priority)
|
||||||
|
{
|
||||||
|
g_return_val_if_fail (object->gnlobject, FALSE);
|
||||||
|
|
||||||
g_object_set (object->gnlobject, "priority", priority, NULL);
|
if (G_UNLIKELY (priority == object->priority))
|
||||||
return TRUE;
|
return FALSE;
|
||||||
}
|
|
||||||
|
g_object_set (object->gnlobject, "priority", priority, NULL);
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
#define _GES_TRACK_OBJECT
|
#define _GES_TRACK_OBJECT
|
||||||
|
|
||||||
#include <glib-object.h>
|
#include <glib-object.h>
|
||||||
|
#include <ges/ges.h>
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
|
@ -41,9 +42,6 @@ G_BEGIN_DECLS
|
||||||
#define GES_TRACK_OBJECT_GET_CLASS(obj) \
|
#define GES_TRACK_OBJECT_GET_CLASS(obj) \
|
||||||
(G_TYPE_INSTANCE_GET_CLASS ((obj), GES_TYPE_TRACK_OBJECT, GESTrackObjectClass))
|
(G_TYPE_INSTANCE_GET_CLASS ((obj), GES_TYPE_TRACK_OBJECT, GESTrackObjectClass))
|
||||||
|
|
||||||
typedef struct _GESTrackObject GESTrackObject;
|
|
||||||
typedef struct _GESTrackObjectClass GESTrackObjectClass;
|
|
||||||
|
|
||||||
struct _GESTrackObject {
|
struct _GESTrackObject {
|
||||||
GObject parent;
|
GObject parent;
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,7 @@
|
||||||
|
|
||||||
#include <glib-object.h>
|
#include <glib-object.h>
|
||||||
#include <gst/gst.h>
|
#include <gst/gst.h>
|
||||||
#include <ges-track-object.h>
|
#include <ges/ges-types.h>
|
||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
|
@ -43,13 +43,10 @@ G_BEGIN_DECLS
|
||||||
#define GES_TRACK_GET_CLASS(obj) \
|
#define GES_TRACK_GET_CLASS(obj) \
|
||||||
(G_TYPE_INSTANCE_GET_CLASS ((obj), GES_TYPE_TRACK, GESTrackClass))
|
(G_TYPE_INSTANCE_GET_CLASS ((obj), GES_TYPE_TRACK, GESTrackClass))
|
||||||
|
|
||||||
typedef struct _GESTrack GESTrack;
|
|
||||||
typedef struct _GESTrackClass GESTrackClass;
|
|
||||||
|
|
||||||
struct _GESTrack {
|
struct _GESTrack {
|
||||||
GstBin parent;
|
GstBin parent;
|
||||||
|
|
||||||
GnlComposition * composition; /* The composition associated with this track */
|
GstElement * composition; /* The composition associated with this track */
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GESTrackClass {
|
struct _GESTrackClass {
|
||||||
|
|
51
ges/ges-types.h
Normal file
51
ges/ges-types.h
Normal file
|
@ -0,0 +1,51 @@
|
||||||
|
/* 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_TYPES_H__
|
||||||
|
#define __GES_TYPES_H__
|
||||||
|
|
||||||
|
typedef struct _GESSimpleTimelineLayer GESSimpleTimelineLayer;
|
||||||
|
typedef struct _GESSimpleTimelineLayerClass GESSimpleTimelineLayerClass;
|
||||||
|
|
||||||
|
typedef struct _GESTimeline GESTimeline;
|
||||||
|
typedef struct _GESTimelineClass GESTimelineClass;
|
||||||
|
|
||||||
|
typedef struct _GESTimelineLayer GESTimelineLayer;
|
||||||
|
typedef struct _GESTimelineLayerClass GESTimelineLayerClass;
|
||||||
|
|
||||||
|
typedef struct _GESTimelineObject GESTimelineObject;
|
||||||
|
typedef struct _GESTimelineObjectClass GESTimelineObjectClass;
|
||||||
|
|
||||||
|
typedef struct _GESTimelinePipeline GESTimelinePipeline;
|
||||||
|
typedef struct _GESTimelinePipelineClass GESTimelinePipelineClass;
|
||||||
|
|
||||||
|
typedef struct _GESTimelineSource GESTimelineSource;
|
||||||
|
typedef struct _GESTimelineSourceClass GESTimelineSourceClass;
|
||||||
|
|
||||||
|
typedef struct _GESTimelineTransition GESTimelineTransition;
|
||||||
|
typedef struct _GESTimelineTransitionClass GESTimelineTransitionClass;
|
||||||
|
|
||||||
|
typedef struct _GESTrack GESTrack;
|
||||||
|
typedef struct _GESTrackClass GESTrackClass;
|
||||||
|
|
||||||
|
typedef struct _GESTrackObject GESTrackObject;
|
||||||
|
typedef struct _GESTrackObjectClass GESTrackObjectClass;
|
||||||
|
|
||||||
|
|
||||||
|
#endif /* __GES_TYPES_H__ */
|
|
@ -23,14 +23,17 @@
|
||||||
#include <glib.h>
|
#include <glib.h>
|
||||||
#include <gst/gst.h>
|
#include <gst/gst.h>
|
||||||
|
|
||||||
#include <ges/ges-simple-timeline-layer.h>
|
#include <ges/ges-types.h>
|
||||||
|
|
||||||
#include <ges/ges-timeline.h>
|
#include <ges/ges-timeline.h>
|
||||||
#include <ges/ges-timeline-layer.h>
|
#include <ges/ges-timeline-layer.h>
|
||||||
|
#include <ges/ges-simple-timeline-layer.h>
|
||||||
#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-transition.h>
|
||||||
#include <ges/ges-track.h>
|
#include <ges/ges-track.h>
|
||||||
|
#include <ges/ges-track-object.h>
|
||||||
|
|
||||||
GST_DEBUG_CATEGORY_EXTERN (ges_debug);
|
GST_DEBUG_CATEGORY_EXTERN (ges_debug);
|
||||||
#define GST_CAT_DEFAULT ges_debug
|
#define GST_CAT_DEFAULT ges_debug
|
||||||
|
|
Loading…
Reference in a new issue