I'v just written example web application which generates live WebM
stream:
https://github.com/ziutek/gst/blob/master/examples/live_webm.go
I tested it with Firefox and it works fine (although buffering at the
beginning takes too much time).
This simple applications contains some hacks to use the same port for
HTML and WebM stream. Is there good way to do this with http package
or should I provide stream on different port?
During writing I probably find some bug in net package (weekly.
2011-07-19):
According to net.TCPConn.File documentation:
"File returns a copy of the underlying os.File, set to blocking mode.
It is the caller's responsibility to close f when finished. Closing c
does not affect f, and closing f does not affect c."
I need to Dup file descriptor and after this close f and c because
streaming is served by the gstreamer multifdsink thread, and I don't
need f and c any more. But I can only close f without affects to the
communication. If I close c (and f isn't closed) connection is closed
and multifdsink can't stream on file descriptor passed to it. So
closing c affects f.
Workaround is to save c in map and close it when multifdsink signal
that connection should be closed.