Fixed several GES examples, but confused with GESAsset and GESClip

Guofeng Zhang guofengzh at
Fri Oct 30 07:02:25 PDT 2015

It is very helpful, Thanks.

On 2015/10/30 18:14, Thibault Saunier wrote:
> Hello Guofeng,
>> test1.c worked well, it use:
>>     GESAsset *src_asset;
>>     ...
>>     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 just fixed that with:
>      commit 5f81e64b596d3234406df75ccfde11009c422729
>      Author: Thibault Saunier <tsaunier at>
>      Date:   Fri Oct 30 10:52:12 2015 +0100
>              uri-clip: Make sure to instantiate an asset to back GESUriClip-s
>> 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.
> That is the correct way of doing it (GESUriClipAsset is a special case as
> we concider in most cases it should be created async), we still let the user
> create it synchronously with that helper.
>> 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?
> ges_uri_clip_asset_request_sync does ges_asset_request to check if the
> media file
> has already been discovered in which case it just uses the cached asset,
> in the case it is not it will go through a particular mechanism of synchronous
> discovery.
>> (2) The GESTAsset and GESClip has one to one relationship, that is, as
>> documented that assets will represent for example a GESUriClips,
>> GESBaseEffect etc.
>> 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?
> GESTestClip does not need a specialized asset to represent it, so in
> that case we
> just use the standard GESAsset (not a subclass of it).
> Hoping that answers your questions.
> Regards,
> Thibault
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at

More information about the gstreamer-devel mailing list