nanogui: Re: flash player


Previous by date: 3 Sep 2002 01:13:01 -0000 Re: GrNexPixmap( ) and GrCopyArea( ), wang
Next by date: 3 Sep 2002 01:13:01 -0000 Re: 286 as xterm?, Simon Wood
Previous in thread:
Next in thread: 3 Sep 2002 01:13:01 -0000 flash player, Oscar

Subject: Re: flash player
From: "Greg Haerr" ####@####.####
Date: 3 Sep 2002 01:13:01 -0000
Message-Id: <040d01c252e5$58cccb40$3aba46a6@xmission.com>

: I am porting the flash player on nanox. I cannot play the flash file after
: modified the code. I find that there may be a problem occur at the functions
: XCopyArea() and XShmCreatePixmap(). I use GrCopyArea() and GrNewPixmap() to
: represent these two functions.

I've read over the source to the flash player, and it uses the
XShmAttach and XShmCreatePixmap to create a shared-memory
pixmap in the server, which nano-X does not support.  Then, it
uses XCopyArea to copy from the shared mem "canvas" variable
to the window "target" for display.

There are two mechanisms you could use to get this to work:

1. The shared-mem "canvas" area is created in the same
format as the display.  You could rewrite the main.c using
nano-X's direct-mapped framebuffer (GrOpenClientFramebuffer
and GrGetFBWindowInfo) and allow the flash code to draw
directly into fb memory, and skip the XCopyArea, since it's not
needed.

2. Alternatively, you could use malloc to allocate a local buffer,
allow flash to draw into it, then use GrArea rather than XCopyArea
to copy it to a window, using the MWPF_xxx pixel type for
your screen hardware.



 Also, the last parameter of
: the function XSetFunction() is GXcopy which I don't know what the function of
: it. And I don't know how to map in the function GrSetGCMode().

GrSetMode(GR_MODE_COPY).  This is the default and doesn't
need to be set, however.


 Can you give
: any information about this? Thanks!!

Try to understand how the flash player works - it draws to the xc->canvas
memory segment and then uses XCopyArea to copy from server
ram to the window.  You will rewrite it to either have flash draw directly
to a client-side framebuffer or to local memory and then copy using GrArea...

I'm thinking about whether we should implement shared-memory
pixmaps, which would use the now-unused third parm to GrNewPixmap...

Hope this helps.

Regards,

Greg


Previous by date: 3 Sep 2002 01:13:01 -0000 Re: GrNexPixmap( ) and GrCopyArea( ), wang
Next by date: 3 Sep 2002 01:13:01 -0000 Re: 286 as xterm?, Simon Wood
Previous in thread:
Next in thread: 3 Sep 2002 01:13:01 -0000 flash player, Oscar


Powered by ezmlm-browse 0.20.