libxine-java-devel Mailing List for libxine-java (Page 2)
Status: Beta
Brought to you by:
freckle
You can subscribe to this list here.
2008 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
(6) |
Jul
|
Aug
(1) |
Sep
(20) |
Oct
|
Nov
|
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2010 |
Jan
|
Feb
(2) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2011 |
Jan
(3) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Matthias R. <mri...@in...> - 2008-08-26 22:34:53
|
HI all! I've finished the SWT port and wrapped a new release, here are the release notes and changelog: Release Name: libxine-java-0.7.0 Notes: libxine-java now provides SWT support for the Linux/GTK+ and Mac OS X/ Carbon platforms! A new eye candy is the support for xine's audio visualizers goom, oscope, etc... Trivial but important: the video is now centered. On OS X, a list of mounted DVDs is provided. Have fun Matthias Changes: libxine-java 0.7 * SWT support for Linux/GTK+ and Mac OS X/Carbon * New XineVisualizer class for xine's audio visualizers goom, oscope, etc.. * Video now centered in View * Java Windowing Toolkit (AWT/Swing) only initialized if actually used * DvdInfo - fixed to work on OS X with mounted DVDs, too. - new method getDvdPaths to detect mounted DVDs on Mac OS X * Xine - new factory method Xine.createController() for audio-only playback * XineController - new methods to query stream for hasAudio() and hasVideo() - new methods for volume control (Thanks Berend!) * Add XineController.stop() method * BUG FIX: XineController.playOnce could only be called once * Build system - added --with-swt-jar=... to specify SWT path - don't test Objective-C compiler on non-darwin platforms - creates build.xml, org/libxine/XineConfig.java created - libxine-java version specified only in configure.in * AWT specific native code in jawt_info.c |
From: Matthias R. <mri...@in...> - 2008-06-27 10:21:48
|
Hi Claudio > > Hi! > I'm using libxine-java to write a broadcast program. > I didn't found any documentation on how to use the bindings. > How should i go? Do you reccomend me any examples to look. On http://libxine-java.ringwald.ch/?n=Main.Example I've put a simple example on how to play a movie. > > > For example: > -put a logo on the screen for a while You can show a logo similar to showing a video. Just pass the MRL to the logo, wait, and go on. > -Show the system time For this you can use the OSD part of xine, but I've not played with it so far. I will try to use. > > -start playing a movie from any point in the stream. Just find out, which xine function you have to call for positioning. See the code in XineController on how to call native xine methods. I will add a method to XineController soon. thanks for the feature request. :) matthias |
From: Matthias R. <mri...@in...> - 2008-06-27 09:55:17
|
On 26.06.2008, at 11:03, Aekold Helbrass wrote: > Hi, Matthias!! > > I played a bit with it, and have few improvements: > 1. all video-related parts can be removed, it still works: > stream = XineLib.INSTANCE.xine_stream_new(xine, ao_port, null); ok. > > 2. it's for exiting when stream ends: > while (XineLib.INSTANCE.xine_get_status(stream) == 2) { > try { > Thread.sleep(5); > } catch (Exception e){}; > } > so you need to add method to XineLib: > int xine_get_status(Pointer stream); you're doing a periodic call through JNA every 5 ms which is not efficient. The xine-event handling works: when the stream is finished, you get a callback and there is no busy waiting (which is ALWAYS bad by design). I've provided XineController.playOnce() if you just want to wait until the stream is over. Or you can register a XineEventCallback, which is called whenever something changes, like e.g. the stream ends. > > > and now i have few questions: > 1. there are lots of defined integers in xine.h, did you noticed any > way to map it using JNA or we need to hardcode it? Nope. But a good editor with Block-Editing can help a lot in this. I didn't see anything which would help on JNA page. SWIG does it automatically, though. > 2. there are some problems with my cpp andestanding, like uint32_t > return types. It's something like Java class with definition lower in > code? but i can't find any definitions... ? uint32_t denotes an unsigned integer variable which uses 32 bits. I guess I've mapped it to a Java int which is 32 bits but signed. If the value is above 2^31 ( ca. 2 000 000 000) we will get a wrong value back from the C part. m. > > > On 6/25/08, Matthias Ringwald <mri...@in...> wrote: >> Hi >> >> In the process of evaluating the Java Native Access for libxine- >> java, I've >> created an audio-only port of it. >> It's available in the SVN at >> https://libxine-java.svn.sourceforge.net/svnroot/libxine-java/branches/libxine-java-jna >> >> It needs the jna.jar which can be downloaded into the libs folder >> by: ant >> libs >> >> The MuXine.java example is simliar to the one from libxine-java >> using SWIG >> & JNI. >> >> Only a limited subset of xine is available yet. Be careful! :) >> >> I'm not sure, if using JNA is a viable option in general, but it >> might be >> for some projects. >> >> Matthias >> |
From: Matthias R. <mri...@in...> - 2008-06-25 17:13:21
|
Hi In the process of evaluating the Java Native Access for libxine-java, I've created an audio-only port of it. It's available in the SVN at https://libxine-java.svn.sourceforge.net/svnroot/libxine-java/branches/libxine-java-jna It needs the jna.jar which can be downloaded into the libs folder by: ant libs The MuXine.java example is simliar to the one from libxine-java using SWIG & JNI. Only a limited subset of xine is available yet. Be careful! :) I'm not sure, if using JNA is a viable option in general, but it might be for some projects. Matthias |
From: Matthias R. <mri...@in...> - 2008-06-24 09:45:41
|
HI Ok, I'm not conviced on the general choice of using JNA over JNI. Especially, I'm not really sure, if libxine-java _can_ be implemented using JNA and if yes, what the consequences woulde be. Nevertheless, I can understand your situation and I'm acutally quite confident to think that using the audio part of xine should be useable via JNA. I guess it might as well be a test case to see if porting libxine-java to use JNA is a godd idea. maybe, we could have a branch/libxine-java-jna-audio for now. I guess keeping with the current libxine-java API should be a good idea. Did you already try to use JNA and tried to e.g. call printf via JNA or opened xine-lib by calling xine_new() ? Getting xine to play a song is easy as the video part is the tricky one. I can take the muxine.c code from xinehq.de and remove the video stuff to build a minimal xine-based audio player with maybe 100 lines of C code. than, this has to be converted to JNA use which will require quite some manual work (which is done by SWIG in the current libxine-java). you have to re-type all calls and structure you want to use with JAN. For an audio player luckily this won't be to many. let's see, maybe JNA can be used for libxine-java, but I'm sure an audio player is possible. why does aTunes uses xine/mplayer at all? can't java play audio already? I think I've seen at least a pure Java mp3 player, or do you want to play other stuff like ogg etc, too? matthias On 24.06.2008, at 11:08, Aekold Helbrass wrote: > Hi, Matthias!! Thanx for great answer!! > > there are few reasons of preferring JNA over JNI: > 1. honestly, i'm too far from C++ to support it or even compile it for > my system. I can see some hardcoded path to libxine in java code, and > it scares me. So for java-only developer JNA is preferred way. > 2. it is harder to support JNI thatn JNA (as for me of course), > because you have to recompile it to all (supported) platforms, lib > versions, have to support your Cpp code and handle env integration > yourself. If you're working on single project - you may not see any > difference, but if there are 3 or 4 projects you want to work with - > it is harder to support this quantity of code and platform variations. > > I am contributing a bits of code to aTunes (http://atunes.org), and > it's using mplayer as engine, invoking mplayer as child process. I > prefer xine over mplayer, and aTunes already imports some JNA code for > all platforms. I am almost sure that aTunes developers will not import > libxine-java bridge for this purpose. So, i need some your knowledge > of cpp and libxine to write JNA invocations to libxine to play simple > audio file and may be setup equalizer. May be after i'll get some > experience with JNA and libxine, i'll handle other functionality > myself, but for now... > > regards!! |
From: Matthias R. <mri...@in...> - 2008-06-23 16:10:05
|
On 23.06.2008, at 11:35, Aekold Helbrass wrote: > Hi All! > > I have one idea and need a bit of your help. There is java.net project > https://jna.dev.java.net/, can we collaborate and use it instead of > jni? I have no C++ knowledge, but have enough java experience. And we > can put result into your sf.net project :) to attract more users to > both xine and libxine-java. Hi there I've had a look at JNA before, especially since gstreamer for java uses it. So far I don't see a real benefit of using JNA over the current SWIG-based approach. On an abstract level, JNA does the same as SWIG but at run-time instead of compile time, so a NOP-call using JNA is about 10x slower than one using SWIG which creates JNI C code. Switching from SWIG to JNA would require a major effort, since most part of libxine-java has to be rewritten. I've written the native code to integrate xine into java in C for the xcb/x11 backend and in Objective-C for Mac OS X. The native part is about 1200 lines of code which is similar to the Java part. The not-so-easy part of libxine-java is not its JNI use (which is actually quite straight forward, if you're used to C), but to figure out, how to interact with the native environment. This problem would be persist with JNA. For development/debugging, I have written C test code and used the gdb for source-level debugging. Doing the same from Java would introduce more risk as JNA might not doing its magic properly. What are your ideas? Why would you prefere a JNA solution over the JNI/ SWIG on? How does it help to attract more users? People would still need to install xine-lib. If they manage that, they can also manage to install libxine-java. If installation is a hurdle, packaging libxine-java for debian/red hat/etc.. might be an option. Happy to discuss anything, Matthias |
From: Aekold H. <hel...@gm...> - 2008-06-23 09:37:11
|
Hi All! I have one idea and need a bit of your help. There is java.net project https://jna.dev.java.net/, can we collaborate and use it instead of jni? I have no C++ knowledge, but have enough java experience. And we can put result into your sf.net project :) to attract more users to both xine and libxine-java. |
From: Matthias R. <mri...@in...> - 2008-05-18 10:39:28
|
Hi You've got here because you've already used libxine-java, the java bindings to xine, or you just found it on the web. If you have questions, comments, bug reports etc... don't hesitate to post here instead of to me directly, so that others can see that there is progress :) and might benefit from already answered or fixed problems. Cheers, Matthias Ringwald |