aboutsummaryrefslogtreecommitdiffstats
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* Bug 1494 - GLMediaPlayer/GraphUI: Support Displaying Bitmap'ed Subtitles ↵Sven Göthel2024-02-0223-616/+1252
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (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-0112-43/+296
| | | | | | | | | 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.
* Vec[234][ifd]: Add toArray(..) methodSven Göthel2024-02-015-0/+39
|
* Bug 1494: Clarify SubtitleEvent class, adding general FFmpeg analog CodecID ↵Sven Göthel2024-02-016-45/+737
| | | | and hence also promoting VideoPixelFormat
* Bug 1495: GraphUI Shape: Fix updateMat() API docSven Göthel2024-01-311-3/+2
|
* 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
* GraphUI Demos: FontView01 can use scaling Lable ctor; UISceneDemo01b doesn't ↵Sven Göthel2024-01-312-3/+2
| | | | need to issue Shape.updateMat()
* Add Vec2f.set(Vec2i) and Vec2f(Vec2i); Add Texture.set(..) allowing a ↵Sven Göthel2024-01-312-0/+30
| | | | pending setup/update of texture and image dimensions
* GraphUI: Only issue Shape.mark*Dirty() if values were updated or data ↵Sven Göthel2024-01-314-12/+30
| | | | available; JOGL ImageSequence: Add addFrame(GL, TextureFrame), remove*Frame() and isSequenceAnimating()
* Bug 1496 - GraphUI Shape: Allow markShapeDirty() and markStateDirty() to be ↵Sven Göthel2024-01-311-11/+8
| | | | lock free
* Bug 1495: GraphUI Shape: Only updateMat() if marked dirty once in ↵Sven Göthel2024-01-311-34/+64
| | | | | | | | applyMatToMv() and getMat(*) It is sufficient to mark the internal iMat dirty when mutating the source values (pos, ..) and calling updateMat() only once when used in applyMatToMv() and getMat(*). iMatIdent can also be set to true within updateMat() IF neither mutations occured, i.e. no translocation, scale or rotation.
* Utilize PTS.getCurrent() where applicableSven Göthel2024-01-315-13/+13
|
* GLMediaPlayer: Split GLMediaFrameListener (rarely used) from ↵Sven Göthel2024-01-3117-114/+136
| | | | | | | | | | 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.
* Bug 1494: Add SubTextureEvent & SubEmptyEvent; Add SubtitleEvent.release() ↵Sven Göthel2024-01-315-31/+220
| | | | provided by owner to take back borrowed resources (texture of bitmap subtitle)
* GraphUI MediaButton: Add blending below subtitle, allow setting ↵Sven Göthel2024-01-292-18/+69
| | | | color/blending and subLineDY; MediaPlayer: Add full infoLine toggle with click on infoBox
* GLMediaPlayer: Add getSubtitleCodec()Sven Göthel2024-01-292-2/+11
|
* FFMPEGPlayer: Prep for bitmap'ed subtitles: Use glEnable()/glBindTexture() ↵Sven Göthel2024-01-289-65/+142
| | | | | | | 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().
* FFMPEGMediaPlayer/GraphUI MediaButton: AVSubtitles's start/end are relative ↵Sven Göthel2024-01-282-22/+34
| | | | to pts [ms] (fixed); Use ASSEventLine packets within proper pts only.
* Cleanup GLMediaPlayer.EventMask.Bit handling in GLMediaEventListener ↵Sven Göthel2024-01-286-12/+6
| | | | implementations: Either Uninit, Init, Pause or Play (exclusive)
* GraphUI MediaButton: Clear cached subtitle data on uninit and init from ↵Sven Göthel2024-01-281-2/+12
| | | | GLMediaPlayer
* FFMPEGMediaPlayer (native): Simplify subtitle handling in readNextPacket0()Sven Göthel2024-01-281-26/+10
|
* FFMPEGMediaPlayer (native): Set used sid to none if not selected (missed)Sven Göthel2024-01-281-0/+3
|
* GraphUI Demo UIMediaGrid00: Add missing patch from relocating getSymbolsFont()Sven Göthel2024-01-281-1/+1
|
* GraphUI Demos: Disable debug togglesSven Göthel2024-01-282-2/+2
|
* GraphUI MediaPlayer: Remove debug message (Behavior to disable border if ↵Sven Göthel2024-01-281-1/+0
| | | | zoomSize == 1, full-screen)
* GraphUI MediaButton/MediaPlayer-Widget: Add working subtitle (text + ↵Sven Göthel2024-01-283-14/+184
| | | | ass/saa) support via GLMediaPlayer/FFMPEGMediaPlayer
* GLMediaPlayer/FFMPEGMediaPlayer: Add working subtitle (text + ass/saa) ↵Sven Göthel2024-01-2812-36/+401
| | | | | | | | support via FFMpeg TODO: - We may want to refine subtitle PTS handling - We may want to support bitmapped subtitles
* GraphUI Misc Cleanup: Move get*Font() helper to Scene; Allow ↵Sven Göthel2024-01-285-24/+30
| | | | GraphShape.drawImpl0(..) override;
* GraphUI Group: Don't draw border is set invisibleSven Göthel2024-01-281-2/+2
|
* GraphUI MediaPlayer: Disable always DEBUG hackSven Göthel2024-01-271-1/+1
|
* GraphUI MediaPlayer: Bump Chapter tooltip scaleSven Göthel2024-01-271-1/+1
|
* GLMediaPlayer: Support tile metadataSven Göthel2024-01-277-47/+73
|
* GraphUI MediaPlayer Widget: Support switching audio and subtitle streams, ↵Sven Göthel2024-01-271-7/+54
| | | | show their language as a button - press to switch to next
* GLMediaPlayer: Add initial subtitle support, track audio/video/subtitle ↵Sven Göthel2024-01-2722-113/+468
| | | | | | | | 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-273-17/+17
| | | | 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-262-8/+15
|
* GraphUI Demos: Bump FontView01 + UIMediaGrid01Sven Göthel2024-01-262-34/+66
|
* GraphUI MediaPlayer: Cleanup infoLabel layout; Add sticky HUD (always-on) ↵Sven Göthel2024-01-261-40/+77
| | | | button; Fix tooltip help; Make slower-speed reduce by half if <= 1
* GraphUI RangeSlider: Use a modulating color for rect page frame for visible ↵Sven Göthel2024-01-261-4/+41
| | | | response when active
* GraphUI Shape: API doc for colors; add makeShapeDirty() on setColor(); add ↵Sven Göthel2024-01-261-9/+68
| | | | activeRGBAModulateOn.
* GraphUI Layout: Emphasize whether a value/parameter is scaled or unscaled in ↵Sven Göthel2024-01-266-72/+76
| | | | API doc to ease usage
* Math Vec*: Rename {scale->mul}(..) for non-scalar types (n-dim); Add div(..)Sven Göthel2024-01-2610-66/+130
|
* 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.
* Bug 1491: Add missing rename ↵Sven Göthel2024-01-251-2/+2
| | | | DefaultGraphicsDevice.swap{Device->}HandleAndOwnership()
* NativeWindowFactory.createDevice(..) w/ unitID for cloning; ↵Sven Göthel2024-01-256-82/+75
| | | | | | | | | | 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()
* Bug 1488: Complete/Fix producing the 64-bit shaderKey: Use long values in ↵Sven Göthel2024-01-251-36/+28
| | | | | | | | | | bit-shift expressions and simplify it commit 1dcfdf71c09c6d774ac47012c05e09da4a085d7b - still used the 'hash code' bit shift pattern, not necessary -> simplified - the value as not ensured to be long, hence conversion occured This caused Graph's MSAA not being picked up properly using the shaderKey.
* Graph: Drop non-existing 'JAVA' font from FontFactorySven Göthel2024-01-256-200/+14
|
* GraphUI MediaPlayer: Fix Zoom behavior; Disable DEBUG outputSven Göthel2024-01-191-33/+67
|