From 6a1c8af0a35f03c980b267718c341d68ea7af968 Mon Sep 17 00:00:00 2001 From: ojgarciab Date: Fri, 3 Apr 2015 19:42:03 +0200 Subject: [PATCH 1/4] Fix #2: CameraI translation fixes, updated .gitignore to ban SO generated thumbnails (as .DS_Store or Thumbs.db), .DS_Store deleted. --- .gitignore | 12 ++++ AndroidCameraServer/.DS_Store | Bin 6148 -> 0 bytes .../android/androidcameraserver/CameraI.java | 63 +++++++++--------- 3 files changed, 42 insertions(+), 33 deletions(-) delete mode 100644 AndroidCameraServer/.DS_Store diff --git a/.gitignore b/.gitignore index ec0bf8a..8ae9246 100644 --- a/.gitignore +++ b/.gitignore @@ -26,3 +26,15 @@ proguard/ *.log .svn/ + +# Apple and windows thumbnails +.DS_Store +.DS_Store? +Thumbs.db + +# Many other OS generated files +._* +.Spotlight-V100 +.Trashes +ehthumbs.db + diff --git a/AndroidCameraServer/.DS_Store b/AndroidCameraServer/.DS_Store deleted file mode 100644 index 1371bcef45927a8d2371bc7cdc84d9f0e2e80bcd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6148 zcmeHKK~BRk5FFDY6%Y~v4jgmj(n|awAVA{41s(u24W+2GsA&bqJcCE^0Dc3rYYW9m z;e-%EyOlkuGrP{tDs~LO9W4e2z!rcGn_zpL-4c`g(i*lBMmC8~V-zUxh#Smt*I?U# zDPRixH3j6|T}KZY#(Zxp@9)`on)S!iKJUxoaLTs-uEr}_5PE#mXPDw1IlbpK{%eiD zMt(u&oWBt!7@~+h+(pe}2Z!VhbdC}6oXkK$ zDaRo8(9B*cneA|n3|Fehf}R=IGV$)>iP+b?`TVsgl5aIioBkuRmt|Syb(A;xHlHeg zH>f_ug89s-OE<0qpKnfO>h)m#T&I%dcEih8^HFn^8d2qDj!}#j=Wnna>lm?CSuN2b zLmtO-tX0HpkvT&av!p)mx$@)`+U!RZ;GQkk+3;w+DPRhi0-p-V`jD^*rU6Tjx^%G9 zBLK0@VKrXM=Yseo0n>n`N8X`1?@IKpE*vqOcjtH#cxk}Wqj!f3hYuHKcHxBLbauv1 zln$4AwB8gj1!4tS{_mFT|0iFc|6?cnX9}1C|4ISZKE6CYVoG6eZ6qgqZNhfVCMLYn mqq?vQ+p%8AR=mfi#(Rle5YvFAM~=|!LqKJ)&J_4n1wH_c&c)aO diff --git a/AndroidCameraServer/src/com/linaresdigital/android/androidcameraserver/CameraI.java b/AndroidCameraServer/src/com/linaresdigital/android/androidcameraserver/CameraI.java index 8bc3842..d07520e 100644 --- a/AndroidCameraServer/src/com/linaresdigital/android/androidcameraserver/CameraI.java +++ b/AndroidCameraServer/src/com/linaresdigital/android/androidcameraserver/CameraI.java @@ -12,29 +12,29 @@ public class CameraI extends jderobot._CameraDisp { /** - * Get the description of the image that will be delivered - * getImageDescription. - * - * @see #getImageDescription() - */ - public static ImageDescription idDatos; + * Get the description of the image that will be delivered at + * getImageDescription + * + * @see #getImageDescription() + */ + public static ImageDescription idDatos; /** - * Get the image content(including date and description) - * getImageData. - * - * @see #getImageData() - */ - public static ImageData idImagen; - + * Get the image content (including date and description) that will + * delivered at getImageData + * + * @see #getImageData() + */ + public static ImageData idImagen; + /** * Serial number generated */ private static final long serialVersionUID = 1L; - CameraDescription descripcion; - - CameraI() { + CameraDescription descripcion; + + CameraI() { descripcion = new CameraDescription(); descripcion.name = "Android"; /* Initialize image description */ @@ -42,7 +42,7 @@ public class CameraI extends jderobot._CameraDisp { idDatos.height = 0; idDatos.width = 0; idDatos.format = "NONE"; - /* Initialize the image data */ + /* Initialize image data */ idImagen = new ImageData(); idImagen.pixelData = new byte[0]; idImagen.description = idDatos; @@ -50,7 +50,7 @@ public class CameraI extends jderobot._CameraDisp { idImagen.timeStamp.seconds = 0; idImagen.timeStamp.useconds = 0; } - + @Override public CameraDescription getCameraDescription(Current __current) { return descripcion; @@ -72,18 +72,17 @@ public String startCameraStreaming(Current __current) { @Override public void stopCameraStreaming(Current __current) { // TODO Auto-generated method stub - } @Override public void reset(Current __current) { // TODO Auto-generated method stub - } /** - * Will get the description of the image - * @return Gives the detail of image description + * Delivers image description + * + * @return Image description data */ @Override public ImageDescription getImageDescription(Current __current) { @@ -91,8 +90,9 @@ public ImageDescription getImageDescription(Current __current) { } static public java.util.LinkedList _jobs = new java.util.LinkedList(); + /** - * Gets image and its associated description + * Delivers image and its associated description */ @Override public void getImageData_async(AMD_ImageProvider_getImageData __cb, @@ -102,18 +102,15 @@ public void getImageData_async(AMD_ImageProvider_getImageData __cb, } class Job { - Job(AMD_ImageProvider_getImageData __cb) - { - cb = __cb; - } - - void execute() - { - cb.ice_response(idImagen); - } + Job(AMD_ImageProvider_getImageData __cb) { + cb = __cb; + } + void execute() { + cb.ice_response(idImagen); + } - private AMD_ImageProvider_getImageData cb; + private AMD_ImageProvider_getImageData cb; } } From 03191beec88faa0323e18bac3567deb7f3164da1 Mon Sep 17 00:00:00 2001 From: ojgarciab Date: Fri, 3 Apr 2015 19:52:33 +0200 Subject: [PATCH 2/4] Fix #2: Edit translation of ImageProviderI --- .../androidcameraserver/ImageProviderI.java | 64 ++++++++++--------- 1 file changed, 33 insertions(+), 31 deletions(-) diff --git a/AndroidCameraServer/src/com/linaresdigital/android/androidcameraserver/ImageProviderI.java b/AndroidCameraServer/src/com/linaresdigital/android/androidcameraserver/ImageProviderI.java index 9f8797b..536ea7e 100644 --- a/AndroidCameraServer/src/com/linaresdigital/android/androidcameraserver/ImageProviderI.java +++ b/AndroidCameraServer/src/com/linaresdigital/android/androidcameraserver/ImageProviderI.java @@ -1,6 +1,6 @@ /** - * Implementation of image provider. Almacena los fotogramas capturados así - * como todos los datos asociados al mismo. + * Implementation of ImageProvider. + * Stores captured frames and all associated data. * @author Óscar Javier García Baudet * @version 1.0, 2012-12-08 */ @@ -18,33 +18,33 @@ public class ImageProviderI extends jderobot._ImageProviderDisp { /** - * Get the description of the image that will be delivered - * getImageDescription. - * - * @see #getImageDescription() - */ - public static ImageDescription idDatos; + * Image description that will be delivered by + * getImageDescription + * + * @see #getImageDescription() + */ + public static ImageDescription idDatos; /** - * Get the image content(including date and description) - * getImageData. - * - * @see #getImageData() - */ - public static ImageData idImagen; - + * Image content (including date and description) that will be delivered by + * getImageData + * + * @see #getImageData() + */ + public static ImageData idImagen; + /** * Serial number generated. */ private static final long serialVersionUID = 1L; - + public ImageProviderI() { - /* Initialize imagedescription */ + /* Initialize image description */ idDatos = new ImageDescription(); idDatos.height = 0; idDatos.width = 0; idDatos.format = "NONE"; - /* Initialize the imagedata */ + /* Initialize image data */ idImagen = new ImageData(); idImagen.pixelData = new byte[0]; idImagen.description = idDatos; @@ -54,8 +54,9 @@ public ImageProviderI() { } /** - * Gets the image description - * @return Details image description + * Delivers image description + * + * @return Image description details */ @Override public ImageDescription getImageDescription(Current __current) { @@ -63,8 +64,9 @@ public ImageDescription getImageDescription(Current __current) { } static public java.util.LinkedList _jobs = new java.util.LinkedList(); + /** - * Gets image and its associated description + * Delivers image and its associated description */ @Override public void getImageData_async(AMD_ImageProvider_getImageData __cb, @@ -73,18 +75,18 @@ public void getImageData_async(AMD_ImageProvider_getImageData __cb, _jobs.add(new Job(__cb)); } + /** + * Implementation of a job queue for batch data delivery + */ class Job { - Job(AMD_ImageProvider_getImageData __cb) - { - cb = __cb; - } - - void execute() - { - cb.ice_response(idImagen); - } + Job(AMD_ImageProvider_getImageData __cb) { + cb = __cb; + } + void execute() { + cb.ice_response(idImagen); + } - private AMD_ImageProvider_getImageData cb; + private AMD_ImageProvider_getImageData cb; } } From 3f33003bf673809c074e7efa8f142c2ac8c2da46 Mon Sep 17 00:00:00 2001 From: ojgarciab Date: Fri, 3 Apr 2015 20:02:58 +0200 Subject: [PATCH 3/4] Fix #2: Updated MainActivity translation --- .../androidcameraserver/MainActivity.java | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/AndroidCameraServer/src/com/linaresdigital/android/androidcameraserver/MainActivity.java b/AndroidCameraServer/src/com/linaresdigital/android/androidcameraserver/MainActivity.java index cb4cd8b..bc2e690 100644 --- a/AndroidCameraServer/src/com/linaresdigital/android/androidcameraserver/MainActivity.java +++ b/AndroidCameraServer/src/com/linaresdigital/android/androidcameraserver/MainActivity.java @@ -1,6 +1,7 @@ /** - * Actividad de prueba que enmarca y controla tanto la vista preliminar de la cámara - * como la interfaz ICE publicada. + * Actividad de prueba que enmarca y controla tanto la vista preliminar de la + * cámara como la interfaz ICE publicada. + * * @author Óscar Javier García Baudet * @version 1.0, 2013-01-08 */ @@ -25,7 +26,7 @@ public class MainActivity extends Activity { private static final String TAG = MainActivity.class.getClass().getName(); /** - * Instance of imageprovider to be published + * Instance of ImageProvider implementation to be published */ private CameraI cameraA; /** @@ -33,7 +34,7 @@ public class MainActivity extends Activity { */ static private Camera mCamera; /** - * Instance of implementation of the preview that we use + * Instance of implementation of the camera preview that we'll use */ private CameraPreview mPreview; private Handler autoFocusHandler; @@ -45,20 +46,19 @@ public class MainActivity extends Activity { */ @Override protected void onCreate(Bundle savedInstanceState) { - /* General habitual top */ super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); - /* We require orientation in potrait mode */ + /* We require landscape orientation */ setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE); - /* Provide autofocus if camera does not support one */ + /* Provide continuous autofocus if camera does not support it */ autoFocusHandler = new Handler(); - /* Get the instance of the camera */ + /* Get an instance of the default camera */ mCamera = getCameraInstance(); - /* We create an instance of camera preview to manage the camera */ + /* We create an instance of CameraPreview to manage the camera */ mPreview = new CameraPreview(this, mCamera, previewCb, autoFocusCB); - /* Search the camera preview in frame layout */ + /* Find the frame that will contain the camera preview */ preview = (FrameLayout) findViewById(R.id.frameLayout); - /* Add view */ + /* Add view to frame */ preview.addView(mPreview); /* Initialize ICE, copied from an example */ @@ -87,7 +87,7 @@ public void run() { } /** - * One sure way to get the instance of camera + * Safe way to get the instance of camera */ public static Camera getCameraInstance() { Camera camara = null; @@ -187,11 +187,11 @@ public void onPause() { @Override protected void onResume() { super.onResume(); - /* Create an instance of camerapreview to manage the camera */ + /* Create a fresh instance of CameraPreview to manage the camera */ mPreview = new CameraPreview(this, mCamera, previewCb, autoFocusCB); - /* Search the framelayout for the camera preview */ + /* Find the frame that will contain the camera preview */ preview = (FrameLayout) findViewById(R.id.frameLayout); - /* Add view */ + /* Add new view to frame */ preview.addView(mPreview); } From a23a1d5882613e4ea351b70148566714a34bcf15 Mon Sep 17 00:00:00 2001 From: ojgarciab Date: Fri, 3 Apr 2015 20:04:08 +0200 Subject: [PATCH 4/4] Fix #2: Last updated translation --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8d0e8f0..6039d07 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,2 @@ # AndroidCameraServer -Component JdeRobot "cameraserver" for Android" +JdeRobot component (cameraserver like) for Android devices