[Live-devel] Question on streams in Windows

temp2010 at forren.org temp2010 at forren.org
Fri Mar 1 04:46:35 PST 2013


Chris,

I've gotten a very similar pipe thing working.  Ross was invaluable in
helping.  Here are two points you may need to recall, to finally get it
working properly.

This advice relates to using H.264.  It may only partially relate to your
application.

1) You must make sure that you're sending both an SPS and a PPS NAL to
Live555 *after* VLC tries to connect.  My initial code wasn't doing this.
 My stream origination used an H.264 encoder that sends these two NAL
records out first, and it was always running.  So when VLC came along,
those two NAL records had long since passed.  I had to use tricks to send
them again *in response* to the VLC connecting.  Aside from Ross knowing it
off the top, before hearing his advice I located this issue by tracing
through the Live555 code and discovering it's refusal to continue without
having seen those two NAL records.

2) With the above, I got video, but it was very choppy.  Again, Ross was
correct in suggesting it had to do with providing a steady stream of input.
 But how to do so was less obvious.  The culprit was partially a lack of
horsepower on one machine to do the full job with the debug-compiled code.
 The other culprit was needing to provide a large enough amount of memory
to the pipe on creation.

Good luck!

On Thu, Feb 28, 2013 at 9:14 PM, Ross Finlayson <finlayson at live555.com>wrote:

> As far as Windows developers who use gmail...I can understand the
> anti-windows sentiment, but I don't know what you have against gmail...
>
>
> This is explained clearly in the FAQ (that everyone was asked to read
> before posting to the mailing list :-)
>
>
> And I code in Windows because I'm paid too...and I know *exactly* how to
> do asynchronous, non-blocking file IO in windows.  Be careful with the word
> "impossible." ;-)
>
>
> The issue with doing asynchronous file reading in Windows is that - in
> Windows - extra work needs to be done to handle the 'data is available on
> the open file' event.  In other OSs, open files are sockets that can be
> passed to "select()", as we do in the the implementation of
> "BasicTaskScheduler" (the "TaskScheduler" subclass that we provide with the
> supplied code).  In (at least some versions of) Windows, however, open
> files are not "select()"able sockets.  Therefore, to do asynchronous file
> reads in Windows, you would need to write your own subclass of
> "TaskScheduler" (that reimplements the "setBackgroundHandling()" virtual
> function).
>
> Ross Finlayson
> Live Networks, Inc.
> http://www.live555.com/
>
>
> _______________________________________________
> live-devel mailing list
> live-devel at lists.live555.com
> http://lists.live555.com/mailman/listinfo/live-devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20130301/3213677c/attachment.html>


More information about the live-devel mailing list