// At returns the media at the given list position. // This action will increase the reference count on the media instance. // // Note: MediaList.Lock() SHOULD be held upon entering this function. func (this *MediaList) At(pos int) (*Media, error) { if this.ptr == nil { return nil, &VLCError{"MediaList is nil"} } if c := C.libvlc_media_list_item_at_index(this.ptr, C.int(pos)); c != nil { return &Media{c}, nil } return nil, checkError() }
// At returns the media at the given list position. // This action will increase the reference count on the media instance. // // Note: MediaList.Lock() SHOULD be held upon entering this function. func (this *MediaList) At(pos int) (*Media, error) { if this.ptr == nil { return nil, syscall.EINVAL } if c := C.libvlc_media_list_item_at_index(this.ptr, C.int(pos)); c != nil { return &Media{c}, nil } return nil, checkError() }