aravis icon indicating copy to clipboard operation
aravis copied to clipboard

Baumer TXG08C support

Open rhaamo opened this issue 4 years ago • 1 comments

Describe the bug Issues with GST plugin:

node 'GainAuto' not found
node 'ExposureAuto' not found

Note, after patching: GRAY8 format produces a black and white picture, but RGB or UYVY just a black one, is that another issue ? I can get color with video/x-bayer and ! bayer2rgb ! videoconv... however.

To Reproduce

gst-launch-1.0 aravissrc camera-name='Baumer Optronic-TXG08c-9077651119' exposure=32000 gain=15 ! video/x-raw,width=1028,height=772 ! videoconvert ! ximagesink sync="false"
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
ERROR: from element /GstPipeline:pipeline0/GstAravis:aravis0: Could not set caps on camera "Baumer Optronic-TXG08c-9077651119": node 'GainAuto' not found
Additional debug info:
../gst/gstaravis.c(359): gst_aravis_set_caps (): /GstPipeline:pipeline0/GstAravis:aravis0
Execution ended after 0:00:00.028990476
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...

Expected behavior The plugin shouldn't set the nodes if thoses are not supported features.

Camera description:

  • Baumer
  • TXG08C
  • Ethernet

Platform description:

  • Aravis git rev 5fe961d3817bda3a45b442306f1c4b436639e3fc

Additional context I have made a thread with more logs and features list: https://aravis-project.discourse.group/t/gstreamer-node-gainauto-not-found/183

I have awfully "patched" the gst plugin to avoid any calls to the auto-xx settings and I can get an image, however I'm not familiar with the code at all so I don't know how to properly set or not depending on the features.

--- a/gst/gstaravis.c
+++ b/gst/gstaravis.c
@@ -272,28 +272,28 @@ gst_aravis_set_caps (GstBaseSrc *src, GstCaps *caps)
                                  arv_camera_get_frame_rate (gst_aravis->camera, NULL));
 
        if (!error && gst_aravis->gain_auto_set) {
-               arv_camera_set_gain_auto (gst_aravis->camera, gst_aravis->gain_auto, &error);
-               GST_DEBUG_OBJECT (gst_aravis, "Auto Gain = %s", arv_auto_to_string(gst_aravis->gain_auto));
+               // arv_camera_set_gain_auto (gst_aravis->camera, gst_aravis->gain_auto, &error);
+               GST_DEBUG_OBJECT (gst_aravis, "DISABLED Auto Gain = %s", arv_auto_to_string(gst_aravis->gain_auto));
        }
        if (gst_aravis->gain_auto == ARV_AUTO_OFF) {
                if (gst_aravis->gain >= 0) {
                        GST_DEBUG_OBJECT (gst_aravis, "Gain = %g", gst_aravis->gain);
-                       if (!error && !gst_aravis->gain_auto_set)
-                               arv_camera_set_gain_auto (gst_aravis->camera, ARV_AUTO_OFF, &error);
+                       // if (!error && !gst_aravis->gain_auto_set)
+                               //  (gst_aravis->camera, ARV_AUTO_OFF, &error);
                        if (!error) arv_camera_set_gain (gst_aravis->camera, gst_aravis->gain, &error);
                }
                GST_DEBUG_OBJECT (gst_aravis, "Actual gain = %g", arv_camera_get_gain (gst_aravis->camera, NULL));
        }
 
        if (!error && gst_aravis->exposure_auto_set) {
-               arv_camera_set_exposure_time_auto (gst_aravis->camera, gst_aravis->exposure_auto, &error);
-               GST_DEBUG_OBJECT (gst_aravis, "Auto Exposure = %s", arv_auto_to_string(gst_aravis->exposure_auto));
+               // arv_camera_set_exposure_time_auto (gst_aravis->camera, gst_aravis->exposure_auto, &error);
+               GST_DEBUG_OBJECT (gst_aravis, "DISABLED Auto Exposure = %s", arv_auto_to_string(gst_aravis->exposure_auto));
        }
        if (gst_aravis->exposure_auto == ARV_AUTO_OFF) {
                if (gst_aravis->exposure_time_us > 0.0) {
                        GST_DEBUG_OBJECT (gst_aravis, "Exposure = %g µs", gst_aravis->exposure_time_us);
-                       if (!error && !gst_aravis->exposure_auto_set)
-                               arv_camera_set_exposure_time_auto (gst_aravis->camera, ARV_AUTO_OFF, &error);
+                       // if (!error && !gst_aravis->exposure_auto_set)
+                               // arv_camera_set_exposure_time_auto (gst_aravis->camera, ARV_AUTO_OFF, &error);
                        if (!error) arv_camera_set_exposure_time (gst_aravis->camera, gst_aravis->exposure_time_us, &error);
                }
                GST_DEBUG_OBJECT (gst_aravis, "Actual exposure = %g µs", arv_camera_get_exposure_time (gst_aravis->camera, NULL));
@@ -703,8 +703,8 @@ gst_aravis_set_property (GObject * object, guint prop_id,
                        GST_OBJECT_LOCK (gst_aravis);
                        gst_aravis->gain_auto = g_value_get_enum (value);
                        gst_aravis->gain_auto_set = TRUE;
-                       if (gst_aravis->camera != NULL)
-                               arv_camera_set_gain_auto (gst_aravis->camera, gst_aravis->gain_auto, NULL);
+                       // if (gst_aravis->camera != NULL)
+                               // arv_camera_set_gain_auto (gst_aravis->camera, gst_aravis->gain_auto, NULL);
                        GST_OBJECT_UNLOCK (gst_aravis);
                        break;
                case PROP_EXPOSURE:
@@ -718,8 +718,8 @@ gst_aravis_set_property (GObject * object, guint prop_id,
                        GST_OBJECT_LOCK (gst_aravis);
                        gst_aravis->exposure_auto = g_value_get_enum (value);
                        gst_aravis->exposure_auto_set = TRUE;
-                       if (gst_aravis->camera != NULL)
-                               arv_camera_set_exposure_time_auto (gst_aravis->camera, gst_aravis->exposure_auto, NULL);
+                       // if (gst_aravis->camera != NULL)
+                               // arv_camera_set_exposure_time_auto (gst_aravis->camera, gst_aravis->exposure_auto, NULL);
                        GST_OBJECT_UNLOCK (gst_aravis);
                        break;
                case PROP_OFFSET_X:

rhaamo avatar Nov 24 '20 07:11 rhaamo

Hi Valérianne,

Please try https://github.com/AravisProject/aravis/pull/457 and let me know if it fixes your issue.

EmmanuelP avatar Dec 02 '20 14:12 EmmanuelP