Closed bsset3 closed 3 years ago
Try running with higher debug output, set environment variable "GST_DEBUG=pleorasrc:9", and share that output.
0:00:00.064017758 10724 0x55b6e5dec0 DEBUG pleorasrc gstpleorasrc.cpp:1399:gst_pleorasrc_get_caps:
I am afraid this does not give very much more information, but at least we see that the camera unit is discovered. By the way, increasing timeout from 1-10s has no impact, obviously the timeout error is a symptom of something else.
@joshdoe I am facing the same issue now too. GStreamer v 1.18.1, eBUS v 6.1.4.5137, VS 2019 v 16.8.1, Win 10 x64 platform
Are you letting the camera free run or doing triggering? Most times I've seen that when I've configured external triggering but the trigger source isn't applied correctly, or when the packet size is misconfigured, but I don't think either is the case here.
I do notice your config file specifies BayerRG8, which videoconvert won't handle, you'll have to use bayer2rgb or my bayer2gray, but that shouldn't be causing this timeout issue.
@joshdoe I am facing the same issue now too. GStreamer v 1.18.1, eBUS v 6.1.4.5137, VS 2019 v 16.8.1, Win 10 x64 platform
Hmm, maybe you're suggesting the issue is with GStreamer 1.18? I haven't changed pleorasrc in over a year. I can test soon with 1.18.
@joshdoe I am facing the same issue now too. GStreamer v 1.18.1, eBUS v 6.1.4.5137, VS 2019 v 16.8.1, Win 10 x64 platform
Hmm, maybe you're suggesting the issue is with GStreamer 1.18? I haven't changed pleorasrc in over a year. I can test soon with 1.18.
Unsure, if it is because of GST v 1.18, because my log looked like @bsset3's. timing out and I do NOT have camera triggering it is free flow.
The camera is set to continous run, no external trigger is used (Triggermode=Off). I have tried both fixed packet size (1476) or auto-negotiation.
Have successfully compiled/installed the gstpleora6 module on Linux, Ubuntu 18.04 (AARCH64, Nvidia JETSON Nano board). The camera is up and working (eBUS player have no problem catching image stream over GigE Vision (PureGEV) (camera has separate IP from board)
the module was compiled with GCC 7.5.0. I had to add the -DUNIX compiler flag. link.txt The camera settings used, which were also loaded in a separate trial (with the plugin config-file= param) are enclosed. This trial yielded basically the same result. test.pvcfg.gz
gst-launch-1.0 pleorasrc ! videoconvert ! autovideosink Setting pipeline to PAUSED ... 0:00:00.088070921 8470 0x558683b860 WARN xcontext xvcontext.c:534:gst_xvcontext_check_xshm_calls: MIT-SHM extension check failed at XShmAttach. Not using shared memory. 0:00:00.105536122 8470 0x558683b860 WARN xcontext xvcontext.c:534:gst_xvcontext_check_xshm_calls: MIT-SHM extension check failed at XShmAttach. Not using shared memory. 0:00:03.500491386 8470 0x558683b860 WARN pleorasrc gstpleorasrc.cpp:1520:gst_pleorasrc_get_pvbuffer: error: Failed to retrieve buffer in timeout (1000 ms): 0x001e, '' 0:00:03.566564863 8470 0x558683b860 WARN basesrc gstbasesrc.c:3452:gst_base_src_start: error: Failed to start 0:00:03.566688824 8470 0x558683b860 WARN basesrc gstbasesrc.c:3807:gst_base_src_activate_push: Failed to start in push mode 0:00:03.566722992 8470 0x558683b860 WARN GST_PADS gstpad.c:1149:gst_pad_set_active:pleorasrc0:src Failed to activate pad ERROR: Pipeline doesn't want to pause. ERROR: from element /GstPipeline:pipeline0/GstPleoraSrc:pleorasrc0: Failed to retrieve buffer in timeout (1000 ms): 0x001e, ''
Any clue as to what may be the issue?
@bsset3 can you please double check eBUS v is 6.1.4. OR 6.1.8 ? Just curious to know why do I have an older version)
My version of eBUS SDK is 6.1.8 (build 5374) You have a similar problem with 6.1.4, I understand @NHarishGit.
It turns out (under Linux) I am having a problem with eBUS SDK libraries not porting all needed library symbols (using the LD_LIBRARY_PATH environment variable) I have to preload some libraries, by: LD_PRELOAD="libPvVirtualDevice.so libPvAppUtils.so"
The last part of the full DEBUG output is:
0:00:02.634243162 19810 0x55a2a464c0 WARN pleorasrc gstpleorasrc.cpp:1526:gst_pleorasrc_get_pvbuffer:
In this case we have a new error code: x0b03 = TOO_MANY_CONSECUTIVE_RESENDS. The below link suggests some solutions. (It may be that the plugin doesn't account for all the new STREAM CONTROL options of the protocol. https://supportcenter.pleora.com/s/article/TOO-MANY-CONSECUTIVE-RESENDS
After following some of the recommendations I still get:
pleorasrc gstpleorasrc.cpp:1221:gst_pleorasrc_pixel_type_to_gst_caps_string: Matched pixel type 17301513 to caps video/x-bayer, format=(string)rggb
0:00:09.524120840 24448 0x55acec68c0 DEBUG pleorasrc gstpleorasrc.cpp:1411:gst_pleorasrc_set_caps:
Good news. By scanning through the pipeline setup, and fixing an omission in the code I was able to get the the stream up and running: The correct basic gst-launch pipeline of a pleorasrc must be: gst-launch-1.0 pleorasrc ! bayer2rgb ! autovideoconvert ! autovideosink
(You need autovideoconvert to convert from raw-video rgb to a format accessible to autovideosink)
This was not enough however, the g_assert on gstpleorasrc.cpp:1640 failed because the src->gst_stride is not correctly updated from src->pleora_stride after GST_LOG_OBJECT on line 1627.
To fix this I amended the code with an actual copy-over: (1627-1632): " GST_LOG_OBJECT (src, "Row stride not aligned, copying %d -> %d", src->pleora_stride, src->gst_stride);
src->gst_stride=src->pleora_stride;
*buf = gst_buffer_new_and_alloc (src->height * src->gst_stride);
"
After this the memory allocation works, and a stream can commence, though it is not always stable with default settings for larger resolution cams. You need to provide a config-file with a good settings file to pleorasrc to obtain stable streaming. I hope this tiny fix will be amended to your code (and to your basic execution explanation)
I'm reopening this, as I'd like to make sure this gets fixed.
I understand about the need for bayer2rgb (or bayer2gray), this applies not to just this set of plugins but any use of Bayer in GStreamer, perhaps there could be some example pipelines in documentation somewhere though.
I think I see the problem. src->gst_stride
is set in gst_pleorasrc_set_caps, however, only if it's a standard video format handled by GstVideo, which Bayer isn't. I can replicate this error now. Your fix will cause issues in other cases, such as Mono8 when the width is not a multiple of 4, which that copying code is meant to handle. I'll make a fix shortly and push it.
I have made a slightly improved fix in my own fork of your repo.
tir. 24. nov. 2020 kl. 16:58 skrev joshdoe notifications@github.com:
Reopened #44 https://github.com/joshdoe/gst-plugins-vision/issues/44.
— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/joshdoe/gst-plugins-vision/issues/44#event-4033575083, or unsubscribe https://github.com/notifications/unsubscribe-auth/ARJCRJ3GXXAT4JCGCLBWISLSRPJZFANCNFSM4T3QTP7A .
Ah, I didn't see your fork. I made and pushed a fix to my pleora_bayer branch just now. One thing your commit doesn't handle is if the stride is not a multiple of 4, which bayer2rgb and GStreamer in general expects. I tested it with BayerGR8 and BayerGR12 with varying widths. If you'd like to make a fix to your branch and submit a merge request I'll accept it, otherwise I'll push my fix
I have tested your fix and it works also for me, I have incorporated it into a similar new branch on my own repo. (You may push your fix to your own master)
The travails for me is not yet completely over however; As I am incorporating your gstreamer plugin under the NVIDIA deepstream framework I can't really live with the LD_PRELOAD mechanism to avoid blacklisting of the plugin as mentioned above. ( https://github.com/joshdoe/gst-plugins-vision/issues/44#issuecomment-731253105) I have tried therefore to augment the cmake files to properly include all eBUS SDK library dependencies dynamically in the gstpleora6 module.
Like this: (cmake/modules/FindPleora.cmake:44-) find_library (Pleora_LIBRARY_BASE PvBase${_LIB_SUFFIX} ${Pleora_LIBRARY_DIR}) find_library (Pleora_LIBRARY_DEVICE PvDevice${_LIB_SUFFIX} ${Pleora_LIBRARY_DIR}) find_library (Pleora_LIBRARY_VIRTUAL_DEVICE PvVirtualDevice${_LIB_SUFFIX} ${Pleora_LIBRARY_DIR}) find_library (Pleora_LIBRARY_APPUTILS PvAppUtils${_LIB_SUFFIX} ${Pleora_LIBRARY_DIR}) set (Pleora_LIBRARIES ${Pleora_LIBRARY_BASE} ${Pleora_LIBRARY_DEVICE} ${Pleora_LIBRARY_VIRTUAL_DEVICE} ${Pleora_LIBRARY_APPUTILS})
And similarly adding to sys/pleora/CMakeLists.txt: set (LIBRARIES ....... ${Pleora_LIBRARIES} )
By this mechanism I have been able to add all required dynamic links in gstpleora6 EXCEPT for some reason the PvAppUtils library, from readelf -d: "..... 0x0000000000000001 (NEEDED) Shared library: [libPvBase.so.6.1.8.5374] 0x0000000000000001 (NEEDED) Shared library: [libPvDevice.so.6.1.8.5374] 0x0000000000000001 (NEEDED) Shared library: [libPvVirtualDevice.so.6.1.8.5374] ...... 0x000000000000001d (RUNPATH) Library runpath: [/opt/jai/ebus_sdk/linux-aarch64-arm/lib:] "
Why is CMAKE not including libPvAppUtils.so.x.x.x?
Addendum: I see that example applications in the eBUS SDK basically link successfully to almost all of the of the libPv*.so libraries. I attempted to replicate this by testing out an extensive link script for the module. Though several extra libs are included in the dynlink list, the library libPvAppUtils.so.x.x.x still refuses to be incorporated. gstpleora_linker_full.txt
I have tested your fix and it works also for me, I have incorporated it into a similar new branch on my own repo. (You may push your fix to your own master)
The travails for me is not yet completely over however; As I am incorporating your gstreamer plugin under the NVIDIA deepstream framework I can't really live with the LD_PRELOAD mechanism to avoid blacklisting of the plugin as mentioned above. ( #44 (comment)) I have tried therefore to augment the cmake files to properly include all eBUS SDK library dependencies dynamically in the gstpleora6 module.
Like this: (cmake/modules/FindPleora.cmake:44-) find_library (Pleora_LIBRARY_BASE PvBase${_LIB_SUFFIX} ${Pleora_LIBRARY_DIR}) find_library (Pleora_LIBRARY_DEVICE PvDevice${_LIB_SUFFIX} ${Pleora_LIBRARY_DIR}) find_library (Pleora_LIBRARY_VIRTUAL_DEVICE PvVirtualDevice${_LIB_SUFFIX} ${Pleora_LIBRARY_DIR}) find_library (Pleora_LIBRARY_APPUTILS PvAppUtils${_LIB_SUFFIX} ${Pleora_LIBRARY_DIR}) set (Pleora_LIBRARIES PleoraLIBRARYBASE{Pleora_LIBRARY_DEVICE} PleoraLIBRARYVIRTUALDEVICE{Pleora_LIBRARY_APPUTILS})
And similarly adding to sys/pleora/CMakeLists.txt: set (LIBRARIES ....... ${Pleora_LIBRARIES} )
By this mechanism I have been able to add all required dynamic links in gstpleora6 EXCEPT for some reason the PvAppUtils library, from readelf -d: "..... 0x0000000000000001 (NEEDED) Shared library: [libPvBase.so.6.1.8.5374] 0x0000000000000001 (NEEDED) Shared library: [libPvDevice.so.6.1.8.5374] 0x0000000000000001 (NEEDED) Shared library: [libPvVirtualDevice.so.6.1.8.5374] ...... 0x000000000000001d (RUNPATH) Library runpath: [/opt/jai/ebus_sdk/linux-aarch64-arm/lib:] "
Why is CMAKE not including libPvAppUtils.so.x.x.x?
Addendum: I see that example applications in the eBUS SDK basically link successfully to almost all of the of the libPv*.so libraries. I attempted to replicate this by testing out an extensive link script for the module. Though several extra libs are included in the dynlink list, the library libPvAppUtils.so.x.x.x still refuses to be incorporated. gstpleora_linker_full.txt
Hello @bsset3, I noticed you were planning to use the plugin in deepstream, I was wondering if you got it to work and if you know a repo for that, thank you.
Have successfully compiled/installed the gstpleora6 module on Linux, Ubuntu 18.04 (AARCH64, Nvidia JETSON Nano board). The camera is up and working (eBUS player have no problem catching image stream over GigE Vision (PureGEV) (camera has separate IP from board)
the module was compiled with GCC 7.5.0. I had to add the -DUNIX compiler flag. link.txt The camera settings used, which were also loaded in a separate trial (with the plugin config-file= param) are enclosed. This trial yielded basically the same result. test.pvcfg.gz
gst-launch-1.0 pleorasrc ! videoconvert ! autovideosink Setting pipeline to PAUSED ... 0:00:00.088070921 8470 0x558683b860 WARN xcontext xvcontext.c:534:gst_xvcontext_check_xshm_calls: MIT-SHM extension check failed at XShmAttach. Not using shared memory. 0:00:00.105536122 8470 0x558683b860 WARN xcontext xvcontext.c:534:gst_xvcontext_check_xshm_calls: MIT-SHM extension check failed at XShmAttach. Not using shared memory. 0:00:03.500491386 8470 0x558683b860 WARN pleorasrc gstpleorasrc.cpp:1520:gst_pleorasrc_get_pvbuffer: error: Failed to retrieve buffer in timeout (1000 ms): 0x001e, ''
0:00:03.566564863 8470 0x558683b860 WARN basesrc gstbasesrc.c:3452:gst_base_src_start: error: Failed to start
0:00:03.566688824 8470 0x558683b860 WARN basesrc gstbasesrc.c:3807:gst_base_src_activate_push: Failed to start in push mode
0:00:03.566722992 8470 0x558683b860 WARN GST_PADS gstpad.c:1149:gst_pad_set_active: Failed to activate pad
ERROR: Pipeline doesn't want to pause.
ERROR: from element /GstPipeline:pipeline0/GstPleoraSrc:pleorasrc0: Failed to retrieve buffer in timeout (1000 ms): 0x001e, ''
Any clue as to what may be the issue?