Example #1
0
// Insert adds a media instance to the list at the given position.
//
// Note: MediaList.Lock() SHOULD be held upon entering this function.
func (this *MediaList) Insert(m *Media, pos int) error {
	if this.ptr == nil || m.ptr == nil {
		return &VLCError{"MediaList is nil"}
	}

	C.libvlc_media_list_insert_media(this.ptr, m.ptr, C.int(pos))
	return checkError()
}
Example #2
0
// Insert adds a media instance to the list at the given position.
//
// Note: MediaList.Lock() SHOULD be held upon entering this function.
func (this *MediaList) Insert(m *Media, pos int) error {
	if this.ptr == nil || m.ptr == nil {
		return syscall.EINVAL
	}

	C.libvlc_media_list_insert_media(this.ptr, m.ptr, C.int(pos))
	return checkError()
}