From 0e93c0cafb23ddedecd70358930445311aa15dcd Mon Sep 17 00:00:00 2001 From: milarin Date: Thu, 22 Feb 2024 19:48:21 +0100 Subject: [PATCH] added GetDemuxerCacheTime --- props_get.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/props_get.go b/props_get.go index 6b1ab1a..a997f39 100644 --- a/props_get.go +++ b/props_get.go @@ -58,6 +58,15 @@ func GetDuration(socket string) (time.Duration, error) { return time.Duration(durationInSeconds * float64(time.Second)), nil } +func GetDemuxerCacheTime(socket string) (time.Duration, error) { + cacheInSeconds, err := GetProperty[float64](socket, "demuxer-cache-time") + if err != nil { + return 0, err + } + + return time.Duration(cacheInSeconds * float64(time.Second)), nil +} + func GetPercentPos(socket string) (float64, error) { return GetProperty[float64](socket, "percent-pos") }