I appreciate the help, I finally got unstuck with the appsrc problem. In this case, I wasn’t setting timestamps properly in my appsrc. Now I’m stuck on scaling (rotation works!), the nvcompositor pipelines get complex quickly and I’m not sure how to read them.
<< "nvcompositor name=comp "
<< " sink_0::xpos=0 sink_0::ypos=0 sink_0::width="<< W <<" sink_0::height="<< H
<< " sink_1::xpos=0 sink_1::ypos=0 sink_1::width="<< W <<" sink_1::height="<< H
<< " ! nvvidconv flip-method=3 ! "
<< "nvdrmvideosink conn-id=1 sync=false videotestsrc pattern=snow is-live=true ! "
<< Caps << " ! comp. appsrc name=mysource is-live=true ! nvvidconv ! queue ! "
<< Caps << " ! comp.";
The above works great for the most part; the appsrc has parts that set the alpha to transparent and I can see the snow test pattern behind it.
One tricky part is my display is rotated, it’s a 1200 x 1920 screen that’s designed around portrait, but we’re using in landscape mode. The
line solves that part, but getting that working was pure trial and error.
The really tricky part is that the display (or something) is a bit buggy, so if I try to display at the full resolution the screen blinks in and out. I have to set it to a slightly lower resolution, and I haven’t figured out how with nvcompositor. nvvidconv with caps set to a certain resolution behind it works perfectly for simple pipelines, for example:
nvvidconv flip-method=3 ! video/x-raw(memory:NVMM),format=NV12,width=1080,height=1860
would normally be fine.
I can replace nvdrmvideosink with nvoverlysink, but for some reason I can’t get as close to the edge of the screen by setting the same resolution with the “overlay-h” and “overlay-w” parameters as I can with nvvidconv and caps.