gst-plugin-toupcam
gst-plugin-toupcam copied to clipboard
Investigate E3ISPM25000KPA stability
We've observed several issues with this camera with the official CD + ToupView app (SDK 53.21522.20221011). Ex: autoexposure broke. Similarly pyuscope was relatively quickly crashing, especially at higher frame rates.
A few theories:
- High MP camera => stressing software. Evidence: lowering resolution reduces but does not eliminate crashes
- Exposure related => long (auto) exposure times out. Evidence: flickering light on / off encourages crash
We also have a newer SDK to test sent directly from ToupTek (https://github.com/JohnDMcMaster/gst-plugin-toupcam/issues/27)
Using 53.21907.20221217 I'm seeing it time out within about 30 to 120 seconds by just letting it sit there
$ time GST_DEBUG=0 GST_PLUGIN_PATH=$PWD/src/.libs/ gst-launch-1.0 toupcamsrc ! queue ! videoconvert ! xvimagesink
registering...
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
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 error (-5)
Execution ended after 0:00:28.416354671
Setting pipeline to NULL ...
Freeing pipeline ...
real 0m29.417s
user 0m10.680s
sys 0m1.619s
Think I found a buffer overflow:
static GstFlowReturn pull_decode_frame(GstToupCamSrc * src,
GstBuffer * buf)
{
static unsigned char raw_buff[5440 * 3648 * 4 * 2];
if (sizeof(raw_buff) < src->image_bytes_in) {
gst_buffer_unmap(buf, &minfo);
GST_ERROR_OBJECT(src,
"insufficient frame buffer size. Need %d, got %d",
src->image_bytes_in, src->image_bytes_in);
return GST_FLOW_ERROR;
}