Disabling error messages from libargus IBufferOutputStream::acquireBuffer

When calling ‘Argus::IBufferOutputStream::acquireBuffer()’, if the function times out it prints an “error” message to stdout (not sure why this is considered an error when it’s part of the API surface). Is there any way to disable this or the other myriad of messages that get printed to stdout?

(Argus) Error Timeout: (propagating from src/api/BufferOutputStreamImpl.cpp, function acquireBuffer(), line 265)

Jetpack 4.4.1 [L4T 32.4.4]

Thanks in advance.

hello brett-williams,

this failure meant something wrong from the low-level side.
is your camera use-case works normally even with the timeout error reported?

Yes it does

hello brett-williams,

interesting, are you reproduce this with default Argus sample or you’ve customized app?

This is a custom app.

hello brett-williams,

there’s an internal timeout setting, error reports if you capture frames longer than 1500ms.
for the special use-case, you may have a try to enable infinite timeout for the camera service,
for example,
$ sudo pkill nvargus-daemon
$ sudo enableCamInfiniteTimeout=1 nvargus-daemon

This doesn’t seem to fix the issue.
I should’ve elaborated more in my original post; If I use long enough timeouts (infinite or what have you) that are greater than the frame period of the camera then I will never see the error message. If I use a timeout of 0 (no timeout), or any timeout amount that causes the call to timeout without retrieving a buffer, then it will print this error message.

that’s due to internal arch design, the timeout error reports if you capture frames longer than 1500ms.

Okay, but that isn’t what’s happening here.

Or can you elaborate on what you mean by “capture frames longer than 1500 ms”?

hello brett-williams,

is this a low-fps camera sensor?
may I also know what’s your actual use-case, what’s your customize app design?

Hi Jerry,

No, it’s not a low-fps sensor, it’s an imx477 configured as 4032x3040 @ 30 fps.

The design is not particularly interesting; It uses a BufferOutputStream, passing NV12 EGLImageBuffers back and forth with the stream. It uses a repeating capture for capturing the frames. Just a single thread that configures Argus and creates the video buffers etc, and it will try to acquire a buffer with a timeout of 0 to check if one is ready. And when it does dequeue a buffer, it will release it back to the stream when its finished with it.

hello brett-williams,

the use-case is output a video stream?
please check Argus::IBufferOutputStream::acquireBuffer to acquired a buffer from the stream with FIFO orders.
you may also see those examples, such as 09_camera_jpeg_capture, and 10_camera_recording.

No, the direct use case of the acquired frames is to use them as texture sources in GLES. But, I don’t see why that would be relevant. I literally just want your library to stop printing internal messages to the console.

hello brett-williams,

no, that’s condition wait for the mutex.
it’ll be some potential risk and difficult to debug the failure if you disable the error reports.

instead of disabling the logs;
you may configure the timeout variable, that’s the amount of time to allow for the acquire.
i.e. virtual Buffer* acquireBuffer(uint64_t timeout = TIMEOUT_INFINITE, Status* status = NULL) = 0;

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