enable better FPS skipping mechanism. For raspberry , optimal at 10 fps.

This commit is contained in:
2024-11-13 09:32:05 +07:00
parent d2f924f5db
commit 19da5914ac
2 changed files with 3 additions and 4 deletions

View File

@@ -33,6 +33,7 @@ public class GrabbingTask implements Runnable {
// for FPS calculation
private int intendedFps = 10;
@SuppressWarnings("SameParameterValue")
private void updateMessage(String message) {
if (onMessageUpdate != null) {
onMessageUpdate.accept(message);
@@ -49,6 +50,7 @@ public class GrabbingTask implements Runnable {
}
}
@SuppressWarnings("SameParameterValue")
private void updateLQBase64(String base64) {
if (onLQBase64Update != null) {
onLQBase64Update.accept(base64);

View File

@@ -71,10 +71,7 @@ public class RtspGrabber {
try{
grabber = FFmpegFrameGrabber.createDefault(rtspUrl);
if (useTcp) grabber.setOption("rtsp_transport", "tcp");
// automatic by RTSP
//grabber.setImageWidth(width);
//grabber.setImageHeight(height);
//grabber.setTimeout(2000);
grabber.setPixelFormat(avutil.AV_PIX_FMT_BGR24);
grabber.start();