Git Product home page Git Product logo

ccameracontrol's Introduction

CCameraControl

Full name is Chinese Camera Control or CGI Camera Control - use the one you like more Java wrapper aimed to control chinese IP Cameras which use CGI-BIN and command set like the one described here: http://www.themadhermit.net/wp-content/uploads/2013/03/FI9821W-CGI-Commands.pdf

Cameras from Foscam, Wanscam, ... etc.

NOTE: project still in development; any part of it could be changed without warning. Watch 'dev' branch for latest changes.

Getting Started

Start camera instance as simple as:

	IPCamera camera = new IPCamera("192.168.0.201", 80, "admin", "admin");

then get respective camera service and perform needed action.

Example one - getting image properties, changing them and setting back:

	VideoService service=camera.getVideoService();
	ImageProperties props=service.getImageProperties();
	System.out.println(props);
	props.setBrightness(70);;
	props.setFlipMode(StringState.DISABLED);
	props.setOptimization(VideoOptimization.FRAMERATE);
	props.setMirrorMode(StringState.ENABLED);
	service.setImageProperties(props);
	System.out.println(props);

Example two - getting list of available wireless networks:

	NetworkService service=camera.getNetworkService();
	System.out.println(service.scanWirelessNetworks());

Example three - getting and changing camera time:

	SystemService service=camera.getSystemService();
	ServerTime time = service.getServerTime();
	time.setDaylightModeStatus(StringState.ENABLED);
	ZoneId zid=ZoneId.of(CameraTimeZone.EUROPE_MOSCOW.stringValue());
	ZonedDateTime zdt=ZonedDateTime.now(zid);
	time.setDateTime(zdt);
	ServerTime changed= service.getServerTime();
	System.out.println("check:" + changed);

Example four - backing camera settings up:

	byte []data=cam.getSystemService().getBackupData();
	System.out.println(data.length);
	try (FileOutputStream fileOuputStream = new FileOutputStream("backup.bin")) {
	  fileOuputStream.write(data);
	} catch (IOException e) {
	  e.printStackTrace();
	}

TODOS

  • Not all requests and responses implemented - needs to be done

All subject-related notes and comments are welcome!

ccameracontrol's People

Contributors

d2edev avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.