Top Description Fields Constructors Methods
jogamp.opengl.util.av.impl

public Class OMXGLMediaPlayer

extends EGLMediaPlayerImpl
Class Inheritance
Imports
java.io.IOException, com.jogamp.opengl.GL, .GLException, com.jogamp.opengl.egl.EGL, com.jogamp.opengl.util.texture.TextureSequence, jogamp.opengl.util.av.EGLMediaPlayerImpl

OpenMAX IL implementation. This implementation is currently not tested due to lack of an available device or working software implementation. It is kept alive through all changes in the hope of a later availability though.

Field Summary

Modifier and TypeField and Description
pack-priv static final boolean
protected long
Inherited from jogamp.opengl.util.av.EGLMediaPlayerImpl:
texTypeuseKHRSync

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private native void
_activateStream(long moviePtr)

private native void
_attachVideoRenderer(long moviePtr)

private native long
private native void
_destroyInstance(long moviePtr)

private native void
_detachVideoRenderer(long moviePtr)

private native int
_getCurrentPosition(long moviePtr)

private native int
_getNextTextureID(long moviePtr, boolean blocking)

private native void
_pause(long moviePtr)

private native void
_play(long moviePtr)

private native int
_seek(long moviePtr, int position)

private native void
_setPlaySpeed(long moviePtr, float rate)

private native void
_setStream(long moviePtr, int textureNum, String path)

private native void
_setStreamEGLImageTexture2D(long moviePtr, int tex, long image, long sync)

private native void
_stop(long moviePtr)

protected TextureSequence.TextureFrame
protected void
protected void
private void
protected int
getAudioPTSImpl()

Overrides jogamp.opengl.util.av.GLMediaPlayerImpl.getAudioPTSImpl.

Override if not using audioSink!
protected int
getNextTextureImpl(final GL
valid and current GL instance, shall be null for audio only.
gl
,
final TextureSequence.TextureFrame
the TextureFrame to store the video PTS and texture data, shall be null for audio only.
nextFrame
)

Implements abstract jogamp.opengl.util.av.GLMediaPlayerImpl.getNextTextureImpl.

Process stream until the next video frame, i.e. TextureFrame, has been reached.
protected final void
initGLImpl(final GL
null for audio-only, otherwise a valid and current GL object.
gl
)

Implements abstract jogamp.opengl.util.av.GLMediaPlayerImpl.initGLImpl.

Shall initialize all GL related resources, if not audio-only.
private static native boolean
protected void
protected void
initStreamImpl(final int vid, final int aid)

Implements abstract jogamp.opengl.util.av.GLMediaPlayerImpl.initStreamImpl.

Implementation shall set the following set of data here
public static final boolean
public synchronized boolean

Returns:

time position after issuing the command
pauseImpl
()

Implements abstract jogamp.opengl.util.av.GLMediaPlayerImpl.pauseImpl.

public synchronized boolean
private String
replaceAll(final String orig, final String search, final String repl)

protected int

Returns:

time position after issuing the command
seekImpl
(final int msec)

Implements abstract jogamp.opengl.util.av.GLMediaPlayerImpl.seekImpl.

protected boolean
setPlaySpeedImpl(final float rate)

Overrides jogamp.opengl.util.av.GLMediaPlayerImpl.setPlaySpeedImpl.

Override if not using AudioSink, or AudioSink's AudioSink#setPlaySpeed(float) is not sufficient!

Field Detail

availableback to summary
pack-priv static final boolean available
moviePtrback to summary
protected long moviePtr

Constructor Detail

OMXGLMediaPlayerback to summary
public OMXGLMediaPlayer()

Method Detail

_activateStreamback to summary
private native void _activateStream(long moviePtr)
_attachVideoRendererback to summary
private native void _attachVideoRenderer(long moviePtr)
_createInstanceback to summary
private native long _createInstance()
_destroyInstanceback to summary
private native void _destroyInstance(long moviePtr)
_detachVideoRendererback to summary
private native void _detachVideoRenderer(long moviePtr)
_getCurrentPositionback to summary
private native int _getCurrentPosition(long moviePtr)
_getNextTextureIDback to summary
private native int _getNextTextureID(long moviePtr, boolean blocking)
_pauseback to summary
private native void _pause(long moviePtr)
_playback to summary
private native void _play(long moviePtr)
_seekback to summary
private native int _seek(long moviePtr, int position)
_setPlaySpeedback to summary
private native void _setPlaySpeed(long moviePtr, float rate)
_setStreamback to summary
private native void _setStream(long moviePtr, int textureNum, String path)
_setStreamEGLImageTexture2Dback to summary
private native void _setStreamEGLImageTexture2D(long moviePtr, int tex, long image, long sync)
_stopback to summary
private native void _stop(long moviePtr)
createTexImageback to summary
protected TextureSequence.TextureFrame createTexImage(final GL gl, final int texName)

Overrides jogamp.opengl.util.av.EGLMediaPlayerImpl.createTexImage.

Annotations
@Override
destroyImplback to summary
protected void destroyImpl(final GL gl)

Implements abstract jogamp.opengl.util.av.GLMediaPlayerImpl.destroyImpl.

Annotations
@Override
destroyTexFrameback to summary
protected void destroyTexFrame(final GL gl, final TextureSequence.TextureFrame imgTex)

Overrides jogamp.opengl.util.av.EGLMediaPlayerImpl.destroyTexFrame.

Annotations
@Override
errorCheckEGLback to summary
private void errorCheckEGL(final String s)
getAudioPTSImplback to summary
protected int getAudioPTSImpl()

Overrides jogamp.opengl.util.av.GLMediaPlayerImpl.getAudioPTSImpl.

Doc from jogamp.opengl.util.av.GLMediaPlayerImpl.getAudioPTSImpl.

Override if not using audioSink!

Annotations
@Override
getNextTextureImplback to summary
protected int getNextTextureImpl(final GL gl, final TextureSequence.TextureFrame nextFrame)

Implements abstract jogamp.opengl.util.av.GLMediaPlayerImpl.getNextTextureImpl.

Doc from jogamp.opengl.util.av.GLMediaPlayerImpl.getNextTextureImpl.

Process stream until the next video frame, i.e. TextureFrame, has been reached. Audio frames, i.e. AudioSink.AudioFrame, shall be handled in the process.

Video frames shall be ignored, if getVID() is STREAM_ID_NONE.

Audio frames shall be ignored, if getAID() is STREAM_ID_NONE.

Method may be invoked on the StreamWorker decoding thread.

Implementation shall care of OpenGL synchronization as required, e.g. glFinish()/glFlush()!

Parameters
gl:GL

valid and current GL instance, shall be null for audio only.

nextFrame:TextureSequence.TextureFrame

the TextureFrame to store the video PTS and texture data, shall be null for audio only.

Returns:int

the last processed video PTS value, maybe TimeFrameI#INVALID_PTS if video frame is invalid or n/a. Will be TimeFrameI#END_OF_STREAM_PTS if end of stream reached.

Annotations
@Override
initGLImplback to summary
protected final void initGLImpl(final GL gl) throws IOException, GLException

Implements abstract jogamp.opengl.util.av.GLMediaPlayerImpl.initGLImpl.

Doc from jogamp.opengl.util.av.GLMediaPlayerImpl.initGLImpl.

Shall initialize all GL related resources, if not audio-only.

Shall also take care of AudioSink initialization if appropriate.

Parameters
gl:GL

null for audio-only, otherwise a valid and current GL object.

Annotations
@Override
initIDs0back to summary
private static native boolean initIDs0()
initOMXback to summary
protected void initOMX()
initStreamImplback to summary
protected void initStreamImpl(final int vid, final int aid) throws IOException

Implements abstract jogamp.opengl.util.av.GLMediaPlayerImpl.initStreamImpl.

Doc from jogamp.opengl.util.av.GLMediaPlayerImpl.initStreamImpl.

Implementation shall set the following set of data here

Annotations
@Override
isAvailableback to summary
public static final boolean isAvailable()
pauseImplback to summary
public synchronized boolean pauseImpl()

Implements abstract jogamp.opengl.util.av.GLMediaPlayerImpl.pauseImpl.

Returns:boolean

time position after issuing the command

Annotations
@Override
playImplback to summary
public synchronized boolean playImpl()

Implements abstract jogamp.opengl.util.av.GLMediaPlayerImpl.playImpl.

Annotations
@Override
replaceAllback to summary
private String replaceAll(final String orig, final String search, final String repl)
seekImplback to summary
protected int seekImpl(final int msec)

Implements abstract jogamp.opengl.util.av.GLMediaPlayerImpl.seekImpl.

Returns:int

time position after issuing the command

Annotations
@Override
setPlaySpeedImplback to summary
protected boolean setPlaySpeedImpl(final float rate)

Overrides jogamp.opengl.util.av.GLMediaPlayerImpl.setPlaySpeedImpl.

Doc from jogamp.opengl.util.av.GLMediaPlayerImpl.setPlaySpeedImpl.

Override if not using AudioSink, or AudioSink's AudioSink#setPlaySpeed(float) is not sufficient!

AudioSink shall respect !audioSinkPlaySpeedSet to determine data_size at AudioSink#enqueueData(com.jogamp.opengl.util.av.AudioSink.AudioFrame).

Annotations
@Override