enable better FPS skipping mechanism. For raspberry , optimal at 10 fps.
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user