Fixed several GES examples, but confused with GESAsset and GESClip

Guofeng Zhang guofengzh at auslides.com
Mon Nov 9 04:06:50 PST 2015


Thibault,

Your are right, adding
     ges_timeline_commit (timeline);
before setting the pipepline to PLAYING solve it.

Thanks very much for your help.

Guofeng


On 2015/11/9 4:28, Thibault Saunier wrote:
> Hello,
>
> GES will add testsrc for gaps yes. No idea why it would not work. Make
> sure the timeline is commited in that example.
>
> Regards,
>
> Thibault
>
> On Sun, Nov 8, 2015 at 5:18 PM, Guofeng Zhang <guofengzh at auslides.com> wrote:
>> Thibault
>>
>> For the simple1.c, If I change the value of the start property to a non-zero
>> value, for example, 1 second, I heard nothing. If I reset its value to 0, it
>> works as expected.
>>
>> Does this mean that I should make sure that there is not any gap in the
>> timeline?  I think GES will use audiotestsrc for the audio gap, am I right?
>>
>> Thanks for your help.
>>
>> Guofeng
>>
>>
>> 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 gnome.org>
>>>       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,
>>>> GES_TRACK_TYPE_AUDIO);
>>>> 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 lists.freedesktop.org
>>> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>>
>> _______________________________________________
>> gstreamer-devel mailing list
>> gstreamer-devel at lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel



More information about the gstreamer-devel mailing list