mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-23 23:58:17 +00:00
ges-launch: Make use of assets for uri clips
It avoids races in TrackElement creations. We should make use of assets everywhere in ges-launch but start using them for uriclips first for now.
This commit is contained in:
parent
aa08ddb8d6
commit
be765f564c
1 changed files with 17 additions and 1 deletions
|
@ -203,15 +203,31 @@ create_timeline (int nbargs, gchar ** argv, gchar * audio, gchar * video)
|
||||||
|
|
||||||
else {
|
else {
|
||||||
gchar *uri;
|
gchar *uri;
|
||||||
|
GESAsset *asset;
|
||||||
guint64 inpoint;
|
guint64 inpoint;
|
||||||
|
|
||||||
|
GError *error = NULL;
|
||||||
|
|
||||||
if (!(uri = ensure_uri (source))) {
|
if (!(uri = ensure_uri (source))) {
|
||||||
GST_ERROR ("couldn't create uri for '%s'", source);
|
GST_ERROR ("couldn't create uri for '%s'", source);
|
||||||
goto build_failure;
|
goto build_failure;
|
||||||
}
|
}
|
||||||
|
|
||||||
inpoint = str_to_time (argv[i * 3 + 1]);
|
inpoint = str_to_time (argv[i * 3 + 1]);
|
||||||
clip = GES_CLIP (ges_uri_clip_new (uri));
|
asset = GES_ASSET (ges_uri_clip_asset_request_sync (uri, &error));
|
||||||
|
if (error) {
|
||||||
|
g_printerr ("Can not create asset for %s", uri);
|
||||||
|
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
clip = GES_CLIP (ges_asset_extract (asset, &error));
|
||||||
|
if (error) {
|
||||||
|
g_printerr ("Can not extract asset for %s", uri);
|
||||||
|
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
g_object_set (clip,
|
g_object_set (clip,
|
||||||
"in-point", (guint64) inpoint, "duration", (guint64) duration, NULL);
|
"in-point", (guint64) inpoint, "duration", (guint64) duration, NULL);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue