mvBindOpenGLWindow(3dm) mvBindOpenGLWindow(3dm) NAME mvBindOpenGLWindow, mvUnbindOpenGLWindow - functions to associate movies with and dissociate movies from playback windows SYNOPSIS #include <dmedia/movieplay.h> DMstatus mvBindOpenGLWindow( MVid movieid, Display* dpy, Window win, GLXContext ctxt ); DMstatus mvUnbindOpenGLWindow( MVid movieid ); PARAMETERS movieid The specified movie instance. dpy The X display on which the movie instance will appear. win The X window in which the movie will appear. ctxt The OpenGL graphics context for the movie. DESCRIPTION context to be used for movie playback. Internally, the Movie Playback Library initializes and prepares the movie for playback. The Movie Playback Library uses the OpenGL graphics library to display movie frames on screen. Therefore, you must supply an X window that you have configured for OpenGL. Use the OpenGL calls for window configuration (see the manual pages for glXGetconfig(3g), glXCreateContext(3g), and glXChooseVisual(3g)). If your application uses the IRIS IM toolkit (Silicon Graphics' port of the industry-standard OSF/Motif toolkit for use on Silicon Graphics systems) or ViewKit, you should use the GLwCreateMDrawingArea(3X), which will create an OpenGL-based widget for you. Because mvBindOpenGLWindow(3dm) performs internal initialization, it must be invoked on a movie before you make several other playback calls on the movie. If the specified movie contains an audio track, mvBindOpenGLWindow(3dm) will attempt to open an audio port using the Silicon Graphics Audio Library (AL). If the attempt to open an audio port was successful, the library will create an audio port with the following format: movipid:movieid where pid is the system process ID which is actually using the audio port, and movieid is the movie ID which contains the sound track being played on the port. For more information, see the manual page for the alOpenPort(3dm) call. If the attempt to open an audio port is unsuccessful (perhaps there are no free audio ports, or the system you are using does not have audio capability), the Movie Playback Library will play the image track of the movie without the accompanying audio track. You may bind a movie to only one window at a time. Once you have invoked until you call mvUnbindOpenGLWindow(3dm) or mvUnbindWindow(3dm) or close the movie using mvClose(3dm). A window may contain more than one movie, i.e. you may bind the same window to more than one movie. Before you destroy any window which contains movies, you should either Dis-associate the movies from the window using mvUnbindOpenGLWindow (or mvUnbindWindow) or close the movies using mvClose(3dm). upon success, and DM_FAILURE in the event of error. If an error occurs, you may call mvGetErrno(3dm) to obtain the code describing the error. If you plan to play multiple movies at the same time in the same application, you should advise the Movie Playback Library of the maximum number of movies. See mvSetNumMoviesHint(3dm). See mvPort(3dm) for details on how to more accurately control the setup of the graphics screen, audio, and video output devices. HARDWARE ACCELERATION that it will play the requested movie using hardware accelerated decompression. Currently supported hardware accelerators include Octane Compression (on Octane with Octane Video). Hardware accelerated decompression is achieved on these systems using a memory->decompressor->video out->graphics path. O2's builtin ICE is also supported, although the data path is memory->decompressor->memory. If a movie is bound with mvBindOpenGLWindow(3dm) and the movie has a single IMAGE track in which all frames are compatible with the Octane Compression Hardware Accelerator, then the Movie Playback Library engine will attempt to play the movie using Octane Compression if you have set the hardware acceleration flag for this movie. See mvSetMovieHwAcceleration(3dm) for details. (This feature may also be turned on by setting the MV_TRY_IMPACTCOMP environment variable). Movies that are successfully bound in this way will be displayed in a video window that is directly on top of the specified window passed to video output port as well. The compression hardware will be kept open by the Movie Library until the movie is unbound or closed. One caveat is that, because movies that are played through Octane Compression are displayed on a window on top of the one passed to the video window. Movies that are bound and accelerated using a memory- >decompressor->memory (e.g. on O2) do not suffer this caveat. GL_RGBA_MODE mode windows. For playing movies in doubled-buffered windows, see mvOpenPort(3dm). OSF/Motif is a trademark of the Open Software Foundation, Inc. ENVIRONMENT MV_TRY_IMPACTCOMP SEE ALSO mvClose(3dm), mvIntro(3dm), mvOpen(3dm), mvSetNumMoviesHint(3dm), mvPort(3dm), mvHwAccel(3dm). Page 3