View Full Version : mapping a video stream
09-28-2000, 05:18 AM
is there any method to map a video stream directly to a polygon or polygons - not by frame by frame? frame by frame mapping is working but too slow for a live broadcast applcation.
another question: any method to get the OpenGL animation in video stream format.
09-30-2000, 07:32 PM
I assume you mean the video decoding is slower than the 3d engine, so that it's a pulled brake on the update of transforming and displaying the texture mapped polygons.
There is only one way I could think of:
let the video decoder and the 3d engine run in 2 different system threads/processes and have the video decoder send a signal/message everytime it is done decoding one frame of the video (requires shared memory architecture for the texture image). Then the part that maps the video frames on polygons knows that it's time to change the texture.
One other way might be to do it time dependent - have the video decoder pause the decoding every 1/50s so the 3d engine can transform and draw the polygons again. Everytime the video decoder is done with a frame, set a semaphore that tells the 3d part to update the texture.
That means, that the decoding algo has to be able to pause decoding and pick it up at the same point of a frame later, of course.
Hope I helped http://www.opengl.org/discussion_boards/ubb/wink.gif
There is a fellow who made an library specifically for mapping an AVI stream onto a poly, do a search through the board and you should find it. Even better, here is a link to his home page.
[This message has been edited by dans (edited 10-01-2000).]
Powered by vBulletin® Version 4.2.2 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.