File tree Expand file tree Collapse file tree 2 files changed +20
-17
lines changed
src/in/omerjerk/processing/video/android Expand file tree Collapse file tree 2 files changed +20
-17
lines changed Original file line number Diff line number Diff line change @@ -68,20 +68,6 @@ public void onPause() {
68
68
if (mCamera != null ) {
69
69
mCamera .release ();
70
70
}
71
-
72
- glView .queueEvent (new Runnable () {
73
- @ Override
74
- public void run () {
75
- if (mSurfaceTexture != null ) {
76
- mSurfaceTexture .release ();
77
- mSurfaceTexture = null ;
78
- }
79
- if (mFullScreen != null ) {
80
- mFullScreen .release (false ); // assume the GLSurfaceView EGL context is about
81
- mFullScreen = null ; // to be destroyed
82
- }
83
- }
84
- });
85
71
}
86
72
87
73
@ Override
@@ -90,9 +76,6 @@ public void onResume() {
90
76
glView .queueEvent (new Runnable () {
91
77
@ Override
92
78
public void run () {
93
- createSurfaceTexture ();
94
- prepareFrameBuffers ();
95
-
96
79
//If camera is not null, the activity was started already and we're coming back from a pause.
97
80
if (mCamera != null ) {
98
81
log ("Starting Camera in resume" );
Original file line number Diff line number Diff line change @@ -187,9 +187,29 @@ public void run() {
187
187
188
188
public void pause () {
189
189
onPause ();
190
+ glView .queueEvent (new Runnable () {
191
+ @ Override
192
+ public void run () {
193
+ if (mSurfaceTexture != null ) {
194
+ mSurfaceTexture .release ();
195
+ mSurfaceTexture = null ;
196
+ }
197
+ if (mFullScreen != null ) {
198
+ mFullScreen .release (false ); // assume the GLSurfaceView EGL context is about
199
+ mFullScreen = null ; // to be destroyed
200
+ }
201
+ }
202
+ });
190
203
}
191
204
192
205
public void resume () {
206
+ glView .queueEvent (new Runnable () {
207
+ @ Override
208
+ public void run () {
209
+ createSurfaceTexture ();
210
+ prepareFrameBuffers ();
211
+ }
212
+ });
193
213
onResume ();
194
214
}
195
215
You can’t perform that action at this time.
0 commit comments