Exemplo n.º 1
0
// Events returns an event manager for this player.
func (this *Player) Events() (*EventManager, error) {
	if this.ptr == nil {
		return nil, syscall.EINVAL
	}

	if c := C.libvlc_media_player_event_manager(this.ptr); c != nil {
		return NewEventManager(c), nil
	}

	return nil, checkError()
}
Exemplo n.º 2
0
// Events returns an event manager for this player.
func (this *Player) Events() (*EventManager, error) {
	if this.ptr == nil {
		return nil, &VLCError{"Player is nil"}
	}

	if c := C.libvlc_media_player_event_manager(this.ptr); c != nil {
		return NewEventManager(c), nil
	}

	return nil, checkError()
}