Esempio n. 1
func NewDisplay(title string, width, height int) (*Display, error) {
	d := Display{frame: make(chan *C.AVFrame)}
	d.width =
	d.height =
	d.screen = C.SDL_SetVideoMode(d.width, d.height, 0, 0)
	d.overlay = C.SDL_CreateYUVOverlay(d.width, d.height, C.SDL_IYUV_OVERLAY, d.screen)
	t := C.CString(title)
	C.SDL_WM_SetCaption(t, (*C.char)(null))
	return &d, nil
Esempio n. 2
// This function creates a video output overlay
// Calling the returned surface an overlay is something of a misnomer because
// the contents of the display surface underneath the area where the overlay
// is shown is undefined - it may be overwritten with the converted YUV data.
func CreateYUVOverlay(width, height int, format uint32,
	display *C.SDL_Surface) *C.SDL_Overlay {
	return C.SDL_CreateYUVOverlay(,,
		C.Uint32(format), display)