List Info

Thread: QuickTime: BeginFullScreen




QuickTime: BeginFullScreen
user name
2007-06-11 06:31:02
Hi
I've been examining the functions exposed in the PythonMac
Qt and
QuickTime libraries
and it seems that whilst the EndFullScreen call and the
appropriate
flags are exposed
as can be seen from this snip from ipython help(Qt)

 EndFullScreen(...)
        (Ptr fullState, long flags) -> None

however the corresponding BeginFullScreen is not available.
My question is what is needed to make BeginFullScreen
available to the
MacPython API.
I am willing to commit time to doing the development and
have
comnsiderable experience of using SWIG under Linux. I am not
familiar
with the build mechanism for MacPython but I am willing to
learn.

I had initially thought that this might depend on having
QuickTime Pro
but further investigation
shows that BeginFullScreen is an integral part of the
framework and
available in from
Movies.h which I'm assuming is the basis for the MacPython
Quicktime wrapper
The declaration is in
/System/Frameworks/QuickTime.framework/Headers as follows:

/*
 *  BeginFullScreen()
 *
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in
QuickTime.framework
 *    CarbonLib:        in CarbonLib 1.0 and later
 *    Non-Carbon CFM:   in QuickTimeLib 2.5 and later
 *    Windows:          in qtmlClient.lib 3.0 and later
 */
extern OSErr
BeginFullScreen(
  Ptr *        restoreState,
  GDHandle     whichGD,
  short *      desiredWidth,
  short *      desiredHeight,
  WindowRef *  newWindow,
  RGBColor *   eraseColor,
  long         flags)
AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER;


Interestingly the Java Quicktime quicktime bridge has 
BeginFullScreen
available.
http://developer.apple.com/documentation/Java/Reference/1.4
.1/Java141API_QTJ/quicktime/std/movies/FullScreen.html

Also there is an example of the use of the C API available
in the
developer documentation:
http://developer.apple.com/samplecode/qtfullscre
en/listing1.html

So I'm assuming that any restrictions on exposing
BeginFullScreen that
may have applied in the past are no longer in force.
TIA
Ed Hartley
_______________________________________________
Pythonmac-SIG maillist  -  Pythonmac-SIGpython.org
http://mail.python.org/mailman/listinfo/pythonmac-sig

Re: QuickTime: BeginFullScreen
country flaguser name
Netherlands
2007-06-12 16:28:23
The problem is the "Ptr*" argument: BeginFullScreen returns an opaque pointer (Ptr) through a reference parameter, and the automatic interface code generator doesn't know how to treat this.

It thinks it knows how to treat the companion "Ptr" argument to EndFullScreen (representing it as a string on the Python side and passing the address to EndFullScreen) but it actually gets it wildly wrong.

As the pointer is opaque we could represent it as a cobject on the Python side.

I can do the magic incantations to have bgen generate a new Qt interface module, but I'd need your help to test it. Ideal would be if you're building Python from svn source (then I'll just send you a replacement _Qtmodule.c, and if it works I'll check it in to the repository) otherwise we'd have to work out some other way, contact me by private email.

On  11-Jun-2007, at 13:31 , Edward Hartley wrote:

Hi
I've been examining the functions exposed in the PythonMac Qt and
QuickTime libraries
and it seems that whilst the EndFullScreen call and the appropriate
flags are exposed
as can be seen from this snip from ipython help(Qt)

 EndFullScreen(...)
        (Ptr fullState, long flags) -> None

however the corresponding BeginFullScreen is not available.
My question is what is needed to make BeginFullScreen available to the
MacPython API.
I am willing to commit time to doing the development and have
comnsiderable experience of using SWIG under Linux. I am not familiar
with the build mechanism for MacPython but I am willing to learn.

I had initially thought that this might depend on having QuickTime Pro
but further investigation
shows that BeginFullScreen is an integral part of the framework and
available in from
Movies.h which I'm assuming is the basis for the MacPython Quicktime wrapper
The declaration is in /System/Frameworks/QuickTime.framework/Headers as follows:

/*
 *  BeginFullScreen()
 *
 *  Availability:
 *    Mac OS X:         in version 10.0 and later in QuickTime.framework
 *    CarbonLib:        in CarbonLib 1.0 and later
 *    Non-Carbon CFM:   in QuickTimeLib 2.5 and later
 *    Windows:          in qtmlClient.lib 3.0 and later
 */
extern OSErr
BeginFullScreen(
  Ptr *        restoreState,
  GDHandle     whichGD,
  short *      desiredWidth,
  short *      desiredHeight,
  WindowRef *  newWindow,
  RGBColor *   eraseColor,
  long         flags)
AVAILABLE_MAC_OS_X_VERSION_10_0_AND_LATER;


Interestingly the Java Quicktime quicktime bridge has  BeginFullScreen
available.

Also there is an example of the use of the C API available in the
developer documentation:

So I'm assuming that any restrictions on exposing BeginFullScreen that
may have applied in the past are no longer in force.
TIA
Ed Hartley
_______________________________________________
Pythonmac-SIG maillist  -  Pythonmac-SIGpython.org">Pythonmac-SIGpython.org

--

Jack Jansen, <Jack.Jansencwi.nl>, http://www.cwi.nl/~jack

If I can't dance I don't want to be part of your revolution -- Emma Goldman



[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )