[MPlayer-dev-eng] state of realvideo?

Arpi arpi at thot.banki.hu
Fri May 17 22:37:19 CEST 2002


Hi,

> Figuring out function parameters and return values is the next trick.  I
> think I've seen some elf disassemblers that'll try to reconstruct that.  
> If not, I think the parameter sizes can at least be seen from the stack
> usage in the disassembly.

I would try to implement a dummy wrapper function set, and preload it.
So, it could print in/out parameters of the library functions.
Of course, first you have to assume it has many (10?) parameters, and then
you'll see with multiple runs which parameters are not parameters...
at leats i used this trick when tracing qtx codecs in qtplayer running in wine

> How do these kinds of libraries usually work?  Call a function with a 
> buffer location and size (containing a part of the stream), and what 
> happens?  It makes callbacks for each decoded frame?  Or returns a 
> buffer & size for the decoded frame?

callback is rare, the most common way is a functions set like:

codec_init(width,height,depth, other codec options, mayeb all this in a
  struct)
codec_decode(void* in_buffer,int in_size, void* out_buffer) many times
codec_uninit

size of out buffer is constant, and depends on movie width/height/depth, so
it doesn't need to be passed to the decoder.

output colorspace can be constant 9codec dependent) or be the part of the
init struct. in your case it looks like it's yuv420 (yv12).

imho, preloading wrapper with trace functions could help a lot in
discovering the meaning of the parameters.

and the sdk headers can give some hints on the API structure and data formats.

ok, i'm trying to pair their function name sto vd.h functions:

> Codecs/rv20.so.6.0 => Codecs/drv2.so.6.0 `RV20toYUV420CustomMessage'
control()

> Codecs/rv20.so.6.0 => Codecs/drv2.so.6.0 `RV20toYUV420Free'
uninit()

> Codecs/rv20.so.6.0 => Codecs/drv2.so.6.0 `RV20toYUV420HiveMessage'
???

> Codecs/rv20.so.6.0 => Codecs/drv2.so.6.0 `RV20toYUV420Init'
preinit()

> Codecs/rv20.so.6.0 => Codecs/drv2.so.6.0 `RV20toYUV420_RN_FRU_Free'
> Codecs/rv20.so.6.0 => Codecs/drv2.so.6.0 `RV20toYUV420_RN_FRU_GetFrame'
> Codecs/rv20.so.6.0 => Codecs/drv2.so.6.0 `RV20toYUV420_RN_FRU_Init'
> Codecs/rv20.so.6.0 => Codecs/drv2.so.6.0 `RV20toYUV420_RN_FRU_Setup'
???

> Codecs/rv20.so.6.0 => Codecs/drv2.so.6.0 `RV20toYUV420Transform'
decode()


A'rpi / Astral & ESP-team

--
Developer of MPlayer, the Movie Player for Linux - http://www.MPlayerHQ.hu



More information about the MPlayer-dev-eng mailing list