_ges_command_line_formatter_add_clip (GESTimeline * timeline,
GstStructure * structure, GError ** error)
{
+ GESProject *proj;
+ GESAsset *asset;
if (!_cleanup_fields (options[CLIP].properties, structure, error))
return FALSE;
gst_structure_set (structure, "type", G_TYPE_STRING, "GESUriClip", NULL);
- return _ges_add_clip_from_struct (timeline, structure, error);
+ if (!_ges_add_clip_from_struct (timeline, structure, error))
+ return FALSE;
+
+ proj = GES_PROJECT (ges_extractable_get_asset (GES_EXTRACTABLE (timeline)));
+ asset = _ges_get_asset_from_timeline (timeline, GES_TYPE_URI_CLIP,
+ gst_structure_get_string (structure, "asset-id"), NULL);
+ ges_project_add_asset (proj, asset);
+
+ return TRUE;
}
static gboolean
asset_id = g_strdup (check_asset_id);
}
+ gst_structure_set (structure, "asset-id", G_TYPE_STRING, asset_id, NULL);
asset = _ges_get_asset_from_timeline (timeline, type, asset_id, error);
if (!asset) {
res = FALSE;
}
if (!child) {
- g_error_new (GES_ERROR, 0, "Wong parametters, could not get a child");
+ g_error_new (GES_ERROR, 0, "Wrong parameters, could not get a child");
return FALSE;
}
gchar *sanitized_timeline;
const gchar *video_track_caps;
const gchar *audio_track_caps;
+ gboolean embed_nesteds;
} ParsedOptions;
struct _GESLauncherPrivate
g_print ("interrupt received.\n");
GST_DEBUG_BIN_TO_DOT_FILE_WITH_TS (GST_BIN (self->priv->pipeline),
- GST_DEBUG_GRAPH_SHOW_ALL, "ges-launch.interupted");
+ GST_DEBUG_GRAPH_SHOW_ALL, "ges-launch.interrupted");
g_application_quit (G_APPLICATION (self));
{
ParsedOptions *opts = &self->priv->parsed_options;
+
+ if (opts->embed_nesteds) {
+ GList *tmp, *assets;
+ GESProject *proj =
+ GES_PROJECT (ges_extractable_get_asset (GES_EXTRACTABLE (self->
+ priv->timeline)));
+
+ assets = ges_project_list_assets (proj, GES_TYPE_URI_CLIP);
+ for (tmp = assets; tmp; tmp = tmp->next) {
+ gboolean is_nested;
+
+ g_object_get (tmp->data, "is-nested-timeline", &is_nested, NULL);
+ if (is_nested) {
+ GESAsset *subproj =
+ ges_asset_request (GES_TYPE_TIMELINE, ges_asset_get_id (tmp->data),
+ NULL);
+
+ ges_project_add_asset (proj, subproj);
+ }
+ }
+ g_list_free_full (assets, gst_object_unref);
+ }
+
if (opts->save_only_path) {
gchar *uri;
"and --inspect-action-type.",
"<scenario_name>"},
#endif
+ {"embed-nesteds", 0, 0, G_OPTION_ARG_NONE, &opts->embed_nesteds,
+ "Embed nested timelines when saving.",},
{NULL}
};