[vlc-devel] libvlc_MediaMetaChanged event being sent too soon

Jason Butler jbutler at hcn-inc.com
Mon Jul 12 21:43:32 CEST 2010


I tried examining the meta_type field in 
libvlc_event_t->media_meta_changed but it was almost always 
libvlc_meta_ArtworkURL and I never got a /libvlc_meta_Artist/,/ 
ibvlc_meta_Title/, or /libvlc_meta_Album/.

On 10-07-10 10:31 AM, Pierre d'Herbemont wrote:
> On Sat, Jul 10, 2010 at 1:17 AM, Jason Butler<jbutler at hcn-inc.com>  wrote:
>    
>> I am using libvlc 1.1.0 to play an audio steam on Linux. I want to get the
>> title, album, and artist every time the track changes so I am hooking up a
>> callback function to the libvlc_MediaMetaChanged event. The problem is when
>> the stream starts playing the libvlc_MediaMetaChanged event is sent serveral
>> times before all the track meta data is valid. If I call
>>   libvlc_media_get_meta(m,libvlc_meta_Artist), or
>> libvlc_media_get_meta(m,libvlc_meta_Album) too soon then I get a segment
>> fault.  I thought about waiting for the libvlc_MediaPlayerPlaying event but
>> libvlc_MediaMetaChanged event is still sent several times before the album
>> and artist data is valid.
>>
>> Is there a way to check if the artist and album data is valid before calling
>>   libvlc_media_get_meta?
>>      
> There is the meta_type field in the libvlc_event_t that describes what
> meta (artist...) has changed. This should be what your are looking
> for.
>
> Pierre.
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> http://mailman.videolan.org/listinfo/vlc-devel
>    

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20100712/a8bc9ccf/attachment.html>


More information about the vlc-devel mailing list