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

public Class NullGLMediaPlayer

extends GLMediaPlayerImpl
Class Inheritance
Imports
java.io.IOException, java.net.URLConnection, java.nio.ByteBuffer, com.jogamp.opengl.GL, .GLException, .GLProfile, jogamp.opengl.util.av.GLMediaPlayerImpl, com.jogamp.common.nio.Buffers, com.jogamp.common.os.Platform, com.jogamp.common.util.IOUtil, com.jogamp.opengl.util.av.GLMediaPlayer, com.jogamp.opengl.util.texture.Texture, .TextureData, .TextureIO, .TextureSequence

A dummy null media player implementation using a static test frame available on all platforms.

Field Summary

Modifier and TypeField and Description
private int
private long
private TextureData
Inherited from jogamp.opengl.util.av.GLMediaPlayerImpl:
audioSinkaudioSinkPlaySpeedSetcameraPathcameraPropsStreamWorkerInstanceId

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static final TextureData
protected final TextureSequence.TextureFrame
createTexImage(final GL gl, final int texName)

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

protected final void
protected final void
protected final int
getAudioPTSImpl()

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

Override if not using audioSink!
protected final 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.
protected final 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
protected final boolean
protected final boolean
protected final int
seekImpl(final int msec)

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

protected final 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!
private void
protected int
validateTextureCount(final int desiredTextureCount)

Overrides jogamp.opengl.util.av.GLMediaPlayerImpl.validateTextureCount.

Returns the validated number of textures to be handled.
Inherited from jogamp.opengl.util.av.GLMediaPlayerImpl:
addEventListeneraddStateEventMaskattachObjectattributesUpdatedchangeStatecreateTexFramescreateTexImageImpldestroydetachObjectgetAIDgetAttachedObjectgetAudioBitrategetAudioCodecgetAudioFramesgetAudioPTSgetAudioSinkgetAudioVolumegetAudioVolumeImplgetDecodedFrameCountgetDurationgetEventListenersgetFramerategetHeightgetLastTexturegetNextSingleThreadedgetNextTexturegetPerfStringgetPlaySpeedgetPresentedFrameCountgetPropIntValgetRequiredExtensionsShaderStubgetStategetStreamBitrategetStreamExceptiongetTextureCountgetTextureFormatgetTextureFragmentShaderHashCodegetTextureLookupFragmentShaderImplgetTextureLookupFunctionNamegetTextureMinMagFiltergetTextureSampler2DTypegetTextureTargetgetTextureTypegetTextureUnitgetTextureWrapSTgetUrigetVIDgetVideoBitrategetVideoCodecgetVideoFramesgetVideoPTSgetWidthinitGLinitStreamisGLOrientedisTextureAvailablepauseplaypostNextTextureImplpreNextTextureImplremoveEventListenerseeksetAudioVolumesetAudioVolumeImplsetFirstAudioPTS2SCRsetIsGLOrientedsetPlaySpeedsetStatesetTextureFormatsetTextureMinMagFiltersetTextureTargetsetTextureTypesetTextureUnitsetTextureWrapSTtoHexStringtoHexStringtoStringupdateAttributes

Field Detail

pos_msback to summary
private int pos_ms
pos_startback to summary
private long pos_start
texDataback to summary
private TextureData texData

Constructor Detail

NullGLMediaPlayerback to summary
public NullGLMediaPlayer()

Method Detail

createTestTextureDataback to summary
public static final TextureData createTestTextureData()
createTexImageback to summary
protected final TextureSequence.TextureFrame createTexImage(final GL gl, final int texName)

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

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

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

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

Overrides jogamp.opengl.util.av.GLMediaPlayerImpl.destroyTexFrame.

Annotations
@Override
getAudioPTSImplback to summary
protected final 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 final 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
initStreamImplback to summary
protected final 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
pauseImplback to summary
protected final boolean pauseImpl()

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

Annotations
@Override
playImplback to summary
protected final boolean playImpl()

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

Annotations
@Override
seekImplback to summary
protected final int seekImpl(final int msec)

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

Annotations
@Override
setPlaySpeedImplback to summary
protected final 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
validatePosback to summary
private void validatePos()
validateTextureCountback to summary
protected int validateTextureCount(final int desiredTextureCount)

Overrides jogamp.opengl.util.av.GLMediaPlayerImpl.validateTextureCount.

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

Returns the validated number of textures to be handled.

Default is TEXTURE_COUNT_DEFAULT minimum textures, if desiredTextureCount is < TEXTURE_COUNT_MIN, TEXTURE_COUNT_MIN is returned.

Implementation must at least return a texture count of TEXTURE_COUNT_MIN, two, the last texture and the decoding texture.

Returns GLMediaPlayer#TEXTURE_COUNT_MIN.

Annotations
@Override