Skip to content

Commit 6a8a2f6

Browse files
committed
WebSocket transport example
1 parent 646f426 commit 6a8a2f6

File tree

15 files changed

+396
-4
lines changed

15 files changed

+396
-4
lines changed

webcam-capture-drivers/driver-ipcam/pom.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
<dependency>
1919
<groupId>junit</groupId>
2020
<artifactId>junit</artifactId>
21-
<version>4.11</version>
2221
<scope>test</scope>
2322
</dependency>
2423
<!-- uncomment to debug wire log from httpclient -->

webcam-capture-drivers/driver-ipcam/src/examples/java/JpegDasdingStudioExample.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
import com.github.sarxos.webcam.WebcamPanel;
1212
import com.github.sarxos.webcam.ds.ipcam.IpCamDriver;
1313
import com.github.sarxos.webcam.ds.ipcam.IpCamStorage;
14-
import com.github.sarxos.webcam.log.WebcamLogConfigurator;
1514

1615

1716
/**
@@ -41,8 +40,6 @@ public class JpegDasdingStudioExample {
4140

4241
public static void main(String[] args) throws MalformedURLException {
4342

44-
WebcamLogConfigurator.configure("src/examples/resources/cameras.xml");
45-
4643
JFrame f = new JFrame("Dasding Studio Live IP Cameras Demo");
4744
f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
4845
f.setLayout(new GridLayout(0, 3, 1, 1));

webcam-capture-examples/pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
<module>webcam-capture-swt-awt</module>
3131
<module>webcam-capture-video-recording</module>
3232
<module>webcam-capture-onejar</module>
33+
<module>webcam-capture-websockets</module>
3334
</modules>
3435

3536
<build>
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Webcam WebSockets Example
2+
3+
This example demonstrates how images feed can be transported over the WebSocket.
4+
5+
## What Is This
6+
7+
8+
## Screenshoots
9+
10+
11+
## License
12+
13+
Copyright (C) 2015 Bartosz Firyn
14+
15+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
16+
17+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
18+
19+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
2+
3+
<modelVersion>4.0.0</modelVersion>
4+
5+
<parent>
6+
<groupId>com.github.sarxos</groupId>
7+
<artifactId>webcam-capture-examples</artifactId>
8+
<version>0.3.11-SNAPSHOT</version>
9+
</parent>
10+
11+
<artifactId>webcam-capture-example-websockets</artifactId>
12+
<packaging>jar</packaging>
13+
14+
<name>Webcam Capture - WebSockets Example</name>
15+
<description>Example demonstrating how to transmit images over WebSockets from webcam server to the web application frontend</description>
16+
17+
<dependencies>
18+
<dependency>
19+
<groupId>com.github.sarxos</groupId>
20+
<artifactId>webcam-capture-driver-ipcam</artifactId>
21+
<version>${project.version}</version>
22+
</dependency>
23+
<dependency>
24+
<groupId>org.eclipse.jetty.aggregate</groupId>
25+
<artifactId>jetty-all</artifactId>
26+
<version>9.2.7.v20150116</version>
27+
</dependency>
28+
<dependency>
29+
<groupId>org.slf4j</groupId>
30+
<artifactId>slf4j-simple</artifactId>
31+
<version>1.7.2</version>
32+
</dependency>
33+
<dependency>
34+
<groupId>com.fasterxml.jackson.core</groupId>
35+
<artifactId>jackson-databind</artifactId>
36+
<version>2.5.1</version>
37+
</dependency>
38+
</dependencies>
39+
40+
</project>
920 KB
Loading
523 KB
Loading
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<script src="https://code.jquery.com/jquery-1.11.2.min.js"></script>
5+
<script src="ws.js"></script>
6+
<link rel="stylesheet" type="text/css" href="style.css">
7+
</head>
8+
<body>
9+
<div class='wrapper'>
10+
<h1>webcam websocket transport example</h1>
11+
<div id="webcams"></div>
12+
</div>
13+
</body>
14+
</html>
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
2+
.wrapper {
3+
margin-left: auto;
4+
margin-right: auto;
5+
width: 1084px;
6+
text-align: center;
7+
}
8+
9+
img {
10+
margin-left: 8px;
11+
margin-bottom: 8px;
12+
width: 348px;
13+
height: 198px;
14+
box-shadow: 0 0 16px #444;
15+
border: 1px solid #fff;
16+
}
15.8 KB
Loading

0 commit comments

Comments
 (0)