Library for IP Camera MJPEG
have not found how to handle the CGI video stream with the library "camera" so I wrote my little personal library ...
MJPEG Video Streams (Network cameras streaming the video in the MJPEG format.)
LIST IP CAM: Webcam / Netcam - Security Video Camera Surveillance Software - CrazyPixels
have not found how to handle the CGI video stream with the library "camera" so I wrote my little personal library ...
MJPEG Video Streams (Network cameras streaming the video in the MJPEG format.)
LIST IP CAM: Webcam / Netcam - Security Video Camera Surveillance Software - CrazyPixels
B4X:
Sub Process_Globals
Dim timer1 As Timer
End Sub
Sub Globals
Dim mycam As Videomjpeg
Dim c As Canvas
Dim p As Panel
Dim DestRect As Rect
End Sub
Sub Activity_Create(FirstTime As Boolean)
If FirstTime =True Then
p.Initialize("p")
p.Color=Colors.LightGray
timer1.Initialize("timer1",250)
timer1.Enabled=True
End If
End Sub
Sub maj_cam
mycam.cam("192.168.2.11",8080,"/videostream.cgi?user=admin&pwd=admin")
p.RemoveView
p.Initialize("p")
p.Color=Colors.LightGray
Activity.AddView(p,50,50,320,240)
c.Initialize(p)
DestRect.Initialize(0,0,p.Width,p.Height)
c.DrawDrawable(mycam.Image,DestRect)
mycam.unbindDrawables(p)
Activity.Invalidate
End Sub
Sub Activity_Resume
p.Initialize("p")
timer1.Enabled=True
End Sub
Sub Activity_Pause (UserClosed As Boolean)
timer1.Enabled=False
End Sub
Sub timer1_tick
maj_cam
End Sub
Attachments
Last edited: