Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
cb478e8b4d | |||
![]() |
0e93c0cafb |
4
go.mod
4
go.mod
@ -1,5 +1,5 @@
|
||||
module git.milar.in/milarin/mpvipc
|
||||
module git.tordarus.net/tordarus/mpvipc
|
||||
|
||||
go 1.21.5
|
||||
|
||||
require git.milar.in/milarin/channel v0.1.1
|
||||
require git.tordarus.net/tordarus/channel v0.1.1
|
||||
|
@ -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")
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user