RFR: 8273096: Add support for H.265/HEVC to JavaFX Media [v2]
Alexander Matveev
almatvee at openjdk.java.net
Sat Dec 11 05:25:04 UTC 2021
On Tue, 16 Nov 2021 02:24:11 GMT, Alexander Matveev <almatvee at openjdk.org> wrote:
>> - Added support for H.265/HEVC for all 3 platforms.
>> - Support is added only for .mp4 files over FILE/HTTP/HTTPS protocols. HTTP Live Streaming with H.265/HEVC is not supported.
>> - On Windows mfwrapper was introduced which uses Media Foundation APIs to decode HEVC.
>> - 10 and 12-bit HEVC was tested and also supported, however due to graphics pipeline not supporting 10-bit YUV rendering we will use color converter to convert video frame to 8-bit before sending it for rendering.
>> - Resolution upto 4k is supported.
>>
>> Additional runtime dependency requirements:
>> Windows: Windows 10 with HEVC Video Extensions installed.
>> macOS: macOS High Sierra and later
>> Linux: at least libavcodec56 and libswscale5
>>
>> Additional build dependency:
>> Linux: libswscale-dev
>
> Alexander Matveev has updated the pull request incrementally with one additional commit since the last revision:
>
> 8273096: Add support for H.265/HEVC to JavaFX Media [v3]
modules/javafx.media/src/main/native/gstreamer/plugins/mfwrapper/mfwrapper.cpp line 452:
> 450:
> 451: if (SUCCEEDED(hr))
> 452: hr = pBuffer->Lock(&pbBuffer, NULL, NULL);
I fixed unlock here as well in case if code below fails.
modules/javafx.media/src/main/native/gstreamer/plugins/mfwrapper/mfwrapper.cpp line 559:
> 557: hr = MFSetAttributeRatio(pInputType, MF_MT_PIXEL_ASPECT_RATIO, unNumerator, unDenominator);
> 558: else
> 559: hr = S_OK;
I fixed get/set MF_MT_PIXEL_ASPECT_RATIO and MF_MT_DEFAULT_STRIDE. We should only set it if we get it and it is ok if aspect ration or stride is not available. In way it is currently written we will overwrite value of hr if it is failed and never exit a loop as well.
-------------
PR: https://git.openjdk.java.net/jfx/pull/649
More information about the openjfx-dev
mailing list