nvoverlaysink not working with glfilters and nvarguscamerasrc

I’m trying to establish a pipeline with gstreamer opengl on tegra tx2 ubuntu18.04LTS

the below pipeline would fail in red screen

gst-launch-1.0 glvideomixer name=m background=1 sink_1::alpha=0.9 sink_1::xpos=10 sink_1::ypos=50 sink_2::alpha=0.8 sink_2::xpos=475 sink_2::ypos=150 ! nvvidconv ! nvoverlaysink nvarguscamerasrc ! nvvidconv ! glupload ! glfiltercube ! m.sink_1 videotestsrc ! glupload ! gleffects effect=2 ! m.sink_2

although it will succeed if I replace nvarguscamerasrc with videotestsrc, i.e.
gst-launch-1.0 glvideomixer name=m background=1 sink_1::alpha=0.9 sink_1::xpos=10 sink_1::ypos=50 sink_2::alpha=0.8 sink_2::xpos=475 sink_2::ypos=150 ! nvvidconv ! nvoverlaysink videotestsrc ! nvvidconv ! glupload ! glfiltercube ! m.sink_1 videotestsrc ! glupload ! gleffects effect=2 ! m.sink_2

a similiar pipeline with nvarguscamerasrc will also succeed if I replace nvoverlaysink with glimagesink
gst-launch-1.0 glvideomixer name=m background=1 sink_1::alpha=0.9 sink_1::xpos=10 sink_1::ypos=50 sink_2::alpha=0.8 sink_2::xpos=175 sink_2::ypos=10 ! glimagesink nvarguscamerasrc ! nvvidconv ! glupload ! glfiltercube ! m.sink_1 videotestsrc ! glupload ! gleffects effect=2 ! m.sink_2

or try below:
#fail with read screen
gst-launch-1.0 nvarguscamerasrc ! nvvidconv ! glupload ! glfiltercube ! gldownload ! nvvidconv ! nvoverlaysink

#OK
gst-launch-1.0 videotestsrc ! nvvidconv ! glupload ! glfiltercube ! gldownload ! nvvidconv ! nvoverlaysink
gst-launch-1.0 nvarguscamerasrc ! nvvidconv ! glupload ! glfiltercube ! glimagesink

Hi,
For gl* plugins, we suggest you use glimagesink.

1.I don’t know how to set full-screen mode for glimagesink.
2.We used to enable dual screen with opengl. When setting both windows in full-screen, we saw display tearing issues which you said unable to fix due to a bug between opengl and your unity desktop.

So I would expect nvoverlaysink to help us enable dual displays in full-screen mode.

Hi,
We only develop/test/verify nvoerlaysink with NVIDIA plugins. Suggest you use 3rdparty sink for your usecase.

I figured it out, I need to config the camera resolution to an acceptable one, otherwise it negotiate to 2592x1458 at run-time, since my desktop resolution was set to 1360x768 somehow.

below pipeline will work

gst-launch-1.0 nvarguscamerasrc ! “video/x-raw(memory:NVMM), width=1280,height=720” ! nvvidconv ! glupload ! glfiltercube ! gldownload ! nvvidconv ! nvoverlaysink

gst-launch-1.0 glvideomixer name=m background=1 sink_1::alpha=0.9 sink_1::xpos=10 sink_1::ypos=50 sink_2::alpha=0.8 sink_2::xpos=475 sink_2::ypos=150 ! nvvidconv ! “video/x-raw(memory:NVMM), width=1360,height=768” ! nvoverlaysink nvarguscamerasrc ! “video/x-raw(memory:NVMM), width=1280,height=720” ! nvvidconv ! glupload ! glfiltercube ! m.sink_1 videotestsrc ! glupload ! gleffects effect=2 ! m.sink_2