[vlc-devel] net_Read in modules/access/udp.c and __net_Read in src/network/udp.c

Anand Anand taknevski at gmail.com
Fri Sep 7 04:45:22 CEST 2007


Hi,

Sorry I found the answer you can ignore my previous mail. pf_block is being
called in this way
in stream.c:
pf_block(p_access);

in function AReadBlock which is in turn called in a for loop by
AStreamPrebufferBlock.

thanks
anand





On 9/7/07, Anand Anand <taknevski at gmail.com> wrote:
>
> Hi,
>
> Thanks immensely once again. I would be very grateful if you could tell me
> in which file and which function in the source code pf_block is being called
> repeatedly till EOF because I cant seem to find it.
>
> I understand the concept of callbacks --basically passing the function as
> an argument to another function... however i still think somewhere the
> callback function must still receive an argument.. I think it will be clear
> if I see the way pf_block is being called..
>
> thanks
> anand
>
>  On 9/7/07, Rémi Denis-Courmont <rdenis at simphalempin.com> wrote:
> >
> > Le jeudi 6 septembre 2007 18:13, Anand Anand a écrit:
> > > Thanks for the prompt reply. I understand that BlockUDP is called by
> > > BlockPrebufferRTP in a for loop.. so for rtp streams the datagrams are
> > > being received datagram by datagram.. however for raw udp streams I
> > dont
> > > see the recv function being called(BlockUDP) in a while or for loop?
> > Am i
> > > missing something?
> >
> > pf_block is called repeatedly by LibVLC core input code until
> > the "end-of-file".
> >
> > > Another question is regarding this statement:
> > > p_access->pf_block = BlockRTP
> >
> > > how is it that no arguments are being passed to the function? shouldnt
> > > p_access be passed as an argument to the function or where is it
> > implied?
> >
> > Hmm, this is a function pointer (pf_*), a.k.a. a callback. Do you know C
> >
> > language syntax?
> >
> > > are the BlockRTP and BlockUDP functions being run continuously in a
> > thread
> > > somewhere?
> >
> > Basically, yes.
> >
> > > is there some good book on vlc development?
> >
> > No.
> >
> > --
> > Rémi Denis-Courmont
> > http://www.remlab.net/
> >
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20070907/d7d9df62/attachment.html>


More information about the vlc-devel mailing list