#jogamp @ irc.freenode.net - 20130708 05:05:23 (UTC)


20130708 05:05:23 -jogamp- Previous @ http://jogamp.org/log/irc/jogamp_20130707050523.html
20130708 05:05:23 -jogamp- This channel is logged @ http://jogamp.org/log/irc/jogamp_20130708050523.html
20130708 07:58:25 * rmk0-alt (~rmk0-alt@anon) Quit (Ping timeout: 246 seconds)
20130708 07:58:54 * rmk0 (~rmk0@anon) Quit (Ping timeout: 264 seconds)
20130708 08:15:11 * ebrayet (~Adium@anon) has joined #jogamp
20130708 09:54:43 <olamedia> mwahaha... leaving anatomy atm, reading MovieCube.java
20130708 10:06:08 * [Mike] (~Mike]@anon) Quit ()
20130708 10:24:41 <olamedia> nice.. http://rghost.ru/47287613.view
20130708 10:26:38 <olamedia> but how to enable audio?
20130708 10:32:03 * ebrayet (~Adium@anon) Quit (Quit: Leaving.)
20130708 10:48:23 * ebrayet (~Adium@anon) has joined #jogamp
20130708 10:48:29 * rmk0-alt (~rmk0-alt@anon) has joined #jogamp
20130708 10:48:29 * rmk0-alt (~rmk0-alt@anon) Quit (Changing host)
20130708 10:48:29 * rmk0-alt (~rmk0-alt@anon) has joined #jogamp
20130708 11:01:33 * rmk0 (~rmk0@anon) has joined #jogamp
20130708 11:01:33 * rmk0 (~rmk0@anon) Quit (Changing host)
20130708 11:01:33 * rmk0 (~rmk0@anon) has joined #jogamp
20130708 11:45:20 <olamedia> i mean... i see a String getCodec(), but where is getaudioStream()?
20130708 11:46:43 <olamedia> do i need to parse container manually? or i just don't see a simple way?
20130708 12:12:34 <sgothel> @Ola: It will be resolved soon, i.e. WIP
20130708 12:14:08 <olamedia> what about bug with classloader?
20130708 12:14:13 <olamedia> can't find it
20130708 12:14:41 <olamedia> invalid?
20130708 12:18:45 <olamedia> Thread.currentThread().getContextClassloader() will point to a application classloader
20130708 12:19:48 <sgothel> Invalid b/c you claim a class or function 'shall' to something, which is not the case.
20130708 12:19:49 <olamedia> Passing CL/libs via TempJarCache is a strange way
20130708 12:20:11 <sgothel> Again: you may want to write and 'install' your own ClassLoader
20130708 12:20:25 <olamedia> >_> via TempJarCache?
20130708 12:21:00 <sgothel> You may utilize TempJarCache (or a modified version ..) to impl. your desired CL ( I mention this now the 3rd time )
20130708 12:21:18 <olamedia> why i need to know about gluegen core to just find file that my classloader can find and your default classloader can't
20130708 12:21:46 <sgothel> We use that class w/o using a CL, b/c we have control over the point of loading the libs, and hence can utilize our API.
20130708 12:22:07 <sgothel> On Android .. we do install our ClassLoader .. for example.
20130708 12:22:12 <olamedia> sec...
20130708 12:22:59 <sgothel> you do not need to know anything about GlueGen, TempJarCache is just an example how you can find things in a JAR file, thats all.
20130708 12:26:30 <olamedia> There was 2 problems
20130708 12:27:05 <olamedia> with .jar and with natives.jar
20130708 12:27:58 <olamedia> with natives because path to natives is calculated from base .jar
20130708 12:28:23 <olamedia> with .so because CL used was system
20130708 12:28:26 <sgothel> State your question please ?
20130708 12:29:03 <olamedia> about natives: nativeJarURL = JarUtil.getJarFileURL(jarUrlRoot, nativeJarName);
20130708 12:29:45 <sgothel> Pls formulate a complete question I can answer please.
20130708 12:31:42 <olamedia> about .so: final ClassLoader cl = info.getClass().getClassLoader(); - a system classloader
20130708 12:32:33 <sgothel> the above will return you the CL used to load the class of the instance info
20130708 12:33:23 <sgothel> please make yourself familiar w/ CL, lots of material is available.
20130708 12:33:28 <olamedia> not the question, but a "minor" "problem": gluegen NOT using application's classloader
20130708 12:33:55 <olamedia> well... i did a big research on CL yesterday
20130708 12:33:56 <sgothel> we use the CL which is being used to load a class
20130708 12:34:30 <sgothel> actually one of our probably signed classes, probably a HTTP/JAR CL
20130708 12:34:53 <sgothel> in Platform we determine whether a Jar capable CL was being used
20130708 12:35:32 <sgothel> CL depends how you launch an application .. there can be many different ones
20130708 12:35:40 <sgothel> CL can be daisy chained .. etc etc etc
20130708 12:35:48 <olamedia> :/ the problem i can't change CL jogl using without making specific to jogl changes
20130708 12:36:12 <sgothel> you can ofc change the CL which is in use ..
20130708 12:36:20 <sgothel> I give you one example .. one sec ..
20130708 12:36:36 <olamedia> no need
20130708 12:36:44 <olamedia> i saw TempJarCache
20130708 12:36:51 <sgothel> in this case .. why do you even ask ?
20130708 12:37:09 <olamedia> i won't touch TempJarCache
20130708 12:37:44 <sgothel> TestTempJarCache.testTempJarCache04bDiffClassLoader() <- shows you _how_ to use a diff. CL and it's implications w/o actually needing to use TempJarCache
20130708 12:37:49 <olamedia> because i don't like to use low-level api to fix something that can be resolved in another way
20130708 12:38:11 <sgothel> well - you are welcome - CL course over now :)
20130708 12:39:09 <olamedia> anyway, ClassLoader itself saves own copy to Thread's context
20130708 12:39:23 <olamedia> i mean java.lang.ClassLoader
20130708 12:40:02 <olamedia> using local classloader is useful only to find resources relative to package
20130708 12:40:32 <olamedia> yes, i read a sources of openjdk6
20130708 12:40:45 <olamedia> to find a way...
20130708 12:41:28 <olamedia> but no way was found... only command-line argument to replace system classloader
20130708 12:42:13 <sgothel> If you carefully read above test - you may understand how to create a 'launcher' using your classloader!
20130708 12:45:30 <olamedia> ...
20130708 12:45:43 <olamedia> useless
20130708 12:50:45 <olamedia> the only way to set custom classloader somethere is Thread.currentThread().setContextClassLoader()
20130708 12:51:07 <olamedia> except for comman line arguments
20130708 12:51:14 <olamedia> *d
20130708 12:52:02 <sgothel> well, Ola, your are very wrong here. but pls .. suit yourself :)
20130708 12:52:15 <olamedia> the .class.getClassLoader() is basic lang.ClassLoader which uses reflection to get caller class
20130708 12:53:02 <olamedia> read the sources of java.lang.classloader if u think i'm wrong
20130708 12:53:25 <olamedia> and sources of Class.getClassLoader
20130708 12:53:51 <sgothel> (02:31:42 PM) olamedia: about .so: final ClassLoader cl = info.getClass().getClassLoader(); - a system classloader
20130708 12:53:51 <sgothel> (02:32:33 PM) sgothel: the above will return you the CL used to load the class of the instance info
20130708 12:54:22 <olamedia> and it will be java.lang.ClassLoader
20130708 12:55:00 <sgothel> think about it .. and read the mentioned unit test - which actually tests this (here .. the visibility of static global fields .. etc)
20130708 12:55:20 <sgothel> and yes, all CL's inherit that type :)
20130708 12:55:38 <olamedia> >_>
20130708 12:57:06 <olamedia> testTempJarCache04bDiffClassLoader() tests nothing useful
20130708 12:57:35 <olamedia> it does not tests Diff ClassLoader as stated in title
20130708 12:59:38 <sgothel> you really like to steal my time, don't you ? :)
20130708 12:59:54 <sgothel> ClassLoader cl2 = new TestClassLoader(urls, null);
20130708 12:59:55 <sgothel> ..
20130708 13:00:07 <olamedia> and?
20130708 13:00:22 <olamedia> which classes will it load?
20130708 13:00:52 <sgothel> Then we use CLs cl2 and cl3 to load and call a method name of TempJarCache
20130708 13:01:13 <sgothel> we later receive an instance (fileCache*)
20130708 13:01:26 <sgothel> then we prove that the instances static globals are different
20130708 13:01:55 <sgothel> since a separate CLs do have their own heap space etc
20130708 13:02:53 <sgothel> testTempJarCache04aSameClassLoader <- tests the contrary .. i.e same CL == same static globals
20130708 13:08:24 <olamedia> >_> and how it will allow to use different classloader?
20130708 13:09:49 <olamedia> this test covers manual loading of class, and btw using URLClassLoader which uses parent java.lang.ClassLoader if it will not find class itself
20130708 13:10:25 <olamedia> u say i need to load 200+ classes manually?
20130708 13:10:33 <sgothel> the test itself shows you how to load a class /w custom classloader. the class'es code then will use that CL it is being loaded with .. i.e. getClass().getClassLoader() will return it.
20130708 13:10:40 <olamedia> ahaha
20130708 13:10:48 <sgothel> that is how i.e. Applet etc is being implemented
20130708 13:10:57 <olamedia> yes, how to load manually with custom CL
20130708 13:10:58 <sgothel> each Applet instance uses it's own CL instance
20130708 13:11:13 <sgothel> I guess we should be good now - you are welcome :)
20130708 13:12:09 <olamedia> ok... th base problem: i want to provide classpath at runtime
20130708 13:12:25 <olamedia> i.e. /lib, /natives etc
20130708 13:12:29 <sgothel> then .. do-it :)
20130708 13:12:51 <olamedia> the only way - is to use command line or use thread's CL
20130708 13:13:11 <olamedia> but gluegen don't check thread CL
20130708 13:13:12 <sgothel> at your launching point (main .. whatever) .. instantiate your CL .. and then load a class w/ that CL and invoke a 'continuation point'
20130708 13:13:32 <olamedia> .. instantiate your CL .. and then load a class .. instantiate your CL .. and then load a class .. instantiate your CL .. and then load a class
20130708 13:13:37 <olamedia> for each class
20130708 13:13:46 <olamedia> *i mean load
20130708 13:13:55 <olamedia> each time before
20130708 13:14:17 <olamedia> for example, nifty-gui uses Thread's CL
20130708 13:14:35 <sgothel> workflow: A(cl1) --- ctor B(cl2) -- invoke B.b()
20130708 13:14:42 <olamedia> it's the same java.lang.CL by default
20130708 13:14:55 <sgothel> then all 'continuation' in that workflow will use cl2
20130708 13:15:07 <sgothel> so you only need to do it at one point
20130708 13:15:22 <sgothel> hence: launching / spring 'design' .. whatever
20130708 13:15:24 <olamedia> what is the B?
20130708 13:15:34 <sgothel> A and B are classes
20130708 13:15:41 <sgothel> A is your launcher class
20130708 13:15:49 <sgothel> B is like your application main class
20130708 13:16:09 <sgothel> you instantiate B w/ your desired CL and invoke a method of it (as shown in unit test)
20130708 13:16:11 <sgothel> done
20130708 13:16:13 <olamedia> u mean, use reflection to load application class using custom CL?
20130708 13:16:19 <sgothel> yes
20130708 13:16:46 <olamedia> hmm
20130708 13:16:54 <olamedia> i'll try it
20130708 13:17:09 <sgothel> from that point on (B.b()) .. you are int he environment of cl2 ..
20130708 13:17:48 <sgothel> only this way .. you are compatible w/ any other launching mechanism (Applet, JNLP, etc)
20130708 13:18:01 <olamedia> ok... i'll try it and post the results
20130708 13:18:28 <sgothel> We use this design .. to even add reusing other APKs on Android.
20130708 13:18:56 <olamedia> ..about GLMediaPlayer... is it difficult to extract audio stream? may be some way already exists?
20130708 13:19:32 <sgothel> again: WIP
20130708 13:19:40 <sgothel> WIP == work in progress
20130708 13:20:03 <olamedia> i know, but WIP can described in months or years
20130708 13:20:13 <sgothel> especially when answering all Qs here :)
20130708 13:20:18 <olamedia> :/
20130708 13:20:42 <olamedia> i did not found your proposed way to change classloader
20130708 13:20:43 <sgothel> (which are common knowledge somwhat .. but OK, if it leads to good results - ofc)
20130708 13:20:48 <olamedia> anywhere
20130708 13:21:18 <olamedia> it's rare knowledge, i think
20130708 13:21:20 <sgothel> but pls .. respect my statements - give me the benefit of doubt .. as we say :)
20130708 13:21:38 <sgothel> i.e. read carefully what I sent you - I do it for a reason
20130708 13:22:42 <sgothel> and when I say 'your are welcome', I imply you have said 'thank you' :)
20130708 13:23:00 <olamedia> XD thank you
20130708 13:23:20 <sgothel> 8-]
20130708 13:31:00 <olamedia> partially extracted Camera https://github.com/olamedia/camera
20130708 13:32:24 <olamedia> left frustum rendering & picking code for a camera
20130708 13:32:40 <olamedia> i mean, unported
20130708 13:34:57 <olamedia> sgothel, did u saw the code/readme?
20130708 13:36:05 <olamedia> that is the camera i'm using. can setup matrices both for FFP & shaders
20130708 13:42:19 <olamedia> some camera code can be probably included into utils at some moment >_> it will be useful addition - saves time to write own camera code
20130708 13:43:58 <sgothel> If you like cooperation, which is great, then our existing frustum code shall be *tested* and re-used .. license aligned, then we could discuss how to leverage things.
20130708 13:44:59 <olamedia> i'll return back to frustum at some time... will think again how to test it better
20130708 13:45:26 <olamedia> atm i'm extracting all pieces of code into modules
20130708 13:45:33 <sgothel> .. testing within our existing codebase and unit test framework
20130708 13:46:12 <sgothel> as you wish, pls be brief when posting your project advancements, if jogamp unrelated (i.e. don't dump traces here, use URL links etc).
20130708 13:46:25 <olamedia> i understand... i'm just to far from frustum atm
20130708 13:47:11 <olamedia> i need to reread code 3-4 times again to remember
20130708 13:48:19 <olamedia> did i posted some unrelated traces?
20130708 13:49:33 <olamedia> at least i don't post complete traces XD
20130708 13:49:45 <olamedia> only meanful parts
20130708 13:52:08 <olamedia> A the moment i want to try myself to extract audio stream and sync it to video
20130708 13:53:16 <olamedia> Can you give me some references? I'll return some snippets if make some success
20130708 13:53:56 <sgothel> Nope, I work on diff. issues now - you have to wait until it's published.
20130708 13:54:27 <olamedia> i have to look for references myself <= fixed
20130708 14:03:02 <olamedia> btw... what about GStreamer?
20130708 14:03:52 <olamedia> ffmpeg is better, of course as it's a very low-level decoder
20130708 14:05:21 <olamedia> *ffmpeg will be faster, but it's mainly on linux and have bad license
20130708 14:06:17 <olamedia> *bad=restricting modification/packing without conflicts
20130708 14:08:55 <olamedia> about half of debian/ubuntu players using gstreamer
20130708 14:09:08 <olamedia> another half - ffmpeg/mplayer
20130708 14:10:26 <olamedia> i'm using smplayer: QT gui for mplayer capable of showing subtitles
20130708 15:20:40 * ebrayet (~Adium@anon) Quit (Quit: Leaving.)
20130708 16:18:00 * ebrayet (~Adium@anon) has joined #jogamp
20130708 16:31:32 * ebrayet (~Adium@anon) Quit (Quit: Leaving.)
20130708 16:39:15 * ebrayet (~Adium@anon) has joined #jogamp
20130708 16:43:25 * ebrayet (~Adium@anon) Quit (Ping timeout: 246 seconds)
20130708 20:57:32 * ebrayet (~Adium@anon) has joined #jogamp
20130708 22:07:57 * ebrayet (~Adium@anon) Quit (Ping timeout: 264 seconds)
20130708 22:11:26 * ebrayet (~Adium@anon) has joined #jogamp
20130708 23:07:39 * ebrayet (~Adium@anon) Quit (Quit: Leaving.)
20130709 02:48:40 * hharrison (~chatzilla@anon) has joined #jogamp
20130709 03:38:01 <hharrison> Anybody interested in doing some keysigning at siggraph?
20130709 03:55:22 * hharrison (~chatzilla@anon) Quit (Quit: ChatZilla 0.9.90 [Firefox 22.0/20130621124006])
20130709 05:05:23 -jogamp- Continue @ http://jogamp.org/log/irc/jogamp_20130709050523.html