Fixed several GES examples, but confused with GESAsset and GESClip
guofengzh at auslides.com
Thu Oct 29 10:55:16 PDT 2015
test1.c worked well, it use:
src_asset = ges_asset_request (GES_TYPE_TEST_CLIP, NULL, NULL);
to instantiate a GESTestClip.
but test2.c and simple1.c does not work. They all use
GESUriClip *src = ges_uri_clip_new (uri);
I tried to use
GESAsset *src = ges_asset_request (GES_TYPE_URI_CLIP, uri, NULL);
but not succeeded.
The comment for ges_asset_request() describes that I should use
ges_uri_clip_asset_request_sync, so I made the following change:
GESAsset *src = ges_uri_clip_asset_request_sync( uri, &error) ;
ges_layer_add_asset (layer, src, offset, 0, 5 * GST_SECOND,
Now test2.c and simple1.c worked well.
What make me confused is
(1) ges_uri_clip_asset_request_sync() also use
ges_asset_request (GES_TYPE_URI_CLIP, uri, &lerror)
to instantiate the GESAsset, but it works (mine not), why?
(2) The GESTAsset and GESClip has one to one relationship, that is, as
documented that assets will represent for example a GESUriClips,
each clip has a asset associated with it. But GESTestClip has no
GESTestClipAsset (something like it) defined, how could an asset existed
for GESTestClip? or testsrc does not need a resource to represent it, so
it does not need a corresponding asset? if so, for appsrc, I could only
define a clip for it and it will work with the GES framework?
Your help is appreciated very much.
More information about the gstreamer-devel