diff options
| author | 2026-04-13 17:36:54 -0400 | |
|---|---|---|
| committer | 2026-04-13 17:36:54 -0400 | |
| commit | 4ceadc74f0086168fbc576032ba3e6f23af16e39 (patch) | |
| tree | a542703d78f2b29ac1a756fdceec78e40860bab0 /src/buffer/video.c | |
| parent | 77b54c35bf9587450cd636e0d7df37e190e28bfb (diff) | |
| download | camu-4ceadc74f0086168fbc576032ba3e6f23af16e39.tar.gz camu-4ceadc74f0086168fbc576032ba3e6f23af16e39.tar.bz2 camu-4ceadc74f0086168fbc576032ba3e6f23af16e39.zip | |
Changes that went uncommitted for too long
Signed-off-by: Andrew Opalach <andrew@akon.city>
Diffstat (limited to 'src/buffer/video.c')
| -rw-r--r-- | src/buffer/video.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/buffer/video.c b/src/buffer/video.c index 93356ac..5a469a4 100644 --- a/src/buffer/video.c +++ b/src/buffer/video.c @@ -15,10 +15,17 @@ // MARK_LOW is considered directly after reading a frame, so in other words, // it will trigger at the point where there is about (LOW+1) frames left. Even at // something like 240fps that's still ~(4.16*(LOW+1))ms to uncork and produce a new frame. +#ifdef CAMU_HUGE_VIDEO_BUFFER +#define BUFFER_MARK_LOW 24 +#define BUFFER_MARK_BUFFERED 36 // Must be >1. +#define BUFFER_MARK_HIGH 48 +#define BUFFER_MARK_RESET (BUFFER_MARK_HIGH * 2) +#else #define BUFFER_MARK_LOW 4 #define BUFFER_MARK_BUFFERED 6 // Must be >1. #define BUFFER_MARK_HIGH 8 #define BUFFER_MARK_RESET (BUFFER_MARK_HIGH * 2) +#endif bool camu_video_buffer_init(struct camu_video_buffer *buf, struct camu_clock *clock) { @@ -125,7 +132,7 @@ static bool push_av_frame_internal(struct camu_video_buffer *buf, AVFrame *frame f64 base_pts = atomic_load(f64)(&buf->pts, AL_ATOMIC_ACQUIRE); f64 duration = camu_ff_frame_duration(frame) * av_q2d(stream->time_base); if (!buf->single_frame && frame_is_late(buf->clock, base_pts, pts, duration)) { - log_debug("Discarding late frame with PTS %f.", pts); + log_trace("Discarding late frame with PTS %f.", pts); return false; } if (base_pts == -1.0) atomic_store(f64)(&buf->pts, pts, AL_ATOMIC_RELEASE); |