Archive for the 'Notes' Category
Ubuntu 8.04 on my R60 and it’s problems
Saturday, April 26th, 2008
Image via WikipediaYesterday i dist-upgraded my ubuntu 7.10 to 8.04 and just after that i noticed that the machine doesn’t resume from suspend-to-RAM. The next thing i noticed is xine crash just after start with a segfault. That brought me to try glxinfo which crashed too.
My conclusion was, “Damn ATI and their borken drivers!”, so i tried to install it mannully. After dozens of retries i have chosen the right solution:
- $ sudo apt-get remove xorg-driver-fglrx xorg-driver-fglrx-dev fglrx-amdcccle fglrx-kernel-source
- $ sudo dkms uninstall -m fglrx -v 8.476
- $ sudo dkms remove -m fglrx -v 8.476 –all
- $ sudo apt-get remove dkms
- $ sudo ./ati-driver-installer-8-3-x86.x86_64.run (install it without creating packages)
- $Â sudo /etc/init.d/gdm restart
And enjoy…
Ah … and BTW, it seem to fix the resume from suspend problem…
C coding tip
Friday, April 11th, 2008There’s nothing wrong with having 6 lines more in your header files even if you don’t need them right now.
You wil maybe spare a lot of time debugging build/linking problems in the future with them.
#ifdef __cplusplus
extern “C” {
#endif#ifndef YOUR_HEADER_
#define YOUR_HEADER_int main(int argc, char ** argv) {
…
}
#endifÂ
#ifdef __cplusplus
}
#endif
This is needed if you want to use your lib in C++.
FOSDEM: Free internet finally!!!!
Saturday, February 23rd, 2008After 2 days offline.
H263 crappy payloading
Sunday, January 13th, 2008For the last month I was trying to get a “by spec” H263 rtp stream out of Gstreamer, the currently available payloader plugin is just a quick hack, so i was trying create a patch to get it right.
I don’t wonder anymore why there’s no open source by spec implementation of the rfc2190, actually there are just a few closed source ones. The reason why is just the complexity of this rfc complicates the implementation so much, that nobody wants to implement it right i guess. Everybody is using the newer dynamic payload type 96 instead, because it’s easier to implement and lightweight, but as known a lot of systems still use the old - 34 - and that’s why i’m working this.
This rfc defines 3 modes for payloading frames, the first mode is simple, you take a frame and if it fits in a package you add the payload header and send it over rtp, if it doesnt you split the frame at “Group Of Block” boundries. The second and third apply to frames with “groups of blocks” bigger than MTU, you normally send the other fitting GOBs, the bigger ones must be packet at macroblock boundries in regard to the frame type (payload mode B for normal frames - I, P - mode C for PB frames).
To get the macroblock boundries you have practically decode the video because most of the codes in it are variable length and you don’t know when you got it.
The Gstreamer plugin is not yet completed, but i hope it will be soon.
Have fun!!!
JDBC and MySQL on Slackware
Friday, November 2nd, 2007Many people had this problem with MySQL “refusing” JDBC connections on all the distros.
The trick is, that by default MySQL is configured with the ’skip-networking’ property in my.cnf. If you want JDBC to work you will have to disable it.
But, there’s another trick, on Slackware for example there’s the ‘–skip-networking’ switch enabled by default in /etc/rc.d/rc.mysqld , so you will have to comment out the line defining the ‘SKIP’ variable.
skip-networking disables MySQL’s tcp socket listener and leaves only the Unix socket open. JDBC on the other hand connects only trough tcp sockets, so that’s the problem.
To be sure that skip-networking is disabled it is better to take a look in all MySQL related scripts, configs and other files.
Cloning a rat
Wednesday, September 26th, 2007Remember, if you want to clone an object in Java, you should not follow HOWTOs on Google that try to answer your question with this piece of code:
public class Rat implements Cloneable {
…
public Object clone() {
Cloneable c = new Rat();
return c;
}
}
But instead, you should do that with the following snippet:
public class Rat implements Cloneable {
public Object clone() {
Object clone = null;
try {
clone = super.clone();
} catch (CloneNotSupportedException e) {
e.printStackTrace();
}
return clone;
}
}
, because the first one does only create a new instance of Rat without the same internal state.
Autotools note
Saturday, July 21st, 2007Doing:
AC_CHECK_LIB([gstreamer-0.10],
[gst_init],
[GST_LIBS=`pkg-config –libs gstreamer-0.10`],
AC_MSG_ERROR([Gstreamer-0.10 not found], [2]))
AC_SUBST([GST_LIBS])
is no good.
In this case AC_SUBST overwrites GST_LIBS and makes it “empty”.
This:
AC_CHECK_LIB([gstreamer-0.10],
[gst_init],
AC_SUBST([GST_LIBS], [`pkg-config –libs gstreamer-0.10`]),
AC_MSG_ERROR([Gstreamer-0.10 not found], [2]))
is much better.

