Appsink: How to drop samples?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Appsink: How to drop samples?

Ilya Aleshkov
Hi,

I have a pair of pipelines for recording (thanks to Nicolas Dufresne):

ksvideosrc ... ! tee name=t
    t. ! queue ! glimagesaink
    t. ! queue ! appsink

appsrc ! x264enc tune=zerolatency ! video/x-h264,stream-format=byte-stream ! filesink location=video.h264

My app pass the samples from appsink to appsrc when needed. Everything works.
But I have to always keep the emit-signals property enabled. I guess It's not good for performance. Am I right? If I enable emit-signals only while recording I get a large time shift in recorded files. It looks like buffering inside appsink. How to drop these samples?

Thanks,
Ilya

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Appsink: How to drop samples?

Nicolas Dufresne-5
Le mardi 23 avril 2019 à 20:53 +0300, Ilya Aleshkov a écrit :

> Hi,
>
> I have a pair of pipelines for recording (thanks to Nicolas Dufresne):
>
> ksvideosrc ... ! tee name=t
>     t. ! queue ! glimagesaink
>     t. ! queue ! appsink
>
> appsrc ! x264enc tune=zerolatency ! video/x-h264,stream-format=byte-stream ! filesink location=video.h264
>
> My app pass the samples from appsink to appsrc when needed. Everything works.
> But I have to always keep the emit-signals property enabled. I guess It's not good for performance. Am I right? If I enable emit-signals only while recording I get a large time shift in recorded files. It looks like buffering inside appsink. How to drop these samples?
First thing I would try, set properties drop=1 and max-buffers=1 (or a
decently low value) on appsink.

>
> Thanks,
> Ilya
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

signature.asc (201 bytes) Download Attachment