Esempio n. 1
0
// 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()
}
Esempio n. 2
0
// 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()
}