Exemplo n.º 1
0
// Release decreases the reference count of the instance and destroys it
// when it reaches zero.
func (this *Player) Release() (err error) {
	if this.ptr == nil {
		return syscall.EINVAL
	}

	C.libvlc_media_player_release(this.ptr)
	return
}
Exemplo n.º 2
0
// Release decreases the reference count of the instance and destroys it
// when it reaches zero.
func (this *Player) Release() (err error) {
	if this.ptr == nil {
		return &VLCError{"Player is nil"}
	}

	C.libvlc_media_player_release(this.ptr)
	return
}
Exemplo n.º 3
0
func (p *Player) Release() error {
	if p.player == nil {
		return nil
	}

	if p.media != nil {
		if err := p.media.Release(); err != nil {
			return err
		}

		p.media = nil
	}

	C.libvlc_media_player_release(p.player)
	return getError()
}