log ("Testing media_list\n");
- libvlc_exception_init (&ex);
vlc = libvlc_new (argc, argv);
assert (vlc != NULL);
ml = libvlc_media_list_new (vlc);
assert (ml != NULL);
- md1 = libvlc_media_new (vlc, "/dev/null");
+ md1 = libvlc_media_new_path (vlc, "/dev/null");
assert (md1 != NULL);
- md2 = libvlc_media_new (vlc, "/dev/null");
+ md2 = libvlc_media_new_path (vlc, "/dev/null");
assert (md2 != NULL);
- md3 = libvlc_media_new (vlc, "/dev/null");
+ md3 = libvlc_media_new_path (vlc, "/dev/null");
assert (md3 != NULL);
ret = libvlc_media_list_add_media (ml, md1);
assert ( libvlc_media_list_item_at_index (ml, 2) == md3 );
- /* test if give exceptions, when it should */
- /* have 4 items, so index 4 should give exception */
+ /* test if give errors, when it should */
+ /* have 4 items, so index 4 should give error */
ret = libvlc_media_list_remove_index (ml, 4);
assert (ret == -1);
p_non_exist = libvlc_media_list_item_at_index (ml, -1);
assert (p_non_exist == NULL);
- md4 = libvlc_media_new (vlc, "/dev/null");
+ md4 = libvlc_media_new_path (vlc, "/dev/null");
assert (md4 != NULL);
/* try to find non inserted item */
libvlc_media_list_release (ml);
libvlc_release (vlc);
- catch ();
}
int main (void)