[vlc-devel] [PATCH] objects: get the vlc_object_t from vlc_object_internals using vlc_internals()

Rémi Denis-Courmont remi at remlab.net
Tue Jul 25 21:33:56 CEST 2017


Le tiistaina 25. heinäkuuta 2017, 22.25.49 EEST Rémi Denis-Courmont a écrit :
> Le tiistaina 25. heinäkuuta 2017, 20.58.44 EEST Steve Lhomme a écrit :
> > Can you point to doc about that because I couldn't understand how it works
> > in the regular case (and it does). Because my understanding of
> > container_of
> > is that it gives the starting offset of the field in the structure. Except
> > in this case it's the end of the structure.
> 
> Uh? container_of(p,t,m) returns a pointer to a structure of type 't' that
> contains a member 'm', to which 'p' points.
> 
> See MMDevice callbacks for a good example.

Note that I don´t get the relevance of the request, insofar as container_of() 
is not involved here. vlc_internals() uses it, not vlc_externals().

-- 
雷米‧德尼-库尔蒙
https://www.remlab.net/



More information about the vlc-devel mailing list