Smart Record - what does NVDSSR_STATUS_INVALID_OP mean when starting

Occasionally when I call NvDsSRStart I get NVDSSR_STATUS_INVALID_OP as a return code. What does this mean?

I can’t see any info what this means in the smart record header file and the source is not available.
At a guess I think its occurring when my program tries to start smart record before the smart bin has completely removed the muxer and file sink from the pipeline…!?! It seems to occur only after I’ve been recording a lot of smart record files.

Note: this is with my own custom program and not the standard deepstream-test5 - however I used the code from here to get it working…

Also what are the meanings for these smart record context parameters as well:

ctx->recordOn, ctx->resetDone, ctx->isPlaying

Just prior to calling NvDsSRStart I find the values are ctx->recordOn=0, ctx->resetDone=1, ctx->isPlaying=1.
Then after recording is completed and inside the smart record callback I see these values ctx->recordOn=0, ctx->resetDone=0, ctx->isPlaying=1.

Is resetDone still FALSE because during the smart record callback the pipeline is still reconfiguring (inside the smart record bin) to remove the file muxer and filesink? If I waited another 1 seconds maybe then resetDone would be TRUE ?

Why is isPlaying always on?

• Hardware Platform (Jetson / GPU) Jetson Nano
• DeepStream Version 5.0 dev preview

Occasionally when I call NvDsSRStart I get NVDSSR_STATUS_INVALID_OP as a return code. What does this mean?

When either recordOn or resetDone is not true, NvDsSRStart() is called, it will return “NVDSSR_STATUS_INVALID_OP”.
Or, when recordOn is false, NvDsSRStop() is called, it will return “NVDSSR_STATUS_INVALID_OP” also.

ctx->recordOn, ctx->resetDone, ctx->isPlaying

After NvDsSRCreate() is done successsfully, resetDone becomes TRUE
After NvDsSRStart() is done successsfully, recordOn becomes TRUE, and resetDone becomes FALSE
After NvDsSRStop() is done successsfully, recordOn will be FALSE
after end of stream, resetDone becomes TRUE
after NvDsSRDestroy(), all should becomes FALSE.

when pipeline state is GST_STATE_PLAYING, ctx->isPlaying is TRUE.

1 Like