示例#1
0
文件: player.go 项目: jteeuwen/go-vlc
// SetSubtitle sets the current subtitle track.
func (this *Player) SetSubtitle(s int) (err error) {
	if this.ptr == nil {
		return syscall.EINVAL
	}

	if C.libvlc_video_set_spu(this.ptr, C.int(s)) != 0 {
		err = checkError()
	}

	return
}
示例#2
0
文件: player.go 项目: henrym/go-vlc
// SetSubtitle sets the current subtitle track.
func (this *Player) SetSubtitle(s int) (err error) {
	if this.ptr == nil {
		return &VLCError{"Player is nil"}
	}

	if C.libvlc_video_set_spu(this.ptr, C.int(s)) != 0 {
		err = checkError()
	}

	return
}