camclnt - A Remote Camera Control Client

This program (camclnt) can be used in conjunction with the devserv program to control pan/tilt cameras and a video switcher. The camclnt program provides the user interface to the remote camera control system. Camclnt is a java application that runs in Java 2.0. You will need a java virtual machine to run it. The easiest way to do this is to install the Java Developers Kit (JDK 1.2). If the JDK 1.2 is not available for your platform (e.g., freeBSD), you can use JDK 1.1. We have recently added support for the Java Media Framework (JMF) from Sun for viewing the video. However, the JMF is only currently available for Solaris and Windows 95/98/NT so starting with v1.0, there are two versions of camclnt--with and without built-in JMF support. If you are using the JMF-enabled version of camclnt, you need to also have JMF 2.0 installed. If you are not using the JMF-enabled version, a separate video tool such as vic is needed to view the video.

The devserv program communicates with the devices in the camera system using RS-232. Currently the devserv program can control the Canon VC-C3 and the Sony EVI-D30 cameras and the Panasonic WJ-MX50 video switcher. A separate video tool (such as vic) is required to capture and transmit the video at the server site.

Camclnt communicates with the device server (devserv) using ASCII text messages. The messaging format is available from our WWW site at http://www-itg.lbl.gov/mbone/devserv/Remcam.txt. Camclnt sends its messages to the device server using the UDP protocol and the server sends all return communication using multicast messages.

Compiling and Running

We have packaged and archived the camera client to make it easier to run. Included in the distribution are some files that will aid in compiling and running the camera client.

If you want to run the camera client from a shell script

To compile a new version of the remote camera client a Makefile is provided. To compile the client use the target camclnt
% make camclnt
Before compiling you might want to first use
% make cleana (to 'make clean all')

The camera client default values for # of cameras and for remote server (where devserv is running) can be changed by editing the file CamClnt/camInterface.java. If you wish to have output displayed (as for stepping through the source code), you can change the default value of the "DEBUG" variable to true. The only values that you should need to change are near the top of the file and are the following.

  // THE FOLLOWING VARIABLES PROVIDE DEFAULT VALUES FOR SOME THINGS
  // THAT YOU MIGHT WANT TO CUSTOMIZE TO YOUR SITE
  String curaddr = "localhost";  // default address for devserv
  private static final int defaultnumcams = 3; //the number of cameras to assume
  private static final boolean DEBUG = false;  // set to true for output display
  // END SITE CUSTOMIZATION SECTION

The Interface

The client interface can be broken into different areas by function so I will describe each one individually. At the top of the interface is a menu bar. Selecting "File" will allow you to "Quit" the camera client. Selecting "Help" gives you two options "About" and "Info" which both give you helpful information about running the camclnt program.

You can start camclnt with or without specifying the host name for the devserv (see the options above). If no devserv host is specified, "localhost" is used as the default. If a host name is specified, "localhost" is replaced by the host specified on the command line. When camclnt starts up it sends a multicast query to discover what devservs are running on which hosts. If replies are received, camclnt creates a menu of devserv host names. Clicking on "Select" displays this menu. When you choose a host from this menu, the host name is displayed in the textfield to the right of the "Select" button.

If the current devserv is "localhost," the default devices are three cameras and one videoswitcher. When you choose a devserv, camclnt configures the window according to the number and types of devices that are controlled by that devserv. If the selected devserv supports more than 1 camera (or if you specify that there is more than one camera when you start up camclnt), a section directly below the menu bar will be displayed to allow you to select the camera to view, to move and to show in the picture-in-picture.

The next section provides the means of requesting camera moves and of requesting a picture-in-picture. The white rectangle labeled "camera's pan/tilt range" represents the camera's entire pan-and-tilt range. Selecting with the left mouse button in this rectangle causes a message to be sent to devserv requesting that the camera move to the absolute position requested. Selecting with the right mouse button in this rectangle requests the camera to move relative to the current position. The square on the right (labeled "camera image") is a representation of the image that you see in the camera. As of this release we have not yet implemented the interface to the actual camera image so you have to imagine that the camera image is shown in this square. Selecting with the left mouse button in the square will cause the camera to center the location picked. If instead the user holds down the left mouse button while drawing out a square the camera will zoom in on the area drawn out. The right mouse button in this square allows the user to request picture-in-picture. If the user holds down the right mouse button while drawing out a square on the image, the picture-in-picture will be shown in the square drawn out. To turn off picture-in-picture simply press the right mouse button in the square and release without moving the mouse. To translate the picture-in-picture (while you are displaying the picture-in-picture) hold down the right mouse button on the image and move the mouse the direction and distance you would like the picture translated.

Directly below this area is the zoom control. The slider in the center can be used to request absolute zoom positions and the buttons to either side are for requesting incremental 1x zoom changes.

The field at the bottom of the interface is for specifying which machine is running the devserv. All remote camera control requests will be sent to the IP address of the machine specified in this field.

JMF-enabled version

Clicking on the "Display Video" button in the main window (on the right) brings up a menu with three items: Address Settings, Player, and Choose Source. Clicking on the "Address Settings" menu item brings up a panel for setting the video address, port, and time-to-live. If the selected devserv is transmitting video, camclnt automatically completes this information. Clicking on "Choose Source" brings up a menu of all the video sources that are transmitting to the address and port displayed in the "Address Settings" panel. If no sources are detected, it will say "No participants/sources." If there is only one source, a separate "Player Window" to present the (the window on the left) video will automatically be started. If there are multiple sources, the user needs to select the source from the selected devserv host. The current release does not allow switching sources; we are planning to add this feature in the next release. Also, we have not yet implemented the "Player" menu item functionality or audio capabilities. Left-clicking on the JMF player window sends a fractional pan/tilt request to the selected devserv (i.e., the camera is centered to the location picked). Dragging the left mouse while it is down zooms the camera in. Right-clicking creates a picture-in-picture image or turns it off if a picture-in-picture view is already showing. You can change the size of the video image by using the shift key + left mouse click.

Communication

Each remote camera movement request sent from the client is sent as a UDP message to the server. This means that some requests may be lost before they reach the server so the user may need to re-request the movement. The server sends back status messages using IP Multicast but currently the client ignores these messages.
Introduction to the MBone Page
Please also visit the
Lawrence Berkeley National Laboratory Home Page. Distributed Systems Department Home Page. Distributed Collaboratoratories Home Page.

This document was last updated on March 03, 2000, and is located at http://www-itg.lbl.gov/OldMisc/mbone/devserv/README.camclnt.html.

To report Web page problems, e-mail webmaster-george@george.lbl.gov.

Support Credits identify the funding sources and the organizational context of the work described in this document.

Privacy and site security notice to Users .

Deb Agarwal (DAAgarwal@lbl.gov) and Marcia Perry (mperry@george.lbl.gov) are responsible for this WWW document.