Exemplo n.º 1
0
// Media returns the media currently associated with this player.
func (this *Player) Media() (*Media, error) {
	if this.ptr == nil {
		return nil, syscall.EINVAL
	}

	if c := C.libvlc_media_player_get_media(this.ptr); c != nil {
		return &Media{c}, nil
	}

	return nil, checkError()
}
Exemplo n.º 2
0
// Media returns the media currently associated with this player.
func (this *Player) Media() (*Media, error) {
	if this.ptr == nil {
		return nil, &VLCError{"Player is nil"}
	}

	if c := C.libvlc_media_player_get_media(this.ptr); c != nil {
		return &Media{c}, nil
	}

	return nil, checkError()
}