typedef struct PendingClip
{
gchar *id;
- gdouble rate;
guint layer_prio;
GstClockTime start;
GstClockTime inpoint;
static inline GESClip *
_add_object_to_layer (GESBaseXmlFormatterPrivate * priv, const gchar * id,
GESTimelineLayer * layer, GESAsset * asset, GstClockTime start,
- GstClockTime inpoint, GstClockTime duration, gdouble rate,
+ GstClockTime inpoint, GstClockTime duration,
GESTrackType track_types, const gchar * metadatas,
GstStructure * properties)
{
GESClip *clip = ges_timeline_layer_add_asset (layer,
- asset, start, inpoint, duration, rate, track_types);
+ asset, start, inpoint, duration, track_types);
if (clip == NULL) {
GST_WARNING_OBJECT (clip, "Could not add object from asset: %s",
clip =
_add_object_to_layer (priv, pend->id, pend->layer, asset,
- pend->start, pend->inpoint, pend->duration, pend->rate,
- pend->track_types, pend->metadatas, pend->properties);
+ pend->start, pend->inpoint, pend->duration, pend->track_types,
+ pend->metadatas, pend->properties);
if (clip == NULL)
continue;
void
ges_base_xml_formatter_add_clip (GESBaseXmlFormatter * self,
const gchar * id, const char *asset_id, GType type, GstClockTime start,
- GstClockTime inpoint, GstClockTime duration, gdouble rate,
+ GstClockTime inpoint, GstClockTime duration,
guint layer_prio, GESTrackType track_types, GstStructure * properties,
const gchar * metadatas, GError ** error)
{
/* We do not want the properties that are passed to layer-add_asset to be reset */
if (properties)
- gst_structure_remove_fields (properties, "supported-formats", "rate",
+ gst_structure_remove_fields (properties, "supported-formats",
"inpoint", "start", "ducation", NULL);
asset = ges_asset_request (type, asset_id, NULL);
pclip, asset_id, g_list_length (pendings));
pclip->id = g_strdup (id);
- pclip->rate = rate;
pclip->track_types = track_types;
pclip->duration = duration;
pclip->inpoint = inpoint;
}
nclip = _add_object_to_layer (priv, id, entry->layer,
- asset, start, inpoint, duration, rate, track_types, metadatas,
- properties);
+ asset, start, inpoint, duration, track_types, metadatas, properties);
if (!nclip)
return;
GstClockTime start,
GstClockTime inpoint,
GstClockTime duration,
- gdouble rate,
guint layer_prio,
GESTrackType track_types,
GstStructure *properties,
* @start: The start value to set on the new #GESClip
* @inpoint: The inpoint value to set on the new #GESClip
* @duration: The duration value to set on the new #GESClip
- * @rate: The rate value to set on the new #GESClip
* @track_types: The #GESTrackType to set on the the new #GESClip
*
* Creates Clip from asset, adds it to layer and
GESClip *
ges_timeline_layer_add_asset (GESTimelineLayer * layer,
GESAsset * asset, GstClockTime start, GstClockTime inpoint,
- GstClockTime duration, gdouble rate, GESTrackType track_types)
+ GstClockTime duration, GESTrackType track_types)
{
GESClip *clip;
(asset), GES_TYPE_CLIP), NULL);
GST_DEBUG_OBJECT (layer, "Adding asset %s with: start: %" GST_TIME_FORMAT
- " inpoint: %" GST_TIME_FORMAT " duration: %" GST_TIME_FORMAT " rate %f"
+ " inpoint: %" GST_TIME_FORMAT " duration: %" GST_TIME_FORMAT
" track types: %d (%s)", ges_asset_get_id (asset), GST_TIME_ARGS (start),
- GST_TIME_ARGS (inpoint), GST_TIME_ARGS (duration), rate, track_types,
+ GST_TIME_ARGS (inpoint), GST_TIME_ARGS (duration), track_types,
ges_track_type_name (track_types));
clip = GES_CLIP (ges_asset_extract (asset, NULL));
GstClockTime start,
GstClockTime inpoint,
GstClockTime duration,
- gdouble rate,
GESTrackType track_types);
gboolean ges_timeline_layer_remove_clip (GESTimelineLayer * layer,
/* 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, 1,
+ ges_timeline_layer_add_asset (layer, asset, start, 0, duration,
ges_track_element_get_track_type (next));
} else {
GST_DEBUG_OBJECT (timeline,
const gchar ** attribute_values, GESXmlFormatter * self, GError ** error)
{
GType type;
- gdouble rate = 0;
GstStructure *props = NULL;
GESTrackType track_types;
GstClockTime start, inpoint = 0, duration, layer_prio;
if (errno)
goto convertion_failed;
- if (strrate) {
- rate = g_ascii_strtod (strrate, NULL);
- if (errno)
- goto convertion_failed;
- }
-
if (strin) {
inpoint = g_ascii_strtoull (strin, NULL, 10);
if (errno)
}
ges_base_xml_formatter_add_clip (GES_BASE_XML_FORMATTER (self),
- strid, asset_id, type, start, inpoint, duration, rate, layer_prio,
+ strid, asset_id, type, start, inpoint, duration, layer_prio,
track_types, props, metadatas, error);
if (props)
gst_structure_free (props);
start = gst_util_get_timestamp ();
clip = GES_CLIP (ges_timeline_layer_add_asset (layer, asset, 0,
- 0, 1000, 1, GES_TRACK_TYPE_UNKNOWN));
+ 0, 1000, GES_TRACK_TYPE_UNKNOWN));
for (i = 1; i < NUM_OBJECTS; i++)
ges_timeline_layer_add_asset (layer, asset, i * 1000, 0,
- 1000, 1, GES_TRACK_TYPE_UNKNOWN);
+ 1000, GES_TRACK_TYPE_UNKNOWN);
end = gst_util_get_timestamp ();
g_print ("%" GST_TIME_FORMAT " - adding %d clip to the timeline\n",
GST_TIME_ARGS (end - start), i);
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, 1,
+ clip = ges_timeline_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);
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,
- 1000, 1, GES_TRACK_TYPE_UNKNOWN));
+ 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,
- 0, 1000, 1, GES_TRACK_TYPE_UNKNOWN));
+ 0, 1000, GES_TRACK_TYPE_UNKNOWN));
fail_unless (GES_IS_CLIP (src1));
/*
GST_DEBUG ("Adding clip from 1250 -- 1000 to first layer");
src2 =
GES_TIMELINE_ELEMENT (ges_timeline_layer_add_asset (layer, asset, 1250, 0,
- 1000, 1, GES_TRACK_TYPE_UNKNOWN));
+ 1000, GES_TRACK_TYPE_UNKNOWN));
assert_is_type (src2, GES_TYPE_TEST_CLIP);
/* 600____src___1100
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,
- 1000, 1, GES_TRACK_TYPE_UNKNOWN));
+ 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,
- 0, 1000, 1, GES_TRACK_TYPE_UNKNOWN));
+ 0, 1000, GES_TRACK_TYPE_UNKNOWN));
fail_unless (GES_IS_CLIP (src1));
/*
GST_DEBUG ("Adding clip 2 from 500 -- 1000 to second layer");
src2 = GES_TIMELINE_ELEMENT (ges_timeline_layer_add_asset (layer1, asset, 0,
- 0, 1000, 1, GES_TRACK_TYPE_UNKNOWN));
+ 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,
- 0, 1000, 1, GES_TRACK_TYPE_UNKNOWN));
+ 0, 1000, GES_TRACK_TYPE_UNKNOWN));
assert_is_type (src3, GES_TYPE_TEST_CLIP);
/* 500__transition__1000
GST_DEBUG ("Adding clip from 0 -- 1000 to layer");
src = GES_TIMELINE_ELEMENT (ges_timeline_layer_add_asset (layer, asset, 0, 0,
- 1000, 1, GES_TRACK_TYPE_UNKNOWN));
+ 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,
- 0, 1000, 1, GES_TRACK_TYPE_UNKNOWN));
+ 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,
- 0, 1000, 1, GES_TRACK_TYPE_UNKNOWN));
+ 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,
- 0, 500, 1, GES_TRACK_TYPE_UNKNOWN));
+ 0, 500, GES_TRACK_TYPE_UNKNOWN));
fail_unless (GES_IS_CLIP (src3));
/*
GST_DEBUG ("Adding transition from 1000 -- 1500 to layer");
transition =
GES_CLIP (ges_timeline_layer_add_asset (layer,
- transition_asset, 1000, 0, 500, 1, GES_TRACK_TYPE_VIDEO));
+ transition_asset, 1000, 0, 500, GES_TRACK_TYPE_VIDEO));
fail_unless (GES_IS_TRANSITION_CLIP (transition));
objects = GES_CONTAINER_CHILDREN (transition);
assert_equals_int (g_list_length (objects), 1);
* | clip | | clip1 | | clip2 |
* time 0------- 10 --------20 50---------60
*/
- clip = ges_timeline_layer_add_asset (layer, asset, 0, 0, 10, 1,
+ clip = ges_timeline_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, 1,
+ clip1 = ges_timeline_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, 1,
+ clip2 = ges_timeline_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));
layer = ges_timeline_layer_new ();
ges_timeline_add_layer (timeline, layer);
- ges_timeline_layer_add_asset (layer, GES_ASSET (asset), 0, 0, 10, 1.0,
+ ges_timeline_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;
layer = GES_TIMELINE_LAYER (g_async_result_get_user_data (res));
tlfs = GES_URI_CLIP (ges_timeline_layer_add_asset (layer,
- asset, 0, 0, GST_CLOCK_TIME_NONE, 1, GES_TRACK_TYPE_UNKNOWN));
+ 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));
assert_equals_uint64 (_DURATION (tlfs), GST_SECOND);
asset = GES_URI_CLIP_ASSET (asset_uri.asset);
fail_unless (GES_IS_ASSET (asset));
clip = ges_timeline_layer_add_asset (layer, GES_ASSET (asset),
- 42, 12, 51, 1, GES_TRACK_TYPE_AUDIO);
+ 42, 12, 51, GES_TRACK_TYPE_AUDIO);
assert_is_type (clip, GES_TYPE_URI_CLIP);
assert_equals_uint64 (_START (clip), 42);
assert_equals_uint64 (_DURATION (clip), 51);
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, 1,
+ ges_timeline_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,
- GST_SECOND, 1, GES_TRACK_TYPE_UNKNOWN);
+ 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,
- GST_SECOND, 1, GES_TRACK_TYPE_UNKNOWN);
+ GST_SECOND, GES_TRACK_TYPE_UNKNOWN);
/* In order to view our timeline, let's grab a convenience pipeline to put