cloud-game/pkg/api/worker.go
sergystepanov e3b16d5feb Use client-side stream vertical flip
Previously we used zero-cost x264 `X264_CSP_VFLIP` and vpx
`vpx_img_flip` for OpenGL cores (which render their output buffers
upside down). Now the flip is handled client-side during GPU compositing
of the video stream.
This will be needed later, when we have to use more codecs and
Gstreamer.
2026-06-13 17:53:37 +03:00

73 lines
1.6 KiB
Go

package api
type (
ChangePlayerRequest struct {
StatefulRoom
Index int `json:"index"`
}
ChangePlayerResponse int
GameQuitRequest StatefulRoom
LoadGameRequest StatefulRoom
LoadGameResponse string
ResetGameRequest StatefulRoom
ResetGameResponse string
SaveGameRequest StatefulRoom
SaveGameResponse string
StartGameRequest struct {
StatefulRoom
Record bool
RecordUser string
Game string `json:"game"`
PlayerIndex int `json:"player_index"`
}
GameInfo struct {
Alias string `json:"alias"`
Base string `json:"base"`
Name string `json:"name"`
Path string `json:"path"`
System string `json:"system"`
Type string `json:"type"`
}
StartGameResponse struct {
Room
AV *AppVideoInfo `json:"av"`
Record bool `json:"record"`
KbMouse bool `json:"kb_mouse"`
}
RecordGameRequest struct {
StatefulRoom
Active bool `json:"active"`
User string `json:"user"`
}
RecordGameResponse string
TerminateSessionRequest Stateful
WebrtcSignalRequest struct {
Stateful
Sdp *string `json:"sdp,omitempty"`
Ice *string `json:"ice,omitempty"`
}
InitWebrtcStreamRequest struct {
// Stateful
Id string `json:"id"`
Initiator bool `json:"initiator"`
Sdp string `json:"sdp,omitempty"`
}
InitWebrtcStreamResponse string
AppVideoInfo struct {
W int `json:"w"`
H int `json:"h"`
S int `json:"s"`
A float32 `json:"a"`
Flip bool `json:"flip,omitempty"`
}
LibGameListInfo struct {
T int
List []GameInfo
}
PrevSessionInfo struct {
List []string
}
)