Skip to content

Commit

Permalink
omxplayer.go: set priority to -15
Browse files Browse the repository at this point in the history
  • Loading branch information
Cezary Sobczak committed Nov 29, 2021
1 parent 137c0ca commit 5c93571
Showing 1 changed file with 1 addition and 15 deletions.
16 changes: 1 addition & 15 deletions omxplayer.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,6 @@ func New(url string, args ...string) (player *Player, err error) {
return
}

//err = setOmxplayerPriority(cmd.Process.Pid)
//if err != nil {
// return
//}

err = setupDbusEnvironment()
if err != nil {
return
Expand Down Expand Up @@ -163,18 +158,9 @@ func execOmxplayer(url string, args ...string) (cmd *exec.Cmd, err error) {
log.Debug("omxplayer: starting omxplayer process")

args = append(args, url)
tmp := []string{"-n", "-5", exeOxmPlayer}
tmp := []string{"-n", "-15", exeOxmPlayer}
tmp = append(tmp, args...)
cmd = exec.Command("nice", tmp...)
err = cmd.Start()
return
}

func setOmxplayerPriority(pid int) (err error) {
log.Debug("omxplayer: setup priority")

args := []string{"-5", string(pid)}
cmd := exec.Command("renice", args...)
err = cmd.Run()
return
}

0 comments on commit 5c93571

Please sign in to comment.