Skip to content

High CPU Consumption #419

Description

@yashrajsapra

Describe the bug
RTSPPusher class consumes 100% CPU during frame processing due to non-blocking pop() method in FrameContainerQueueAdapter causing continuous polling loops.
To Reproduce
Steps to reproduce the behavior:

Add RTSPPusher module to the processing pipeline

Expected behavior
RTSPPusher should process frames efficiently without consuming excessive CPU resources. The pop() method should block until data is available instead of continuously polling.

Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):

OS: [e.g. Linux Ubuntu 20.04]
Version [e.g. GCC 9.4.0]
Cuda Version [e.g. 11.2]
Architecture [e.g. x86_64]

Additional context

The issue occurs in FrameContainerQueueAdapter::pop() method
Current implementation uses try_pop() which returns immediately when no data is available
This causes consumer threads to spin continuously in tight loops
The fix involves changing from non-blocking try_pop() to blocking pop() call
Related to H264FrameDemuxer processing pipeline

Would you like to work on the issue?
This issue has been identified and fixed. The solution involves modifying the FrameContainerQueueAdapter::pop() method to use proper blocking behavior instead of non-blocking polling.

Metadata

Metadata

Assignees

Labels

P1Priority 1bugSomething isn't working

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions