mirror of
https://github.com/PhotonVision/photonvision
synced 2026-07-01 02:41:42 +00:00
Websocket Stream Stats & Robustness Improvements (#605)
* wip support for a stats overlay * WIP adding stream stats. But.... eeeh. Corporate. * kbits over mbytes * A ton more tweaks: - Increased thread priority for streaming to reduce "stutter/slow" issues - revised client side URL creation order to prevent the possibility of repeat-identical URL's - Improved overlay to only be visible on mouseover, and fully centered in the screen * wpiformat on js
This commit is contained in:
@@ -18,7 +18,6 @@
|
||||
package org.photonvision.vision.videoStream;
|
||||
|
||||
import java.nio.ByteBuffer;
|
||||
import java.util.Base64;
|
||||
import java.util.concurrent.locks.Lock;
|
||||
import java.util.concurrent.locks.ReentrantLock;
|
||||
import java.util.function.Consumer;
|
||||
@@ -77,16 +76,6 @@ public class SocketVideoStream implements Consumer<Frame> {
|
||||
oldSchoolServer.accept(frame);
|
||||
}
|
||||
|
||||
public String getJPEGBase64EncodedStr() {
|
||||
String sendStr = null;
|
||||
jpegBytesLock.lock();
|
||||
if (jpegBytes != null) {
|
||||
sendStr = Base64.getEncoder().encodeToString(jpegBytes.toArray());
|
||||
}
|
||||
jpegBytesLock.unlock();
|
||||
return sendStr;
|
||||
}
|
||||
|
||||
public ByteBuffer getJPEGByteBuffer() {
|
||||
ByteBuffer sendStr = null;
|
||||
jpegBytesLock.lock();
|
||||
|
||||
Reference in New Issue
Block a user