Skip to content

Commit

Permalink
8317508: Provide media support for libavcodec version 60
Browse files Browse the repository at this point in the history
Backport-of: de456da
  • Loading branch information
Alexander Matveev committed Oct 20, 2023
1 parent 8c2c9ca commit 5958b04
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 @@ -2942,6 +2942,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 @@ -3084,7 +3085,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 @@ -3288,8 +3289,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 @@ -3369,7 +3370,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

1 comment on commit 5958b04

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

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

Please sign in to comment.