Build Ground Station / build (push) Successful in 37s
Drive two independent visual layers per display target from one shared video presence signal: the fullscreen fallback/menu canvas below video and a transparent, input-transparent OSD overlay above video, reserved as the future flight OSD rendering surface. WFB and video decode stay out of the UI process; pilot video keeps rendering priority.
24 lines
865 B
Go
24 lines
865 B
Go
package display
|
|
|
|
// OSDTemplate is the flight OSD layout of a display target: a transparent,
|
|
// input-transparent surface above pilot video, reserved as the future OSD
|
|
// rendering surface. It presents nothing yet and never draws the fallback:
|
|
// the OSD is a telemetry surface, not a video substitute, and WFB or video
|
|
// decode never move into the UI process to feed it. Flight telemetry
|
|
// rendering arrives in later Ground Station work; the shared presence keeps
|
|
// the OSD on the same video lifecycle as the fallback canvas, so the session
|
|
// redraws it on every presence transition.
|
|
type OSDTemplate struct {
|
|
video *VideoPresence
|
|
}
|
|
|
|
// NewOSDTemplate builds the OSD surface for a target.
|
|
func NewOSDTemplate(video *VideoPresence) OSDTemplate {
|
|
return OSDTemplate{video: video}
|
|
}
|
|
|
|
func (t OSDTemplate) Draw(canvas Canvas) {
|
|
canvas.Clear()
|
|
canvas.Flush()
|
|
}
|