Thank you all very much.<br>A working solution give me much confidence.<br>Regards<br><br>James<br><br><div><span class="gmail_quote">2006/8/16, Samuel Rivas <<a href="mailto:samuelrivas@udc.es">samuelrivas@udc.es</a>>:
</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">lang er wrote:<br>> Do you mean a C program reads video stream from device and transfer
<br>> data to Erlang server using local socket, then Erlang server streams<br>> video data to client?<br>><br>> Our server will connect to many devices(if user watch many different<br>> cameras installed on many different devices).By this way, C program
<br>> also need to deal with many concurrent problems. It supposed these<br>> problems should be done in Erlang side, and  there will be little<br>> benefit to reimplement streaming server in Erlang.<br><br>  We have a system that does similar things:
<br><br>  <a href="http://www.lambdastream.com/lambda/products/boxcoder">http://www.lambdastream.com/lambda/products/boxcoder</a><br><br>  For the video sources that can not be properly handled in erlang, it<br>uses a port process, normally written in C. There is no concurrency in
<br>the C side since each source is handled by a different process.<br><br>> Another problem, In surveillance system, QoS( network delay<br>> especially) is very import, I think your solution may introduce some<br>> additional network delay.
<br><br>  Well, a local socket (or using standard input/outuput of the port<br>process) should not introduce a significant delay. I shall suggest to<br>write a small prototype to check if it meet your requirements:<br><br>
  Simply write a C program that reads video from one of your sources and<br>outputs it to the standard output. Then write an erlang program that<br>opens this program as port (with the stream option), reads the output<br>
data, and sends it to a socket. You will have the complete trip<br>device --> SDK port --> erlang --> network.<br><br>> I wonder if this is the standard way Erlang program use external SDK.<br>> I have read some posts in this list, and got a impression that Erlang
<br>> is used in telecommunication device systems and hardware controller<br>> programs. Don't they need interact with SDK(dynamic linked library)?<br><br>  If the system meets the performance requirements, having all external
<br>code running in separated processes is the safest solution. Otherwise you<br>may need linked drivers, but they are much more dangerous.<br><br>  Regards<br>--<br>        Samuel<br></blockquote></div><br>