Skip to content

Commit ee0fa95

Browse files
committed
Merge pull request #5 from AndroidCameraServer/Fix_2
Fix 2: Updated translation
2 parents 53f2209 + a23a1d5 commit ee0fa95

File tree

6 files changed

+91
-80
lines changed

6 files changed

+91
-80
lines changed

.gitignore

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,15 @@ proguard/
2626
*.log
2727

2828
.svn/
29+
30+
# Apple and windows thumbnails
31+
.DS_Store
32+
.DS_Store?
33+
Thumbs.db
34+
35+
# Many other OS generated files
36+
._*
37+
.Spotlight-V100
38+
.Trashes
39+
ehthumbs.db
40+

AndroidCameraServer/.DS_Store

-6 KB
Binary file not shown.

AndroidCameraServer/src/com/linaresdigital/android/androidcameraserver/CameraI.java

Lines changed: 30 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -12,45 +12,45 @@
1212
public class CameraI extends jderobot._CameraDisp {
1313

1414
/**
15-
* Get the description of the image that will be delivered
16-
* <code>getImageDescription</code>.
17-
*
18-
* @see #getImageDescription()
19-
*/
20-
public static ImageDescription idDatos;
15+
* Get the description of the image that will be delivered at
16+
* <code>getImageDescription</code>
17+
*
18+
* @see #getImageDescription()
19+
*/
20+
public static ImageDescription idDatos;
2121

2222
/**
23-
* Get the image content(including date and description)
24-
* <code>getImageData</code>.
25-
*
26-
* @see #getImageData()
27-
*/
28-
public static ImageData idImagen;
29-
23+
* Get the image content (including date and description) that will
24+
* delivered at <code>getImageData</code>
25+
*
26+
* @see #getImageData()
27+
*/
28+
public static ImageData idImagen;
29+
3030
/**
3131
* Serial number generated
3232
*/
3333
private static final long serialVersionUID = 1L;
3434

35-
CameraDescription descripcion;
36-
37-
CameraI() {
35+
CameraDescription descripcion;
36+
37+
CameraI() {
3838
descripcion = new CameraDescription();
3939
descripcion.name = "Android";
4040
/* Initialize image description */
4141
idDatos = new ImageDescription();
4242
idDatos.height = 0;
4343
idDatos.width = 0;
4444
idDatos.format = "NONE";
45-
/* Initialize the image data */
45+
/* Initialize image data */
4646
idImagen = new ImageData();
4747
idImagen.pixelData = new byte[0];
4848
idImagen.description = idDatos;
4949
idImagen.timeStamp = new Time();
5050
idImagen.timeStamp.seconds = 0;
5151
idImagen.timeStamp.useconds = 0;
5252
}
53-
53+
5454
@Override
5555
public CameraDescription getCameraDescription(Current __current) {
5656
return descripcion;
@@ -72,27 +72,27 @@ public String startCameraStreaming(Current __current) {
7272
@Override
7373
public void stopCameraStreaming(Current __current) {
7474
// TODO Auto-generated method stub
75-
7675
}
7776

7877
@Override
7978
public void reset(Current __current) {
8079
// TODO Auto-generated method stub
81-
8280
}
8381

8482
/**
85-
* Will get the description of the image
86-
* @return Gives the detail of image description
83+
* Delivers image description
84+
*
85+
* @return Image description data
8786
*/
8887
@Override
8988
public ImageDescription getImageDescription(Current __current) {
9089
return idDatos;
9190
}
9291

9392
static public java.util.LinkedList<Job> _jobs = new java.util.LinkedList<Job>();
93+
9494
/**
95-
* Gets image and its associated description
95+
* Delivers image and its associated description
9696
*/
9797
@Override
9898
public void getImageData_async(AMD_ImageProvider_getImageData __cb,
@@ -102,18 +102,15 @@ public void getImageData_async(AMD_ImageProvider_getImageData __cb,
102102
}
103103

104104
class Job {
105-
Job(AMD_ImageProvider_getImageData __cb)
106-
{
107-
cb = __cb;
108-
}
109-
110-
void execute()
111-
{
112-
cb.ice_response(idImagen);
113-
}
105+
Job(AMD_ImageProvider_getImageData __cb) {
106+
cb = __cb;
107+
}
114108

109+
void execute() {
110+
cb.ice_response(idImagen);
111+
}
115112

116-
private AMD_ImageProvider_getImageData cb;
113+
private AMD_ImageProvider_getImageData cb;
117114
}
118115

119116
}
Lines changed: 33 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
2-
* Implementation of image provider. Almacena los fotogramas capturados así
3-
* como todos los datos asociados al mismo.
2+
* Implementation of ImageProvider.
3+
* Stores captured frames and all associated data.
44
* @author Óscar Javier García Baudet
55
* @version 1.0, 2012-12-08
66
*/
@@ -18,33 +18,33 @@
1818
public class ImageProviderI extends jderobot._ImageProviderDisp {
1919

2020
/**
21-
* Get the description of the image that will be delivered
22-
* <code>getImageDescription</code>.
23-
*
24-
* @see #getImageDescription()
25-
*/
26-
public static ImageDescription idDatos;
21+
* Image description that will be delivered by
22+
* <code>getImageDescription</code>
23+
*
24+
* @see #getImageDescription()
25+
*/
26+
public static ImageDescription idDatos;
2727

2828
/**
29-
* Get the image content(including date and description)
30-
* <code>getImageData</code>.
31-
*
32-
* @see #getImageData()
33-
*/
34-
public static ImageData idImagen;
35-
29+
* Image content (including date and description) that will be delivered by
30+
* <code>getImageData</code>
31+
*
32+
* @see #getImageData()
33+
*/
34+
public static ImageData idImagen;
35+
3636
/**
3737
* Serial number generated.
3838
*/
3939
private static final long serialVersionUID = 1L;
40-
40+
4141
public ImageProviderI() {
42-
/* Initialize imagedescription */
42+
/* Initialize image description */
4343
idDatos = new ImageDescription();
4444
idDatos.height = 0;
4545
idDatos.width = 0;
4646
idDatos.format = "NONE";
47-
/* Initialize the imagedata */
47+
/* Initialize image data */
4848
idImagen = new ImageData();
4949
idImagen.pixelData = new byte[0];
5050
idImagen.description = idDatos;
@@ -54,17 +54,19 @@ public ImageProviderI() {
5454
}
5555

5656
/**
57-
* Gets the image description
58-
* @return Details image description
57+
* Delivers image description
58+
*
59+
* @return Image description details
5960
*/
6061
@Override
6162
public ImageDescription getImageDescription(Current __current) {
6263
return idDatos;
6364
}
6465

6566
static public java.util.LinkedList<Job> _jobs = new java.util.LinkedList<Job>();
67+
6668
/**
67-
* Gets image and its associated description
69+
* Delivers image and its associated description
6870
*/
6971
@Override
7072
public void getImageData_async(AMD_ImageProvider_getImageData __cb,
@@ -73,18 +75,18 @@ public void getImageData_async(AMD_ImageProvider_getImageData __cb,
7375
_jobs.add(new Job(__cb));
7476
}
7577

78+
/**
79+
* Implementation of a job queue for batch data delivery
80+
*/
7681
class Job {
77-
Job(AMD_ImageProvider_getImageData __cb)
78-
{
79-
cb = __cb;
80-
}
81-
82-
void execute()
83-
{
84-
cb.ice_response(idImagen);
85-
}
82+
Job(AMD_ImageProvider_getImageData __cb) {
83+
cb = __cb;
84+
}
8685

86+
void execute() {
87+
cb.ice_response(idImagen);
88+
}
8789

88-
private AMD_ImageProvider_getImageData cb;
90+
private AMD_ImageProvider_getImageData cb;
8991
}
9092
}

AndroidCameraServer/src/com/linaresdigital/android/androidcameraserver/MainActivity.java

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
/**
2-
* Actividad de prueba que enmarca y controla tanto la vista preliminar de la cámara
3-
* como la interfaz ICE publicada.
2+
* Actividad de prueba que enmarca y controla tanto la vista preliminar de la
3+
* cámara como la interfaz ICE publicada.
4+
*
45
* @author Óscar Javier García Baudet
56
* @version 1.0, 2013-01-08
67
*/
@@ -25,15 +26,15 @@ public class MainActivity extends Activity {
2526

2627
private static final String TAG = MainActivity.class.getClass().getName();
2728
/**
28-
* Instance of imageprovider to be published
29+
* Instance of ImageProvider implementation to be published
2930
*/
3031
private CameraI cameraA;
3132
/**
3233
* Instance of camera to be used in activity
3334
*/
3435
static private Camera mCamera;
3536
/**
36-
* Instance of implementation of the preview that we use
37+
* Instance of implementation of the camera preview that we'll use
3738
*/
3839
private CameraPreview mPreview;
3940
private Handler autoFocusHandler;
@@ -45,20 +46,19 @@ public class MainActivity extends Activity {
4546
*/
4647
@Override
4748
protected void onCreate(Bundle savedInstanceState) {
48-
/* General habitual top */
4949
super.onCreate(savedInstanceState);
5050
setContentView(R.layout.activity_main);
51-
/* We require orientation in potrait mode */
51+
/* We require landscape orientation */
5252
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
53-
/* Provide autofocus if camera does not support one */
53+
/* Provide continuous autofocus if camera does not support it */
5454
autoFocusHandler = new Handler();
55-
/* Get the instance of the camera */
55+
/* Get an instance of the default camera */
5656
mCamera = getCameraInstance();
57-
/* We create an instance of camera preview to manage the camera */
57+
/* We create an instance of CameraPreview to manage the camera */
5858
mPreview = new CameraPreview(this, mCamera, previewCb, autoFocusCB);
59-
/* Search the camera preview in frame layout */
59+
/* Find the frame that will contain the camera preview */
6060
preview = (FrameLayout) findViewById(R.id.frameLayout);
61-
/* Add view */
61+
/* Add view to frame */
6262
preview.addView(mPreview);
6363

6464
/* Initialize ICE, copied from an example */
@@ -87,7 +87,7 @@ public void run() {
8787
}
8888

8989
/**
90-
* One sure way to get the instance of camera
90+
* Safe way to get the instance of camera
9191
*/
9292
public static Camera getCameraInstance() {
9393
Camera camara = null;
@@ -187,11 +187,11 @@ public void onPause() {
187187
@Override
188188
protected void onResume() {
189189
super.onResume();
190-
/* Create an instance of camerapreview to manage the camera */
190+
/* Create a fresh instance of CameraPreview to manage the camera */
191191
mPreview = new CameraPreview(this, mCamera, previewCb, autoFocusCB);
192-
/* Search the framelayout for the camera preview */
192+
/* Find the frame that will contain the camera preview */
193193
preview = (FrameLayout) findViewById(R.id.frameLayout);
194-
/* Add view */
194+
/* Add new view to frame */
195195
preview.addView(mPreview);
196196
}
197197

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
# AndroidCameraServer
2-
Component JdeRobot "cameraserver" for Android"
2+
JdeRobot component (cameraserver like) for Android devices

0 commit comments

Comments
 (0)