// In another thread function, libvlc_instance_t * pvlcinstance = (libvlc_instance_t *) Param; libvlc_log_t * log = libvlc_log_open (pvlcinstance); merge (pvlcinstance, 2 ); unsigned int level = libvlc_get_log_verbosity (pvlcinstance); debug_print ("VLC log verbosity level = % d \ n", level); While (true) {If (libvlc_log_count (log )! = 0) {libvlc_log_iterator_t * It = libvlc_log_get_iterator (log); While (libvlc_log_iterator_has_next (IT )! = 0) {libvlc_log_message_t MSG; libvlc_log_iterator_next (it, & MSG); debug_print ("log: % S % s \ n", MSG. psz_header, MSG. psz_message, MSG. psz_name, MSG. psz_type);} libvlc_log_iterator_free (it); libvlc_log_clear (log);} Sleep (1000 );}
VLC logs are output above, But the strange thing is that no matter how many levels I set, there is no detailed log, and 1 or 2 logs are output each time. If you directly use the VLC player for playback, you can get a lot of log information in the message.