Archive for January, 2008

Lost in the code

Tuesday, January 15th, 2008

A lot of times, when I write code, I get lost in the source. I just can’t write a nice piece of code without during a learning process, rfc, spec, …

I really need to write it twice, the first time for learning and the second time for production. If I even try to leave the first code I get lost trough the lines.

Do you maybe have something that will help me? :)

H263 crappy payloading

Sunday, January 13th, 2008

For 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!!!