[openbeos] Re: Me, Myself, and I

  • From: "Marcus Overhagen" <dos4gw@xxxxxx>
  • To: openbeos@xxxxxxxxxxxxx
  • Date: Fri, 11 Jan 2002 17:07:23 +0100

"Jonathan Tarbox" <jtarbox@xxxxxxxxxxxxx> wrote:
>When I get a chance, I'm gonna check out the latest library and see if it's 
>any better.  
>Can someone from the OBOS media kit team hook me up with some API's for 
>encoding 
>and decoding under the new media server?

As you probably know, Be Inc. decided to not release the headers for their
media encoder / decoder API to the public. I think this wasn't a good decision, 
since you were not able to do any development on decoders / encoders 
without asking them to get them under NDA.
I know that some people have this header files, but please understand that
we are unable to use pirated files in an open source project.

There are three ways for us to get an API for encoding / decoding.

1) get these headers legally from Palm. I doubt that this is possible.
2) design a new API from scratch. Will be much work.
3) do a litte reverse engineering on the binary files that already use this API.

I think 3 is the way to go.
By running

nm --demangle /boot/beos/system/lib/libmedia.so |grep BPrivate |sort

you get a nearly complete list of the private interfaces used for encoding / 
decoding.
However, rebuilding an API using this information will make it binary 
incompatible
with the existing encoder / decoder. (Sice class size and layout are different, 
etc.)
I don't think that this is a big problem, the applications use the documented 
interface
of BMediaFile and BMediaTrack, which will remain binary compatible.
It's just the private protocol inside the media kit that will change. (And we 
will
have to recreate all encoder / decoder / extractor / writer)

Running nm on the other media kit binaries will even give you more information.
example:
nm --demangle /boot/beos/system/add-ons/media/decoders/rawaudio.decoder 

Please note that there is no need to disassemble anything!

These two files have been created using the method described above.

http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/open-beos/media_kit/source/lib/headers/Decoder.h?rev=1.1&content-type=text/vnd.viewcvs-markup
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/open-beos/media_kit/source/lib/headers/Encoder.h?rev=1.1&content-type=text/vnd.viewcvs-markup

I also tried to make them binary compatible, by trying variable numbers 
of class variables and virtual functions, but I never succeeded.

However, using information aquired this way, we are going to recreate a 
*similiar*
media kit internal decoding / encoding / reading / writing API for media files.

We just did not have the time to do this yet.

regards
Marcus, media kit team leader

 

Other related posts: