javacv icon indicating copy to clipboard operation
javacv copied to clipboard

CPU utilization

Open mappedbyte opened this issue 2 years ago • 4 comments

I use javacv to convert RTSP to RTMP, but in the process of using it, I find that the CPU occupation rate is very high. In this process, I use frame. Later, I learned that avpacket can be used, but I need to use face recognition in this process and draw it on the graph

mappedbyte avatar Apr 08 '22 09:04 mappedbyte

For the frame object used, do I need to recycle it manually by using the close () method?

mappedbyte avatar Apr 08 '22 09:04 mappedbyte

The close() method won't do anything when it doesn't own itself like this. You can call it if you want.

saudet avatar Apr 08 '22 09:04 saudet

When the Frame is no longer used, will it recycle itself

mappedbyte avatar Apr 08 '22 09:04 mappedbyte

It gets deallocated when the owner, in this case FFmpegFrameGrabber, is closed.

saudet avatar Apr 08 '22 10:04 saudet