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
[email protected]
http://lists.saillard.org/mailman/listinfo/pwc

Reply via email to