![]() |
KudanAR - Android
1.6.0
|
Inherits ARTextureOES, ARRendererListener, and OnCompletionListener.
Classes | |
enum | State |
Public Member Functions | |
void | spill () |
void | open () |
ARVideoTexture () | |
void | loadFromAsset (String assetPath) |
void | loadFromPath (String filePath) |
void | loadData () |
void | loadSurfaceData () |
int | getWidth () |
int | getHeight () |
void | prepareRenderer (int unit) |
void | start () |
void | pause () |
void | reset () |
void | preRender () |
void | postRender () |
void | rendererDidPause () |
void | rendererDidResume () |
void | onCompletion (MediaPlayer mp) |
List< ARVideoTextureListener > | getListeners () |
void | addListener (ARVideoTextureListener listener) |
![]() | |
void | setSurfaceTexture (SurfaceTexture surfaceTexture) |
SurfaceTexture | getSurfaceTexture () |
ARTextureOES (int textureID) | |
ARTextureOES () | |
void | bindTexture (int unit) |
![]() | |
ARTexture () | |
void | finalize () |
void | createTexture () |
int | getTextureID () |
void | setTextureID (int textureID) |
Additional Inherited Members | |
![]() | |
SurfaceTexture | mSurfaceTexture |
![]() | |
long | mNativeMem |
int | mTextureID |
A class representing a video texture.
ARVideoTexture.ARVideoTexture | ( | ) |
Initialises an empty ARVideo texture with values to be set later.
void ARVideoTexture.addListener | ( | ARVideoTextureListener | listener | ) |
Adds ARVideoTextureListener to ARVideoTexture's list of ARVideoTextureListerners.
listener |
int ARVideoTexture.getHeight | ( | ) |
Returns the height of the video texture, in pixels.
Reimplemented from ARTexture.
List<ARVideoTextureListener> ARVideoTexture.getListeners | ( | ) |
Returns a list of ARVideoTextureListener's for the ARVideoTexture.
int ARVideoTexture.getWidth | ( | ) |
Returns the width of the video texture, in pixels.
Reimplemented from ARTexture.
void ARVideoTexture.loadData | ( | ) |
Creates texture
Reimplemented from ARTexture.
void ARVideoTexture.loadFromAsset | ( | String | assetPath | ) |
Loads a bundled video file into an ARVideoTexture.
Exaple of use:
videoTexture.loadFromAsset("example.mp4");
assetPath | The name of the bundled video file to use, including file extension. |
void ARVideoTexture.loadFromPath | ( | String | filePath | ) |
Loads a video file from a file path into an ARVideoTexture.
Example of use:
videoTexture.loadFromPath("/mnt/sdcard/videos/example.mp4");
filePath | The full file path to the video file, including all folders and file extension. |
void ARVideoTexture.loadSurfaceData | ( | ) |
Sets the surface in the media player to present the video.
void ARVideoTexture.onCompletion | ( | MediaPlayer | mp | ) |
Media player interface method. Notifies ARVideoTextureListener's that the video has finished playing.
mp |
void ARVideoTexture.open | ( | ) |
Loads ARVideoTexture into media player and sets ARVideoTexture's height and width.
void ARVideoTexture.pause | ( | ) |
Pauses playback. Current video time will be saved.
void ARVideoTexture.postRender | ( | ) |
ARRendererListener interface method called after each frame is rendered. Pauses the video if the time it was last played is greater than the videos pause tolerance.
Implements ARRendererListener.
void ARVideoTexture.prepareRenderer | ( | int | unit | ) |
void ARVideoTexture.preRender | ( | ) |
ARRendererListener interface method called before each frame is rendered.
Implements ARRendererListener.
void ARVideoTexture.rendererDidPause | ( | ) |
ARRendererListener interface method called if the renderer is paused. Pauses video if playing.
Implements ARRendererListener.
void ARVideoTexture.rendererDidResume | ( | ) |
ARRendererListener interface method called if the renderer is resumed.
Implements ARRendererListener.
void ARVideoTexture.reset | ( | ) |
Pauses the video and resets the video's position to 0.
void ARVideoTexture.spill | ( | ) |
Clears media player and surface texture.
void ARVideoTexture.start | ( | ) |
Starts/resumes playback from the saved time of the video texture. If no time is currently saved, starts from the beginning. Default playback state is paused.