Integrated: 8337960: Improve performance of mfwrapper by reusing GStreamer media buffers for decoded video

Alexander Matveev almatvee at openjdk.org
Wed Feb 19 16:41:05 UTC 2025


On Wed, 5 Feb 2025 03:00:17 GMT, Alexander Matveev <almatvee at openjdk.org> wrote:

> - Added new class `CMFGSTBuffer` which can allocate memory internally or provide GStreamer allocated memory to Media Foundation.
> - Added `GstBufferPool` to limit allocation of output buffers used for rendering (memory will not be allocated for each buffer, but instead will be reused from pool). Limits are 3 min buffers and 6 max buffers. During testing 3 buffers was enough.
> - Changed `CoInitializeEx` to `COINIT_MULTITHREADED` as per Media Foundation requirements.
> - Added error handling for `ProcessOutput` in case of https://bugs.openjdk.org/browse/JDK-8329227. With error handling `MediaPlayer` fails nicely instead of silent hang.

This pull request has now been integrated.

Changeset: 307e3087
Author:    Alexander Matveev <almatvee at openjdk.org>
URL:       https://git.openjdk.org/jfx/commit/307e3087f350bee5f73710b00588784696e84b07
Stats:     890 lines in 8 files changed: 640 ins; 64 del; 186 mod

8337960: Improve performance of mfwrapper by reusing GStreamer media buffers for decoded video

Reviewed-by: kcr, arapte, sykora

-------------

PR: https://git.openjdk.org/jfx/pull/1695


More information about the openjfx-dev mailing list