예제 #1
0
파일: player.go 프로젝트: jteeuwen/go-vlc
// SetFullscreen switches from fullscreen to windowed mode or vice-versa.
// This applies only to non-embedded video outputs.
//
// Note: With most window managers, only a top-level windows can be in
// full-screen mode. Hence, this function will not operate properly if
// Player.SetXWindow() was used to embed the video in a non-top-level window.
// In that case, the embedding window must be reparented to the root window
// /before/ fullscreen mode is enabled. You will want to reparent it back to its
// normal parent when disabling fullscreen.
func (this *Player) SetFullscreen(toggle bool) error {
	if this.ptr == nil {
		return syscall.EINVAL
	}

	if toggle {
		C.libvlc_set_fullscreen(this.ptr, 1)
	} else {
		C.libvlc_set_fullscreen(this.ptr, 0)
	}

	return checkError()
}
예제 #2
0
파일: player.go 프로젝트: henrym/go-vlc
// SetFullscreen switches from fullscreen to windowed mode or vice-versa.
// This applies only to non-embedded video outputs.
//
// Note: With most window managers, only a top-level windows can be in
// full-screen mode. Hence, this function will not operate properly if
// Player.SetXWindow() was used to embed the video in a non-top-level window.
// In that case, the embedding window must be reparented to the root window
// /before/ fullscreen mode is enabled. You will want to reparent it back to its
// normal parent when disabling fullscreen.
func (this *Player) SetFullscreen(toggle bool) error {
	if this.ptr == nil {
		return &VLCError{"Player is nil"}
	}

	if toggle {
		C.libvlc_set_fullscreen(this.ptr, 1)
	} else {
		C.libvlc_set_fullscreen(this.ptr, 0)
	}

	return checkError()
}