[FFmpeg-devel] [Patch] no_delay option for librtmp

Michael Niedermayer michaelni at gmx.at
Fri Feb 27 11:42:02 CET 2015


On Thu, Feb 26, 2015 at 11:32:06PM -0600, Cary Tetrick wrote:
> It looks like #include <netinet/tcp.h> might work BUT
> According to this page http://linux.die.net/man/7/tcp
> it looks like this socket setting is not truly portable. :(
> My intent was to offer some flexibility in what looks like a long standing
> problem with rtmp streaming.

well, if something is not available on all platforms then it needs
to be tested for in configure, the header for example is not
available in mingw it seems.
And then the code needs to be under the appropriate #if
to avoid breaking build when the header or symbol is not available
#if HAVE_TCP_NODELAY or whatever



> For my purposes, I can get by with changes I made to rtmpdump.
> My sincere apologies for wasting your time.
> 
> On Thu, Feb 26, 2015 at 9:29 PM, Michael Niedermayer <michaelni at gmx.at>
> wrote:
> 
> > On Thu, Feb 26, 2015 at 08:00:49PM -0600, Cary Tetrick wrote:
> > > No, i just extended what Brian already had. Just an option to to control
> > > the no delay. I put the changes inside you #if for networking config.
> >
> > you misunderstood my question
> >
> > my question is what #includes it needs and if this is portable and
> > available on all platforms which support CONFIG_NETWORK?
> >
> > there certainly is something missing as it does not build.
> >
> > libavformat/librtmp.c: In function ‘rtmp_open’:
> > libavformat/librtmp.c:246:52: error: ‘TCP_NODELAY’ undeclared (first use
> > in this function)
> > libavformat/librtmp.c:246:52: note: each undeclared identifier is reported
> > only once for each function it appears in
> > make: *** [libavformat/librtmp.o] Error 1
> >
> >
> > [...]
> > > > > +
> > > > > +    if (flags & AVIO_FLAG_WRITE) {
> > > > > +        int tmp = ctx->tcp_nodelay;
> > > > > +        setsockopt(r->m_sb.sb_socket, IPPROTO_TCP, TCP_NODELAY,
> > &tmp,
> > > > sizeof(tmp));
> > > >
> > > > does this need any #includes, any checks in configure?
> > > >
> > > > [...]
> > > >
> > > > --
> > > > Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
> > > >
> > > > Freedom in capitalist society always remains about the same as it was
> > in
> > > > ancient Greek republics: Freedom for slave owners. -- Vladimir Lenin
> > > >
> > > > _______________________________________________
> > > > ffmpeg-devel mailing list
> > > > ffmpeg-devel at ffmpeg.org
> > > > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> > > >
> > > >
> > > _______________________________________________
> > > ffmpeg-devel mailing list
> > > ffmpeg-devel at ffmpeg.org
> > > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> > >
> >
> > --
> > Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
> >
> > Everything should be made as simple as possible, but not simpler.
> > -- Albert Einstein
> >
> > _______________________________________________
> > ffmpeg-devel mailing list
> > ffmpeg-devel at ffmpeg.org
> > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> >
> >
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Avoid a single point of failure, be that a person or equipment.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20150227/f2046f5a/attachment.asc>


More information about the ffmpeg-devel mailing list