libvlc_media_parsed_status_skipped for local mp3 file

This forum is about all development around libVLC.
chundermike
New Cone
New Cone
Posts: 4
Joined: 18 Feb 2024 19:46

libvlc_media_parsed_status_skipped for local mp3 file

Postby chundermike » 18 Feb 2024 20:00

Hi,

I am trying to extract metadata from a local mp3 file, but libvlc_media_get_parsed_status just returns libvlc_media_parsed_status_skipped. Callback function is executed and event type is libvlc_MediaParsedChanged. As parsed status is libvlc_media_parsed_status_skipped, any call to libvlc_media_get_meta with any meta type returns null string.

Any ideas why it's skipping meta data extraction? The mp3 file is found by libvlc_media_new_location, and I know it contains mp3 tag data.

Thanks in advance,
Mike.

Code snippet :

Code: Select all

volatile bool got_meta; void metadata_cb(const struct libvlc_event_t* ev, void* p_data) { cout << "ev->type = " << ev->type << endl; got_meta = true; } void MediaClass::GetMetadata(const char *filename) { libvlc_media_t* m; cout << "filename : " << filename << endl; got_meta = false; m = libvlc_media_new_location (inst, filename); libvlc_event_manager_t* ev = libvlc_media_event_manager(m); int err = libvlc_event_attach(ev, libvlc_MediaParsedChanged, metadata_cb, nullptr); int err2 = libvlc_event_attach(ev, libvlc_MediaMetaChanged, metadata_cb, nullptr); if (libvlc_media_parse_with_options(m, libvlc_media_parse_local, 0) == 0) { while (!got_meta); // wait until got meta data libvlc_media_parsed_status_t s = libvlc_media_get_parsed_status(m); char* str = libvlc_media_get_meta(m, libvlc_meta_Artist); if (str) cout << "str = " << string(str) << endl; } }

chundermike
New Cone
New Cone
Posts: 4
Joined: 18 Feb 2024 19:46

Re: libvlc_media_parsed_status_skipped for local mp3 file

Postby chundermike » 27 Feb 2024 22:57

vlclib_media_parse() works ok, vlclib_media_parse_with_options() doesn't.


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 8 guests