Render Live Video on a 3D Surface
|
|
Problem
Given an input media file, the object is to render the video
track onto a 3D surface.
Solution
A sample Java 3D renderer plugin is written. It creates the
Java3D scene graph of a 3D surface (such as Cylnder), onto which the
video will be texture mapped to. In interface VideoRenderer's method
process, for each frame of the video, it converts the raw image data
to a BufferedImage object, then to create a ImageComponent2D object
(the data access mode is by reference). Finally it sets this
ImageComponent2D object to the scene graph's texture object by calling
its method setImage. A sample application DemoJMFJ3D shows how Java 3D
renderer works.
Please note: In order to achieve a decent performance, the
data access mode in ImageComponent2D has to be by reference. And BufferedImage's type had better be BufferedImage.TYPE_4BYTE_ABGR on solaris,
BufferedImage.TYPE_3BYTE_BGR on windows.
|
|
| Requirements |
|
| Platform: |
JDK 1.2.2. or later |
| JMF API: |
2.0 or later |
| Java3D API: |
1.2 or later |
| OpenGL API: |
1.2 or later |
| Implementation: |
AJ, WPP, SPP * |
* AJ = All Java, WPP = Windows Performance Pack, SPP =
Solaris Performance Pack |
|