RFR: 8277309: Add support for H.265/HEVC to HTTP Live Streaming

Kevin Rushforth kcr at openjdk.java.net
Tue Mar 8 23:58:13 UTC 2022


On Fri, 4 Feb 2022 11:24:48 GMT, Alexander Matveev <almatvee at openjdk.org> wrote:

> - Added support for fragmented MP4 with HEVC/H.265, H.264 and AAC. 
>  - Added support for elementary AAC streams without any container for audio only streams.
>  - Added "aacparse" plugin from GStreamer. Required on Linux, since decoder cannot handle AAC elementary streams directly. DirectShow decoder works without it.
>  - DirectShow H.264 decoder on Windows and H.265/H.264 decoder on Linux will be reloaded when fMP4 stream changes resolution. Dynamic format change did not worked for these streams on Windows and Linux.

All my testing looks good. I spot checked the new code, and it looks good as well. I left a couple questions for you, but I'll approved it as is.

modules/javafx.media/src/main/java/com/sun/media/jfxmedia/locator/HLSConnectionHolder.java line 406:

> 404:                     mediaFileIndex = 0;
> 405:                 }
> 406:             } catch (Exception e) {

Do you need to catch exceptions here? Or would just doing a try / finally be sufficient? If you do intend to catch all exceptions here, should some logging or error handling be done if an exceptions occurs?

modules/javafx.media/src/main/native/gstreamer/plugins/dshowwrapper/dshowwrapper.cpp line 1954:

> 1952:     }
> 1953: 
> 1954:     if (decoder->pDecoder != NULL && decoder->pGraph != NULL)

Can `decoder->pDecoder` be non-null and `decoder->pGraph` be null? If so, then the decoder wouldn't be released. Does it need to be?

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

Marked as reviewed by kcr (Lead).

PR: https://git.openjdk.java.net/jfx/pull/726


More information about the openjfx-dev mailing list