Re: AppSink consumes lot's of memory. How to control memory consumption?

Антон Шаров via gstreamer-devel <[email protected]>
Newsgroups gmane.comp.video.gstreamer.devel
Message-ID <[email protected]>
Hi, Nicolas! Thank you for reply!
 
Shame on me, but I’m not aware of this functionality. Can you provide more info about this feature?
 
Thanks in advance.
 
> 
>I believe recent C# GC allow you to do explicit unref (nullifying the object) to workaround the issue. The GC have no idea about the size of the object/buffer, so it does not prioritize it.
> 
>>>>
>>>> Any ideas how to achieve that?
>>>>
>>>> Thanks in advance.
>>>>
>>>>
>>>> Appsink code:
>>>>
>>>> var appSink = new AppSink("appsink_{CaptureConfig.CameraId}");
>>>> appSink.NewSample += AppSinkNewSample;
>>>> appSink.EmitSignals = true;
>>>>
>>>> private void AppSinkNewSample(object o, NewSampleArgs args)
>>>> {
>>>> if (o is AppSink aps)
>>>> {
>>>> using (var sample = aps.PullSample())
>>>> {
>>>> using (var buf = sample.Buffer)
>>>> {
>>>> SomeStuff(buf);
>>>> }
>>>> }
>>>> }
>>>> }
>>>>
>>>>
>>>>
>> 
>> 
>>--
>>С Уважением,
>>Шаров Антон
>> 
> 
>  
 
 
--
С Уважением,
Шаров Антон
 
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.