Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C++ Java AWT JNI
Hi All,
I am working on a project similar to embedding opengl inside java in which a an animated figure is drawn into an AWT canvas using JNI and AWT native interface.
 
I have a third party application software whose method for live video is providing the same functionality. I have played the live video in a java canvas added in an applet using that method but the problem is once the video rendering starts the applet gets stuck and no more native methods can be called. until the JVM crashes or the applet is closed forcibly.
 
I have followed every step mentioned for AWT native interface.
 
Kindly help me
Thanks in advance.
Posted 11-Sep-12 1:25am
AhmdAxf452
Comments
pasztorpisti at 11-Sep-12 8:39am
   
This is not a specific/valid question. The answer can only be that your program and/or at least one of the libraries you use contain bug(s). I'm working on opengl app on android whose renderer is native. If you want to use native opengl combined with whatever platform/whatever language then you have to do this: Create the view/window using your whatever langauge / whatever platform - also create an opengl context. Everything else starting from your glViewport() call can be done in native. Insert a lot of glGetError() calls inside your renderer to catch all possible bugs, put in these glGetError() calls with macros to be able to remove them quickly from your release build. The reason for your crash can be totally unrelated to your opengl code.
AhmdAxf at 12-Sep-12 5:42am
   
Dear pasztorpisti
As I have mentioned earlier that I'm not using OpenGl but instead a device SDK which is doing the same function as OpenGl does. My Interface is in Java and rendering is done from native(c++) side .The following article can provide with the information of awt native interface and how it works.
 
http://docs.oracle.com/javase/1.3/docs/guide/awt/AWT_Native_Interface.html
 
Sometimes rendering into java applet works fine but most of the time it gets stuck. No response at all and the video stops too.
Plz help me

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 555
1 Kornfeld Eliyahu Peter 409
2 Maciej Los 369
3 DamithSL 196
4 OriginalGriff 188
0 OriginalGriff 6,353
1 DamithSL 4,854
2 Maciej Los 4,466
3 Kornfeld Eliyahu Peter 4,058
4 Sergey Alexandrovich Kryukov 3,897


Advertise | Privacy | Mobile
Web02 | 2.8.141220.1 | Last Updated 11 Sep 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100