Video Streaming Server
Sat Aug 12 15:37:12 CEST 2006
lang er wrote:
> 1. We need connect to many different kinds of video devices, some of
> these device vendors provide communication protocols to us, and we can
> implement them in native Erlang code. But some vendors only provide
> SDK(no source code), so should we use linked-in Port Drivers? And If
> SDK use native OS thread, are there any problems?If there are, How can
> we get out of these problems? or What is the best way to use these
> SDKs in Erlang?
I would suggest to use each vendor's SDK in a separate process running
a C program, and communicate with these processes over local sockets.
The C program can translate the video to a vendor-neutral protocol. This
avoids any potential conflicts over threads or other resources within a
process, which you might not be able to solve without source code. It
also means that any instability in a vendor's code can be worked around;
if its process crashes then you can restart it, and you can also restart
it periodically to avoid potential memory leaks.
I don't know whether the inability to use shared memory to communicate
with the Erlang program would result in performance problems; probably
not if the video streams are coming over a network to start with.
David Hopwood <david.nospam.hopwood@REDACTED>
More information about the erlang-questions