示例#1
0
文件: media.go 项目: henrym/go-vlc
// SubItems returns subitems of this media instance. This will increment
// the reference count of this media instance. Use MediaList.Release() to
// decrement the reference count.
func (this *Media) SubItems() (*MediaList, error) {
	if this.ptr == nil {
		return nil, &VLCError{"Media is nil"}
	}

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

	return nil, checkError()
}
示例#2
0
文件: media.go 项目: egelmex/go-vlc
// SubItems returns subitems of this media instance. This will increment
// the reference count of this media instance. Use MediaList.Release() to
// decrement the reference count.
func (this *Media) SubItems() (*MediaList, error) {
	if this.ptr == nil {
		return nil, os.EINVAL
	}

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

	return nil, checkError()
}