diff options
author | Sven Gothel <[email protected]> | 2008-11-29 18:22:33 +0000 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2008-11-29 18:22:33 +0000 |
commit | ec8e5b4274eb8eed55935fa8b9319be0d9e4ff37 (patch) | |
tree | d23ab710ece0922ec78fcc425c17221b5d6bf2e3 /src | |
parent | 063bcd57645f4cf52a346dae432f39b1bd7285b5 (diff) |
? build
? make/GnuCTreeParserTokenTypes.txt
? make/STDCTokenTypes.txt
? make/make.jogl.all.linux-x86.log
? make/make.jogl.cdcfp.linux-x86.log
? make/make.jogl.doc.all.log
Index: make/build.xml
===================================================================
RCS file: /cvs/jogl/make/build.xml,v
retrieving revision 1.141.2.55
diff -r1.141.2.55 build.xml
356a357
> <property name="rootrel.src.c.openmax" value="src/native/openmax" />
1453a1455
> <includepath path="stub_includes/openmax" if="useOpenMAX"/>
Index: make/make.jogl.cdcfp.linux-x86.sh
===================================================================
RCS file: /cvs/jogl/make/Attic/make.jogl.cdcfp.linux-x86.sh,v
retrieving revision 1.1.2.5
diff -r1.1.2.5 make.jogl.cdcfp.linux-x86.sh
10c10
< # -Djava.generate.skip=true
---
> # -Djava.generate.skip=true \
20a21
> -Djava.generate.skip=true \
Index: src/classes/com/sun/javafx/media/video/openmax/OMXMoviePlayerImpl.java
===================================================================
RCS file: /cvs/jogl/src/classes/com/sun/javafx/media/video/openmax/Attic/OMXMoviePlayerImpl.java,v
retrieving revision 1.1.2.1
diff -r1.1.2.1 OMXMoviePlayerImpl.java
354a355
> gl.glDisable(gl.GL_TEXTURE_2D);
Index: src/classes/javax/media/opengl/GLArrayDataWrapper.java
===================================================================
RCS file: /cvs/jogl/src/classes/javax/media/opengl/Attic/GLArrayDataWrapper.java,v
retrieving revision 1.1.2.1
diff -r1.1.2.1 GLArrayDataWrapper.java
165a166
> this.normalized = normalized;
Index: src/native/newt/KDWindow.c
===================================================================
RCS file: /cvs/jogl/src/native/newt/Attic/KDWindow.c,v
retrieving revision 1.1.2.4
diff -r1.1.2.4 KDWindow.c
66c66
< #define DBG_PRINT(...) fprintf(stderr, __VA_ARGS__)
---
> #define DBG_PRINT(...) fprintf(stdout, __VA_ARGS__)
73,74c73,74
< #define STDOUT_FILE "\\Storage Card\\jogl_demos\\stdout.txt"
< #define STDERR_FILE "\\Storage Card\\jogl_demos\\stderr.txt"
---
> #define STDOUT_FILE "\\Storage Card\\stdout.txt"
> #define STDERR_FILE "\\Storage Card\\stderr.txt"
Index: src/native/openmax/com_sun_javafx_media_video_openmax_OMXMoviePlayerImpl.c
===================================================================
RCS file: /cvs/jogl/src/native/openmax/Attic/com_sun_javafx_media_video_openmax_OMXMoviePlayerImpl.c,v
retrieving revision 1.1.2.1
diff -r1.1.2.1 com_sun_javafx_media_video_openmax_OMXMoviePlayerImpl.c
74c74
< JNIEXPORT jlong JNICALL Java_com_sun_javafx_media_video_openmax_OMXMovieImpl__1createInstance
---
> JNIEXPORT jlong JNICALL Java_com_sun_javafx_media_video_openmax_OMXMoviePlayerImpl__1createInstance
87c87
< JNIEXPORT void JNICALL Java_com_sun_javafx_media_video_openmax_OMXMovieImpl__1setStream
---
> JNIEXPORT void JNICALL Java_com_sun_javafx_media_video_openmax_OMXMoviePlayerImpl__1setStream
105c105
< JNIEXPORT void JNICALL Java_com_sun_javafx_media_video_openmax_OMXMovieImpl__1updateStreamInfo
---
> JNIEXPORT void JNICALL Java_com_sun_javafx_media_video_openmax_OMXMoviePlayerImpl__1updateStreamInfo
117c117
< JNIEXPORT void JNICALL Java_com_sun_javafx_media_video_openmax_OMXMovieImpl__1setEGLImageTexture2D
---
> JNIEXPORT void JNICALL Java_com_sun_javafx_media_video_openmax_OMXMoviePlayerImpl__1setEGLImageTexture2D
129c129
< JNIEXPORT void JNICALL Java_com_sun_javafx_media_video_openmax_OMXMovieImpl__1activateInstance
---
> JNIEXPORT void JNICALL Java_com_sun_javafx_media_video_openmax_OMXMoviePlayerImpl__1activateInstance
142c142
< * Class: com_sun_javafx_media_video_openmax_OMXMovieImpl
---
> * Class: com_sun_javafx_media_video_openmax_OMXMoviePlayerImpl
146c146
< JNIEXPORT void JNICALL Java_com_sun_javafx_media_video_openmax_OMXMovieImpl__1play
---
> JNIEXPORT void JNICALL Java_com_sun_javafx_media_video_openmax_OMXMoviePlayerImpl__1play
149c149
< //fprintf(stdout, "Java_com_sun_javafx_media_video_openmax_OMXMovieImpl__1play\n");
---
> //fprintf(stdout, "Java_com_sun_javafx_media_video_openmax_OMXMoviePlayerImpl__1play\n");
161c161
< * Class: com_sun_javafx_media_video_openmax_OMXMovieImpl
---
> * Class: com_sun_javafx_media_video_openmax_OMXMoviePlayerImpl
165c165
< JNIEXPORT jlong JNICALL Java_com_sun_javafx_media_video_openmax_OMXMovieImpl__1stop
---
> JNIEXPORT jlong JNICALL Java_com_sun_javafx_media_video_openmax_OMXMoviePlayerImpl__1stop
174c174
< * Class: com_sun_javafx_media_video_openmax_OMXMovieImpl
---
> * Class: com_sun_javafx_media_video_openmax_OMXMoviePlayerImpl
178c178
< JNIEXPORT void JNICALL Java_com_sun_javafx_media_video_openmax_OMXMovieImpl__1setVolume
---
> JNIEXPORT void JNICALL Java_com_sun_javafx_media_video_openmax_OMXMoviePlayerImpl__1setVolume
185c185
< * Class: com_sun_javafx_media_video_openmax_OMXMovieImpl
---
> * Class: com_sun_javafx_media_video_openmax_OMXMoviePlayerImpl
189c189
< JNIEXPORT jlong JNICALL Java_com_sun_javafx_media_video_openmax_OMXMovieImpl__1getCurrentPosition
---
> JNIEXPORT jlong JNICALL Java_com_sun_javafx_media_video_openmax_OMXMoviePlayerImpl__1getCurrentPosition
198c198
< * Class: com_sun_javafx_media_video_openmax_OMXMovieImpl
---
> * Class: com_sun_javafx_media_video_openmax_OMXMoviePlayerImpl
202c202
< JNIEXPORT jlong JNICALL Java_com_sun_javafx_media_video_openmax_OMXMovieImpl__1getCurrentLoaded
---
> JNIEXPORT jlong JNICALL Java_com_sun_javafx_media_video_openmax_OMXMoviePlayerImpl__1getCurrentLoaded
210c210
< JNIEXPORT jlong JNICALL Java_com_sun_javafx_media_video_openmax_OMXMovieImpl__1getDuration
---
> JNIEXPORT jlong JNICALL Java_com_sun_javafx_media_video_openmax_OMXMoviePlayerImpl__1getDuration
218c218
< * Class: com_sun_javafx_media_video_openmax_OMXMovieImpl
---
> * Class: com_sun_javafx_media_video_openmax_OMXMoviePlayerImpl
222c222
< JNIEXPORT jlong JNICALL Java_com_sun_javafx_media_video_openmax_OMXMovieImpl__1step
---
> JNIEXPORT jlong JNICALL Java_com_sun_javafx_media_video_openmax_OMXMoviePlayerImpl__1step
225c225
< //fprintf(stdout, "Java_com_sun_javafx_media_video_openmax_OMXMovieImpl__1step\n");
---
> //fprintf(stdout, "Java_com_sun_javafx_media_video_openmax_OMXMoviePlayerImpl__1step\n");
232c232
< * Class: com_sun_javafx_media_video_openmax_OMXMovieImpl
---
> * Class: com_sun_javafx_media_video_openmax_OMXMoviePlayerImpl
236c236
< JNIEXPORT void JNICALL Java_com_sun_javafx_media_video_openmax_OMXMovieImpl__1setRate
---
> JNIEXPORT void JNICALL Java_com_sun_javafx_media_video_openmax_OMXMoviePlayerImpl__1setRate
239c239
< //fprintf(stdout, "Java_com_sun_javafx_media_video_openmax_OMXMovieImpl__1setRate\n");
---
> //fprintf(stdout, "Java_com_sun_javafx_media_video_openmax_OMXMoviePlayerImpl__1setRate\n");
244c244
< * Class: com_sun_javafx_media_video_openmax_OMXMovieImpl
---
> * Class: com_sun_javafx_media_video_openmax_OMXMoviePlayerImpl
248c248
< JNIEXPORT jlong JNICALL Java_com_sun_javafx_media_video_openmax_OMXMovieImpl__1setCurrentPosition
---
> JNIEXPORT jlong JNICALL Java_com_sun_javafx_media_video_openmax_OMXMoviePlayerImpl__1setCurrentPosition
251c251
< //fprintf(stdout, "Java_com_sun_javafx_media_video_openmax_OMXMovieImpl__1setRate\n");
---
> //fprintf(stdout, "Java_com_sun_javafx_media_video_openmax_OMXMoviePlayerImpl__1setRate\n");
257c257
< * Class: com_sun_javafx_media_video_openmax_OMXMovieImpl
---
> * Class: com_sun_javafx_media_video_openmax_OMXMoviePlayerImpl
261c261
< JNIEXPORT void JNICALL Java_com_sun_javafx_media_video_openmax_OMXMovieImpl__1lock
---
> JNIEXPORT void JNICALL Java_com_sun_javafx_media_video_openmax_OMXMoviePlayerImpl__1lock
264c264
< //fprintf(stdout, "Java_com_sun_javafx_media_video_openmax_OMXMovieImpl__1lock\n");
---
> //fprintf(stdout, "Java_com_sun_javafx_media_video_openmax_OMXMoviePlayerImpl__1lock\n");
269c269
< * Class: com_sun_javafx_media_video_openmax_OMXMovieImpl
---
> * Class: com_sun_javafx_media_video_openmax_OMXMoviePlayerImpl
273c273
< JNIEXPORT void JNICALL Java_com_sun_javafx_media_video_openmax_OMXMovieImpl__1unlock
---
> JNIEXPORT void JNICALL Java_com_sun_javafx_media_video_openmax_OMXMoviePlayerImpl__1unlock
276c276
< //fprintf(stdout, "Java_com_sun_javafx_media_video_openmax_OMXMovieImpl__1unlock\n");
---
> //fprintf(stdout, "Java_com_sun_javafx_media_video_openmax_OMXMoviePlayerImpl__1unlock\n");
281c281
< * Class: com_sun_javafx_media_video_openmax_OMXMovieImpl
---
> * Class: com_sun_javafx_media_video_openmax_OMXMoviePlayerImpl
285c285
< JNIEXPORT jint JNICALL Java_com_sun_javafx_media_video_openmax_OMXMovieImpl__1getTextureID
---
> JNIEXPORT jint JNICALL Java_com_sun_javafx_media_video_openmax_OMXMoviePlayerImpl__1getTextureID
288c288
< //fprintf(stdout, "Java_com_sun_javafx_media_video_openmax_OMXMovieImpl__1getTextureID\n");
---
> //fprintf(stdout, "Java_com_sun_javafx_media_video_openmax_OMXMoviePlayerImpl__1getTextureID\n");
299c299
< * Class: com_sun_javafx_media_video_openmax_OMXMovieImpl
---
> * Class: com_sun_javafx_media_video_openmax_OMXMoviePlayerImpl
303c303
< JNIEXPORT jint JNICALL Java_com_sun_javafx_media_video_openmax_OMXMovieImpl__1getWidth
---
> JNIEXPORT jint JNICALL Java_com_sun_javafx_media_video_openmax_OMXMoviePlayerImpl__1getWidth
306c306
< //fprintf(stdout, "Java_com_sun_javafx_media_video_openmax_OMXMovieImpl__1getWidth\n");
---
> //fprintf(stdout, "Java_com_sun_javafx_media_video_openmax_OMXMoviePlayerImpl__1getWidth\n");
318c318
< * Class: com_sun_javafx_media_video_openmax_OMXMovieImpl
---
> * Class: com_sun_javafx_media_video_openmax_OMXMoviePlayerImpl
322c322
< JNIEXPORT jint JNICALL Java_com_sun_javafx_media_video_openmax_OMXMovieImpl__1getHeight
---
> JNIEXPORT jint JNICALL Java_com_sun_javafx_media_video_openmax_OMXMoviePlayerImpl__1getHeight
325c325
< //fprintf(stdout, "Java_com_sun_javafx_media_video_openmax_OMXMovieImpl__1getHeight\n");
---
> //fprintf(stdout, "Java_com_sun_javafx_media_video_openmax_OMXMoviePlayerImpl__1getHeight\n");
337c337
< * Class: com_sun_javafx_media_video_openmax_OMXMovieImpl
---
> * Class: com_sun_javafx_media_video_openmax_OMXMoviePlayerImpl
341c341
< JNIEXPORT void JNICALL Java_com_sun_javafx_media_video_openmax_OMXMovieImpl__1task
---
> JNIEXPORT void JNICALL Java_com_sun_javafx_media_video_openmax_OMXMoviePlayerImpl__1task
348c348
< * Class: com_sun_javafx_media_video_openmax_OMXMovieImpl
---
> * Class: com_sun_javafx_media_video_openmax_OMXMoviePlayerImpl
352c352
< JNIEXPORT void JNICALL Java_com_sun_javafx_media_video_openmax_OMXMovieImpl__1destroyInstance
---
> JNIEXPORT void JNICALL Java_com_sun_javafx_media_video_openmax_OMXMoviePlayerImpl__1destroyInstance
355c355
< //fprintf(stdout, "Java_com_sun_javafx_media_video_openmax_OMXMovieImpl__1destroy\n");
---
> //fprintf(stdout, "Java_com_sun_javafx_media_video_openmax_OMXMoviePlayerImpl__1destroy\n");
Index: src/native/openmax/omx_tool.c
===================================================================
RCS file: /cvs/jogl/src/native/openmax/Attic/omx_tool.c,v
retrieving revision 1.1.2.1
diff -r1.1.2.1 omx_tool.c
3a4,25
> #define VERBOSE_ON 1
> #define VERBOSE2_ON 1
>
> #ifdef VERBOSE_ON
> #define DBG_PRINT(...) fprintf(stdout, __VA_ARGS__)
> #else
> #define DBG_PRINT(...)
> #endif
>
> #if defined(VERBOSE_ON) && defined(VERBOSE2_ON)
> #define DBG_PRINT2(...) fprintf(stdout, __VA_ARGS__)
> #else
> #define DBG_PRINT2(...)
> #endif
>
> #ifdef VERBOSE_ON
> #ifdef _WIN32_WCE
> #define STDOUT_FILE "\\Storage Card\\stdout.txt"
> #define STDERR_FILE "\\Storage Card\\stderr.txt"
> #endif
> #endif
>
29c51
< fprintf(stderr, "RuntimeException: %s\n", buffer); fflush(stderr);
---
> DBG_PRINT( "RuntimeException: %s\n", buffer);
86a109,116
>
> #ifdef VERBOSE_ON
> #ifdef _WIN32_WCE
> _wfreopen(TEXT(STDOUT_FILE),L"w",stdout);
> _wfreopen(TEXT(STDERR_FILE),L"w",stderr);
> #endif
> #endif
>
104d133
< _hasEGLSync = 0; // JAU
111c140
< printf("INVALIDATE\n"); fflush(stdout);
---
> DBG_PRINT("INVALIDATE\n");
140c169
< printf("event complete: cmd 0x%X, s:0x%X, component: %p - %s\n", (unsigned)nData1, (unsigned)nData2, hComponent, name);
---
> DBG_PRINT("event complete: cmd 0x%X, s:0x%X, component: %p - %s\n", (unsigned)nData1, (unsigned)nData2, hComponent, name);
144c173
< printf("\t state -> StateLoaded\n");
---
> DBG_PRINT("\t state -> StateLoaded\n");
151c180
< printf("\t flush\n");
---
> DBG_PRINT("\t flush\n");
159c188
< printf("event buffer EOS: component: %p - %s\n", hComponent, name);
---
> DBG_PRINT("event buffer EOS: component: %p - %s\n", hComponent, name);
162c191
< printf("\t end component - FIN\n");
---
> DBG_PRINT("\t end component - FIN\n");
171c200
< printf("event error: 0x%X IncorrectTransition, component: %p - %s\n", (unsigned int) nData1, hComponent, name);
---
> DBG_PRINT("event error: 0x%X IncorrectTransition, component: %p - %s\n", (unsigned int) nData1, hComponent, name);
177c206
< printf("event error: Same State 0x%X, component: %p - %s\n", (unsigned int) nData2, hComponent, name);
---
> DBG_PRINT("event error: Same State 0x%X, component: %p - %s\n", (unsigned int) nData2, hComponent, name);
181c210
< printf("event error: 0x%X, component: %p - %s\n", (unsigned int) nData1, hComponent, name);
---
> DBG_PRINT("event error: 0x%X, component: %p - %s\n", (unsigned int) nData1, hComponent, name);
214c243
< fprintf(stdout, "FillBufferDone avail %d\n", pOMXAV->available); fflush(stdout);
---
> DBG_PRINT("FillBufferDone avail %d\n", pOMXAV->available);
232c261
< fprintf(stdout, "WaitForState p1 c:%p s1:0x%X s2:0x%X\n", hComponent, eTestState, eTestState2); fflush(stdout); // JAU
---
> DBG_PRINT( "WaitForState p1 c:%p s1:0x%X s2:0x%X\n", hComponent, eTestState, eTestState2);
234c263
< fprintf(stdout, "WaitForState p2 s:0x%X e:0x%X\n", eState, eError); fflush(stdout); // JAU
---
> DBG_PRINT( "WaitForState p2 s:0x%X e:0x%X\n", eState, eError);
245c274
< fprintf(stdout, "WaitForState p3 s:0x%X e:0x%X\n", eState, eError); fflush(stdout); // JAU
---
> DBG_PRINT( "WaitForState p3 s:0x%X e:0x%X\n", eState, eError);
320c349
< fprintf(stdout, "OMXToolBasicAV_WaitForState %p s:%d\n", pOMXAV, state); fflush(stdout); // JAU
---
> DBG_PRINT( "OMXToolBasicAV_WaitForState %p s:%d\n", pOMXAV, state);
322c351
< fprintf(stdout, "OMXToolBasicAV_WaitForState p1\n"); fflush(stdout); // JAU
---
> DBG_PRINT( "OMXToolBasicAV_WaitForState p1\n");
328c357
< fprintf(stdout, "OMXToolBasicAV_WaitForState p4 %d c:%p\n", i, pOMXAV->comp[i]); fflush(stdout); // JAU
---
> DBG_PRINT( "OMXToolBasicAV_WaitForState p4 %d c:%p\n", i, pOMXAV->comp[i]);
332c361
< fprintf(stdout, "OMXToolBasicAV_WaitForState Failed (Wait) %d c:%p - %s, s:0x%X\n",
---
> DBG_PRINT( "OMXToolBasicAV_WaitForState Failed (Wait) %d c:%p - %s, s:0x%X\n",
334d362
< fflush(stdout); // JAU
348,349c376,377
< fprintf(stdout, "RequestState p2 c:%p, e:0x%X, s:0x%X\n",
< hComponent, eError, eState); fflush(stdout); // JAU
---
> DBG_PRINT( "RequestState p2 c:%p, e:0x%X, s:0x%X\n",
> hComponent, eError, eState);
353,354c381,382
< fprintf(stdout, "RequestState p3 c:%p e:0x%X s: 0x%X -> 0x%X\n",
< hComponent, eError, eState, state); fflush(stdout); // JAU
---
> DBG_PRINT( "RequestState p3 c:%p e:0x%X s: 0x%X -> 0x%X\n",
> hComponent, eError, eState, state);
367c395
< fprintf(stdout, "OMXToolBasicAV_RequestState %p s:%d, w:%d\n", pOMXAV, state, wait); fflush(stdout); // JAU
---
> DBG_PRINT( "OMXToolBasicAV_RequestState %p s:%d, w:%d\n", pOMXAV, state, wait);
369c397
< fprintf(stdout, "OMXToolBasicAV_RequestState p1\n"); fflush(stdout); // JAU
---
> DBG_PRINT( "OMXToolBasicAV_RequestState p1\n");
420c448
< fprintf(stderr, "Destroy p1\n"); fflush(stderr);
---
> DBG_PRINT( "Destroy p1\n");
423c451
< fprintf(stderr, "Destroy p2\n"); fflush(stderr);
---
> DBG_PRINT( "Destroy p2\n");
429c457
< fprintf(stderr, "Destroy p3\n"); fflush(stderr);
---
> DBG_PRINT( "Destroy p3\n");
432c460
< fprintf(stderr, "Destroy p3\n"); fflush(stderr);
---
> DBG_PRINT( "Destroy p3\n");
435c463
< fprintf(stderr, "Destroy p4\n"); fflush(stderr);
---
> DBG_PRINT( "Destroy p4\n");
443c471
< fprintf(stderr, "Destroy p5\n"); fflush(stderr);
---
> DBG_PRINT( "Destroy p5\n");
452c480
< fprintf(stderr, "Destroy p6\n"); fflush(stderr);
---
> DBG_PRINT( "Destroy p6\n");
457c485
< fprintf(stderr, "Destroy p7\n"); fflush(stderr);
---
> DBG_PRINT( "Destroy p7\n");
459c487
< fprintf(stderr, "Destroy p8\n"); fflush(stderr);
---
> DBG_PRINT( "Destroy p8\n");
464c492
< fprintf(stderr, "Destroy DONE\n"); fflush(stderr);
---
> DBG_PRINT( "Destroy DONE\n");
592c620
< fprintf(stdout, "Play 3.2\n"); fflush(stdout); // JAU
---
> DBG_PRINT( "Play 3.2\n");
705c733
< fprintf(stdout, "Attach VR %p c:%p\n", pOMXAV, pOMXAV->comp[OMXAV_H_VSCHEDULER]); fflush(stdout); // JAU
---
> DBG_PRINT( "Attach VR %p c:%p\n", pOMXAV, pOMXAV->comp[OMXAV_H_VSCHEDULER]);
708c736
< fprintf(stdout, "UseEGLImg port enable/tunneling %p\n", pOMXAV);
---
> DBG_PRINT( "UseEGLImg port enable/tunneling %p\n", pOMXAV);
721c749
< fprintf(stdout, "UseEGLImg %p #%d t:%d i:%p s:%p p1\n", pOMXAV, i, pBuf->tex, pBuf->image, pBuf->sync); fflush(stdout); // JAU
---
> DBG_PRINT( "UseEGLImg %p #%d t:%d i:%p s:%p p1\n", pOMXAV, i, pBuf->tex, pBuf->image, pBuf->sync);
735,736c763,764
< fprintf(stdout, "UseEGLImg %p #%d t:%d i:%p s:%p b:%p - p2\n",
< pOMXAV, i, pBuf->tex, pBuf->image, pBuf->sync, pBuf->omxBufferHeader); fflush(stdout); // JAU
---
> DBG_PRINT( "UseEGLImg %p #%d t:%d i:%p s:%p b:%p - p2\n",
> pOMXAV, i, pBuf->tex, pBuf->image, pBuf->sync, pBuf->omxBufferHeader);
739c767
< fprintf(stdout, "UseEGLImg %p #%d DONE\n", pOMXAV, i); fflush(stdout); // JAU
---
> DBG_PRINT( "UseEGLImg %p #%d DONE\n", pOMXAV, i);
752c780
< fprintf(stderr, "DetachVideoRenderer p0\n"); fflush(stderr);
---
> DBG_PRINT( "DetachVideoRenderer p0\n");
754c782
< fprintf(stderr, "DetachVideoRenderer DONE (already state loaded)\n"); fflush(stderr);
---
> DBG_PRINT( "DetachVideoRenderer DONE (already state loaded)\n");
759c787
< fprintf(stderr, "DetachVideoRenderer p1\n"); fflush(stderr);
---
> DBG_PRINT( "DetachVideoRenderer p1\n");
764c792
< fprintf(stderr, "DetachVideoRenderer p2\n"); fflush(stderr);
---
> DBG_PRINT( "DetachVideoRenderer p2\n");
780c808
< fprintf(stderr, "DetachVideoRenderer p3\n"); fflush(stderr);
---
> DBG_PRINT( "DetachVideoRenderer p3\n");
784c812
< fprintf(stderr, "DetachVideoRenderer DONE\n"); fflush(stderr);
---
> DBG_PRINT( "DetachVideoRenderer DONE\n");
795c823
< fprintf(stderr, "buffer number %d > MAX(%d)\n", vBufferNum, EGLIMAGE_MAX_BUFFERS);
---
> DBG_PRINT( "buffer number %d > MAX(%d)\n", vBufferNum, EGLIMAGE_MAX_BUFFERS);
800c828
< fprintf(stderr, "Init struct failed!\n");
---
> DBG_PRINT( "Init struct failed!\n");
830c858
< fprintf(stdout, "SetStream 1 %s ..\n", stream); fflush(stdout); // JAU
---
> DBG_PRINT( "SetStream 1 %s ..\n", stream);
840c868
< fprintf(stdout, "SetStream 3\n"); fflush(stdout); // JAU
---
> DBG_PRINT( "SetStream 3\n");
852c880
< fprintf(stdout, "SetStream 4\n"); fflush(stdout); // JAU
---
> DBG_PRINT( "SetStream 4\n");
905c933
< fprintf(stdout, "SetStream 5 ; audioPort %d, videoPort %d\n", pOMXAV->audioPort, pOMXAV->videoPort); fflush(stdout); // JAU
---
> DBG_PRINT( "SetStream 5 ; audioPort %d, videoPort %d\n", pOMXAV->audioPort, pOMXAV->videoPort);
909c937
< fprintf(stdout, "Configuring comp[OMXAV_H_CLOCK]\n");
---
> DBG_PRINT( "Configuring comp[OMXAV_H_CLOCK]\n");
925c953
< fprintf(stdout, "SetStream X\n"); fflush(stdout); // JAU
---
> DBG_PRINT( "SetStream X\n");
941c969
< fprintf(stdout, "SetEGLImg %p #%d/%d t:%d i:%p s:%p..\n", pOMXAV, i, pOMXAV->vBufferNum, tex, image, sync); fflush(stdout); // JAU
---
> DBG_PRINT( "SetEGLImg %p #%d/%d t:%d i:%p s:%p..\n", pOMXAV, i, pOMXAV->vBufferNum, tex, image, sync);
961c989
< fprintf(stdout, "ActivateInstance 1\n"); fflush(stdout); // JAU
---
> DBG_PRINT( "ActivateInstance 1\n");
1000c1028
< fprintf(stdout, "Setup tunneling\n"); fflush(stdout); // JAU
---
> DBG_PRINT( "Setup tunneling\n");
1005c1033
< fprintf(stdout, "Setup tunneling audio\n"); fflush(stdout); // JAU
---
> DBG_PRINT( "Setup tunneling audio\n");
1012c1040
< fprintf(stdout, "Setup tunneling video\n"); fflush(stdout); // JAU
---
> DBG_PRINT( "Setup tunneling video\n");
1017c1045
< fprintf(stdout, "ActivateInstance .. %p\n", pOMXAV); fflush(stdout);
---
> DBG_PRINT( "ActivateInstance .. %p\n", pOMXAV);
1031c1059
< fprintf(stdout, "ActivateInstance done %p\n", pOMXAV); fflush(stdout);
---
> DBG_PRINT( "ActivateInstance done %p\n", pOMXAV);
1090c1118
< fprintf(stderr, "Err: Play invalid"); fflush(stderr);
---
> fprintf(stderr, "Err: Play invalid");
1097c1125
< fprintf(stdout, "Play 1\n"); fflush(stdout); // JAU
---
> DBG_PRINT( "Play 1\n");
1099c1127
< fprintf(stdout, "Play 2\n"); fflush(stdout); // JAU
---
> DBG_PRINT( "Play 2\n");
1109c1137
< fprintf(stdout, "Play 3.0\n"); fflush(stdout); // JAU
---
> DBG_PRINT( "Play 3.0\n");
1112c1140
< fprintf(stdout, "Play 3.1\n"); fflush(stdout); // JAU
---
> DBG_PRINT( "Play 3.1\n");
1119c1147
< fprintf(stdout, "Play 3.2\n"); fflush(stdout); // JAU
---
> DBG_PRINT( "Play 3.2\n");
1125c1153
< fprintf(stdout, "Play 3.3\n"); fflush(stdout); // JAU
---
> DBG_PRINT( "Play 3.3\n");
1127c1155
< fprintf(stdout, "Play 4.0\n"); fflush(stdout); // JAU
---
> DBG_PRINT( "Play 4.0\n");
1131c1159
< fprintf(stdout, "Play DONE\n"); fflush(stdout); // JAU
---
> DBG_PRINT( "Play DONE\n");
1299,1300c1327,1328
< // fprintf(stdout, "GetTexture A avail %d, filled %d, pos o:%d g:%d\n",
< // pOMXAV->available, pOMXAV->filled, pOMXAV->omxPos, pOMXAV->glPos); fflush(stdout);
---
> DBG_PRINT2("GetTexture A avail %d, filled %d, pos o:%d g:%d\n",
> pOMXAV->available, pOMXAV->filled, pOMXAV->omxPos, pOMXAV->glPos);
1310c1338
< // fprintf(stdout, "GetTexture p2.1 attr 0x%X\n", attr); fflush(stdout);
---
> DBG_PRINT2( "GetTexture p2.1 attr 0x%X\n", attr);
1314c1342
< // fprintf(stdout, "GetTexture p2.2\n", attr); fflush(stdout);
---
> DBG_PRINT2( "GetTexture p2.2\n");
1321c1349
< // fprintf(stdout, "GetTexture p2.3\n", attr); fflush(stdout);
---
> DBG_PRINT2( "GetTexture p2.3\n");
1328c1356
< // fprintf(stdout, "GetTexture p3.1\n"); fflush(stdout);
---
> DBG_PRINT2("GetTexture p3.1\n");
1338c1366
< // fprintf(stdout, "GetTexture p3.2\n"); fflush(stdout);
---
> DBG_PRINT2( "GetTexture p3.2\n");
1347,1348c1375,1376
< // fprintf(stdout, "GetTexture B avail %d, filled %d, pos o:%d g:%d t:%d\n",
< // pOMXAV->available, pOMXAV->filled, pOMXAV->omxPos, pOMXAV->glPos, texID); fflush(stdout);
---
> DBG_PRINT2( "GetTexture B avail %d, filled %d, pos o:%d g:%d t:%d\n",
> pOMXAV->available, pOMXAV->filled, pOMXAV->omxPos, pOMXAV->glPos, texID);
1368,1372d1395
< #ifdef _WIN32_WCE
< #define STDOUT_FILE "\\Storage Card\\stdout.txt"
< #define STDERR_FILE "\\Storage Card\\stderr.txt"
< #endif
<
1427,1431d1449
< #ifdef _WIN32_WCE
< _wfreopen(TEXT(STDOUT_FILE),L"w",stdout);
< _wfreopen(TEXT(STDERR_FILE),L"w",stderr);
< #endif
<
1538c1556
< printf("7\n"); fflush(stdout);
---
> printf("7\n");
1543c1561
< printf("8\n"); fflush(stdout);
---
> printf("8\n");
1548c1566
< printf("8.2\n"); fflush(stdout);
---
> printf("8.2\n");
1557c1575
< printf("Sleep %d\n", i); fflush(stdout);
---
> printf("Sleep %d\n", i);
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/branches/JOGL_2_SANDBOX@1811 232f8b59-042b-4e1e-8c03-345bb8c30851
Diffstat (limited to 'src')
-rw-r--r-- | src/classes/com/sun/javafx/media/video/openmax/OMXMoviePlayerImpl.java | 1 | ||||
-rwxr-xr-x | src/native/newt/KDWindow.c | 6 | ||||
-rw-r--r-- | src/native/openmax/com_sun_javafx_media_video_openmax_OMXMoviePlayerImpl.c | 92 | ||||
-rw-r--r-- | src/native/openmax/omx_tool.c | 210 |
4 files changed, 164 insertions, 145 deletions
diff --git a/src/classes/com/sun/javafx/media/video/openmax/OMXMoviePlayerImpl.java b/src/classes/com/sun/javafx/media/video/openmax/OMXMoviePlayerImpl.java index eefd02402..1d9c9fd7b 100644 --- a/src/classes/com/sun/javafx/media/video/openmax/OMXMoviePlayerImpl.java +++ b/src/classes/com/sun/javafx/media/video/openmax/OMXMoviePlayerImpl.java @@ -352,6 +352,7 @@ public class OMXMoviePlayerImpl /* extends MoviePlayerImpl */ { image, sync); eglImgTexsMap.put(new Integer(tex), eglImgTexs[i]); } + gl.glDisable(gl.GL_TEXTURE_2D); } public boolean isValid() { diff --git a/src/native/newt/KDWindow.c b/src/native/newt/KDWindow.c index 211db7ce7..2b9d6d737 100755 --- a/src/native/newt/KDWindow.c +++ b/src/native/newt/KDWindow.c @@ -63,15 +63,15 @@ // #define VERBOSE_ON 1 #ifdef VERBOSE_ON - #define DBG_PRINT(...) fprintf(stderr, __VA_ARGS__) + #define DBG_PRINT(...) fprintf(stdout, __VA_ARGS__) #else #define DBG_PRINT(...) #endif #ifdef VERBOSE_ON #ifdef _WIN32_WCE - #define STDOUT_FILE "\\Storage Card\\jogl_demos\\stdout.txt" - #define STDERR_FILE "\\Storage Card\\jogl_demos\\stderr.txt" + #define STDOUT_FILE "\\Storage Card\\stdout.txt" + #define STDERR_FILE "\\Storage Card\\stderr.txt" #endif #endif diff --git a/src/native/openmax/com_sun_javafx_media_video_openmax_OMXMoviePlayerImpl.c b/src/native/openmax/com_sun_javafx_media_video_openmax_OMXMoviePlayerImpl.c index 6800246fc..a0f29beb1 100644 --- a/src/native/openmax/com_sun_javafx_media_video_openmax_OMXMoviePlayerImpl.c +++ b/src/native/openmax/com_sun_javafx_media_video_openmax_OMXMoviePlayerImpl.c @@ -71,7 +71,7 @@ void java_throwNewRuntimeException(JNIEnv *env, const char* format, ...) } } -JNIEXPORT jlong JNICALL Java_com_sun_javafx_media_video_openmax_OMXMovieImpl__1createInstance +JNIEXPORT jlong JNICALL Java_com_sun_javafx_media_video_openmax_OMXMoviePlayerImpl__1createInstance (JNIEnv *env, jobject instance, jint vBufferNum) { OMXToolBasicAV_t * pOMXAV; @@ -84,7 +84,7 @@ JNIEXPORT jlong JNICALL Java_com_sun_javafx_media_video_openmax_OMXMovieImpl__1c return (jlong)((intptr_t)((void *)pOMXAV)); } -JNIEXPORT void JNICALL Java_com_sun_javafx_media_video_openmax_OMXMovieImpl__1setStream +JNIEXPORT void JNICALL Java_com_sun_javafx_media_video_openmax_OMXMoviePlayerImpl__1setStream (JNIEnv *env, jobject instance, jlong ptr, jstring jpath) { jboolean iscopy; @@ -102,7 +102,7 @@ JNIEXPORT void JNICALL Java_com_sun_javafx_media_video_openmax_OMXMovieImpl__1se fprintf(stdout, "setStream 3 ..\n"); fflush(stdout); // JAU } -JNIEXPORT void JNICALL Java_com_sun_javafx_media_video_openmax_OMXMovieImpl__1updateStreamInfo +JNIEXPORT void JNICALL Java_com_sun_javafx_media_video_openmax_OMXMoviePlayerImpl__1updateStreamInfo (JNIEnv *env, jobject instance, jlong ptr) { OMXToolBasicAV_t *pOMXAV = (OMXToolBasicAV_t *)((void *)((intptr_t)ptr)); @@ -114,7 +114,7 @@ JNIEXPORT void JNICALL Java_com_sun_javafx_media_video_openmax_OMXMovieImpl__1up } } -JNIEXPORT void JNICALL Java_com_sun_javafx_media_video_openmax_OMXMovieImpl__1setEGLImageTexture2D +JNIEXPORT void JNICALL Java_com_sun_javafx_media_video_openmax_OMXMoviePlayerImpl__1setEGLImageTexture2D (JNIEnv *env, jobject instance, jlong ptr, jint i, jint tex, jlong image, jlong sync) { OMXToolBasicAV_t *pOMXAV = (OMXToolBasicAV_t *)((void *)((intptr_t)ptr)); @@ -126,7 +126,7 @@ JNIEXPORT void JNICALL Java_com_sun_javafx_media_video_openmax_OMXMovieImpl__1se } } -JNIEXPORT void JNICALL Java_com_sun_javafx_media_video_openmax_OMXMovieImpl__1activateInstance +JNIEXPORT void JNICALL Java_com_sun_javafx_media_video_openmax_OMXMoviePlayerImpl__1activateInstance (JNIEnv *env, jobject instance, jlong ptr) { OMXToolBasicAV_t *pOMXAV = (OMXToolBasicAV_t *)((void *)((intptr_t)ptr)); @@ -139,14 +139,14 @@ JNIEXPORT void JNICALL Java_com_sun_javafx_media_video_openmax_OMXMovieImpl__1ac } /* - * Class: com_sun_javafx_media_video_openmax_OMXMovieImpl + * Class: com_sun_javafx_media_video_openmax_OMXMoviePlayerImpl * Method: _play * Signature: (ILjava/nio/ByteBuffer;JFI)V */ -JNIEXPORT void JNICALL Java_com_sun_javafx_media_video_openmax_OMXMovieImpl__1play +JNIEXPORT void JNICALL Java_com_sun_javafx_media_video_openmax_OMXMoviePlayerImpl__1play (JNIEnv *env, jobject instance, jlong ptr, jlong position, jfloat rate, jint loopCount) { -//fprintf(stdout, "Java_com_sun_javafx_media_video_openmax_OMXMovieImpl__1play\n"); +//fprintf(stdout, "Java_com_sun_javafx_media_video_openmax_OMXMoviePlayerImpl__1play\n"); OMXToolBasicAV_t *pOMXAV = (OMXToolBasicAV_t *)((void *)((intptr_t)ptr)); _env = env; if (pOMXAV != NULL) { @@ -158,11 +158,11 @@ JNIEXPORT void JNICALL Java_com_sun_javafx_media_video_openmax_OMXMovieImpl__1pl } /* - * Class: com_sun_javafx_media_video_openmax_OMXMovieImpl + * Class: com_sun_javafx_media_video_openmax_OMXMoviePlayerImpl * Method: _stop * Signature: (I)I */ -JNIEXPORT jlong JNICALL Java_com_sun_javafx_media_video_openmax_OMXMovieImpl__1stop +JNIEXPORT jlong JNICALL Java_com_sun_javafx_media_video_openmax_OMXMoviePlayerImpl__1stop (JNIEnv *env, jobject instance, jlong ptr) { jlong frame = 0; @@ -171,22 +171,22 @@ JNIEXPORT jlong JNICALL Java_com_sun_javafx_media_video_openmax_OMXMovieImpl__1s } /* - * Class: com_sun_javafx_media_video_openmax_OMXMovieImpl + * Class: com_sun_javafx_media_video_openmax_OMXMoviePlayerImpl * Method: _setVolume * Signature: (IF)V */ -JNIEXPORT void JNICALL Java_com_sun_javafx_media_video_openmax_OMXMovieImpl__1setVolume +JNIEXPORT void JNICALL Java_com_sun_javafx_media_video_openmax_OMXMoviePlayerImpl__1setVolume (JNIEnv *env, jobject instance, jlong ptr, jfloat volume) { _env = env; } /* - * Class: com_sun_javafx_media_video_openmax_OMXMovieImpl + * Class: com_sun_javafx_media_video_openmax_OMXMoviePlayerImpl * Method: _getCurrentPosition * Signature: (I)I */ -JNIEXPORT jlong JNICALL Java_com_sun_javafx_media_video_openmax_OMXMovieImpl__1getCurrentPosition +JNIEXPORT jlong JNICALL Java_com_sun_javafx_media_video_openmax_OMXMoviePlayerImpl__1getCurrentPosition (JNIEnv *env, jobject instance, jlong ptr) { jlong frame = 0; @@ -195,11 +195,11 @@ JNIEXPORT jlong JNICALL Java_com_sun_javafx_media_video_openmax_OMXMovieImpl__1g } /* - * Class: com_sun_javafx_media_video_openmax_OMXMovieImpl + * Class: com_sun_javafx_media_video_openmax_OMXMoviePlayerImpl * Method: _getCurrentPosition * Signature: (I)I */ -JNIEXPORT jlong JNICALL Java_com_sun_javafx_media_video_openmax_OMXMovieImpl__1getCurrentLoaded +JNIEXPORT jlong JNICALL Java_com_sun_javafx_media_video_openmax_OMXMoviePlayerImpl__1getCurrentLoaded (JNIEnv *env, jobject instance, jlong ptr) { jlong frame = 0; @@ -207,7 +207,7 @@ JNIEXPORT jlong JNICALL Java_com_sun_javafx_media_video_openmax_OMXMovieImpl__1g return frame; } -JNIEXPORT jlong JNICALL Java_com_sun_javafx_media_video_openmax_OMXMovieImpl__1getDuration +JNIEXPORT jlong JNICALL Java_com_sun_javafx_media_video_openmax_OMXMoviePlayerImpl__1getDuration (JNIEnv *env, jobject instance, jlong ptr) { jlong frame = 0; @@ -215,77 +215,77 @@ JNIEXPORT jlong JNICALL Java_com_sun_javafx_media_video_openmax_OMXMovieImpl__1g return frame; } /* - * Class: com_sun_javafx_media_video_openmax_OMXMovieImpl + * Class: com_sun_javafx_media_video_openmax_OMXMoviePlayerImpl * Method: _step * Signature: (IIJ)V */ -JNIEXPORT jlong JNICALL Java_com_sun_javafx_media_video_openmax_OMXMovieImpl__1step +JNIEXPORT jlong JNICALL Java_com_sun_javafx_media_video_openmax_OMXMoviePlayerImpl__1step (JNIEnv *env, jobject instance, jlong ptr, jint direction, jlong position) { -//fprintf(stdout, "Java_com_sun_javafx_media_video_openmax_OMXMovieImpl__1step\n"); +//fprintf(stdout, "Java_com_sun_javafx_media_video_openmax_OMXMoviePlayerImpl__1step\n"); jlong frame = position; _env = env; return frame; } /* - * Class: com_sun_javafx_media_video_openmax_OMXMovieImpl + * Class: com_sun_javafx_media_video_openmax_OMXMoviePlayerImpl * Method: _setRate * Signature: (IF)V */ -JNIEXPORT void JNICALL Java_com_sun_javafx_media_video_openmax_OMXMovieImpl__1setRate +JNIEXPORT void JNICALL Java_com_sun_javafx_media_video_openmax_OMXMoviePlayerImpl__1setRate (JNIEnv *env, jobject instance, jlong ptr, jfloat rate) { -//fprintf(stdout, "Java_com_sun_javafx_media_video_openmax_OMXMovieImpl__1setRate\n"); +//fprintf(stdout, "Java_com_sun_javafx_media_video_openmax_OMXMoviePlayerImpl__1setRate\n"); _env = env; } /* - * Class: com_sun_javafx_media_video_openmax_OMXMovieImpl + * Class: com_sun_javafx_media_video_openmax_OMXMoviePlayerImpl * Method: _setRate * Signature: (IF)V */ -JNIEXPORT jlong JNICALL Java_com_sun_javafx_media_video_openmax_OMXMovieImpl__1setCurrentPosition +JNIEXPORT jlong JNICALL Java_com_sun_javafx_media_video_openmax_OMXMoviePlayerImpl__1setCurrentPosition (JNIEnv *env, jobject obj, jlong ptr, jlong position) { -//fprintf(stdout, "Java_com_sun_javafx_media_video_openmax_OMXMovieImpl__1setRate\n"); +//fprintf(stdout, "Java_com_sun_javafx_media_video_openmax_OMXMoviePlayerImpl__1setRate\n"); _env = env; return position; } /* - * Class: com_sun_javafx_media_video_openmax_OMXMovieImpl + * Class: com_sun_javafx_media_video_openmax_OMXMoviePlayerImpl * Method: _lock * Signature: (I)V */ -JNIEXPORT void JNICALL Java_com_sun_javafx_media_video_openmax_OMXMovieImpl__1lock +JNIEXPORT void JNICALL Java_com_sun_javafx_media_video_openmax_OMXMoviePlayerImpl__1lock (JNIEnv *env, jobject instance, jlong ptr) { -//fprintf(stdout, "Java_com_sun_javafx_media_video_openmax_OMXMovieImpl__1lock\n"); +//fprintf(stdout, "Java_com_sun_javafx_media_video_openmax_OMXMoviePlayerImpl__1lock\n"); _env = env; } /* - * Class: com_sun_javafx_media_video_openmax_OMXMovieImpl + * Class: com_sun_javafx_media_video_openmax_OMXMoviePlayerImpl * Method: _unlock * Signature: (I)V */ -JNIEXPORT void JNICALL Java_com_sun_javafx_media_video_openmax_OMXMovieImpl__1unlock +JNIEXPORT void JNICALL Java_com_sun_javafx_media_video_openmax_OMXMoviePlayerImpl__1unlock (JNIEnv *env, jobject instance, jlong ptr) { -//fprintf(stdout, "Java_com_sun_javafx_media_video_openmax_OMXMovieImpl__1unlock\n"); +//fprintf(stdout, "Java_com_sun_javafx_media_video_openmax_OMXMoviePlayerImpl__1unlock\n"); _env = env; } /* - * Class: com_sun_javafx_media_video_openmax_OMXMovieImpl + * Class: com_sun_javafx_media_video_openmax_OMXMoviePlayerImpl * Method: _getTextureID * Signature: (I)I */ -JNIEXPORT jint JNICALL Java_com_sun_javafx_media_video_openmax_OMXMovieImpl__1getTextureID +JNIEXPORT jint JNICALL Java_com_sun_javafx_media_video_openmax_OMXMoviePlayerImpl__1getTextureID (JNIEnv *env, jobject instance, jlong ptr) { -//fprintf(stdout, "Java_com_sun_javafx_media_video_openmax_OMXMovieImpl__1getTextureID\n"); +//fprintf(stdout, "Java_com_sun_javafx_media_video_openmax_OMXMoviePlayerImpl__1getTextureID\n"); jint textureID = 0xffffffff; OMXToolBasicAV_t *pOMXAV = (OMXToolBasicAV_t *)((void *)((intptr_t)ptr)); _env = env; @@ -296,14 +296,14 @@ JNIEXPORT jint JNICALL Java_com_sun_javafx_media_video_openmax_OMXMovieImpl__1ge } /* - * Class: com_sun_javafx_media_video_openmax_OMXMovieImpl + * Class: com_sun_javafx_media_video_openmax_OMXMoviePlayerImpl * Method: _getWidth * Signature: (I)I */ -JNIEXPORT jint JNICALL Java_com_sun_javafx_media_video_openmax_OMXMovieImpl__1getWidth +JNIEXPORT jint JNICALL Java_com_sun_javafx_media_video_openmax_OMXMoviePlayerImpl__1getWidth (JNIEnv *env, jobject instance, jlong ptr) { -//fprintf(stdout, "Java_com_sun_javafx_media_video_openmax_OMXMovieImpl__1getWidth\n"); +//fprintf(stdout, "Java_com_sun_javafx_media_video_openmax_OMXMoviePlayerImpl__1getWidth\n"); jint width = 0; OMXToolBasicAV_t *pOMXAV = (OMXToolBasicAV_t *)((void *)((intptr_t)ptr)); @@ -315,14 +315,14 @@ JNIEXPORT jint JNICALL Java_com_sun_javafx_media_video_openmax_OMXMovieImpl__1ge } /* - * Class: com_sun_javafx_media_video_openmax_OMXMovieImpl + * Class: com_sun_javafx_media_video_openmax_OMXMoviePlayerImpl * Method: _getHeight * Signature: (I)I */ -JNIEXPORT jint JNICALL Java_com_sun_javafx_media_video_openmax_OMXMovieImpl__1getHeight +JNIEXPORT jint JNICALL Java_com_sun_javafx_media_video_openmax_OMXMoviePlayerImpl__1getHeight (JNIEnv *env, jobject instance, jlong ptr) { -//fprintf(stdout, "Java_com_sun_javafx_media_video_openmax_OMXMovieImpl__1getHeight\n"); +//fprintf(stdout, "Java_com_sun_javafx_media_video_openmax_OMXMoviePlayerImpl__1getHeight\n"); jint height = 0; OMXToolBasicAV_t *pOMXAV = (OMXToolBasicAV_t *)((void *)((intptr_t)ptr)); @@ -334,25 +334,25 @@ JNIEXPORT jint JNICALL Java_com_sun_javafx_media_video_openmax_OMXMovieImpl__1ge } /* - * Class: com_sun_javafx_media_video_openmax_OMXMovieImpl + * Class: com_sun_javafx_media_video_openmax_OMXMoviePlayerImpl * Method: _task * Signature: (I)V */ -JNIEXPORT void JNICALL Java_com_sun_javafx_media_video_openmax_OMXMovieImpl__1task +JNIEXPORT void JNICALL Java_com_sun_javafx_media_video_openmax_OMXMoviePlayerImpl__1task (JNIEnv *env, jobject instance, jlong ptr) { _env = env; } /* - * Class: com_sun_javafx_media_video_openmax_OMXMovieImpl + * Class: com_sun_javafx_media_video_openmax_OMXMoviePlayerImpl * Method: _destroy * Signature: (I)V */ -JNIEXPORT void JNICALL Java_com_sun_javafx_media_video_openmax_OMXMovieImpl__1destroyInstance +JNIEXPORT void JNICALL Java_com_sun_javafx_media_video_openmax_OMXMoviePlayerImpl__1destroyInstance (JNIEnv *env, jobject instance, jlong ptr) { -//fprintf(stdout, "Java_com_sun_javafx_media_video_openmax_OMXMovieImpl__1destroy\n"); +//fprintf(stdout, "Java_com_sun_javafx_media_video_openmax_OMXMoviePlayerImpl__1destroy\n"); OMXToolBasicAV_t *pOMXAV = (OMXToolBasicAV_t *)((void *)((intptr_t)ptr)); _env = env; if (pOMXAV != NULL) { diff --git a/src/native/openmax/omx_tool.c b/src/native/openmax/omx_tool.c index a727996b4..927374f53 100644 --- a/src/native/openmax/omx_tool.c +++ b/src/native/openmax/omx_tool.c @@ -1,6 +1,28 @@ #include "omx_tool.h" +#define VERBOSE_ON 1 +#define VERBOSE2_ON 1 + +#ifdef VERBOSE_ON + #define DBG_PRINT(...) fprintf(stdout, __VA_ARGS__) +#else + #define DBG_PRINT(...) +#endif + +#if defined(VERBOSE_ON) && defined(VERBOSE2_ON) + #define DBG_PRINT2(...) fprintf(stdout, __VA_ARGS__) +#else + #define DBG_PRINT2(...) +#endif + +#ifdef VERBOSE_ON + #ifdef _WIN32_WCE + #define STDOUT_FILE "\\Storage Card\\stdout.txt" + #define STDERR_FILE "\\Storage Card\\stderr.txt" + #endif +#endif + #include <NVOMX_IndexExtensions.h> #if !defined(SELF_TEST) #include <jni.h> @@ -26,7 +48,7 @@ void java_throwNewRuntimeException(void *env, const char* format, ...) { #endif va_end(ap); buffer[sizeof(buffer)-1]=0; - fprintf(stderr, "RuntimeException: %s\n", buffer); fflush(stderr); + DBG_PRINT( "RuntimeException: %s\n", buffer); exit(1); } #endif @@ -84,6 +106,14 @@ static int _initialized = 0; static void InitStatic() { if(_initialized) return; + +#ifdef VERBOSE_ON + #ifdef _WIN32_WCE + _wfreopen(TEXT(STDOUT_FILE),L"w",stdout); + _wfreopen(TEXT(STDERR_FILE),L"w",stderr); + #endif +#endif + _initialized = 1; vOMX.s.nVersionMajor = 1; @@ -101,14 +131,13 @@ static void InitStatic() } else { _hasEGLSync = 1; } - _hasEGLSync = 0; // JAU OMX_Init(); } static void Invalidate(OMXToolBasicAV_t * pOMXAV) { - printf("INVALIDATE\n"); fflush(stdout); + DBG_PRINT("INVALIDATE\n"); pOMXAV->status=OMXAV_INVALID; } @@ -137,18 +166,18 @@ static OMX_ERRORTYPE EventHandler( { case OMX_EventCmdComplete: { - printf("event complete: cmd 0x%X, s:0x%X, component: %p - %s\n", (unsigned)nData1, (unsigned)nData2, hComponent, name); + DBG_PRINT("event complete: cmd 0x%X, s:0x%X, component: %p - %s\n", (unsigned)nData1, (unsigned)nData2, hComponent, name); if (nData1 == OMX_CommandStateSet && pOMXAV->status == OMXAV_INVALID) { if (nData2 > OMX_StateLoaded) { - printf("\t state -> StateLoaded\n"); + DBG_PRINT("\t state -> StateLoaded\n"); // Transition the component down to StateLoaded OMX_SendCommand(hComponent, OMX_CommandStateSet, OMX_StateLoaded, 0); } } else if (nData1 == OMX_CommandFlush && nData2 == OMX_ALL) { - printf("\t flush\n"); + DBG_PRINT("\t flush\n"); kdThreadSemPost(pOMXAV->flushSem); } break; @@ -156,10 +185,10 @@ static OMX_ERRORTYPE EventHandler( case OMX_EventBufferFlag: if (nData2 & OMX_BUFFERFLAG_EOS) { - printf("event buffer EOS: component: %p - %s\n", hComponent, name); + DBG_PRINT("event buffer EOS: component: %p - %s\n", hComponent, name); if (pOMXAV->endComponent == hComponent) { - printf("\t end component - FIN\n"); + DBG_PRINT("\t end component - FIN\n"); pOMXAV->status = OMXAV_FIN; } } @@ -168,17 +197,17 @@ static OMX_ERRORTYPE EventHandler( { if (nData1 == OMX_ErrorIncorrectStateTransition) { - printf("event error: 0x%X IncorrectTransition, component: %p - %s\n", (unsigned int) nData1, hComponent, name); + DBG_PRINT("event error: 0x%X IncorrectTransition, component: %p - %s\n", (unsigned int) nData1, hComponent, name); // We are shutting down, just continue with that process OMX_SendCommand(hComponent, OMX_CommandStateSet, OMX_StateIdle, 0); } else if(nData1 == OMX_ErrorSameState) { - printf("event error: Same State 0x%X, component: %p - %s\n", (unsigned int) nData2, hComponent, name); + DBG_PRINT("event error: Same State 0x%X, component: %p - %s\n", (unsigned int) nData2, hComponent, name); } else { - printf("event error: 0x%X, component: %p - %s\n", (unsigned int) nData1, hComponent, name); + DBG_PRINT("event error: 0x%X, component: %p - %s\n", (unsigned int) nData1, hComponent, name); Invalidate(pOMXAV); } } @@ -211,7 +240,7 @@ static OMX_ERRORTYPE FillBufferDone( pOMXAV->status = OMXAV_FIN; } pOMXAV->available++; - fprintf(stdout, "FillBufferDone avail %d\n", pOMXAV->available); fflush(stdout); + DBG_PRINT("FillBufferDone avail %d\n", pOMXAV->available); return OMX_ErrorNone; } @@ -229,9 +258,9 @@ static OMX_ERRORTYPE WaitForState(OMX_HANDLETYPE hComponent, OMX_STATETYPE eState; int loop=STATE_TIMEOUT_LOOP; - fprintf(stdout, "WaitForState p1 c:%p s1:0x%X s2:0x%X\n", hComponent, eTestState, eTestState2); fflush(stdout); // JAU + DBG_PRINT( "WaitForState p1 c:%p s1:0x%X s2:0x%X\n", hComponent, eTestState, eTestState2); eError = OMX_GetState(hComponent, &eState); - fprintf(stdout, "WaitForState p2 s:0x%X e:0x%X\n", eState, eError); fflush(stdout); // JAU + DBG_PRINT( "WaitForState p2 s:0x%X e:0x%X\n", eState, eError); while (loop>0 && OMX_ErrorNone == eError && @@ -242,7 +271,7 @@ static OMX_ERRORTYPE WaitForState(OMX_HANDLETYPE hComponent, loop--; eError = OMX_GetState(hComponent, &eState); - fprintf(stdout, "WaitForState p3 s:0x%X e:0x%X\n", eState, eError); fflush(stdout); // JAU + DBG_PRINT( "WaitForState p3 s:0x%X e:0x%X\n", eState, eError); } if(NULL!=currentState) *currentState=eState; @@ -317,21 +346,20 @@ KDint OMXToolBasicAV_CheckState(OMXToolBasicAV_t * pOMXAV, OMX_STATETYPE state) KDint OMXToolBasicAV_WaitForState(OMXToolBasicAV_t * pOMXAV, OMX_STATETYPE state) { KDint res, i; - fprintf(stdout, "OMXToolBasicAV_WaitForState %p s:%d\n", pOMXAV, state); fflush(stdout); // JAU + DBG_PRINT( "OMXToolBasicAV_WaitForState %p s:%d\n", pOMXAV, state); if(NULL==pOMXAV) { - fprintf(stdout, "OMXToolBasicAV_WaitForState p1\n"); fflush(stdout); // JAU + DBG_PRINT( "OMXToolBasicAV_WaitForState p1\n"); return -1; } for(i=0; i<OMXAV_H_NUMBER; i++) { if(0!=pOMXAV->comp[i]) { - fprintf(stdout, "OMXToolBasicAV_WaitForState p4 %d c:%p\n", i, pOMXAV->comp[i]); fflush(stdout); // JAU + DBG_PRINT( "OMXToolBasicAV_WaitForState p4 %d c:%p\n", i, pOMXAV->comp[i]); if( 0!=(res=SyncOnState(pOMXAV->comp[i], state)) ) { KDchar name[128]; GetComponentName(pOMXAV->comp[i], name, 128); - fprintf(stdout, "OMXToolBasicAV_WaitForState Failed (Wait) %d c:%p - %s, s:0x%X\n", + DBG_PRINT( "OMXToolBasicAV_WaitForState Failed (Wait) %d c:%p - %s, s:0x%X\n", i, pOMXAV->comp[i], name, state); - fflush(stdout); // JAU return res-(i*10); } } @@ -345,13 +373,13 @@ static OMX_ERRORTYPE RequestState(OMX_HANDLETYPE hComponent, OMX_STATETYPE state OMX_ERRORTYPE eError = OMX_ErrorNone; OMX_STATETYPE eState; eError = OMX_GetState(hComponent, &eState); - fprintf(stdout, "RequestState p2 c:%p, e:0x%X, s:0x%X\n", - hComponent, eError, eState); fflush(stdout); // JAU + DBG_PRINT( "RequestState p2 c:%p, e:0x%X, s:0x%X\n", + hComponent, eError, eState); // Skip StateSet in case the state is already reached .. if(OMX_ErrorNone != eError || eState!=state) { eError = OMX_SendCommand(hComponent, OMX_CommandStateSet, state, 0); - fprintf(stdout, "RequestState p3 c:%p e:0x%X s: 0x%X -> 0x%X\n", - hComponent, eError, eState, state); fflush(stdout); // JAU + DBG_PRINT( "RequestState p3 c:%p e:0x%X s: 0x%X -> 0x%X\n", + hComponent, eError, eState, state); if(wait) { OMX_STATETYPE currentState; eError = WaitForState(hComponent, state, OMX_StateInvalid, ¤tState); @@ -364,9 +392,9 @@ static OMX_ERRORTYPE RequestState(OMX_HANDLETYPE hComponent, OMX_STATETYPE state KDint OMXToolBasicAV_RequestState(OMXToolBasicAV_t * pOMXAV, OMX_STATETYPE state, KDboolean wait) { KDint i; - fprintf(stdout, "OMXToolBasicAV_RequestState %p s:%d, w:%d\n", pOMXAV, state, wait); fflush(stdout); // JAU + DBG_PRINT( "OMXToolBasicAV_RequestState %p s:%d, w:%d\n", pOMXAV, state, wait); if(NULL==pOMXAV) { - fprintf(stdout, "OMXToolBasicAV_RequestState p1\n"); fflush(stdout); // JAU + DBG_PRINT( "OMXToolBasicAV_RequestState p1\n"); return -1; } @@ -417,22 +445,22 @@ static void DestroyInstanceUnlock(OMXToolBasicAV_t * pOMXAV) int i, res1=0, res2=0; if(NULL==pOMXAV) return; - fprintf(stderr, "Destroy p1\n"); fflush(stderr); + DBG_PRINT( "Destroy p1\n"); PlayStop(pOMXAV); - fprintf(stderr, "Destroy p2\n"); fflush(stderr); + DBG_PRINT( "Destroy p2\n"); if(0!=(res1=OMXToolBasicAV_RequestState(pOMXAV, OMX_StateIdle, KD_TRUE))) { java_throwNewRuntimeException(NULL, "Destroy - Wait for Idle Failed (%d)", res1); } - fprintf(stderr, "Destroy p3\n"); fflush(stderr); + DBG_PRINT( "Destroy p3\n"); SendCommand(pOMXAV, OMX_CommandPortDisable, OMX_ALL, 0); // Ignore error .. - fprintf(stderr, "Destroy p3\n"); fflush(stderr); + DBG_PRINT( "Destroy p3\n"); DetachVideoRenderer(pOMXAV); - fprintf(stderr, "Destroy p4\n"); fflush(stderr); + DBG_PRINT( "Destroy p4\n"); if(0!=(res2=OMXToolBasicAV_RequestState(pOMXAV, OMX_StateLoaded, KD_TRUE))) { if(!res1) { @@ -440,7 +468,7 @@ static void DestroyInstanceUnlock(OMXToolBasicAV_t * pOMXAV) } } - fprintf(stderr, "Destroy p5\n"); fflush(stderr); + DBG_PRINT( "Destroy p5\n"); for(i=0; i<OMXAV_H_NUMBER; i++) { if(0!=pOMXAV->comp[i]) { OMX_FreeHandle(pOMXAV->comp[i]); @@ -449,19 +477,19 @@ static void DestroyInstanceUnlock(OMXToolBasicAV_t * pOMXAV) } if(0!=pOMXAV->flushSem) { - fprintf(stderr, "Destroy p6\n"); fflush(stderr); + DBG_PRINT( "Destroy p6\n"); kdThreadSemFree(pOMXAV->flushSem); pOMXAV->flushSem=0; } if(0!=pOMXAV->mutex) { - fprintf(stderr, "Destroy p7\n"); fflush(stderr); + DBG_PRINT( "Destroy p7\n"); kdThreadMutexUnlock(pOMXAV->mutex); - fprintf(stderr, "Destroy p8\n"); fflush(stderr); + DBG_PRINT( "Destroy p8\n"); kdThreadMutexFree(pOMXAV->mutex); pOMXAV->mutex=0; } - fprintf(stderr, "Destroy DONE\n"); fflush(stderr); + DBG_PRINT( "Destroy DONE\n"); free(pOMXAV); } @@ -589,7 +617,7 @@ static int StartClock(OMXToolBasicAV_t * pOMXAV, KDboolean start, KDfloat32 time eError = OMX_SetConfig(pOMXAV->comp[OMXAV_H_CLOCK], OMX_IndexConfigTimeClockState, &oClockState); while (loop>0 && OMX_ErrorNotReady == eError) { - fprintf(stdout, "Play 3.2\n"); fflush(stdout); // JAU + DBG_PRINT( "Play 3.2\n"); usleep(STATE_SLEEP*1000); loop--; eError = OMX_SetConfig(pOMXAV->comp[OMXAV_H_CLOCK], OMX_IndexConfigTimeClockState, @@ -702,10 +730,10 @@ static int AttachVideoRenderer(OMXToolBasicAV_t * pOMXAV) // mandatory before EGLUseImage OMXSAFE(RequestState(pOMXAV->comp[OMXAV_H_VSCHEDULER], OMX_StateIdle, KD_FALSE)); - fprintf(stdout, "Attach VR %p c:%p\n", pOMXAV, pOMXAV->comp[OMXAV_H_VSCHEDULER]); fflush(stdout); // JAU + DBG_PRINT( "Attach VR %p c:%p\n", pOMXAV, pOMXAV->comp[OMXAV_H_VSCHEDULER]); OMXSAFE(UpdateStreamInfo(pOMXAV)); - fprintf(stdout, "UseEGLImg port enable/tunneling %p\n", pOMXAV); + DBG_PRINT( "UseEGLImg port enable/tunneling %p\n", pOMXAV); OMXSAFE(OMX_SendCommand(pOMXAV->comp[OMXAV_H_CLOCK], OMX_CommandPortEnable, PORT_VRENDERER, 0)); OMXSAFE(OMX_SendCommand(pOMXAV->comp[OMXAV_H_VDECODER], OMX_CommandPortEnable, 1, 0)); OMXSAFE(OMX_SendCommand(pOMXAV->comp[OMXAV_H_VSCHEDULER], OMX_CommandPortEnable, 0, 0)); @@ -718,7 +746,7 @@ static int AttachVideoRenderer(OMXToolBasicAV_t * pOMXAV) // The Texture, EGLImage and EGLSync was created by the Java client, // and registered using the OMXToolBasicAV_SetEGLImageTexture2D command. - fprintf(stdout, "UseEGLImg %p #%d t:%d i:%p s:%p p1\n", pOMXAV, i, pBuf->tex, pBuf->image, pBuf->sync); fflush(stdout); // JAU + DBG_PRINT( "UseEGLImg %p #%d t:%d i:%p s:%p p1\n", pOMXAV, i, pBuf->tex, pBuf->image, pBuf->sync); if(NULL==pBuf->image) { java_throwNewRuntimeException(NULL, "AttachVideoRenderer: User didn't set buffer %d/%d\n", i, pOMXAV->vBufferNum); @@ -732,11 +760,11 @@ static int AttachVideoRenderer(OMXToolBasicAV_t * pOMXAV) pOMXAV, // app private data pBuf->image)); } - fprintf(stdout, "UseEGLImg %p #%d t:%d i:%p s:%p b:%p - p2\n", - pOMXAV, i, pBuf->tex, pBuf->image, pBuf->sync, pBuf->omxBufferHeader); fflush(stdout); // JAU + DBG_PRINT( "UseEGLImg %p #%d t:%d i:%p s:%p b:%p - p2\n", + pOMXAV, i, pBuf->tex, pBuf->image, pBuf->sync, pBuf->omxBufferHeader); } - fprintf(stdout, "UseEGLImg %p #%d DONE\n", pOMXAV, i); fflush(stdout); // JAU + DBG_PRINT( "UseEGLImg %p #%d DONE\n", pOMXAV, i); return 0; } @@ -749,19 +777,19 @@ static int DetachVideoRenderer(OMXToolBasicAV_t * pOMXAV) java_throwNewRuntimeException(NULL, "Attach Video first"); return -1; } - fprintf(stderr, "DetachVideoRenderer p0\n"); fflush(stderr); + DBG_PRINT( "DetachVideoRenderer p0\n"); if(0==CheckState(pOMXAV->comp[OMXAV_H_VSCHEDULER], OMX_StateLoaded)) { - fprintf(stderr, "DetachVideoRenderer DONE (already state loaded)\n"); fflush(stderr); + DBG_PRINT( "DetachVideoRenderer DONE (already state loaded)\n"); return 0; } OMXSAFE(RequestState(pOMXAV->comp[OMXAV_H_VSCHEDULER], OMX_StateIdle, KD_TRUE)); - fprintf(stderr, "DetachVideoRenderer p1\n"); fflush(stderr); + DBG_PRINT( "DetachVideoRenderer p1\n"); OMXSAFE(OMX_SendCommand(pOMXAV->comp[OMXAV_H_CLOCK], OMX_CommandPortDisable, PORT_VRENDERER, 0)); OMXSAFE(OMX_SendCommand(pOMXAV->comp[OMXAV_H_VDECODER], OMX_CommandPortDisable, 1, 0)); OMXSAFE(OMX_SendCommand(pOMXAV->comp[OMXAV_H_VSCHEDULER], OMX_CommandPortDisable, 0, 0)); OMXSAFE(OMX_SendCommand(pOMXAV->comp[OMXAV_H_VSCHEDULER], OMX_CommandPortDisable, 2, 0)); - fprintf(stderr, "DetachVideoRenderer p2\n"); fflush(stderr); + DBG_PRINT( "DetachVideoRenderer p2\n"); for (i = 0; i < pOMXAV->vBufferNum; i++) { OMXToolImageBuffer_t *pBuf = &pOMXAV->buffers[i]; @@ -777,11 +805,11 @@ static int DetachVideoRenderer(OMXToolBasicAV_t * pOMXAV) } OMXSAFE(RequestState(pOMXAV->comp[OMXAV_H_VSCHEDULER], OMX_StateLoaded, KD_TRUE)); - fprintf(stderr, "DetachVideoRenderer p3\n"); fflush(stderr); + DBG_PRINT( "DetachVideoRenderer p3\n"); OMX_FreeHandle(pOMXAV->comp[OMXAV_H_VSCHEDULER]); pOMXAV->comp[OMXAV_H_VSCHEDULER]=NULL; - fprintf(stderr, "DetachVideoRenderer DONE\n"); fflush(stderr); + DBG_PRINT( "DetachVideoRenderer DONE\n"); return 0; } @@ -792,12 +820,12 @@ OMXToolBasicAV_t * OMXToolBasicAV_CreateInstance(int vBufferNum) InitStatic(); if(vBufferNum>EGLIMAGE_MAX_BUFFERS) { - fprintf(stderr, "buffer number %d > MAX(%d)\n", vBufferNum, EGLIMAGE_MAX_BUFFERS); + DBG_PRINT( "buffer number %d > MAX(%d)\n", vBufferNum, EGLIMAGE_MAX_BUFFERS); return NULL; } pOMXAV = malloc(sizeof(OMXToolBasicAV_t)); if(NULL==pOMXAV) { - fprintf(stderr, "Init struct failed!\n"); + DBG_PRINT( "Init struct failed!\n"); return NULL; } memset(pOMXAV, 0, sizeof(OMXToolBasicAV_t)); @@ -827,7 +855,7 @@ int OMXToolBasicAV_SetStream(OMXToolBasicAV_t * pOMXAV, const KDchar * stream) { OMX_ERRORTYPE eError = OMX_ErrorNone; - fprintf(stdout, "SetStream 1 %s ..\n", stream); fflush(stdout); // JAU + DBG_PRINT( "SetStream 1 %s ..\n", stream); // FIXME: verify player state .. ie stop ! if(pOMXAV->status!=OMXAV_INIT) { @@ -837,7 +865,7 @@ int OMXToolBasicAV_SetStream(OMXToolBasicAV_t * pOMXAV, const KDchar * stream) kdThreadMutexLock(pOMXAV->mutex); - fprintf(stdout, "SetStream 3\n"); fflush(stdout); // JAU + DBG_PRINT( "SetStream 3\n"); // Use the "super parser" :) FIXME: Non NV case .. eError = OMX_GetHandle(&pOMXAV->comp[OMXAV_H_READER], "OMX.Nvidia.reader", pOMXAV, &pOMXAV->callbacks); @@ -849,7 +877,7 @@ int OMXToolBasicAV_SetStream(OMXToolBasicAV_t * pOMXAV, const KDchar * stream) return -1; } - fprintf(stdout, "SetStream 4\n"); fflush(stdout); // JAU + DBG_PRINT( "SetStream 4\n"); // Auto detect codecs { @@ -902,11 +930,11 @@ int OMXToolBasicAV_SetStream(OMXToolBasicAV_t * pOMXAV, const KDchar * stream) return -1; } } - fprintf(stdout, "SetStream 5 ; audioPort %d, videoPort %d\n", pOMXAV->audioPort, pOMXAV->videoPort); fflush(stdout); // JAU + DBG_PRINT( "SetStream 5 ; audioPort %d, videoPort %d\n", pOMXAV->audioPort, pOMXAV->videoPort); OMXSAFE(OMX_GetHandle(&pOMXAV->comp[OMXAV_H_CLOCK], "OMX.Nvidia.clock.component", pOMXAV, &pOMXAV->callbacks)); - fprintf(stdout, "Configuring comp[OMXAV_H_CLOCK]\n"); + DBG_PRINT( "Configuring comp[OMXAV_H_CLOCK]\n"); { OMX_TIME_CONFIG_ACTIVEREFCLOCKTYPE oActiveClockType; @@ -922,7 +950,7 @@ int OMXToolBasicAV_SetStream(OMXToolBasicAV_t * pOMXAV, const KDchar * stream) kdThreadMutexUnlock(pOMXAV->mutex); - fprintf(stdout, "SetStream X\n"); fflush(stdout); // JAU + DBG_PRINT( "SetStream X\n"); return 0; } @@ -938,7 +966,7 @@ int OMXToolBasicAV_UpdateStreamInfo(OMXToolBasicAV_t * pOMXAV) { int OMXToolBasicAV_SetEGLImageTexture2D(OMXToolBasicAV_t * pOMXAV, KDint i, GLuint tex, EGLImageKHR image, EGLSyncKHR sync) { if(NULL==pOMXAV) return -1; - fprintf(stdout, "SetEGLImg %p #%d/%d t:%d i:%p s:%p..\n", pOMXAV, i, pOMXAV->vBufferNum, tex, image, sync); fflush(stdout); // JAU + DBG_PRINT( "SetEGLImg %p #%d/%d t:%d i:%p s:%p..\n", pOMXAV, i, pOMXAV->vBufferNum, tex, image, sync); if(i<0||i>=pOMXAV->vBufferNum) return -1; @@ -958,7 +986,7 @@ int OMXToolBasicAV_SetEGLImageTexture2D(OMXToolBasicAV_t * pOMXAV, KDint i, GLui int OMXToolBasicAV_ActivateInstance(OMXToolBasicAV_t * pOMXAV) { int res; if(NULL==pOMXAV) return -1; - fprintf(stdout, "ActivateInstance 1\n"); fflush(stdout); // JAU + DBG_PRINT( "ActivateInstance 1\n"); kdThreadMutexLock(pOMXAV->mutex); @@ -997,24 +1025,24 @@ int OMXToolBasicAV_ActivateInstance(OMXToolBasicAV_t * pOMXAV) { } } - fprintf(stdout, "Setup tunneling\n"); fflush(stdout); // JAU + DBG_PRINT( "Setup tunneling\n"); { // do tunneling if (pOMXAV->audioPort != -1) { - fprintf(stdout, "Setup tunneling audio\n"); fflush(stdout); // JAU + DBG_PRINT( "Setup tunneling audio\n"); OMXSAFE(OMX_SetupTunnel(pOMXAV->comp[OMXAV_H_READER], pOMXAV->audioPort, pOMXAV->comp[OMXAV_H_ADECODER], 0)); // The rest of the audio port is configured in AttachAudioRenderer } if (pOMXAV->videoPort != -1) { - fprintf(stdout, "Setup tunneling video\n"); fflush(stdout); // JAU + DBG_PRINT( "Setup tunneling video\n"); OMXSAFE(OMX_SetupTunnel(pOMXAV->comp[OMXAV_H_READER], pOMXAV->videoPort, pOMXAV->comp[OMXAV_H_VDECODER], 0)); // The rest of the video port is configured in AttachVideoRenderer } } - fprintf(stdout, "ActivateInstance .. %p\n", pOMXAV); fflush(stdout); + DBG_PRINT( "ActivateInstance .. %p\n", pOMXAV); // // mandatory: wait until all devices are idle @@ -1028,7 +1056,7 @@ int OMXToolBasicAV_ActivateInstance(OMXToolBasicAV_t * pOMXAV) { } pOMXAV->status=OMXAV_STOPPED; kdThreadMutexUnlock(pOMXAV->mutex); - fprintf(stdout, "ActivateInstance done %p\n", pOMXAV); fflush(stdout); + DBG_PRINT( "ActivateInstance done %p\n", pOMXAV); return 0; } @@ -1087,16 +1115,16 @@ int OMXToolBasicAV_PlayStart(OMXToolBasicAV_t * pOMXAV) int res; if(NULL==pOMXAV) return -1; if(pOMXAV->status<=OMXAV_INIT) { - fprintf(stderr, "Err: Play invalid"); fflush(stderr); + fprintf(stderr, "Err: Play invalid"); return -1; } if(pOMXAV->status==OMXAV_PLAYING) { return 0; } - fprintf(stdout, "Play 1\n"); fflush(stdout); // JAU + DBG_PRINT( "Play 1\n"); kdThreadMutexLock(pOMXAV->mutex); - fprintf(stdout, "Play 2\n"); fflush(stdout); // JAU + DBG_PRINT( "Play 2\n"); if(OMXToolBasicAV_CheckState(pOMXAV, OMX_StateIdle)) { if(0!=(res=OMXToolBasicAV_RequestState(pOMXAV, OMX_StateIdle, KD_TRUE))) { @@ -1106,29 +1134,29 @@ int OMXToolBasicAV_PlayStart(OMXToolBasicAV_t * pOMXAV) } } if(pOMXAV->status==OMXAV_PAUSED) { - fprintf(stdout, "Play 3.0\n"); fflush(stdout); // JAU + DBG_PRINT( "Play 3.0\n"); SetClockScale(pOMXAV, 1); } - fprintf(stdout, "Play 3.1\n"); fflush(stdout); // JAU + DBG_PRINT( "Play 3.1\n"); if(0!=(res=OMXToolBasicAV_RequestState(pOMXAV, OMX_StateExecuting, KD_TRUE))) { java_throwNewRuntimeException(NULL, "Play Execute Failed (%d)", res); kdThreadMutexUnlock(pOMXAV->mutex); return res; } if(pOMXAV->status==OMXAV_STOPPED || pOMXAV->status==OMXAV_FIN) { - fprintf(stdout, "Play 3.2\n"); fflush(stdout); // JAU + DBG_PRINT( "Play 3.2\n"); if(StartClock(pOMXAV, KD_TRUE, 0.0)) { java_throwNewRuntimeException(NULL, "Play StartClock Failed"); kdThreadMutexUnlock(pOMXAV->mutex); return -1; } - fprintf(stdout, "Play 3.3\n"); fflush(stdout); // JAU + DBG_PRINT( "Play 3.3\n"); } - fprintf(stdout, "Play 4.0\n"); fflush(stdout); // JAU + DBG_PRINT( "Play 4.0\n"); kdThreadMutexUnlock(pOMXAV->mutex); pOMXAV->status=OMXAV_PLAYING; - fprintf(stdout, "Play DONE\n"); fflush(stdout); // JAU + DBG_PRINT( "Play DONE\n"); return 0; } @@ -1296,8 +1324,8 @@ GLuint OMXToolBasicAV_GetTexture(OMXToolBasicAV_t * pOMXAV) { if(pOMXAV->status==OMXAV_PLAYING) { int next = (pOMXAV->omxPos + 1) % pOMXAV->vBufferNum; - // fprintf(stdout, "GetTexture A avail %d, filled %d, pos o:%d g:%d\n", - // pOMXAV->available, pOMXAV->filled, pOMXAV->omxPos, pOMXAV->glPos); fflush(stdout); + DBG_PRINT2("GetTexture A avail %d, filled %d, pos o:%d g:%d\n", + pOMXAV->available, pOMXAV->filled, pOMXAV->omxPos, pOMXAV->glPos); while (pOMXAV->filled < pOMXAV->vBufferNum) { @@ -1307,25 +1335,25 @@ GLuint OMXToolBasicAV_GetTexture(OMXToolBasicAV_t * pOMXAV) { attr == EGL_SIGNALED_KHR ) ) { - // fprintf(stdout, "GetTexture p2.1 attr 0x%X\n", attr); fflush(stdout); + DBG_PRINT2( "GetTexture p2.1 attr 0x%X\n", attr); // OpenGL has finished rendering with this texture, so we are free // to make OpenMAX IL fill it with new data. OMX_FillThisBuffer(pOMXAV->comp[OMXAV_H_VSCHEDULER], pOMXAV->buffers[pOMXAV->omxPos].omxBufferHeader); - // fprintf(stdout, "GetTexture p2.2\n", attr); fflush(stdout); + DBG_PRINT2( "GetTexture p2.2\n"); pOMXAV->omxPos = next; next = (pOMXAV->omxPos + 1) % pOMXAV->vBufferNum; pOMXAV->filled++; } else { - // fprintf(stdout, "GetTexture p2.3\n", attr); fflush(stdout); + DBG_PRINT2( "GetTexture p2.3\n"); break; } } } if (pOMXAV->available > 1) { - // fprintf(stdout, "GetTexture p3.1\n"); fflush(stdout); + DBG_PRINT2("GetTexture p3.1\n"); // We want to make sure that the previous eglImage // has finished, so insert a fence command into the // command stream to make sure that any rendering using @@ -1335,7 +1363,7 @@ GLuint OMXToolBasicAV_GetTexture(OMXToolBasicAV_t * pOMXAV) { // was successfull. if (!_hasEGLSync || eglFenceKHR(pOMXAV->buffers[pOMXAV->glPos].sync)) { - // fprintf(stdout, "GetTexture p3.2\n"); fflush(stdout); + DBG_PRINT2( "GetTexture p3.2\n"); pOMXAV->available--; pOMXAV->filled--; pOMXAV->glPos = (pOMXAV->glPos + 1) % pOMXAV->vBufferNum; @@ -1344,8 +1372,8 @@ GLuint OMXToolBasicAV_GetTexture(OMXToolBasicAV_t * pOMXAV) { } texID = pOMXAV->available ? pOMXAV->buffers[ret].tex : 0; - // fprintf(stdout, "GetTexture B avail %d, filled %d, pos o:%d g:%d t:%d\n", - // pOMXAV->available, pOMXAV->filled, pOMXAV->omxPos, pOMXAV->glPos, texID); fflush(stdout); + DBG_PRINT2( "GetTexture B avail %d, filled %d, pos o:%d g:%d t:%d\n", + pOMXAV->available, pOMXAV->filled, pOMXAV->omxPos, pOMXAV->glPos, texID); kdThreadMutexUnlock(pOMXAV->mutex); return texID; @@ -1365,11 +1393,6 @@ void OMXToolBasicAV_DestroyInstance(OMXToolBasicAV_t * pOMXAV) static PFNEGLDESTROYIMAGEKHRPROC eglDestroyImageKHR; -#ifdef _WIN32_WCE - #define STDOUT_FILE "\\Storage Card\\stdout.txt" - #define STDERR_FILE "\\Storage Card\\stderr.txt" -#endif - int ModuleTest() { int i; @@ -1424,11 +1447,6 @@ int ModuleTest() // KDint wSize[2]; -#ifdef _WIN32_WCE - _wfreopen(TEXT(STDOUT_FILE),L"w",stdout); - _wfreopen(TEXT(STDERR_FILE),L"w",stderr); -#endif - /* * EGL initialisation. */ @@ -1535,17 +1553,17 @@ int ModuleTest() } } - printf("7\n"); fflush(stdout); + printf("7\n"); if( OMXToolBasicAV_ActivateInstance(pOMXAV) ) { return -1; } - printf("8\n"); fflush(stdout); + printf("8\n"); if( OMXToolBasicAV_PlayStart(pOMXAV) ) { return -1; } - printf("8.2\n"); fflush(stdout); + printf("8.2\n"); i = 0; while (i++ < 10) { @@ -1554,7 +1572,7 @@ int ModuleTest() // set attributes // draw arrays .. eglSwapBuffers(eglDisplay, eglWindowSurface); - printf("Sleep %d\n", i); fflush(stdout); + printf("Sleep %d\n", i); usleep(1000); } |