[vlc-devel] [PATCH] Adding metadata support to web-plugin

Rémi Denis-Courmont remi at remlab.net
Sat Sep 19 17:19:34 CEST 2009


Le mardi 15 septembre 2009 12:26:54 Besnard Jean-Baptiste, vous avez écrit :
> On lun., 2009-09-14 at 18:37 +0300, Rémi Denis-Courmont wrote:
> > Please use static const table to match so many pairs of strings and
> 
> integers.
> 
> 
> Hi,
> 
> Here is an updated version using a "static const table" to factorize a
> little bit.

In retrospect, I don't understand why you are passing a string at all, instead 
of exporting the enumeration to the caller and passing an integer. I might be 
missing something.

In any case...

+        while (!libvlc_media_is_preparsed (media, p_e) && i < 500)
+        {

This is not an appropriate to wait for an asynchronous event:

+            /* Here we wait for the meta */
+            msleep (10000);
+            i++;
+        }

Also, what happens in error cases? Are we sure that is-preparsed always become 
eventually true?

-- 
Rémi Denis-Courmont
http://www.remlab.net/



More information about the vlc-devel mailing list