diff --git a/TBF/BenchControl/Network/Camera/CLP1611/Camera.cs b/TBF/BenchControl/Network/Camera/CLP1611/Camera.cs index 64cd0faef..feee1d2c2 100644 --- a/TBF/BenchControl/Network/Camera/CLP1611/Camera.cs +++ b/TBF/BenchControl/Network/Camera/CLP1611/Camera.cs @@ -437,7 +437,21 @@ namespace TBF.BenchControl.Network.Camera.CLP1611 { scpClient.Connect(); - if (sdCardVer.Length > 0 && sdCardVer[0] == '1') + DirectoryInfo dirInfo = null; + if (sdCardVer.Length > 0) + { + switch (sdCardVer[0]) + { + case '1': + dirInfo = new DirectoryInfo(Path.Combine(System.Windows.Forms.Application.StartupPath, "CameraBinaryFiles")); + break; + case '2': + dirInfo = new DirectoryInfo(Path.Combine(System.Windows.Forms.Application.StartupPath, "CameraBinaryFiles2")); + break; + } + } + + if (dirInfo != null) { /// /// Synchronize files in camera /home/tbf/clp directory with the files in "TBF/CameraBinaryFiles" project folder @@ -446,7 +460,6 @@ namespace TBF.BenchControl.Network.Camera.CLP1611 { sshClient.Connect(); - DirectoryInfo dirInfo = new DirectoryInfo(Path.Combine(System.Windows.Forms.Application.StartupPath, "CameraBinaryFiles")); SHA1 sha1calculator = SHA1.Create(); StringBuilder sha1str = new StringBuilder(); @@ -467,14 +480,14 @@ namespace TBF.BenchControl.Network.Camera.CLP1611 { /// Copy a file to the camera if SHA1 sum is different of the file is missing log.InfoFormat("{0}, IP={1}, Uploading file {2}", Name, IPAddress, fi.Name); - scpClient.Upload(fi, string.Format("clp/{0}", fi.Name)); + scpClient.Upload(fi, string.Format("~/clp/{0}", fi.Name)); } } if (!sha1sumResponse.Contains(fi.Name)) { /// Change file properties if it was a new file - string command = string.Format("chmod 755 clp/{0}", fi.Name); + string command = string.Format("chmod 755 ~/clp/{0}", fi.Name); log.InfoFormat("{0}, IP={1}, Executing command '{2}'", Name, IPAddress, command); sshClient.CreateCommand(command).Execute(); @@ -723,8 +736,10 @@ namespace TBF.BenchControl.Network.Camera.CLP1611 { int wid = hiRes ? 1280 : 640; int hgh = hiRes ? 960 : 480; - string command = string.Format("/opt/vc/bin/raspivid -t 0 -cd MJPEG -w {0} -h {1} -fps 30 -b 8000000 -o - | gst-launch-1.0 fdsrc ! \"image/jpeg,framerate=30/1\" ! jpegparse ! rtpjpegpay ! udpsink host={2} port={3}", - wid, hgh, NetAdapter.IPAddress, rtpUdpLocalPort); + string command = string.Format("/opt/vc/bin/raspivid -t 0 -cd MJPEG -w {0} -h {1} -fps 30 -b 8000000 -o - | gst-launch-1.0 fdsrc ! \"image/jpeg,framerate=30/1\" ! jpegparse ! rtpjpegpay ! udpsink host={2} port={3}", + wid, hgh, NetAdapter.IPAddress, rtpUdpLocalPort); + //string command = string.Format("~/userland/build/bin/raspivid -t 0 -cd MJPEG -w {0} -h {1} -fps 30 -b 8000000 -o - | gst-launch-1.0 fdsrc ! \"image/jpeg,framerate=30/1\" ! jpegparse ! rtpjpegpay ! udpsink host={2} port={3}", + // wid, hgh, NetAdapter.IPAddress, rtpUdpLocalPort); return new LiveStreamOp(this, Telnet, command); } diff --git a/TBF/CameraBinaryFiles2/DiscoveryDaemon b/TBF/CameraBinaryFiles2/DiscoveryDaemon new file mode 100644 index 000000000..f76365945 Binary files /dev/null and b/TBF/CameraBinaryFiles2/DiscoveryDaemon differ diff --git a/TBF/CameraBinaryFiles2/GrabImage b/TBF/CameraBinaryFiles2/GrabImage new file mode 100644 index 000000000..4298d9b4a Binary files /dev/null and b/TBF/CameraBinaryFiles2/GrabImage differ diff --git a/TBF/CameraBinaryFiles2/Measurement b/TBF/CameraBinaryFiles2/Measurement new file mode 100644 index 000000000..6ab0505a6 Binary files /dev/null and b/TBF/CameraBinaryFiles2/Measurement differ diff --git a/TBF/CameraBinaryFiles2/RoiDetection b/TBF/CameraBinaryFiles2/RoiDetection new file mode 100644 index 000000000..e330e4262 Binary files /dev/null and b/TBF/CameraBinaryFiles2/RoiDetection differ diff --git a/TBF/CameraBinaryFiles2/hrlivestream.sh b/TBF/CameraBinaryFiles2/hrlivestream.sh new file mode 100644 index 000000000..49ef3e3b6 --- /dev/null +++ b/TBF/CameraBinaryFiles2/hrlivestream.sh @@ -0,0 +1 @@ +/opt/vc/bin/raspivid -o - -t 0 | /usr/bin/cvlc stream:///dev/stdin --sout "#rtp{sdp=rtsp://:8554/}" :demux=h264 diff --git a/TBF/CameraBinaryFiles2/livestream.sh b/TBF/CameraBinaryFiles2/livestream.sh new file mode 100644 index 000000000..0d330c379 --- /dev/null +++ b/TBF/CameraBinaryFiles2/livestream.sh @@ -0,0 +1 @@ +/opt/vc/bin/raspivid -w 640 -h 480 -fps 30 -o - -t 0 | /usr/bin/cvlc stream:///dev/stdin --sout "#rtp{sdp=rtsp://:8554/}" :demux=h264 diff --git a/TBF/CameraBinaryFiles2/mjpegrtpstream.sh b/TBF/CameraBinaryFiles2/mjpegrtpstream.sh new file mode 100644 index 000000000..d3faaeca1 --- /dev/null +++ b/TBF/CameraBinaryFiles2/mjpegrtpstream.sh @@ -0,0 +1,2 @@ +/opt/vc/bin/raspivid -t 0 -cd MJPEG -w 1280 -h 960 -fps 30 -b 8000000 -o - | gst-launch-1.0 fdsrc ! "image/jpeg,framerate=40/1" ! jpegparse ! rtpjpegpay ! udpsink host=192.168.0.200 port=20000 + diff --git a/TBF/TBF.csproj b/TBF/TBF.csproj index 473db90f2..7a68c1e7c 100644 --- a/TBF/TBF.csproj +++ b/TBF/TBF.csproj @@ -3459,6 +3459,27 @@ Always + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + + + Always + Designer