Java & GCJ:
For the first time in a few years, I decided to pick up my Java programming, ahem, talent and do a course at the computing science faculty of my university. I’m actually a biomedical student, so those outside trips to other faculties are usually considered somewhat odd. I like them, though.

This time, I had to write some random software in Java. Well, so I did yesterday night and the night before. Half of my time was actually spent getting java to run. This is awkward! The worst thing of all is that I just don’t know how to get GCJ to run. If it was up to me, I’d happily use GCJ, but… I just can’t. It took me a few hours to get GCJ to compile my first binary. I have a bunch of ten .java files and want a binary. So I do:

gcj -o myapp *.java -I. –main=Application

That didn’t quite work, I got warnings about the main func not being defined, even though it clearly exists. In the end, I had several case comparison issues, where my package was called “application” and my class “Application” (in The Sun Java SDK, which I instealled because I was getting desperate, had the same issue, by the way (it gets worse if the class is “Application” in; no way you’ll get that to work -without obvious pointers to what’s wrong, of course). I removed the package definition and things now worked fine in the Sun Java SDK. Even GCJ finished compiling. However, it didn’t run. It couldn’t find the Gtk AWT libraries. At this point, I didn’t know what to do and gave up. Back to Sun Java SDK…

I guess my main point is: why is this so hard? It just works(tm) under Windows. Why doesn’t GCJ just work out-of-the-box? Why is Sun Java SDK case-sensitive under Linux and not under Windows?

Totem, GStreamer, DVD, etc.:
Totem’s CVS now uses playbin instead of libgstplay. Playbin is GStreamer’s latest attempts at getting proper playback, and I’m fairly happy with it. Current CVS of gst-plugins, gstreamer core, gst-ffmpeg and Totem play quite some media already, while I’m continuously on a fixing rampage to get more media to work fine. I guess my main frustration right now is matroska playback, which I’m working on right now. DVD playback (and vob) is also being worked on at the moment.

Interestingly, I was able (yesterday) to rip my first DVD ever using GStreamer. This requires current CVS, obviously. The following commandline:

gst-launch oggmux name=mux ! filesink location=/tmp/file.ogg { dvdreadsrc location=/dev/cdrom ! dvddemux name=demux .audio_00 ! { queue ! a52dec ! audioconvert ! rawvorbisenc ! queue ! mux. } { demux.video_00 ! queue ! mpeg2dec ! ffcolorspace ! videoscale ! video/x-raw-yuv,width=384,height=288 ! tee name=t ! { queue ! theoraenc ! queue ! mux. } } } { t. ! queue ! ffcolorspace ! ximagesink }

will rip your DVD to an ogg/theora+vorbis file of size 384×288; it takes about 6 hours for a one-and-a-half-hour DVD on my laptop. It will also show an image while ripping. Who’s gonna write video-juicer? Note that it’s not perfect yet. Sound is a bit crackling (similar to Fluendo’s webstream) and it hangs on EOS. I didn’t debug any further yet. The resulting file is playable, though.

This entry was posted in General. Bookmark the permalink.