mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-11 09:55:36 +00:00
Rename GESTimelineLayer to GESLayer
This commit is contained in:
parent
b5c52a17ec
commit
b2b96c743d
67 changed files with 875 additions and 913 deletions
|
@ -11,9 +11,9 @@ LOCAL_SRC_FILES := \
|
|||
ges.c \
|
||||
ges-enums.c \
|
||||
ges-custom-source-clip.c \
|
||||
ges-simple-timeline-layer.c \
|
||||
ges-simple-layer.c \
|
||||
ges-timeline.c \
|
||||
ges-timeline-layer.c \
|
||||
ges-layer.c \
|
||||
ges-clip.c \
|
||||
ges-timeline-pipeline.c \
|
||||
ges-source-clip.c \
|
||||
|
|
|
@ -6,7 +6,7 @@ class Simple:
|
|||
def __init__(self, uri):
|
||||
timeline = GES.Timeline()
|
||||
trackv = GES.Track.video_raw_new()
|
||||
self.layer = GES.TimelineLayer()
|
||||
self.layer = GES.Layer()
|
||||
self.pipeline = GES.TimelinePipeline()
|
||||
self.pipeline.add_timeline(timeline)
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@ class Simple:
|
|||
def __init__(self, uri):
|
||||
timeline = GES.Timeline()
|
||||
trackv = GES.Track.video_raw_new()
|
||||
layer = GES.TimelineLayer()
|
||||
layer = GES.Layer()
|
||||
self.pipeline = GES.TimelinePipeline()
|
||||
self.pipeline.add_timeline(timeline)
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ platform as well as Windows. It is released under the GNU Library General Public
|
|||
<chapter>
|
||||
<title>Base Classes</title>
|
||||
<xi:include href="xml/ges-timeline.xml"/>
|
||||
<xi:include href="xml/ges-timeline-layer.xml"/>
|
||||
<xi:include href="xml/ges-layer.xml"/>
|
||||
<xi:include href="xml/ges-timeline-element.xml"/>
|
||||
<xi:include href="xml/ges-container.xml"/>
|
||||
<xi:include href="xml/ges-clip.xml"/>
|
||||
|
@ -79,7 +79,7 @@ platform as well as Windows. It is released under the GNU Library General Public
|
|||
|
||||
<chapter>
|
||||
<title>Simple Timeline interface</title>
|
||||
<xi:include href="xml/ges-simple-timeline-layer.xml"/>
|
||||
<xi:include href="xml/ges-simple-layer.xml"/>
|
||||
</chapter>
|
||||
|
||||
<chapter>
|
||||
|
|
|
@ -288,35 +288,35 @@ GES_TYPE_TIMELINE
|
|||
|
||||
|
||||
<SECTION>
|
||||
<FILE>ges-timeline-layer</FILE>
|
||||
<TITLE>GESTimelineLayer</TITLE>
|
||||
GESTimelineLayer
|
||||
GESTimelineLayerClass
|
||||
ges_timeline_layer_add_clip
|
||||
ges_timeline_layer_add_asset
|
||||
ges_timeline_layer_new
|
||||
ges_timeline_layer_remove_clip
|
||||
ges_timeline_layer_set_priority
|
||||
ges_timeline_layer_get_priority
|
||||
ges_timeline_layer_get_clips
|
||||
ges_timeline_layer_get_timeline
|
||||
ges_timeline_layer_get_auto_transition
|
||||
ges_timeline_layer_set_auto_transition
|
||||
ges_timeline_layer_is_empty
|
||||
<FILE>ges-layer</FILE>
|
||||
<TITLE>GESLayer</TITLE>
|
||||
GESLayer
|
||||
GESLayerClass
|
||||
ges_layer_add_clip
|
||||
ges_layer_add_asset
|
||||
ges_layer_new
|
||||
ges_layer_remove_clip
|
||||
ges_layer_set_priority
|
||||
ges_layer_get_priority
|
||||
ges_layer_get_clips
|
||||
ges_layer_get_timeline
|
||||
ges_layer_get_auto_transition
|
||||
ges_layer_set_auto_transition
|
||||
ges_layer_is_empty
|
||||
|
||||
GES_TIMELINE_GET_LAYERS
|
||||
GES_TIMELINE_GET_TRACKS
|
||||
|
||||
<SUBSECTION Standard>
|
||||
GESTimelineLayerPrivate
|
||||
ges_timeline_layer_set_timeline
|
||||
ges_timeline_layer_get_type
|
||||
GES_IS_TIMELINE_LAYER
|
||||
GES_IS_TIMELINE_LAYER_CLASS
|
||||
GES_TIMELINE_LAYER
|
||||
GES_TIMELINE_LAYER_CLASS
|
||||
GES_TIMELINE_LAYER_GET_CLASS
|
||||
GES_TYPE_TIMELINE_LAYER
|
||||
GESLayerPrivate
|
||||
ges_layer_set_timeline
|
||||
ges_layer_get_type
|
||||
GES_IS_LAYER
|
||||
GES_IS_LAYER_CLASS
|
||||
GES_LAYER
|
||||
GES_LAYER_CLASS
|
||||
GES_LAYER_GET_CLASS
|
||||
GES_TYPE_LAYER
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
|
@ -605,25 +605,25 @@ GES_TYPE_CUSTOM_SOURCE_CLIP
|
|||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
<FILE>ges-simple-timeline-layer</FILE>
|
||||
<TITLE>GESSimpleTimelineLayer</TITLE>
|
||||
GESSimpleTimelineLayer
|
||||
ges_simple_timeline_layer_new
|
||||
ges_simple_timeline_layer_add_object
|
||||
ges_simple_timeline_layer_move_object
|
||||
ges_simple_timeline_layer_nth
|
||||
ges_simple_timeline_layer_index
|
||||
ges_simple_timeline_layer_is_valid
|
||||
<FILE>ges-simple-layer</FILE>
|
||||
<TITLE>GESSimpleLayer</TITLE>
|
||||
GESSimpleLayer
|
||||
ges_simple_layer_new
|
||||
ges_simple_layer_add_object
|
||||
ges_simple_layer_move_object
|
||||
ges_simple_layer_nth
|
||||
ges_simple_layer_index
|
||||
ges_simple_layer_is_valid
|
||||
<SUBSECTION Standard>
|
||||
GESSimpleTimelineLayerClass
|
||||
ges_simple_timeline_layer_get_type
|
||||
GESSimpleTimelineLayerPrivate
|
||||
GES_IS_SIMPLE_TIMELINE_LAYER
|
||||
GES_IS_SIMPLE_TIMELINE_LAYER_CLASS
|
||||
GES_SIMPLE_TIMELINE_LAYER
|
||||
GES_SIMPLE_TIMELINE_LAYER_CLASS
|
||||
GES_SIMPLE_TIMELINE_LAYER_GET_CLASS
|
||||
GES_TYPE_SIMPLE_TIMELINE_LAYER
|
||||
GESSimpleLayerClass
|
||||
ges_simple_layer_get_type
|
||||
GESSimpleLayerPrivate
|
||||
GES_IS_SIMPLE_LAYER
|
||||
GES_IS_SIMPLE_LAYER_CLASS
|
||||
GES_SIMPLE_LAYER
|
||||
GES_SIMPLE_LAYER_CLASS
|
||||
GES_SIMPLE_LAYER_GET_CLASS
|
||||
GES_TYPE_SIMPLE_LAYER
|
||||
</SECTION>
|
||||
|
||||
<SECTION>
|
||||
|
|
|
@ -3,11 +3,11 @@
|
|||
|
||||
ges_custom_source_clip_get_type
|
||||
ges_formatter_get_type
|
||||
ges_simple_timeline_layer_get_type
|
||||
ges_simple_layer_get_type
|
||||
%ges_text_halign_get_type
|
||||
%ges_text_valign_get_type
|
||||
ges_timeline_get_type
|
||||
ges_timeline_layer_get_type
|
||||
ges_layer_get_type
|
||||
ges_clip_get_type
|
||||
ges_operation_clip_get_type
|
||||
ges_overlay_clip_get_type
|
||||
|
|
|
@ -13,9 +13,9 @@ libges_@GST_API_VERSION@_la_SOURCES = \
|
|||
ges-enums.c \
|
||||
ges-custom-source-clip.c \
|
||||
ges-meta-container.c \
|
||||
ges-simple-timeline-layer.c \
|
||||
ges-simple-layer.c \
|
||||
ges-timeline.c \
|
||||
ges-timeline-layer.c \
|
||||
ges-layer.c \
|
||||
ges-clip.c \
|
||||
ges-timeline-pipeline.c \
|
||||
ges-source-clip.c \
|
||||
|
@ -70,9 +70,9 @@ libges_@GST_API_VERSION@include_HEADERS = \
|
|||
ges-gerror.h \
|
||||
ges-custom-source-clip.h \
|
||||
ges-meta-container.h \
|
||||
ges-simple-timeline-layer.h \
|
||||
ges-simple-layer.h \
|
||||
ges-timeline.h \
|
||||
ges-timeline-layer.h \
|
||||
ges-layer.h \
|
||||
ges-clip.h \
|
||||
ges-timeline-pipeline.h \
|
||||
ges-source-clip.h \
|
||||
|
|
|
@ -71,7 +71,7 @@ _height_changed_cb (GESClip * clip, GParamSpec * arg G_GNUC_UNUSED,
|
|||
GESAutoTransition * self)
|
||||
{
|
||||
/* FIXME This is really not smart and we should properly implement clip
|
||||
* priority management at the TimelineLayer level */
|
||||
* priority management at the Layer level */
|
||||
_set_priority0 (GES_TIMELINE_ELEMENT (self->next_clip),
|
||||
_PRIORITY (self->previous_clip) +
|
||||
GES_CONTAINER_HEIGHT (self->previous_clip));
|
||||
|
@ -170,7 +170,7 @@ ges_auto_transition_new (GESTrackElement * transition,
|
|||
" between %" GST_PTR_FORMAT " and: %" GST_PTR_FORMAT
|
||||
" in layer nb %i, start: %" GST_TIME_FORMAT " duration: %"
|
||||
GST_TIME_FORMAT, transition, next_source, previous_source,
|
||||
ges_timeline_layer_get_priority (ges_clip_get_layer
|
||||
ges_layer_get_priority (ges_clip_get_layer
|
||||
(self->previous_clip)),
|
||||
GST_TIME_ARGS (_START (transition)),
|
||||
GST_TIME_ARGS (_DURATION (transition)));
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
#include <glib-object.h>
|
||||
#include "ges-track-element.h"
|
||||
#include "ges-clip.h"
|
||||
#include "ges-timeline-layer.h"
|
||||
#include "ges-layer.h"
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
|
@ -56,7 +56,7 @@ struct _GESAutoTransition
|
|||
GESTrackElement *next_source;
|
||||
GESTrackElement *transition;
|
||||
|
||||
GESTimelineLayer *layer;
|
||||
GESLayer *layer;
|
||||
|
||||
GESClip *previous_clip;
|
||||
GESClip *next_clip;
|
||||
|
|
|
@ -19,13 +19,13 @@
|
|||
|
||||
/**
|
||||
* SECTION: ges-base-effect-clip
|
||||
* @short_description: An effect in a GESTimelineLayer
|
||||
* @short_description: An effect in a GESLayer
|
||||
*
|
||||
* The effect will be applied on the sources that have lower priorities
|
||||
* (higher number) between the inpoint and the end of it.
|
||||
*
|
||||
* In a #GESSimpleTimelineLayer, the priorities will be set for you but if
|
||||
* you use another type of #GESTimelineLayer, you will have to handle it
|
||||
* In a #GESSimpleLayer, the priorities will be set for you but if
|
||||
* you use another type of #GESLayer, you will have to handle it
|
||||
* yourself.
|
||||
*/
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
/**
|
||||
* SECTION:ges-base-effect
|
||||
* @short_description: adds an effect to a stream in a GESSourceClip or a
|
||||
* #GESTimelineLayer
|
||||
* #GESLayer
|
||||
*/
|
||||
|
||||
#include <glib/gprintf.h>
|
||||
|
|
|
@ -49,7 +49,7 @@ typedef struct PendingClip
|
|||
GESAsset *asset;
|
||||
GstClockTime duration;
|
||||
GESTrackType track_types;
|
||||
GESTimelineLayer *layer;
|
||||
GESLayer *layer;
|
||||
|
||||
GstStructure *properties;
|
||||
gchar *metadatas;
|
||||
|
@ -62,7 +62,7 @@ typedef struct PendingClip
|
|||
|
||||
typedef struct LayerEntry
|
||||
{
|
||||
GESTimelineLayer *layer;
|
||||
GESLayer *layer;
|
||||
gboolean auto_trans;
|
||||
} LayerEntry;
|
||||
|
||||
|
@ -366,7 +366,7 @@ ges_base_xml_formatter_class_init (GESBaseXmlFormatterClass * self_class)
|
|||
static void
|
||||
_set_auto_transition (gpointer prio, LayerEntry * entry, gpointer udata)
|
||||
{
|
||||
ges_timeline_layer_set_auto_transition (entry->layer, entry->auto_trans);
|
||||
ges_layer_set_auto_transition (entry->layer, entry->auto_trans);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -406,12 +406,12 @@ set_property_foreach (GQuark field_id, const GValue * value, GObject * object)
|
|||
|
||||
static inline GESClip *
|
||||
_add_object_to_layer (GESBaseXmlFormatterPrivate * priv, const gchar * id,
|
||||
GESTimelineLayer * layer, GESAsset * asset, GstClockTime start,
|
||||
GESLayer * layer, GESAsset * asset, GstClockTime start,
|
||||
GstClockTime inpoint, GstClockTime duration,
|
||||
GESTrackType track_types, const gchar * metadatas,
|
||||
GstStructure * properties)
|
||||
{
|
||||
GESClip *clip = ges_timeline_layer_add_asset (layer,
|
||||
GESClip *clip = ges_layer_add_asset (layer,
|
||||
asset, start, inpoint, duration, track_types);
|
||||
|
||||
if (clip == NULL) {
|
||||
|
@ -753,7 +753,7 @@ ges_base_xml_formatter_add_layer (GESBaseXmlFormatter * self,
|
|||
{
|
||||
LayerEntry *entry;
|
||||
GESAsset *asset;
|
||||
GESTimelineLayer *layer;
|
||||
GESLayer *layer;
|
||||
gboolean auto_transition = FALSE;
|
||||
GESBaseXmlFormatterPrivate *priv = _GET_PRIV (self);
|
||||
|
||||
|
@ -761,7 +761,7 @@ ges_base_xml_formatter_add_layer (GESBaseXmlFormatter * self,
|
|||
return;
|
||||
|
||||
if (extractable_type == G_TYPE_NONE)
|
||||
layer = ges_timeline_layer_new ();
|
||||
layer = ges_layer_new ();
|
||||
else {
|
||||
asset = ges_asset_request (extractable_type, NULL, error);
|
||||
if (asset == NULL) {
|
||||
|
@ -773,10 +773,10 @@ ges_base_xml_formatter_add_layer (GESBaseXmlFormatter * self,
|
|||
return;
|
||||
}
|
||||
}
|
||||
layer = GES_TIMELINE_LAYER (ges_asset_extract (asset, error));
|
||||
layer = GES_LAYER (ges_asset_extract (asset, error));
|
||||
}
|
||||
|
||||
ges_timeline_layer_set_priority (layer, priority);
|
||||
ges_layer_set_priority (layer, priority);
|
||||
ges_timeline_add_layer (GES_FORMATTER (self)->timeline, layer);
|
||||
if (properties) {
|
||||
if (gst_structure_get_boolean (properties, "auto-transition",
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
/**
|
||||
* SECTION:ges-clip
|
||||
* @short_description: Base Class for objects in a GESTimelineLayer
|
||||
* @short_description: Base Class for objects in a GESLayer
|
||||
*
|
||||
* A #GESClip is a 'natural' object which controls one or more
|
||||
* #GESTrackElement(s) in one or more #GESTrack(s).
|
||||
|
@ -53,7 +53,7 @@ G_DEFINE_ABSTRACT_TYPE (GESClip, ges_clip, GES_TYPE_CONTAINER);
|
|||
struct _GESClipPrivate
|
||||
{
|
||||
/*< public > */
|
||||
GESTimelineLayer *layer;
|
||||
GESLayer *layer;
|
||||
|
||||
/*< private > */
|
||||
|
||||
|
@ -116,7 +116,7 @@ static void
|
|||
_get_priority_range (GESContainer * container, guint32 * min_priority,
|
||||
guint32 * max_priority)
|
||||
{
|
||||
GESTimelineLayer *layer = GES_CLIP (container)->priv->layer;
|
||||
GESLayer *layer = GES_CLIP (container)->priv->layer;
|
||||
|
||||
if (layer) {
|
||||
*min_priority = layer->min_gnl_priority;
|
||||
|
@ -204,7 +204,7 @@ _ungroup (GESContainer * container, gboolean recursive)
|
|||
gboolean first_obj = TRUE;
|
||||
GESClip *clip = GES_CLIP (container);
|
||||
GESTimelineElement *element = GES_TIMELINE_ELEMENT (container);
|
||||
GESTimelineLayer *layer = clip->priv->layer;
|
||||
GESLayer *layer = clip->priv->layer;
|
||||
GHashTable *_tracktype_clip = g_hash_table_new (g_int_hash, g_int_equal);
|
||||
|
||||
/* If there is no TrackElement, just return @container in a list */
|
||||
|
@ -228,7 +228,7 @@ _ungroup (GESContainer * container, gboolean recursive)
|
|||
if (layer) {
|
||||
/* Add new container to the same layer as @container */
|
||||
ges_clip_set_moving_from_layer (tmpclip, TRUE);
|
||||
ges_timeline_layer_add_clip (layer, tmpclip);
|
||||
ges_layer_add_clip (layer, tmpclip);
|
||||
ges_clip_set_moving_from_layer (tmpclip, FALSE);
|
||||
}
|
||||
}
|
||||
|
@ -259,7 +259,7 @@ _group (GList * containers)
|
|||
CheckTrack *tracks = NULL;
|
||||
GESTimeline *timeline = NULL;
|
||||
GESTrackType supported_formats;
|
||||
GESTimelineLayer *layer = NULL;
|
||||
GESLayer *layer = NULL;
|
||||
GList *tmp, *tmpclip, *tmpelement;
|
||||
GstClockTime start, inpoint, duration;
|
||||
|
||||
|
@ -390,7 +390,7 @@ _group (GList * containers)
|
|||
ges_track_element_get_track_type (GES_TRACK_ELEMENT (celement));
|
||||
}
|
||||
|
||||
ges_timeline_layer_remove_clip (layer, tmpclip->data);
|
||||
ges_layer_remove_clip (layer, tmpclip->data);
|
||||
}
|
||||
|
||||
ges_clip_set_supported_formats (GES_CLIP (ret), supported_formats);
|
||||
|
@ -475,11 +475,11 @@ ges_clip_class_init (GESClipClass * klass)
|
|||
/**
|
||||
* GESClip:layer:
|
||||
*
|
||||
* The GESTimelineLayer where this clip is being used.
|
||||
* The GESLayer where this clip is being used.
|
||||
*/
|
||||
properties[PROP_LAYER] = g_param_spec_object ("layer", "Layer",
|
||||
"The GESTimelineLayer where this clip is being used.",
|
||||
GES_TYPE_TIMELINE_LAYER, G_PARAM_READABLE);
|
||||
"The GESLayer where this clip is being used.",
|
||||
GES_TYPE_LAYER, G_PARAM_READABLE);
|
||||
g_object_class_install_property (object_class, PROP_LAYER,
|
||||
properties[PROP_LAYER]);
|
||||
|
||||
|
@ -624,7 +624,7 @@ ges_clip_create_track_elements_func (GESClip * clip, GESTrackType type)
|
|||
}
|
||||
|
||||
void
|
||||
ges_clip_set_layer (GESClip * clip, GESTimelineLayer * layer)
|
||||
ges_clip_set_layer (GESClip * clip, GESLayer * layer)
|
||||
{
|
||||
GST_DEBUG ("clip:%p, layer:%p", clip, layer);
|
||||
|
||||
|
@ -714,7 +714,7 @@ ges_clip_is_moving_from_layer (GESClip * clip)
|
|||
/**
|
||||
* ges_clip_move_to_layer:
|
||||
* @clip: a #GESClip
|
||||
* @layer: the new #GESTimelineLayer
|
||||
* @layer: the new #GESLayer
|
||||
*
|
||||
* Moves @clip to @layer. If @clip is not in any layer, it adds it to
|
||||
* @layer, else, it removes it from its current layer, and adds it to @layer.
|
||||
|
@ -722,35 +722,35 @@ ges_clip_is_moving_from_layer (GESClip * clip)
|
|||
* Returns: %TRUE if @clip could be moved %FALSE otherwize
|
||||
*/
|
||||
gboolean
|
||||
ges_clip_move_to_layer (GESClip * clip, GESTimelineLayer * layer)
|
||||
ges_clip_move_to_layer (GESClip * clip, GESLayer * layer)
|
||||
{
|
||||
gboolean ret;
|
||||
GESTimelineLayer *current_layer;
|
||||
GESLayer *current_layer;
|
||||
|
||||
g_return_val_if_fail (GES_IS_CLIP (clip), FALSE);
|
||||
g_return_val_if_fail (GES_IS_TIMELINE_LAYER (layer), FALSE);
|
||||
g_return_val_if_fail (GES_IS_LAYER (layer), FALSE);
|
||||
|
||||
current_layer = clip->priv->layer;
|
||||
|
||||
if (current_layer == NULL) {
|
||||
GST_DEBUG ("Not moving %p, only adding it to %p", clip, layer);
|
||||
|
||||
return ges_timeline_layer_add_clip (layer, clip);
|
||||
return ges_layer_add_clip (layer, clip);
|
||||
}
|
||||
|
||||
GST_DEBUG_OBJECT (clip, "moving to layer %p, priority: %d", layer,
|
||||
ges_timeline_layer_get_priority (layer));
|
||||
ges_layer_get_priority (layer));
|
||||
|
||||
clip->priv->is_moving = TRUE;
|
||||
gst_object_ref (clip);
|
||||
ret = ges_timeline_layer_remove_clip (current_layer, clip);
|
||||
ret = ges_layer_remove_clip (current_layer, clip);
|
||||
|
||||
if (!ret) {
|
||||
gst_object_unref (clip);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
ret = ges_timeline_layer_add_clip (layer, clip);
|
||||
ret = ges_layer_add_clip (layer, clip);
|
||||
clip->priv->is_moving = FALSE;
|
||||
|
||||
gst_object_unref (clip);
|
||||
|
@ -806,13 +806,13 @@ ges_clip_find_track_element (GESClip * clip, GESTrack * track, GType type)
|
|||
* ges_clip_get_layer:
|
||||
* @clip: a #GESClip
|
||||
*
|
||||
* Get the #GESTimelineLayer to which this clip belongs.
|
||||
* Get the #GESLayer to which this clip belongs.
|
||||
*
|
||||
* Returns: (transfer full): The #GESTimelineLayer where this @clip is being
|
||||
* Returns: (transfer full): The #GESLayer where this @clip is being
|
||||
* used, or %NULL if it is not used on any layer. The caller should unref it
|
||||
* usage.
|
||||
*/
|
||||
GESTimelineLayer *
|
||||
GESLayer *
|
||||
ges_clip_get_layer (GESClip * clip)
|
||||
{
|
||||
g_return_val_if_fail (GES_IS_CLIP (clip), NULL);
|
||||
|
@ -952,9 +952,9 @@ ges_clip_set_top_effect_priority (GESClip * clip,
|
|||
/**
|
||||
* ges_clip_edit:
|
||||
* @clip: the #GESClip to edit
|
||||
* @layers: (element-type GESTimelineLayer): The layers you want the edit to
|
||||
* @layers: (element-type GESLayer): The layers you want the edit to
|
||||
* happen in, %NULL means that the edition is done in all the
|
||||
* #GESTimelineLayers contained in the current timeline.
|
||||
* #GESLayers contained in the current timeline.
|
||||
* @new_layer_priority: The priority of the layer @clip should land in.
|
||||
* If the layer you're trying to move the clip to doesn't exist, it will
|
||||
* be created automatically. -1 means no move.
|
||||
|
@ -976,7 +976,7 @@ ges_clip_edit (GESClip * clip, GList * layers,
|
|||
{
|
||||
GList *tmp;
|
||||
gboolean ret = TRUE;
|
||||
GESTimelineLayer *layer;
|
||||
GESLayer *layer;
|
||||
|
||||
g_return_val_if_fail (GES_IS_CLIP (clip), FALSE);
|
||||
|
||||
|
@ -1005,8 +1005,7 @@ ges_clip_edit (GESClip * clip, GList * layers,
|
|||
|
||||
return FALSE;
|
||||
}
|
||||
priority_offset = new_layer_priority -
|
||||
ges_timeline_layer_get_priority (layer);
|
||||
priority_offset = new_layer_priority - ges_layer_get_priority (layer);
|
||||
|
||||
ret &= timeline_context_to_layer (layer->timeline, priority_offset);
|
||||
}
|
||||
|
@ -1022,7 +1021,7 @@ ges_clip_edit (GESClip * clip, GList * layers,
|
|||
* The function modifies @clip, and creates another #GESClip so
|
||||
* we have two clips at the end, splitted at the time specified by @position.
|
||||
* The newly created clip will be added to the same layer as @clip is in.
|
||||
* This implies that @clip must be in a #GESTimelineLayer for the operation to
|
||||
* This implies that @clip must be in a #GESLayer for the operation to
|
||||
* be possible.
|
||||
*
|
||||
* Returns: (transfer none): The newly created #GESClip resulting from the
|
||||
|
@ -1067,7 +1066,7 @@ ges_clip_split (GESClip * clip, guint64 position)
|
|||
|
||||
/* We do not want the timeline to create again TrackElement-s */
|
||||
ges_clip_set_moving_from_layer (new_object, TRUE);
|
||||
ges_timeline_layer_add_clip (clip->priv->layer, new_object);
|
||||
ges_layer_add_clip (clip->priv->layer, new_object);
|
||||
ges_clip_set_moving_from_layer (new_object, FALSE);
|
||||
|
||||
_set_duration0 (GES_TIMELINE_ELEMENT (clip), position - _START (clip));
|
||||
|
@ -1139,7 +1138,7 @@ _ripple (GESTimelineElement * element, GstClockTime start)
|
|||
GESTimeline *timeline;
|
||||
GESClip *clip = GES_CLIP (element);
|
||||
|
||||
timeline = ges_timeline_layer_get_timeline (clip->priv->layer);
|
||||
timeline = ges_layer_get_timeline (clip->priv->layer);
|
||||
|
||||
if (timeline == NULL) {
|
||||
GST_DEBUG ("Not in a timeline yet");
|
||||
|
@ -1164,7 +1163,7 @@ _ripple_end (GESTimelineElement * element, GstClockTime end)
|
|||
GESTimeline *timeline;
|
||||
GESClip *clip = GES_CLIP (element);
|
||||
|
||||
timeline = ges_timeline_layer_get_timeline (clip->priv->layer);
|
||||
timeline = ges_layer_get_timeline (clip->priv->layer);
|
||||
|
||||
if (timeline == NULL) {
|
||||
GST_DEBUG ("Not in a timeline yet");
|
||||
|
@ -1190,7 +1189,7 @@ _roll_start (GESTimelineElement * element, GstClockTime start)
|
|||
|
||||
GESClip *clip = GES_CLIP (element);
|
||||
|
||||
timeline = ges_timeline_layer_get_timeline (clip->priv->layer);
|
||||
timeline = ges_layer_get_timeline (clip->priv->layer);
|
||||
|
||||
if (timeline == NULL) {
|
||||
GST_DEBUG ("Not in a timeline yet");
|
||||
|
@ -1216,7 +1215,7 @@ _roll_end (GESTimelineElement * element, GstClockTime end)
|
|||
|
||||
GESClip *clip = GES_CLIP (element);
|
||||
|
||||
timeline = ges_timeline_layer_get_timeline (clip->priv->layer);
|
||||
timeline = ges_layer_get_timeline (clip->priv->layer);
|
||||
if (timeline == NULL) {
|
||||
GST_DEBUG ("Not in a timeline yet");
|
||||
return FALSE;
|
||||
|
@ -1242,7 +1241,7 @@ _trim (GESTimelineElement * element, GstClockTime start)
|
|||
|
||||
GESClip *clip = GES_CLIP (element);
|
||||
|
||||
timeline = ges_timeline_layer_get_timeline (clip->priv->layer);
|
||||
timeline = ges_layer_get_timeline (clip->priv->layer);
|
||||
|
||||
if (timeline == NULL) {
|
||||
GST_DEBUG ("Not in a timeline yet");
|
||||
|
|
|
@ -157,8 +157,8 @@ GESTrackElement* ges_clip_find_track_element (GESClip *clip, GESTrack *trac
|
|||
/****************************************************
|
||||
* Layer *
|
||||
****************************************************/
|
||||
GESTimelineLayer* ges_clip_get_layer (GESClip *clip);
|
||||
gboolean ges_clip_move_to_layer (GESClip *clip, GESTimelineLayer *layer);
|
||||
GESLayer* ges_clip_get_layer (GESClip *clip);
|
||||
gboolean ges_clip_move_to_layer (GESClip *clip, GESLayer *layer);
|
||||
|
||||
/****************************************************
|
||||
* Effects *
|
||||
|
|
|
@ -70,7 +70,7 @@ static guint ges_container_signals[LAST_SIGNAL] = { 0 };
|
|||
struct _GESContainerPrivate
|
||||
{
|
||||
/*< public > */
|
||||
GESTimelineLayer *layer;
|
||||
GESLayer *layer;
|
||||
|
||||
/*< private > */
|
||||
/* Set to TRUE when the container is doing updates of track object
|
||||
|
|
|
@ -20,13 +20,13 @@
|
|||
/**
|
||||
* SECTION: ges-effect-clip
|
||||
* @short_description: An effect created by parse-launch style bin descriptions
|
||||
* in a #GESTimelineLayer
|
||||
* in a #GESLayer
|
||||
*
|
||||
* The effect will be applied on the sources that have lower priorities
|
||||
* (higher number) between the inpoint and the end of it.
|
||||
*
|
||||
* In a #GESSimpleTimelineLayer, the priorities will be set for you but if
|
||||
* you use another type of #GESTimelineLayer, you will have to handle it
|
||||
* In a #GESSimpleLayer, the priorities will be set for you but if
|
||||
* you use another type of #GESLayer, you will have to handle it
|
||||
* yourself.
|
||||
*/
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
/**
|
||||
* SECTION:ges-effect
|
||||
* @short_description: adds an effect build from a parse-launch style
|
||||
* bin description to a stream in a #GESSourceClip or a #GESTimelineLayer
|
||||
* bin description to a stream in a #GESSourceClip or a #GESLayer
|
||||
*/
|
||||
|
||||
#include "ges-internal.h"
|
||||
|
|
|
@ -247,7 +247,7 @@ G_GNUC_INTERNAL void _ges_container_sort_children_by_end (GESContainer *contain
|
|||
/****************************************************
|
||||
* GESClip *
|
||||
****************************************************/
|
||||
void ges_clip_set_layer (GESClip *clip, GESTimelineLayer *layer);
|
||||
void ges_clip_set_layer (GESClip *clip, GESLayer *layer);
|
||||
gboolean ges_clip_is_moving_from_layer (GESClip *clip);
|
||||
void ges_clip_set_moving_from_layer (GESClip *clip, gboolean is_moving);
|
||||
GESTrackElement* ges_clip_create_track_element (GESClip *clip, GESTrackType type);
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* SECTION:ges-timeline-layer
|
||||
* SECTION:ges-layer
|
||||
* @short_description: Non-overlapping sequence of GESClip
|
||||
*
|
||||
* Responsible for the ordering of the various contained Clip(s). A
|
||||
|
@ -31,19 +31,19 @@
|
|||
*/
|
||||
|
||||
#include "ges-internal.h"
|
||||
#include "ges-timeline-layer.h"
|
||||
#include "ges-layer.h"
|
||||
#include "ges.h"
|
||||
#include "ges-source-clip.h"
|
||||
|
||||
static void ges_meta_container_interface_init
|
||||
(GESMetaContainerInterface * iface);
|
||||
|
||||
G_DEFINE_TYPE_WITH_CODE (GESTimelineLayer, ges_timeline_layer,
|
||||
G_DEFINE_TYPE_WITH_CODE (GESLayer, ges_layer,
|
||||
G_TYPE_INITIALLY_UNOWNED, G_IMPLEMENT_INTERFACE (GES_TYPE_EXTRACTABLE, NULL)
|
||||
G_IMPLEMENT_INTERFACE (GES_TYPE_META_CONTAINER,
|
||||
ges_meta_container_interface_init));
|
||||
|
||||
struct _GESTimelineLayerPrivate
|
||||
struct _GESLayerPrivate
|
||||
{
|
||||
/*< private > */
|
||||
GList *clips_start; /* The Clips sorted by start and
|
||||
|
@ -57,7 +57,7 @@ struct _GESTimelineLayerPrivate
|
|||
typedef struct
|
||||
{
|
||||
GESClip *clip;
|
||||
GESTimelineLayer *layer;
|
||||
GESLayer *layer;
|
||||
} NewAssetUData;
|
||||
|
||||
enum
|
||||
|
@ -75,14 +75,14 @@ enum
|
|||
LAST_SIGNAL
|
||||
};
|
||||
|
||||
static guint ges_timeline_layer_signals[LAST_SIGNAL] = { 0 };
|
||||
static guint ges_layer_signals[LAST_SIGNAL] = { 0 };
|
||||
|
||||
/* GObject standard vmethods */
|
||||
static void
|
||||
ges_timeline_layer_get_property (GObject * object, guint property_id,
|
||||
ges_layer_get_property (GObject * object, guint property_id,
|
||||
GValue * value, GParamSpec * pspec)
|
||||
{
|
||||
GESTimelineLayer *layer = GES_TIMELINE_LAYER (object);
|
||||
GESLayer *layer = GES_LAYER (object);
|
||||
|
||||
switch (property_id) {
|
||||
case PROP_PRIORITY:
|
||||
|
@ -97,18 +97,17 @@ ges_timeline_layer_get_property (GObject * object, guint property_id,
|
|||
}
|
||||
|
||||
static void
|
||||
ges_timeline_layer_set_property (GObject * object, guint property_id,
|
||||
ges_layer_set_property (GObject * object, guint property_id,
|
||||
const GValue * value, GParamSpec * pspec)
|
||||
{
|
||||
GESTimelineLayer *layer = GES_TIMELINE_LAYER (object);
|
||||
GESLayer *layer = GES_LAYER (object);
|
||||
|
||||
switch (property_id) {
|
||||
case PROP_PRIORITY:
|
||||
ges_timeline_layer_set_priority (layer, g_value_get_uint (value));
|
||||
ges_layer_set_priority (layer, g_value_get_uint (value));
|
||||
break;
|
||||
case PROP_AUTO_TRANSITION:
|
||||
ges_timeline_layer_set_auto_transition (layer,
|
||||
g_value_get_boolean (value));
|
||||
ges_layer_set_auto_transition (layer, g_value_get_boolean (value));
|
||||
break;
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
|
||||
|
@ -116,17 +115,17 @@ ges_timeline_layer_set_property (GObject * object, guint property_id,
|
|||
}
|
||||
|
||||
static void
|
||||
ges_timeline_layer_dispose (GObject * object)
|
||||
ges_layer_dispose (GObject * object)
|
||||
{
|
||||
GESTimelineLayer *layer = GES_TIMELINE_LAYER (object);
|
||||
GESTimelineLayerPrivate *priv = layer->priv;
|
||||
GESLayer *layer = GES_LAYER (object);
|
||||
GESLayerPrivate *priv = layer->priv;
|
||||
|
||||
GST_DEBUG ("Disposing layer");
|
||||
|
||||
while (priv->clips_start)
|
||||
ges_timeline_layer_remove_clip (layer, (GESClip *) priv->clips_start->data);
|
||||
ges_layer_remove_clip (layer, (GESClip *) priv->clips_start->data);
|
||||
|
||||
G_OBJECT_CLASS (ges_timeline_layer_parent_class)->dispose (object);
|
||||
G_OBJECT_CLASS (ges_layer_parent_class)->dispose (object);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -136,21 +135,21 @@ ges_meta_container_interface_init (GESMetaContainerInterface * iface)
|
|||
}
|
||||
|
||||
static void
|
||||
ges_timeline_layer_class_init (GESTimelineLayerClass * klass)
|
||||
ges_layer_class_init (GESLayerClass * klass)
|
||||
{
|
||||
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
||||
|
||||
g_type_class_add_private (klass, sizeof (GESTimelineLayerPrivate));
|
||||
g_type_class_add_private (klass, sizeof (GESLayerPrivate));
|
||||
|
||||
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->get_property = ges_layer_get_property;
|
||||
object_class->set_property = ges_layer_set_property;
|
||||
object_class->dispose = ges_layer_dispose;
|
||||
|
||||
/**
|
||||
* GESTimelineLayer:priority:
|
||||
* GESLayer:priority:
|
||||
*
|
||||
* The priority of the layer in the #GESTimeline. 0 is the highest
|
||||
* priority. Conceptually, a #GESTimeline is a stack of GESTimelineLayers,
|
||||
* priority. Conceptually, a #GESTimeline is a stack of GESLayers,
|
||||
* and the priority of the layer represents its position in the stack. Two
|
||||
* layers should not have the same priority within a given GESTimeline.
|
||||
*/
|
||||
|
@ -159,7 +158,7 @@ ges_timeline_layer_class_init (GESTimelineLayerClass * klass)
|
|||
"The priority of the layer", 0, G_MAXUINT, 0, G_PARAM_READWRITE));
|
||||
|
||||
/**
|
||||
* GESTimelineLayer:auto-transition:
|
||||
* GESLayer:auto-transition:
|
||||
*
|
||||
* Sets whether transitions are added automagically when clips overlap.
|
||||
*/
|
||||
|
@ -168,36 +167,36 @@ ges_timeline_layer_class_init (GESTimelineLayerClass * klass)
|
|||
"whether the transitions are added", FALSE, G_PARAM_READWRITE));
|
||||
|
||||
/**
|
||||
* GESTimelineLayer::clip-added:
|
||||
* @layer: the #GESTimelineLayer
|
||||
* GESLayer::clip-added:
|
||||
* @layer: the #GESLayer
|
||||
* @clip: the #GESClip that was added.
|
||||
*
|
||||
* Will be emitted after the clip was added to the layer.
|
||||
*/
|
||||
ges_timeline_layer_signals[OBJECT_ADDED] =
|
||||
ges_layer_signals[OBJECT_ADDED] =
|
||||
g_signal_new ("clip-added", G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_RUN_FIRST, G_STRUCT_OFFSET (GESTimelineLayerClass, object_added),
|
||||
G_SIGNAL_RUN_FIRST, G_STRUCT_OFFSET (GESLayerClass, object_added),
|
||||
NULL, NULL, g_cclosure_marshal_generic, G_TYPE_NONE, 1, GES_TYPE_CLIP);
|
||||
|
||||
/**
|
||||
* GESTimelineLayer::clip-removed:
|
||||
* @layer: the #GESTimelineLayer
|
||||
* GESLayer::clip-removed:
|
||||
* @layer: the #GESLayer
|
||||
* @clip: the #GESClip that was removed
|
||||
*
|
||||
* Will be emitted after the clip was removed from the layer.
|
||||
*/
|
||||
ges_timeline_layer_signals[OBJECT_REMOVED] =
|
||||
ges_layer_signals[OBJECT_REMOVED] =
|
||||
g_signal_new ("clip-removed", G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_RUN_FIRST, G_STRUCT_OFFSET (GESTimelineLayerClass,
|
||||
G_SIGNAL_RUN_FIRST, G_STRUCT_OFFSET (GESLayerClass,
|
||||
object_removed), NULL, NULL, g_cclosure_marshal_generic, G_TYPE_NONE,
|
||||
1, GES_TYPE_CLIP);
|
||||
}
|
||||
|
||||
static void
|
||||
ges_timeline_layer_init (GESTimelineLayer * self)
|
||||
ges_layer_init (GESLayer * self)
|
||||
{
|
||||
self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
|
||||
GES_TYPE_TIMELINE_LAYER, GESTimelineLayerPrivate);
|
||||
GES_TYPE_LAYER, GESLayerPrivate);
|
||||
|
||||
self->priv->priority = 0;
|
||||
self->priv->auto_transition = FALSE;
|
||||
|
@ -206,14 +205,14 @@ ges_timeline_layer_init (GESTimelineLayer * self)
|
|||
}
|
||||
|
||||
/**
|
||||
* ges_timeline_layer_resync_priorities:
|
||||
* @layer: a #GESTimelineLayer
|
||||
* ges_layer_resync_priorities:
|
||||
* @layer: a #GESLayer
|
||||
*
|
||||
* Resyncs the priorities of the objects controlled by @layer.
|
||||
* This method
|
||||
*/
|
||||
static gboolean
|
||||
ges_timeline_layer_resync_priorities (GESTimelineLayer * layer)
|
||||
ges_layer_resync_priorities (GESLayer * layer)
|
||||
{
|
||||
GList *tmp;
|
||||
GESTimelineElement *track_element;
|
||||
|
@ -268,7 +267,7 @@ new_asset_cb (GESAsset * source, GAsyncResult * res, NewAssetUData * udata)
|
|||
ges_extractable_set_asset (GES_EXTRACTABLE (udata->clip), asset);
|
||||
|
||||
ges_project_add_asset (project, asset);
|
||||
ges_timeline_layer_add_clip (udata->layer, udata->clip);
|
||||
ges_layer_add_clip (udata->layer, udata->clip);
|
||||
}
|
||||
|
||||
gst_object_unref (asset);
|
||||
|
@ -277,8 +276,8 @@ new_asset_cb (GESAsset * source, GAsyncResult * res, NewAssetUData * udata)
|
|||
|
||||
/* Public methods */
|
||||
/**
|
||||
* ges_timeline_layer_remove_clip:
|
||||
* @layer: a #GESTimelineLayer
|
||||
* ges_layer_remove_clip:
|
||||
* @layer: a #GESLayer
|
||||
* @clip: the #GESClip to remove
|
||||
*
|
||||
* Removes the given @clip from the @layer and unparents it.
|
||||
|
@ -290,11 +289,11 @@ new_asset_cb (GESAsset * source, GAsyncResult * res, NewAssetUData * udata)
|
|||
* not want to remove the clip.
|
||||
*/
|
||||
gboolean
|
||||
ges_timeline_layer_remove_clip (GESTimelineLayer * layer, GESClip * clip)
|
||||
ges_layer_remove_clip (GESLayer * layer, GESClip * clip)
|
||||
{
|
||||
GESTimelineLayer *current_layer;
|
||||
GESLayer *current_layer;
|
||||
|
||||
g_return_val_if_fail (GES_IS_TIMELINE_LAYER (layer), FALSE);
|
||||
g_return_val_if_fail (GES_IS_LAYER (layer), FALSE);
|
||||
g_return_val_if_fail (GES_IS_CLIP (clip), FALSE);
|
||||
|
||||
GST_DEBUG ("layer:%p, clip:%p", layer, clip);
|
||||
|
@ -311,7 +310,7 @@ ges_timeline_layer_remove_clip (GESTimelineLayer * layer, GESClip * clip)
|
|||
gst_object_unref (current_layer);
|
||||
|
||||
/* emit 'clip-removed' */
|
||||
g_signal_emit (layer, ges_timeline_layer_signals[OBJECT_REMOVED], 0, clip);
|
||||
g_signal_emit (layer, ges_layer_signals[OBJECT_REMOVED], 0, clip);
|
||||
|
||||
/* inform the clip it's no longer in a layer */
|
||||
ges_clip_set_layer (clip, NULL);
|
||||
|
@ -328,17 +327,17 @@ ges_timeline_layer_remove_clip (GESTimelineLayer * layer, GESClip * clip)
|
|||
}
|
||||
|
||||
/**
|
||||
* ges_timeline_layer_set_priority:
|
||||
* @layer: a #GESTimelineLayer
|
||||
* ges_layer_set_priority:
|
||||
* @layer: a #GESLayer
|
||||
* @priority: the priority to set
|
||||
*
|
||||
* Sets the layer to the given @priority. See the documentation of the
|
||||
* priority property for more information.
|
||||
*/
|
||||
void
|
||||
ges_timeline_layer_set_priority (GESTimelineLayer * layer, guint priority)
|
||||
ges_layer_set_priority (GESLayer * layer, guint priority)
|
||||
{
|
||||
g_return_if_fail (GES_IS_TIMELINE_LAYER (layer));
|
||||
g_return_if_fail (GES_IS_LAYER (layer));
|
||||
|
||||
GST_DEBUG ("layer:%p, priority:%d", layer, priority);
|
||||
|
||||
|
@ -347,13 +346,13 @@ ges_timeline_layer_set_priority (GESTimelineLayer * layer, guint priority)
|
|||
layer->min_gnl_priority = (priority * LAYER_HEIGHT);
|
||||
layer->max_gnl_priority = ((priority + 1) * LAYER_HEIGHT) - 1;
|
||||
|
||||
ges_timeline_layer_resync_priorities (layer);
|
||||
ges_layer_resync_priorities (layer);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* ges_timeline_layer_get_auto_transition:
|
||||
* @layer: a #GESTimelineLayer
|
||||
* ges_layer_get_auto_transition:
|
||||
* @layer: a #GESLayer
|
||||
*
|
||||
* Gets whether transitions are automatically added when objects
|
||||
* overlap or not.
|
||||
|
@ -361,51 +360,50 @@ ges_timeline_layer_set_priority (GESTimelineLayer * layer, guint priority)
|
|||
* Returns: %TRUE if transitions are automatically added, else %FALSE.
|
||||
*/
|
||||
gboolean
|
||||
ges_timeline_layer_get_auto_transition (GESTimelineLayer * layer)
|
||||
ges_layer_get_auto_transition (GESLayer * layer)
|
||||
{
|
||||
g_return_val_if_fail (GES_IS_TIMELINE_LAYER (layer), 0);
|
||||
g_return_val_if_fail (GES_IS_LAYER (layer), 0);
|
||||
|
||||
return layer->priv->auto_transition;
|
||||
}
|
||||
|
||||
/**
|
||||
* ges_timeline_layer_set_auto_transition:
|
||||
* @layer: a #GESTimelineLayer
|
||||
* ges_layer_set_auto_transition:
|
||||
* @layer: a #GESLayer
|
||||
* @auto_transition: whether the auto_transition is active
|
||||
*
|
||||
* Sets the layer to the given @auto_transition. See the documentation of the
|
||||
* property auto_transition for more information.
|
||||
*/
|
||||
void
|
||||
ges_timeline_layer_set_auto_transition (GESTimelineLayer * layer,
|
||||
gboolean auto_transition)
|
||||
ges_layer_set_auto_transition (GESLayer * layer, gboolean auto_transition)
|
||||
{
|
||||
|
||||
g_return_if_fail (GES_IS_TIMELINE_LAYER (layer));
|
||||
g_return_if_fail (GES_IS_LAYER (layer));
|
||||
|
||||
layer->priv->auto_transition = auto_transition;
|
||||
g_object_notify (G_OBJECT (layer), "auto-transition");
|
||||
}
|
||||
|
||||
/**
|
||||
* ges_timeline_layer_get_priority:
|
||||
* @layer: a #GESTimelineLayer
|
||||
* ges_layer_get_priority:
|
||||
* @layer: a #GESLayer
|
||||
*
|
||||
* Get the priority of @layer within the timeline.
|
||||
*
|
||||
* Returns: The priority of the @layer within the timeline.
|
||||
*/
|
||||
guint
|
||||
ges_timeline_layer_get_priority (GESTimelineLayer * layer)
|
||||
ges_layer_get_priority (GESLayer * layer)
|
||||
{
|
||||
g_return_val_if_fail (GES_IS_TIMELINE_LAYER (layer), 0);
|
||||
g_return_val_if_fail (GES_IS_LAYER (layer), 0);
|
||||
|
||||
return layer->priv->priority;
|
||||
}
|
||||
|
||||
/**
|
||||
* ges_timeline_layer_get_clips:
|
||||
* @layer: a #GESTimelineLayer
|
||||
* ges_layer_get_clips:
|
||||
* @layer: a #GESLayer
|
||||
*
|
||||
* Get the clips this layer contains.
|
||||
*
|
||||
|
@ -415,13 +413,13 @@ ges_timeline_layer_get_priority (GESTimelineLayer * layer)
|
|||
*/
|
||||
|
||||
GList *
|
||||
ges_timeline_layer_get_clips (GESTimelineLayer * layer)
|
||||
ges_layer_get_clips (GESLayer * layer)
|
||||
{
|
||||
GESTimelineLayerClass *klass;
|
||||
GESLayerClass *klass;
|
||||
|
||||
g_return_val_if_fail (GES_IS_TIMELINE_LAYER (layer), NULL);
|
||||
g_return_val_if_fail (GES_IS_LAYER (layer), NULL);
|
||||
|
||||
klass = GES_TIMELINE_LAYER_GET_CLASS (layer);
|
||||
klass = GES_LAYER_GET_CLASS (layer);
|
||||
|
||||
if (klass->get_objects) {
|
||||
return klass->get_objects (layer);
|
||||
|
@ -433,8 +431,8 @@ ges_timeline_layer_get_clips (GESTimelineLayer * layer)
|
|||
}
|
||||
|
||||
/**
|
||||
* ges_timeline_layer_is_empty:
|
||||
* @layer: The #GESTimelineLayer to check
|
||||
* ges_layer_is_empty:
|
||||
* @layer: The #GESLayer to check
|
||||
*
|
||||
* Convenience method to check if @layer is empty (doesn't contain any clip),
|
||||
* or not.
|
||||
|
@ -443,16 +441,16 @@ ges_timeline_layer_get_clips (GESTimelineLayer * layer)
|
|||
* one #GESClip
|
||||
*/
|
||||
gboolean
|
||||
ges_timeline_layer_is_empty (GESTimelineLayer * layer)
|
||||
ges_layer_is_empty (GESLayer * layer)
|
||||
{
|
||||
g_return_val_if_fail (GES_IS_TIMELINE_LAYER (layer), FALSE);
|
||||
g_return_val_if_fail (GES_IS_LAYER (layer), FALSE);
|
||||
|
||||
return (layer->priv->clips_start == NULL);
|
||||
}
|
||||
|
||||
/**
|
||||
* ges_timeline_layer_add_clip:
|
||||
* @layer: a #GESTimelineLayer
|
||||
* ges_layer_add_clip:
|
||||
* @layer: a #GESLayer
|
||||
* @clip: (transfer full): the #GESClip to add.
|
||||
*
|
||||
* Adds the given clip to the layer. Sets the clip's parent, and thus
|
||||
|
@ -469,14 +467,14 @@ ges_timeline_layer_is_empty (GESTimelineLayer * layer)
|
|||
* if the @layer refuses to add the clip.
|
||||
*/
|
||||
gboolean
|
||||
ges_timeline_layer_add_clip (GESTimelineLayer * layer, GESClip * clip)
|
||||
ges_layer_add_clip (GESLayer * layer, GESClip * clip)
|
||||
{
|
||||
GESAsset *asset;
|
||||
GESTimelineLayerPrivate *priv;
|
||||
GESTimelineLayer *current_layer;
|
||||
GESLayerPrivate *priv;
|
||||
GESLayer *current_layer;
|
||||
guint32 maxprio, minprio, prio;
|
||||
|
||||
g_return_val_if_fail (GES_IS_TIMELINE_LAYER (layer), FALSE);
|
||||
g_return_val_if_fail (GES_IS_LAYER (layer), FALSE);
|
||||
g_return_val_if_fail (GES_IS_CLIP (clip), FALSE);
|
||||
|
||||
GST_DEBUG_OBJECT (layer, "adding clip:%p", clip);
|
||||
|
@ -553,19 +551,19 @@ ges_timeline_layer_add_clip (GESTimelineLayer * layer, GESClip * clip)
|
|||
|
||||
/* If the clip has an acceptable priority, we just let it with its current
|
||||
* priority */
|
||||
ges_timeline_layer_resync_priorities (layer);
|
||||
ges_layer_resync_priorities (layer);
|
||||
ges_timeline_element_set_timeline (GES_TIMELINE_ELEMENT (clip),
|
||||
layer->timeline);
|
||||
|
||||
/* emit 'clip-added' */
|
||||
g_signal_emit (layer, ges_timeline_layer_signals[OBJECT_ADDED], 0, clip);
|
||||
g_signal_emit (layer, ges_layer_signals[OBJECT_ADDED], 0, clip);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* ges_timeline_layer_add_asset:
|
||||
* @layer: a #GESTimelineLayer
|
||||
* ges_layer_add_asset:
|
||||
* @layer: a #GESLayer
|
||||
* @asset: The asset to add to
|
||||
* @start: The start value to set on the new #GESClip
|
||||
* @inpoint: The inpoint value to set on the new #GESClip
|
||||
|
@ -578,13 +576,13 @@ ges_timeline_layer_add_clip (GESTimelineLayer * layer, GESClip * clip)
|
|||
* Returns: (transfer none): Created #GESClip
|
||||
*/
|
||||
GESClip *
|
||||
ges_timeline_layer_add_asset (GESTimelineLayer * layer,
|
||||
ges_layer_add_asset (GESLayer * layer,
|
||||
GESAsset * asset, GstClockTime start, GstClockTime inpoint,
|
||||
GstClockTime duration, GESTrackType track_types)
|
||||
{
|
||||
GESClip *clip;
|
||||
|
||||
g_return_val_if_fail (GES_IS_TIMELINE_LAYER (layer), NULL);
|
||||
g_return_val_if_fail (GES_IS_LAYER (layer), NULL);
|
||||
g_return_val_if_fail (GES_IS_ASSET (asset), NULL);
|
||||
g_return_val_if_fail (g_type_is_a (ges_asset_get_extractable_type
|
||||
(asset), GES_TYPE_CLIP), NULL);
|
||||
|
@ -605,7 +603,7 @@ ges_timeline_layer_add_asset (GESTimelineLayer * layer,
|
|||
_set_duration0 (GES_TIMELINE_ELEMENT (clip), duration);
|
||||
}
|
||||
|
||||
if (!ges_timeline_layer_add_clip (layer, clip)) {
|
||||
if (!ges_layer_add_clip (layer, clip)) {
|
||||
gst_object_unref (clip);
|
||||
|
||||
return NULL;
|
||||
|
@ -615,38 +613,37 @@ ges_timeline_layer_add_asset (GESTimelineLayer * layer,
|
|||
}
|
||||
|
||||
/**
|
||||
* ges_timeline_layer_new:
|
||||
* ges_layer_new:
|
||||
*
|
||||
* Creates a new #GESTimelineLayer.
|
||||
* Creates a new #GESLayer.
|
||||
*
|
||||
* Returns: A new #GESTimelineLayer
|
||||
* Returns: A new #GESLayer
|
||||
*/
|
||||
GESTimelineLayer *
|
||||
ges_timeline_layer_new (void)
|
||||
GESLayer *
|
||||
ges_layer_new (void)
|
||||
{
|
||||
return g_object_new (GES_TYPE_TIMELINE_LAYER, NULL);
|
||||
return g_object_new (GES_TYPE_LAYER, NULL);
|
||||
}
|
||||
|
||||
/**
|
||||
* ges_timeline_layer_get_timeline:
|
||||
* @layer: The #GESTimelineLayer to get the parent #GESTimeline from
|
||||
* ges_layer_get_timeline:
|
||||
* @layer: The #GESLayer to get the parent #GESTimeline from
|
||||
*
|
||||
* Get the #GESTimeline in which #GESTimelineLayer currently is.
|
||||
* Get the #GESTimeline in which #GESLayer currently is.
|
||||
*
|
||||
* Returns: (transfer none): the #GESTimeline in which #GESTimelineLayer
|
||||
* Returns: (transfer none): the #GESTimeline in which #GESLayer
|
||||
* currently is or %NULL if not in any timeline yet.
|
||||
*/
|
||||
GESTimeline *
|
||||
ges_timeline_layer_get_timeline (GESTimelineLayer * layer)
|
||||
ges_layer_get_timeline (GESLayer * layer)
|
||||
{
|
||||
g_return_val_if_fail (GES_IS_TIMELINE_LAYER (layer), NULL);
|
||||
g_return_val_if_fail (GES_IS_LAYER (layer), NULL);
|
||||
|
||||
return layer->timeline;
|
||||
}
|
||||
|
||||
void
|
||||
ges_timeline_layer_set_timeline (GESTimelineLayer * layer,
|
||||
GESTimeline * timeline)
|
||||
ges_layer_set_timeline (GESLayer * layer, GESTimeline * timeline)
|
||||
{
|
||||
GST_DEBUG ("layer:%p, timeline:%p", layer, timeline);
|
||||
|
|
@ -18,38 +18,38 @@
|
|||
* Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#ifndef _GES_TIMELINE_LAYER
|
||||
#define _GES_TIMELINE_LAYER
|
||||
#ifndef _GES_LAYER
|
||||
#define _GES_LAYER
|
||||
|
||||
#include <glib-object.h>
|
||||
#include <ges/ges-types.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define GES_TYPE_TIMELINE_LAYER ges_timeline_layer_get_type()
|
||||
#define GES_TYPE_LAYER ges_layer_get_type()
|
||||
|
||||
#define GES_TIMELINE_LAYER(obj) \
|
||||
(G_TYPE_CHECK_INSTANCE_CAST ((obj), GES_TYPE_TIMELINE_LAYER, GESTimelineLayer))
|
||||
#define GES_LAYER(obj) \
|
||||
(G_TYPE_CHECK_INSTANCE_CAST ((obj), GES_TYPE_LAYER, GESLayer))
|
||||
|
||||
#define GES_TIMELINE_LAYER_CLASS(klass) \
|
||||
(G_TYPE_CHECK_CLASS_CAST ((klass), GES_TYPE_TIMELINE_LAYER, GESTimelineLayerClass))
|
||||
#define GES_LAYER_CLASS(klass) \
|
||||
(G_TYPE_CHECK_CLASS_CAST ((klass), GES_TYPE_LAYER, GESLayerClass))
|
||||
|
||||
#define GES_IS_TIMELINE_LAYER(obj) \
|
||||
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), GES_TYPE_TIMELINE_LAYER))
|
||||
#define GES_IS_LAYER(obj) \
|
||||
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), GES_TYPE_LAYER))
|
||||
|
||||
#define GES_IS_TIMELINE_LAYER_CLASS(klass) \
|
||||
(G_TYPE_CHECK_CLASS_TYPE ((klass), GES_TYPE_TIMELINE_LAYER))
|
||||
#define GES_IS_LAYER_CLASS(klass) \
|
||||
(G_TYPE_CHECK_CLASS_TYPE ((klass), GES_TYPE_LAYER))
|
||||
|
||||
#define GES_TIMELINE_LAYER_GET_CLASS(obj) \
|
||||
(G_TYPE_INSTANCE_GET_CLASS ((obj), GES_TYPE_TIMELINE_LAYER, GESTimelineLayerClass))
|
||||
#define GES_LAYER_GET_CLASS(obj) \
|
||||
(G_TYPE_INSTANCE_GET_CLASS ((obj), GES_TYPE_LAYER, GESLayerClass))
|
||||
|
||||
typedef struct _GESTimelineLayerPrivate GESTimelineLayerPrivate;
|
||||
typedef struct _GESLayerPrivate GESLayerPrivate;
|
||||
|
||||
/**
|
||||
* GESTimelineLayer:
|
||||
* GESLayer:
|
||||
* @timeline: the #GESTimeline where this layer is being used.
|
||||
*/
|
||||
struct _GESTimelineLayer {
|
||||
struct _GESLayer {
|
||||
GInitiallyUnowned parent;
|
||||
|
||||
/*< public >*/
|
||||
|
@ -59,73 +59,73 @@ struct _GESTimelineLayer {
|
|||
/*< protected >*/
|
||||
guint32 min_gnl_priority, max_gnl_priority;
|
||||
|
||||
GESTimelineLayerPrivate *priv;
|
||||
GESLayerPrivate *priv;
|
||||
|
||||
/* Padding for API extension */
|
||||
gpointer _ges_reserved[GES_PADDING];
|
||||
};
|
||||
|
||||
/**
|
||||
* GESTimelineLayerClass:
|
||||
* GESLayerClass:
|
||||
* @get_objects: method to get the objects contained in the layer
|
||||
*
|
||||
* Subclasses can override the @get_objects if they can provide a more
|
||||
* efficient way of providing the list of contained #GESClip(s).
|
||||
*/
|
||||
struct _GESTimelineLayerClass {
|
||||
struct _GESLayerClass {
|
||||
/*< private >*/
|
||||
GInitiallyUnownedClass parent_class;
|
||||
|
||||
/*< public >*/
|
||||
/* virtual methods for subclasses */
|
||||
GList *(*get_objects) (GESTimelineLayer * layer);
|
||||
GList *(*get_objects) (GESLayer * layer);
|
||||
|
||||
/*< private >*/
|
||||
/* Signals */
|
||||
void (*object_added) (GESTimelineLayer * layer, GESClip * object);
|
||||
void (*object_removed) (GESTimelineLayer * layer, GESClip * object);
|
||||
void (*object_added) (GESLayer * layer, GESClip * object);
|
||||
void (*object_removed) (GESLayer * layer, GESClip * object);
|
||||
|
||||
/* Padding for API extension */
|
||||
gpointer _ges_reserved[GES_PADDING];
|
||||
};
|
||||
|
||||
GType ges_timeline_layer_get_type (void);
|
||||
GType ges_layer_get_type (void);
|
||||
|
||||
GESTimelineLayer* ges_timeline_layer_new (void);
|
||||
GESLayer* ges_layer_new (void);
|
||||
|
||||
void ges_timeline_layer_set_timeline (GESTimelineLayer * layer,
|
||||
void ges_layer_set_timeline (GESLayer * layer,
|
||||
GESTimeline * timeline);
|
||||
|
||||
GESTimeline *
|
||||
ges_timeline_layer_get_timeline (GESTimelineLayer * layer);
|
||||
ges_layer_get_timeline (GESLayer * layer);
|
||||
|
||||
gboolean ges_timeline_layer_add_clip (GESTimelineLayer * layer,
|
||||
gboolean ges_layer_add_clip (GESLayer * layer,
|
||||
GESClip * clip);
|
||||
GESClip * ges_timeline_layer_add_asset (GESTimelineLayer *layer,
|
||||
GESClip * ges_layer_add_asset (GESLayer *layer,
|
||||
GESAsset *asset,
|
||||
GstClockTime start,
|
||||
GstClockTime inpoint,
|
||||
GstClockTime duration,
|
||||
GESTrackType track_types);
|
||||
|
||||
gboolean ges_timeline_layer_remove_clip (GESTimelineLayer * layer,
|
||||
gboolean ges_layer_remove_clip (GESLayer * layer,
|
||||
GESClip * clip);
|
||||
|
||||
void ges_timeline_layer_set_priority (GESTimelineLayer * layer,
|
||||
void ges_layer_set_priority (GESLayer * layer,
|
||||
guint priority);
|
||||
|
||||
gboolean ges_timeline_layer_is_empty (GESTimelineLayer * layer);
|
||||
gboolean ges_layer_is_empty (GESLayer * layer);
|
||||
|
||||
guint ges_timeline_layer_get_priority (GESTimelineLayer * layer);
|
||||
guint ges_layer_get_priority (GESLayer * layer);
|
||||
|
||||
gboolean ges_timeline_layer_get_auto_transition (GESTimelineLayer * layer);
|
||||
gboolean ges_layer_get_auto_transition (GESLayer * layer);
|
||||
|
||||
void ges_timeline_layer_set_auto_transition (GESTimelineLayer * layer,
|
||||
void ges_layer_set_auto_transition (GESLayer * layer,
|
||||
gboolean auto_transition);
|
||||
|
||||
GList* ges_timeline_layer_get_clips (GESTimelineLayer * layer);
|
||||
GList* ges_layer_get_clips (GESLayer * layer);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* _GES_TIMELINE_LAYER */
|
||||
#endif /* _GES_LAYER */
|
||||
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
/**
|
||||
* SECTION:ges-operation-clip
|
||||
* @short_description: Base Class for operations in a GESTimelineLayer
|
||||
* @short_description: Base Class for operations in a GESLayer
|
||||
*
|
||||
* Operations are any kind of object that both outputs AND consumes data.
|
||||
*/
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
/**
|
||||
* SECTION:ges-overlay-clip
|
||||
* @short_description: Base Class for overlays in a GESTimelineLayer
|
||||
* @short_description: Base Class for overlays in a GESLayer
|
||||
*
|
||||
* Overlays are objects which modify the underlying layer(s).
|
||||
*
|
||||
|
|
|
@ -444,7 +444,7 @@ make_source (GESFormatter * self, GList * reflist, GHashTable * source_table)
|
|||
{
|
||||
GHashTable *props_table, *effect_table;
|
||||
gchar **prio_array;
|
||||
GESTimelineLayer *layer;
|
||||
GESLayer *layer;
|
||||
GESPitiviFormatterPrivate *priv = GES_PITIVI_FORMATTER (self)->priv;
|
||||
|
||||
gchar *fac_ref = NULL, *media_type = NULL, *filename = NULL, *prio_str;
|
||||
|
@ -465,7 +465,7 @@ make_source (GESFormatter * self, GList * reflist, GHashTable * source_table)
|
|||
|
||||
/* If we do not have any layer with this priority, create it */
|
||||
if (!(layer = g_hash_table_lookup (priv->layers_table, &prio))) {
|
||||
layer = ges_timeline_layer_new ();
|
||||
layer = ges_layer_new ();
|
||||
g_object_set (layer, "auto-transition", TRUE, "priority", prio, NULL);
|
||||
ges_timeline_add_layer (self->timeline, layer);
|
||||
g_hash_table_insert (priv->layers_table, g_memdup (&prio,
|
||||
|
@ -514,7 +514,7 @@ make_source (GESFormatter * self, GList * reflist, GHashTable * source_table)
|
|||
}
|
||||
|
||||
set_properties (G_OBJECT (src), props_table);
|
||||
ges_timeline_layer_add_clip (layer, GES_CLIP (src));
|
||||
ges_layer_add_clip (layer, GES_CLIP (src));
|
||||
|
||||
g_signal_connect (src, "child-added",
|
||||
G_CALLBACK (track_element_added_cb), props_table);
|
||||
|
@ -609,14 +609,14 @@ load_pitivi_file_from_uri (GESFormatter * self,
|
|||
GESTimeline * timeline, const gchar * uri, GError ** error)
|
||||
{
|
||||
xmlDocPtr doc;
|
||||
GESTimelineLayer *layer;
|
||||
GESLayer *layer;
|
||||
GESPitiviFormatterPrivate *priv = GES_PITIVI_FORMATTER (self)->priv;
|
||||
|
||||
gboolean ret = TRUE;
|
||||
gint *prio = malloc (sizeof (gint));
|
||||
|
||||
*prio = 0;
|
||||
layer = ges_timeline_layer_new ();
|
||||
layer = ges_layer_new ();
|
||||
g_object_set (layer, "auto-transition", TRUE, NULL);
|
||||
|
||||
g_hash_table_insert (priv->layers_table, prio, layer);
|
||||
|
|
|
@ -19,12 +19,12 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* SECTION:ges-simple-timeline-layer
|
||||
* @short_description: High-level GESTimelineLayer
|
||||
* SECTION:ges-simple-layer
|
||||
* @short_description: High-level GESLayer
|
||||
*
|
||||
* #GESSimpleTimelineLayer allows using #GESClip(s) with a list-like
|
||||
* #GESSimpleLayer allows using #GESClip(s) with a list-like
|
||||
* API. Clients can add any type of GESClip to a
|
||||
* GESSimpleTimelineLayer, and the layer will automatically compute the
|
||||
* GESSimpleLayer, and the layer will automatically compute the
|
||||
* appropriate start times.
|
||||
*
|
||||
* Users should be aware that GESBaseTransitionClip objects are considered to
|
||||
|
@ -36,24 +36,19 @@
|
|||
#include <ges/ges.h>
|
||||
#include "ges-internal.h"
|
||||
|
||||
static void
|
||||
ges_simple_timeline_layer_object_removed (GESTimelineLayer * layer,
|
||||
GESClip * clip);
|
||||
static void ges_simple_layer_object_removed (GESLayer * layer, GESClip * clip);
|
||||
|
||||
static void
|
||||
ges_simple_timeline_layer_object_added (GESTimelineLayer * layer,
|
||||
GESClip * clip);
|
||||
static void ges_simple_layer_object_added (GESLayer * layer, GESClip * clip);
|
||||
|
||||
static void
|
||||
clip_height_changed_cb (GESClip * clip G_GNUC_UNUSED,
|
||||
GParamSpec * arg G_GNUC_UNUSED, GESSimpleTimelineLayer * layer);
|
||||
GParamSpec * arg G_GNUC_UNUSED, GESSimpleLayer * layer);
|
||||
|
||||
static GList *get_objects (GESTimelineLayer * layer);
|
||||
static GList *get_objects (GESLayer * layer);
|
||||
|
||||
G_DEFINE_TYPE (GESSimpleTimelineLayer, ges_simple_timeline_layer,
|
||||
GES_TYPE_TIMELINE_LAYER);
|
||||
G_DEFINE_TYPE (GESSimpleLayer, ges_simple_layer, GES_TYPE_LAYER);
|
||||
|
||||
struct _GESSimpleTimelineLayerPrivate
|
||||
struct _GESSimpleLayerPrivate
|
||||
{
|
||||
/* Sorted list of objects */
|
||||
GList *objects;
|
||||
|
@ -78,11 +73,11 @@ enum
|
|||
static guint gstl_signals[LAST_SIGNAL] = { 0 };
|
||||
|
||||
static void
|
||||
ges_simple_timeline_layer_get_property (GObject * object,
|
||||
ges_simple_layer_get_property (GObject * object,
|
||||
guint property_id, GValue * value, GParamSpec * pspec)
|
||||
{
|
||||
GESSimpleTimelineLayer *self;
|
||||
self = GES_SIMPLE_TIMELINE_LAYER (object);
|
||||
GESSimpleLayer *self;
|
||||
self = GES_SIMPLE_LAYER (object);
|
||||
|
||||
switch (property_id) {
|
||||
case PROP_VALID:
|
||||
|
@ -94,7 +89,7 @@ ges_simple_timeline_layer_get_property (GObject * object,
|
|||
}
|
||||
|
||||
static void
|
||||
ges_simple_timeline_layer_set_property (GObject * object, guint property_id,
|
||||
ges_simple_layer_set_property (GObject * object, guint property_id,
|
||||
const GValue * value, GParamSpec * pspec)
|
||||
{
|
||||
switch (property_id) {
|
||||
|
@ -104,23 +99,23 @@ ges_simple_timeline_layer_set_property (GObject * object, guint property_id,
|
|||
}
|
||||
|
||||
static void
|
||||
ges_simple_timeline_layer_class_init (GESSimpleTimelineLayerClass * klass)
|
||||
ges_simple_layer_class_init (GESSimpleLayerClass * klass)
|
||||
{
|
||||
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
||||
GESTimelineLayerClass *layer_class = GES_TIMELINE_LAYER_CLASS (klass);
|
||||
GESLayerClass *layer_class = GES_LAYER_CLASS (klass);
|
||||
|
||||
g_type_class_add_private (klass, sizeof (GESSimpleTimelineLayerPrivate));
|
||||
g_type_class_add_private (klass, sizeof (GESSimpleLayerPrivate));
|
||||
|
||||
object_class->get_property = ges_simple_timeline_layer_get_property;
|
||||
object_class->set_property = ges_simple_timeline_layer_set_property;
|
||||
object_class->get_property = ges_simple_layer_get_property;
|
||||
object_class->set_property = ges_simple_layer_set_property;
|
||||
|
||||
/* Be informed when objects are being added/removed from elsewhere */
|
||||
layer_class->object_removed = ges_simple_timeline_layer_object_removed;
|
||||
layer_class->object_added = ges_simple_timeline_layer_object_added;
|
||||
layer_class->object_removed = ges_simple_layer_object_removed;
|
||||
layer_class->object_added = ges_simple_layer_object_added;
|
||||
layer_class->get_objects = get_objects;
|
||||
|
||||
/**
|
||||
* GESSimpleTimelineLayer:valid:
|
||||
* GESSimpleLayer:valid:
|
||||
*
|
||||
* FALSE when the arrangement of objects in the layer would cause errors or
|
||||
* unexpected output during playback. Do not set the containing pipeline
|
||||
|
@ -131,34 +126,34 @@ ges_simple_timeline_layer_class_init (GESSimpleTimelineLayerClass * klass)
|
|||
"Layer is in a valid configuration", FALSE, G_PARAM_READABLE));
|
||||
|
||||
/**
|
||||
* GESSimpleTimelineLayer::object-moved:
|
||||
* @layer: the #GESSimpleTimelineLayer
|
||||
* GESSimpleLayer::object-moved:
|
||||
* @layer: the #GESSimpleLayer
|
||||
* @object: the #GESClip that was added
|
||||
* @old: the previous position of the object
|
||||
* @new: the new position of the object
|
||||
*
|
||||
* Will be emitted when an object is moved with
|
||||
* #ges_simple_timeline_layer_move_object.
|
||||
* #ges_simple_layer_move_object.
|
||||
*/
|
||||
gstl_signals[OBJECT_MOVED] =
|
||||
g_signal_new ("object-moved", G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_RUN_FIRST, G_STRUCT_OFFSET (GESSimpleTimelineLayerClass,
|
||||
G_SIGNAL_RUN_FIRST, G_STRUCT_OFFSET (GESSimpleLayerClass,
|
||||
object_moved),
|
||||
NULL, NULL, g_cclosure_marshal_generic, G_TYPE_NONE, 3,
|
||||
GES_TYPE_CLIP, G_TYPE_INT, G_TYPE_INT);
|
||||
}
|
||||
|
||||
static void
|
||||
ges_simple_timeline_layer_init (GESSimpleTimelineLayer * self)
|
||||
ges_simple_layer_init (GESSimpleLayer * self)
|
||||
{
|
||||
self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
|
||||
GES_TYPE_SIMPLE_TIMELINE_LAYER, GESSimpleTimelineLayerPrivate);
|
||||
GES_TYPE_SIMPLE_LAYER, GESSimpleLayerPrivate);
|
||||
|
||||
self->priv->objects = NULL;
|
||||
}
|
||||
|
||||
static void
|
||||
gstl_recalculate (GESSimpleTimelineLayer * self)
|
||||
gstl_recalculate (GESSimpleLayer * self)
|
||||
{
|
||||
GList *tmp;
|
||||
gint64 pos = 0;
|
||||
|
@ -168,9 +163,9 @@ gstl_recalculate (GESSimpleTimelineLayer * self)
|
|||
GESClip *prev_object = NULL;
|
||||
GESClip *prev_transition = NULL;
|
||||
gboolean valid = TRUE;
|
||||
GESSimpleTimelineLayerPrivate *priv = self->priv;
|
||||
GESSimpleLayerPrivate *priv = self->priv;
|
||||
|
||||
priority = GES_TIMELINE_LAYER (self)->min_gnl_priority + 2;
|
||||
priority = GES_LAYER (self)->min_gnl_priority + 2;
|
||||
|
||||
GST_DEBUG ("recalculating values");
|
||||
|
||||
|
@ -268,7 +263,7 @@ gstl_recalculate (GESSimpleTimelineLayer * self)
|
|||
GST_DEBUG ("Finished recalculating: final start pos is: %" GST_TIME_FORMAT,
|
||||
GST_TIME_ARGS (pos));
|
||||
|
||||
GES_TIMELINE_LAYER (self)->max_gnl_priority = priority;
|
||||
GES_LAYER (self)->max_gnl_priority = priority;
|
||||
|
||||
if (valid != self->priv->valid) {
|
||||
self->priv->valid = valid;
|
||||
|
@ -277,8 +272,8 @@ gstl_recalculate (GESSimpleTimelineLayer * self)
|
|||
}
|
||||
|
||||
/**
|
||||
* ges_simple_timeline_layer_add_object:
|
||||
* @layer: a #GESSimpleTimelineLayer
|
||||
* ges_simple_layer_add_object:
|
||||
* @layer: a #GESSimpleLayer
|
||||
* @object: the #GESClip to add
|
||||
* @position: the position at which to add the object
|
||||
*
|
||||
|
@ -296,12 +291,12 @@ gstl_recalculate (GESSimpleTimelineLayer * self)
|
|||
* Returns: TRUE if the object was successfuly added, else FALSE.
|
||||
*/
|
||||
gboolean
|
||||
ges_simple_timeline_layer_add_object (GESSimpleTimelineLayer * layer,
|
||||
ges_simple_layer_add_object (GESSimpleLayer * layer,
|
||||
GESClip * clip, gint position)
|
||||
{
|
||||
gboolean res;
|
||||
GList *nth;
|
||||
GESSimpleTimelineLayerPrivate *priv = layer->priv;
|
||||
GESSimpleLayerPrivate *priv = layer->priv;
|
||||
|
||||
GST_DEBUG ("layer:%p, clip:%p, position:%d", layer, clip, position);
|
||||
|
||||
|
@ -327,7 +322,7 @@ ges_simple_timeline_layer_add_object (GESSimpleTimelineLayer * layer,
|
|||
/* provisionally insert the clip */
|
||||
priv->objects = g_list_insert (priv->objects, clip, position);
|
||||
|
||||
res = ges_timeline_layer_add_clip ((GESTimelineLayer *) layer, clip);
|
||||
res = ges_layer_add_clip ((GESLayer *) layer, clip);
|
||||
|
||||
/* Add to layer */
|
||||
if (G_UNLIKELY (!res)) {
|
||||
|
@ -352,8 +347,8 @@ ges_simple_timeline_layer_add_object (GESSimpleTimelineLayer * layer,
|
|||
}
|
||||
|
||||
/**
|
||||
* ges_simple_timeline_layer_nth:
|
||||
* @layer: a #GESSimpleTimelineLayer
|
||||
* ges_simple_layer_nth:
|
||||
* @layer: a #GESSimpleLayer
|
||||
* @position: The position in position to get, starting from 0.
|
||||
*
|
||||
* Gets the clip at the given position.
|
||||
|
@ -363,10 +358,10 @@ ges_simple_timeline_layer_add_object (GESSimpleTimelineLayer * layer,
|
|||
*/
|
||||
|
||||
GESClip *
|
||||
ges_simple_timeline_layer_nth (GESSimpleTimelineLayer * layer, gint position)
|
||||
ges_simple_layer_nth (GESSimpleLayer * layer, gint position)
|
||||
{
|
||||
GList *list;
|
||||
GESSimpleTimelineLayerPrivate *priv = layer->priv;
|
||||
GESSimpleLayerPrivate *priv = layer->priv;
|
||||
|
||||
list = g_list_nth (priv->objects, position);
|
||||
|
||||
|
@ -377,8 +372,8 @@ ges_simple_timeline_layer_nth (GESSimpleTimelineLayer * layer, gint position)
|
|||
}
|
||||
|
||||
/**
|
||||
* ges_simple_timeline_layer_index:
|
||||
* @layer: a #GESSimpleTimelineLayer
|
||||
* ges_simple_layer_index:
|
||||
* @layer: a #GESSimpleLayer
|
||||
* @clip: a #GESClip in the layer
|
||||
*
|
||||
* Gets the position of the given clip within the given layer.
|
||||
|
@ -387,15 +382,15 @@ ges_simple_timeline_layer_nth (GESSimpleTimelineLayer * layer, gint position)
|
|||
* clip was not found.
|
||||
*/
|
||||
gint
|
||||
ges_simple_timeline_layer_index (GESSimpleTimelineLayer * layer, GESClip * clip)
|
||||
ges_simple_layer_index (GESSimpleLayer * layer, GESClip * clip)
|
||||
{
|
||||
GESSimpleTimelineLayerPrivate *priv = layer->priv;
|
||||
GESSimpleLayerPrivate *priv = layer->priv;
|
||||
return g_list_index (priv->objects, clip);
|
||||
}
|
||||
|
||||
/**
|
||||
* ges_simple_timeline_layer_move_object:
|
||||
* @layer: a #GESSimpleTimelineLayer
|
||||
* ges_simple_layer_move_object:
|
||||
* @layer: a #GESSimpleLayer
|
||||
* @clip: the #GESClip to move
|
||||
* @newposition: the new position at which to move the clip
|
||||
*
|
||||
|
@ -406,17 +401,17 @@ ges_simple_timeline_layer_index (GESSimpleTimelineLayer * layer, GESClip * clip)
|
|||
* Returns: TRUE if the clip was successfuly moved, else FALSE.
|
||||
*/
|
||||
gboolean
|
||||
ges_simple_timeline_layer_move_object (GESSimpleTimelineLayer * layer,
|
||||
ges_simple_layer_move_object (GESSimpleLayer * layer,
|
||||
GESClip * clip, gint newposition)
|
||||
{
|
||||
gint idx;
|
||||
GESSimpleTimelineLayerPrivate *priv = layer->priv;
|
||||
GESTimelineLayer *clip_layer;
|
||||
GESSimpleLayerPrivate *priv = layer->priv;
|
||||
GESLayer *clip_layer;
|
||||
|
||||
GST_DEBUG ("layer:%p, clip:%p, newposition:%d", layer, clip, newposition);
|
||||
|
||||
clip_layer = ges_clip_get_layer (clip);
|
||||
if (G_UNLIKELY (clip_layer != (GESTimelineLayer *) layer)) {
|
||||
if (G_UNLIKELY (clip_layer != (GESLayer *) layer)) {
|
||||
GST_WARNING ("Clip doesn't belong to this layer");
|
||||
if (clip_layer != NULL)
|
||||
gst_object_unref (clip_layer);
|
||||
|
@ -453,22 +448,22 @@ ges_simple_timeline_layer_move_object (GESSimpleTimelineLayer * layer,
|
|||
}
|
||||
|
||||
/**
|
||||
* ges_simple_timeline_layer_new:
|
||||
* ges_simple_layer_new:
|
||||
*
|
||||
* Creates a new #GESSimpleTimelineLayer.
|
||||
* Creates a new #GESSimpleLayer.
|
||||
*
|
||||
* Returns: The new #GESSimpleTimelineLayer
|
||||
* Returns: The new #GESSimpleLayer
|
||||
*/
|
||||
GESSimpleTimelineLayer *
|
||||
ges_simple_timeline_layer_new (void)
|
||||
GESSimpleLayer *
|
||||
ges_simple_layer_new (void)
|
||||
{
|
||||
return g_object_new (GES_TYPE_SIMPLE_TIMELINE_LAYER, NULL);
|
||||
return g_object_new (GES_TYPE_SIMPLE_LAYER, NULL);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* ges_simple_timeline_layer_is_valid:
|
||||
* @layer: a #GESSimpleTimelineLayer
|
||||
* ges_simple_layer_is_valid:
|
||||
* @layer: a #GESSimpleLayer
|
||||
*
|
||||
* Checks whether the arrangement of objects in the layer would cause errors
|
||||
* or unexpected output during playback. Do not set the containing pipeline
|
||||
|
@ -477,16 +472,15 @@ ges_simple_timeline_layer_new (void)
|
|||
* Returns: #TRUE if current arrangement of the layer is valid else #FALSE.
|
||||
*/
|
||||
gboolean
|
||||
ges_simple_timeline_layer_is_valid (GESSimpleTimelineLayer * layer)
|
||||
ges_simple_layer_is_valid (GESSimpleLayer * layer)
|
||||
{
|
||||
return layer->priv->valid;
|
||||
}
|
||||
|
||||
static void
|
||||
ges_simple_timeline_layer_object_removed (GESTimelineLayer * layer,
|
||||
GESClip * clip)
|
||||
ges_simple_layer_object_removed (GESLayer * layer, GESClip * clip)
|
||||
{
|
||||
GESSimpleTimelineLayer *sl = (GESSimpleTimelineLayer *) layer;
|
||||
GESSimpleLayer *sl = (GESSimpleLayer *) layer;
|
||||
|
||||
/* remove clip from our list */
|
||||
sl->priv->objects = g_list_remove (sl->priv->objects, clip);
|
||||
|
@ -494,10 +488,9 @@ ges_simple_timeline_layer_object_removed (GESTimelineLayer * layer,
|
|||
}
|
||||
|
||||
static void
|
||||
ges_simple_timeline_layer_object_added (GESTimelineLayer * layer,
|
||||
GESClip * clip)
|
||||
ges_simple_layer_object_added (GESLayer * layer, GESClip * clip)
|
||||
{
|
||||
GESSimpleTimelineLayer *sl = (GESSimpleTimelineLayer *) layer;
|
||||
GESSimpleLayer *sl = (GESSimpleLayer *) layer;
|
||||
|
||||
if (sl->priv->adding_object == FALSE) {
|
||||
/* remove clip from our list */
|
||||
|
@ -510,18 +503,18 @@ ges_simple_timeline_layer_object_added (GESTimelineLayer * layer,
|
|||
|
||||
static void
|
||||
clip_height_changed_cb (GESClip * clip,
|
||||
GParamSpec * arg G_GNUC_UNUSED, GESSimpleTimelineLayer * layer)
|
||||
GParamSpec * arg G_GNUC_UNUSED, GESSimpleLayer * layer)
|
||||
{
|
||||
GST_LOG ("layer %p: notify height changed %p", layer, clip);
|
||||
gstl_recalculate (layer);
|
||||
}
|
||||
|
||||
static GList *
|
||||
get_objects (GESTimelineLayer * l)
|
||||
get_objects (GESLayer * l)
|
||||
{
|
||||
GList *ret;
|
||||
GList *tmp;
|
||||
GESSimpleTimelineLayer *layer = (GESSimpleTimelineLayer *) l;
|
||||
GESSimpleLayer *layer = (GESSimpleLayer *) l;
|
||||
|
||||
ret = g_list_copy (layer->priv->objects);
|
||||
|
101
ges/ges-simple-layer.h
Normal file
101
ges/ges-simple-layer.h
Normal file
|
@ -0,0 +1,101 @@
|
|||
/* 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., 51 Franklin St, Fifth Floor,
|
||||
* Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#ifndef _GES_SIMPLE_LAYER
|
||||
#define _GES_SIMPLE_LAYER
|
||||
|
||||
#include <glib-object.h>
|
||||
#include <ges/ges-types.h>
|
||||
#include <ges/ges-layer.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define GES_TYPE_SIMPLE_LAYER ges_simple_layer_get_type()
|
||||
|
||||
#define GES_SIMPLE_LAYER(obj) \
|
||||
(G_TYPE_CHECK_INSTANCE_CAST ((obj), GES_TYPE_SIMPLE_LAYER, GESSimpleLayer))
|
||||
|
||||
#define GES_SIMPLE_LAYER_CLASS(klass) \
|
||||
(G_TYPE_CHECK_CLASS_CAST ((klass), GES_TYPE_SIMPLE_LAYER, GESSimpleLayerClass))
|
||||
|
||||
#define GES_IS_SIMPLE_LAYER(obj) \
|
||||
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), GES_TYPE_SIMPLE_LAYER))
|
||||
|
||||
#define GES_IS_SIMPLE_LAYER_CLASS(klass) \
|
||||
(G_TYPE_CHECK_CLASS_TYPE ((klass), GES_TYPE_SIMPLE_LAYER))
|
||||
|
||||
#define GES_SIMPLE_LAYER_GET_CLASS(obj) \
|
||||
(G_TYPE_INSTANCE_GET_CLASS ((obj), GES_TYPE_SIMPLE_LAYER, GESSimpleLayerClass))
|
||||
|
||||
typedef struct _GESSimpleLayerPrivate GESSimpleLayerPrivate;
|
||||
|
||||
/**
|
||||
* GESSimpleLayer:
|
||||
*/
|
||||
|
||||
struct _GESSimpleLayer {
|
||||
/*< private >*/
|
||||
GESLayer parent;
|
||||
|
||||
GESSimpleLayerPrivate *priv;
|
||||
|
||||
/* Padding for API extension */
|
||||
gpointer _ges_reserved[GES_PADDING];
|
||||
};
|
||||
|
||||
struct _GESSimpleLayerClass {
|
||||
/*< private >*/
|
||||
GESLayerClass parent_class;
|
||||
|
||||
/*< signals >*/
|
||||
void (*object_moved) (GESLayer * layer, GESClip * object,
|
||||
gint old_position, gint new_position);
|
||||
|
||||
/* Padding for API extension */
|
||||
gpointer _ges_reserved[GES_PADDING];
|
||||
};
|
||||
|
||||
GType ges_simple_layer_get_type (void);
|
||||
|
||||
GESSimpleLayer* ges_simple_layer_new (void);
|
||||
|
||||
gboolean
|
||||
ges_simple_layer_add_object (GESSimpleLayer *layer,
|
||||
GESClip *object, gint position);
|
||||
|
||||
gboolean
|
||||
ges_simple_layer_move_object (GESSimpleLayer *layer,
|
||||
GESClip *clip, gint newposition);
|
||||
|
||||
gboolean
|
||||
ges_simple_layer_is_valid (GESSimpleLayer *layer);
|
||||
|
||||
GESClip *
|
||||
ges_simple_layer_nth (GESSimpleLayer *layer,
|
||||
gint position);
|
||||
|
||||
gint
|
||||
ges_simple_layer_index (GESSimpleLayer *layer,
|
||||
GESClip *clip);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* _GES_SIMPLE_LAYER */
|
||||
|
|
@ -1,101 +0,0 @@
|
|||
/* 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., 51 Franklin St, Fifth Floor,
|
||||
* Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
#ifndef _GES_SIMPLE_TIMELINE_LAYER
|
||||
#define _GES_SIMPLE_TIMELINE_LAYER
|
||||
|
||||
#include <glib-object.h>
|
||||
#include <ges/ges-types.h>
|
||||
#include <ges/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 _GESSimpleTimelineLayerPrivate GESSimpleTimelineLayerPrivate;
|
||||
|
||||
/**
|
||||
* GESSimpleTimelineLayer:
|
||||
*/
|
||||
|
||||
struct _GESSimpleTimelineLayer {
|
||||
/*< private >*/
|
||||
GESTimelineLayer parent;
|
||||
|
||||
GESSimpleTimelineLayerPrivate *priv;
|
||||
|
||||
/* Padding for API extension */
|
||||
gpointer _ges_reserved[GES_PADDING];
|
||||
};
|
||||
|
||||
struct _GESSimpleTimelineLayerClass {
|
||||
/*< private >*/
|
||||
GESTimelineLayerClass parent_class;
|
||||
|
||||
/*< signals >*/
|
||||
void (*object_moved) (GESTimelineLayer * layer, GESClip * object,
|
||||
gint old_position, gint new_position);
|
||||
|
||||
/* Padding for API extension */
|
||||
gpointer _ges_reserved[GES_PADDING];
|
||||
};
|
||||
|
||||
GType ges_simple_timeline_layer_get_type (void);
|
||||
|
||||
GESSimpleTimelineLayer* ges_simple_timeline_layer_new (void);
|
||||
|
||||
gboolean
|
||||
ges_simple_timeline_layer_add_object (GESSimpleTimelineLayer *layer,
|
||||
GESClip *object, gint position);
|
||||
|
||||
gboolean
|
||||
ges_simple_timeline_layer_move_object (GESSimpleTimelineLayer *layer,
|
||||
GESClip *clip, gint newposition);
|
||||
|
||||
gboolean
|
||||
ges_simple_timeline_layer_is_valid (GESSimpleTimelineLayer *layer);
|
||||
|
||||
GESClip *
|
||||
ges_simple_timeline_layer_nth (GESSimpleTimelineLayer *layer,
|
||||
gint position);
|
||||
|
||||
gint
|
||||
ges_simple_timeline_layer_index (GESSimpleTimelineLayer *layer,
|
||||
GESClip *clip);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* _GES_SIMPLE_TIMELINE_LAYER */
|
||||
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
/**
|
||||
* SECTION:ges-source-clip
|
||||
* @short_description: Base Class for sources of a GESTimelineLayer
|
||||
* @short_description: Base Class for sources of a GESLayer
|
||||
*/
|
||||
|
||||
#include "ges-internal.h"
|
||||
|
|
|
@ -50,7 +50,7 @@ typedef struct _GESSourceClipPrivate GESSourceClipPrivate;
|
|||
/**
|
||||
* GESSourceClip:
|
||||
*
|
||||
* Base class for sources of a #GESTimelineLayer
|
||||
* Base class for sources of a #GESLayer
|
||||
*/
|
||||
|
||||
struct _GESSourceClip {
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
/**
|
||||
* SECTION:ges-test-clip
|
||||
* @short_description: Render video and audio test patterns in a
|
||||
* #GESTimelineLayer
|
||||
* #GESLayer
|
||||
*
|
||||
* Useful for testing purposes.
|
||||
*
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
/**
|
||||
* SECTION:ges-text-overlay-clip
|
||||
* @short_description: Render text onto another stream in a GESTimelineLayer
|
||||
* @short_description: Render text onto another stream in a GESLayer
|
||||
*
|
||||
* Renders text onto the next lower priority stream using textrender.
|
||||
*/
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
/**
|
||||
* SECTION:ges-text-overlay
|
||||
* @short_description: render text onto another video stream in a
|
||||
* #GESTimelineLayer
|
||||
* #GESLayer
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
*
|
||||
* #GESTimeline is the central object for any multimedia timeline.
|
||||
*
|
||||
* Contains a list of #GESTimelineLayer which users should use to arrange the
|
||||
* Contains a list of #GESLayer which users should use to arrange the
|
||||
* various clips through time.
|
||||
*
|
||||
* The output type is determined by the #GESTrack that are set on
|
||||
|
@ -42,7 +42,7 @@
|
|||
#include "ges-container.h"
|
||||
#include "ges-timeline.h"
|
||||
#include "ges-track.h"
|
||||
#include "ges-timeline-layer.h"
|
||||
#include "ges-layer.h"
|
||||
#include "ges-auto-transition.h"
|
||||
#include "ges.h"
|
||||
|
||||
|
@ -72,7 +72,7 @@ typedef struct TrackObjIters
|
|||
GSequenceIter *iter_obj;
|
||||
GSequenceIter *iter_by_layer;
|
||||
|
||||
GESTimelineLayer *layer;
|
||||
GESLayer *layer;
|
||||
GESTrackElement *trackelement;
|
||||
} TrackObjIters;
|
||||
|
||||
|
@ -142,7 +142,7 @@ struct _GESTimelinePrivate
|
|||
|
||||
GList *priv_tracks;
|
||||
/* FIXME: We should definitly offer an API over this,
|
||||
* probably through a ges_timeline_layer_get_track_elements () method */
|
||||
* probably through a ges_layer_get_track_elements () method */
|
||||
GHashTable *by_layer; /* {layer: GSequence of TrackElement by start/priorities} */
|
||||
|
||||
/* The set of auto_transitions we control, currently the key is
|
||||
|
@ -291,7 +291,7 @@ ges_timeline_dispose (GObject * object)
|
|||
GESTimelinePrivate *priv = tl->priv;
|
||||
|
||||
while (tl->layers) {
|
||||
GESTimelineLayer *layer = (GESTimelineLayer *) tl->layers->data;
|
||||
GESLayer *layer = (GESLayer *) tl->layers->data;
|
||||
ges_timeline_remove_layer (GES_TIMELINE (object), layer);
|
||||
}
|
||||
|
||||
|
@ -429,28 +429,26 @@ ges_timeline_class_init (GESTimelineClass * klass)
|
|||
/**
|
||||
* GESTimeline::layer-added:
|
||||
* @timeline: the #GESTimeline
|
||||
* @layer: the #GESTimelineLayer that was added to the timeline
|
||||
* @layer: the #GESLayer that was added to the timeline
|
||||
*
|
||||
* Will be emitted after the layer was added to the timeline.
|
||||
*/
|
||||
ges_timeline_signals[LAYER_ADDED] =
|
||||
g_signal_new ("layer-added", G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_RUN_FIRST, G_STRUCT_OFFSET (GESTimelineClass, layer_added), NULL,
|
||||
NULL, g_cclosure_marshal_generic, G_TYPE_NONE, 1,
|
||||
GES_TYPE_TIMELINE_LAYER);
|
||||
NULL, g_cclosure_marshal_generic, G_TYPE_NONE, 1, GES_TYPE_LAYER);
|
||||
|
||||
/**
|
||||
* GESTimeline::layer-removed:
|
||||
* @timeline: the #GESTimeline
|
||||
* @layer: the #GESTimelineLayer that was removed from the timeline
|
||||
* @layer: the #GESLayer that was removed from the timeline
|
||||
*
|
||||
* Will be emitted after the layer was removed from the timeline.
|
||||
*/
|
||||
ges_timeline_signals[LAYER_REMOVED] =
|
||||
g_signal_new ("layer-removed", G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_RUN_FIRST, G_STRUCT_OFFSET (GESTimelineClass, layer_removed),
|
||||
NULL, NULL, g_cclosure_marshal_generic, G_TYPE_NONE, 1,
|
||||
GES_TYPE_TIMELINE_LAYER);
|
||||
NULL, NULL, g_cclosure_marshal_generic, G_TYPE_NONE, 1, GES_TYPE_LAYER);
|
||||
|
||||
/**
|
||||
* GESTimeline::track-elements-snapping:
|
||||
|
@ -547,14 +545,14 @@ ges_timeline_init (GESTimeline * self)
|
|||
static gint
|
||||
sort_layers (gpointer a, gpointer b)
|
||||
{
|
||||
GESTimelineLayer *layer_a, *layer_b;
|
||||
GESLayer *layer_a, *layer_b;
|
||||
guint prio_a, prio_b;
|
||||
|
||||
layer_a = GES_TIMELINE_LAYER (a);
|
||||
layer_b = GES_TIMELINE_LAYER (b);
|
||||
layer_a = GES_LAYER (a);
|
||||
layer_b = GES_LAYER (b);
|
||||
|
||||
prio_a = ges_timeline_layer_get_priority (layer_a);
|
||||
prio_b = ges_timeline_layer_get_priority (layer_b);
|
||||
prio_a = ges_layer_get_priority (layer_a);
|
||||
prio_b = ges_layer_get_priority (layer_b);
|
||||
|
||||
if ((gint) prio_a > (guint) prio_b)
|
||||
return 1;
|
||||
|
@ -587,10 +585,9 @@ timeline_update_duration (GESTimeline * timeline)
|
|||
}
|
||||
|
||||
static gint
|
||||
find_layer_by_prio (GESTimelineLayer * a, gpointer pprio)
|
||||
find_layer_by_prio (GESLayer * a, gpointer pprio)
|
||||
{
|
||||
gint prio = GPOINTER_TO_INT (pprio), lprio =
|
||||
ges_timeline_layer_get_priority (a);
|
||||
gint prio = GPOINTER_TO_INT (pprio), lprio = ges_layer_get_priority (a);
|
||||
|
||||
if (lprio < prio)
|
||||
return -1;
|
||||
|
@ -659,9 +656,9 @@ _destroy_auto_transition_cb (GESAutoTransition * auto_transition,
|
|||
{
|
||||
GESTimelinePrivate *priv = timeline->priv;
|
||||
GESClip *transition = auto_transition->transition_clip;
|
||||
GESTimelineLayer *layer = ges_clip_get_layer (transition);
|
||||
GESLayer *layer = ges_clip_get_layer (transition);
|
||||
|
||||
ges_timeline_layer_remove_clip (layer, transition);
|
||||
ges_layer_remove_clip (layer, transition);
|
||||
g_signal_handlers_disconnect_by_func (auto_transition,
|
||||
_destroy_auto_transition_cb, timeline);
|
||||
|
||||
|
@ -673,7 +670,7 @@ _destroy_auto_transition_cb (GESAutoTransition * auto_transition,
|
|||
static GESAutoTransition *
|
||||
create_transition (GESTimeline * timeline, GESTrackElement * previous,
|
||||
GESTrackElement * next, GESClip * transition,
|
||||
GESTimelineLayer * layer, guint64 start, guint64 duration)
|
||||
GESLayer * layer, guint64 start, guint64 duration)
|
||||
{
|
||||
GESAsset *asset;
|
||||
GESAutoTransition *auto_transition;
|
||||
|
@ -682,7 +679,7 @@ create_transition (GESTimeline * timeline, GESTrackElement * previous,
|
|||
/* TODO make it possible to specify a Transition asset in the API */
|
||||
asset = ges_asset_request (GES_TYPE_TRANSITION_CLIP, "crossfade", NULL);
|
||||
transition =
|
||||
ges_timeline_layer_add_asset (layer, asset, start, 0, duration,
|
||||
ges_layer_add_asset (layer, asset, start, 0, duration,
|
||||
ges_track_element_get_track_type (next));
|
||||
} else {
|
||||
GST_DEBUG_OBJECT (timeline,
|
||||
|
@ -704,12 +701,12 @@ create_transition (GESTimeline * timeline, GESTrackElement * previous,
|
|||
}
|
||||
|
||||
typedef GESAutoTransition *(*GetAutoTransitionFunc) (GESTimeline * timeline,
|
||||
GESTimelineLayer * layer, GESTrack * track, GESTrackElement * previous,
|
||||
GESLayer * layer, GESTrack * track, GESTrackElement * previous,
|
||||
GESTrackElement * next, GstClockTime transition_duration);
|
||||
|
||||
static GESAutoTransition *
|
||||
_find_transition_from_auto_transitions (GESTimeline * timeline,
|
||||
GESTimelineLayer * layer, GESTrack * track, GESTrackElement * prev,
|
||||
GESLayer * layer, GESTrack * track, GESTrackElement * prev,
|
||||
GESTrackElement * next, GstClockTime transition_duration)
|
||||
{
|
||||
GESAutoTransition *auto_transition;
|
||||
|
@ -724,7 +721,7 @@ _find_transition_from_auto_transitions (GESTimeline * timeline,
|
|||
|
||||
static GESAutoTransition *
|
||||
_create_auto_transition_from_transitions (GESTimeline * timeline,
|
||||
GESTimelineLayer * layer, GESTrack * track, GESTrackElement * prev,
|
||||
GESLayer * layer, GESTrack * track, GESTrackElement * prev,
|
||||
GESTrackElement * next, GstClockTime transition_duration)
|
||||
{
|
||||
GSequenceIter *tmp_iter;
|
||||
|
@ -775,7 +772,7 @@ _create_auto_transition_from_transitions (GESTimeline * timeline,
|
|||
* if @ track is specified, we will create the transitions only for that particular
|
||||
* track */
|
||||
static void
|
||||
_create_transitions_on_layer (GESTimeline * timeline, GESTimelineLayer * layer,
|
||||
_create_transitions_on_layer (GESTimeline * timeline, GESLayer * layer,
|
||||
GESTrack * track, GESTrackElement * initiating_obj,
|
||||
GetAutoTransitionFunc get_auto_transition)
|
||||
{
|
||||
|
@ -788,10 +785,10 @@ _create_transitions_on_layer (GESTimeline * timeline, GESTimelineLayer * layer,
|
|||
* "start" but not the "end" in the starts_ends list */
|
||||
GESTimelinePrivate *priv = timeline->priv;
|
||||
|
||||
if (!layer || !ges_timeline_layer_get_auto_transition (layer))
|
||||
if (!layer || !ges_layer_get_auto_transition (layer))
|
||||
return;
|
||||
|
||||
layer_prio = ges_timeline_layer_get_priority (layer);
|
||||
layer_prio = ges_layer_get_priority (layer);
|
||||
for (iter = g_sequence_get_begin_iter (priv->starts_ends);
|
||||
iter && !g_sequence_iter_is_end (iter);
|
||||
iter = g_sequence_iter_next (iter)) {
|
||||
|
@ -940,7 +937,7 @@ start_tracking_track_element (GESTimeline * timeline,
|
|||
guint layer_prio = _PRIORITY (trackelement) / LAYER_HEIGHT;
|
||||
GList *layer_node = g_list_find_custom (timeline->layers,
|
||||
GINT_TO_POINTER (layer_prio), (GCompareFunc) find_layer_by_prio);
|
||||
GESTimelineLayer *layer = layer_node ? layer_node->data : NULL;
|
||||
GESLayer *layer = layer_node ? layer_node->data : NULL;
|
||||
|
||||
iters = g_slice_new0 (TrackObjIters);
|
||||
|
||||
|
@ -1135,7 +1132,7 @@ static inline GESClip *
|
|||
add_moving_clip (MoveContext * mv_ctx, GESTrackElement * trackelement)
|
||||
{
|
||||
GESClip *clip;
|
||||
GESTimelineLayer *layer;
|
||||
GESLayer *layer;
|
||||
guint layer_prio;
|
||||
|
||||
clip = GES_CLIP (GES_TIMELINE_ELEMENT_PARENT (trackelement));
|
||||
|
@ -1151,7 +1148,7 @@ add_moving_clip (MoveContext * mv_ctx, GESTrackElement * trackelement)
|
|||
|
||||
g_hash_table_insert (mv_ctx->moving_clips, clip, clip);
|
||||
|
||||
layer_prio = ges_timeline_layer_get_priority (layer);
|
||||
layer_prio = ges_layer_get_priority (layer);
|
||||
mv_ctx->min_move_layer = MIN (mv_ctx->min_move_layer, layer_prio);
|
||||
mv_ctx->max_layer_prio = MAX (mv_ctx->max_layer_prio, layer_prio);
|
||||
|
||||
|
@ -1697,7 +1694,7 @@ timeline_context_to_layer (GESTimeline * timeline, gint offset)
|
|||
if (offset != 0 && (offset > 0 || mv_ctx->min_move_layer >= -offset)) {
|
||||
GHashTableIter iter;
|
||||
GESClip *key, *value;
|
||||
GESTimelineLayer *new_layer, *layer;
|
||||
GESLayer *new_layer, *layer;
|
||||
guint prio;
|
||||
|
||||
mv_ctx->ignore_needs_ctx = TRUE;
|
||||
|
@ -1709,16 +1706,15 @@ timeline_context_to_layer (GESTimeline * timeline, gint offset)
|
|||
while (g_hash_table_iter_next (&iter, (gpointer *) & key,
|
||||
(gpointer *) & value)) {
|
||||
layer = ges_clip_get_layer (value);
|
||||
prio = ges_timeline_layer_get_priority (layer);
|
||||
prio = ges_layer_get_priority (layer);
|
||||
|
||||
/* We know that the layer exists as we created it */
|
||||
new_layer = GES_TIMELINE_LAYER (g_list_nth_data (timeline->layers,
|
||||
prio + offset));
|
||||
new_layer = GES_LAYER (g_list_nth_data (timeline->layers, prio + offset));
|
||||
|
||||
if (new_layer == NULL) {
|
||||
do {
|
||||
new_layer = ges_timeline_append_layer (timeline);
|
||||
} while (ges_timeline_layer_get_priority (new_layer) < prio + offset);
|
||||
} while (ges_layer_get_priority (new_layer) < prio + offset);
|
||||
}
|
||||
|
||||
ret &= ges_clip_move_to_layer (key, new_layer);
|
||||
|
@ -1784,7 +1780,7 @@ add_object_to_tracks (GESTimeline * timeline, GESClip * clip, GESTrack * track)
|
|||
}
|
||||
|
||||
static void
|
||||
layer_auto_transition_changed_cb (GESTimelineLayer * layer,
|
||||
layer_auto_transition_changed_cb (GESLayer * layer,
|
||||
GParamSpec * arg G_GNUC_UNUSED, GESTimeline * timeline)
|
||||
{
|
||||
_create_transitions_on_layer (timeline, layer, NULL, NULL,
|
||||
|
@ -1888,8 +1884,7 @@ clip_track_element_removed_cb (GESClip * clip, GESTrackElement * track_element,
|
|||
}
|
||||
|
||||
static void
|
||||
layer_object_added_cb (GESTimelineLayer * layer, GESClip * clip,
|
||||
GESTimeline * timeline)
|
||||
layer_object_added_cb (GESLayer * layer, GESClip * clip, GESTimeline * timeline)
|
||||
{
|
||||
/* We make sure not to be connected twice */
|
||||
g_signal_handlers_disconnect_by_func (clip, clip_track_element_added_cb,
|
||||
|
@ -1917,7 +1912,7 @@ layer_object_added_cb (GESTimelineLayer * layer, GESClip * clip,
|
|||
}
|
||||
|
||||
static void
|
||||
layer_priority_changed_cb (GESTimelineLayer * layer,
|
||||
layer_priority_changed_cb (GESLayer * layer,
|
||||
GParamSpec * arg G_GNUC_UNUSED, GESTimeline * timeline)
|
||||
{
|
||||
timeline->layers = g_list_sort (timeline->layers, (GCompareFunc)
|
||||
|
@ -1925,7 +1920,7 @@ layer_priority_changed_cb (GESTimelineLayer * layer,
|
|||
}
|
||||
|
||||
static void
|
||||
layer_object_removed_cb (GESTimelineLayer * layer, GESClip * clip,
|
||||
layer_object_removed_cb (GESLayer * layer, GESClip * clip,
|
||||
GESTimeline * timeline)
|
||||
{
|
||||
GList *trackelements, *tmp;
|
||||
|
@ -2006,7 +2001,7 @@ trackelement_priority_changed_cb (GESTrackElement * child,
|
|||
GList *layer_node = g_list_find_custom (timeline->layers,
|
||||
GINT_TO_POINTER (_PRIORITY (child) / LAYER_HEIGHT),
|
||||
(GCompareFunc) find_layer_by_prio);
|
||||
GESTimelineLayer *layer = layer_node ? layer_node->data : NULL;
|
||||
GESLayer *layer = layer_node ? layer_node->data : NULL;
|
||||
TrackObjIters *iters = g_hash_table_lookup (priv->obj_iters,
|
||||
child);
|
||||
|
||||
|
@ -2273,21 +2268,21 @@ ges_timeline_save_to_uri (GESTimeline * timeline, const gchar * uri,
|
|||
* ges_timeline_append_layer:
|
||||
* @timeline: a #GESTimeline
|
||||
*
|
||||
* Append a newly created #GESTimelineLayer to @timeline
|
||||
* Append a newly created #GESLayer to @timeline
|
||||
* Note that you do not own any reference to the returned layer.
|
||||
*
|
||||
* Returns: (transfer none): The newly created #GESTimelineLayer, or the last (empty)
|
||||
* #GESTimelineLayer of @timeline.
|
||||
* Returns: (transfer none): The newly created #GESLayer, or the last (empty)
|
||||
* #GESLayer of @timeline.
|
||||
*/
|
||||
GESTimelineLayer *
|
||||
GESLayer *
|
||||
ges_timeline_append_layer (GESTimeline * timeline)
|
||||
{
|
||||
guint32 priority;
|
||||
GESTimelineLayer *layer;
|
||||
GESLayer *layer;
|
||||
|
||||
layer = ges_timeline_layer_new ();
|
||||
layer = ges_layer_new ();
|
||||
priority = g_list_length (timeline->layers);
|
||||
ges_timeline_layer_set_priority (layer, priority);
|
||||
ges_layer_set_priority (layer, priority);
|
||||
|
||||
ges_timeline_add_layer (timeline, layer);
|
||||
|
||||
|
@ -2297,7 +2292,7 @@ ges_timeline_append_layer (GESTimeline * timeline)
|
|||
/**
|
||||
* ges_timeline_add_layer:
|
||||
* @timeline: a #GESTimeline
|
||||
* @layer: the #GESTimelineLayer to add
|
||||
* @layer: the #GESLayer to add
|
||||
*
|
||||
* Add the layer to the timeline. The reference to the @layer will be stolen
|
||||
* by the @timeline.
|
||||
|
@ -2305,7 +2300,7 @@ ges_timeline_append_layer (GESTimeline * timeline)
|
|||
* Returns: TRUE if the layer was properly added, else FALSE.
|
||||
*/
|
||||
gboolean
|
||||
ges_timeline_add_layer (GESTimeline * timeline, GESTimelineLayer * layer)
|
||||
ges_timeline_add_layer (GESTimeline * timeline, GESLayer * layer)
|
||||
{
|
||||
GList *objects, *tmp;
|
||||
|
||||
|
@ -2328,7 +2323,7 @@ ges_timeline_add_layer (GESTimeline * timeline, GESTimelineLayer * layer)
|
|||
(GCompareFunc) sort_layers);
|
||||
|
||||
/* Inform the layer that it belongs to a new timeline */
|
||||
ges_timeline_layer_set_timeline (layer, timeline);
|
||||
ges_layer_set_timeline (layer, timeline);
|
||||
|
||||
g_hash_table_insert (timeline->priv->by_layer, layer, g_sequence_new (NULL));
|
||||
|
||||
|
@ -2346,7 +2341,7 @@ ges_timeline_add_layer (GESTimeline * timeline, GESTimelineLayer * layer)
|
|||
g_signal_emit (timeline, ges_timeline_signals[LAYER_ADDED], 0, layer);
|
||||
|
||||
/* add any existing clips to the timeline */
|
||||
objects = ges_timeline_layer_get_clips (layer);
|
||||
objects = ges_layer_get_clips (layer);
|
||||
for (tmp = objects; tmp; tmp = tmp->next) {
|
||||
layer_object_added_cb (layer, tmp->data, timeline);
|
||||
gst_object_unref (tmp->data);
|
||||
|
@ -2360,7 +2355,7 @@ ges_timeline_add_layer (GESTimeline * timeline, GESTimelineLayer * layer)
|
|||
/**
|
||||
* ges_timeline_remove_layer:
|
||||
* @timeline: a #GESTimeline
|
||||
* @layer: the #GESTimelineLayer to remove
|
||||
* @layer: the #GESLayer to remove
|
||||
*
|
||||
* Removes the layer from the timeline. The reference that the @timeline holds on
|
||||
* the layer will be dropped. If you wish to use the @layer after calling this
|
||||
|
@ -2370,7 +2365,7 @@ ges_timeline_add_layer (GESTimeline * timeline, GESTimelineLayer * layer)
|
|||
*/
|
||||
|
||||
gboolean
|
||||
ges_timeline_remove_layer (GESTimeline * timeline, GESTimelineLayer * layer)
|
||||
ges_timeline_remove_layer (GESTimeline * timeline, GESLayer * layer)
|
||||
{
|
||||
GList *layer_objects, *tmp;
|
||||
|
||||
|
@ -2383,7 +2378,7 @@ ges_timeline_remove_layer (GESTimeline * timeline, GESTimelineLayer * layer)
|
|||
|
||||
/* remove objects from any private data structures */
|
||||
|
||||
layer_objects = ges_timeline_layer_get_clips (layer);
|
||||
layer_objects = ges_layer_get_clips (layer);
|
||||
for (tmp = layer_objects; tmp; tmp = tmp->next) {
|
||||
layer_object_removed_cb (layer, GES_CLIP (tmp->data), timeline);
|
||||
gst_object_unref (G_OBJECT (tmp->data));
|
||||
|
@ -2403,7 +2398,7 @@ ges_timeline_remove_layer (GESTimeline * timeline, GESTimelineLayer * layer)
|
|||
|
||||
g_hash_table_remove (timeline->priv->by_layer, layer);
|
||||
timeline->layers = g_list_remove (timeline->layers, layer);
|
||||
ges_timeline_layer_set_timeline (layer, NULL);
|
||||
ges_layer_set_timeline (layer, NULL);
|
||||
|
||||
g_signal_emit (timeline, ges_timeline_signals[LAYER_REMOVED], 0, layer);
|
||||
|
||||
|
@ -2480,7 +2475,7 @@ ges_timeline_add_track (GESTimeline * timeline, GESTrack * track)
|
|||
|
||||
for (tmp = timeline->layers; tmp; tmp = tmp->next) {
|
||||
GList *objects, *obj;
|
||||
objects = ges_timeline_layer_get_clips (tmp->data);
|
||||
objects = ges_layer_get_clips (tmp->data);
|
||||
|
||||
for (obj = objects; obj; obj = obj->next) {
|
||||
GESClip *clip = obj->data;
|
||||
|
@ -2622,10 +2617,10 @@ ges_timeline_get_tracks (GESTimeline * timeline)
|
|||
* ges_timeline_get_layers:
|
||||
* @timeline: a #GESTimeline
|
||||
*
|
||||
* Get the list of #GESTimelineLayer present in the Timeline.
|
||||
* Get the list of #GESLayer present in the Timeline.
|
||||
*
|
||||
* Returns: (transfer full) (element-type GESTimelineLayer): the list of
|
||||
* #GESTimelineLayer present in the Timeline sorted by priority.
|
||||
* Returns: (transfer full) (element-type GESLayer): the list of
|
||||
* #GESLayer present in the Timeline sorted by priority.
|
||||
* The caller should unref each Layer once he is done with them.
|
||||
*/
|
||||
GList *
|
||||
|
@ -2694,7 +2689,7 @@ ges_timeline_enable_update (GESTimeline * timeline, gboolean enabled)
|
|||
timeline->priv->updates_enabled = enabled;
|
||||
|
||||
for (tmp = timeline->layers; tmp; tmp = tmp->next) {
|
||||
_create_transitions_on_layer (timeline, GES_TIMELINE_LAYER (tmp->data),
|
||||
_create_transitions_on_layer (timeline, GES_LAYER (tmp->data),
|
||||
NULL, NULL, _find_transition_from_auto_transitions);
|
||||
}
|
||||
|
||||
|
|
|
@ -60,7 +60,7 @@ typedef struct _GESTimelinePrivate GESTimelinePrivate;
|
|||
|
||||
/**
|
||||
* GESTimeline:
|
||||
* @layers: (element-type GES.TimelineLayer): A list of #GESTimelineLayer sorted by priority NOTE: Do not modify.
|
||||
* @layers: (element-type GES.Layer): A list of #GESLayer sorted by priority NOTE: Do not modify.
|
||||
* @tracks: (element-type GES.Track): A list of #GESTrack sorted by priority NOTE: Do not modify.
|
||||
*/
|
||||
struct _GESTimeline {
|
||||
|
@ -90,8 +90,8 @@ struct _GESTimelineClass {
|
|||
|
||||
void (*track_added) (GESTimeline *timeline, GESTrack * track);
|
||||
void (*track_removed) (GESTimeline *timeline, GESTrack * track);
|
||||
void (*layer_added) (GESTimeline *timeline, GESTimelineLayer *layer);
|
||||
void (*layer_removed) (GESTimeline *timeline, GESTimelineLayer *layer);
|
||||
void (*layer_added) (GESTimeline *timeline, GESLayer *layer);
|
||||
void (*layer_removed) (GESTimeline *timeline, GESLayer *layer);
|
||||
|
||||
/* Padding for API extension */
|
||||
gpointer _ges_reserved[GES_PADDING];
|
||||
|
@ -105,9 +105,9 @@ GESTimeline* ges_timeline_new_from_uri (const gchar *uri, GError **error);
|
|||
gboolean ges_timeline_load_from_uri (GESTimeline *timeline, const gchar *uri, GError **error);
|
||||
gboolean ges_timeline_save_to_uri (GESTimeline * timeline, const gchar * uri,
|
||||
GESAsset *formatter_asset, gboolean overwrite, GError ** error);
|
||||
gboolean ges_timeline_add_layer (GESTimeline *timeline, GESTimelineLayer *layer);
|
||||
GESTimelineLayer * ges_timeline_append_layer (GESTimeline * timeline);
|
||||
gboolean ges_timeline_remove_layer (GESTimeline *timeline, GESTimelineLayer *layer);
|
||||
gboolean ges_timeline_add_layer (GESTimeline *timeline, GESLayer *layer);
|
||||
GESLayer * ges_timeline_append_layer (GESTimeline * timeline);
|
||||
gboolean ges_timeline_remove_layer (GESTimeline *timeline, GESLayer *layer);
|
||||
GList* ges_timeline_get_layers (GESTimeline *timeline);
|
||||
|
||||
gboolean ges_timeline_add_track (GESTimeline *timeline, GESTrack *track);
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
/**
|
||||
* SECTION:ges-title-clip
|
||||
* @short_description: Render stand-alone titles in GESTimelineLayer.
|
||||
* @short_description: Render stand-alone titles in GESLayer.
|
||||
*
|
||||
* Renders the given text in the specified font, at specified position, and
|
||||
* with the specified background pattern.
|
||||
|
|
|
@ -50,7 +50,7 @@ typedef struct _GESTitleClipPrivate GESTitleClipPrivate;
|
|||
/**
|
||||
* GESTitleClip:
|
||||
*
|
||||
* Render stand-alone titles in GESTimelineLayer.
|
||||
* Render stand-alone titles in GESLayer.
|
||||
*/
|
||||
|
||||
struct _GESTitleClip {
|
||||
|
|
|
@ -1366,9 +1366,9 @@ _deep_copy (GESTimelineElement * element, GESTimelineElement * elementcopy)
|
|||
/**
|
||||
* ges_track_element_edit:
|
||||
* @object: the #GESTrackElement to edit
|
||||
* @layers: (element-type GESTimelineLayer): The layers you want the edit to
|
||||
* @layers: (element-type GESLayer): The layers you want the edit to
|
||||
* happen in, %NULL means that the edition is done in all the
|
||||
* #GESTimelineLayers contained in the current timeline.
|
||||
* #GESLayers contained in the current timeline.
|
||||
* FIXME: This is not implemented yet.
|
||||
* @mode: The #GESEditMode in which the editition will happen.
|
||||
* @edge: The #GESEdge the edit should happen on.
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
/**
|
||||
* SECTION: ges-transition-clip
|
||||
* @short_description: Transition from one clip to another in a
|
||||
* #GESTimelineLayer
|
||||
* #GESLayer
|
||||
*
|
||||
* Creates an object that mixes together the two underlying objects, A and B.
|
||||
* The A object is assumed to have a higher prioirity (lower number) than the
|
||||
|
@ -32,9 +32,9 @@
|
|||
* property. The default value is "crossfade". For audio, only "crossfade" is
|
||||
* supported.
|
||||
*
|
||||
* #GESSimpleTimelineLayer will automatically manage the priorities of sources
|
||||
* #GESSimpleLayer will automatically manage the priorities of sources
|
||||
* and transitions. If you use #GESTransitionClips in another type of
|
||||
* #GESTimelineLayer, you will need to manage priorities yourself.
|
||||
* #GESLayer, you will need to manage priorities yourself.
|
||||
*
|
||||
* The ID of the ExtractableType is the nickname of the vtype property value. Note
|
||||
* that this value can be changed after creation and the GESExtractable.asset value
|
||||
|
|
|
@ -32,14 +32,14 @@
|
|||
typedef struct _GESCustomSourceClip GESCustomSourceClip;
|
||||
typedef struct _GESCustomSourceClipClass GESCustomSourceClipClass;
|
||||
|
||||
typedef struct _GESSimpleTimelineLayer GESSimpleTimelineLayer;
|
||||
typedef struct _GESSimpleTimelineLayerClass GESSimpleTimelineLayerClass;
|
||||
typedef struct _GESSimpleLayer GESSimpleLayer;
|
||||
typedef struct _GESSimpleLayerClass GESSimpleLayerClass;
|
||||
|
||||
typedef struct _GESTimeline GESTimeline;
|
||||
typedef struct _GESTimelineClass GESTimelineClass;
|
||||
|
||||
typedef struct _GESTimelineLayer GESTimelineLayer;
|
||||
typedef struct _GESTimelineLayerClass GESTimelineLayerClass;
|
||||
typedef struct _GESLayer GESLayer;
|
||||
typedef struct _GESLayerClass GESLayerClass;
|
||||
|
||||
typedef struct _GESTimelineElementClass GESTimelineElementClass;
|
||||
typedef struct _GESTimelineElement GESTimelineElement;
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
#include "ges-internal.h"
|
||||
#include "ges-timeline.h"
|
||||
#include "ges-track.h"
|
||||
#include "ges-timeline-layer.h"
|
||||
#include "ges-layer.h"
|
||||
#include "ges.h"
|
||||
|
||||
/**
|
||||
|
|
|
@ -927,7 +927,7 @@ static inline void
|
|||
_save_layers (GString * str, GESTimeline * timeline)
|
||||
{
|
||||
gchar *properties, *metas;
|
||||
GESTimelineLayer *layer;
|
||||
GESLayer *layer;
|
||||
GESClip *clip;
|
||||
GList *tmplayer, *tmpclip, *clips;
|
||||
|
||||
|
@ -935,9 +935,9 @@ _save_layers (GString * str, GESTimeline * timeline)
|
|||
|
||||
for (tmplayer = timeline->layers; tmplayer; tmplayer = tmplayer->next) {
|
||||
guint priority;
|
||||
layer = GES_TIMELINE_LAYER (tmplayer->data);
|
||||
layer = GES_LAYER (tmplayer->data);
|
||||
|
||||
priority = ges_timeline_layer_get_priority (layer);
|
||||
priority = ges_layer_get_priority (layer);
|
||||
properties = _serialize_properties (G_OBJECT (layer), "priority", NULL);
|
||||
metas = ges_meta_container_metas_to_string (GES_META_CONTAINER (layer));
|
||||
append_escaped (str,
|
||||
|
@ -947,7 +947,7 @@ _save_layers (GString * str, GESTimeline * timeline)
|
|||
g_free (properties);
|
||||
g_free (metas);
|
||||
|
||||
clips = ges_timeline_layer_get_clips (layer);
|
||||
clips = ges_layer_get_clips (layer);
|
||||
for (tmpclip = clips; tmpclip; tmpclip = tmpclip->next) {
|
||||
GList *effects, *tmpeffect;
|
||||
|
||||
|
|
|
@ -27,8 +27,8 @@
|
|||
#include <ges/ges-enums.h>
|
||||
|
||||
#include <ges/ges-timeline.h>
|
||||
#include <ges/ges-timeline-layer.h>
|
||||
#include <ges/ges-simple-timeline-layer.h>
|
||||
#include <ges/ges-layer.h>
|
||||
#include <ges/ges-simple-layer.h>
|
||||
#include <ges/ges-timeline-element.h>
|
||||
#include <ges/ges-clip.h>
|
||||
#include <ges/ges-timeline-pipeline.h>
|
||||
|
|
|
@ -29,7 +29,7 @@ main (gint argc, gchar * argv[])
|
|||
guint i;
|
||||
GESAsset *asset;
|
||||
GESTimeline *timeline;
|
||||
GESTimelineLayer *layer;
|
||||
GESLayer *layer;
|
||||
GESClip *clip;
|
||||
GstClockTime start, start_ripple, end, end_ripple, max_rippling_time = 0,
|
||||
min_rippling_time = GST_CLOCK_TIME_NONE;
|
||||
|
@ -38,16 +38,16 @@ main (gint argc, gchar * argv[])
|
|||
ges_init ();
|
||||
asset = ges_asset_request (GES_TYPE_TEST_CLIP, NULL, NULL);
|
||||
|
||||
layer = ges_timeline_layer_new ();
|
||||
layer = ges_layer_new ();
|
||||
timeline = ges_timeline_new_audio_video ();
|
||||
ges_timeline_add_layer (timeline, layer);
|
||||
|
||||
start = gst_util_get_timestamp ();
|
||||
clip = GES_CLIP (ges_timeline_layer_add_asset (layer, asset, 0,
|
||||
clip = GES_CLIP (ges_layer_add_asset (layer, asset, 0,
|
||||
0, 1000, GES_TRACK_TYPE_UNKNOWN));
|
||||
|
||||
for (i = 1; i < NUM_OBJECTS; i++)
|
||||
ges_timeline_layer_add_asset (layer, asset, i * 1000, 0,
|
||||
ges_layer_add_asset (layer, asset, i * 1000, 0,
|
||||
1000, GES_TRACK_TYPE_UNKNOWN);
|
||||
end = gst_util_get_timestamp ();
|
||||
g_print ("%" GST_TIME_FORMAT " - adding %d clip to the timeline\n",
|
||||
|
@ -71,7 +71,7 @@ main (gint argc, gchar * argv[])
|
|||
|
||||
min_rippling_time = GST_CLOCK_TIME_NONE;
|
||||
max_rippling_time = 0;
|
||||
ges_timeline_layer_set_auto_transition (layer, TRUE);
|
||||
ges_layer_set_auto_transition (layer, TRUE);
|
||||
start_ripple = gst_util_get_timestamp ();
|
||||
for (i = 1; i < 501; i++) {
|
||||
start = gst_util_get_timestamp ();
|
||||
|
|
|
@ -40,7 +40,7 @@ GST_START_TEST (test_test_source_properties)
|
|||
GESClip *clip;
|
||||
GESTrack *track;
|
||||
GESTimeline *timeline;
|
||||
GESTimelineLayer *layer;
|
||||
GESLayer *layer;
|
||||
GESTrackElement *trackelement;
|
||||
|
||||
ges_init ();
|
||||
|
@ -48,7 +48,7 @@ GST_START_TEST (test_test_source_properties)
|
|||
track = ges_track_new (GES_TRACK_TYPE_AUDIO, gst_caps_ref (GST_CAPS_ANY));
|
||||
fail_unless (track != NULL);
|
||||
|
||||
layer = ges_timeline_layer_new ();
|
||||
layer = ges_layer_new ();
|
||||
fail_unless (layer != NULL);
|
||||
|
||||
timeline = ges_timeline_new ();
|
||||
|
@ -67,7 +67,7 @@ GST_START_TEST (test_test_source_properties)
|
|||
assert_equals_uint64 (_DURATION (clip), 51);
|
||||
assert_equals_uint64 (_INPOINT (clip), 12);
|
||||
|
||||
ges_timeline_layer_add_clip (layer, GES_CLIP (clip));
|
||||
ges_layer_add_clip (layer, GES_CLIP (clip));
|
||||
assert_equals_int (g_list_length (GES_CONTAINER_CHILDREN (clip)), 1);
|
||||
trackelement = GES_CONTAINER_CHILDREN (clip)->data;
|
||||
fail_unless (trackelement != NULL);
|
||||
|
@ -116,7 +116,7 @@ GST_END_TEST;
|
|||
GST_START_TEST (test_test_source_in_layer)
|
||||
{
|
||||
GESTimeline *timeline;
|
||||
GESTimelineLayer *layer;
|
||||
GESLayer *layer;
|
||||
GESTrack *a, *v;
|
||||
GESTrackElement *track_element;
|
||||
GESTestClip *source;
|
||||
|
@ -126,7 +126,7 @@ GST_START_TEST (test_test_source_in_layer)
|
|||
ges_init ();
|
||||
|
||||
timeline = ges_timeline_new ();
|
||||
layer = (GESTimelineLayer *) ges_simple_timeline_layer_new ();
|
||||
layer = (GESLayer *) ges_simple_layer_new ();
|
||||
a = ges_track_audio_raw_new ();
|
||||
v = ges_track_video_raw_new ();
|
||||
|
||||
|
@ -140,8 +140,7 @@ GST_START_TEST (test_test_source_in_layer)
|
|||
|
||||
g_object_set (source, "duration", (guint64) GST_SECOND, NULL);
|
||||
|
||||
ges_simple_timeline_layer_add_object ((GESSimpleTimelineLayer *) layer,
|
||||
(GESClip *) source, 0);
|
||||
ges_simple_layer_add_object ((GESSimpleLayer *) layer, (GESClip *) source, 0);
|
||||
|
||||
/* specifically test the vpattern property */
|
||||
g_object_set (source, "vpattern", (gint) GES_VIDEO_TEST_PATTERN_WHITE, NULL);
|
||||
|
@ -193,7 +192,7 @@ GST_START_TEST (test_test_source_in_layer)
|
|||
|
||||
gst_object_unref (track_element);
|
||||
|
||||
ges_timeline_layer_remove_clip (layer, (GESClip *) source);
|
||||
ges_layer_remove_clip (layer, (GESClip *) source);
|
||||
|
||||
GST_DEBUG ("removing the layer");
|
||||
|
||||
|
@ -247,7 +246,7 @@ GST_START_TEST (test_gap_filling_basic)
|
|||
GESTrack *track;
|
||||
GESTimeline *timeline;
|
||||
GstElement *composition;
|
||||
GESTimelineLayer *layer;
|
||||
GESLayer *layer;
|
||||
GESClip *clip, *clip1, *clip2;
|
||||
|
||||
GstElement *gnlsrc, *gnlsrc1, *gap = NULL;
|
||||
|
@ -261,7 +260,7 @@ GST_START_TEST (test_gap_filling_basic)
|
|||
composition = find_composition (track);
|
||||
fail_unless (composition != NULL);
|
||||
|
||||
layer = ges_timeline_layer_new ();
|
||||
layer = ges_layer_new ();
|
||||
fail_unless (layer != NULL);
|
||||
|
||||
timeline = ges_timeline_new ();
|
||||
|
@ -277,7 +276,7 @@ GST_START_TEST (test_gap_filling_basic)
|
|||
assert_equals_uint64 (_START (clip), 0);
|
||||
assert_equals_uint64 (_DURATION (clip), 5);
|
||||
|
||||
ges_timeline_layer_add_clip (layer, GES_CLIP (clip));
|
||||
ges_layer_add_clip (layer, GES_CLIP (clip));
|
||||
assert_equals_int (g_list_length (GES_CONTAINER_CHILDREN (clip)), 1);
|
||||
trackelement = GES_CONTAINER_CHILDREN (clip)->data;
|
||||
fail_unless (trackelement != NULL);
|
||||
|
@ -300,7 +299,7 @@ GST_START_TEST (test_gap_filling_basic)
|
|||
assert_equals_uint64 (_START (clip1), 15);
|
||||
assert_equals_uint64 (_DURATION (clip1), 5);
|
||||
|
||||
ges_timeline_layer_add_clip (layer, GES_CLIP (clip1));
|
||||
ges_layer_add_clip (layer, GES_CLIP (clip1));
|
||||
assert_equals_int (g_list_length (GES_CONTAINER_CHILDREN (clip1)), 1);
|
||||
trackelement1 = GES_CONTAINER_CHILDREN (clip1)->data;
|
||||
fail_unless (trackelement1 != NULL);
|
||||
|
@ -328,7 +327,7 @@ GST_START_TEST (test_gap_filling_basic)
|
|||
clip2 = GES_CLIP (ges_test_clip_new ());
|
||||
fail_unless (clip2 != NULL);
|
||||
g_object_set (clip2, "start", (guint64) 35, "duration", (guint64) 5, NULL);
|
||||
ges_timeline_layer_add_clip (layer, GES_CLIP (clip2));
|
||||
ges_layer_add_clip (layer, GES_CLIP (clip2));
|
||||
assert_equals_int (g_list_length (GES_CONTAINER_CHILDREN (clip2)), 1);
|
||||
trackelement2 = GES_CONTAINER_CHILDREN (clip2)->data;
|
||||
fail_unless (trackelement2 != NULL);
|
||||
|
|
|
@ -52,7 +52,7 @@ my_fill_track_func (GESClip * clip,
|
|||
GST_START_TEST (test_ges_scenario)
|
||||
{
|
||||
GESTimeline *timeline;
|
||||
GESTimelineLayer *layer, *tmp_layer;
|
||||
GESLayer *layer, *tmp_layer;
|
||||
GESTrack *track;
|
||||
GESCustomSourceClip *source;
|
||||
GESTrackElement *trackelement;
|
||||
|
@ -67,7 +67,7 @@ GST_START_TEST (test_ges_scenario)
|
|||
fail_unless (timeline != NULL);
|
||||
|
||||
GST_DEBUG ("Create a layer");
|
||||
layer = ges_timeline_layer_new ();
|
||||
layer = ges_layer_new ();
|
||||
fail_unless (layer != NULL);
|
||||
|
||||
GST_DEBUG ("Add the layer to the timeline");
|
||||
|
@ -102,7 +102,7 @@ GST_START_TEST (test_ges_scenario)
|
|||
/* The source will be floating before added to the layer... */
|
||||
fail_unless (g_object_is_floating (source));
|
||||
GST_DEBUG ("Adding the source to the timeline layer");
|
||||
fail_unless (ges_timeline_layer_add_clip (layer, GES_CLIP (source)));
|
||||
fail_unless (ges_layer_add_clip (layer, GES_CLIP (source)));
|
||||
fail_if (g_object_is_floating (source));
|
||||
tmp_layer = ges_clip_get_layer (GES_CLIP (source));
|
||||
fail_unless (tmp_layer == layer);
|
||||
|
@ -131,7 +131,7 @@ GST_START_TEST (test_ges_scenario)
|
|||
/* Now remove the clip */
|
||||
gst_object_ref (source);
|
||||
ASSERT_OBJECT_REFCOUNT (layer, "layer", 1);
|
||||
fail_unless (ges_timeline_layer_remove_clip (layer, GES_CLIP (source)));
|
||||
fail_unless (ges_layer_remove_clip (layer, GES_CLIP (source)));
|
||||
ASSERT_OBJECT_REFCOUNT (source, "source", 1);
|
||||
ASSERT_OBJECT_REFCOUNT (layer, "layer", 1);
|
||||
tmp_layer = ges_clip_get_layer (GES_CLIP (source));
|
||||
|
@ -176,7 +176,7 @@ GST_END_TEST;
|
|||
GST_START_TEST (test_ges_timeline_add_layer)
|
||||
{
|
||||
GESTimeline *timeline;
|
||||
GESTimelineLayer *layer, *tmp_layer;
|
||||
GESLayer *layer, *tmp_layer;
|
||||
GESTrack *track;
|
||||
GESCustomSourceClip *s1, *s2, *s3;
|
||||
GList *trackelements, *layers;
|
||||
|
@ -190,7 +190,7 @@ GST_START_TEST (test_ges_timeline_add_layer)
|
|||
fail_unless (timeline != NULL);
|
||||
|
||||
GST_DEBUG ("Create a layer");
|
||||
layer = ges_timeline_layer_new ();
|
||||
layer = ges_layer_new ();
|
||||
fail_unless (layer != NULL);
|
||||
/* Give the Timeline a Track */
|
||||
GST_DEBUG ("Create a Track");
|
||||
|
@ -208,7 +208,7 @@ GST_START_TEST (test_ges_timeline_add_layer)
|
|||
GST_DEBUG ("Creating a source");
|
||||
s1 = ges_custom_source_clip_new (my_fill_track_func, NULL);
|
||||
fail_unless (s1 != NULL);
|
||||
fail_unless (ges_timeline_layer_add_clip (layer, GES_CLIP (s1)));
|
||||
fail_unless (ges_layer_add_clip (layer, GES_CLIP (s1)));
|
||||
tmp_layer = ges_clip_get_layer (GES_CLIP (s1));
|
||||
fail_unless (tmp_layer == layer);
|
||||
ASSERT_OBJECT_REFCOUNT (layer, "layer", 2);
|
||||
|
@ -217,7 +217,7 @@ GST_START_TEST (test_ges_timeline_add_layer)
|
|||
GST_DEBUG ("Creating a source");
|
||||
s2 = ges_custom_source_clip_new (my_fill_track_func, NULL);
|
||||
fail_unless (s2 != NULL);
|
||||
fail_unless (ges_timeline_layer_add_clip (layer, GES_CLIP (s2)));
|
||||
fail_unless (ges_layer_add_clip (layer, GES_CLIP (s2)));
|
||||
tmp_layer = ges_clip_get_layer (GES_CLIP (s2));
|
||||
fail_unless (tmp_layer == layer);
|
||||
ASSERT_OBJECT_REFCOUNT (layer, "layer", 2);
|
||||
|
@ -226,7 +226,7 @@ GST_START_TEST (test_ges_timeline_add_layer)
|
|||
GST_DEBUG ("Creating a source");
|
||||
s3 = ges_custom_source_clip_new (my_fill_track_func, NULL);
|
||||
fail_unless (s3 != NULL);
|
||||
fail_unless (ges_timeline_layer_add_clip (layer, GES_CLIP (s3)));
|
||||
fail_unless (ges_layer_add_clip (layer, GES_CLIP (s3)));
|
||||
tmp_layer = ges_clip_get_layer (GES_CLIP (s3));
|
||||
fail_unless (tmp_layer == layer);
|
||||
ASSERT_OBJECT_REFCOUNT (layer, "layer", 2);
|
||||
|
@ -288,7 +288,7 @@ GST_END_TEST;
|
|||
GST_START_TEST (test_ges_timeline_add_layer_first)
|
||||
{
|
||||
GESTimeline *timeline;
|
||||
GESTimelineLayer *layer, *tmp_layer;
|
||||
GESLayer *layer, *tmp_layer;
|
||||
GESTrack *track;
|
||||
GESCustomSourceClip *s1, *s2, *s3;
|
||||
GList *trackelements, *tmp, *layers;
|
||||
|
@ -301,7 +301,7 @@ GST_START_TEST (test_ges_timeline_add_layer_first)
|
|||
fail_unless (timeline != NULL);
|
||||
|
||||
GST_DEBUG ("Create a layer");
|
||||
layer = ges_timeline_layer_new ();
|
||||
layer = ges_layer_new ();
|
||||
fail_unless (layer != NULL);
|
||||
/* Give the Timeline a Track */
|
||||
GST_DEBUG ("Create a Track");
|
||||
|
@ -312,7 +312,7 @@ GST_START_TEST (test_ges_timeline_add_layer_first)
|
|||
GST_DEBUG ("Creating a source");
|
||||
s1 = ges_custom_source_clip_new (my_fill_track_func, NULL);
|
||||
fail_unless (s1 != NULL);
|
||||
fail_unless (ges_timeline_layer_add_clip (layer, GES_CLIP (s1)));
|
||||
fail_unless (ges_layer_add_clip (layer, GES_CLIP (s1)));
|
||||
tmp_layer = ges_clip_get_layer (GES_CLIP (s1));
|
||||
fail_unless (tmp_layer == layer);
|
||||
gst_object_unref (tmp_layer);
|
||||
|
@ -320,7 +320,7 @@ GST_START_TEST (test_ges_timeline_add_layer_first)
|
|||
GST_DEBUG ("Creating a source");
|
||||
s2 = ges_custom_source_clip_new (my_fill_track_func, NULL);
|
||||
fail_unless (s2 != NULL);
|
||||
fail_unless (ges_timeline_layer_add_clip (layer, GES_CLIP (s2)));
|
||||
fail_unless (ges_layer_add_clip (layer, GES_CLIP (s2)));
|
||||
tmp_layer = ges_clip_get_layer (GES_CLIP (s2));
|
||||
fail_unless (tmp_layer == layer);
|
||||
gst_object_unref (tmp_layer);
|
||||
|
@ -328,7 +328,7 @@ GST_START_TEST (test_ges_timeline_add_layer_first)
|
|||
GST_DEBUG ("Creating a source");
|
||||
s3 = ges_custom_source_clip_new (my_fill_track_func, NULL);
|
||||
fail_unless (s3 != NULL);
|
||||
fail_unless (ges_timeline_layer_add_clip (layer, GES_CLIP (s3)));
|
||||
fail_unless (ges_layer_add_clip (layer, GES_CLIP (s3)));
|
||||
tmp_layer = ges_clip_get_layer (GES_CLIP (s3));
|
||||
fail_unless (tmp_layer == layer);
|
||||
gst_object_unref (tmp_layer);
|
||||
|
@ -389,7 +389,7 @@ GST_END_TEST;
|
|||
GST_START_TEST (test_ges_timeline_remove_track)
|
||||
{
|
||||
GESTimeline *timeline;
|
||||
GESTimelineLayer *layer, *tmp_layer;
|
||||
GESLayer *layer, *tmp_layer;
|
||||
GESTrack *track;
|
||||
GESCustomSourceClip *s1, *s2, *s3;
|
||||
GESTrackElement *t1, *t2, *t3;
|
||||
|
@ -403,7 +403,7 @@ GST_START_TEST (test_ges_timeline_remove_track)
|
|||
fail_unless (timeline != NULL);
|
||||
|
||||
GST_DEBUG ("Create a layer");
|
||||
layer = ges_timeline_layer_new ();
|
||||
layer = ges_layer_new ();
|
||||
fail_unless (layer != NULL);
|
||||
/* Give the Timeline a Track */
|
||||
GST_DEBUG ("Create a Track");
|
||||
|
@ -414,7 +414,7 @@ GST_START_TEST (test_ges_timeline_remove_track)
|
|||
GST_DEBUG ("Creating a source");
|
||||
s1 = ges_custom_source_clip_new (my_fill_track_func, NULL);
|
||||
fail_unless (s1 != NULL);
|
||||
fail_unless (ges_timeline_layer_add_clip (layer, GES_CLIP (s1)));
|
||||
fail_unless (ges_layer_add_clip (layer, GES_CLIP (s1)));
|
||||
tmp_layer = ges_clip_get_layer (GES_CLIP (s1));
|
||||
fail_unless (tmp_layer == layer);
|
||||
gst_object_unref (tmp_layer);
|
||||
|
@ -422,7 +422,7 @@ GST_START_TEST (test_ges_timeline_remove_track)
|
|||
GST_DEBUG ("Creating a source");
|
||||
s2 = ges_custom_source_clip_new (my_fill_track_func, NULL);
|
||||
fail_unless (s2 != NULL);
|
||||
fail_unless (ges_timeline_layer_add_clip (layer, GES_CLIP (s2)));
|
||||
fail_unless (ges_layer_add_clip (layer, GES_CLIP (s2)));
|
||||
tmp_layer = ges_clip_get_layer (GES_CLIP (s2));
|
||||
fail_unless (tmp_layer == layer);
|
||||
gst_object_unref (tmp_layer);
|
||||
|
@ -430,7 +430,7 @@ GST_START_TEST (test_ges_timeline_remove_track)
|
|||
GST_DEBUG ("Creating a source");
|
||||
s3 = ges_custom_source_clip_new (my_fill_track_func, NULL);
|
||||
fail_unless (s3 != NULL);
|
||||
fail_unless (ges_timeline_layer_add_clip (layer, GES_CLIP (s3)));
|
||||
fail_unless (ges_layer_add_clip (layer, GES_CLIP (s3)));
|
||||
tmp_layer = ges_clip_get_layer (GES_CLIP (s3));
|
||||
fail_unless (tmp_layer == layer);
|
||||
gst_object_unref (tmp_layer);
|
||||
|
@ -509,7 +509,7 @@ GST_START_TEST (test_ges_timeline_remove_track)
|
|||
ASSERT_OBJECT_REFCOUNT (t3, "trackelement", 2);
|
||||
ASSERT_OBJECT_REFCOUNT (layer, "1 for the timeline", 1);
|
||||
ASSERT_OBJECT_REFCOUNT (timeline, "1 for the us", 1);
|
||||
tmp = ges_timeline_layer_get_clips (layer);
|
||||
tmp = ges_layer_get_clips (layer);
|
||||
assert_equals_int (g_list_length (tmp), 3);
|
||||
|
||||
gst_object_unref (timeline);
|
||||
|
@ -546,7 +546,7 @@ select_tracks_cb (GESTimeline * timeline, GESClip * clip,
|
|||
GST_START_TEST (test_ges_timeline_multiple_tracks)
|
||||
{
|
||||
GESTimeline *timeline;
|
||||
GESTimelineLayer *layer, *tmp_layer;
|
||||
GESLayer *layer, *tmp_layer;
|
||||
GESTrack *track1, *track2;
|
||||
GESCustomSourceClip *s1, *s2, *s3;
|
||||
GESTrackElement *t1, *t2, *t3;
|
||||
|
@ -564,7 +564,7 @@ GST_START_TEST (test_ges_timeline_multiple_tracks)
|
|||
G_CALLBACK (select_tracks_cb), &st_data);
|
||||
|
||||
GST_DEBUG ("Create a layer");
|
||||
layer = ges_timeline_layer_new ();
|
||||
layer = ges_layer_new ();
|
||||
fail_unless (layer != NULL);
|
||||
/* Give the Timeline a Track */
|
||||
GST_DEBUG ("Create Track 1");
|
||||
|
@ -590,7 +590,7 @@ GST_START_TEST (test_ges_timeline_multiple_tracks)
|
|||
GST_DEBUG ("Creating a source");
|
||||
s1 = ges_custom_source_clip_new (my_fill_track_func, NULL);
|
||||
fail_unless (s1 != NULL);
|
||||
fail_unless (ges_timeline_layer_add_clip (layer, GES_CLIP (s1)));
|
||||
fail_unless (ges_layer_add_clip (layer, GES_CLIP (s1)));
|
||||
tmp_layer = ges_clip_get_layer (GES_CLIP (s1));
|
||||
fail_unless (tmp_layer == layer);
|
||||
gst_object_unref (tmp_layer);
|
||||
|
@ -598,7 +598,7 @@ GST_START_TEST (test_ges_timeline_multiple_tracks)
|
|||
GST_DEBUG ("Creating a source");
|
||||
s2 = ges_custom_source_clip_new (my_fill_track_func, NULL);
|
||||
fail_unless (s2 != NULL);
|
||||
fail_unless (ges_timeline_layer_add_clip (layer, GES_CLIP (s2)));
|
||||
fail_unless (ges_layer_add_clip (layer, GES_CLIP (s2)));
|
||||
tmp_layer = ges_clip_get_layer (GES_CLIP (s2));
|
||||
fail_unless (tmp_layer == layer);
|
||||
gst_object_unref (tmp_layer);
|
||||
|
@ -606,7 +606,7 @@ GST_START_TEST (test_ges_timeline_multiple_tracks)
|
|||
GST_DEBUG ("Creating a source");
|
||||
s3 = ges_custom_source_clip_new (my_fill_track_func, NULL);
|
||||
fail_unless (s3 != NULL);
|
||||
fail_unless (ges_timeline_layer_add_clip (layer, GES_CLIP (s3)));
|
||||
fail_unless (ges_layer_add_clip (layer, GES_CLIP (s3)));
|
||||
tmp_layer = ges_clip_get_layer (GES_CLIP (s3));
|
||||
fail_unless (tmp_layer == layer);
|
||||
gst_object_unref (tmp_layer);
|
||||
|
|
|
@ -44,7 +44,7 @@ GST_START_TEST (test_object_properties)
|
|||
GESClip *clip;
|
||||
GESTrack *track;
|
||||
GESTimeline *timeline;
|
||||
GESTimelineLayer *layer;
|
||||
GESLayer *layer;
|
||||
GESTrackElement *trackelement;
|
||||
|
||||
ges_init ();
|
||||
|
@ -52,7 +52,7 @@ GST_START_TEST (test_object_properties)
|
|||
track = ges_track_new (GES_TRACK_TYPE_CUSTOM, gst_caps_ref (GST_CAPS_ANY));
|
||||
fail_unless (track != NULL);
|
||||
|
||||
layer = ges_timeline_layer_new ();
|
||||
layer = ges_layer_new ();
|
||||
fail_unless (layer != NULL);
|
||||
timeline = ges_timeline_new ();
|
||||
fail_unless (timeline != NULL);
|
||||
|
@ -69,7 +69,7 @@ GST_START_TEST (test_object_properties)
|
|||
assert_equals_uint64 (_DURATION (clip), 51);
|
||||
assert_equals_uint64 (_INPOINT (clip), 12);
|
||||
|
||||
ges_timeline_layer_add_clip (layer, GES_CLIP (clip));
|
||||
ges_layer_add_clip (layer, GES_CLIP (clip));
|
||||
assert_equals_int (g_list_length (GES_CONTAINER_CHILDREN (clip)), 1);
|
||||
trackelement = GES_CONTAINER_CHILDREN (clip)->data;
|
||||
fail_unless (trackelement != NULL);
|
||||
|
@ -120,14 +120,14 @@ GST_END_TEST;
|
|||
GST_START_TEST (test_split_object)
|
||||
{
|
||||
GESTimeline *timeline;
|
||||
GESTimelineLayer *layer;
|
||||
GESLayer *layer;
|
||||
GESClip *clip, *splitclip;
|
||||
GList *splittrackelements;
|
||||
GESTrackElement *trackelement, *splittrackelement;
|
||||
|
||||
ges_init ();
|
||||
|
||||
layer = ges_timeline_layer_new ();
|
||||
layer = ges_layer_new ();
|
||||
fail_unless (layer != NULL);
|
||||
timeline = ges_timeline_new_audio_video ();
|
||||
fail_unless (timeline != NULL);
|
||||
|
@ -146,7 +146,7 @@ GST_START_TEST (test_split_object)
|
|||
assert_equals_uint64 (_DURATION (clip), 50);
|
||||
assert_equals_uint64 (_INPOINT (clip), 12);
|
||||
|
||||
ges_timeline_layer_add_clip (layer, GES_CLIP (clip));
|
||||
ges_layer_add_clip (layer, GES_CLIP (clip));
|
||||
assert_equals_int (g_list_length (GES_CONTAINER_CHILDREN (clip)), 2);
|
||||
trackelement = GES_CONTAINER_CHILDREN (clip)->data;
|
||||
fail_unless (trackelement != NULL);
|
||||
|
@ -213,14 +213,14 @@ GST_START_TEST (test_clip_group_ungroup)
|
|||
GESTimeline *timeline;
|
||||
GESClip *clip, *clip2;
|
||||
GList *containers, *tmp;
|
||||
GESTimelineLayer *layer;
|
||||
GESLayer *layer;
|
||||
GESContainer *regrouped_clip;
|
||||
GESTrack *audio_track, *video_track;
|
||||
|
||||
ges_init ();
|
||||
|
||||
timeline = ges_timeline_new ();
|
||||
layer = ges_timeline_layer_new ();
|
||||
layer = ges_layer_new ();
|
||||
audio_track = ges_track_audio_raw_new ();
|
||||
video_track = ges_track_video_raw_new ();
|
||||
|
||||
|
@ -231,8 +231,7 @@ GST_START_TEST (test_clip_group_ungroup)
|
|||
asset = ges_asset_request (GES_TYPE_TEST_CLIP, NULL, NULL);
|
||||
assert_is_type (asset, GES_TYPE_ASSET);
|
||||
|
||||
clip = ges_timeline_layer_add_asset (layer, asset, 0, 0, 10,
|
||||
GES_TRACK_TYPE_UNKNOWN);
|
||||
clip = ges_layer_add_asset (layer, asset, 0, 0, 10, GES_TRACK_TYPE_UNKNOWN);
|
||||
ASSERT_OBJECT_REFCOUNT (clip, "1 layer", 1);
|
||||
assert_equals_uint64 (_START (clip), 0);
|
||||
assert_equals_uint64 (_INPOINT (clip), 0);
|
||||
|
@ -298,7 +297,7 @@ GST_START_TEST (test_clip_group_ungroup)
|
|||
g_list_free_full (containers, gst_object_unref);
|
||||
|
||||
GST_DEBUG ("Check clips in the layer");
|
||||
tmp = ges_timeline_layer_get_clips (layer);
|
||||
tmp = ges_layer_get_clips (layer);
|
||||
assert_equals_int (g_list_length (tmp), 1);
|
||||
g_list_free_full (tmp, gst_object_unref);
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@ GST_END_TEST;
|
|||
GST_START_TEST (test_add_effect_to_clip)
|
||||
{
|
||||
GESTimeline *timeline;
|
||||
GESTimelineLayer *layer;
|
||||
GESLayer *layer;
|
||||
GESTrack *track_audio, *track_video;
|
||||
GESEffect *effect;
|
||||
GESTestClip *source;
|
||||
|
@ -49,7 +49,7 @@ GST_START_TEST (test_add_effect_to_clip)
|
|||
ges_init ();
|
||||
|
||||
timeline = ges_timeline_new ();
|
||||
layer = (GESTimelineLayer *) ges_simple_timeline_layer_new ();
|
||||
layer = (GESLayer *) ges_simple_layer_new ();
|
||||
track_audio = ges_track_audio_raw_new ();
|
||||
track_video = ges_track_video_raw_new ();
|
||||
|
||||
|
@ -61,7 +61,7 @@ GST_START_TEST (test_add_effect_to_clip)
|
|||
|
||||
g_object_set (source, "duration", 10 * GST_SECOND, NULL);
|
||||
|
||||
ges_simple_timeline_layer_add_object ((GESSimpleTimelineLayer *) (layer),
|
||||
ges_simple_layer_add_object ((GESSimpleLayer *) (layer),
|
||||
(GESClip *) source, 0);
|
||||
|
||||
|
||||
|
@ -76,7 +76,7 @@ GST_START_TEST (test_add_effect_to_clip)
|
|||
|
||||
assert_equals_int (GES_TRACK_ELEMENT (effect)->active, TRUE);
|
||||
|
||||
ges_timeline_layer_remove_clip (layer, (GESClip *) source);
|
||||
ges_layer_remove_clip (layer, (GESClip *) source);
|
||||
|
||||
gst_object_unref (timeline);
|
||||
}
|
||||
|
@ -86,7 +86,7 @@ GST_END_TEST;
|
|||
GST_START_TEST (test_get_effects_from_tl)
|
||||
{
|
||||
GESTimeline *timeline;
|
||||
GESTimelineLayer *layer;
|
||||
GESLayer *layer;
|
||||
GESTrack *track_video;
|
||||
GESEffect *effect, *effect1, *effect2;
|
||||
GESTestClip *source;
|
||||
|
@ -96,7 +96,7 @@ GST_START_TEST (test_get_effects_from_tl)
|
|||
ges_init ();
|
||||
|
||||
timeline = ges_timeline_new ();
|
||||
layer = (GESTimelineLayer *) ges_simple_timeline_layer_new ();
|
||||
layer = (GESLayer *) ges_simple_layer_new ();
|
||||
track_video = ges_track_video_raw_new ();
|
||||
|
||||
ges_timeline_add_track (timeline, track_video);
|
||||
|
@ -106,7 +106,7 @@ GST_START_TEST (test_get_effects_from_tl)
|
|||
|
||||
g_object_set (source, "duration", 10 * GST_SECOND, NULL);
|
||||
|
||||
ges_simple_timeline_layer_add_object ((GESSimpleTimelineLayer *) (layer),
|
||||
ges_simple_layer_add_object ((GESSimpleLayer *) (layer),
|
||||
(GESClip *) source, 0);
|
||||
|
||||
|
||||
|
@ -148,7 +148,7 @@ GST_START_TEST (test_get_effects_from_tl)
|
|||
}
|
||||
g_list_free (effects);
|
||||
|
||||
ges_timeline_layer_remove_clip (layer, (GESClip *) source);
|
||||
ges_layer_remove_clip (layer, (GESClip *) source);
|
||||
|
||||
gst_object_unref (timeline);
|
||||
}
|
||||
|
@ -158,7 +158,7 @@ GST_END_TEST;
|
|||
GST_START_TEST (test_effect_clip)
|
||||
{
|
||||
GESTimeline *timeline;
|
||||
GESTimelineLayer *layer;
|
||||
GESLayer *layer;
|
||||
GESTrack *track_audio, *track_video;
|
||||
GESEffectClip *effect_clip;
|
||||
GESEffect *effect, *effect1;
|
||||
|
@ -174,7 +174,7 @@ GST_START_TEST (test_effect_clip)
|
|||
ges_init ();
|
||||
|
||||
timeline = ges_timeline_new ();
|
||||
layer = (GESTimelineLayer *) ges_simple_timeline_layer_new ();
|
||||
layer = (GESLayer *) ges_simple_layer_new ();
|
||||
track_audio = ges_track_audio_raw_new ();
|
||||
track_video = ges_track_video_raw_new ();
|
||||
|
||||
|
@ -187,7 +187,7 @@ GST_START_TEST (test_effect_clip)
|
|||
|
||||
g_object_set (effect_clip, "duration", 25 * GST_SECOND, NULL);
|
||||
|
||||
ges_simple_timeline_layer_add_object ((GESSimpleTimelineLayer *) (layer),
|
||||
ges_simple_layer_add_object ((GESSimpleLayer *) (layer),
|
||||
(GESClip *) effect_clip, 0);
|
||||
|
||||
effect = ges_effect_new ("agingtv");
|
||||
|
@ -222,7 +222,7 @@ GST_START_TEST (test_effect_clip)
|
|||
}
|
||||
g_list_free (effects);
|
||||
|
||||
ges_timeline_layer_remove_clip (layer, (GESClip *) effect_clip);
|
||||
ges_layer_remove_clip (layer, (GESClip *) effect_clip);
|
||||
|
||||
gst_object_unref (timeline);
|
||||
}
|
||||
|
@ -234,7 +234,7 @@ GST_START_TEST (test_priorities_clip)
|
|||
gint i;
|
||||
GList *effects, *tmp;
|
||||
GESTimeline *timeline;
|
||||
GESTimelineLayer *layer;
|
||||
GESLayer *layer;
|
||||
GESEffectClip *effect_clip;
|
||||
GESTrack *track_audio, *track_video;
|
||||
GESEffect *effect, *effect1, *audio_effect = NULL, *video_effect = NULL;
|
||||
|
@ -244,7 +244,7 @@ GST_START_TEST (test_priorities_clip)
|
|||
ges_init ();
|
||||
|
||||
timeline = ges_timeline_new ();
|
||||
layer = (GESTimelineLayer *) ges_simple_timeline_layer_new ();
|
||||
layer = (GESLayer *) ges_simple_layer_new ();
|
||||
track_audio = ges_track_audio_raw_new ();
|
||||
track_video = ges_track_video_raw_new ();
|
||||
|
||||
|
@ -257,7 +257,7 @@ GST_START_TEST (test_priorities_clip)
|
|||
|
||||
g_object_set (effect_clip, "duration", 25 * GST_SECOND, NULL);
|
||||
|
||||
ges_simple_timeline_layer_add_object ((GESSimpleTimelineLayer *) (layer),
|
||||
ges_simple_layer_add_object ((GESSimpleLayer *) (layer),
|
||||
(GESClip *) effect_clip, 0);
|
||||
|
||||
for (tmp = GES_CONTAINER_CHILDREN (effect_clip); tmp; tmp = tmp->next) {
|
||||
|
@ -317,7 +317,7 @@ GST_START_TEST (test_priorities_clip)
|
|||
}
|
||||
g_list_free (effects);
|
||||
|
||||
ges_timeline_layer_remove_clip (layer, (GESClip *) effect_clip);
|
||||
ges_layer_remove_clip (layer, (GESClip *) effect_clip);
|
||||
|
||||
gst_object_unref (timeline);
|
||||
}
|
||||
|
@ -327,7 +327,7 @@ GST_END_TEST;
|
|||
GST_START_TEST (test_effect_set_properties)
|
||||
{
|
||||
GESTimeline *timeline;
|
||||
GESTimelineLayer *layer;
|
||||
GESLayer *layer;
|
||||
GESTrack *track_video;
|
||||
GESEffectClip *effect_clip;
|
||||
GESTrackElement *effect;
|
||||
|
@ -340,7 +340,7 @@ GST_START_TEST (test_effect_set_properties)
|
|||
ges_init ();
|
||||
|
||||
timeline = ges_timeline_new ();
|
||||
layer = (GESTimelineLayer *) ges_simple_timeline_layer_new ();
|
||||
layer = (GESLayer *) ges_simple_layer_new ();
|
||||
track_video = ges_track_video_raw_new ();
|
||||
|
||||
ges_timeline_add_track (timeline, track_video);
|
||||
|
@ -351,7 +351,7 @@ GST_START_TEST (test_effect_set_properties)
|
|||
|
||||
g_object_set (effect_clip, "duration", 25 * GST_SECOND, NULL);
|
||||
|
||||
ges_simple_timeline_layer_add_object ((GESSimpleTimelineLayer *) (layer),
|
||||
ges_simple_layer_add_object ((GESSimpleLayer *) (layer),
|
||||
(GESClip *) effect_clip, 0);
|
||||
|
||||
effect = GES_TRACK_ELEMENT (ges_effect_new ("agingtv"));
|
||||
|
@ -390,7 +390,7 @@ GST_START_TEST (test_effect_set_properties)
|
|||
}
|
||||
g_free (pspecs);
|
||||
|
||||
ges_timeline_layer_remove_clip (layer, (GESClip *) effect_clip);
|
||||
ges_layer_remove_clip (layer, (GESClip *) effect_clip);
|
||||
|
||||
gst_object_unref (timeline);
|
||||
}
|
||||
|
@ -418,7 +418,7 @@ deep_prop_changed_cb (GESTrackElement * track_element, GstElement * element,
|
|||
GST_START_TEST (test_clip_signals)
|
||||
{
|
||||
GESTimeline *timeline;
|
||||
GESTimelineLayer *layer;
|
||||
GESLayer *layer;
|
||||
GESTrack *track_video;
|
||||
GESEffectClip *effect_clip;
|
||||
GESEffect *effect;
|
||||
|
@ -428,7 +428,7 @@ GST_START_TEST (test_clip_signals)
|
|||
ges_init ();
|
||||
|
||||
timeline = ges_timeline_new ();
|
||||
layer = (GESTimelineLayer *) ges_simple_timeline_layer_new ();
|
||||
layer = (GESLayer *) ges_simple_layer_new ();
|
||||
track_video = ges_track_video_raw_new ();
|
||||
|
||||
ges_timeline_add_track (timeline, track_video);
|
||||
|
@ -441,7 +441,7 @@ GST_START_TEST (test_clip_signals)
|
|||
|
||||
g_object_set (effect_clip, "duration", 25 * GST_SECOND, NULL);
|
||||
|
||||
ges_simple_timeline_layer_add_object ((GESSimpleTimelineLayer *) (layer),
|
||||
ges_simple_layer_add_object ((GESSimpleLayer *) (layer),
|
||||
(GESClip *) effect_clip, 0);
|
||||
|
||||
effect = ges_effect_new ("agingtv");
|
||||
|
@ -464,7 +464,7 @@ GST_START_TEST (test_clip_signals)
|
|||
fail_unless (G_VALUE_HOLDS_UINT (&val));
|
||||
g_value_unset (&val);
|
||||
|
||||
ges_timeline_layer_remove_clip (layer, (GESClip *) effect_clip);
|
||||
ges_layer_remove_clip (layer, (GESClip *) effect_clip);
|
||||
|
||||
gst_object_unref (timeline);
|
||||
}
|
||||
|
|
|
@ -45,7 +45,7 @@ my_fill_track_func (GESClip * clip,
|
|||
GST_START_TEST (test_layer_properties)
|
||||
{
|
||||
GESTimeline *timeline;
|
||||
GESTimelineLayer *layer;
|
||||
GESLayer *layer;
|
||||
GESTrack *track;
|
||||
GESTrackElement *trackelement;
|
||||
GESClip *clip;
|
||||
|
@ -54,10 +54,10 @@ GST_START_TEST (test_layer_properties)
|
|||
|
||||
/* Timeline and 1 Layer */
|
||||
timeline = ges_timeline_new ();
|
||||
layer = (GESTimelineLayer *) ges_timeline_layer_new ();
|
||||
layer = (GESLayer *) ges_layer_new ();
|
||||
|
||||
/* The default priority is 0 */
|
||||
fail_unless_equals_int (ges_timeline_layer_get_priority (layer), 0);
|
||||
fail_unless_equals_int (ges_layer_get_priority (layer), 0);
|
||||
|
||||
/* Layers are initially floating, once we add them to the timeline,
|
||||
* the timeline will take that reference. */
|
||||
|
@ -82,7 +82,7 @@ GST_START_TEST (test_layer_properties)
|
|||
|
||||
/* Add the clip to the timeline */
|
||||
fail_unless (g_object_is_floating (clip));
|
||||
fail_unless (ges_timeline_layer_add_clip (layer, GES_CLIP (clip)));
|
||||
fail_unless (ges_layer_add_clip (layer, GES_CLIP (clip)));
|
||||
fail_if (g_object_is_floating (clip));
|
||||
trackelement = ges_clip_find_track_element (clip, track, G_TYPE_NONE);
|
||||
fail_unless (trackelement != NULL);
|
||||
|
@ -97,27 +97,27 @@ GST_START_TEST (test_layer_properties)
|
|||
|
||||
/* Change the priority of the layer */
|
||||
g_object_set (layer, "priority", 1, NULL);
|
||||
assert_equals_int (ges_timeline_layer_get_priority (layer), 1);
|
||||
assert_equals_int (ges_layer_get_priority (layer), 1);
|
||||
assert_equals_uint64 (_PRIORITY (clip), 0);
|
||||
gnl_object_check (ges_track_element_get_gnlobject (trackelement), 42, 51, 12,
|
||||
51, LAYER_HEIGHT, TRUE);
|
||||
|
||||
/* Change it to an insanely high value */
|
||||
g_object_set (layer, "priority", 31, NULL);
|
||||
assert_equals_int (ges_timeline_layer_get_priority (layer), 31);
|
||||
assert_equals_int (ges_layer_get_priority (layer), 31);
|
||||
assert_equals_uint64 (_PRIORITY (clip), 0);
|
||||
gnl_object_check (ges_track_element_get_gnlobject (trackelement), 42, 51, 12,
|
||||
51, LAYER_HEIGHT * 31, TRUE);
|
||||
|
||||
/* and back to 0 */
|
||||
g_object_set (layer, "priority", 0, NULL);
|
||||
assert_equals_int (ges_timeline_layer_get_priority (layer), 0);
|
||||
assert_equals_int (ges_layer_get_priority (layer), 0);
|
||||
assert_equals_uint64 (_PRIORITY (clip), 0);
|
||||
gnl_object_check (ges_track_element_get_gnlobject (trackelement), 42, 51, 12,
|
||||
51, 0, TRUE);
|
||||
|
||||
gst_object_unref (trackelement);
|
||||
fail_unless (ges_timeline_layer_remove_clip (layer, clip));
|
||||
fail_unless (ges_layer_remove_clip (layer, clip));
|
||||
fail_unless (ges_timeline_remove_track (timeline, track));
|
||||
fail_unless (ges_timeline_remove_layer (timeline, layer));
|
||||
gst_object_unref (timeline);
|
||||
|
@ -129,7 +129,7 @@ GST_START_TEST (test_layer_priorities)
|
|||
{
|
||||
GESTrack *track;
|
||||
GESTimeline *timeline;
|
||||
GESTimelineLayer *layer1, *layer2, *layer3;
|
||||
GESLayer *layer1, *layer2, *layer3;
|
||||
GESTrackElement *trackelement1, *trackelement2, *trackelement3;
|
||||
GESClip *clip1, *clip2, *clip3;
|
||||
GstElement *gnlobj1, *gnlobj2, *gnlobj3;
|
||||
|
@ -140,19 +140,19 @@ GST_START_TEST (test_layer_priorities)
|
|||
|
||||
/* Timeline and 3 Layer */
|
||||
timeline = ges_timeline_new ();
|
||||
layer1 = (GESTimelineLayer *) ges_timeline_layer_new ();
|
||||
layer2 = (GESTimelineLayer *) ges_timeline_layer_new ();
|
||||
layer3 = (GESTimelineLayer *) ges_timeline_layer_new ();
|
||||
layer1 = (GESLayer *) ges_layer_new ();
|
||||
layer2 = (GESLayer *) ges_layer_new ();
|
||||
layer3 = (GESLayer *) ges_layer_new ();
|
||||
|
||||
ges_timeline_layer_set_priority (layer2, 1);
|
||||
ges_timeline_layer_set_priority (layer3, 2);
|
||||
ges_layer_set_priority (layer2, 1);
|
||||
ges_layer_set_priority (layer3, 2);
|
||||
|
||||
fail_unless (ges_timeline_add_layer (timeline, layer1));
|
||||
fail_unless (ges_timeline_add_layer (timeline, layer2));
|
||||
fail_unless (ges_timeline_add_layer (timeline, layer3));
|
||||
fail_unless_equals_int (ges_timeline_layer_get_priority (layer1), 0);
|
||||
fail_unless_equals_int (ges_timeline_layer_get_priority (layer2), 1);
|
||||
fail_unless_equals_int (ges_timeline_layer_get_priority (layer3), 2);
|
||||
fail_unless_equals_int (ges_layer_get_priority (layer1), 0);
|
||||
fail_unless_equals_int (ges_layer_get_priority (layer2), 1);
|
||||
fail_unless_equals_int (ges_layer_get_priority (layer3), 2);
|
||||
|
||||
track = ges_track_video_raw_new ();
|
||||
fail_unless (track != NULL);
|
||||
|
@ -180,15 +180,15 @@ GST_START_TEST (test_layer_priorities)
|
|||
assert_equals_int (_PRIORITY (clip3), LAYER_HEIGHT + 1);
|
||||
|
||||
/* Add objects to the timeline */
|
||||
fail_unless (ges_timeline_layer_add_clip (layer1, clip1));
|
||||
fail_unless (ges_layer_add_clip (layer1, clip1));
|
||||
trackelement1 = ges_clip_find_track_element (clip1, track, G_TYPE_NONE);
|
||||
fail_unless (trackelement1 != NULL);
|
||||
|
||||
fail_unless (ges_timeline_layer_add_clip (layer2, clip2));
|
||||
fail_unless (ges_layer_add_clip (layer2, clip2));
|
||||
trackelement2 = ges_clip_find_track_element (clip2, track, G_TYPE_NONE);
|
||||
fail_unless (trackelement2 != NULL);
|
||||
|
||||
fail_unless (ges_timeline_layer_add_clip (layer3, clip3));
|
||||
fail_unless (ges_layer_add_clip (layer3, clip3));
|
||||
trackelement3 = ges_clip_find_track_element (clip3, track, G_TYPE_NONE);
|
||||
fail_unless (trackelement3 != NULL);
|
||||
|
||||
|
@ -219,9 +219,9 @@ GST_START_TEST (test_layer_priorities)
|
|||
g_object_set (layer3, "priority", 1, NULL);
|
||||
|
||||
/* And check the new priorities */
|
||||
assert_equals_int (ges_timeline_layer_get_priority (layer1), 2);
|
||||
assert_equals_int (ges_timeline_layer_get_priority (layer2), 0);
|
||||
assert_equals_int (ges_timeline_layer_get_priority (layer3), 1);
|
||||
assert_equals_int (ges_layer_get_priority (layer1), 2);
|
||||
assert_equals_int (ges_layer_get_priority (layer2), 0);
|
||||
assert_equals_int (ges_layer_get_priority (layer3), 1);
|
||||
assert_equals_int (_PRIORITY (clip1), 0);
|
||||
assert_equals_int (_PRIORITY (clip2), 1);
|
||||
assert_equals_int (_PRIORITY (clip3), LAYER_HEIGHT - 1);
|
||||
|
@ -236,10 +236,10 @@ GST_START_TEST (test_layer_priorities)
|
|||
fail_unless (ges_clip_move_to_layer (clip2, layer1));
|
||||
fail_unless (ges_clip_move_to_layer (clip3, layer1));
|
||||
|
||||
objs = ges_timeline_layer_get_clips (layer1);
|
||||
objs = ges_layer_get_clips (layer1);
|
||||
assert_equals_int (g_list_length (objs), 3);
|
||||
fail_unless (ges_timeline_layer_get_clips (layer2) == NULL);
|
||||
fail_unless (ges_timeline_layer_get_clips (layer3) == NULL);
|
||||
fail_unless (ges_layer_get_clips (layer2) == NULL);
|
||||
fail_unless (ges_layer_get_clips (layer3) == NULL);
|
||||
|
||||
for (tmp = objs; tmp; tmp = g_list_next (tmp)) {
|
||||
gst_object_unref (tmp->data);
|
||||
|
@ -279,7 +279,7 @@ GST_START_TEST (test_single_layer_automatic_transition)
|
|||
GESTimeline *timeline;
|
||||
GList *objects, *current;
|
||||
GESClip *transition;
|
||||
GESTimelineLayer *layer;
|
||||
GESLayer *layer;
|
||||
GESTimelineElement *src, *src1, *src2;
|
||||
|
||||
ges_init ();
|
||||
|
@ -292,26 +292,26 @@ GST_START_TEST (test_single_layer_automatic_transition)
|
|||
assert_is_type (timeline, GES_TYPE_TIMELINE);
|
||||
|
||||
GST_DEBUG ("Create first layer");
|
||||
layer = ges_timeline_layer_new ();
|
||||
assert_is_type (layer, GES_TYPE_TIMELINE_LAYER);
|
||||
layer = ges_layer_new ();
|
||||
assert_is_type (layer, GES_TYPE_LAYER);
|
||||
|
||||
GST_DEBUG ("Add first layer to timeline");
|
||||
fail_unless (ges_timeline_add_layer (timeline, layer));
|
||||
|
||||
GST_DEBUG ("Set auto transition to first layer");
|
||||
ges_timeline_layer_set_auto_transition (layer, TRUE);
|
||||
ges_layer_set_auto_transition (layer, TRUE);
|
||||
|
||||
GST_DEBUG ("Check that auto-transition was properly set");
|
||||
fail_unless (ges_timeline_layer_get_auto_transition (layer));
|
||||
fail_unless (ges_layer_get_auto_transition (layer));
|
||||
|
||||
GST_DEBUG ("Adding assets to first layer");
|
||||
GST_DEBUG ("Adding clip from 0 -- 1000 to first layer");
|
||||
src = GES_TIMELINE_ELEMENT (ges_timeline_layer_add_asset (layer, asset, 0, 0,
|
||||
src = GES_TIMELINE_ELEMENT (ges_layer_add_asset (layer, asset, 0, 0,
|
||||
1000, GES_TRACK_TYPE_UNKNOWN));
|
||||
fail_unless (GES_IS_CLIP (src));
|
||||
|
||||
GST_DEBUG ("Adding clip from 500 -- 1000 to first layer");
|
||||
src1 = GES_TIMELINE_ELEMENT (ges_timeline_layer_add_asset (layer, asset, 500,
|
||||
src1 = GES_TIMELINE_ELEMENT (ges_layer_add_asset (layer, asset, 500,
|
||||
0, 1000, GES_TRACK_TYPE_UNKNOWN));
|
||||
fail_unless (GES_IS_CLIP (src1));
|
||||
|
||||
|
@ -327,7 +327,7 @@ GST_START_TEST (test_single_layer_automatic_transition)
|
|||
assert_equals_uint64 (_DURATION (src1), 1500 - 500);
|
||||
|
||||
GST_DEBUG ("Checking that a transition has been added");
|
||||
objects = ges_timeline_layer_get_clips (layer);
|
||||
objects = ges_layer_get_clips (layer);
|
||||
assert_equals_int (g_list_length (objects), 4);
|
||||
assert_is_type (objects->data, GES_TYPE_TEST_CLIP);
|
||||
|
||||
|
@ -357,7 +357,7 @@ GST_START_TEST (test_single_layer_automatic_transition)
|
|||
assert_equals_uint64 (_START (src1), 500);
|
||||
assert_equals_uint64 (_DURATION (src1), 1500 - 500);
|
||||
|
||||
objects = ges_timeline_layer_get_clips (layer);
|
||||
objects = ges_layer_get_clips (layer);
|
||||
assert_equals_int (g_list_length (objects), 4);
|
||||
assert_is_type (objects->data, GES_TYPE_TEST_CLIP);
|
||||
|
||||
|
@ -385,7 +385,7 @@ GST_START_TEST (test_single_layer_automatic_transition)
|
|||
assert_equals_uint64 (_START (src1), 250);
|
||||
assert_equals_uint64 (_DURATION (src1), 1250 - 250);
|
||||
|
||||
objects = ges_timeline_layer_get_clips (layer);
|
||||
objects = ges_layer_get_clips (layer);
|
||||
assert_equals_int (g_list_length (objects), 2);
|
||||
g_list_free_full (objects, gst_object_unref);
|
||||
|
||||
|
@ -403,7 +403,7 @@ GST_START_TEST (test_single_layer_automatic_transition)
|
|||
assert_equals_uint64 (_START (src1), 500);
|
||||
assert_equals_uint64 (_DURATION (src1), 1250 - 500);
|
||||
|
||||
objects = ges_timeline_layer_get_clips (layer);
|
||||
objects = ges_layer_get_clips (layer);
|
||||
assert_equals_int (g_list_length (objects), 2);
|
||||
g_list_free_full (objects, gst_object_unref);
|
||||
|
||||
|
@ -431,11 +431,11 @@ GST_START_TEST (test_single_layer_automatic_transition)
|
|||
assert_equals_uint64 (_START (src1), 500);
|
||||
assert_equals_uint64 (_DURATION (src1), 1250 - 500);
|
||||
|
||||
objects = ges_timeline_layer_get_clips (layer);
|
||||
objects = ges_layer_get_clips (layer);
|
||||
assert_equals_int (g_list_length (objects), 2);
|
||||
g_list_free_full (objects, gst_object_unref);
|
||||
|
||||
objects = ges_timeline_layer_get_clips (layer);
|
||||
objects = ges_layer_get_clips (layer);
|
||||
assert_equals_int (g_list_length (objects), 2);
|
||||
g_list_free_full (objects, gst_object_unref);
|
||||
|
||||
|
@ -451,11 +451,11 @@ GST_START_TEST (test_single_layer_automatic_transition)
|
|||
assert_equals_uint64 (_START (src1), 500);
|
||||
assert_equals_uint64 (_DURATION (src1), 1250 - 500);
|
||||
|
||||
objects = ges_timeline_layer_get_clips (layer);
|
||||
objects = ges_layer_get_clips (layer);
|
||||
assert_equals_int (g_list_length (objects), 2);
|
||||
g_list_free_full (objects, gst_object_unref);
|
||||
|
||||
objects = ges_timeline_layer_get_clips (layer);
|
||||
objects = ges_layer_get_clips (layer);
|
||||
assert_equals_int (g_list_length (objects), 2);
|
||||
g_list_free_full (objects, gst_object_unref);
|
||||
|
||||
|
@ -470,18 +470,18 @@ GST_START_TEST (test_single_layer_automatic_transition)
|
|||
assert_equals_uint64 (_START (src1), 500);
|
||||
assert_equals_uint64 (_DURATION (src1), 1250 - 500);
|
||||
|
||||
objects = ges_timeline_layer_get_clips (layer);
|
||||
objects = ges_layer_get_clips (layer);
|
||||
assert_equals_int (g_list_length (objects), 2);
|
||||
g_list_free_full (objects, gst_object_unref);
|
||||
|
||||
objects = ges_timeline_layer_get_clips (layer);
|
||||
objects = ges_layer_get_clips (layer);
|
||||
assert_equals_int (g_list_length (objects), 2);
|
||||
g_list_free_full (objects, gst_object_unref);
|
||||
|
||||
GST_DEBUG ("Adding asset to first layer");
|
||||
GST_DEBUG ("Adding clip from 1250 -- 1000 to first layer");
|
||||
src2 =
|
||||
GES_TIMELINE_ELEMENT (ges_timeline_layer_add_asset (layer, asset, 1250, 0,
|
||||
GES_TIMELINE_ELEMENT (ges_layer_add_asset (layer, asset, 1250, 0,
|
||||
1000, GES_TRACK_TYPE_UNKNOWN));
|
||||
assert_is_type (src2, GES_TYPE_TEST_CLIP);
|
||||
|
||||
|
@ -496,7 +496,7 @@ GST_START_TEST (test_single_layer_automatic_transition)
|
|||
assert_equals_uint64 (_START (src2), 1250);
|
||||
assert_equals_uint64 (_DURATION (src2), 1000);
|
||||
|
||||
objects = ges_timeline_layer_get_clips (layer);
|
||||
objects = ges_layer_get_clips (layer);
|
||||
assert_equals_int (g_list_length (objects), 3);
|
||||
g_list_free_full (objects, gst_object_unref);
|
||||
|
||||
|
@ -515,7 +515,7 @@ GST_START_TEST (test_single_layer_automatic_transition)
|
|||
assert_equals_uint64 (_START (src1), 500);
|
||||
assert_equals_uint64 (_DURATION (src1), 1250 - 500);
|
||||
|
||||
current = objects = ges_timeline_layer_get_clips (layer);
|
||||
current = objects = ges_layer_get_clips (layer);
|
||||
assert_equals_int (g_list_length (objects), 7);
|
||||
assert_is_type (objects->data, GES_TYPE_TEST_CLIP);
|
||||
fail_unless (objects->data == src1);
|
||||
|
@ -571,7 +571,7 @@ GST_START_TEST (test_single_layer_automatic_transition)
|
|||
/* We check that the transition as actually been freed */
|
||||
fail_if (GES_IS_TRANSITION_CLIP (transition));
|
||||
|
||||
objects = ges_timeline_layer_get_clips (layer);
|
||||
objects = ges_layer_get_clips (layer);
|
||||
assert_equals_int (g_list_length (objects), 3);
|
||||
g_list_free_full (objects, gst_object_unref);
|
||||
|
||||
|
@ -590,7 +590,7 @@ GST_START_TEST (test_single_layer_automatic_transition)
|
|||
assert_equals_uint64 (_START (src2), 1100);
|
||||
assert_equals_uint64 (_DURATION (src2), 1000);
|
||||
|
||||
current = objects = ges_timeline_layer_get_clips (layer);
|
||||
current = objects = ges_layer_get_clips (layer);
|
||||
assert_equals_int (g_list_length (objects), 5);
|
||||
assert_is_type (objects->data, GES_TYPE_TEST_CLIP);
|
||||
fail_unless (current->data == src1);
|
||||
|
@ -630,7 +630,7 @@ GST_START_TEST (test_single_layer_automatic_transition)
|
|||
assert_equals_uint64 (_START (src2), 1000);
|
||||
assert_equals_uint64 (_DURATION (src2), 1000);
|
||||
|
||||
current = objects = ges_timeline_layer_get_clips (layer);
|
||||
current = objects = ges_layer_get_clips (layer);
|
||||
current = objects;
|
||||
assert_equals_int (g_list_length (objects), 7);
|
||||
assert_is_type (objects->data, GES_TYPE_TEST_CLIP);
|
||||
|
@ -678,7 +678,7 @@ GST_START_TEST (test_multi_layer_automatic_transition)
|
|||
GESTimeline *timeline;
|
||||
GList *objects, *current;
|
||||
GESClip *transition;
|
||||
GESTimelineLayer *layer, *layer1;
|
||||
GESLayer *layer, *layer1;
|
||||
GESTimelineElement *src, *src1, *src2, *src3;
|
||||
|
||||
ges_init ();
|
||||
|
@ -691,31 +691,31 @@ GST_START_TEST (test_multi_layer_automatic_transition)
|
|||
assert_is_type (timeline, GES_TYPE_TIMELINE);
|
||||
|
||||
GST_DEBUG ("Create first layer");
|
||||
layer = ges_timeline_layer_new ();
|
||||
assert_is_type (layer, GES_TYPE_TIMELINE_LAYER);
|
||||
layer = ges_layer_new ();
|
||||
assert_is_type (layer, GES_TYPE_LAYER);
|
||||
|
||||
GST_DEBUG ("Add first layer to timeline");
|
||||
fail_unless (ges_timeline_add_layer (timeline, layer));
|
||||
|
||||
GST_DEBUG ("Append a new layer to the timeline");
|
||||
layer1 = ges_timeline_append_layer (timeline);
|
||||
assert_is_type (layer1, GES_TYPE_TIMELINE_LAYER);
|
||||
assert_is_type (layer1, GES_TYPE_LAYER);
|
||||
|
||||
GST_DEBUG ("Set auto transition to first layer");
|
||||
ges_timeline_layer_set_auto_transition (layer, TRUE);
|
||||
ges_layer_set_auto_transition (layer, TRUE);
|
||||
|
||||
GST_DEBUG ("Check that auto-transition was properly set");
|
||||
fail_unless (ges_timeline_layer_get_auto_transition (layer));
|
||||
fail_if (ges_timeline_layer_get_auto_transition (layer1));
|
||||
fail_unless (ges_layer_get_auto_transition (layer));
|
||||
fail_if (ges_layer_get_auto_transition (layer1));
|
||||
|
||||
GST_DEBUG ("Adding assets to first layer");
|
||||
GST_DEBUG ("Adding clip from 0 -- 1000 to first layer");
|
||||
src = GES_TIMELINE_ELEMENT (ges_timeline_layer_add_asset (layer, asset, 0, 0,
|
||||
src = GES_TIMELINE_ELEMENT (ges_layer_add_asset (layer, asset, 0, 0,
|
||||
1000, GES_TRACK_TYPE_UNKNOWN));
|
||||
fail_unless (GES_IS_CLIP (src));
|
||||
|
||||
GST_DEBUG ("Adding clip from 500 -- 1000 to first layer");
|
||||
src1 = GES_TIMELINE_ELEMENT (ges_timeline_layer_add_asset (layer, asset, 500,
|
||||
src1 = GES_TIMELINE_ELEMENT (ges_layer_add_asset (layer, asset, 500,
|
||||
0, 1000, GES_TRACK_TYPE_UNKNOWN));
|
||||
fail_unless (GES_IS_CLIP (src1));
|
||||
|
||||
|
@ -731,7 +731,7 @@ GST_START_TEST (test_multi_layer_automatic_transition)
|
|||
assert_equals_uint64 (_DURATION (src1), 1500 - 500);
|
||||
|
||||
GST_DEBUG ("Checking that a transition has been added");
|
||||
current = objects = ges_timeline_layer_get_clips (layer);
|
||||
current = objects = ges_layer_get_clips (layer);
|
||||
assert_equals_int (g_list_length (objects), 4);
|
||||
assert_is_type (current->data, GES_TYPE_TEST_CLIP);
|
||||
|
||||
|
@ -750,10 +750,10 @@ GST_START_TEST (test_multi_layer_automatic_transition)
|
|||
ASSERT_OBJECT_REFCOUNT (transition, "Only the layer owns a ref", 1);
|
||||
|
||||
GST_DEBUG ("Adding clip 2 from 500 -- 1000 to second layer");
|
||||
src2 = GES_TIMELINE_ELEMENT (ges_timeline_layer_add_asset (layer1, asset, 0,
|
||||
src2 = GES_TIMELINE_ELEMENT (ges_layer_add_asset (layer1, asset, 0,
|
||||
0, 1000, GES_TRACK_TYPE_UNKNOWN));
|
||||
GST_DEBUG ("Adding clip 3 from 500 -- 1000 to second layer");
|
||||
src3 = GES_TIMELINE_ELEMENT (ges_timeline_layer_add_asset (layer1, asset, 500,
|
||||
src3 = GES_TIMELINE_ELEMENT (ges_layer_add_asset (layer1, asset, 500,
|
||||
0, 1000, GES_TRACK_TYPE_UNKNOWN));
|
||||
assert_is_type (src3, GES_TYPE_TEST_CLIP);
|
||||
|
||||
|
@ -775,7 +775,7 @@ GST_START_TEST (test_multi_layer_automatic_transition)
|
|||
assert_equals_uint64 (_DURATION (src3), 1500 - 500);
|
||||
|
||||
GST_DEBUG ("Checking transitions on first layer");
|
||||
current = objects = ges_timeline_layer_get_clips (layer);
|
||||
current = objects = ges_layer_get_clips (layer);
|
||||
assert_equals_int (g_list_length (objects), 4);
|
||||
assert_is_type (current->data, GES_TYPE_TEST_CLIP);
|
||||
|
||||
|
@ -794,7 +794,7 @@ GST_START_TEST (test_multi_layer_automatic_transition)
|
|||
ASSERT_OBJECT_REFCOUNT (transition, "Only the layer owns a ref", 1);
|
||||
|
||||
GST_DEBUG ("Checking transitions on second layer");
|
||||
current = objects = ges_timeline_layer_get_clips (layer1);
|
||||
current = objects = ges_layer_get_clips (layer1);
|
||||
assert_equals_int (g_list_length (objects), 2);
|
||||
fail_unless (current->data == src2);
|
||||
fail_unless (current->next->data == src3);
|
||||
|
@ -802,7 +802,7 @@ GST_START_TEST (test_multi_layer_automatic_transition)
|
|||
|
||||
GST_DEBUG
|
||||
("Set auto transition to second layer, a new transition should be added");
|
||||
ges_timeline_layer_set_auto_transition (layer1, TRUE);
|
||||
ges_layer_set_auto_transition (layer1, TRUE);
|
||||
|
||||
/* 500__transition__1000
|
||||
* 0___________src_________1000
|
||||
|
@ -823,7 +823,7 @@ GST_START_TEST (test_multi_layer_automatic_transition)
|
|||
assert_equals_uint64 (_DURATION (src3), 1500 - 500);
|
||||
|
||||
GST_DEBUG ("Checking transitions on first layer");
|
||||
current = objects = ges_timeline_layer_get_clips (layer);
|
||||
current = objects = ges_layer_get_clips (layer);
|
||||
assert_equals_int (g_list_length (objects), 4);
|
||||
assert_is_type (current->data, GES_TYPE_TEST_CLIP);
|
||||
|
||||
|
@ -842,7 +842,7 @@ GST_START_TEST (test_multi_layer_automatic_transition)
|
|||
ASSERT_OBJECT_REFCOUNT (transition, "Only the layer owns a ref", 1);
|
||||
|
||||
GST_DEBUG ("Checking transitions has been added on second layer");
|
||||
current = objects = ges_timeline_layer_get_clips (layer1);
|
||||
current = objects = ges_layer_get_clips (layer1);
|
||||
assert_equals_int (g_list_length (objects), 4);
|
||||
assert_is_type (current->data, GES_TYPE_TEST_CLIP);
|
||||
|
||||
|
@ -881,7 +881,7 @@ GST_START_TEST (test_multi_layer_automatic_transition)
|
|||
assert_equals_uint64 (_DURATION (src3), 2000 - 1000);
|
||||
|
||||
GST_DEBUG ("Checking transitions on first layer");
|
||||
current = objects = ges_timeline_layer_get_clips (layer);
|
||||
current = objects = ges_layer_get_clips (layer);
|
||||
assert_equals_int (g_list_length (objects), 4);
|
||||
assert_is_type (current->data, GES_TYPE_TEST_CLIP);
|
||||
|
||||
|
@ -900,7 +900,7 @@ GST_START_TEST (test_multi_layer_automatic_transition)
|
|||
ASSERT_OBJECT_REFCOUNT (transition, "Only the layer owns a ref", 1);
|
||||
|
||||
GST_DEBUG ("Checking transitions has been removed on second layer");
|
||||
current = objects = ges_timeline_layer_get_clips (layer1);
|
||||
current = objects = ges_layer_get_clips (layer1);
|
||||
assert_equals_int (g_list_length (objects), 2);
|
||||
fail_unless (current->data == src2);
|
||||
fail_unless (current->next->data == src3);
|
||||
|
@ -929,7 +929,7 @@ GST_START_TEST (test_multi_layer_automatic_transition)
|
|||
assert_equals_uint64 (_DURATION (src3), 2000 - 1000);
|
||||
|
||||
GST_DEBUG ("Checking transitions on first layer");
|
||||
current = objects = ges_timeline_layer_get_clips (layer);
|
||||
current = objects = ges_layer_get_clips (layer);
|
||||
assert_equals_int (g_list_length (objects), 7);
|
||||
fail_unless (current->data == src);
|
||||
|
||||
|
@ -967,7 +967,7 @@ GST_START_TEST (test_multi_layer_automatic_transition)
|
|||
ASSERT_OBJECT_REFCOUNT (transition, "Only the layer owns a ref", 1);
|
||||
|
||||
GST_DEBUG ("Checking second layer");
|
||||
current = objects = ges_timeline_layer_get_clips (layer1);
|
||||
current = objects = ges_layer_get_clips (layer1);
|
||||
assert_equals_int (g_list_length (objects), 1);
|
||||
fail_unless (current->data == src2);
|
||||
g_list_free_full (objects, gst_object_unref);
|
||||
|
@ -995,7 +995,7 @@ GST_START_TEST (test_multi_layer_automatic_transition)
|
|||
assert_equals_uint64 (_DURATION (src3), 2000 - 1000);
|
||||
|
||||
GST_DEBUG ("Checking transitions on first layer");
|
||||
current = objects = ges_timeline_layer_get_clips (layer);
|
||||
current = objects = ges_layer_get_clips (layer);
|
||||
assert_equals_int (g_list_length (objects), 4);
|
||||
fail_unless (current->data == src1);
|
||||
|
||||
|
@ -1017,7 +1017,7 @@ GST_START_TEST (test_multi_layer_automatic_transition)
|
|||
ASSERT_OBJECT_REFCOUNT (transition, "Only the layer owns a ref", 1);
|
||||
|
||||
GST_DEBUG ("Checking second layer");
|
||||
current = objects = ges_timeline_layer_get_clips (layer1);
|
||||
current = objects = ges_layer_get_clips (layer1);
|
||||
assert_equals_int (g_list_length (objects), 2);
|
||||
assert_is_type (current->data, GES_TYPE_TEST_CLIP);
|
||||
assert_is_type (current->next->data, GES_TYPE_TEST_CLIP);
|
||||
|
@ -1046,7 +1046,7 @@ GST_START_TEST (test_multi_layer_automatic_transition)
|
|||
assert_equals_uint64 (_DURATION (src3), 2000 - 1000);
|
||||
|
||||
GST_DEBUG ("Checking transitions on first layer");
|
||||
current = objects = ges_timeline_layer_get_clips (layer);
|
||||
current = objects = ges_layer_get_clips (layer);
|
||||
assert_equals_int (g_list_length (objects), 7);
|
||||
fail_unless (current->data == src1);
|
||||
|
||||
|
@ -1083,7 +1083,7 @@ GST_START_TEST (test_multi_layer_automatic_transition)
|
|||
ASSERT_OBJECT_REFCOUNT (transition, "Only the layer owns a ref", 1);
|
||||
|
||||
GST_DEBUG ("Checking second layer");
|
||||
current = objects = ges_timeline_layer_get_clips (layer1);
|
||||
current = objects = ges_layer_get_clips (layer1);
|
||||
assert_equals_int (g_list_length (objects), 1);
|
||||
assert_is_type (current->data, GES_TYPE_TEST_CLIP);
|
||||
g_list_free_full (objects, gst_object_unref);
|
||||
|
@ -1111,7 +1111,7 @@ GST_START_TEST (test_multi_layer_automatic_transition)
|
|||
assert_equals_uint64 (_DURATION (src3), 2000 - 1000);
|
||||
|
||||
GST_DEBUG ("Checking transitions on first layer");
|
||||
current = objects = ges_timeline_layer_get_clips (layer);
|
||||
current = objects = ges_layer_get_clips (layer);
|
||||
assert_equals_int (g_list_length (objects), 7);
|
||||
fail_unless (current->data == src1);
|
||||
|
||||
|
@ -1148,7 +1148,7 @@ GST_START_TEST (test_multi_layer_automatic_transition)
|
|||
ASSERT_OBJECT_REFCOUNT (transition, "Only the layer owns a ref", 1);
|
||||
|
||||
GST_DEBUG ("Checking second layer");
|
||||
current = objects = ges_timeline_layer_get_clips (layer1);
|
||||
current = objects = ges_layer_get_clips (layer1);
|
||||
assert_equals_int (g_list_length (objects), 1);
|
||||
assert_is_type (current->data, GES_TYPE_TEST_CLIP);
|
||||
g_list_free_full (objects, gst_object_unref);
|
||||
|
@ -1163,7 +1163,7 @@ GST_START_TEST (test_layer_activate_automatic_transition)
|
|||
{
|
||||
GESAsset *asset, *transition_asset;
|
||||
GESTimeline *timeline;
|
||||
GESTimelineLayer *layer;
|
||||
GESLayer *layer;
|
||||
GList *objects, *current;
|
||||
GESClip *transition;
|
||||
GESTimelineElement *src, *src1, *src2, *src3;
|
||||
|
@ -1181,25 +1181,25 @@ GST_START_TEST (test_layer_activate_automatic_transition)
|
|||
|
||||
GST_DEBUG ("Append a layer to the timeline");
|
||||
layer = ges_timeline_append_layer (timeline);
|
||||
assert_is_type (layer, GES_TYPE_TIMELINE_LAYER);
|
||||
assert_is_type (layer, GES_TYPE_LAYER);
|
||||
|
||||
GST_DEBUG ("Adding clip from 0 -- 1000 to layer");
|
||||
src = GES_TIMELINE_ELEMENT (ges_timeline_layer_add_asset (layer, asset, 0, 0,
|
||||
src = GES_TIMELINE_ELEMENT (ges_layer_add_asset (layer, asset, 0, 0,
|
||||
1000, GES_TRACK_TYPE_UNKNOWN));
|
||||
fail_unless (GES_IS_CLIP (src));
|
||||
|
||||
GST_DEBUG ("Adding clip from 500 -- 1000 to first layer");
|
||||
src1 = GES_TIMELINE_ELEMENT (ges_timeline_layer_add_asset (layer, asset, 500,
|
||||
src1 = GES_TIMELINE_ELEMENT (ges_layer_add_asset (layer, asset, 500,
|
||||
0, 1000, GES_TRACK_TYPE_UNKNOWN));
|
||||
fail_unless (GES_IS_CLIP (src1));
|
||||
|
||||
GST_DEBUG ("Adding clip from 1000 -- 2000 to layer");
|
||||
src2 = GES_TIMELINE_ELEMENT (ges_timeline_layer_add_asset (layer, asset, 1000,
|
||||
src2 = GES_TIMELINE_ELEMENT (ges_layer_add_asset (layer, asset, 1000,
|
||||
0, 1000, GES_TRACK_TYPE_UNKNOWN));
|
||||
fail_unless (GES_IS_CLIP (src2));
|
||||
|
||||
GST_DEBUG ("Adding clip from 2000 -- 2500 to layer");
|
||||
src3 = GES_TIMELINE_ELEMENT (ges_timeline_layer_add_asset (layer, asset, 2000,
|
||||
src3 = GES_TIMELINE_ELEMENT (ges_layer_add_asset (layer, asset, 2000,
|
||||
0, 500, GES_TRACK_TYPE_UNKNOWN));
|
||||
fail_unless (GES_IS_CLIP (src3));
|
||||
|
||||
|
@ -1220,14 +1220,14 @@ GST_START_TEST (test_layer_activate_automatic_transition)
|
|||
assert_equals_uint64 (_DURATION (src3), 500);
|
||||
|
||||
GST_DEBUG ("Checking that no transition has been added");
|
||||
current = objects = ges_timeline_layer_get_clips (layer);
|
||||
current = objects = ges_layer_get_clips (layer);
|
||||
assert_equals_int (g_list_length (objects), 4);
|
||||
assert_is_type (current->data, GES_TYPE_TEST_CLIP);
|
||||
g_list_free_full (objects, gst_object_unref);
|
||||
|
||||
GST_DEBUG ("Adding transition from 1000 -- 1500 to layer");
|
||||
transition =
|
||||
GES_CLIP (ges_timeline_layer_add_asset (layer,
|
||||
GES_CLIP (ges_layer_add_asset (layer,
|
||||
transition_asset, 1000, 0, 500, GES_TRACK_TYPE_VIDEO));
|
||||
fail_unless (GES_IS_TRANSITION_CLIP (transition));
|
||||
objects = GES_CONTAINER_CHILDREN (transition);
|
||||
|
@ -1241,7 +1241,7 @@ GST_START_TEST (test_layer_activate_automatic_transition)
|
|||
* 1000____src2_______2000
|
||||
* 2000_______src3_____2500
|
||||
*/
|
||||
current = objects = ges_timeline_layer_get_clips (layer);
|
||||
current = objects = ges_layer_get_clips (layer);
|
||||
assert_equals_int (g_list_length (objects), 5);
|
||||
current = current->next;
|
||||
assert_is_type (current->data, GES_TYPE_TEST_CLIP);
|
||||
|
@ -1253,7 +1253,7 @@ GST_START_TEST (test_layer_activate_automatic_transition)
|
|||
assert_is_type (current->data, GES_TYPE_TEST_CLIP);
|
||||
g_list_free_full (objects, gst_object_unref);
|
||||
|
||||
ges_timeline_layer_set_auto_transition (layer, TRUE);
|
||||
ges_layer_set_auto_transition (layer, TRUE);
|
||||
/*
|
||||
* 0___________src_________1000
|
||||
* 500______tr______1000
|
||||
|
@ -1262,7 +1262,7 @@ GST_START_TEST (test_layer_activate_automatic_transition)
|
|||
* 1000____src2_______2000
|
||||
* 2000_______src3_____2500
|
||||
*/
|
||||
current = objects = ges_timeline_layer_get_clips (layer);
|
||||
current = objects = ges_layer_get_clips (layer);
|
||||
assert_equals_int (g_list_length (objects), 8);
|
||||
assert_equals_uint64 (_START (src), 0);
|
||||
assert_equals_uint64 (_DURATION (src), 1000);
|
||||
|
@ -1322,7 +1322,7 @@ GST_START_TEST (test_layer_activate_automatic_transition)
|
|||
* !__tr__^
|
||||
* 2000_______src3_____2500
|
||||
*/
|
||||
current = objects = ges_timeline_layer_get_clips (layer);
|
||||
current = objects = ges_layer_get_clips (layer);
|
||||
assert_equals_int (g_list_length (objects), 10);
|
||||
assert_equals_uint64 (_START (src), 0);
|
||||
assert_equals_uint64 (_DURATION (src), 1000);
|
||||
|
@ -1392,13 +1392,13 @@ GST_END_TEST;
|
|||
GST_START_TEST (test_layer_meta_string)
|
||||
{
|
||||
GESTimeline *timeline;
|
||||
GESTimelineLayer *layer;
|
||||
GESLayer *layer;
|
||||
const gchar *result;
|
||||
|
||||
ges_init ();
|
||||
|
||||
timeline = ges_timeline_new_audio_video ();
|
||||
layer = ges_timeline_layer_new ();
|
||||
layer = ges_layer_new ();
|
||||
ges_timeline_add_layer (timeline, layer);
|
||||
|
||||
ges_meta_container_set_string (GES_META_CONTAINER (layer),
|
||||
|
@ -1415,13 +1415,13 @@ GST_END_TEST;
|
|||
GST_START_TEST (test_layer_meta_boolean)
|
||||
{
|
||||
GESTimeline *timeline;
|
||||
GESTimelineLayer *layer;
|
||||
GESLayer *layer;
|
||||
gboolean result;
|
||||
|
||||
ges_init ();
|
||||
|
||||
timeline = ges_timeline_new_audio_video ();
|
||||
layer = ges_timeline_layer_new ();
|
||||
layer = ges_layer_new ();
|
||||
ges_timeline_add_layer (timeline, layer);
|
||||
|
||||
ges_meta_container_set_boolean (GES_META_CONTAINER (layer), "ges-test", TRUE);
|
||||
|
@ -1437,13 +1437,13 @@ GST_END_TEST;
|
|||
GST_START_TEST (test_layer_meta_int)
|
||||
{
|
||||
GESTimeline *timeline;
|
||||
GESTimelineLayer *layer;
|
||||
GESLayer *layer;
|
||||
gint result;
|
||||
|
||||
ges_init ();
|
||||
|
||||
timeline = ges_timeline_new_audio_video ();
|
||||
layer = ges_timeline_layer_new ();
|
||||
layer = ges_layer_new ();
|
||||
ges_timeline_add_layer (timeline, layer);
|
||||
|
||||
ges_meta_container_set_int (GES_META_CONTAINER (layer), "ges-test", 1234);
|
||||
|
@ -1459,13 +1459,13 @@ GST_END_TEST;
|
|||
GST_START_TEST (test_layer_meta_uint)
|
||||
{
|
||||
GESTimeline *timeline;
|
||||
GESTimelineLayer *layer;
|
||||
GESLayer *layer;
|
||||
guint result;
|
||||
|
||||
ges_init ();
|
||||
|
||||
timeline = ges_timeline_new_audio_video ();
|
||||
layer = ges_timeline_layer_new ();
|
||||
layer = ges_layer_new ();
|
||||
ges_timeline_add_layer (timeline, layer);
|
||||
|
||||
ges_meta_container_set_uint (GES_META_CONTAINER (layer), "ges-test", 42);
|
||||
|
@ -1481,13 +1481,13 @@ GST_END_TEST;
|
|||
GST_START_TEST (test_layer_meta_int64)
|
||||
{
|
||||
GESTimeline *timeline;
|
||||
GESTimelineLayer *layer;
|
||||
GESLayer *layer;
|
||||
gint64 result;
|
||||
|
||||
ges_init ();
|
||||
|
||||
timeline = ges_timeline_new_audio_video ();
|
||||
layer = ges_timeline_layer_new ();
|
||||
layer = ges_layer_new ();
|
||||
ges_timeline_add_layer (timeline, layer);
|
||||
|
||||
ges_meta_container_set_int64 (GES_META_CONTAINER (layer), "ges-test", 1234);
|
||||
|
@ -1503,13 +1503,13 @@ GST_END_TEST;
|
|||
GST_START_TEST (test_layer_meta_uint64)
|
||||
{
|
||||
GESTimeline *timeline;
|
||||
GESTimelineLayer *layer;
|
||||
GESLayer *layer;
|
||||
guint64 result;
|
||||
|
||||
ges_init ();
|
||||
|
||||
timeline = ges_timeline_new_audio_video ();
|
||||
layer = ges_timeline_layer_new ();
|
||||
layer = ges_layer_new ();
|
||||
ges_timeline_add_layer (timeline, layer);
|
||||
|
||||
ges_meta_container_set_uint64 (GES_META_CONTAINER (layer), "ges-test", 42);
|
||||
|
@ -1525,13 +1525,13 @@ GST_END_TEST;
|
|||
GST_START_TEST (test_layer_meta_float)
|
||||
{
|
||||
GESTimeline *timeline;
|
||||
GESTimelineLayer *layer;
|
||||
GESLayer *layer;
|
||||
gfloat result;
|
||||
|
||||
ges_init ();
|
||||
|
||||
timeline = ges_timeline_new_audio_video ();
|
||||
layer = ges_timeline_layer_new ();
|
||||
layer = ges_layer_new ();
|
||||
ges_timeline_add_layer (timeline, layer);
|
||||
|
||||
fail_unless (ges_meta_container_set_float (GES_META_CONTAINER (layer),
|
||||
|
@ -1548,13 +1548,13 @@ GST_END_TEST;
|
|||
GST_START_TEST (test_layer_meta_double)
|
||||
{
|
||||
GESTimeline *timeline;
|
||||
GESTimelineLayer *layer;
|
||||
GESLayer *layer;
|
||||
gdouble result;
|
||||
|
||||
ges_init ();
|
||||
|
||||
timeline = ges_timeline_new_audio_video ();
|
||||
layer = ges_timeline_layer_new ();
|
||||
layer = ges_layer_new ();
|
||||
ges_timeline_add_layer (timeline, layer);
|
||||
|
||||
ges_meta_container_set_double (GES_META_CONTAINER (layer),
|
||||
|
@ -1573,14 +1573,14 @@ GST_END_TEST;
|
|||
GST_START_TEST (test_layer_meta_date)
|
||||
{
|
||||
GESTimeline *timeline;
|
||||
GESTimelineLayer *layer;
|
||||
GESLayer *layer;
|
||||
GDate *input;
|
||||
GDate *result;
|
||||
|
||||
ges_init ();
|
||||
|
||||
timeline = ges_timeline_new_audio_video ();
|
||||
layer = ges_timeline_layer_new ();
|
||||
layer = ges_layer_new ();
|
||||
ges_timeline_add_layer (timeline, layer);
|
||||
|
||||
input = g_date_new_dmy (1, 1, 2012);
|
||||
|
@ -1601,14 +1601,14 @@ GST_END_TEST;
|
|||
GST_START_TEST (test_layer_meta_date_time)
|
||||
{
|
||||
GESTimeline *timeline;
|
||||
GESTimelineLayer *layer;
|
||||
GESLayer *layer;
|
||||
GstDateTime *input;
|
||||
GstDateTime *result = NULL;
|
||||
|
||||
ges_init ();
|
||||
|
||||
timeline = ges_timeline_new_audio_video ();
|
||||
layer = ges_timeline_layer_new ();
|
||||
layer = ges_layer_new ();
|
||||
ges_timeline_add_layer (timeline, layer);
|
||||
|
||||
input = gst_date_time_new_from_unix_epoch_local_time (123456789);
|
||||
|
@ -1634,14 +1634,14 @@ GST_END_TEST;
|
|||
GST_START_TEST (test_layer_meta_value)
|
||||
{
|
||||
GESTimeline *timeline;
|
||||
GESTimelineLayer *layer;
|
||||
GESLayer *layer;
|
||||
GValue data = G_VALUE_INIT;
|
||||
const GValue *result;
|
||||
|
||||
ges_init ();
|
||||
|
||||
timeline = ges_timeline_new_audio_video ();
|
||||
layer = ges_timeline_layer_new ();
|
||||
layer = ges_layer_new ();
|
||||
ges_timeline_add_layer (timeline, layer);
|
||||
|
||||
g_value_init (&data, G_TYPE_STRING);
|
||||
|
@ -1663,13 +1663,13 @@ GST_END_TEST;
|
|||
GST_START_TEST (test_layer_meta_register)
|
||||
{
|
||||
GESTimeline *timeline;
|
||||
GESTimelineLayer *layer;
|
||||
GESLayer *layer;
|
||||
const gchar *result;
|
||||
|
||||
ges_init ();
|
||||
|
||||
timeline = ges_timeline_new_audio_video ();
|
||||
layer = ges_timeline_layer_new ();
|
||||
layer = ges_layer_new ();
|
||||
ges_timeline_add_layer (timeline, layer);
|
||||
|
||||
fail_unless (ges_meta_container_register_meta_string (GES_META_CONTAINER
|
||||
|
@ -1700,12 +1700,12 @@ test_foreach (const GESMetaContainer * container, const gchar * key,
|
|||
GST_START_TEST (test_layer_meta_foreach)
|
||||
{
|
||||
GESTimeline *timeline;
|
||||
GESTimelineLayer *layer;
|
||||
GESLayer *layer;
|
||||
|
||||
ges_init ();
|
||||
|
||||
timeline = ges_timeline_new_audio_video ();
|
||||
layer = ges_timeline_layer_new ();
|
||||
layer = ges_layer_new ();
|
||||
ges_timeline_add_layer (timeline, layer);
|
||||
|
||||
ges_meta_container_set_string (GES_META_CONTAINER (layer),
|
||||
|
@ -1722,7 +1722,7 @@ GST_END_TEST;
|
|||
static Suite *
|
||||
ges_suite (void)
|
||||
{
|
||||
Suite *s = suite_create ("ges-timeline-layer");
|
||||
Suite *s = suite_create ("ges-layer");
|
||||
TCase *tc_chain = tcase_create ("timeline-layer");
|
||||
|
||||
suite_add_tcase (s, tc_chain);
|
||||
|
|
|
@ -40,14 +40,14 @@ GST_START_TEST (test_overlay_properties)
|
|||
GESClip *clip;
|
||||
GESTrack *track;
|
||||
GESTimeline *timeline;
|
||||
GESTimelineLayer *layer;
|
||||
GESLayer *layer;
|
||||
GESTrackElement *trackelement;
|
||||
|
||||
ges_init ();
|
||||
|
||||
track = ges_track_new (GES_TRACK_TYPE_VIDEO, gst_caps_ref (GST_CAPS_ANY));
|
||||
fail_unless (track != NULL);
|
||||
layer = ges_timeline_layer_new ();
|
||||
layer = ges_layer_new ();
|
||||
fail_unless (layer != NULL);
|
||||
timeline = ges_timeline_new ();
|
||||
fail_unless (timeline != NULL);
|
||||
|
@ -65,7 +65,7 @@ GST_START_TEST (test_overlay_properties)
|
|||
assert_equals_uint64 (_DURATION (clip), 51);
|
||||
assert_equals_uint64 (_INPOINT (clip), 12);
|
||||
|
||||
ges_timeline_layer_add_clip (layer, GES_CLIP (clip));
|
||||
ges_layer_add_clip (layer, GES_CLIP (clip));
|
||||
assert_equals_int (g_list_length (GES_CONTAINER_CHILDREN (clip)), 1);
|
||||
trackelement = GES_CONTAINER_CHILDREN (clip)->data;
|
||||
fail_unless (trackelement != NULL);
|
||||
|
@ -106,7 +106,7 @@ GST_END_TEST;
|
|||
GST_START_TEST (test_overlay_in_layer)
|
||||
{
|
||||
GESTimeline *timeline;
|
||||
GESTimelineLayer *layer;
|
||||
GESLayer *layer;
|
||||
GESTrack *a, *v;
|
||||
GESTrackElement *track_element;
|
||||
GESTextOverlayClip *source;
|
||||
|
@ -119,7 +119,7 @@ GST_START_TEST (test_overlay_in_layer)
|
|||
ges_init ();
|
||||
|
||||
timeline = ges_timeline_new ();
|
||||
layer = (GESTimelineLayer *) ges_simple_timeline_layer_new ();
|
||||
layer = (GESLayer *) ges_simple_layer_new ();
|
||||
a = ges_track_audio_raw_new ();
|
||||
v = ges_track_video_raw_new ();
|
||||
|
||||
|
@ -131,8 +131,7 @@ GST_START_TEST (test_overlay_in_layer)
|
|||
|
||||
g_object_set (source, "duration", (guint64) GST_SECOND, NULL);
|
||||
|
||||
ges_simple_timeline_layer_add_object ((GESSimpleTimelineLayer *) layer,
|
||||
(GESClip *) source, 0);
|
||||
ges_simple_layer_add_object ((GESSimpleLayer *) layer, (GESClip *) source, 0);
|
||||
|
||||
/* specifically test the text property */
|
||||
g_object_set (source, "text", (gchar *) "some text", NULL);
|
||||
|
@ -190,7 +189,7 @@ GST_START_TEST (test_overlay_in_layer)
|
|||
|
||||
GST_DEBUG ("removing the source");
|
||||
|
||||
ges_timeline_layer_remove_clip (layer, (GESClip *) source);
|
||||
ges_layer_remove_clip (layer, (GESClip *) source);
|
||||
|
||||
GST_DEBUG ("removing the layer");
|
||||
|
||||
|
|
|
@ -206,11 +206,9 @@ _test_project (GESProject * project, GESTimeline * timeline)
|
|||
|
||||
assert_equals_string (ges_meta_container_get_string (GES_META_CONTAINER
|
||||
(project), "name"), "Example project");
|
||||
clips =
|
||||
ges_timeline_layer_get_clips (GES_TIMELINE_LAYER (timeline->layers->
|
||||
data));
|
||||
fail_unless (ges_meta_container_get_uint (GES_META_CONTAINER (timeline->
|
||||
layers->data), "a", &a_meta));
|
||||
clips = ges_layer_get_clips (GES_LAYER (timeline->layers->data));
|
||||
fail_unless (ges_meta_container_get_uint (GES_META_CONTAINER
|
||||
(timeline->layers->data), "a", &a_meta));
|
||||
assert_equals_int (a_meta, 3);
|
||||
assert_equals_int (g_list_length (clips), 1);
|
||||
media_uri = ges_test_file_uri ("audio_video.ogg");
|
||||
|
|
|
@ -43,7 +43,7 @@ my_fill_track_func (GESClip * clip,
|
|||
GST_START_TEST (test_gsl_add)
|
||||
{
|
||||
GESTimeline *timeline;
|
||||
GESTimelineLayer *layer;
|
||||
GESLayer *layer;
|
||||
GESTrack *track;
|
||||
GESCustomSourceClip *source;
|
||||
GESClip *source2;
|
||||
|
@ -54,7 +54,7 @@ GST_START_TEST (test_gsl_add)
|
|||
|
||||
/* Timeline and 1 Layer */
|
||||
timeline = ges_timeline_new ();
|
||||
layer = (GESTimelineLayer *) ges_simple_timeline_layer_new ();
|
||||
layer = (GESLayer *) ges_simple_layer_new ();
|
||||
fail_unless (ges_timeline_add_layer (timeline, layer));
|
||||
track = ges_track_new (GES_TRACK_TYPE_CUSTOM, gst_caps_ref (GST_CAPS_ANY));
|
||||
fail_unless (ges_timeline_add_track (timeline, track));
|
||||
|
@ -65,31 +65,28 @@ GST_START_TEST (test_gsl_add)
|
|||
fail_unless_equals_uint64 (_DURATION (source), GST_SECOND);
|
||||
fail_unless_equals_uint64 (_START (source), 42);
|
||||
|
||||
fail_unless (ges_simple_timeline_layer_add_object (GES_SIMPLE_TIMELINE_LAYER
|
||||
fail_unless (ges_simple_layer_add_object (GES_SIMPLE_LAYER
|
||||
(layer), GES_CLIP (source), -1));
|
||||
fail_unless (ges_clip_get_layer (GES_CLIP (source)) == layer);
|
||||
fail_unless_equals_uint64 (_DURATION (source), GST_SECOND);
|
||||
fail_unless_equals_uint64 (_START (source), 0);
|
||||
|
||||
/* test nth */
|
||||
source2 =
|
||||
ges_simple_timeline_layer_nth ((GESSimpleTimelineLayer *) layer, -1);
|
||||
source2 = ges_simple_layer_nth ((GESSimpleLayer *) layer, -1);
|
||||
fail_if (source2);
|
||||
source2 = ges_simple_timeline_layer_nth ((GESSimpleTimelineLayer *) layer, 2);
|
||||
source2 = ges_simple_layer_nth ((GESSimpleLayer *) layer, 2);
|
||||
fail_if (source2);
|
||||
source2 = ges_simple_timeline_layer_nth ((GESSimpleTimelineLayer *) layer, 0);
|
||||
source2 = ges_simple_layer_nth ((GESSimpleLayer *) layer, 0);
|
||||
fail_unless ((GESClip *) source == source2);
|
||||
|
||||
/* test position */
|
||||
|
||||
result = ges_simple_timeline_layer_index ((GESSimpleTimelineLayer *) layer,
|
||||
source2);
|
||||
result = ges_simple_layer_index ((GESSimpleLayer *) layer, source2);
|
||||
fail_unless_equals_int (result, 0);
|
||||
result = ges_simple_timeline_layer_index ((GESSimpleTimelineLayer *) layer,
|
||||
(GESClip *) NULL);
|
||||
result = ges_simple_layer_index ((GESSimpleLayer *) layer, (GESClip *) NULL);
|
||||
fail_unless_equals_int (result, -1);
|
||||
|
||||
fail_unless (ges_timeline_layer_remove_clip (layer, GES_CLIP (source)));
|
||||
fail_unless (ges_layer_remove_clip (layer, GES_CLIP (source)));
|
||||
fail_unless (ges_timeline_remove_track (timeline, track));
|
||||
fail_unless (ges_timeline_remove_layer (timeline, layer));
|
||||
gst_object_unref (timeline);
|
||||
|
@ -104,7 +101,7 @@ typedef struct
|
|||
} siginfo;
|
||||
|
||||
static void
|
||||
object_moved_cb (GESSimpleTimelineLayer * layer,
|
||||
object_moved_cb (GESSimpleLayer * layer,
|
||||
GESClip * clip, gint old, gint new, gpointer user)
|
||||
{
|
||||
siginfo *info;
|
||||
|
@ -116,7 +113,7 @@ object_moved_cb (GESSimpleTimelineLayer * layer,
|
|||
GST_START_TEST (test_gsl_move_simple)
|
||||
{
|
||||
GESTimeline *timeline;
|
||||
GESTimelineLayer *layer;
|
||||
GESLayer *layer;
|
||||
GESTrack *track;
|
||||
GESCustomSourceClip *source1, *source2;
|
||||
siginfo info = { 0, 0 };
|
||||
|
@ -125,7 +122,7 @@ GST_START_TEST (test_gsl_move_simple)
|
|||
|
||||
/* Timeline and 1 Layer */
|
||||
timeline = ges_timeline_new ();
|
||||
layer = (GESTimelineLayer *) ges_simple_timeline_layer_new ();
|
||||
layer = (GESLayer *) ges_simple_layer_new ();
|
||||
fail_unless (ges_timeline_add_layer (timeline, layer));
|
||||
track = ges_track_new (GES_TRACK_TYPE_CUSTOM, gst_caps_new_any ());
|
||||
fail_unless (ges_timeline_add_track (timeline, track));
|
||||
|
@ -142,19 +139,19 @@ GST_START_TEST (test_gsl_move_simple)
|
|||
|
||||
/* Add source to any position */
|
||||
GST_DEBUG ("Adding the source to the timeline layer");
|
||||
fail_unless (ges_simple_timeline_layer_add_object (GES_SIMPLE_TIMELINE_LAYER
|
||||
fail_unless (ges_simple_layer_add_object (GES_SIMPLE_LAYER
|
||||
(layer), GES_CLIP (source1), -1));
|
||||
fail_unless_equals_uint64 (_START (source1), 0);
|
||||
|
||||
/* Add source2 to the end */
|
||||
GST_DEBUG ("Adding the source to the timeline layer");
|
||||
fail_unless (ges_simple_timeline_layer_add_object (GES_SIMPLE_TIMELINE_LAYER
|
||||
fail_unless (ges_simple_layer_add_object (GES_SIMPLE_LAYER
|
||||
(layer), GES_CLIP (source2), -1));
|
||||
fail_unless_equals_uint64 (_START (source1), 0);
|
||||
fail_unless_equals_uint64 (_START (source2), GST_SECOND);
|
||||
|
||||
/* Move source2 before source 1 (newpos:0) */
|
||||
fail_unless (ges_simple_timeline_layer_move_object (GES_SIMPLE_TIMELINE_LAYER
|
||||
fail_unless (ges_simple_layer_move_object (GES_SIMPLE_LAYER
|
||||
(layer), GES_CLIP (source2), 0));
|
||||
fail_unless_equals_uint64 (_START (source1), GST_SECOND);
|
||||
fail_unless_equals_uint64 (_START (source2), 0);
|
||||
|
@ -162,7 +159,7 @@ GST_START_TEST (test_gsl_move_simple)
|
|||
fail_unless_equals_int (info.old, 1);
|
||||
|
||||
/* Move source2 after source 1 (newpos:0) */
|
||||
fail_unless (ges_simple_timeline_layer_move_object (GES_SIMPLE_TIMELINE_LAYER
|
||||
fail_unless (ges_simple_layer_move_object (GES_SIMPLE_LAYER
|
||||
(layer), GES_CLIP (source2), 1));
|
||||
fail_unless_equals_uint64 (_START (source1), 0);
|
||||
fail_unless_equals_uint64 (_START (source2), GST_SECOND);
|
||||
|
@ -170,7 +167,7 @@ GST_START_TEST (test_gsl_move_simple)
|
|||
fail_unless_equals_int (info.old, 0);
|
||||
|
||||
/* Move source1 to end (newpos:-1) */
|
||||
fail_unless (ges_simple_timeline_layer_move_object (GES_SIMPLE_TIMELINE_LAYER
|
||||
fail_unless (ges_simple_layer_move_object (GES_SIMPLE_LAYER
|
||||
(layer), GES_CLIP (source1), -1));
|
||||
fail_unless_equals_uint64 (_START (source1), GST_SECOND);
|
||||
fail_unless_equals_uint64 (_START (source2), 0);
|
||||
|
@ -180,21 +177,21 @@ GST_START_TEST (test_gsl_move_simple)
|
|||
|
||||
/* remove source1, source2 should be moved to the beginning */
|
||||
gst_object_ref (source1);
|
||||
fail_unless (ges_timeline_layer_remove_clip (layer, GES_CLIP (source1)));
|
||||
fail_unless (ges_layer_remove_clip (layer, GES_CLIP (source1)));
|
||||
fail_unless_equals_uint64 (_START (source2), 0);
|
||||
|
||||
g_object_set (source1, "start", (guint64) 42, NULL);
|
||||
|
||||
/* re-add source1... using the normal API, it should be added to the end */
|
||||
fail_unless (ges_timeline_layer_add_clip (layer, GES_CLIP (source1)));
|
||||
fail_unless (ges_layer_add_clip (layer, GES_CLIP (source1)));
|
||||
fail_unless_equals_uint64 (_START (source2), 0);
|
||||
fail_unless_equals_uint64 (_START (source1), GST_SECOND);
|
||||
|
||||
/* remove source1 ... */
|
||||
fail_unless (ges_timeline_layer_remove_clip (layer, GES_CLIP (source1)));
|
||||
fail_unless (ges_layer_remove_clip (layer, GES_CLIP (source1)));
|
||||
fail_unless_equals_uint64 (_START (source2), 0);
|
||||
/* ... and source2 */
|
||||
fail_unless (ges_timeline_layer_remove_clip (layer, GES_CLIP (source2)));
|
||||
fail_unless (ges_layer_remove_clip (layer, GES_CLIP (source2)));
|
||||
|
||||
fail_unless (ges_timeline_remove_track (timeline, track));
|
||||
fail_unless (ges_timeline_remove_layer (timeline, layer));
|
||||
|
@ -212,11 +209,11 @@ valid_notify_cb (GObject * obj, GParamSpec * unused G_GNUC_UNUSED, gint * count)
|
|||
GST_START_TEST (test_gsl_with_transitions)
|
||||
{
|
||||
GESTimeline *timeline;
|
||||
GESTimelineLayer *layer;
|
||||
GESLayer *layer;
|
||||
GESTrack *track;
|
||||
GESTestClip *source1, *source2, *source3, *source4;
|
||||
GESTransitionClip *tr1, *tr2, *tr3, *tr4, *tr5;
|
||||
GESSimpleTimelineLayer *gstl;
|
||||
GESSimpleLayer *gstl;
|
||||
gboolean valid;
|
||||
gint count = 0;
|
||||
|
||||
|
@ -224,13 +221,13 @@ GST_START_TEST (test_gsl_with_transitions)
|
|||
|
||||
/* Timeline and 1 Layer */
|
||||
timeline = ges_timeline_new ();
|
||||
layer = (GESTimelineLayer *) ges_simple_timeline_layer_new ();
|
||||
layer = (GESLayer *) ges_simple_layer_new ();
|
||||
|
||||
g_signal_connect (G_OBJECT (layer), "notify::valid",
|
||||
G_CALLBACK (valid_notify_cb), &count);
|
||||
|
||||
fail_unless (ges_timeline_add_layer (timeline, layer));
|
||||
ges_timeline_layer_set_priority (layer, 0);
|
||||
ges_layer_set_priority (layer, 0);
|
||||
|
||||
track = ges_track_new (GES_TRACK_TYPE_VIDEO, gst_caps_new_any ());
|
||||
fail_unless (ges_timeline_add_track (timeline, track));
|
||||
|
@ -294,19 +291,18 @@ GST_START_TEST (test_gsl_with_transitions)
|
|||
/* 5 [5---source4-----] */
|
||||
|
||||
|
||||
gstl = GES_SIMPLE_TIMELINE_LAYER (layer);
|
||||
gstl = GES_SIMPLE_LAYER (layer);
|
||||
|
||||
/* add objects in sequence */
|
||||
|
||||
GST_DEBUG ("Adding source1");
|
||||
fail_unless (ges_simple_timeline_layer_add_object (gstl,
|
||||
GES_CLIP (source1), -1));
|
||||
fail_unless (ges_simple_layer_add_object (gstl, GES_CLIP (source1), -1));
|
||||
fail_unless_equals_uint64 (_DURATION (source1), GST_SECOND);
|
||||
fail_unless_equals_uint64 (_START (source1), 0);
|
||||
fail_unless_equals_uint64 (_PRIORITY (source1), 2);
|
||||
|
||||
GST_DEBUG ("Adding tr1");
|
||||
fail_unless (ges_simple_timeline_layer_add_object (gstl, GES_CLIP (tr1), -1));
|
||||
fail_unless (ges_simple_layer_add_object (gstl, GES_CLIP (tr1), -1));
|
||||
fail_unless_equals_uint64 (_DURATION (source1), GST_SECOND);
|
||||
fail_unless_equals_uint64 (_START (source1), 0);
|
||||
fail_unless_equals_uint64 (_PRIORITY (source1), 2);
|
||||
|
@ -315,8 +311,7 @@ GST_START_TEST (test_gsl_with_transitions)
|
|||
fail_unless_equals_uint64 (_PRIORITY (tr1), 1);
|
||||
|
||||
GST_DEBUG ("Adding source2");
|
||||
fail_unless (ges_simple_timeline_layer_add_object (gstl,
|
||||
GES_CLIP (source2), -1));
|
||||
fail_unless (ges_simple_layer_add_object (gstl, GES_CLIP (source2), -1));
|
||||
fail_unless_equals_uint64 (_DURATION (source1), GST_SECOND);
|
||||
fail_unless_equals_uint64 (_START (source1), 0);
|
||||
fail_unless_equals_uint64 (_PRIORITY (source1), 2);
|
||||
|
@ -331,8 +326,7 @@ GST_START_TEST (test_gsl_with_transitions)
|
|||
|
||||
GST_DEBUG ("Adding source3");
|
||||
|
||||
fail_unless (ges_simple_timeline_layer_add_object (gstl,
|
||||
GES_CLIP (source3), -1));
|
||||
fail_unless (ges_simple_layer_add_object (gstl, GES_CLIP (source3), -1));
|
||||
fail_unless_equals_uint64 (_DURATION (source1), GST_SECOND);
|
||||
fail_unless_equals_uint64 (_START (source1), 0);
|
||||
fail_unless_equals_uint64 (_PRIORITY (source1), 2);
|
||||
|
@ -350,7 +344,7 @@ GST_START_TEST (test_gsl_with_transitions)
|
|||
|
||||
GST_DEBUG ("Adding tr2");
|
||||
|
||||
fail_unless (ges_simple_timeline_layer_add_object (gstl, GES_CLIP (tr2), 3));
|
||||
fail_unless (ges_simple_layer_add_object (gstl, GES_CLIP (tr2), 3));
|
||||
fail_unless_equals_uint64 (_DURATION (source1), GST_SECOND);
|
||||
fail_unless_equals_uint64 (_START (source1), 0);
|
||||
fail_unless_equals_uint64 (_PRIORITY (source1), 2);
|
||||
|
@ -371,8 +365,7 @@ GST_START_TEST (test_gsl_with_transitions)
|
|||
|
||||
GST_DEBUG ("Adding source4");
|
||||
|
||||
fail_unless (ges_simple_timeline_layer_add_object (gstl,
|
||||
GES_CLIP (source4), -1));
|
||||
fail_unless (ges_simple_layer_add_object (gstl, GES_CLIP (source4), -1));
|
||||
fail_unless_equals_uint64 (_DURATION (source1), GST_SECOND);
|
||||
fail_unless_equals_uint64 (_START (source1), 0);
|
||||
fail_unless_equals_uint64 (_PRIORITY (source1), 2);
|
||||
|
@ -397,19 +390,19 @@ GST_START_TEST (test_gsl_with_transitions)
|
|||
|
||||
GST_DEBUG ("Checking wrong insertion of tr3");
|
||||
|
||||
fail_if (ges_simple_timeline_layer_add_object (gstl, GES_CLIP (tr3), 1));
|
||||
fail_if (ges_simple_layer_add_object (gstl, GES_CLIP (tr3), 1));
|
||||
|
||||
fail_if (ges_simple_timeline_layer_add_object (gstl, GES_CLIP (tr3), 2));
|
||||
fail_if (ges_simple_layer_add_object (gstl, GES_CLIP (tr3), 2));
|
||||
|
||||
fail_if (ges_simple_timeline_layer_add_object (gstl, GES_CLIP (tr3), 3));
|
||||
fail_if (ges_simple_layer_add_object (gstl, GES_CLIP (tr3), 3));
|
||||
|
||||
fail_if (ges_simple_timeline_layer_add_object (gstl, GES_CLIP (tr3), 4));
|
||||
fail_if (ges_simple_layer_add_object (gstl, GES_CLIP (tr3), 4));
|
||||
|
||||
/* check that insertions which don't cause problems still work */
|
||||
|
||||
GST_DEBUG ("Checking correct insertion of tr3");
|
||||
|
||||
fail_unless (ges_simple_timeline_layer_add_object (gstl, GES_CLIP (tr3), 5));
|
||||
fail_unless (ges_simple_layer_add_object (gstl, GES_CLIP (tr3), 5));
|
||||
|
||||
/* at this point the layer should still be valid */
|
||||
g_object_get (G_OBJECT (layer), "valid", &valid, NULL);
|
||||
|
@ -418,18 +411,18 @@ GST_START_TEST (test_gsl_with_transitions)
|
|||
|
||||
GST_DEBUG ("Checking correct insertion of tr4");
|
||||
|
||||
fail_unless (ges_simple_timeline_layer_add_object (gstl, GES_CLIP (tr4), -1));
|
||||
fail_unless (ges_simple_layer_add_object (gstl, GES_CLIP (tr4), -1));
|
||||
|
||||
GST_DEBUG ("Checking correct insertion of tr5");
|
||||
|
||||
fail_unless (ges_simple_timeline_layer_add_object (gstl, GES_CLIP (tr5), 0));
|
||||
fail_unless (ges_simple_layer_add_object (gstl, GES_CLIP (tr5), 0));
|
||||
|
||||
/* removals which result in two or more adjacent transitions will also
|
||||
* print a warning on the console. This is expected */
|
||||
|
||||
GST_DEBUG ("Removing source1");
|
||||
|
||||
fail_unless (ges_timeline_layer_remove_clip (layer, GES_CLIP (source1)));
|
||||
fail_unless (ges_layer_remove_clip (layer, GES_CLIP (source1)));
|
||||
|
||||
/* layer should now be invalid */
|
||||
|
||||
|
@ -439,9 +432,9 @@ GST_START_TEST (test_gsl_with_transitions)
|
|||
|
||||
GST_DEBUG ("Removing source2/3/4");
|
||||
|
||||
fail_unless (ges_timeline_layer_remove_clip (layer, GES_CLIP (source2)));
|
||||
fail_unless (ges_timeline_layer_remove_clip (layer, GES_CLIP (source3)));
|
||||
fail_unless (ges_timeline_layer_remove_clip (layer, GES_CLIP (source4)));
|
||||
fail_unless (ges_layer_remove_clip (layer, GES_CLIP (source2)));
|
||||
fail_unless (ges_layer_remove_clip (layer, GES_CLIP (source3)));
|
||||
fail_unless (ges_layer_remove_clip (layer, GES_CLIP (source4)));
|
||||
|
||||
g_object_get (G_OBJECT (layer), "valid", &valid, NULL);
|
||||
fail_unless (!valid);
|
||||
|
@ -449,11 +442,11 @@ GST_START_TEST (test_gsl_with_transitions)
|
|||
|
||||
GST_DEBUG ("Removing transitions");
|
||||
|
||||
fail_unless (ges_timeline_layer_remove_clip (layer, GES_CLIP (tr1)));
|
||||
fail_unless (ges_timeline_layer_remove_clip (layer, GES_CLIP (tr2)));
|
||||
fail_unless (ges_timeline_layer_remove_clip (layer, GES_CLIP (tr3)));
|
||||
fail_unless (ges_timeline_layer_remove_clip (layer, GES_CLIP (tr4)));
|
||||
fail_unless (ges_timeline_layer_remove_clip (layer, GES_CLIP (tr5)));
|
||||
fail_unless (ges_layer_remove_clip (layer, GES_CLIP (tr1)));
|
||||
fail_unless (ges_layer_remove_clip (layer, GES_CLIP (tr2)));
|
||||
fail_unless (ges_layer_remove_clip (layer, GES_CLIP (tr3)));
|
||||
fail_unless (ges_layer_remove_clip (layer, GES_CLIP (tr4)));
|
||||
fail_unless (ges_layer_remove_clip (layer, GES_CLIP (tr5)));
|
||||
|
||||
GST_DEBUG ("done removing transition");
|
||||
|
||||
|
@ -465,7 +458,7 @@ GST_END_TEST;
|
|||
static Suite *
|
||||
ges_suite (void)
|
||||
{
|
||||
Suite *s = suite_create ("ges-simple-timeline-layer");
|
||||
Suite *s = suite_create ("ges-simple-layer");
|
||||
TCase *tc_chain = tcase_create ("basic");
|
||||
|
||||
suite_add_tcase (s, tc_chain);
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
GST_START_TEST (test_text_properties_in_layer)
|
||||
{
|
||||
GESTimeline *timeline;
|
||||
GESTimelineLayer *layer;
|
||||
GESLayer *layer;
|
||||
GESTrack *a, *v;
|
||||
GESTrackElement *track_element;
|
||||
GESTestClip *source;
|
||||
|
@ -34,7 +34,7 @@ GST_START_TEST (test_text_properties_in_layer)
|
|||
ges_init ();
|
||||
|
||||
timeline = ges_timeline_new ();
|
||||
layer = (GESTimelineLayer *) ges_simple_timeline_layer_new ();
|
||||
layer = (GESLayer *) ges_simple_layer_new ();
|
||||
a = ges_track_audio_raw_new ();
|
||||
v = ges_track_video_raw_new ();
|
||||
|
||||
|
@ -46,8 +46,7 @@ GST_START_TEST (test_text_properties_in_layer)
|
|||
|
||||
g_object_set (source, "duration", (guint64) GST_SECOND, NULL);
|
||||
|
||||
ges_simple_timeline_layer_add_object ((GESSimpleTimelineLayer *) layer,
|
||||
(GESClip *) source, 0);
|
||||
ges_simple_layer_add_object ((GESSimpleLayer *) layer, (GESClip *) source, 0);
|
||||
|
||||
track_element =
|
||||
ges_clip_find_track_element (GES_CLIP (source), v, GES_TYPE_TEXT_OVERLAY);
|
||||
|
@ -89,7 +88,7 @@ GST_START_TEST (test_text_properties_in_layer)
|
|||
|
||||
GST_DEBUG ("removing the source");
|
||||
|
||||
ges_timeline_layer_remove_clip (layer, (GESClip *) source);
|
||||
ges_layer_remove_clip (layer, (GESClip *) source);
|
||||
|
||||
GST_DEBUG ("removing the layer");
|
||||
|
||||
|
|
|
@ -57,7 +57,7 @@ GST_START_TEST (test_basic_timeline_edition)
|
|||
GESAsset *asset;
|
||||
GESTrack *track;
|
||||
GESTimeline *timeline;
|
||||
GESTimelineLayer *layer;
|
||||
GESLayer *layer;
|
||||
GESTrackElement *trackelement, *trackelement1, *trackelement2;
|
||||
GESClip *clip, *clip1, *clip2;
|
||||
|
||||
|
@ -70,7 +70,7 @@ GST_START_TEST (test_basic_timeline_edition)
|
|||
fail_unless (timeline != NULL);
|
||||
fail_unless (ges_timeline_add_track (timeline, track));
|
||||
|
||||
layer = ges_timeline_layer_new ();
|
||||
layer = ges_layer_new ();
|
||||
fail_unless (layer != NULL);
|
||||
fail_unless (ges_timeline_add_layer (timeline, layer));
|
||||
|
||||
|
@ -84,18 +84,15 @@ GST_START_TEST (test_basic_timeline_edition)
|
|||
* | clip | | clip1 | | clip2 |
|
||||
* time 0------- 10 --------20 50---------60
|
||||
*/
|
||||
clip = ges_timeline_layer_add_asset (layer, asset, 0, 0, 10,
|
||||
GES_TRACK_TYPE_UNKNOWN);
|
||||
clip = ges_layer_add_asset (layer, asset, 0, 0, 10, GES_TRACK_TYPE_UNKNOWN);
|
||||
trackelement = GES_CONTAINER_CHILDREN (clip)->data;
|
||||
fail_unless (GES_IS_TRACK_ELEMENT (trackelement));
|
||||
|
||||
clip1 = ges_timeline_layer_add_asset (layer, asset, 10, 0, 10,
|
||||
GES_TRACK_TYPE_UNKNOWN);
|
||||
clip1 = ges_layer_add_asset (layer, asset, 10, 0, 10, GES_TRACK_TYPE_UNKNOWN);
|
||||
trackelement1 = GES_CONTAINER_CHILDREN (clip1)->data;
|
||||
fail_unless (GES_IS_TRACK_ELEMENT (trackelement1));
|
||||
|
||||
clip2 = ges_timeline_layer_add_asset (layer, asset, 50, 0, 60,
|
||||
GES_TRACK_TYPE_UNKNOWN);
|
||||
clip2 = ges_layer_add_asset (layer, asset, 50, 0, 60, GES_TRACK_TYPE_UNKNOWN);
|
||||
trackelement2 = GES_CONTAINER_CHILDREN (clip2)->data;
|
||||
fail_unless (GES_IS_TRACK_ELEMENT (trackelement2));
|
||||
|
||||
|
@ -248,7 +245,7 @@ GST_START_TEST (test_snapping)
|
|||
GESTimeline *timeline;
|
||||
GESTrackElement *trackelement, *trackelement1, *trackelement2;
|
||||
GESClip *clip, *clip1, *clip2;
|
||||
GESTimelineLayer *layer;
|
||||
GESLayer *layer;
|
||||
GList *trackelements;
|
||||
|
||||
ges_init ();
|
||||
|
@ -282,10 +279,10 @@ GST_START_TEST (test_snapping)
|
|||
"in-point", (guint64) 0, NULL);
|
||||
|
||||
fail_unless ((layer = ges_timeline_append_layer (timeline)) != NULL);
|
||||
assert_equals_int (ges_timeline_layer_get_priority (layer), 0);
|
||||
assert_equals_int (ges_layer_get_priority (layer), 0);
|
||||
|
||||
|
||||
fail_unless (ges_timeline_layer_add_clip (layer, clip));
|
||||
fail_unless (ges_layer_add_clip (layer, clip));
|
||||
fail_unless ((trackelements = GES_CONTAINER_CHILDREN (clip)) != NULL);
|
||||
fail_unless ((trackelement =
|
||||
GES_TRACK_ELEMENT (trackelements->data)) != NULL);
|
||||
|
@ -299,7 +296,7 @@ GST_START_TEST (test_snapping)
|
|||
* + layer */
|
||||
ASSERT_OBJECT_REFCOUNT (clip, "First clip", 1);
|
||||
|
||||
fail_unless (ges_timeline_layer_add_clip (layer, clip1));
|
||||
fail_unless (ges_layer_add_clip (layer, clip1));
|
||||
fail_unless ((trackelements = GES_CONTAINER_CHILDREN (clip1)) != NULL);
|
||||
fail_unless ((trackelement1 =
|
||||
GES_TRACK_ELEMENT (trackelements->data)) != NULL);
|
||||
|
@ -310,7 +307,7 @@ GST_START_TEST (test_snapping)
|
|||
ASSERT_OBJECT_REFCOUNT (trackelement1, "First trackelement", 3);
|
||||
ASSERT_OBJECT_REFCOUNT (clip1, "First clip", 1);
|
||||
|
||||
fail_unless (ges_timeline_layer_add_clip (layer, clip2));
|
||||
fail_unless (ges_layer_add_clip (layer, clip2));
|
||||
fail_unless ((trackelements = GES_CONTAINER_CHILDREN (clip2)) != NULL);
|
||||
fail_unless ((trackelement2 =
|
||||
GES_TRACK_ELEMENT (trackelements->data)) != NULL);
|
||||
|
@ -532,7 +529,7 @@ GST_START_TEST (test_simple_triming)
|
|||
GESClipAsset *asset;
|
||||
GESProject *project;
|
||||
GESTimeline *timeline;
|
||||
GESTimelineLayer *layer;
|
||||
GESLayer *layer;
|
||||
GESTimelineElement *element;
|
||||
|
||||
gchar *uri = ges_test_file_uri ("audio_video.ogg");
|
||||
|
@ -557,13 +554,13 @@ GST_START_TEST (test_simple_triming)
|
|||
assert_equals_int (g_list_length (assets), 1);
|
||||
asset = assets->data;
|
||||
|
||||
layer = ges_timeline_layer_new ();
|
||||
layer = ges_layer_new ();
|
||||
ges_timeline_add_layer (timeline, layer);
|
||||
|
||||
ges_timeline_layer_add_asset (layer, GES_ASSET (asset), 0, 0, 10,
|
||||
ges_layer_add_asset (layer, GES_ASSET (asset), 0, 0, 10,
|
||||
ges_clip_asset_get_supported_formats (asset));
|
||||
|
||||
element = ges_timeline_layer_get_clips (layer)->data;
|
||||
element = ges_layer_get_clips (layer)->data;
|
||||
|
||||
deep_check (element, 0, 0, 10);
|
||||
ges_timeline_enable_update (timeline, FALSE);
|
||||
|
@ -585,7 +582,7 @@ GST_START_TEST (test_timeline_edition_mode)
|
|||
GESTimeline *timeline;
|
||||
GESTrackElement *trackelement, *trackelement1, *trackelement2;
|
||||
GESClip *clip, *clip1, *clip2;
|
||||
GESTimelineLayer *layer, *layer1, *layer2;
|
||||
GESLayer *layer, *layer1, *layer2;
|
||||
GList *trackelements, *layers, *tmp;
|
||||
|
||||
ges_init ();
|
||||
|
@ -623,10 +620,10 @@ GST_START_TEST (test_timeline_edition_mode)
|
|||
"in-point", (guint64) 0, NULL);
|
||||
|
||||
fail_unless ((layer = ges_timeline_append_layer (timeline)) != NULL);
|
||||
assert_equals_int (ges_timeline_layer_get_priority (layer), 0);
|
||||
assert_equals_int (ges_layer_get_priority (layer), 0);
|
||||
|
||||
|
||||
fail_unless (ges_timeline_layer_add_clip (layer, clip));
|
||||
fail_unless (ges_layer_add_clip (layer, clip));
|
||||
fail_unless ((trackelements = GES_CONTAINER_CHILDREN (clip)) != NULL);
|
||||
fail_unless ((trackelement =
|
||||
GES_TRACK_ELEMENT (trackelements->data)) != NULL);
|
||||
|
@ -636,16 +633,16 @@ GST_START_TEST (test_timeline_edition_mode)
|
|||
/* Add a new layer and add clipects to it */
|
||||
fail_unless ((layer1 = ges_timeline_append_layer (timeline)) != NULL);
|
||||
fail_unless (layer != layer1);
|
||||
assert_equals_int (ges_timeline_layer_get_priority (layer1), 1);
|
||||
assert_equals_int (ges_layer_get_priority (layer1), 1);
|
||||
|
||||
fail_unless (ges_timeline_layer_add_clip (layer1, clip1));
|
||||
fail_unless (ges_layer_add_clip (layer1, clip1));
|
||||
fail_unless ((trackelements = GES_CONTAINER_CHILDREN (clip1)) != NULL);
|
||||
fail_unless ((trackelement1 =
|
||||
GES_TRACK_ELEMENT (trackelements->data)) != NULL);
|
||||
fail_unless (ges_track_element_get_track (trackelement1) == track);
|
||||
assert_equals_uint64 (_DURATION (trackelement1), 10);
|
||||
|
||||
fail_unless (ges_timeline_layer_add_clip (layer1, clip2));
|
||||
fail_unless (ges_layer_add_clip (layer1, clip2));
|
||||
fail_unless ((trackelements = GES_CONTAINER_CHILDREN (clip2)) != NULL);
|
||||
fail_unless ((trackelement2 =
|
||||
GES_TRACK_ELEMENT (trackelements->data)) != NULL);
|
||||
|
@ -681,7 +678,7 @@ GST_START_TEST (test_timeline_edition_mode)
|
|||
CHECK_OBJECT_PROPS (trackelement1, 40, 0, 10);
|
||||
CHECK_OBJECT_PROPS (trackelement2, 80, 0, 60);
|
||||
layer2 = ges_clip_get_layer (clip1);
|
||||
assert_equals_int (ges_timeline_layer_get_priority (layer2), 3);
|
||||
assert_equals_int (ges_layer_get_priority (layer2), 3);
|
||||
/* clip2 should have moved layer too */
|
||||
fail_unless (ges_clip_get_layer (clip2) == layer2);
|
||||
/* We got 2 reference to the same clipect, unref them */
|
||||
|
@ -697,7 +694,7 @@ GST_START_TEST (test_timeline_edition_mode)
|
|||
CHECK_OBJECT_PROPS (trackelement1, 20, 0, 10);
|
||||
CHECK_OBJECT_PROPS (trackelement2, 60, 0, 60);
|
||||
layer2 = ges_clip_get_layer (clip1);
|
||||
assert_equals_int (ges_timeline_layer_get_priority (layer2), 1);
|
||||
assert_equals_int (ges_layer_get_priority (layer2), 1);
|
||||
/* clip2 should have moved layer too */
|
||||
fail_unless (ges_clip_get_layer (clip2) == layer2);
|
||||
/* We got 2 reference to the same clipect, unref them */
|
||||
|
@ -764,7 +761,7 @@ GST_START_TEST (test_timeline_edition_mode)
|
|||
CHECK_OBJECT_PROPS (trackelement1, 20, 0, 10);
|
||||
CHECK_OBJECT_PROPS (trackelement2, 35, 0, 60);
|
||||
layer = ges_clip_get_layer (clip);
|
||||
assert_equals_int (ges_timeline_layer_get_priority (layer), 2);
|
||||
assert_equals_int (ges_layer_get_priority (layer), 2);
|
||||
gst_object_unref (layer);
|
||||
|
||||
/* Roll end clip to 50
|
||||
|
@ -785,7 +782,7 @@ GST_START_TEST (test_timeline_edition_mode)
|
|||
CHECK_OBJECT_PROPS (trackelement1, 20, 0, 10);
|
||||
CHECK_OBJECT_PROPS (trackelement2, 50, 15, 45);
|
||||
layer = ges_clip_get_layer (clip);
|
||||
assert_equals_int (ges_timeline_layer_get_priority (layer), 2);
|
||||
assert_equals_int (ges_layer_get_priority (layer), 2);
|
||||
gst_object_unref (layer);
|
||||
|
||||
/* Some more intensive roll testing */
|
||||
|
@ -818,7 +815,7 @@ GST_START_TEST (test_timeline_edition_mode)
|
|||
CHECK_OBJECT_PROPS (trackelement1, 20, 0, 10);
|
||||
CHECK_OBJECT_PROPS (trackelement2, 35, 0, 60);
|
||||
layer = ges_clip_get_layer (clip);
|
||||
assert_equals_int (ges_timeline_layer_get_priority (layer), 2);
|
||||
assert_equals_int (ges_layer_get_priority (layer), 2);
|
||||
gst_object_unref (layer);
|
||||
|
||||
/* Ripple clip end to 52
|
||||
|
@ -841,7 +838,7 @@ GST_START_TEST (test_timeline_edition_mode)
|
|||
CHECK_OBJECT_PROPS (trackelement1, 20, 0, 10);
|
||||
CHECK_OBJECT_PROPS (trackelement2, 52, 0, 60)
|
||||
layer = ges_clip_get_layer (clip);
|
||||
assert_equals_int (ges_timeline_layer_get_priority (layer), 2);
|
||||
assert_equals_int (ges_layer_get_priority (layer), 2);
|
||||
gst_object_unref (layer);
|
||||
|
||||
|
||||
|
@ -889,8 +886,8 @@ GST_START_TEST (test_timeline_edition_mode)
|
|||
/* Check that movement between layer has been done properly */
|
||||
layer1 = ges_clip_get_layer (clip);
|
||||
layer = ges_clip_get_layer (clip1);
|
||||
assert_equals_int (ges_timeline_layer_get_priority (layer1), 1);
|
||||
assert_equals_int (ges_timeline_layer_get_priority (layer), 0);
|
||||
assert_equals_int (ges_layer_get_priority (layer1), 1);
|
||||
assert_equals_int (ges_layer_get_priority (layer), 0);
|
||||
fail_unless (ges_clip_get_layer (clip2) == layer);
|
||||
gst_object_unref (layer1);
|
||||
/* We have 2 references to @layer that we do not need anymore */ ;
|
||||
|
|
|
@ -40,14 +40,14 @@ GST_START_TEST (test_title_source_properties)
|
|||
GESClip *clip;
|
||||
GESTrack *track;
|
||||
GESTimeline *timeline;
|
||||
GESTimelineLayer *layer;
|
||||
GESLayer *layer;
|
||||
GESTrackElement *trackelement;
|
||||
|
||||
ges_init ();
|
||||
|
||||
track = ges_track_video_raw_new ();
|
||||
fail_unless (track != NULL);
|
||||
layer = ges_timeline_layer_new ();
|
||||
layer = ges_layer_new ();
|
||||
fail_unless (layer != NULL);
|
||||
timeline = ges_timeline_new ();
|
||||
fail_unless (timeline != NULL);
|
||||
|
@ -65,7 +65,7 @@ GST_START_TEST (test_title_source_properties)
|
|||
assert_equals_uint64 (_DURATION (clip), 51);
|
||||
assert_equals_uint64 (_INPOINT (clip), 12);
|
||||
|
||||
ges_timeline_layer_add_clip (layer, GES_CLIP (clip));
|
||||
ges_layer_add_clip (layer, GES_CLIP (clip));
|
||||
assert_equals_int (g_list_length (GES_CONTAINER_CHILDREN (clip)), 1);
|
||||
trackelement = GES_CONTAINER_CHILDREN (clip)->data;
|
||||
fail_unless (trackelement != NULL);
|
||||
|
@ -106,7 +106,7 @@ GST_END_TEST;
|
|||
GST_START_TEST (test_title_source_in_layer)
|
||||
{
|
||||
GESTimeline *timeline;
|
||||
GESTimelineLayer *layer;
|
||||
GESLayer *layer;
|
||||
GESTrack *a, *v;
|
||||
GESTrackElement *track_element;
|
||||
GESTitleClip *source;
|
||||
|
@ -119,7 +119,7 @@ GST_START_TEST (test_title_source_in_layer)
|
|||
ges_init ();
|
||||
|
||||
timeline = ges_timeline_new ();
|
||||
layer = (GESTimelineLayer *) ges_simple_timeline_layer_new ();
|
||||
layer = (GESLayer *) ges_simple_layer_new ();
|
||||
a = ges_track_audio_raw_new ();
|
||||
v = ges_track_video_raw_new ();
|
||||
|
||||
|
@ -131,8 +131,7 @@ GST_START_TEST (test_title_source_in_layer)
|
|||
|
||||
g_object_set (source, "duration", (guint64) GST_SECOND, NULL);
|
||||
|
||||
ges_simple_timeline_layer_add_object ((GESSimpleTimelineLayer *) layer,
|
||||
(GESClip *) source, 0);
|
||||
ges_simple_layer_add_object ((GESSimpleLayer *) layer, (GESClip *) source, 0);
|
||||
|
||||
/* specifically test the text property */
|
||||
g_object_set (source, "text", (gchar *) "some text", NULL);
|
||||
|
@ -194,7 +193,7 @@ GST_START_TEST (test_title_source_in_layer)
|
|||
|
||||
GST_DEBUG ("removing the source");
|
||||
|
||||
ges_timeline_layer_remove_clip (layer, (GESClip *) source);
|
||||
ges_layer_remove_clip (layer, (GESClip *) source);
|
||||
|
||||
GST_DEBUG ("removing the layer");
|
||||
|
||||
|
|
|
@ -29,14 +29,14 @@ GST_START_TEST (test_transition_basic)
|
|||
{
|
||||
GESTrack *track;
|
||||
GESTimeline *timeline;
|
||||
GESTimelineLayer *layer;
|
||||
GESLayer *layer;
|
||||
GESTransitionClip *tr1, *tr2;
|
||||
GESTrackElement *trackelement;
|
||||
|
||||
ges_init ();
|
||||
|
||||
track = ges_track_video_raw_new ();
|
||||
layer = ges_timeline_layer_new ();
|
||||
layer = ges_layer_new ();
|
||||
timeline = ges_timeline_new ();
|
||||
fail_unless (track != NULL);
|
||||
fail_unless (layer != NULL);
|
||||
|
@ -54,7 +54,7 @@ GST_START_TEST (test_transition_basic)
|
|||
fail_unless (tr2->vtype == 1);
|
||||
|
||||
/* Make sure track element is created and vtype is set */
|
||||
fail_unless (ges_timeline_layer_add_clip (layer, GES_CLIP (tr2)));
|
||||
fail_unless (ges_layer_add_clip (layer, GES_CLIP (tr2)));
|
||||
assert_equals_int (g_list_length (GES_CONTAINER_CHILDREN (tr2)), 1);
|
||||
trackelement = GES_CONTAINER_CHILDREN (tr2)->data;
|
||||
fail_unless (trackelement != NULL);
|
||||
|
@ -71,7 +71,7 @@ GST_START_TEST (test_transition_properties)
|
|||
GESClip *clip;
|
||||
GESTrack *track;
|
||||
GESTimeline *timeline;
|
||||
GESTimelineLayer *layer;
|
||||
GESLayer *layer;
|
||||
GESTrackElement *trackelement;
|
||||
|
||||
ges_init ();
|
||||
|
@ -80,7 +80,7 @@ GST_START_TEST (test_transition_properties)
|
|||
(GES_VIDEO_STANDARD_TRANSITION_TYPE_CROSSFADE));
|
||||
|
||||
track = ges_track_video_raw_new ();
|
||||
layer = ges_timeline_layer_new ();
|
||||
layer = ges_layer_new ();
|
||||
timeline = ges_timeline_new ();
|
||||
fail_unless (track != NULL);
|
||||
fail_unless (layer != NULL);
|
||||
|
@ -97,7 +97,7 @@ GST_START_TEST (test_transition_properties)
|
|||
assert_equals_uint64 (_DURATION (clip), 51);
|
||||
assert_equals_uint64 (_INPOINT (clip), 12);
|
||||
|
||||
fail_unless (ges_timeline_layer_add_clip (layer, GES_CLIP (clip)));
|
||||
fail_unless (ges_layer_add_clip (layer, GES_CLIP (clip)));
|
||||
assert_equals_int (g_list_length (GES_CONTAINER_CHILDREN (clip)), 1);
|
||||
trackelement = GES_CONTAINER_CHILDREN (clip)->data;
|
||||
fail_unless (trackelement != NULL);
|
||||
|
@ -146,11 +146,11 @@ GST_START_TEST (test_transition_properties)
|
|||
|
||||
GST_DEBUG ("Removing clip from layer");
|
||||
gst_object_ref (clip); /* We do not want it to be destroyed */
|
||||
ges_timeline_layer_remove_clip (layer, clip);
|
||||
ges_layer_remove_clip (layer, clip);
|
||||
|
||||
g_object_set (clip, "vtype", 1, NULL);
|
||||
GST_DEBUG ("Read it to the layer");
|
||||
fail_unless (ges_timeline_layer_add_clip (layer, GES_CLIP (clip)));
|
||||
fail_unless (ges_layer_add_clip (layer, GES_CLIP (clip)));
|
||||
g_object_unref (clip);
|
||||
assert_equals_int (g_list_length (GES_CONTAINER_CHILDREN (clip)), 1);
|
||||
trackelement = GES_CONTAINER_CHILDREN (clip)->data;
|
||||
|
|
|
@ -40,7 +40,7 @@ asset_created_cb (GObject * source, GAsyncResult * res, gpointer udata)
|
|||
{
|
||||
GList *tracks, *tmp;
|
||||
GESAsset *asset;
|
||||
GESTimelineLayer *layer;
|
||||
GESLayer *layer;
|
||||
GESUriClip *tlfs;
|
||||
|
||||
GError *error = NULL;
|
||||
|
@ -51,8 +51,8 @@ asset_created_cb (GObject * source, GAsyncResult * res, gpointer udata)
|
|||
fail_if (asset == NULL);
|
||||
fail_if (g_strcmp0 (ges_asset_get_id (asset), av_uri));
|
||||
|
||||
layer = GES_TIMELINE_LAYER (g_async_result_get_user_data (res));
|
||||
tlfs = GES_URI_CLIP (ges_timeline_layer_add_asset (layer,
|
||||
layer = GES_LAYER (g_async_result_get_user_data (res));
|
||||
tlfs = GES_URI_CLIP (ges_layer_add_asset (layer,
|
||||
asset, 0, 0, GST_CLOCK_TIME_NONE, GES_TRACK_TYPE_UNKNOWN));
|
||||
fail_unless (GES_IS_URI_CLIP (tlfs));
|
||||
fail_if (g_strcmp0 (ges_uri_clip_get_uri (tlfs), av_uri));
|
||||
|
@ -63,7 +63,7 @@ asset_created_cb (GObject * source, GAsyncResult * res, gpointer udata)
|
|||
fail_unless (ges_clip_get_supported_formats
|
||||
(GES_CLIP (tlfs)) & GES_TRACK_TYPE_AUDIO);
|
||||
|
||||
tracks = ges_timeline_get_tracks (ges_timeline_layer_get_timeline (layer));
|
||||
tracks = ges_timeline_get_tracks (ges_layer_get_timeline (layer));
|
||||
for (tmp = tracks; tmp; tmp = tmp->next) {
|
||||
GList *trackelements = ges_track_get_elements (GES_TRACK (tmp->data));
|
||||
|
||||
|
@ -80,7 +80,7 @@ asset_created_cb (GObject * source, GAsyncResult * res, gpointer udata)
|
|||
GST_START_TEST (test_filesource_basic)
|
||||
{
|
||||
GESTimeline *timeline;
|
||||
GESTimelineLayer *layer;
|
||||
GESLayer *layer;
|
||||
|
||||
fail_unless (ges_init ());
|
||||
|
||||
|
@ -89,7 +89,7 @@ GST_START_TEST (test_filesource_basic)
|
|||
timeline = ges_timeline_new_audio_video ();
|
||||
fail_unless (timeline != NULL);
|
||||
|
||||
layer = ges_timeline_layer_new ();
|
||||
layer = ges_layer_new ();
|
||||
fail_unless (layer != NULL);
|
||||
fail_unless (ges_timeline_add_layer (timeline, layer));
|
||||
|
||||
|
@ -120,7 +120,7 @@ GST_START_TEST (test_filesource_properties)
|
|||
AssetUri asset_uri;
|
||||
GESTimeline *timeline;
|
||||
GESUriClipAsset *asset;
|
||||
GESTimelineLayer *layer;
|
||||
GESLayer *layer;
|
||||
GESTrackElement *trackelement;
|
||||
|
||||
ges_init ();
|
||||
|
@ -128,7 +128,7 @@ GST_START_TEST (test_filesource_properties)
|
|||
track = ges_track_new (GES_TRACK_TYPE_AUDIO, GST_CAPS_ANY);
|
||||
fail_unless (track != NULL);
|
||||
|
||||
layer = ges_timeline_layer_new ();
|
||||
layer = ges_layer_new ();
|
||||
fail_unless (layer != NULL);
|
||||
timeline = ges_timeline_new ();
|
||||
fail_unless (GES_IS_TIMELINE (timeline));
|
||||
|
@ -144,7 +144,7 @@ GST_START_TEST (test_filesource_properties)
|
|||
|
||||
asset = GES_URI_CLIP_ASSET (asset_uri.asset);
|
||||
fail_unless (GES_IS_ASSET (asset));
|
||||
clip = ges_timeline_layer_add_asset (layer, GES_ASSET (asset),
|
||||
clip = ges_layer_add_asset (layer, GES_ASSET (asset),
|
||||
42, 12, 51, GES_TRACK_TYPE_AUDIO);
|
||||
assert_is_type (clip, GES_TYPE_URI_CLIP);
|
||||
assert_equals_uint64 (_START (clip), 42);
|
||||
|
@ -205,7 +205,7 @@ GST_START_TEST (test_filesource_images)
|
|||
GESUriClip *uriclip;
|
||||
AssetUri asset_uri;
|
||||
GESTimeline *timeline;
|
||||
GESTimelineLayer *layer;
|
||||
GESLayer *layer;
|
||||
GESTrackElement *track_element;
|
||||
|
||||
ges_init ();
|
||||
|
@ -213,7 +213,7 @@ GST_START_TEST (test_filesource_images)
|
|||
a = ges_track_audio_raw_new ();
|
||||
v = ges_track_video_raw_new ();
|
||||
|
||||
layer = ges_timeline_layer_new ();
|
||||
layer = ges_layer_new ();
|
||||
fail_unless (layer != NULL);
|
||||
timeline = ges_timeline_new ();
|
||||
fail_unless (timeline != NULL);
|
||||
|
@ -242,7 +242,7 @@ GST_START_TEST (test_filesource_images)
|
|||
|
||||
/* the returned track element should be an image source */
|
||||
/* the clip should not create any TrackElement in the audio track */
|
||||
ges_timeline_layer_add_clip (layer, GES_CLIP (clip));
|
||||
ges_layer_add_clip (layer, GES_CLIP (clip));
|
||||
assert_equals_int (g_list_length (GES_CONTAINER_CHILDREN (clip)), 1);
|
||||
track_element = GES_CONTAINER_CHILDREN (clip)->data;
|
||||
fail_unless (track_element != NULL);
|
||||
|
|
|
@ -71,7 +71,7 @@ main (int argc, char **argv)
|
|||
{
|
||||
GMainLoop *mainloop = NULL;
|
||||
GESTimeline *timeline;
|
||||
GESTimelineLayer *layer = NULL;
|
||||
GESLayer *layer = NULL;
|
||||
GstBus *bus = NULL;
|
||||
guint i;
|
||||
|
||||
|
@ -86,7 +86,7 @@ main (int argc, char **argv)
|
|||
|
||||
timeline = ges_timeline_new_audio_video ();
|
||||
|
||||
layer = (GESTimelineLayer *) ges_simple_timeline_layer_new ();
|
||||
layer = (GESLayer *) ges_simple_layer_new ();
|
||||
if (!ges_timeline_add_layer (timeline, layer))
|
||||
return -1;
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@ typedef struct App
|
|||
/* back-end objects */
|
||||
GESTimeline *timeline;
|
||||
GESTimelinePipeline *pipeline;
|
||||
GESTimelineLayer *layer;
|
||||
GESLayer *layer;
|
||||
GESTrack *audio_track;
|
||||
GESTrack *video_track;
|
||||
guint audio_tracks;
|
||||
|
@ -339,7 +339,7 @@ title_source_text_changed_cb (GESClip * clip,
|
|||
}
|
||||
|
||||
static void
|
||||
layer_object_added_cb (GESTimelineLayer * layer, GESClip * clip, App * app)
|
||||
layer_object_added_cb (GESLayer * layer, GESClip * clip, App * app)
|
||||
{
|
||||
GtkTreeIter iter;
|
||||
gchar *description;
|
||||
|
@ -377,7 +377,7 @@ layer_object_added_cb (GESTimelineLayer * layer, GESClip * clip, App * app)
|
|||
}
|
||||
|
||||
static void
|
||||
layer_object_removed_cb (GESTimelineLayer * layer, GESClip * clip, App * app)
|
||||
layer_object_removed_cb (GESLayer * layer, GESClip * clip, App * app)
|
||||
{
|
||||
GtkTreeIter iter;
|
||||
|
||||
|
@ -742,11 +742,11 @@ get_video_patterns (void)
|
|||
|
||||
|
||||
static void
|
||||
layer_added_cb (GESTimeline * timeline, GESTimelineLayer * layer, App * app)
|
||||
layer_added_cb (GESTimeline * timeline, GESLayer * layer, App * app)
|
||||
{
|
||||
if (!GES_IS_SIMPLE_TIMELINE_LAYER (layer)) {
|
||||
if (!GES_IS_SIMPLE_LAYER (layer)) {
|
||||
GST_ERROR ("This timeline contains a layer type other than "
|
||||
"GESSimpleTimelineLayer. Timeline editing disabled");
|
||||
"GESSimpleLayer. Timeline editing disabled");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1041,7 +1041,7 @@ app_delete_objects (App * app, GList * objects)
|
|||
GList *cur;
|
||||
|
||||
for (cur = objects; cur; cur = cur->next) {
|
||||
ges_timeline_layer_remove_clip (app->layer, GES_CLIP (cur->data));
|
||||
ges_layer_remove_clip (app->layer, GES_CLIP (cur->data));
|
||||
cur->data = NULL;
|
||||
}
|
||||
|
||||
|
@ -1057,10 +1057,10 @@ app_move_selected_up (App * app)
|
|||
GList *objects, *tmp;
|
||||
gint pos;
|
||||
|
||||
objects = ges_timeline_layer_get_clips (app->layer);
|
||||
objects = ges_layer_get_clips (app->layer);
|
||||
pos = g_list_index (objects, app->selected_objects->data);
|
||||
|
||||
ges_simple_timeline_layer_move_object (GES_SIMPLE_TIMELINE_LAYER (app->layer),
|
||||
ges_simple_layer_move_object (GES_SIMPLE_LAYER (app->layer),
|
||||
GES_CLIP (app->selected_objects->data), pos - 1);
|
||||
|
||||
for (tmp = objects; tmp; tmp = tmp->next) {
|
||||
|
@ -1076,7 +1076,7 @@ app_add_effect_on_selected_clips (App * app, const gchar * bin_desc)
|
|||
|
||||
/* No crash if the video is playing */
|
||||
gst_element_set_state (GST_ELEMENT (app->pipeline), GST_STATE_PAUSED);
|
||||
objects = ges_timeline_layer_get_clips (app->layer);
|
||||
objects = ges_layer_get_clips (app->layer);
|
||||
|
||||
for (tmp = objects; tmp; tmp = tmp->next) {
|
||||
effect = GES_TRACK_ELEMENT (ges_effect_new (bin_desc));
|
||||
|
@ -1126,10 +1126,10 @@ app_move_selected_down (App * app)
|
|||
GList *objects, *tmp;
|
||||
gint pos;
|
||||
|
||||
objects = ges_timeline_layer_get_clips (app->layer);
|
||||
objects = ges_layer_get_clips (app->layer);
|
||||
pos = g_list_index (objects, app->selected_objects->data);
|
||||
|
||||
ges_simple_timeline_layer_move_object (GES_SIMPLE_TIMELINE_LAYER (app->layer),
|
||||
ges_simple_layer_move_object (GES_SIMPLE_LAYER (app->layer),
|
||||
GES_CLIP (app->selected_objects->data), pos - 1);
|
||||
|
||||
for (tmp = objects; tmp; tmp = tmp->next) {
|
||||
|
@ -1146,8 +1146,7 @@ app_add_file (App * app, gchar * uri)
|
|||
|
||||
clip = GES_CLIP (ges_uri_clip_new (uri));
|
||||
|
||||
ges_simple_timeline_layer_add_object (GES_SIMPLE_TIMELINE_LAYER (app->layer),
|
||||
clip, -1);
|
||||
ges_simple_layer_add_object (GES_SIMPLE_LAYER (app->layer), clip, -1);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -1187,8 +1186,7 @@ app_add_title (App * app)
|
|||
clip = GES_CLIP (ges_title_clip_new ());
|
||||
g_object_set (G_OBJECT (clip), "duration", GST_SECOND, NULL);
|
||||
|
||||
ges_simple_timeline_layer_add_object (GES_SIMPLE_TIMELINE_LAYER (app->layer),
|
||||
clip, -1);
|
||||
ges_simple_layer_add_object (GES_SIMPLE_LAYER (app->layer), clip, -1);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -1201,8 +1199,7 @@ app_add_test (App * app)
|
|||
clip = GES_CLIP (ges_test_clip_new ());
|
||||
g_object_set (G_OBJECT (clip), "duration", GST_SECOND, NULL);
|
||||
|
||||
ges_simple_timeline_layer_add_object (GES_SIMPLE_TIMELINE_LAYER
|
||||
(app->layer), clip, -1);
|
||||
ges_simple_layer_add_object (GES_SIMPLE_LAYER (app->layer), clip, -1);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -1216,8 +1213,7 @@ app_add_transition (App * app)
|
|||
(GES_VIDEO_STANDARD_TRANSITION_TYPE_CROSSFADE));
|
||||
g_object_set (G_OBJECT (clip), "duration", GST_SECOND, NULL);
|
||||
|
||||
ges_simple_timeline_layer_add_object (GES_SIMPLE_TIMELINE_LAYER
|
||||
(app->layer), clip, -1);
|
||||
ges_simple_layer_add_object (GES_SIMPLE_LAYER (app->layer), clip, -1);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -1338,7 +1334,7 @@ app_new (void)
|
|||
if (!(ges_timeline_add_track (ret->timeline, v)))
|
||||
goto fail;
|
||||
|
||||
if (!(ret->layer = (GESTimelineLayer *) ges_simple_timeline_layer_new ()))
|
||||
if (!(ret->layer = (GESLayer *) ges_simple_layer_new ()))
|
||||
goto fail;
|
||||
|
||||
if (!(ges_timeline_add_layer (ret->timeline, ret->layer)))
|
||||
|
|
|
@ -81,7 +81,7 @@ make_timeline (char *path, float duration, char *text, guint32 color,
|
|||
{
|
||||
GESTimeline *timeline;
|
||||
GESTrack *trackv, *tracka;
|
||||
GESTimelineLayer *layer1;
|
||||
GESLayer *layer1;
|
||||
GESClip *srca;
|
||||
GESClip *overlay;
|
||||
GESTimelinePipeline *pipeline;
|
||||
|
@ -100,7 +100,7 @@ make_timeline (char *path, float duration, char *text, guint32 color,
|
|||
tracka = ges_track_audio_raw_new ();
|
||||
ges_timeline_add_track (timeline, tracka);
|
||||
|
||||
layer1 = GES_TIMELINE_LAYER (ges_timeline_layer_new ());
|
||||
layer1 = GES_LAYER (ges_layer_new ());
|
||||
g_object_set (layer1, "priority", (gint32) 0, NULL);
|
||||
|
||||
if (!ges_timeline_add_layer (timeline, layer1))
|
||||
|
@ -109,8 +109,8 @@ make_timeline (char *path, float duration, char *text, guint32 color,
|
|||
aduration = (guint64) (duration * GST_SECOND);
|
||||
srca = make_source (path, 0, aduration, 1);
|
||||
overlay = make_overlay (text, 0, aduration, 0, color, xpos, ypos);
|
||||
ges_timeline_layer_add_clip (layer1, srca);
|
||||
ges_timeline_layer_add_clip (layer1, overlay);
|
||||
ges_layer_add_clip (layer1, srca);
|
||||
ges_layer_add_clip (layer1, overlay);
|
||||
|
||||
return pipeline;
|
||||
}
|
||||
|
|
|
@ -29,7 +29,7 @@ main (int argc, gchar ** argv)
|
|||
GESTimelinePipeline *pipeline;
|
||||
GESTimeline *timeline;
|
||||
GESTrack *tracka, *trackv;
|
||||
GESTimelineLayer *layer1, *layer2;
|
||||
GESLayer *layer1, *layer2;
|
||||
GESUriClip *src;
|
||||
GMainLoop *mainloop;
|
||||
|
||||
|
@ -76,8 +76,8 @@ main (int argc, gchar ** argv)
|
|||
tracka = ges_track_audio_raw_new ();
|
||||
trackv = ges_track_video_raw_new ();
|
||||
|
||||
layer1 = (GESTimelineLayer *) ges_simple_timeline_layer_new ();
|
||||
layer2 = (GESTimelineLayer *) ges_simple_timeline_layer_new ();
|
||||
layer1 = (GESLayer *) ges_simple_layer_new ();
|
||||
layer2 = (GESLayer *) ges_simple_layer_new ();
|
||||
g_object_set (layer2, "priority", 1, NULL);
|
||||
|
||||
if (!ges_timeline_add_layer (timeline, layer1) ||
|
||||
|
@ -94,7 +94,7 @@ main (int argc, gchar ** argv)
|
|||
g_free (uri);
|
||||
g_object_set (src, "in-point", inpoint * GST_SECOND,
|
||||
"duration", duration * GST_SECOND, "mute", mute, NULL);
|
||||
ges_timeline_layer_add_clip (layer1, GES_CLIP (src));
|
||||
ges_layer_add_clip (layer1, GES_CLIP (src));
|
||||
}
|
||||
|
||||
/* Play the pipeline */
|
||||
|
|
|
@ -27,7 +27,7 @@ main (int argc, gchar ** argv)
|
|||
GESTimelinePipeline *pipeline;
|
||||
GESTimeline *timeline;
|
||||
GESClip *source;
|
||||
GESTimelineLayer *layer;
|
||||
GESLayer *layer;
|
||||
GMainLoop *mainloop;
|
||||
|
||||
/* Initialize GStreamer (this will parse environment variables and commandline
|
||||
|
@ -43,7 +43,7 @@ main (int argc, gchar ** argv)
|
|||
timeline = ges_timeline_new_audio_video ();
|
||||
|
||||
/* We are only going to be doing one layer of clips */
|
||||
layer = ges_timeline_layer_new ();
|
||||
layer = ges_layer_new ();
|
||||
|
||||
/* Add the tracks and the layer to the timeline */
|
||||
if (!ges_timeline_add_layer (timeline, layer))
|
||||
|
@ -53,12 +53,12 @@ main (int argc, gchar ** argv)
|
|||
src_asset = ges_asset_request (GES_TYPE_TEST_CLIP, NULL, NULL);
|
||||
|
||||
/* Add sources to our layer */
|
||||
ges_timeline_layer_add_asset (layer, src_asset, 0, 0, GST_SECOND,
|
||||
ges_layer_add_asset (layer, src_asset, 0, 0, GST_SECOND,
|
||||
GES_TRACK_TYPE_UNKNOWN);
|
||||
source = ges_timeline_layer_add_asset (layer, src_asset, GST_SECOND, 0,
|
||||
source = ges_layer_add_asset (layer, src_asset, GST_SECOND, 0,
|
||||
GST_SECOND, GES_TRACK_TYPE_UNKNOWN);
|
||||
g_object_set (source, "freq", 480.0, "vpattern", 2, NULL);
|
||||
ges_timeline_layer_add_asset (layer, src_asset, 2 * GST_SECOND, 0,
|
||||
ges_layer_add_asset (layer, src_asset, 2 * GST_SECOND, 0,
|
||||
GST_SECOND, GES_TRACK_TYPE_UNKNOWN);
|
||||
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ main (int argc, gchar ** argv)
|
|||
GESTimelinePipeline *pipeline;
|
||||
GESTimeline *timeline;
|
||||
GESTrack *tracka;
|
||||
GESTimelineLayer *layer;
|
||||
GESLayer *layer;
|
||||
GMainLoop *mainloop;
|
||||
GstClockTime offset = 0;
|
||||
guint i;
|
||||
|
@ -50,7 +50,7 @@ main (int argc, gchar ** argv)
|
|||
tracka = ges_track_audio_raw_new ();
|
||||
|
||||
/* We are only going to be doing one layer of clips */
|
||||
layer = ges_timeline_layer_new ();
|
||||
layer = ges_layer_new ();
|
||||
|
||||
/* Add the tracks and the layer to the timeline */
|
||||
if (!ges_timeline_add_layer (timeline, layer))
|
||||
|
@ -70,7 +70,7 @@ main (int argc, gchar ** argv)
|
|||
|
||||
g_object_set (src, "start", offset, "duration", GST_SECOND, NULL);
|
||||
|
||||
ges_timeline_layer_add_clip (layer, (GESClip *) src);
|
||||
ges_layer_add_clip (layer, (GESClip *) src);
|
||||
}
|
||||
|
||||
/* In order to listen our timeline, let's grab a convenience pipeline to put
|
||||
|
|
|
@ -25,7 +25,7 @@ main (int argc, gchar ** argv)
|
|||
GESTimelinePipeline *pipeline;
|
||||
GESTimeline *timeline;
|
||||
GESTrack *tracka;
|
||||
GESTimelineLayer *layer;
|
||||
GESLayer *layer;
|
||||
GMainLoop *mainloop;
|
||||
guint i;
|
||||
|
||||
|
@ -49,7 +49,7 @@ main (int argc, gchar ** argv)
|
|||
tracka = ges_track_audio_raw_new ();
|
||||
|
||||
/* We are only going to be doing one layer of clips */
|
||||
layer = (GESTimelineLayer *) ges_simple_timeline_layer_new ();
|
||||
layer = (GESLayer *) ges_simple_layer_new ();
|
||||
|
||||
/* Add the tracks and the layer to the timeline */
|
||||
if (!ges_timeline_add_layer (timeline, layer))
|
||||
|
@ -68,9 +68,9 @@ main (int argc, gchar ** argv)
|
|||
g_free (uri);
|
||||
|
||||
g_object_set (src, "duration", GST_SECOND, NULL);
|
||||
/* Since we're using a GESSimpleTimelineLayer, objects will be automatically
|
||||
/* Since we're using a GESSimpleLayer, objects will be automatically
|
||||
* appended to the end of the layer */
|
||||
ges_timeline_layer_add_clip (layer, (GESClip *) src);
|
||||
ges_layer_add_clip (layer, (GESClip *) src);
|
||||
}
|
||||
|
||||
/* In order to view our timeline, let's grab a convenience pipeline to put
|
||||
|
|
|
@ -57,7 +57,7 @@ main (int argc, gchar ** argv)
|
|||
GESTimelinePipeline *pipeline;
|
||||
GESTimeline *timeline;
|
||||
GESTrack *tracka;
|
||||
GESTimelineLayer *layer;
|
||||
GESLayer *layer;
|
||||
GMainLoop *mainloop;
|
||||
GstEncodingProfile *profile;
|
||||
gchar *container = (gchar *) "application/ogg";
|
||||
|
@ -104,7 +104,7 @@ main (int argc, gchar ** argv)
|
|||
tracka = ges_track_audio_raw_new ();
|
||||
|
||||
/* We are only going to be doing one layer of clips */
|
||||
layer = (GESTimelineLayer *) ges_simple_timeline_layer_new ();
|
||||
layer = (GESLayer *) ges_simple_layer_new ();
|
||||
|
||||
/* Add the tracks and the layer to the timeline */
|
||||
if (!ges_timeline_add_layer (timeline, layer))
|
||||
|
@ -123,9 +123,9 @@ main (int argc, gchar ** argv)
|
|||
g_free (uri);
|
||||
|
||||
g_object_set (src, "duration", GST_SECOND, NULL);
|
||||
/* Since we're using a GESSimpleTimelineLayer, objects will be automatically
|
||||
/* Since we're using a GESSimpleLayer, objects will be automatically
|
||||
* appended to the end of the layer */
|
||||
ges_timeline_layer_add_clip (layer, (GESClip *) src);
|
||||
ges_layer_add_clip (layer, (GESClip *) src);
|
||||
}
|
||||
|
||||
/* In order to view our timeline, let's grab a convenience pipeline to put
|
||||
|
|
|
@ -55,7 +55,7 @@ make_timeline (char *path, float duration, char *text)
|
|||
{
|
||||
GESTimeline *timeline;
|
||||
GESTrack *trackv, *tracka;
|
||||
GESTimelineLayer *layer1;
|
||||
GESLayer *layer1;
|
||||
GESClip *srca;
|
||||
GESTimelinePipeline *pipeline;
|
||||
guint64 aduration;
|
||||
|
@ -73,7 +73,7 @@ make_timeline (char *path, float duration, char *text)
|
|||
tracka = ges_track_audio_raw_new ();
|
||||
ges_timeline_add_track (timeline, tracka);
|
||||
|
||||
layer1 = GES_TIMELINE_LAYER (ges_timeline_layer_new ());
|
||||
layer1 = GES_LAYER (ges_layer_new ());
|
||||
g_object_set (layer1, "priority", (gint32) 0, NULL);
|
||||
|
||||
if (!ges_timeline_add_layer (timeline, layer1))
|
||||
|
@ -81,7 +81,7 @@ make_timeline (char *path, float duration, char *text)
|
|||
|
||||
aduration = (guint64) (duration * GST_SECOND);
|
||||
srca = make_source (path, 0, aduration, 1, text);
|
||||
ges_timeline_layer_add_clip (layer1, srca);
|
||||
ges_layer_add_clip (layer1, srca);
|
||||
|
||||
return pipeline;
|
||||
}
|
||||
|
|
|
@ -73,7 +73,7 @@ static GESTimelinePipeline *
|
|||
create_timeline (void)
|
||||
{
|
||||
GESTimelinePipeline *pipeline;
|
||||
GESTimelineLayer *layer;
|
||||
GESLayer *layer;
|
||||
GESTrack *tracka, *trackv;
|
||||
GESTimeline *timeline;
|
||||
GESClip *src;
|
||||
|
@ -83,7 +83,7 @@ create_timeline (void)
|
|||
tracka = ges_track_audio_raw_new ();
|
||||
trackv = ges_track_video_raw_new ();
|
||||
|
||||
layer = (GESTimelineLayer *) ges_simple_timeline_layer_new ();
|
||||
layer = (GESLayer *) ges_simple_layer_new ();
|
||||
|
||||
/* Add the tracks and the layer to the timeline */
|
||||
if (!ges_timeline_add_layer (timeline, layer) ||
|
||||
|
@ -97,8 +97,7 @@ create_timeline (void)
|
|||
"vpattern", GES_VIDEO_TEST_PATTERN_SNOW,
|
||||
"duration", 10 * GST_SECOND, NULL);
|
||||
|
||||
ges_simple_timeline_layer_add_object ((GESSimpleTimelineLayer *) layer,
|
||||
GES_CLIP (src), 0);
|
||||
ges_simple_layer_add_object ((GESSimpleLayer *) layer, GES_CLIP (src), 0);
|
||||
|
||||
pipeline = ges_timeline_pipeline_new ();
|
||||
|
||||
|
|
|
@ -89,7 +89,7 @@ make_timeline (gchar * nick, gdouble tdur, gchar * patha, gfloat adur,
|
|||
{
|
||||
GESTimeline *timeline;
|
||||
GESTrack *trackv, *tracka;
|
||||
GESTimelineLayer *layer1;
|
||||
GESLayer *layer1;
|
||||
GESClip *srca, *srcb;
|
||||
GESTimelinePipeline *pipeline;
|
||||
guint64 aduration, bduration, tduration, tstart, ainpoint, binpoint;
|
||||
|
@ -108,7 +108,7 @@ make_timeline (gchar * nick, gdouble tdur, gchar * patha, gfloat adur,
|
|||
tracka = ges_track_audio_raw_new ();
|
||||
ges_timeline_add_track (timeline, tracka);
|
||||
|
||||
layer1 = GES_TIMELINE_LAYER (ges_timeline_layer_new ());
|
||||
layer1 = GES_LAYER (ges_layer_new ());
|
||||
g_object_set (layer1, "priority", (gint32) 0, NULL);
|
||||
|
||||
if (!ges_timeline_add_layer (timeline, layer1))
|
||||
|
@ -122,8 +122,8 @@ make_timeline (gchar * nick, gdouble tdur, gchar * patha, gfloat adur,
|
|||
tstart = aduration - tduration;
|
||||
srca = make_source (patha, 0, aduration, ainpoint, 1);
|
||||
srcb = make_source (pathb, tstart, bduration, binpoint, 2);
|
||||
ges_timeline_layer_add_clip (layer1, srca);
|
||||
ges_timeline_layer_add_clip (layer1, srcb);
|
||||
ges_layer_add_clip (layer1, srca);
|
||||
ges_layer_add_clip (layer1, srcb);
|
||||
g_timeout_add_seconds (1, (GSourceFunc) print_transition_data, srca);
|
||||
g_timeout_add_seconds (1, (GSourceFunc) print_transition_data, srcb);
|
||||
|
||||
|
@ -137,7 +137,7 @@ make_timeline (gchar * nick, gdouble tdur, gchar * patha, gfloat adur,
|
|||
g_object_set (tr,
|
||||
"start", (guint64) tstart,
|
||||
"duration", (guint64) tduration, "in-point", (guint64) 0, NULL);
|
||||
ges_timeline_layer_add_clip (layer1, GES_CLIP (tr));
|
||||
ges_layer_add_clip (layer1, GES_CLIP (tr));
|
||||
g_timeout_add_seconds (1, (GSourceFunc) print_transition_data, tr);
|
||||
}
|
||||
|
||||
|
|
|
@ -128,7 +128,7 @@ make_encoding_profile (gchar * audio, gchar * video, gchar * video_restriction,
|
|||
static GESTimeline *
|
||||
create_timeline (int nbargs, gchar ** argv, gchar * audio, gchar * video)
|
||||
{
|
||||
GESTimelineLayer *layer;
|
||||
GESLayer *layer;
|
||||
GESTrack *tracka = NULL, *trackv = NULL;
|
||||
GESTimeline *timeline;
|
||||
guint i;
|
||||
|
@ -141,7 +141,7 @@ create_timeline (int nbargs, gchar ** argv, gchar * audio, gchar * video)
|
|||
trackv = ges_track_video_raw_new ();
|
||||
|
||||
/* We are only going to be doing one layer of clips */
|
||||
layer = (GESTimelineLayer *) ges_simple_timeline_layer_new ();
|
||||
layer = (GESLayer *) ges_simple_layer_new ();
|
||||
|
||||
/* Add the tracks and the layer to the timeline */
|
||||
if (!ges_timeline_add_layer (timeline, layer) ||
|
||||
|
@ -222,9 +222,9 @@ create_timeline (int nbargs, gchar ** argv, gchar * audio, gchar * video)
|
|||
g_free (uri);
|
||||
}
|
||||
|
||||
/* Since we're using a GESSimpleTimelineLayer, objects will be automatically
|
||||
/* Since we're using a GESSimpleLayer, objects will be automatically
|
||||
* appended to the end of the layer */
|
||||
ges_timeline_layer_add_clip (layer, clip);
|
||||
ges_layer_add_clip (layer, clip);
|
||||
}
|
||||
|
||||
return timeline;
|
||||
|
|
Loading…
Reference in a new issue