Connect to Remote Camera via IP and Port

1 vote · 1 comment

Tom Gibara, released some public-domain code ('The code is public domain. I make no warranty as to its fitness for any particular purpose.') which can easily be used to connect to a remote WebCam over IP and Port (for example to your Desktop PC).

raw ·
copy
· download
CameraSource cs = new RemoteCamera("192.168.0.100", 9889, 320, 240); if (!cs.open()) { /* deal with failure to obtain camera */ } else { while(/*some condition*/) { cs.capture(canvas); //capture the frame onto the canvas } } cs.close();
Add a comment

1 Comment

Excuse me... I want to use android device to view remote android cam. I use the http://www.tomgibara.com/android/camera-source-v0/RemoteCamera.java code. But it show many error. ex: 1.public void capture(Canvas canvas) show remove @override AND implements a supertype method 2.public class Getview implements CameraSource show CameraSource cannot be resolved a type....

And I have no idea where to add the code upper of this page...

Any example work fine??

Thx...

Reply · March 24, 2011, 8:35 a.m.