Skip to content

Commit

Permalink
8317508: Provide media support for libavcodec version 60
Browse files Browse the repository at this point in the history
Reviewed-by: sykora, arapte
  • Loading branch information
Alexander Matveev committed Oct 19, 2023
1 parent 27594f0 commit de456da
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 5 deletions.
9 changes: 5 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2945,6 +2945,7 @@ project(":media") {
media name: "ffmpeg-3.3.3", ext: "tar.gz"
media name: "ffmpeg-4.0.2", ext: "tar.gz"
media name: "ffmpeg-5.1.2", ext: "tar.gz"
media name: "ffmpeg-6.0", ext: "tar.gz"
}
implementation project(":base")
implementation project(":graphics")
Expand Down Expand Up @@ -3087,7 +3088,7 @@ project(":media") {
if (t.name == "linux") {
// Pre-defined command line arguments
def cfgCMDArgs = ["sh", "configure"]
def commonCfgArgs = ["--enable-shared", "--disable-debug", "--disable-static", "--disable-yasm", "--disable-doc", "--disable-programs", "--disable-everything"]
def commonCfgArgs = ["--enable-shared", "--disable-debug", "--disable-static", "--disable-asm", "--disable-doc", "--disable-programs", "--disable-everything"]
def codecsCfgArgs = ["--enable-decoder=aac,mp3,mp3float,h264,hevc", "--enable-parser=aac,h264,hevc", "--enable-demuxer=aac,h264,hevc,mpegts,mpegtsraw"]

def copyLibAVStubs = {String fromDir, String toDir ->
Expand Down Expand Up @@ -3291,8 +3292,8 @@ project(":media") {
doLast {
project.ext.libav = [:]
project.ext.libav.basedir = "${buildDir}/native/linux/ffmpeg"
project.ext.libav.versions = [ "3.3.3", "4.0.2", "5.1.2" ]
project.ext.libav.versionmap = [ "3.3.3" : "57", "4.0.2" : "58", "5.1.2" : "59" ]
project.ext.libav.versions = [ "3.3.3", "4.0.2", "5.1.2", "6.0" ]
project.ext.libav.versionmap = [ "3.3.3" : "57", "4.0.2" : "58", "5.1.2" : "59", "6.0" : "60" ]

libav.versions.each { version ->
def libavDir = "${libav.basedir}/ffmpeg-${version}"
Expand Down Expand Up @@ -3372,7 +3373,7 @@ project(":media") {
project.ext.libav.libavffmpeg.versions = [ "56" ]
project.ext.libav.ffmpeg = [:]
project.ext.libav.ffmpeg.basedir = "${buildDir}/native/linux/ffmpeg/ffmpeg"
project.ext.libav.ffmpeg.versions = [ "57", "58", "59" ]
project.ext.libav.ffmpeg.versions = [ "57", "58", "59", "60" ]

project.ext.libav.versions.each { version ->
def libavDir = "${project.ext.libav.basedir}-${version}"
Expand Down
5 changes: 5 additions & 0 deletions gradle/verification-metadata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@
<sha256 value="87fe8defa37ce5f7449e36047171fed5e4c3f4bb73eaccea8c954ee81393581c" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="" name="ffmpeg-6.0" version="">
<artifact name="ffmpeg-6.0-.tar.gz">
<sha256 value="f4ccf961403752c93961927715f524576d1f4dd02cd76d8c76aed3bbe6686656" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="" name="icu4c-73_1-data-bin-l" version="">
<artifact name="icu4c-73_1-data-bin-l-.zip">
<sha256 value="4038298ee02a0c38917185ef8ff4ebde9c8b552c777fd03e4df6c6b4b1825e20" origin="Generated by Gradle"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ protected NativeMediaManager() {
dependencies.add("avplugin-ffmpeg-57");
dependencies.add("avplugin-ffmpeg-58");
dependencies.add("avplugin-ffmpeg-59");
dependencies.add("avplugin-ffmpeg-60");
}
if (PlatformUtil.isMac()) {
dependencies.add("fxplugins");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ static const int AVCODEC_LIBAV_EXPLICIT_VERSIONS[] = { 54, 56 };
// For ffmpeg (libavcodec-ffmpeg.so)
static const int AVCODEC_FFMPEG_EXPLICIT_VERSIONS[] = { 56 };
// For libav or ffmpeg (libavcodec.so)
static const int AVCODEC_EXPLICIT_VERSIONS[] = { 57, 58, 59 };
static const int AVCODEC_EXPLICIT_VERSIONS[] = { 57, 58, 59, 60 };

/*
* Callback passed to dl_iterate_phdr(): finds the path of
Expand Down

3 comments on commit de456da

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sashamatveev
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/backport jfx21u

@openjdk
Copy link

@openjdk openjdk bot commented on de456da Oct 20, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sashamatveev the backport was successfully created on the branch sashamatveev-backport-de456dad in my personal fork of openjdk/jfx21u. To create a pull request with this backport targeting openjdk/jfx21u:master, just click the following link:

➡️ Create pull request

The title of the pull request is automatically filled in correctly and below you find a suggestion for the pull request body:

Hi all,

This pull request contains a backport of commit de456dad from the openjdk/jfx repository.

The commit being backported was authored by Alexander Matveev on 19 Oct 2023 and was reviewed by Joeri Sykora and Ambarish Rapte.

Thanks!

If you need to update the source branch of the pull then run the following commands in a local clone of your personal fork of openjdk/jfx21u:

$ git fetch https://github.com/openjdk-bots/jfx21u.git sashamatveev-backport-de456dad:sashamatveev-backport-de456dad
$ git checkout sashamatveev-backport-de456dad
# make changes
$ git add paths/to/changed/files
$ git commit --message 'Describe additional changes made'
$ git push https://github.com/openjdk-bots/jfx21u.git sashamatveev-backport-de456dad

Please sign in to comment.