callback "New-sample"

Armin Erkert armin.erkert at rolmail.net
Tue Sep 14 06:02:31 UTC 2021



Hello Michael,

I have already set the "emit-signal" to true

g_object_set (app->sink, "emit-signals", TRUE, NULL);
g_signal_connect (app->sink, "new-sample", G_CALLBACK (new_sample), app);

but the callback "new-sample" is retrieved several 100th times only  
after I have pushed all images into the stream.

Have now seen that in the \tmp\ a temporary file qtmuxXXXXX is  
created, and suspect that qtmux first caches everything ....

Regards
Armin


Translated with www.DeepL.com/Translator (free version)

Zitat von Michael Gruner via gstreamer-devel  
<gstreamer-devel at lists.freedesktop.org>:

> Hello Armin
>
> You need to set the “emit-signals” property in the appsink to TRUE.
>
> Michael
> www.ridgerun.com
>
>> On 13 Sep 2021, at 14:19, Armin Erkert via gstreamer-devel  
>> <gstreamer-devel at lists.freedesktop.org> wrote:
>>
>> 
>> Hello,
>>
>> have problems with the following pipe
>> "appsrc is-live=true name=source  
>> caps=video/x-raw,width=2464,height=512,format=GRAY8,framerate=10/1  
>> ! nvvidconv ! video/x-raw(memory:NVMM),format=I420 ! nvv4l2h265enc  
>> iframeinterval=20 ! h265parse ! qtmux faststart=true ! appsink  
>> name=sink"
>>
>> which I use in my C++ program, and namely the callback "New-sample"  
>> from the appsink, is only called after an EOS in the appsrc
>> (g_signal_emit_by_name (app->source, "end-of-stream", &ret).
>>
>> How can I improve this ?
>>
>>
>> Regarda
>>
>> --------------------------------
>> Ing. Erkert Armin
>> Mittelstrich 9
>> I-39050 Tiers (BZ)
>>
>> Email: armin.erkert at rolmail.net
>> Tel.:  +39 349 4385335
>> WWW:   www.erkert.it
>>



--------------------------------
Ing. Erkert Armin
Mittelstrich 9
I-39050 Tiers (BZ)

Email: armin.erkert at rolmail.net
Tel.:  +39 349 4385335
WWW:   www.erkert.it



More information about the gstreamer-devel mailing list