Skip to content

Commit ead9d72

Browse files
committed
* Upgrade dependencies for FFmpeg 5.0
1 parent 4269832 commit ead9d72

File tree

6 files changed

+95
-83
lines changed

6 files changed

+95
-83
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
* Add `charset` property to `FrameGrabber` and `FrameRecorder` to use for metadata from FFmpeg ([pull #1720](https://github.com/bytedeco/javacv/pull/1720))
66
* Call `Frame.close()` on temporary clones in `Java2DFrameUtils` to prevent premature deallocations ([issue #1716](https://github.com/bytedeco/javacv/issues/1716))
77
* 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))
8-
* 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
8+
* 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
99

1010
### August 2, 2021 version 1.5.6
1111
* Enhance audio and video synchronization of `JavaFxPlayVideoAndAudio` sample ([pull #1662](https://github.com/bytedeco/javacv/pull/1662))

platform/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
<dependency>
3939
<groupId>org.bytedeco</groupId>
4040
<artifactId>ffmpeg-platform</artifactId>
41-
<version>4.4.1-${javacpp.version}</version>
41+
<version>5.0-${javacpp.version}</version>
4242
</dependency>
4343
<dependency>
4444
<groupId>org.bytedeco</groupId>

pom.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@
8080
<dependency>
8181
<groupId>org.bytedeco</groupId>
8282
<artifactId>ffmpeg</artifactId>
83-
<version>4.4.1-${javacpp.version}</version>
83+
<version>5.0-${javacpp.version}</version>
8484
</dependency>
8585
<dependency>
8686
<groupId>org.bytedeco</groupId>
@@ -195,6 +195,7 @@
195195
<source>1.7</source>
196196
<target>1.7</target>
197197
<excludes>
198+
<exclude>org/bytedeco/javacv/FFmpegLockCallback.java</exclude>
198199
<exclude>org/bytedeco/javacv/FlyCaptureFrameGrabber.java</exclude>
199200
</excludes>
200201
</configuration>

src/main/java/org/bytedeco/javacv/FFmpegFrameFilter.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2015-2020 Samuel Audet
2+
* Copyright (C) 2015-2022 Samuel Audet
33
*
44
* Licensed either under the Apache License, Version 2.0, or (at your option)
55
* under the terms of the GNU General Public License as published by
@@ -104,8 +104,8 @@ public static void tryLoad() throws Exception {
104104
Loader.load(org.bytedeco.ffmpeg.global.swscale.class);
105105
Loader.load(org.bytedeco.ffmpeg.global.avfilter.class);
106106

107-
av_register_all();
108-
avfilter_register_all();
107+
// av_register_all();
108+
// avfilter_register_all();
109109
} catch (Throwable t) {
110110
if (t instanceof Exception) {
111111
throw loadingException = (Exception)t;

src/main/java/org/bytedeco/javacv/FFmpegFrameGrabber.java

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2009-2021 Samuel Audet
2+
* Copyright (C) 2009-2022 Samuel Audet
33
*
44
* Licensed either under the Apache License, Version 2.0, or (at your option)
55
* under the terms of the GNU General Public License as published by
@@ -115,8 +115,8 @@ public static void tryLoad() throws Exception {
115115

116116
// Register all formats and codecs
117117
av_jni_set_java_vm(Loader.getJavaVM(), null);
118-
avcodec_register_all();
119-
av_register_all();
118+
// avcodec_register_all();
119+
// av_register_all();
120120
avformat_network_init();
121121

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

134-
static {
135-
try {
136-
tryLoad();
137-
FFmpegLockCallback.init();
138-
} catch (Exception ex) { }
139-
}
134+
// static {
135+
// try {
136+
// tryLoad();
137+
// FFmpegLockCallback.init();
138+
// } catch (Exception ex) { }
139+
// }
140140

141141
public FFmpegFrameGrabber(File file) {
142142
this(file.getAbsolutePath());
@@ -296,7 +296,7 @@ static class ReadCallback extends Read_packet_Pointer_BytePointer_int {
296296
InputStream is = inputStreams.get(opaque);
297297
int size = is.read(b, 0, buf_size);
298298
if (size < 0) {
299-
return 0;
299+
return AVERROR_EOF();
300300
} else {
301301
buf.put(b, 0, size);
302302
return size;

0 commit comments

Comments
 (0)