tearing in gstreamer-captured screen video with OpenGL Full-screen mode

Hi DaneLLL,
Thank you for your reply.

I have read your talks, so I want to know except ximagesrc, how can I use your example to achived screenshot, have some API can I called.

Hi linwen,
The sample is to capture content with EGL APIs.

For screenshot, we don’t have specific API for it. Please other users can share experience.

Hi DaneLLL,
Thank you for your reply.

Thank you very much.

Hi DaneLLL,

I am following the procedure given in GitHub - DaneLLL/simpleEGLStreams_producer in Tegra X2.

Internal data flow error occurs when I run the command nvgstcapture-1.0 --camsrc=3 --prev-res=3.

Error :

nvgstcapture-1.0 --camsrc=3 --prev-res=3
Encoder null, cannot set bitrate!
Encoder Profile = High
Runtime encoder configuration options:

Set Encoding Bit-rate(in bytes):
br: e.g., br:4000000
Get Encoding Bit-rate(in bytes):
gbr
Set Encoding Profile(only for H.264):
ep: e.g., ep:1
(0): Baseline
(1): Main
(2): High
Get Encoding Profile(only for H.264):
gep
Force IDR Frame on video Encoder(only for H.264):
Enter ‘f’

NvEglStreamProducer: Loading library: libnveglstreamproducer.so
NVEGLStreamProducer: start_eglstream_producer ++
eglDisplay Handle created
EGLStream initialized
NVEGLStreamProducer: start_eglstream_producer –
Thread created
Setting display=0x628fe0 and EGLStream=0x64cac1 EGLStream_Producer_ID=0
bitrate = 4000000
Encoder Profile = High
** Message: main:5684 iterating capture loop …
Framerate set to : 30 at NvxVideoEncoderSetParameterNvMMLiteOpen : Block : BlockType = 4
===== MSENC =====
NvMMLiteBlockCreate : Block : BlockType = 4
Obtained EGLConfig and EGLContext
Bound layer to rendering surface
ERROR on bus: by /GstPipeline:capture_native_pipeline/GstBin:cap_bin/GstNvEglStreamSrc:nveglstreamsrc0: Internal data flow error.
debug info:
gstbasesrc.c(2948): gst_base_src_loop (): /GstPipeline:capture_native_pipeline/GstBin:cap_bin/GstNvEglStreamSrc:nveglstreamsrc0:
streaming task paused, reason error (-5)
NVEGLStreamProducer: stop_eglstream_producer ++
Producer Disconnected
NVEGLStreamProducer: stop_eglstream_producer –

NvEglStreamProducer: UnLoading library: libnveglstreamproducer.so
** Message: main:5694 Capture completed
** Message: main:5745 Camera application will now exit

I am using L4T28.2.1. Can you help me out?

Hi RoHith13,

Please open a new topic in TX2 forum. Thanks