Skip to content

Commit a2ce51c

Browse files
committed
move callback interfaces inside the main classes
Signed-off-by: Umair Khan <[email protected]>
1 parent 6150a64 commit a2ce51c

File tree

3 files changed

+12
-16
lines changed

3 files changed

+12
-16
lines changed

src/in/omerjerk/processing/video/android/CameraHandlerCallback.java

Lines changed: 0 additions & 10 deletions
This file was deleted.

src/in/omerjerk/processing/video/android/Capture.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,13 @@ public class Capture extends VideoBase implements CameraHandlerCallback {
2525
private int selectedCamera = -1;
2626

2727
private CameraHandler mCameraHandler;
28+
29+
public interface CameraHandlerCallback {
30+
public void handleSetSurfaceTexture(SurfaceTexture texture);
31+
public void startCamera(Integer cameraId);
32+
public void startPreview();
33+
public void stopCamera();
34+
}
2835

2936
public Capture(PApplet parent) {
3037
this(parent, -1, -1);

src/in/omerjerk/processing/video/android/Movie.java

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,18 @@
22

33
import processing.core.PApplet;
44

5-
public class Movie extends VideoBase {
5+
public class Movie extends VideoBase implements MediaPlayerHandlerCallback {
6+
7+
public interface MediaPlayerHandlerCallback {
8+
public void start();
9+
}
610

711
public Movie(PApplet parent) {
812
this(parent, -1, -1);
913
}
1014

1115
public Movie(PApplet parent, int width, int height) {
1216
super(parent);
13-
if (width == -1 || height == -1) {
14-
width = 720;
15-
height = 1280;
16-
}
17-
init(width, height, ARGB);
1817
}
1918

2019
@Override

0 commit comments

Comments
 (0)