I don’t think there is a “not negotiated” bus error in that case as the application doesn’t exit (and it usually did when that error occured). Pipeline seems to be up and running, but no window without glcolorconvert.
With GST_DEBUG=4 the following lines are printed repeatedly (and a few more not very relevant ones as well):
01.949750684 848537 0x768054000b90 INFO structure gststructure.c:3958:gst_structure_get_valist: Expected field 'gl-allocation-params' in structure: GstBufferPoolConfig, caps=(GstCaps)"video/x-raw\(memory:GLMemory\)\,\ format\=\(string\)RGBA\,\ width\=\(int\)1280\,\ height\=\(int\)800\,\ texture-target\=\(string\)2D\,\ framerate\=\(fraction\)0/1", size=(uint)4096000, min-buffers=(uint)0, max-buffers=(uint)0, allocator=(GstAllocator)"NULL", params=(GstAllocationParams)"GstAllocationParams\,\ flags\=\(GstMemoryFlags\)0\,\ align\=\(guint64\)0\,\ prefix\=\(guint64\)0\,\ padding\=\(guint64\)0\;", gl-min-free-queue-size=(uint)1, options=(string)< GstBufferPoolOptionGLSyncMeta, GstBufferPoolOptionGLTextureTarget2D >;
0:00:01.949767556 848537 0x768054000b90 INFO glbasefilter gstglbasefilter.c:567:gst_gl_base_filter_find_gl_context_unlocked:<gltransformation0> found OpenGL context <glcontextegl0>
0:00:01.949782304 848537 0x7680a8016050 INFO glbasefilter gstglbasefilter.c:400:_gl_set_caps:<gltransformation0> set GL caps input video/x-raw(memory:GLMemory), format=(string)RGBA, width=(int)1280, height=(int)800, texture-target=(string)2D
0:00:01.949790970 848537 0x7680a8016050 INFO glbasefilter gstglbasefilter.c:402:_gl_set_caps:<gltransformation0> set GL caps output video/x-raw(memory:GLMemory), format=(string)RGBA, width=(int)1280, height=(int)800, texture-target=(string)2D, framerate=(fraction)0/1
0:00:01.949825827 848537 0x768054000b90 INFO structure gststructure.c:3958:gst_structure_get_valist: Expected field 'gl-allocation-params' in structure: GstBufferPoolConfig, caps=(GstCaps)"video/x-raw\(memory:GLMemory\)\,\ format\=\(string\)RGBA\,\ width\=\(int\)1280\,\ height\=\(int\)800\,\ texture-target\=\(string\)2D\,\ framerate\=\(fraction\)0/1", size=(uint)4096000, min-buffers=(uint)1, max-buffers=(uint)0, allocator=(GstAllocator)"\(GstGLMemoryPBOAllocator\)\ glmemorypboallocator0", params=(GstAllocationParams)"GstAllocationParams\,\ flags\=\(GstMemoryFlags\)0\,\ align\=\(guint64\)0\,\ prefix\=\(guint64\)0\,\ padding\=\(guint64\)0\;", gl-min-free-queue-size=(uint)1, options=(string)< GstBufferPoolOptionGLSyncMeta, GstBufferPoolOptionGLTextureTarget2D >;
0:00:01.949849442 848537 0x768054000b90 INFO structure gststructure.c:3958:gst_structure_get_valist: Expected field 'gl-allocation-params' in structure: GstBufferPoolConfig, caps=(GstCaps)"video/x-raw\(memory:GLMemory\)\,\ format\=\(string\)RGBA\,\ width\=\(int\)1280\,\ height\=\(int\)800\,\ texture-target\=\(string\)2D\,\ framerate\=\(fraction\)0/1", size=(uint)4096000, min-buffers=(uint)1, max-buffers=(uint)0, allocator=(GstAllocator)"\(GstGLMemoryPBOAllocator\)\ glmemorypboallocator0", params=(GstAllocationParams)"GstAllocationParams\,\ flags\=\(GstMemoryFlags\)0\,\ align\=\(guint64\)0\,\ prefix\=\(guint64\)0\,\ padding\=\(guint64\)0\;", gl-min-free-queue-size=(uint)1, options=(string)< GstBufferPoolOptionGLSyncMeta, GstBufferPoolOptionGLTextureTarget2D, GstBufferPoolOptionVideoMeta >;
0:00:01.949880741 848537 0x768054000b90 INFO structure gststructure.c:3958:gst_structure_get_valist: Expected field 'gl-min-free-queue-size' in structure: GstBufferPoolConfig, caps=(GstCaps)"video/x-raw\(memory:GLMemory\)\,\ format\=\(string\)RGBA\,\ width\=\(int\)1280\,\ height\=\(int\)800\,\ texture-target\=\(string\)2D", size=(uint)4096000, min-buffers=(uint)0, max-buffers=(uint)0, allocator=(GstAllocator)"NULL", params=(GstAllocationParams)"GstAllocationParams\,\ flags\=\(GstMemoryFlags\)0\,\ align\=\(guint64\)0\,\ prefix\=\(guint64\)0\,\ padding\=\(guint64\)0\;";
0:00:01.949894327 848537 0x768054000b90 INFO structure gststructure.c:3958:gst_structure_get_valist: Expected field 'gl-allocation-params' in structure: GstBufferPoolConfig, caps=(GstCaps)"video/x-raw\(memory:GLMemory\)\,\ format\=\(string\)RGBA\,\ width\=\(int\)1280\,\ height\=\(int\)800\,\ texture-target\=\(string\)2D", size=(uint)4096000, min-buffers=(uint)0, max-buffers=(uint)0, allocator=(GstAllocator)"NULL", params=(GstAllocationParams)"GstAllocationParams\,\ flags\=\(GstMemoryFlags\)0\,\ align\=\(guint64\)0\,\ prefix\=\(guint64\)0\,\ padding\=\(guint64\)0\;";
0:00:01.949904757 848537 0x768054000b90 INFO glbasefilter gstglbasefilter.c:567:gst_gl_base_filter_find_gl_context_unlocked:<gluploadelement0> found OpenGL context <glcontextegl0>
0:00:01.949915748 848537 0x768054000b90 INFO structure gststructure.c:3958:gst_structure_get_valist: Expected field 'gl-min-free-queue-size' in structure: GstBufferPoolConfig, caps=(GstCaps)"video/x-raw\(memory:GLMemory\)\,\ format\=\(string\)RGBA\,\ width\=\(int\)1280\,\ height\=\(int\)800\,\ texture-target\=\(string\)2D", size=(uint)4096000, min-buffers=(uint)1, max-buffers=(uint)0, allocator=(GstAllocator)"NULL", params=(GstAllocationParams)"GstAllocationParams\,\ flags\=\(GstMemoryFlags\)0\,\ align\=\(guint64\)0\,\ prefix\=\(guint64\)0\,\ padding\=\(guint64\)0\;";
0:00:01.949928702 848537 0x768054000b90 INFO structure gststructure.c:3958:gst_structure_get_valist: Expected field 'gl-allocation-params' in structure: GstBufferPoolConfig, caps=(GstCaps)"video/x-raw\(memory:GLMemory\)\,\ format\=\(string\)RGBA\,\ width\=\(int\)1280\,\ height\=\(int\)800\,\ texture-target\=\(string\)2D", size=(uint)4096000, min-buffers=(uint)1, max-buffers=(uint)0, allocator=(GstAllocator)"NULL", params=(GstAllocationParams)"GstAllocationParams\,\ flags\=\(GstMemoryFlags\)0\,\ align\=\(guint64\)0\,\ prefix\=\(guint64\)0\,\ padding\=\(guint64\)0\;";
0:00:01.949942128 848537 0x768054000b90 WARN basetransform gstbasetransform.c:2228:default_generate_output:<gluploadelement0> could not get buffer from pool: ok
What’s so special about glcolorconvert that fixes glvideoflip?
For the reference, I’ve also tried manually fixating the caps:
appsrc format=time do-timestamp=true stream-type=stream is-live=true name=src ! glupload ! video/x-raw(memory:GLMemory),format=RGBA ! glvideoflip name=flip ! glimagesink
The result is the same.
I guess I’ll just slap glcolorconvert everywhere after glupload, this probably won’t be a big deal performance-wise.
The main issue is still the following pipeline:
appsrc format=time do-timestamp=true stream-type=stream is-live=true name=src ! glupload ! glcolorconvert ! gldownload ! video/x-raw ! videoflip name=flip ! glimagesink
Is there anything I can do to debug why it’s only showing black picture? Surely GStreamer can read pixels from the GPU back into the CPU memory, right?