pwc
[Top] [All Lists]

Re: [pwc] control motorized pwc using java

Subject: Re: [pwc] control motorized pwc using java
From: Christopher Friedt <>
Date: Wed, 30 Jan 2008 23:24:37 +0100
I don't think that it's possible to do ioctl's in java. You could always 
try writing a native class and access it through jni, just remember to 
report exceptions properly :)

~/Chris

David N. Lombard wrote:
> Hisam - wrote:
>> hi,
>> i want to build webcam controller using logitech quickcam in java. I 
>> using javax-usb. But i have some problem, i don't know how to control 
>> motorize the camera. is  to control the motorize camera using control 
>> data type?
> 
> Well, the ioctl() for the camera does provide for pan and tilt controls. 
>   So, assuming you can do that from Java, you should be fine.  Here are 
> the controls in my distro's of pwc-ioctl.h:
> 
>   /* Defines and structures for Motorized Pan & Tilt */
>   #define PWC_MPT_PAN             0x01
>   #define PWC_MPT_TILT            0x02
>   #define PWC_MPT_TIMEOUT         0x04 /* for status */
> 
>   /* Set angles; when absolute != 0, the angle is absolute and the
>      driver calculates the relative offset for you. This can only
>      be used with VIDIOCPWCSANGLE; VIDIOCPWCGANGLE always returns
>      absolute angles.
>    */
>   struct pwc_mpt_angles
>   {
>          int absolute;           /* write-only */
>          int pan;                /* degrees * 100 */
>          int tilt;               /* degress * 100 */
>   };
> 
>   /* Range of angles of the camera, both horizontally and vertically.
>    */
>   struct pwc_mpt_range
>   {
>           int pan_min, pan_max;           /* degrees * 100 */
>           int tilt_min, tilt_max;
>   };
> 
>   struct pwc_mpt_status
>   {
>           int status;
>           int time_pan;
>           int time_tilt;
>   };
> 
> 
> I have patches for camstream-0.26.3 to support pan and tilt.
> 
_______________________________________________
pwc mailing list

http://lists.saillard.org/mailman/listinfo/pwc

<Prev in Thread] Current Thread [Next in Thread>
Admin

Disclaimer: Neither Andrew Taylor nor the University of NSW School of Computer and Engineering take any responsibility for the contents of this archive. It is purely a compilation of material sent by many people to the birding-aus mailing list. It has not been checked for accuracy nor its content verified in any way. If you wish to get material removed from the archive or have other queries about the archive e-mail Andrew Taylor at this address: andrewt@cse.unsw.EDU.AU