Compare commits
3 Commits
a8d277ee3d
...
abdfc8e2de
| Author | SHA1 | Date | |
|---|---|---|---|
| abdfc8e2de | |||
| 3b029febbd | |||
| e16624b88a |
+10
-10
@@ -60,6 +60,7 @@ func printCliHelp(fs *pflag.FlagSet) {
|
|||||||
fmt.Printf("%s %s\n", APP_NAME, APP_VER)
|
fmt.Printf("%s %s\n", APP_NAME, APP_VER)
|
||||||
fmt.Println("Usage: mxl-player [-d <domain>] [-v <uuid>] [-a <uuid>] [options]")
|
fmt.Println("Usage: mxl-player [-d <domain>] [-v <uuid>] [-a <uuid>] [options]")
|
||||||
fmt.Println(" [-g <gpu-id>] [-p <playback-id>] [--verbose]")
|
fmt.Println(" [-g <gpu-id>] [-p <playback-id>] [--verbose]")
|
||||||
|
fmt.Println(" or: mxl-player [--playlist <playlist.json]")
|
||||||
fmt.Println(" or: mxl-player [--list-playback] [--list-gpu]")
|
fmt.Println(" or: mxl-player [--list-playback] [--list-gpu]")
|
||||||
fmt.Println(" or: mxl-player (and set everything in GUI)")
|
fmt.Println(" or: mxl-player (and set everything in GUI)")
|
||||||
fmt.Println()
|
fmt.Println()
|
||||||
@@ -348,7 +349,7 @@ func main() {
|
|||||||
audioDomainStr string = args.AudioDomain
|
audioDomainStr string = args.AudioDomain
|
||||||
videoStr string = args.VideoFlowId
|
videoStr string = args.VideoFlowId
|
||||||
audioStr string = args.AudioFlowId
|
audioStr string = args.AudioFlowId
|
||||||
showStats bool = true
|
showStats bool = false
|
||||||
)
|
)
|
||||||
videoActive := args.VideoFlowId != ""
|
videoActive := args.VideoFlowId != ""
|
||||||
audioActive := args.AudioFlowId != ""
|
audioActive := args.AudioFlowId != ""
|
||||||
@@ -508,9 +509,9 @@ func main() {
|
|||||||
sdl.SetWindowFullscreen(windowHandler, fullscreen)
|
sdl.SetWindowFullscreen(windowHandler, fullscreen)
|
||||||
resized = true
|
resized = true
|
||||||
case sdl.KeyF1:
|
case sdl.KeyF1:
|
||||||
showStats = !showStats
|
|
||||||
case sdl.KeyF2:
|
|
||||||
settingsWindowState = !settingsWindowState
|
settingsWindowState = !settingsWindowState
|
||||||
|
case sdl.KeyF2:
|
||||||
|
showStats = !showStats
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
gui.ProcessEvent(&event)
|
gui.ProcessEvent(&event)
|
||||||
@@ -589,10 +590,9 @@ func main() {
|
|||||||
gui.BeginFrame(time.Since(lastFrame), int32(r.Extent().Width), int32(r.Extent().Height))
|
gui.BeginFrame(time.Since(lastFrame), int32(r.Extent().Width), int32(r.Extent().Height))
|
||||||
snapshot, hasSnapshot := player.Controller.Snapshot()
|
snapshot, hasSnapshot := player.Controller.Snapshot()
|
||||||
if showStats {
|
if showStats {
|
||||||
cimgui.SetNextWindowPos(cimgui.Vec2{X: 10, Y: 10})
|
cimgui.SetNextWindowPos(cimgui.Vec2{X: 0, Y: 0})
|
||||||
cimgui.SetNextWindowSize(cimgui.Vec2{X: 460, Y: 510})
|
cimgui.SetNextWindowSize(cimgui.Vec2{X: 460, Y: 510})
|
||||||
cimgui.BeginV("Stats", &showStats,
|
cimgui.BeginV("Stats", &showStats, cimgui.WindowFlagsNoResize|cimgui.WindowFlagsNoScrollbar)
|
||||||
cimgui.WindowFlagsNoTitleBar|cimgui.WindowFlagsNoResize|cimgui.WindowFlagsNoScrollbar)
|
|
||||||
mediaStats := player.MediaStats.Snapshot()
|
mediaStats := player.MediaStats.Snapshot()
|
||||||
cimgui.SeparatorText("Video")
|
cimgui.SeparatorText("Video")
|
||||||
if mediaStats.Video.Available {
|
if mediaStats.Video.Available {
|
||||||
@@ -612,13 +612,13 @@ func main() {
|
|||||||
mediaStats.Video.Stride,
|
mediaStats.Video.Stride,
|
||||||
))
|
))
|
||||||
cimgui.Text(fmt.Sprintf(
|
cimgui.Text(fmt.Sprintf(
|
||||||
"FPS: flow %.3f | received %.1f | displayed %.1f",
|
"FPS: flow %.2f | received %.1f | displayed %.1f",
|
||||||
mediaStats.Video.DeclaredFPS,
|
mediaStats.Video.DeclaredFPS,
|
||||||
mediaStats.Video.ReceivedFPS,
|
mediaStats.Video.ReceivedFPS,
|
||||||
fps,
|
fps,
|
||||||
))
|
))
|
||||||
cimgui.Text(fmt.Sprintf(
|
cimgui.Text(fmt.Sprintf(
|
||||||
"Frame dt: source %.3f ms | render loop %.3f ms",
|
"Frame dt: source %.1f ms | render loop %.1f ms",
|
||||||
float64(mediaStats.Video.FrameDT.Microseconds())/1000,
|
float64(mediaStats.Video.FrameDT.Microseconds())/1000,
|
||||||
float64(renderLoopDT.Microseconds())/1000,
|
float64(renderLoopDT.Microseconds())/1000,
|
||||||
))
|
))
|
||||||
@@ -928,8 +928,8 @@ func main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
drawHotkeysSection := func() {
|
drawHotkeysSection := func() {
|
||||||
cimgui.Text("F1 - show/hide stats")
|
cimgui.Text("F1 - show/hide settings")
|
||||||
cimgui.Text("F2 - show/hide settings")
|
cimgui.Text("F2 - show/hide stats")
|
||||||
cimgui.Text("F - toggle fullscreen")
|
cimgui.Text("F - toggle fullscreen")
|
||||||
cimgui.Text("Q or Esc - quit")
|
cimgui.Text("Q or Esc - quit")
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,7 +9,6 @@ Size=251,92
|
|||||||
Collapsed=0
|
Collapsed=0
|
||||||
|
|
||||||
[Window][Stats]
|
[Window][Stats]
|
||||||
Pos=10,10
|
|
||||||
Size=460,510
|
Size=460,510
|
||||||
Collapsed=0
|
Collapsed=0
|
||||||
|
|
||||||
@@ -29,8 +28,8 @@ Size=550,720
|
|||||||
Collapsed=0
|
Collapsed=0
|
||||||
|
|
||||||
[Window][Settings & Info]
|
[Window][Settings & Info]
|
||||||
Pos=1220,0
|
Pos=580,0
|
||||||
Size=700,1080
|
Size=700,720
|
||||||
Collapsed=0
|
Collapsed=0
|
||||||
|
|
||||||
[Window][Seetings & Info]
|
[Window][Seetings & Info]
|
||||||
|
|||||||
BIN
Binary file not shown.
Reference in New Issue
Block a user