|
From: Sunny <su...@op...> - 2005-09-16 00:51:23
|
I'm trying to get the CameraInterface working, but all I seem to get
betting back from player is gibberish. Here is a short listing of the
program I'm using:
public static void main(String args[]) {
System.out.println("testing...");
PlayerClient pc = new PlayerClient("host", 6665);
CameraInterface ci = pc.requestInterfaceCamera(0, 'r');
pc.runThreaded(-1,-1);
if (ci != null) System.out.println("CameraInterface good");
while (true) {
ci.readData();
System.out.println("Width: " + ci.getWidth());
System.out.println("Height: " + ci.getHeight());
if (ci.getCompression() ==
CameraInterface.PLAYER_CAMERA_COMPRESS_RAW) {
System.out.println("Compression: RAW");
} else {
System.out.println("Compression: JPEG");
}
System.out.println("Size: " + ci.getImageSize());
System.out.println("--------------------------");
sleep(1000);
}
That is essentially the main part of the test program, it seems simply
enough, but I'm getting values like these back:
Player v.1.6.4
[PlayerClient] : Got response for device 40(camerav4l) with access: r
CameraInterface good
Width: 0
Height: -16384
Compression: RAW
Size: 0
--------------------------
Width: 0
Height: 0
Compression: RAW
Size: -1073741824
--------------------------
Width: 0
Height: 0
Compression: RAW
Size: 0
--------------------------
Width: 0
Height: 0
Compression: RAW
Size: -1073741824
--------------------------
Width: 0
Height: -16384
Compression: JPEG
Size: 49152
--------------------------
I know the camera itself works since I can use it in other programs
(xawtv), so I'm assuming this is a playerstage/javaclient problem.
Any pointers?
thanks,
Sunny
|