diff --git a/README.md b/README.md index dc83d36f..efd2529c 100644 --- a/README.md +++ b/README.md @@ -29,11 +29,11 @@ Complete documentation, API, examples, tutorials and many more can be found here com.github.sarxos webcam-capture - 0.3.6 + 0.3.7 ``` -If you are not using Maven, then **[here](http://www.sarxos.pl/repo/maven2/com/github/sarxos/webcam-capture/0.3.6/webcam-capture-0.3.6-dist.zip)** +If you are not using Maven, then **[here](http://www.sarxos.pl/repo/maven2/com/github/sarxos/webcam-capture/0.3.7/webcam-capture-0.3.7-dist.zip)** you can download ZIP containing all required 3rd-party JARs. ## Examples diff --git a/webcam-capture-drivers/webcam-capture-driver-ipcam/README.md b/webcam-capture-drivers/webcam-capture-driver-ipcam/README.md index 71565fe8..54e326ee 100644 --- a/webcam-capture-drivers/webcam-capture-driver-ipcam/README.md +++ b/webcam-capture-drivers/webcam-capture-driver-ipcam/README.md @@ -27,7 +27,7 @@ help :) Later, when your class is ready, I will be happy to merge it with offici com.github.sarxos webcam-capture-driver-ipcam - 0.3.6 + 0.3.7 ``` diff --git a/webcam-capture-drivers/webcam-capture-driver-jmf/README.md b/webcam-capture-drivers/webcam-capture-driver-jmf/README.md index 9513c2e7..69829dd5 100644 --- a/webcam-capture-drivers/webcam-capture-driver-jmf/README.md +++ b/webcam-capture-drivers/webcam-capture-driver-jmf/README.md @@ -14,11 +14,11 @@ installed on your PC. com.github.sarxos webcam-capture-driver-jmf - 0.3.6 + 0.3.7 ``` -If you are not using Maven, then **[here](http://www.sarxos.pl/repo/maven2/com/github/sarxos/webcam-capture-driver-jmf/0.3.6/webcam-capture-driver-jmf-0.3.6-dist.zip)** +If you are not using Maven, then **[here](http://www.sarxos.pl/repo/maven2/com/github/sarxos/webcam-capture-driver-jmf/0.3.7/webcam-capture-driver-jmf-0.3.7-dist.zip)** you can download ZIP containing all required 3rd-party JARs. ## License diff --git a/webcam-capture-pages/src/site/index.html b/webcam-capture-pages/src/site/index.html index 1f377d65..be7eebd9 100644 --- a/webcam-capture-pages/src/site/index.html +++ b/webcam-capture-pages/src/site/index.html @@ -31,7 +31,7 @@

Webcam Capture

Download:
@@ -100,7 +100,7 @@

Maven

<dependency> <groupId>com.github.sarxos</groupId> <artifactId>webcam-capture</artifactId> - <version>0.3.6</version> + <version>0.3.7</version> </dependency> @@ -388,13 +388,106 @@

Display Image From IP / Network Camera

f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); +

More IP / network camera examples are available in Github project's page. +

+ + +

Development Troubleshooting

+ +

+In the development phase you will probably kill running application many +time (by stop button in Eclipse, Netbeans or other IDE), or by calling +kill -TERM <pid> command from CLI. You have to be aware that +killing running application when Webcam Capture is already running can have +unwanted side-effects, such as: +

+ + + +

+All those issues arose from the same root cause - memory has not been +properly deallocated in the native layer. That's because you killed application +instead of closing it gracefully. +

+ +

+However, there is a solution for this problem. For such purpose special TERM +signal handler has been implemented, and you can enable it before you actually +start using Webcam Capture API. This can be done by calling this code (please +make sure to call it before you use any other method!): +

+ +
+Webcam.setTermSignalHandler(true);
+
+ +

+IMPORTANT NOTE! This is development setting and shall not be used +in production code!!! It modified the way of how JVM terminates its process, so +depending on the system there can be some unknown side-effects. Also features used +in this handler are undocumented and can be removed in further Java releases +without prior notification. +

+

Logging

-

Logging (Logback via SLF4J) is already there, so you can enable it simply by adding -logback.xml configuration file somewhere in your filesystem and calling: +

+Logging has been implemented via SLF4J API, so all you need to do +is to add specific implementation and create configuration file. +

+ +

Logging Example With Logback Library

+ +

+This paragraph describes in short how to use Logback +to enable logs from Webcam Capture API. +

+ +

+Go to Logback home page and download +ZIP files containing all required JARs. Extract ZIP and add those files into +your classpath: +

+ + + +

+NOTE! The [version] is current Logback release signature (e.g. 1.0.9). +

+ +

+Create logback.xml file and put this content inside: +

+ +
+<configuration scan="true" scanPeriod="30 seconds">
+	<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
+		<layout class="ch.qos.logback.classic.PatternLayout">
+			<Pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</Pattern>
+		</layout>
+	</appender>
+	<root level="debug">
+		<appender-ref ref="STDOUT" />
+	</root>
+</configuration>
+
+ +

+When you include this file in your classpath, it will be discovered +automatically, but you can also load it manually by calling:

@@ -407,14 +500,18 @@ 

More Examples?

There are more examples available in src/example, don't forget to check them - please follow to the Github Project's Page where Webcam Capture -source code is stored! +source code is stored! Here are the examples links:

+

License

-

Copyright (C) 2012 Bartosz Firyn

+

Copyright (C) 2012 - 213 Bartosz Firyn

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:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

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.