[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:25:49 CEST 2017


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.

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



More information about the vlc-devel mailing list