Skip to content

Commit

Permalink
* Upgrade dependencies for FFmpeg 5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
saudet committed Jan 19, 2022
1 parent 4269832 commit ead9d72
Show file tree
Hide file tree
Showing 6 changed files with 95 additions and 83 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* Add `charset` property to `FrameGrabber` and `FrameRecorder` to use for metadata from FFmpeg ([pull #1720](https://github.com/bytedeco/javacv/pull/1720))
* Call `Frame.close()` on temporary clones in `Java2DFrameUtils` to prevent premature deallocations ([issue #1716](https://github.com/bytedeco/javacv/issues/1716))
* Ignore errors from `avcodec_send_packet()` and `avcodec_receive_frame()` to emulate old API in `FFmpegFrameGrabber` ([issue #1679](https://github.com/bytedeco/javacv/issues/1679))
* Upgrade dependencies for OpenBLAS 0.3.19, OpenCV 4.5.5, FFmpeg 4.4.1, librealsense2 2.50.0, Leptonica 1.82.0, Tesseract 5.0.1
* Upgrade dependencies for OpenBLAS 0.3.19, OpenCV 4.5.5, FFmpeg 5.0, librealsense2 2.50.0, Leptonica 1.82.0, Tesseract 5.0.1

### August 2, 2021 version 1.5.6
* Enhance audio and video synchronization of `JavaFxPlayVideoAndAudio` sample ([pull #1662](https://github.com/bytedeco/javacv/pull/1662))
Expand Down
2 changes: 1 addition & 1 deletion platform/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
<dependency>
<groupId>org.bytedeco</groupId>
<artifactId>ffmpeg-platform</artifactId>
<version>4.4.1-${javacpp.version}</version>
<version>5.0-${javacpp.version}</version>
</dependency>
<dependency>
<groupId>org.bytedeco</groupId>
Expand Down
3 changes: 2 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
<dependency>
<groupId>org.bytedeco</groupId>
<artifactId>ffmpeg</artifactId>
<version>4.4.1-${javacpp.version}</version>
<version>5.0-${javacpp.version}</version>
</dependency>
<dependency>
<groupId>org.bytedeco</groupId>
Expand Down Expand Up @@ -195,6 +195,7 @@
<source>1.7</source>
<target>1.7</target>
<excludes>
<exclude>org/bytedeco/javacv/FFmpegLockCallback.java</exclude>
<exclude>org/bytedeco/javacv/FlyCaptureFrameGrabber.java</exclude>
</excludes>
</configuration>
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/org/bytedeco/javacv/FFmpegFrameFilter.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2015-2020 Samuel Audet
* Copyright (C) 2015-2022 Samuel Audet
*
* Licensed either under the Apache License, Version 2.0, or (at your option)
* under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -104,8 +104,8 @@ public static void tryLoad() throws Exception {
Loader.load(org.bytedeco.ffmpeg.global.swscale.class);
Loader.load(org.bytedeco.ffmpeg.global.avfilter.class);

av_register_all();
avfilter_register_all();
// av_register_all();
// avfilter_register_all();
} catch (Throwable t) {
if (t instanceof Exception) {
throw loadingException = (Exception)t;
Expand Down
20 changes: 10 additions & 10 deletions src/main/java/org/bytedeco/javacv/FFmpegFrameGrabber.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (C) 2009-2021 Samuel Audet
* Copyright (C) 2009-2022 Samuel Audet
*
* Licensed either under the Apache License, Version 2.0, or (at your option)
* under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -115,8 +115,8 @@ public static void tryLoad() throws Exception {

// Register all formats and codecs
av_jni_set_java_vm(Loader.getJavaVM(), null);
avcodec_register_all();
av_register_all();
// avcodec_register_all();
// av_register_all();
avformat_network_init();

Loader.load(org.bytedeco.ffmpeg.global.avdevice.class);
Expand All @@ -131,12 +131,12 @@ public static void tryLoad() throws Exception {
}
}

static {
try {
tryLoad();
FFmpegLockCallback.init();
} catch (Exception ex) { }
}
// static {
// try {
// tryLoad();
// FFmpegLockCallback.init();
// } catch (Exception ex) { }
// }

public FFmpegFrameGrabber(File file) {
this(file.getAbsolutePath());
Expand Down Expand Up @@ -296,7 +296,7 @@ static class ReadCallback extends Read_packet_Pointer_BytePointer_int {
InputStream is = inputStreams.get(opaque);
int size = is.read(b, 0, buf_size);
if (size < 0) {
return 0;
return AVERROR_EOF();
} else {
buf.put(b, 0, size);
return size;
Expand Down
Loading

0 comments on commit ead9d72

Please sign in to comment.