* http://www.gnu.org/copyleft/gpl.html *
**********************************************************************/
-#include <strings.h>
+#include <string.h>
#include "test.h"
log ("Testing meta\n");
- libvlc_exception_init (&ex);
- vlc = libvlc_new (argc, argv, &ex);
- catch ();
+ vlc = libvlc_new (argc, argv);
+ assert (vlc != NULL);
- media = libvlc_media_new (vlc, "samples/meta.sample", &ex);
- catch ();
+ media = libvlc_media_new_path (vlc, "samples/meta.sample");
+ assert( media );
- /* Tell that we are interested in this precise meta data
- * This is needed to trigger meta data reading
- * (the first calls return NULL) */
- artist = libvlc_media_get_meta (media, libvlc_meta_Artist, &ex);
- catch ();
+ libvlc_media_parse (media);
- free (artist);
-
- /* Wait for the meta */
- while (!libvlc_media_is_preparsed (media, &ex))
- {
- catch ();
- usleep (10000);
- }
-
- artist = libvlc_media_get_meta (media, libvlc_meta_Artist, &ex);
- catch ();
+ artist = libvlc_media_get_meta (media, libvlc_meta_Artist);
const char *expected_artist = "mike";