Due to legal reasons we cannot deploy binaries of it, which contains patented codecs.
Besides the default BSD/Linux/.. repositories and installations, precompiled binaries can be found at the listed location below.
The decoded video frame is written directly into an OpenGL texture on the GPU in it's native format. A custom fragment shader converts the native pixelformat to a usable RGB format if required. Hence only 1 copy is required before bloating the picture from YUV* to RGB, for example.
Implements pixel format conversion to RGB via fragment shader texture-lookup functions:
VideoPixelFormat#YUV420PVideoPixelFormat#YUVJ420PVideoPixelFormat#YUV422PVideoPixelFormat#YUVJ422PVideoPixelFormat#YUYV422VideoPixelFormat#BGR24Utilizes a slim dynamic and native binding to the Lib_av libraries:
Currently we are binary compatible w/:
| libav / ffmpeg | lavc | lavf | lavu | lavr/lswr | FFMPEG* class |
|---|---|---|---|---|---|
| 0.8 | 53 | 53 | 51 | FFMPEGv08 | |
| 9.0 / 1.2 | 54 | 54 | 52 | 01/00 | FFMPEGv09 |
| 10 / 2.[0-3] | 55 | 55 | 53/52 | 01/00 | FFMPEGv10 |
| 11 / 2.[4-8] | 56 | 56 | 54 | 02/01 | FFMPEGv11 |
| 12 / 2.[9-x] | 57 | 57 | 55 | 02/01 | TODO |
See FFmpeg:
Check tag 'FIXME: Add more planar formats !'
here and in the corresponding native code
jogl/src/jogl/native/libav/ffmpeg_impl_template.c
pkg set-publisher -p http://pkg.openindiana.org/sfe-encumbered.
pkt install pkg:/video/ffmpeg
| Modifier and Type | Field and Description |
|---|---|
| private int | |
| private static final boolean | |
| private AudioSink. | |
| private static final int | |
| private static final int | |
| private static final int | |
| private static final int | |
| public static final String | |
| private static final boolean | |
| private static final boolean | |
| private static final int | ENOSYS
POSIX ENOSYS : Function not implemented. |
| private long | |
| private static final FFMPEGNatives | |
| private final GLPixelStorageModes | |
| private String | |
| private static final int | |
| private int | |
| private String | |
| private int | |
| private boolean | |
| private int | |
| private int | |
| private VideoPixelFormat | |
| private int |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private final AudioSink. | avAudioFormat2Local(final AudioSampleFormat
ffmpeg/libav audio-sample-format, see audioSampleFmt, final int AudioSampleFormat.sample rate in Hz (1/s) audioSampleRate, final int number of channels audioChannels)Returns |
| protected final TextureSequence. | createTexImage(final GL gl, final int texName)
Implements abstract jogamp. |
| private final void | |
| protected final void | |
| protected final int | getNextTextureImpl(final GL
valid and current GL instance, shall be gl, final TextureSequence.null for audio only.the nextFrameTextureFrame to store the video PTS and texture data,
shall be null for audio only.Implements abstract jogamp. TextureFrame, has been reached.
|
| public final String | getTextureLookupFragmentShaderImpl()
Overrides jogamp. Implements com.
vec4 funcName(in getTextureSampler2DType() image, in vec2 texCoord) {
vec4 texColor = do_something_with(image, texCoord);
return texColor;
}
|
| public final String | getTextureLookupFunctionName(final String
desired lookup function name. If desiredFuncName)null or ignored by the implementation,
a build-in name is returned.Overrides jogamp. Implements com. texture2D,
if not overridden by specialization.
|
| protected final void | initGLImpl(final GL
null for audio-only, otherwise a valid and current GL object. gl)Implements abstract jogamp. |
| protected final void | initStreamImpl(final int vid, final int aid)
Implements abstract jogamp. |
| pack-priv final boolean | isAudioFormatSupported(final int
ffmpeg/libav audio-sample-format, see audioSampleFmt, final int AudioSampleFormat.sample rate in Hz (1/s) audioSampleRate, final int number of channels audioChannels)Native callback
Converts the given libav/ffmpeg values to |
| public static final boolean | |
| public final boolean | |
| public final boolean | |
| protected void | postNextTextureImpl(final GL gl)
Overrides jogamp. |
| protected void | preNextTextureImpl(final GL gl)
Overrides jogamp. |
| pack-priv final void | |
| protected final synchronized int | |
| pack-priv void | setupFFAttributes(final int vid, final int pixFmt, final int planes, final int bitsPerPixel, final int bytesPerPixelPerPlane, final int tWd0, final int tWd1, final int tWd2, final int vW, final int vH, final int aid, final int audioSampleFmt, final int audioSampleRate, final int audioChannels, final int
in audio samples per frame and channel audioSamplesPerFrameAndChannel)Native callback |
| pack-priv void | updateVidAttributes(final boolean isInGLOrientation, final int pixFmt, final int planes, final int bitsPerPixel, final int bytesPerPixelPerPlane, final int tWd0, final int tWd1, final int tWd2, final int vW, final int vH)
Native callback |
| audioSamplesPerFrameAndChannel | back to summary |
|---|---|
| private int audioSamplesPerFrameAndChannel | |
| available | back to summary |
|---|---|
| private static final boolean available | |
| avChosenAudioFormat | back to summary |
|---|---|
| private AudioSink. | |
| avCodecMajorVersionCC | back to summary |
|---|---|
| private static final int avCodecMajorVersionCC | |
| avFormatMajorVersionCC | back to summary |
|---|---|
| private static final int avFormatMajorVersionCC | |
| avResampleMajorVersionCC | back to summary |
|---|---|
| private static final int avResampleMajorVersionCC | |
| avUtilMajorVersionCC | back to summary |
|---|---|
| private static final int avUtilMajorVersionCC | |
| dev_video_linux | back to summary |
|---|---|
| public static final String dev_video_linux | |
| enableAvResample | back to summary |
|---|---|
| private static final boolean enableAvResample | |
| enableSwResample | back to summary |
|---|---|
| private static final boolean enableSwResample | |
| ENOSYS | back to summary |
|---|---|
| private static final int ENOSYS POSIX ENOSYS : Function not implemented. FIXME: Move to GlueGen ?! | |
| moviePtr | back to summary |
|---|---|
| private long moviePtr | |
| natives | back to summary |
|---|---|
| private static final FFMPEGNatives natives | |
| psm | back to summary |
|---|---|
| private final GLPixelStorageModes psm | |
| singleTexComp | back to summary |
|---|---|
| private String singleTexComp | |
| swResampleMajorVersionCC | back to summary |
|---|---|
| private static final int swResampleMajorVersionCC | |
| texHeight | back to summary |
|---|---|
| private int texHeight | |
| texLookupFuncName | back to summary |
|---|---|
| private String texLookupFuncName | |
| texWidth | back to summary |
|---|---|
| private int texWidth | |
| usesTexLookupShader | back to summary |
|---|---|
| private boolean usesTexLookupShader | |
| vBitsPerPixel | back to summary |
|---|---|
| private int vBitsPerPixel | |
| vBytesPerPixelPerPlane | back to summary |
|---|---|
| private int vBytesPerPixelPerPlane | |
| vPixelFmt | back to summary |
|---|---|
| private VideoPixelFormat vPixelFmt | |
| vPlanes | back to summary |
|---|---|
| private int vPlanes | |
| FFMPEGMediaPlayer | back to summary |
|---|---|
| public FFMPEGMediaPlayer() | |
| avAudioFormat2Local | back to summary |
|---|---|
| private final AudioSink. Returns
| |
| createTexImage | back to summary |
|---|---|
| protected final TextureSequence. Implements abstract jogamp.
| |
| destroyAudioSink | back to summary |
|---|---|
| private final void destroyAudioSink() | |
| destroyImpl | back to summary |
|---|---|
| protected final void destroyImpl(final GL gl) Implements abstract jogamp.
| |
| getNextTextureImpl | back to summary |
|---|---|
| protected final int getNextTextureImpl(final GL gl, final TextureSequence. Implements abstract jogamp. Doc from jogamp. Process stream until the next video frame, i.e.
Video frames shall be ignored, if
Audio frames shall be ignored, if Method may be invoked on the StreamWorker decoding thread. Implementation shall care of OpenGL synchronization as required, e.g. glFinish()/glFlush()!
| |
| getTextureLookupFragmentShaderImpl | back to summary |
|---|---|
| public final String getTextureLookupFragmentShaderImpl() throws IllegalStateException Overrides jogamp. Implements com. Doc from jogamp. Returns the complete texture2D lookup function code of type
vec4 funcName(in getTextureSampler2DType() image, in vec2 texCoord) {
vec4 texColor = do_something_with(image, texCoord);
return texColor;
}
funcName can be negotiated and queried via getTextureLookupFunctionName(String) will ignore the desired function name
and returns the build-in lookup function name.
This implementation simply returns an empty string since it's using
the build-in function texture2D,
if not overridden by specialization.
Depending on the pixelformat, a specific conversion shader is being created,
e.g. YUV420P to RGB. Otherwise the call is delegated to it's super class.
| |
| getTextureLookupFunctionName | back to summary |
|---|---|
| public final String getTextureLookupFunctionName(final String desiredFuncName) throws IllegalStateException Overrides jogamp. Implements com. Doc from jogamp.
This implementation simply returns the build-in function name of
| |
| initGLImpl | back to summary |
|---|---|
| protected final void initGLImpl(final GL gl) throws IOException, GLException Implements abstract jogamp. Doc from jogamp. Shall initialize all GL related resources, if not audio-only.
Shall also take care of | |
| initStreamImpl | back to summary |
|---|---|
| protected final void initStreamImpl(final int vid, final int aid) throws IOException Implements abstract jogamp. Doc from jogamp. Implementation shall set the following set of data here
| |
| isAudioFormatSupported | back to summary |
|---|---|
| pack-priv final boolean isAudioFormatSupported(final int audioSampleFmt, final int audioSampleRate, final int audioChannels) Native callback
Converts the given libav/ffmpeg values to
| |
| isAvailable | back to summary |
|---|---|
| public static final boolean isAvailable() | |
| pauseImpl | back to summary |
|---|---|
| public final boolean pauseImpl() Implements abstract jogamp.
| |
| playImpl | back to summary |
|---|---|
| public final boolean playImpl() Implements abstract jogamp.
| |
| postNextTextureImpl | back to summary |
|---|---|
| protected void postNextTextureImpl(final GL gl) Overrides jogamp.
| |
| preNextTextureImpl | back to summary |
|---|---|
| protected void preNextTextureImpl(final GL gl) Overrides jogamp.
| |
| pushSound | back to summary |
|---|---|
| pack-priv final void pushSound(final ByteBuffer sampleData, final int data_size, final int audio_pts) | |
| seekImpl | back to summary |
|---|---|
| protected final synchronized int seekImpl(final int msec) Implements abstract jogamp.
| |
| setupFFAttributes | back to summary |
|---|---|
| pack-priv void setupFFAttributes(final int vid, final int pixFmt, final int planes, final int bitsPerPixel, final int bytesPerPixelPerPlane, final int tWd0, final int tWd1, final int tWd2, final int vW, final int vH, final int aid, final int audioSampleFmt, final int audioSampleRate, final int audioChannels, final int audioSamplesPerFrameAndChannel) Native callback
| |
| updateVidAttributes | back to summary |
|---|---|
| pack-priv void updateVidAttributes(final boolean isInGLOrientation, final int pixFmt, final int planes, final int bitsPerPixel, final int bytesPerPixelPerPlane, final int tWd0, final int tWd1, final int tWd2, final int vW, final int vH) Native callback | |