-
-
Notifications
You must be signed in to change notification settings - Fork 269
Open
Description
I noticed that when I was watching a served mjpeg stream or reading a jpeg sink, the maximum fps I would see was around 62-63 fps, despite the source being 120 or 144fps. If I switched to a raw sink, I would read at the expected fps.
I traced this to this line that sets the interval for run->refresher:
ustreamer/src/ustreamer/http/server.c
Line 206 in 472673e
| interval.tv_usec = 16000; // ~60fps |
It seems like instead we should be doing something like the following, but wasn't 100% sure about it:
uint fps_to_use=0
if (stream->cap->desired_fps > 0) {
fps_to_use=stream->cap->desired_fps;
} else {
fps_to_use=stream->cap->run->hw_fps;
}
if (fps_to_use>0) {
interval.tv_usec = 1000000 / (fps_to_use * 2);
} else {
interval.tv_usec = 16000; // ~60fps
}
Metadata
Metadata
Assignees
Labels
No labels