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

	C.libvlc_media_list_add_media(this.ptr, m.ptr)
	return checkError()
}
Example #2
0
// Add adds a media instance to this list.
//
// Note: MediaList.Lock() SHOULD be held upon entering this function.
func (this *MediaList) Add(m *Media) error {
	if this.ptr == nil || m.ptr == nil {
		return os.EINVAL
	}

	C.libvlc_media_list_add_media(this.ptr, m.ptr)
	return checkError()
}