[vlc-devel] [PATCH] Media library core

Rémi Denis-Courmont rem at videolan.org
Mon Dec 28 10:45:45 CET 2009


Le lundi 28 décembre 2009, Srikanth Raju a écrit :
> Hello,
> I've attached new patches. I've split up the patch into two pieces.
> The first is just the vlc_media_library.h header file. The second
> includes the core.
>
> Things that need looking into:
> * The general API in the header file. Most of the functions are
> simple helpers, so it's not really important to look at the
> implementation in too much detail. What I'm looking for is a holistic
> review.

Don't add new typedefs to vlc_common.h. This is historical.

Also don't define identifiers with leading underscores.
The C standard reserves those for the run-time.

And don't cut&paste the atomic reference counting code. If you really 
need to invent your own, then factor it out. But I really don't 
understand why you need this.

> * ml_gc_incref and ml_gc_decref. These rely on a garbage collecting
> loop in the module that tests if refs = 1 and then releases the
> object if so. Is testing the refs "ok" by anything other than the
> vlc_gc functions?

That won't work as the test and release is not an atomic operation.

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



More information about the vlc-devel mailing list