[MPlayer-dev-eng] state of realvideo?
Kees Cook
mplayer at outflux.net
Tue May 21 17:38:54 CEST 2002
On Tue, May 21, 2002 at 11:40:32AM +0200, Arpi wrote:
> > void (*rv20_init)(unsigned int * info, void ** handle);
> > unsigned int (*rv20_hive)(unsigned int * info, void * handle);
> > unsigned int (*rv20_free)(void * handle);
> > unsigned int (*rv20_custom)(unsigned int * info, void * handle);
>
> are you sure in that handle is the last ?
Yeah. Basically, what I did was I studied the disassembly for Init until
I could see what was being returned better, and then had realplay make
calls into my stubs. On a successful Init, it would call Hive with that
returned handle value. The handle stuff is just about the only thing I'm
sure of. :)
> > unsigned int (*rv20_transform)
> > (
> > unsigned int input_size, // +8 read size?
> > unsigned int output_size, // +0 write size?
> > unsigned char * input,// +10 pointer test, readable
> > unsigned char * output, // +14 pointer test, writable
> > void * handle // +18 esi source? handle?
> > );
>
> imho the order of parameters is reversed?
Well, I'm not sure about this one. Handle is definitely last, and "input"
and "output" are both NULL-tested, and "output" gets written to a little
(3 leading zeros?) before making lots of internal calls. What I don't get
is that what I'm calling "*_size" don't really get examined, they just get
copied into the stack.
> imho most of the stuff in the info struct come from the .rm file header.
> at least all win32 codec i know do this - vfw, dshow and quicktime too
Is there a binary "grep"? Something I could do like:
bgrep "0x02 0x01 0x0 0x01" whatever.rm
and it'd spit out where it found that byte pattern?
Also, I found the return values in the SDK includes. In "pnresult.h" is a
set of PN_E* #define's that match to error results returned from all the
functions.
I'm using the latest .so files from the linux "realone" beta release. It
looks like they got touched up a little: the __pure_virtual crap is gone
(possibly due to them using gcc 2.95 on the earlier stuff), and now Init
returns a value.
Oh, and I checked: while there are 4 Custom calls for every Transform,
there are 25 Transforms a second getting called. :)
--
Kees Cook @outflux.net
More information about the MPlayer-dev-eng
mailing list