Closed leigh-johnson closed 1 year ago
So, I think what's happening is that we DO correctly detect a discrepancy between saved settings (IMX219) and currently plugged-in device:
May 25 10:37:03 [REDACTED] printnanny-vision[1191]: [2023-05-25T14:37:03Z WARN printnanny_gst_pipelines::factory] start_pipelines detected a hotplug change in camera settings. Saving detected configuration
May 25 10:37:03 [REDACTED] printnanny-edge-nats[632]: [2023-05-25T14:37:03Z WARN printnanny_nats_apps::request_reply] handle_cameras_load detected a hotplug change in camera settings. Saving detected configuration
May 25 10:37:03 [REDACTED] printnanny-vision[1191]: [2023-05-25T14:37:03Z INFO printnanny_gst_pipelines::factory] Creating camera pipeline with description: libcamerasrc camera-name=/base/scb/pcie@7d500000/pci@0,0/usb@0,0-1.3:1.0-1e4e:0109 ! capsfilter caps=video/x-raw,width=640,height=480,framerate=16/1,format=YUY2,interlace-mode=progressive ! v4l2convert ! interpipesink name=camera_sink sync=true async=false
May 25 10:37:04 [REDACTED] printnanny-vision[1191]: [2023-05-25T14:37:04Z ERROR printnanny_gst_pipelines::factory] Error creating pipeline name=camera error=API responded with status=409 Conflict error=Some(
May 25 10:37:04 [REDACTED] printnanny-vision[1191]: "{\n \"code\" : 8,\n \"description\" : \"Resource already exists\",\n \"response\" : null\n}",
May 25 10:37:04 [REDACTED] printnanny-vision[1191]: )
But per the last line, we're not correctly tearing out old pipelines when VideoStreamSettings.hotplug()
returns a drift in settings:
May 25 10:37:04 [REDACTED] printnanny-vision[1191]: [2023-05-25T14:37:04Z ERROR printnanny_gst_pipelines::factory] Error creating pipeline name=camera error=API responded with status=409 Conflict error=Some(
May 25 10:37:04 [REDACTED] printnanny-vision[1191]: "{\n \"code\" : 8,\n \"description\" : \"Resource already exists\",\n \"response\" : null\n}",
May 25 10:37:04 [REDACTED] printnanny-vision[1191]: )
While digging into this, I noticed gstreamer pipelines aren't stopped/deleted/re-created when new camera settings are applied. Fixed here: https://github.com/bitsy-ai/printnanny-rs/pull/589
We're also stopping pipelines as part of the start_pipelines
routine here: https://github.com/bitsy-ai/printnanny-rs/commit/d2ef16f1a5013457a75d6893bbd73dd950fbdbab
I reproduced the original issue + verified a fix using a Logitech brio. =) Cutting a release shortly
Describe the bug
I'm seeing crash reports where the
IMX219
sensor is being used in gstreamer pipeline definitions, even though no IMX219 is plugged in.In this case, only a Logitech Brio (USB) was plugged in:
To Reproduce
TBD
Expected behavior
gstreamer pipeline definitions contain the correct device/sensor
Issue.txt