Standard event types will occur under what circumstances

I’m having trouble programming after samples/09_camera_jpeg_capture.

When I delete the original CaptureConsumerThread and use a class I wrote that also inherits from ConsumerThread, the event queue has more EVENT_TYPE_ CAPTURE_STARTED instead of EVENT_TYPE_CAPTURE_COMPLETE in the event queue and it doesn’t work properly.

So I would like to know under what circumstances the standard event type will appear, or how to check to solve the current problem.

We have the option to disable CaptureConsumerThread:

{ "disable-jpg", 0, NULL, OPTION_DISABLE_JPEG_ENCODE },

If should work fine if you clean code related to CaptureConsumerThread.

Or another approach is to clean CaptureConsumerThread and and PreviewConsumerThread. And directly put the code in

bool ConsumerThread::threadExecute();

To replace processV4L2Fd() with your implementation.

Hello Dane,
Thanks for your reply!

I’ve disabled CaptureConsumerThread using the option you mentioned, but the problem about event still persists.
Your current suggestion might work, but it involves too many modifications for me.

perhaps you could tell me under what circumstances EVENT_TYPE_CAPTURE_COMPLETE would be generated in the message queue?

EVENT_TYPE_ CAPTURE_STARTED is that capture request is registered to receive frame data in CSI port. Once it is done, EVENT_TYPE_ CAPTURE_COMPLETE is set. If it fails, EVENT_TYPE_ ERROR is set.

Are you able to successfully run the default 09 sample? Or you may also try 10, 13 and frontend samples.

Hello Dane,
Thank you for sharing.

I’m able to run default 09 sample.
I modified some details and found that if the number of consumers which fetching events from the message queue is odd, the program will run normally. Otherwise, a certain consumer will only get EVENT_TYPE_CAPTURE_STARTED for a long time.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.