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
|
||||
|
||||
SUBDIRS = src
|
||||
SUBDIRS = ges
|
||||
|
||||
DIST_SUBDIRS = src
|
||||
DIST_SUBDIRS = ges
|
||||
|
||||
# include before EXTRA_DIST for win32 assignment
|
||||
include $(top_srcdir)/common/win32.mak
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
DIE=0
|
||||
package=gst-editing-services
|
||||
srcfile=src/ges-timeline.c
|
||||
srcfile=ges/ges-timeline.c
|
||||
|
||||
# Make sure we have common
|
||||
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")
|
||||
|
||||
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
|
||||
AM_CONFIG_HEADER([config.h])
|
||||
|
@ -239,6 +239,6 @@ common/shave-libtool
|
|||
common/m4/Makefile
|
||||
gst-editing-services.spec
|
||||
m4/Makefile
|
||||
src/Makefile
|
||||
ges/Makefile
|
||||
)
|
||||
AC_OUTPUT
|
||||
|
|
|
@ -17,6 +17,7 @@ libges_@GST_MAJORMINOR@_la_SOURCES = \
|
|||
|
||||
libges_@GST_MAJORMINOR@includedir = $(includedir)/gstreamer-@GST_MAJORMINOR@/ges/
|
||||
libges_@GST_MAJORMINOR@include_HEADERS = \
|
||||
ges-types.h \
|
||||
ges.h \
|
||||
ges-simple-timeline-layer.h \
|
||||
ges-timeline.h \
|
||||
|
|
|
@ -21,7 +21,8 @@
|
|||
#define _GES_SIMPLE_TIMELINE_LAYER
|
||||
|
||||
#include <glib-object.h>
|
||||
#include "ges-timeline-layer.h"
|
||||
#include <ges/ges-types.h>
|
||||
#include <ges/ges-timeline-layer.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
|
@ -42,9 +43,6 @@ G_BEGIN_DECLS
|
|||
#define GES_SIMPLE_TIMELINE_LAYER_GET_CLASS(obj) \
|
||||
(G_TYPE_INSTANCE_GET_CLASS ((obj), GES_TYPE_SIMPLE_TIMELINE_LAYER, GESSimpleTimelineLayerClass))
|
||||
|
||||
typedef struct _GESSimpleTimelineLayer GESSimpleTimelineLayer;
|
||||
typedef struct _GESSimpleTimelineLayerClass GESSimpleTimelineLayerClass;
|
||||
|
||||
struct _GESSimpleTimelineLayer {
|
||||
GESTimelineLayer parent;
|
||||
};
|
||||
|
@ -58,9 +56,16 @@ GType ges_simple_timeline_layer_get_type (void);
|
|||
GESSimpleTimelineLayer* ges_simple_timeline_layer_new (void);
|
||||
|
||||
gboolean
|
||||
ges_simple_timeline_layer_add_object (GESSimpleTimelineLayer *layer, GESTimelineObject *object, gint position);
|
||||
ges_simple_timeline_layer_remove_object (GESSimpleTimelineLayer *layer, GESTimelineObject *object);
|
||||
ges_simple_timeline_layer_move_object (GESSimpleTimelineLayer *layer, GESTimelineObject, gint newposition);
|
||||
ges_simple_timeline_layer_add_object (GESSimpleTimelineLayer *layer,
|
||||
GESTimelineObject *object, gint position);
|
||||
|
||||
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
|
||||
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
#define _GES_TIMELINE_LAYER
|
||||
|
||||
#include <glib-object.h>
|
||||
#include <ges/ges-types.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
|
@ -41,9 +42,6 @@ G_BEGIN_DECLS
|
|||
#define GES_TIMELINE_LAYER_GET_CLASS(obj) \
|
||||
(G_TYPE_INSTANCE_GET_CLASS ((obj), GES_TYPE_TIMELINE_LAYER, GESTimelineLayerClass))
|
||||
|
||||
typedef struct _GESTimelineLayer GESTimelineLayer;
|
||||
typedef struct _GESTimelineLayerClass GESTimelineLayerClass;
|
||||
|
||||
struct _GESTimelineLayer {
|
||||
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) \
|
||||
(G_TYPE_INSTANCE_GET_PRIVATE ((o), GES_TYPE_TIMELINE_OBJECT, GESTimelineObjectPrivate))
|
||||
typedef struct _GESTimelineObjectPrivate GESTimelineObjectPrivate;
|
||||
(G_TYPE_INSTANCE_GET_PRIVATE ((o), GES_TYPE_TIMELINE_OBJECT, GESTimelineObjectPrivate));
|
||||
|
||||
struct _GESTimelineObjectPrivate
|
||||
{
|
||||
int dummy;
|
||||
};
|
||||
typedef struct _GESTimelineObjectPrivate GESTimelineObjectPrivate;
|
||||
|
||||
static void
|
||||
ges_timeline_object_get_property (GObject * object, guint property_id,
|
||||
struct _GESTimelineObjectPrivate
|
||||
{
|
||||
int dummy;
|
||||
};
|
||||
|
||||
static void
|
||||
ges_timeline_object_get_property (GObject * object, guint property_id,
|
||||
GValue * value, GParamSpec * pspec)
|
||||
{
|
||||
switch (property_id) {
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
#define _GES_TIMELINE_OBJECT
|
||||
|
||||
#include <glib-object.h>
|
||||
#include <ges/ges-types.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
|
@ -41,9 +42,6 @@ G_BEGIN_DECLS
|
|||
#define GES_TIMELINE_OBJECT_GET_CLASS(obj) \
|
||||
(G_TYPE_INSTANCE_GET_CLASS ((obj), GES_TYPE_TIMELINE_OBJECT, GESTimelineObjectClass))
|
||||
|
||||
typedef struct _GESTimelineObject GESTimelineObject;
|
||||
typedef struct _GESTimelineObjectClass GESTimelineObjectClass;
|
||||
|
||||
struct _GESTimelineObject {
|
||||
GObject parent;
|
||||
|
||||
|
@ -62,10 +60,12 @@ struct _GESTimelineObjectClass {
|
|||
|
||||
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,
|
||||
GESTrack * track);
|
||||
GESTrackObject *
|
||||
ges_timeline_object_create_track_object (GESTimelineObject * object,
|
||||
GESTrack * track);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
#define _GES_TIMELINE_PIPELINE
|
||||
|
||||
#include <glib-object.h>
|
||||
#include <gst/gst.h>
|
||||
#include <ges/ges.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
|
@ -42,9 +42,6 @@ G_BEGIN_DECLS
|
|||
#define GEST_TIMELINE_PIPELINE_GET_CLASS(obj) \
|
||||
(G_TYPE_INSTANCE_GET_CLASS ((obj), GEST_TYPE_TIMELINE_PIPELINE, GESTimelinePipelineClass))
|
||||
|
||||
typedef struct _GESTimelinePipeline GESTimelinePipeline;
|
||||
typedef struct _GESTimelinePipelineClass GESTimelinePipelineClass;
|
||||
|
||||
struct _GESTimelinePipeline {
|
||||
GstPipeline parent;
|
||||
};
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
#define _GES_TIMELINE_SOURCE
|
||||
|
||||
#include <glib-object.h>
|
||||
#include <ges-timeline-object.h>
|
||||
#include <ges/ges.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
|
@ -42,9 +42,6 @@ G_BEGIN_DECLS
|
|||
#define GES_TIMELINE_SOURCE_GET_CLASS(obj) \
|
||||
(G_TYPE_INSTANCE_GET_CLASS ((obj), GES_TYPE_TIMELINE_SOURCE, GESTimelineSourceClass))
|
||||
|
||||
typedef struct _GESTimelineSource GESTimelineSource;
|
||||
typedef struct _GESTimelineSourceClass GESTimelineSourceClass;
|
||||
|
||||
struct _GESTimelineSource {
|
||||
GESTimelineObject parent;
|
||||
};
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
#define _GES_TIMELINE_TRANSITION
|
||||
|
||||
#include <glib-object.h>
|
||||
#include <ges-timeline-object.h>
|
||||
#include <ges/ges.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
|
@ -42,9 +42,6 @@ G_BEGIN_DECLS
|
|||
#define GES_TIMELINE_TRANSITION_GET_CLASS(obj) \
|
||||
(G_TYPE_INSTANCE_GET_CLASS ((obj), GES_TYPE_TIMELINE_TRANSITION, GESTimelineTransitionClass))
|
||||
|
||||
typedef struct _GESTimelineTransition GESTimelineTransition;
|
||||
typedef struct _GESTimelineTransitionClass GESTimelineTransitionClass;
|
||||
|
||||
struct _GESTimelineTransition {
|
||||
GESTimelineObject parent;
|
||||
};
|
||||
|
|
|
@ -22,8 +22,7 @@
|
|||
|
||||
#include <glib-object.h>
|
||||
#include <gst/gst.h>
|
||||
#include <ges/ges-timeline-layer.h>
|
||||
#include <ges/ges-track.h>
|
||||
#include <ges/ges-types.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
|
@ -44,9 +43,6 @@ G_BEGIN_DECLS
|
|||
#define GES_TIMELINE_GET_CLASS(obj) \
|
||||
(G_TYPE_INSTANCE_GET_CLASS ((obj), GES_TYPE_TIMELINE, GESTimelineClass))
|
||||
|
||||
typedef struct _GESTimeline GESTimeline;
|
||||
typedef struct _GESTimelineClass GESTimelineClass;
|
||||
|
||||
struct _GESTimeline {
|
||||
GstBin parent;
|
||||
|
||||
|
|
|
@ -26,192 +26,194 @@ static GQuark _priority_quark;
|
|||
|
||||
#define _do_init \
|
||||
{ \
|
||||
gint i; \
|
||||
\
|
||||
_start_quark = g_quark_from_static_string ("start"); \
|
||||
_inpoint_quark = g_quark_from_static_string ("inpoint"); \
|
||||
_duration_quark = g_quark_from_static_string ("duration"); \
|
||||
_priority_quark = g_quark_from_static_string ("priority"); \
|
||||
}
|
||||
|
||||
G_DEFINE_TYPE_WITH_CODE (GESTrackObject, ges_track_object, G_TYPE_OBJECT,
|
||||
_do_init)
|
||||
_do_init);
|
||||
|
||||
#define GET_PRIVATE(o) \
|
||||
(G_TYPE_INSTANCE_GET_PRIVATE ((o), GES_TYPE_TRACK_OBJECT, GESTrackObjectPrivate))
|
||||
enum
|
||||
{
|
||||
PROP_0,
|
||||
PROP_START,
|
||||
PROP_INPOINT,
|
||||
PROP_DURATION,
|
||||
PROP_PRIORITY,
|
||||
}
|
||||
(G_TYPE_INSTANCE_GET_PRIVATE ((o), GES_TYPE_TRACK_OBJECT, GESTrackObjectPrivate));
|
||||
|
||||
typedef struct _GESTrackObjectPrivate GESTrackObjectPrivate;
|
||||
enum
|
||||
{
|
||||
PROP_0,
|
||||
PROP_START,
|
||||
PROP_INPOINT,
|
||||
PROP_DURATION,
|
||||
PROP_PRIORITY,
|
||||
};
|
||||
|
||||
struct _GESTrackObjectPrivate
|
||||
{
|
||||
int dummy;
|
||||
};
|
||||
typedef struct _GESTrackObjectPrivate GESTrackObjectPrivate;
|
||||
|
||||
static void
|
||||
ges_track_object_get_property (GObject * object, guint property_id,
|
||||
GValue * value, GParamSpec * pspec)
|
||||
{
|
||||
GESTrackObject *tobj = GES_TRACK_OBJECT (object);
|
||||
struct _GESTrackObjectPrivate
|
||||
{
|
||||
int dummy;
|
||||
};
|
||||
|
||||
switch (property_id) {
|
||||
case PROP_START:
|
||||
g_value_set_uint64 (value, tobj->start);
|
||||
break;
|
||||
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);
|
||||
}
|
||||
}
|
||||
static void
|
||||
ges_track_object_get_property (GObject * object, guint property_id,
|
||||
GValue * value, GParamSpec * pspec)
|
||||
{
|
||||
GESTrackObject *tobj = GES_TRACK_OBJECT (object);
|
||||
|
||||
static void
|
||||
ges_track_object_set_property (GObject * object, guint property_id,
|
||||
const GValue * value, GParamSpec * pspec)
|
||||
{
|
||||
GESTrackObject *tobj = GES_TRACK_OBJECT (object);
|
||||
switch (property_id) {
|
||||
case PROP_START:
|
||||
g_value_set_uint64 (value, tobj->start);
|
||||
break;
|
||||
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) {
|
||||
case PROP_START:
|
||||
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_set_property (GObject * object, guint property_id,
|
||||
const GValue * value, GParamSpec * pspec)
|
||||
{
|
||||
GESTrackObject *tobj = GES_TRACK_OBJECT (object);
|
||||
|
||||
static void ges_track_object_dispose (GObject * object)
|
||||
{
|
||||
G_OBJECT_CLASS (ges_track_object_parent_class)->dispose (object);
|
||||
}
|
||||
switch (property_id) {
|
||||
case PROP_START:
|
||||
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)
|
||||
{
|
||||
G_OBJECT_CLASS (ges_track_object_parent_class)->finalize (object);
|
||||
}
|
||||
static void
|
||||
ges_track_object_dispose (GObject * object)
|
||||
{
|
||||
G_OBJECT_CLASS (ges_track_object_parent_class)->dispose (object);
|
||||
}
|
||||
|
||||
static void ges_track_object_class_init (GESTrackObjectClass * klass)
|
||||
{
|
||||
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
||||
static void
|
||||
ges_track_object_finalize (GObject * object)
|
||||
{
|
||||
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;
|
||||
object_class->set_property = ges_track_object_set_property;
|
||||
object_class->dispose = ges_track_object_dispose;
|
||||
object_class->finalize = ges_track_object_finalize;
|
||||
g_type_class_add_private (klass, sizeof (GESTrackObjectPrivate));
|
||||
|
||||
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));
|
||||
}
|
||||
object_class->get_property = ges_track_object_get_property;
|
||||
object_class->set_property = ges_track_object_set_property;
|
||||
object_class->dispose = ges_track_object_dispose;
|
||||
object_class->finalize = ges_track_object_finalize;
|
||||
|
||||
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,
|
||||
GESTrack * track)
|
||||
{
|
||||
GESTrackObject *obj;
|
||||
static void
|
||||
ges_track_object_init (GESTrackObject * self)
|
||||
{
|
||||
}
|
||||
|
||||
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->timelineobj = timelineobj;
|
||||
obj->track = track;
|
||||
obj = g_object_new (GES_TYPE_TRACK_OBJECT, NULL);
|
||||
|
||||
/* Create the associated GnlObject */
|
||||
ges_track_object_create_gnl_object (obj);
|
||||
}
|
||||
/* Set the timeline object and track */
|
||||
obj->timelineobj = timelineobj;
|
||||
obj->track = track;
|
||||
|
||||
gboolean
|
||||
ges_track_object_set_start_internal (GESTrackObject * object,
|
||||
guint64 start) {
|
||||
g_return_val_if_fail (object->gnlobject, FALSE);
|
||||
/* Create the associated GnlObject */
|
||||
ges_track_object_create_gnl_object (obj);
|
||||
}
|
||||
|
||||
if (G_UNLIKELY (start == object->start))
|
||||
return FALSE;
|
||||
gboolean
|
||||
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);
|
||||
return TRUE;
|
||||
};
|
||||
if (G_UNLIKELY (start == object->start))
|
||||
return FALSE;
|
||||
|
||||
gboolean
|
||||
ges_track_object_set_inpoint_internal (GESTrackObject * object,
|
||||
guint64 inpoint) {
|
||||
guint64 dur;
|
||||
g_object_set (object->gnlobject, "start", start, NULL);
|
||||
return TRUE;
|
||||
};
|
||||
|
||||
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))
|
||||
return FALSE;
|
||||
g_return_val_if_fail (object->gnlobject, FALSE);
|
||||
|
||||
/* Calculate new media-start/duration/media-duration */
|
||||
dur = object->inpoint - inpoint + object->duration;
|
||||
if (G_UNLIKELY (inpoint == object->inpoint))
|
||||
return FALSE;
|
||||
|
||||
g_object_set (object->gnlobject, "media-start", inpoint, "duration", dur,
|
||||
"media-duration", dur, NULL);
|
||||
return TRUE;
|
||||
}
|
||||
/* Calculate new media-start/duration/media-duration */
|
||||
dur = object->inpoint - inpoint + object->duration;
|
||||
|
||||
gboolean
|
||||
ges_track_object_set_duration_internal (GESTrackObject * object,
|
||||
guint64 duration) {
|
||||
g_return_val_if_fail (object->gnlobject, FALSE);
|
||||
g_object_set (object->gnlobject, "media-start", inpoint, "duration", dur,
|
||||
"media-duration", dur, NULL);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
if (G_UNLIKELY (duration == object->duration))
|
||||
return FALSE;
|
||||
gboolean
|
||||
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",
|
||||
duration, NULL);
|
||||
return TRUE;
|
||||
}
|
||||
if (G_UNLIKELY (duration == object->duration))
|
||||
return FALSE;
|
||||
|
||||
gboolean
|
||||
ges_track_object_set_priority_internal (GESTrackObject * object,
|
||||
guint32 priority) {
|
||||
g_return_val_if_fail (object->gnlobject, FALSE);
|
||||
g_object_set (object->gnlobject, "duration", duration, "media-duration",
|
||||
duration, NULL);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
if (G_UNLIKELY (priority == object->priority))
|
||||
return FALSE;
|
||||
gboolean
|
||||
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);
|
||||
return TRUE;
|
||||
}
|
||||
if (G_UNLIKELY (priority == object->priority))
|
||||
return FALSE;
|
||||
|
||||
g_object_set (object->gnlobject, "priority", priority, NULL);
|
||||
return TRUE;
|
||||
}
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
#define _GES_TRACK_OBJECT
|
||||
|
||||
#include <glib-object.h>
|
||||
#include <ges/ges.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
|
@ -41,9 +42,6 @@ G_BEGIN_DECLS
|
|||
#define GES_TRACK_OBJECT_GET_CLASS(obj) \
|
||||
(G_TYPE_INSTANCE_GET_CLASS ((obj), GES_TYPE_TRACK_OBJECT, GESTrackObjectClass))
|
||||
|
||||
typedef struct _GESTrackObject GESTrackObject;
|
||||
typedef struct _GESTrackObjectClass GESTrackObjectClass;
|
||||
|
||||
struct _GESTrackObject {
|
||||
GObject parent;
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
#include <glib-object.h>
|
||||
#include <gst/gst.h>
|
||||
#include <ges-track-object.h>
|
||||
#include <ges/ges-types.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
|
@ -43,13 +43,10 @@ G_BEGIN_DECLS
|
|||
#define GES_TRACK_GET_CLASS(obj) \
|
||||
(G_TYPE_INSTANCE_GET_CLASS ((obj), GES_TYPE_TRACK, GESTrackClass))
|
||||
|
||||
typedef struct _GESTrack GESTrack;
|
||||
typedef struct _GESTrackClass GESTrackClass;
|
||||
|
||||
struct _GESTrack {
|
||||
GstBin parent;
|
||||
|
||||
GnlComposition * composition; /* The composition associated with this track */
|
||||
GstElement * composition; /* The composition associated with this track */
|
||||
};
|
||||
|
||||
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 <gst/gst.h>
|
||||
|
||||
#include <ges/ges-simple-timeline-layer.h>
|
||||
#include <ges/ges-types.h>
|
||||
|
||||
#include <ges/ges-timeline.h>
|
||||
#include <ges/ges-timeline-layer.h>
|
||||
#include <ges/ges-simple-timeline-layer.h>
|
||||
#include <ges/ges-timeline-object.h>
|
||||
#include <ges/ges-timeline-pipeline.h>
|
||||
#include <ges/ges-timeline-source.h>
|
||||
#include <ges/ges-timeline-transition.h>
|
||||
#include <ges/ges-track.h>
|
||||
#include <ges/ges-track-object.h>
|
||||
|
||||
GST_DEBUG_CATEGORY_EXTERN (ges_debug);
|
||||
#define GST_CAT_DEFAULT ges_debug
|
||||
|
|
Loading…
Reference in a new issue