Labsmore / pyuscope

Python machine vision platform
BSD 2-Clause "Simplified" License
80 stars 17 forks source link

Better detect camera mismatch #379

Open JohnDMcMaster opened 10 months ago

JohnDMcMaster commented 10 months ago

Some confusing debugging after cascading error from https://github.com/Labsmore/pyuscope/issues/370

Sample crash below. We should at a minimum detect the resolution mismatch if we can't somehow better detect a caps negotation failure

mcmaster@thudpad:~/doc/ext/pyuscope$ GST_TOUPCAMSRC_INFO=Y GST_DEBUG=3,toupcamsrc:5  ./app/argus.py --microscope ls-hvy-1
qt5ct: using qt5ct plugin
using microscope auto config {'name': 'lip-x1', 'serial': '123'}
0:00:00.846088646 765817      0x20efc60 DEBUG             toupcamsrc gsttoupcamsrc.c:482:gst_toupcam_src_class_init: Using gst_toupcam_src_fill
pygame 2.5.2 (SDL 2.28.2, Python 3.8.10)
Hello from the pygame community. https://www.pygame.org/contribute.html
qt5ct: D-Bus global menu: no
0:00:01.289946827 765817      0x20efc60 DEBUG             toupcamsrc gsttoupcamsrc.c:1174:gst_toupcam_src_start:<toupcamsrc0> gst_toupcam_src_start(): begin
0:00:01.289968399 765817      0x20efc60 INFO              toupcamsrc gsttoupcamsrc.c:1181:gst_toupcam_src_start:<toupcamsrc0> ToupCam Library Ver 53.21907.20221218
0:00:01.290329933 765817      0x20efc60 INFO              toupcamsrc gsttoupcamsrc.c:1186:gst_toupcam_src_start:<toupcamsrc0> Found 1 devices
0:00:01.290338649 765817      0x20efc60 DEBUG             toupcamsrc gsttoupcamsrc.c:1192:gst_toupcam_src_start:<toupcamsrc0> Toupcam_Open()
toupcam debug info for Version(): 53.21907.20221218
  SDK_Brand: topucam
  MaxBitDepth(): 12
  FanMaxSpeed(): -2147467263
  MaxSpeed(): 2
  MonoMode(): 1
  StillResolutionNumber(): 3
    eSize=0
          StillResolution(): 5440w x 3648h
          PixelSize(): 2.4w x 2.4h um
    eSize=1
          StillResolution(): 2736w x 1824h
          PixelSize(): 4.8w x 4.8h um
    eSize=2
          StillResolution(): 1824w x 1216h
          PixelSize(): 7.2w x 7.2h um
  ExpTimeRange(): min 264, max 15000000, def 10000
  ExpoAGainRange(): min 100, max 5000, def 100
  Negative(): 0
  Chrome(): 0
  HZ(): 2
  RealTime(): 0
  Revision(): 1
  SerialNumber(): TP190715145113E82E53D906CF45CD3
  FwVersion(): 1.5.1.20180616
  HwVersion(): 1.0
  ProductionDate(): 20190715
  FpgaVersion(): 2.3
  ToupcamModelV2():
    name: E3ISPM20000KPA
    flag: 0x81042041
    maxspeed: 2
    preview: 3
    still: 3
  Option(PIXEL_FORMAT): 0
    RawFormat(): FourCC GBRG, BitsPerPixel 8
0:00:01.658052520 765817      0x20efc60 DEBUG             toupcamsrc gsttoupcamsrc.c:1273:gst_toupcam_src_start:<toupcamsrc0> setup image mode: regular
0:00:01.658122256 765817      0x20efc60 DEBUG             toupcamsrc gsttoupcamsrc.c:1318:gst_toupcam_src_start:<toupcamsrc0> Image 5440 w x 3648 h, in 3 bytes / pix => 59535360 bytes (59.5 MB), out 3 bytes / pix => 59535360 bytes (59.5 MB)
0:00:01.733613473 765817      0x20efc60 DEBUG             toupcamsrc gsttoupcamsrc.c:1020:sdk_callback_PullMode:<toupcamsrc0> sdk_callback_PullMode(nEvent=1) begin, want 4
0:00:01.733644169 765817      0x20efc60 DEBUG             toupcamsrc gsttoupcamsrc.c:1029:sdk_callback_PullMode:<toupcamsrc0> sdk_callback_PullMode(nEvent=1) end, images now 0
0:00:01.805582075 765817      0x20efc60 DEBUG             toupcamsrc gsttoupcamsrc.c:1020:sdk_callback_PullMode:<toupcamsrc0> sdk_callback_PullMode(nEvent=1) begin, want 4
0:00:01.805601231 765817      0x20efc60 DEBUG             toupcamsrc gsttoupcamsrc.c:1029:sdk_callback_PullMode:<toupcamsrc0> sdk_callback_PullMode(nEvent=1) end, images now 0
0:00:01.897658723 765817      0x20efc60 DEBUG             toupcamsrc gsttoupcamsrc.c:1020:sdk_callback_PullMode:<toupcamsrc0> sdk_callback_PullMode(nEvent=1) begin, want 4
0:00:01.897717273 765817      0x20efc60 DEBUG             toupcamsrc gsttoupcamsrc.c:1029:sdk_callback_PullMode:<toupcamsrc0> sdk_callback_PullMode(nEvent=1) end, images now 0
0:00:01.899653992 765817      0x20efc60 DEBUG             toupcamsrc gsttoupcamsrc.c:1020:sdk_callback_PullMode:<toupcamsrc0> sdk_callback_PullMode(nEvent=1) begin, want 4
0:00:01.899705630 765817      0x20efc60 DEBUG             toupcamsrc gsttoupcamsrc.c:1029:sdk_callback_PullMode:<toupcamsrc0> sdk_callback_PullMode(nEvent=1) end, images now 0
0:00:01.908065164 765817      0x20efc60 DEBUG             toupcamsrc gsttoupcamsrc.c:1337:gst_toupcam_src_start:<toupcamsrc0> gst_toupcam_src_start(): ok
0:00:01.908605405 765817      0x29e04c0 FIXME                default gstutils.c:3980:gst_pad_create_stream_id_internal:<toupcamsrc0:src> Creating random stream-id, consider implementing a deterministic way of creating a stream-id
0:00:01.908907172 765817      0x29e04c0 WARN              video-info video-info.c:727:gst_video_info_to_caps: invalid matrix 0 for RGB format, using RGB
0:00:01.909006803 765817      0x29e04c0 WARN                 basesrc gstbasesrc.c:3072:gst_base_src_loop:<toupcamsrc0> error: Internal data stream error.
0:00:01.909041237 765817      0x29e04c0 WARN                 basesrc gstbasesrc.c:3072:gst_base_src_loop:<toupcamsrc0> error: streaming stopped, reason not-negotiated (-4)
GRBL homing w/ INIT_LOCK, main status: Idle
0:00:02.067685067 765817 0x7f2ff8002290 DEBUG             toupcamsrc gsttoupcamsrc.c:1020:sdk_callback_PullMode:<toupcamsrc0> sdk_callback_PullMode(nEvent=1) begin, want 4
0:00:02.067781773 765817 0x7f2ff8002290 DEBUG             toupcamsrc gsttoupcamsrc.c:1029:sdk_callback_PullMode:<toupcamsrc0> sdk_callback_PullMode(nEvent=1) end, images now 0
0:00:02.156398128 765817 0x7f3000003c40 DEBUG             toupcamsrc gsttoupcamsrc.c:1020:sdk_callback_PullMode:<toupcamsrc0> sdk_callback_PullMode(nEvent=4) begin, want 4
0:00:02.156421418 765817 0x7f3000003c40 DEBUG             toupcamsrc gsttoupcamsrc.c:1029:sdk_callback_PullMode:<toupcamsrc0> sdk_callback_PullMode(nEvent=4) end, images now 1
0:00:02.218545804 765817      0x20efc60 DEBUG             toupcamsrc gsttoupcamsrc.c:1020:sdk_callback_PullMode:<toupcamsrc0> sdk_callback_PullMode(nEvent=1) begin, want 4
0:00:02.218561634 765817      0x20efc60 DEBUG             toupcamsrc gsttoupcamsrc.c:1029:sdk_callback_PullMode:<toupcamsrc0> sdk_callback_PullMode(nEvent=1) end, images now 1
0:00:02.251156538 765817 0x7f3000003c40 DEBUG             toupcamsrc gsttoupcamsrc.c:1020:sdk_callback_PullMode:<toupcamsrc0> sdk_callback_PullMode(nEvent=4) begin, want 4
0:00:02.251175607 765817 0x7f3000003c40 DEBUG             toupcamsrc gsttoupcamsrc.c:1029:sdk_callback_PullMode:<toupcamsrc0> sdk_callback_PullMode(nEvent=4) end, images now 2
0:00:02.261807832 765817 0x7f2ff8002290 DEBUG             toupcamsrc gsttoupcamsrc.c:1020:sdk_callback_PullMode:<toupcamsrc0> sdk_callback_PullMode(nEvent=13) begin, want 4
0:00:02.261829560 765817 0x7f2ff8002290 DEBUG             toupcamsrc gsttoupcamsrc.c:1029:sdk_callback_PullMode:<toupcamsrc0> sdk_callback_PullMode(nEvent=13) end, images now 2
0:00:02.316145299 765817 0x7f3000003c40 DEBUG             toupcamsrc gsttoupcamsrc.c:1020:sdk_callback_PullMode:<toupcamsrc0> sdk_callback_PullMode(nEvent=4) begin, want 4
0:00:02.316168699 765817 0x7f3000003c40 DEBUG             toupcamsrc gsttoupcamsrc.c:1029:sdk_callback_PullMode:<toupcamsrc0> sdk_callback_PullMode(nEvent=4) end, images now 3
GstVP error: gst-stream-error-quark: Internal data stream error. (1) gstbasesrc.c(3072): gst_base_src_loop (): /GstPipeline:player/GstToupCamSrc:toupcamsrc0:
streaming stopped, reason not-negotiated (-4)
0:00:02.368464859 765817      0x20efc60 DEBUG             toupcamsrc gsttoupcamsrc.c:1355:gst_toupcam_src_stop:<toupcamsrc0> gst_toupcam_src_stop()
Traceback (most recent call last):
  File "/home/mcmaster/doc/ext/pyuscope-rhodium/uscope/gui/widgets.py", line 158, in poll_misc
    self.ac.poll_misc()
  File "/home/mcmaster/doc/ext/pyuscope-rhodium/uscope/gui/common.py", line 379, in poll_misc
    raise ArgusShutdown("Video pipeline crashed")
uscope.gui.common.ArgusShutdown: Video pipeline crashed

Shutting down: requesting
Shutting down: joining
Joined
QThread: Destroyed while thread is still running
Aborted (core dumped)
JohnDMcMaster commented 10 months ago

Looks like the core issue is we ignore gst_toupcam_src_set_caps(). This can detect the error and/or actually change the resolution as needed

JohnDMcMaster commented 10 months ago

set_caps() doesn't appear to be being called at all. However the python code appears to be attempting caps negotiation. Maybe try CLi to isolate the issue

        self.raw_capsfilter.props.caps = Gst.Caps(
            "video/x-raw,width=%u,height=%u" % (raw_w, raw_h))
        self.player.add(self.raw_capsfilter)

        if not self.source.link(self.raw_capsfilter):
            raise RuntimeError("Couldn't set capabilities on the source")
JohnDMcMaster commented 10 months ago

Here is a reduced test case outside of pyuscope:

mcmaster@thudpad:~/doc/ext/pyuscope$ GST_DEBUG=3,toupcamsrc:5 gst-launch-1.0 toupcamsrc esize=0 ! video/x-raw,width=1280,height=720 ! queue ! videoconvert ! xvimagesink
0:00:00.036572975 769125 0x55f2eb9f2240 DEBUG             toupcamsrc gsttoupcamsrc.c:482:gst_toupcam_src_class_init: Using gst_toupcam_src_fill
Setting pipeline to PAUSED ...
0:00:00.043796227 769125 0x55f2eb9f2240 DEBUG             toupcamsrc gsttoupcamsrc.c:1174:gst_toupcam_src_start:<toupcamsrc0> gst_toupcam_src_start(): begin
0:00:00.043810526 769125 0x55f2eb9f2240 INFO              toupcamsrc gsttoupcamsrc.c:1181:gst_toupcam_src_start:<toupcamsrc0> ToupCam Library Ver 53.21907.20221218
0:00:00.044223666 769125 0x55f2eb9f2240 INFO              toupcamsrc gsttoupcamsrc.c:1186:gst_toupcam_src_start:<toupcamsrc0> Found 1 devices
0:00:00.044230195 769125 0x55f2eb9f2240 DEBUG             toupcamsrc gsttoupcamsrc.c:1192:gst_toupcam_src_start:<toupcamsrc0> Toupcam_Open()
0:00:00.408685355 769125 0x55f2eb9f2240 DEBUG             toupcamsrc gsttoupcamsrc.c:1273:gst_toupcam_src_start:<toupcamsrc0> setup image mode: regular
0:00:00.408709339 769125 0x55f2eb9f2240 DEBUG             toupcamsrc gsttoupcamsrc.c:1318:gst_toupcam_src_start:<toupcamsrc0> Image 5440 w x 3648 h, in 3 bytes / pix => 59535360 bytes (59.5 MB), out 3 bytes / pix => 59535360 bytes (59.5 MB)
0:00:00.484679020 769125 0x55f2eb9f2240 DEBUG             toupcamsrc gsttoupcamsrc.c:1020:sdk_callback_PullMode:<toupcamsrc0> sdk_callback_PullMode(nEvent=1) begin, want 4
0:00:00.484695545 769125 0x55f2eb9f2240 DEBUG             toupcamsrc gsttoupcamsrc.c:1029:sdk_callback_PullMode:<toupcamsrc0> sdk_callback_PullMode(nEvent=1) end, images now 0 w/ 0 pulled
0:00:00.556650497 769125 0x55f2eb9f2240 DEBUG             toupcamsrc gsttoupcamsrc.c:1020:sdk_callback_PullMode:<toupcamsrc0> sdk_callback_PullMode(nEvent=1) begin, want 4
0:00:00.556665940 769125 0x55f2eb9f2240 DEBUG             toupcamsrc gsttoupcamsrc.c:1029:sdk_callback_PullMode:<toupcamsrc0> sdk_callback_PullMode(nEvent=1) end, images now 0 w/ 0 pulled
0:00:00.648661455 769125 0x55f2eb9f2240 DEBUG             toupcamsrc gsttoupcamsrc.c:1020:sdk_callback_PullMode:<toupcamsrc0> sdk_callback_PullMode(nEvent=1) begin, want 4
0:00:00.648685636 769125 0x55f2eb9f2240 DEBUG             toupcamsrc gsttoupcamsrc.c:1029:sdk_callback_PullMode:<toupcamsrc0> sdk_callback_PullMode(nEvent=1) end, images now 0 w/ 0 pulled
0:00:00.650652179 769125 0x55f2eb9f2240 DEBUG             toupcamsrc gsttoupcamsrc.c:1020:sdk_callback_PullMode:<toupcamsrc0> sdk_callback_PullMode(nEvent=1) begin, want 4
0:00:00.650667200 769125 0x55f2eb9f2240 DEBUG             toupcamsrc gsttoupcamsrc.c:1029:sdk_callback_PullMode:<toupcamsrc0> sdk_callback_PullMode(nEvent=1) end, images now 0 w/ 0 pulled
0:00:00.658763025 769125 0x55f2eb9f2240 DEBUG             toupcamsrc gsttoupcamsrc.c:1337:gst_toupcam_src_start:<toupcamsrc0> gst_toupcam_src_start(): ok
Pipeline is live and does not need PREROLL ...
0:00:00.658900217 769125 0x55f2eba2d860 FIXME                default gstutils.c:3980:gst_pad_create_stream_id_internal:<toupcamsrc0:src> Creating random stream-id, consider implementing a deterministic way of creating a stream-id
0:00:00.659001925 769125 0x55f2eba2d860 WARN              video-info video-info.c:727:gst_video_info_to_caps: invalid matrix 0 for RGB format, using RGB
0:00:00.659026836 769125 0x55f2eba2d860 WARN                 basesrc gstbasesrc.c:3072:gst_base_src_loop:<toupcamsrc0> error: Internal data stream error.
0:00:00.659032225 769125 0x55f2eba2d860 WARN                 basesrc gstbasesrc.c:3072:gst_base_src_loop:<toupcamsrc0> error: streaming stopped, reason not-negotiated (-4)
ERROR: from element /GstPipeline:pipeline0/GstToupCamSrc:toupcamsrc0: Internal data stream error.
Additional debug info:
gstbasesrc.c(3072): gst_base_src_loop (): /GstPipeline:pipeline0/GstToupCamSrc:toupcamsrc0:
streaming stopped, reason not-negotiated (-4)
ERROR: pipeline doesn't want to preroll.
Setting pipeline to NULL ...
0:00:00.659296659 769125 0x55f2eb9f2240 DEBUG             toupcamsrc gsttoupcamsrc.c:1355:gst_toupcam_src_stop:<toupcamsrc0> gst_toupcam_src_stop()
Freeing pipeline ...
0:00:00.745420017 769125 0x55f2eb9f2240 DEBUG             toupcamsrc gsttoupcamsrc.c:996:gst_toupcam_src_dispose:<toupcamsrc0> dispose
0:00:00.745431129 769125 0x55f2eb9f2240 DEBUG             toupcamsrc gsttoupcamsrc.c:1010:gst_toupcam_src_finalize:<toupcamsrc0> finalize
JohnDMcMaster commented 10 months ago

Here is a "working" run. Hmm the caps negotiation maybe happens later and gstreamer makes bad assumptions about the format being supported?

mcmaster@thudpad:~/doc/ext/pyuscope$ GST_DEBUG=3,toupcamsrc:5 gst-launch-1.0 toupcamsrc esize=0 ! video/x-raw,width=5440,height=3648 ! queue ! videoconvert ! xvimagesink
0:00:00.038986141 769169 0x5623536c9240 DEBUG             toupcamsrc gsttoupcamsrc.c:482:gst_toupcam_src_class_init: Using gst_toupcam_src_fill
Setting pipeline to PAUSED ...
0:00:00.108452945 769169 0x5623536c9240 DEBUG             toupcamsrc gsttoupcamsrc.c:1174:gst_toupcam_src_start:<toupcamsrc0> gst_toupcam_src_start(): begin
0:00:00.108473085 769169 0x5623536c9240 INFO              toupcamsrc gsttoupcamsrc.c:1181:gst_toupcam_src_start:<toupcamsrc0> ToupCam Library Ver 53.21907.20221218
0:00:00.108864387 769169 0x5623536c9240 INFO              toupcamsrc gsttoupcamsrc.c:1186:gst_toupcam_src_start:<toupcamsrc0> Found 1 devices
0:00:00.108871639 769169 0x5623536c9240 DEBUG             toupcamsrc gsttoupcamsrc.c:1192:gst_toupcam_src_start:<toupcamsrc0> Toupcam_Open()
0:00:00.476196277 769169 0x5623536c9240 DEBUG             toupcamsrc gsttoupcamsrc.c:1273:gst_toupcam_src_start:<toupcamsrc0> setup image mode: regular
0:00:00.476297110 769169 0x5623536c9240 DEBUG             toupcamsrc gsttoupcamsrc.c:1318:gst_toupcam_src_start:<toupcamsrc0> Image 5440 w x 3648 h, in 3 bytes / pix => 59535360 bytes (59.5 MB), out 3 bytes / pix => 59535360 bytes (59.5 MB)
0:00:00.552927147 769169 0x5623536c9240 DEBUG             toupcamsrc gsttoupcamsrc.c:1020:sdk_callback_PullMode:<toupcamsrc0> sdk_callback_PullMode(nEvent=1) begin, want 4
0:00:00.552952558 769169 0x5623536c9240 DEBUG             toupcamsrc gsttoupcamsrc.c:1029:sdk_callback_PullMode:<toupcamsrc0> sdk_callback_PullMode(nEvent=1) end, images now 0 w/ 0 pulled
0:00:00.624980222 769169 0x5623536c9240 DEBUG             toupcamsrc gsttoupcamsrc.c:1020:sdk_callback_PullMode:<toupcamsrc0> sdk_callback_PullMode(nEvent=1) begin, want 4
0:00:00.625036302 769169 0x5623536c9240 DEBUG             toupcamsrc gsttoupcamsrc.c:1029:sdk_callback_PullMode:<toupcamsrc0> sdk_callback_PullMode(nEvent=1) end, images now 0 w/ 0 pulled
0:00:00.716613208 769169 0x5623536c9240 DEBUG             toupcamsrc gsttoupcamsrc.c:1020:sdk_callback_PullMode:<toupcamsrc0> sdk_callback_PullMode(nEvent=1) begin, want 4
0:00:00.716668788 769169 0x5623536c9240 DEBUG             toupcamsrc gsttoupcamsrc.c:1029:sdk_callback_PullMode:<toupcamsrc0> sdk_callback_PullMode(nEvent=1) end, images now 0 w/ 0 pulled
0:00:00.718666231 769169 0x5623536c9240 DEBUG             toupcamsrc gsttoupcamsrc.c:1020:sdk_callback_PullMode:<toupcamsrc0> sdk_callback_PullMode(nEvent=1) begin, want 4
0:00:00.718720638 769169 0x5623536c9240 DEBUG             toupcamsrc gsttoupcamsrc.c:1029:sdk_callback_PullMode:<toupcamsrc0> sdk_callback_PullMode(nEvent=1) end, images now 0 w/ 0 pulled
0:00:00.726844848 769169 0x5623536c9240 DEBUG             toupcamsrc gsttoupcamsrc.c:1337:gst_toupcam_src_start:<toupcamsrc0> gst_toupcam_src_start(): ok
Pipeline is live and does not need PREROLL ...
0:00:00.727316942 769169 0x562353707460 FIXME                default gstutils.c:3980:gst_pad_create_stream_id_internal:<toupcamsrc0:src> Creating random stream-id, consider implementing a deterministic way of creating a stream-id
0:00:00.727690352 769169 0x562353707460 WARN              video-info video-info.c:727:gst_video_info_to_caps: invalid matrix 0 for RGB format, using RGB
Setting pipeline to PLAYING ...
New clock: GstSystemClock
0:00:00.728320675 769169 0x562353707460 INFO              toupcamsrc gsttoupcamsrc.c:1425:gst_toupcam_src_set_caps:<toupcamsrc0> The caps being set are video/x-raw, format=(string)RGB, width=(int)5440, height=(int)3648, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1, colorimetry=(string)0:1:0:0, framerate=(fraction)0/1
0:00:00.732738077 769169 0x562353707460 DEBUG             toupcamsrc gsttoupcamsrc.c:1684:gst_toupcam_src_fill:<toupcamsrc0> gst_toupcam_src_fill()
0:00:00.732779189 769169 0x562353707460 DEBUG             toupcamsrc gsttoupcamsrc.c:1696:gst_toupcam_src_fill:<toupcamsrc0>  
0:00:00.732797571 769169 0x562353707460 DEBUG             toupcamsrc gsttoupcamsrc.c:1697:gst_toupcam_src_fill:<toupcamsrc0> waiting for new image
0:00:00.892604670 769169 0x7f9e5c002350 DEBUG             toupcamsrc gsttoupcamsrc.c:1020:sdk_callback_PullMode:<toupcamsrc0> sdk_callback_PullMode(nEvent=1) begin, want 4
0:00:00.892715459 769169 0x7f9e5c002350 DEBUG             toupcamsrc gsttoupcamsrc.c:1029:sdk_callback_PullMode:<toupcamsrc0> sdk_callback_PullMode(nEvent=1) end, images now 0 w/ 0 pulled
0:00:01.139174908 769169 0x7f9e64003af0 DEBUG             toupcamsrc gsttoupcamsrc.c:1020:sdk_callback_PullMode:<toupcamsrc0> sdk_callback_PullMode(nEvent=4) begin, want 4
0:00:01.139214302 769169 0x7f9e64003af0 DEBUG             toupcamsrc gsttoupcamsrc.c:1029:sdk_callback_PullMode:<toupcamsrc0> sdk_callback_PullMode(nEvent=4) end, images now 1 w/ 0 pulled
0:00:01.139230475 769169 0x562353707460 DEBUG             toupcamsrc gsttoupcamsrc.c:1563:pull_decode_frame:<toupcamsrc0> minfo size 59535360, maxsize 59535367, flags 0x00000002
JohnDMcMaster commented 10 months ago

Maybe there are some issues related to this starting as a 0.10 plugin? There are some points on Pad (not Element) get vs query caps. But its unclear if these effect GstElement

https://github.com/ApsOps/GStreamer-0.10-to-1.0-porting-guide/blob/master/porting-to-1.0.md

"GstPad: gst_pad_get_caps() was replaced by gst_pad_query_caps(), it does not return writable caps anymore and an explicit gst_caps_make_writable() needs to be performed. This was the functionality of gst_pad_get_caps_reffed(), which is removed now."

JohnDMcMaster commented 10 months ago

What happens if we have a resolution mismatch with a v4l2src? Does it handle it more gracefully?

JohnDMcMaster commented 10 months ago

I've posted this question to the gstreamer IRC channel, hopefully can help provide some guidance