summaryrefslogtreecommitdiff
path: root/src/buffer/video.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/buffer/video.c')
-rw-r--r--src/buffer/video.c9
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);