aboutsummaryrefslogtreecommitdiffstats
path: root/src/jogl/classes/jogamp
Commit message (Collapse)AuthorAgeFilesLines
* Added support for reading the SVG table. # Conflicts: # ↵Bernhard Haumacher2024-02-034-48/+363
| | | | src/jogl/classes/jogamp/graph/font/typecast/ot/TTFont.java # src/jogl/classes/jogamp/graph/font/typecast/ot/table/Table.java
* Added documentation to the 'loca' table.Bernhard Haumacher2024-02-031-5/+33
|
* Improved documentation of Cmap table.Bernhard Haumacher2024-02-038-6/+331
|
* Bugfix: Format 14 header of Cmap table is not skipped correctly.Bernhard Haumacher2024-02-031-2/+1
|
* Added offset table as member to the font.Bernhard Haumacher2024-02-035-17/+52
| | | | | | | | * Include the offset table in the font's dump. * Simplified reading since the offset table now does not be read twice. # Conflicts: # src/jogl/classes/jogamp/graph/font/typecast/ot/OTFont.java # src/jogl/classes/jogamp/graph/font/typecast/ot/TTFont.java
* Added documentation to the HmtxTable.Bernhard Haumacher2024-02-031-12/+148
|
* Added documentation to the 'glyf' table and structures.Bernhard Haumacher2024-02-0319-152/+989
| | | | | | | | | | | | | | * Completed missing toString() functions in some table. * Added dump() functionality to create a human readable description of all font tables with complete detail. * Fixed some signed/unsigned problems in the parser. # Conflicts: # src/jogl/classes/jogamp/graph/font/typecast/ot/OTFont.java # src/jogl/classes/jogamp/graph/font/typecast/ot/TTFont.java # src/jogl/classes/jogamp/graph/font/typecast/ot/table/GlyfCompositeDescript.java # src/jogl/classes/jogamp/graph/font/typecast/ot/table/GlyfDescript.java # src/jogl/classes/jogamp/graph/font/typecast/ot/table/NameTable.java # src/test/java/net/java/dev/typecast/ot/TTFontTest.java
* Getters for macStyle bits, enhanced docu for fontDirectionHint.Bernhard Haumacher2024-02-032-16/+150
|
* Added JavaDoc references, split version fields according to spec.Bernhard Haumacher2024-02-031-6/+100
|
* Documentation for `HeadTable`Bernhard Haumacher2024-02-0332-55/+439
| | | | | | | | | | | | | | | | | | | * Added documentation to fields in `HeadTable` taken from https://docs.microsoft.com/en-us/typography/opentype/spec/head. * Added `LongDateTime` conversion of date values encoded as "seconds since 1904". * Added `getType()` API to `Table` interface. # Conflicts: # src/jogl/classes/jogamp/graph/font/typecast/ot/table/HdmxTable.java # src/jogl/classes/jogamp/graph/font/typecast/ot/table/HeadTable.java # src/jogl/classes/jogamp/graph/font/typecast/ot/table/LocaTable.java # src/jogl/classes/jogamp/graph/font/typecast/ot/table/SbixTable.java Original commit from typecast merge: From 43c20bb2e7644aef7002caeb93e1770be5cacaab Mon Sep 17 00:00:00 2001 From: Bernhard Haumacher <[email protected]> Date: Sat, 9 May 2020 12:49:39 +0200
* Graph/GraphUI: Move getDefault*() to FontFactory and add ↵Sven Göthel2024-02-031-0/+11
| | | | {get,set}FallbackFont() + Font.getBestCoverage(..); Use fallback-font in MediaButton in case chosen font doesn't match (foreign languages, e.g. 'zho' Chinese .. )
* Bug 1493: Supply language code to SubtitleEvent, perhaps allowsing player to ↵Sven Göthel2024-02-021-6/+3
| | | | select font for ASS/Text rendering; Remove GLMediaPlayer's getStreamLang() as replaced by getLang()
* Remove Clonable and clone() in favor of explicit determined copy() and ↵Sven Göthel2024-02-022-11/+11
| | | | copy-ctor in com.jogamp.graph.* and com.jogamp.math.*
* GLMediaPlayerImpl: Disable subDEBUG flagSven Göthel2024-02-021-1/+1
|
* GLMediaPlayer: Adjust API doc and certain names differentiating video (from ↵Sven Göthel2024-02-021-13/+13
| | | | subtititle) etc.
* GLMediaPlayerImpl.StreamWorker: Don't grow videoFramesFree since having ↵Sven Göthel2024-02-021-4/+0
| | | | removed buffer grow in commit 68ca5b14966cb7eec9501c17dc8b3b465421a68e
* GLMediaPlayerImpl: Allow one frame to be shown paused when issuing seek(), ↵Sven Göthel2024-02-021-5/+14
| | | | | | i.e. 'oneVideoFrameOnce'. This allows a player to see the current seek'ed position while paused.
* Bug 1494 - GLMediaPlayer/GraphUI: Support Displaying Bitmap'ed Subtitles ↵Sven Göthel2024-02-0211-101/+322
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (PGS ..) via FFMPEGFMediaPlayer/FFmpeg FFMPEGFMediaPlayer related changes: - Add libswscale (6th FFmpeg lib used) for sws_getCachedContext(), sws_scale() and sws_freeContext(), used natively to convert the palette'ed bitmap into RGBA colorspace -> GL texture - Handling AVSubtitleRect.type SUBTITLE_BITMAP -- only handled if libswscale is available -- config/adjust texture object -- sws_scale palette'ed bitmap to texture -- intermediate memory is cached, may be resized and free'ed at destroy -- texture objects are managed and passed from GLMediaPlayerImpl, as they are also forwarded to player client via SubBitmapEvent - Passing the AVCodecID to GLMediaPlayerImpl, converted to our CodecID enum. - Unifying creation and opening of AVCodecContext with 'createOpenedAVCodecContext(..)' +++ SubtitleEvent* - SubTextEvent now also handles ASS.Dialogue (FFmpeg 4) besides ASS.Event (FFmpeg 5, 6, ..). +++ GLMediaPlayerImpl - Added ringbuffer subTexFree, managing Texture for bitmap'ed subtitles -- Uses 1 bitmap-subtitle Texture per used textureCount in cache, as one bitmap-subtile can be displayed per frame. Could be potentially reduced to just 2 .. but resources used are relatively low here. - Validating subTexFree + videoFramesFree usage, use blocking get/put ringbuffer due to utilization from different threads. - Receives subtitle content from native getNextPacket0() via callback, creates SubtitleEvent instance and passes it to a SubtitleEventListener - if exists. (See MediaButton example) -- SubBitmapEvent also gets its special SubBitmapEvent.TextureOwner to handle client releasing the event and allowing us to put back the Texture resource to 'subTexFree'. This passing through of the Texture object is probably a weakness of this lifecycle and requires the client to ensure SubtitleEvent.release() gets called. See MediaButton example! - Exposing CodecID, allowing clients like MediaButton to handle SubtitleEvent content according to codec
* Bug 805: Graph/GraphUI TextureSequence Scale: Move ↵Sven Göthel2024-02-017-7/+71
| | | | | | | | | Region.COLORTEXTURE_LETTERBOX_RENDERING_BIT to TextureSequence and add enabling/disabling of aratio adjustment + letter-box back-color TextureSequence color-texture params fetched from Graph VBORegion* and fed into shader. This allows more flexibility in aspect-ratio adjustment as well as setting a clipping background color for the added letter-box space.
* Bug 1494: Clarify SubtitleEvent class, adding general FFmpeg analog CodecID ↵Sven Göthel2024-02-011-191/+0
| | | | and hence also promoting VideoPixelFormat
* Graph shader (pass1 simple): USE_COLOR_TEXTURE: Clip to vec4(0) color using ↵Sven Göthel2024-01-311-4/+4
| | | | alpha 0 instead of the debug color white vec4(1), which leads to the white seam if out of gcu_ColorTexBBox
* GLMediaPlayer: Split GLMediaFrameListener (rarely used) from ↵Sven Göthel2024-01-312-42/+100
| | | | | | | | | | GLMediaEventListener, easing listener callbacks; Prepare SubtitleEventListener generalization (Bug 1494) Moves pushSound(), pushSubtitle*() from FFMPEGMediaPlayer to GLMediaPlayerImpl, as it is handled in a generic way - even though currently only called by native FFMPEGMediaPlayer implementation. Note: This patch is incomplete, i.e. not even compile clean. But choses as-is to semantically split the work to ease review.
* GLMediaPlayer: Add getSubtitleCodec()Sven Göthel2024-01-291-0/+3
|
* FFMPEGPlayer: Prep for bitmap'ed subtitles: Use glEnable()/glBindTexture() ↵Sven Göthel2024-01-285-13/+36
| | | | | | | func-ptr in native; readNextPacket0() passes video+subtitle texTarget and texID For bitmap subtitles we need to push the bitmap into its own texture. Hence readNextPacket0() must switch to used texture using glEnable() on !core and glBindTexture().
* GLMediaPlayer/FFMPEGMediaPlayer: Add working subtitle (text + ass/saa) ↵Sven Göthel2024-01-285-27/+67
| | | | | | | | support via FFMpeg TODO: - We may want to refine subtitle PTS handling - We may want to support bitmapped subtitles
* GLMediaPlayer: Support tile metadataSven Göthel2024-01-273-26/+48
|
* GLMediaPlayer: Add initial subtitle support, track audio/video/subtitle ↵Sven Göthel2024-01-279-62/+217
| | | | | | | | streams and languages and add convenient switchStream(..) entry. audio/video/subtitle streams and language metadata is maintained by arrays holding the stream-IDs and language string identifier. Implementation added in FFMPEGPlayer for these data-sets.
* GraphUI MediaPlayer: seek from display-thread, don't act on ↵Sven Göthel2024-01-271-3/+3
| | | | SliderAdapter.clicked() as dragged is always called
* GLMediaPlayerImpl: Throw out video_queue_growthSven Göthel2024-01-271-35/+2
|
* GLMediaPlayer: Fix playing with single-threaded mode w/ texture-count 1Sven Göthel2024-01-261-6/+12
|
* Bug 1491: GLMediaPlayerImpl: Use a shared *GraphicsDevice for all compatible ↵Sven Göthel2024-01-251-3/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | shared GLContext, removing resource restrictions In a use case with hundreds of GLMediaPlayer instances, this causes the application to bail out due to running out of resources. +++ GLMediaPlayer exposes resource restrictions and locking related with the created off-thread shared GLContext due to its newly created NativeWindow *GraphicsDevice instance (on X11). On the X11 platform, the *GraphicsDevice actually uses a native resource (X11 Display handle) and hence creating such device is costly and limited. To operate an off-thread GLContext w/o actual X11 input handling, it is *NOT* required to use a new instance. +++ Further more, the device is using locking. To operate an off-thread GLContext, it is *NOT* required to use locking on it as it does not perform actual X11 input handling etc. All operations are performed on the shared GL context. +++ Solution is to create a shared non-locking device clone compatible with the source. A share counter shall determine that the last one actually gets destructed. The usual ..
* Bug 1491: FFMPEGMediaPlayer: Lock moviePtr lifecycle phase in-between ↵Sven Göthel2024-01-251-69/+73
| | | | | | | | | [initStreamImpl - destruction] initStreamImpl() calls ffmpeg natives.setStream0(..), which in turn callsback to the GLMediaPlayerImpl and FFMPEGPlayer and hence requires a valid moviePtr. In total, it covers a longer time period. This patch uses a moviePtrLock object avoiding destruction while within initStreamImpl.
* NativeWindowFactory.createDevice(..) w/ unitID for cloning; ↵Sven Göthel2024-01-251-3/+7
| | | | | | | | | | DefaultGraphicsDevice: Move ownership (Object) code into base class ensuring same code NativeWindowFactory.createDevice(..) w/ unitID - Allows cloning a device instance with same parameter. DefaultGraphicsDevice: Move ownership (Object) code final into base class ensuring same code - Rename DefaultGraphicsDevice.swapDeviceHandleAndOwnership() -> swapHandleAndOwnership()
* Graph: Drop non-existing 'JAVA' font from FontFactorySven Göthel2024-01-251-185/+0
|
* VBORegionSPES2: Disable verbose flag in TextureSequence.setTexCoordBBox() .. ↵Sven Göthel2024-01-221-1/+1
| | | | oops
* Bug 1488: FFMPEGMediaPlayer: Fix getTextureFragmentShaderHashID(), i.e. use ↵Sven Göthel2024-01-221-6/+3
| | | | actual tc_w_1 = (float)getWidth() / (float)texWidth value as hardcoded within the shader.
* Graph Clipping: Use Frustum Clipping using AABBox -> Mv transformed Cube -> ↵Sven Göthel2024-01-2015-103/+121
| | | | | | | | | | | | | | | | | | | | | | | | | | Frustum mapping + GraphUI Support AABBox clipping naturally couldn't be transformed into 3D Model-View (Mv) Space, as it is axis aligned and only provided 2 points (min/max). Therefor we map the Group's AABBox to a 8-point Cube, perform the Mv-transformation and then produce the 6-plane Frustum. As before, we cull fully outside shapes within the Group's draw method and perform fragment clipping with same Frustum planes in the shader. With clipping enabled, the 3D z-axis getBounds() depth will be slightly increased for functional Frustum operation. This is also done for setFixedSize(Vec2f). The Frustum planes are copied to the Graph shader via float[4*6] -> uniform vec4 gcu_ClipFrustum[6]; // L, R, B, T, N, F each {n.x, n.y, n.z, d} +++ Concludes related work of below commits - 1040bed4ecc6f4598ea459f1073a9240583fc3c3 - 5cca51e32999a882e2a5f00cb45ecafc824ffd86
* Graph/GraphUI AA-Quality + SampleCount (shader): Push params down to ↵Sven Göthel2024-01-163-49/+47
| | | | | | | | | | | | | | | | | | RegionRenderer's RenderState usually rarely set from top of user API, reducing complexity. Discussion: Alternative was to pass AA-Quality same as SampleCount from the top (e.g. GraphUI Scene), however, this convolutes the API even more. Both parameter modify the resulting shader code in pass2 rendering (only). The used 'renderMode' is still maintained within the Region, since it contains more dynamic states individual to each Region instance (color-texture, ..). This despite 'renderMode' also changes the RenderState's shader program. In the end, it really doesn't matter and is a choice of frequency - the pipeline is usually rendering from on OpenGL rendering thread sequentially. AA-Quality and SampleCount simply usually don't change that often and are set only once.
* Bump (c) -2024 for edited files + LICENSE.txtSven Göthel2024-01-145-5/+5
|
* Graph/GraphUI: Revise Graph Region ShaderMapping, fix AABBox-Clipping for ↵Sven Göthel2024-01-1412-228/+273
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pass2-AA, revise Pass2 AA Quality parameter .. Misc: - Graph VBORegion2PVBAAES2: Drop unused FBO rescale - Move MIN/MAX QUALITY/SAMPLE from GraphUI Scene -> Graph Region +++ Quality -> Pass2 AA Quality - Drop quality field in region - Pass quality to GLRegion.draw(..) similar to sampleCount for dynamic shader and switch - TODO: Pass quality parameter in TextRegionUtil's functions Fix RegionRenderer Shader Mapping - Use ShaderKey class to properly implement the hash value and equals method - For this, TextureSequence.getTextureFragmentShaderHashID() has been added to provide actual shader-snippet for the equals function - All required criterias are included in the hash value and equals method Fix AABBox Clipping for Pass-2 AA - Clipping in pass2-AA must happen in pass2 on actual gcu_PMVMatrix01 (not ortho) +++ GraphUI GraphShape - Rename: [get,set]{->AA}Quality() GraphUI Scene - Rename: mark{All->}ShapesDirty(), set{AllShapes->}Sharpness(), set{AllShapes->AA}Quality() - Fix setSampleCount(..), i.e. markStatesDirty() not markShapesDirty() - Fix setAAQuality(), markShapesDirty() and markStatesDirty(): Use forAll(..) to traverse through all shapes and groups. GraphUI Group - Add setFixedSize() - Add setClipOnBox() - Document setRelayoutOnDirtyShapes(), isShapeDirty()
* Graph VBORegion2PVBAAES2: Fix Rescale (MAX texSize): renderFboHeight shall ↵Sven Göthel2024-01-121-1/+1
| | | | use winHeight (typo)
* Graph Clipping: Add missing Modelview-Matrix (Mv) Multiplication / ConsiderationSven Göthel2024-01-092-2/+2
| | | | | | - GLSL vertex shader sets smooth varying 'gcv_ClipBBoxCoord' w/ Mv multiplied vertex-coord - RegionRenderer.setClipBBox(AABBox) expects a pre-multiplied Mv AABBox covering an independent area, not per Shape/Region. - This works as expected with moving/scaling of each Shape/Region etc
* Graph Clipping: Initial Region impl of AABBox clipping using GLSL shader ↵Sven Göthel2024-01-093-21/+72
| | | | | | | | | | | | (Convenient using Graph/GraphUI produced AABBox) Simple demo, setting clip-bbox manually: - src/demos/com/jogamp/opengl/demos/graph/ui/UIShapeClippingDemo00.java TODO: - GLSL: Add missing Mv-multiplication of vertex-position -> gcv_ClipBBoxCoord -- AABBox min/max should be set pre-multiplied w/ Mv covering an independent area, not per Shape/Region. -- This to properly work with moving/scaling of each Shape/Region etc
* Graph Clipping: GLSL: Add `USE_AABBOX_CLIPPING`, i.e. clipping via AABBox ↵Sven Göthel2024-01-098-19/+50
| | | | | | | | | | | | | | | min/max vec3 as convenient using Graph/GraphUI produced AABBox USE_AABBOX_CLIPPING - Conditional compilation w/ macro 'USE_AABBOX_CLIPPING' - gcv_ClipBBoxCoord smooth varying setup in vertex shader - fragment shader clips via branch if( is_inside(gcv_ClipBBoxCoord, gcu_ClipBBox[0], gcu_ClipBBox[1]) < 0.5 ) { CLIP } - clipping via discard or alpha=0 in case of buggy-discard. Other optimization: - Drop gcv_ColorTexExt, fragment-shader uses gcu_ColorTexBBox[2] directly (flat) - Simplified gcv_ColorTexCoord smooth varying equation in vertex shader.
* Graph GLSL functions.glsl: Complete overload vec2 and vec3 variants; Fix ↵Sven Göthel2024-01-091-8/+52
| | | | | | | | | | | | | | | | | | 'and'/'or' semantic (swapped); Add EPSILON in clip_coord(..) and add is_inside(..) function Complete overload vec2 and vec3 variants Fix 'and'/'or' semantic (swapped) - 'and' uses multiplication, i.e. all arguments must be > 0 (ideally 1) - 'or' uses addition, i.e. only one arguments must be > 0 (ideally 1) - both uses clamp [0..1] Add EPSILON in clip_coord(..) - Only 'coord > high+EPSILON' is outside Add is_inside(..) function - Similar to clip_coord(..) but returns float 0 or 1 instead of selecting color.
* GraphUI MediaPlayer / GLMediaPlayer: Add current chapter-title to info-fieldSven Göthel2024-01-072-2/+14
|
* GLMediaPlayer/FFMPEGMediaPlayer: Add chapter metadata support and use ↵Sven Gothel2023-12-307-9/+70
| | | | | | | | com.jogamp.common.av.PTS.millisToTimeStr(..) Chapter metadata is now supported via our FFMPEGMediaPlayer implementation. Added public method: 'Chapters[] GLMediaPlayer.getChapters()'
* OMXGLMediaPlayer: Add 'printNativeInfo(..)' - completes commit ↵Sven Gothel2023-12-181-0/+6
| | | | d99c2d8b28470d335ab5b30124ef8b0607b3b90f
* GLMediaPlayer: Add printNativeInfo(..) exposing used native library ↵Sven Gothel2023-12-185-38/+86
| | | | information (if any), FFMPEG* utilizes NativeLibrary.get[Native]LibraryPath()
* Graph Shader: Fix 'curverenderer01-single.vp' aligning w/ ↵Sven Gothel2023-12-181-2/+3
| | | | 'curverenderer01-pass1.vp' (commit 297c48f4fefd1ab59800524ea5f0dd56684d6786)