// Get returns a media instance from this list. // This action will increase the reference count on the media instance. // // Note: MediaList.Lock() should NOT be held upon entering this function. func (this *MediaList) Get() (*Media, error) { if this.ptr == nil { return nil, &VLCError{"MediaList is nil"} } if c := C.libvlc_media_list_media(this.ptr); c != nil { return &Media{c}, nil } return nil, checkError() }
// Get returns a media instance from this list. // This action will increase the reference count on the media instance. // // Note: MediaList.Lock() should NOT be held upon entering this function. func (this *MediaList) Get() (*Media, error) { if this.ptr == nil { return nil, os.EINVAL } if c := C.libvlc_media_list_media(this.ptr); c != nil { return &Media{c}, nil } return nil, checkError() }