added GetDemuxerCacheTime

This commit is contained in:
milarin 2024-02-22 19:48:21 +01:00
parent ddb1e3af17
commit 0e93c0cafb
1 changed files with 9 additions and 0 deletions

View File

@ -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")
}