OSDN Git Service

1.JMFライブラリのリファクタリング。
[nyartoolkit-and/nyartoolkit-and.git] / trunk / src.utils / jmf / jp / nyatla / nyartoolkit / jmf / utils / sample / JmfCaptureTest.java
index b7437e3..8c035c7 100644 (file)
@@ -48,6 +48,11 @@ public class JmfCaptureTest extends Frame implements JmfCaptureListener
                setBounds(0, 0, 320 + 64, 240 + 64);
                JmfCaptureDeviceList dl=new JmfCaptureDeviceList();
                this._capture=dl.getDevice(0);
+               if(!this._capture.setCaptureFormat(JmfCaptureDevice.PIXEL_FORMAT_RGB,320,240,30.0f)){
+                       if(!this._capture.setCaptureFormat(JmfCaptureDevice.PIXEL_FORMAT_YUV,320,240,30.0f)){
+                               throw new NyARException("キャプチャフォーマットが見つかりません。");
+                       }
+               }
                this._capture.setOnCapture(this);
        }