Skip to content

Commit 11228f9

Browse files
Update build configuration, tests and workflows.
1 parent eefdbd9 commit 11228f9

File tree

9 files changed

+37
-50
lines changed

9 files changed

+37
-50
lines changed

.github/workflows/maven.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,18 @@ on:
44
[push, pull_request]
55

66
jobs:
7-
test-1-16:
7+
test-1-24-jdk25:
88

9-
runs-on: ubuntu-20.04
9+
runs-on: ubuntu-24.04
1010

1111
steps:
1212
- name: Checkout
13-
uses: actions/checkout@v3
13+
uses: actions/checkout@v5
1414

15-
- name: Set up JDK 1.8
16-
uses: actions/setup-java@v3
15+
- name: Set up JDK 25
16+
uses: actions/setup-java@v5
1717
with:
18-
java-version: '8'
18+
java-version: '25'
1919
distribution: 'temurin'
2020

2121
- name: Install GStreamer
@@ -24,16 +24,16 @@ jobs:
2424
- name: Build with Maven
2525
run: mvn -B verify --file pom.xml
2626

27-
test-1-20:
27+
test-1-20-jdk8:
2828

2929
runs-on: ubuntu-22.04
3030

3131
steps:
3232
- name: Checkout
33-
uses: actions/checkout@v3
33+
uses: actions/checkout@v5
3434

35-
- name: Set up JDK 1.8
36-
uses: actions/setup-java@v3
35+
- name: Set up JDK 8
36+
uses: actions/setup-java@v5
3737
with:
3838
java-version: '8'
3939
distribution: 'temurin'

pom.xml

Lines changed: 11 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,7 @@
6666
<properties>
6767
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
6868
<maven.test.jvmargs></maven.test.jvmargs>
69-
<maven.compiler.source>1.8</maven.compiler.source>
70-
<maven.compiler.target>1.8</maven.compiler.target>
69+
<maven.compiler.release>8</maven.compiler.release>
7170
</properties>
7271

7372
<dependencies>
@@ -80,7 +79,7 @@
8079
<dependency>
8180
<groupId>net.java.dev.jna</groupId>
8281
<artifactId>jna</artifactId>
83-
<version>[5.2.0,6.0)</version>
82+
<version>5.18.1</version>
8483
</dependency>
8584
</dependencies>
8685

@@ -107,35 +106,23 @@
107106
<plugin>
108107
<groupId>org.apache.maven.plugins</groupId>
109108
<artifactId>maven-surefire-plugin</artifactId>
110-
<version>3.0.0-M7</version>
109+
<version>3.5.4</version>
111110
<configuration>
112-
<!--<skipTests>true</skipTests>-->
113111
<forkCount>1</forkCount>
112+
<parallel>none</parallel>
114113
<reuseForks>false</reuseForks>
115-
<argLine>-Djna.nosys=true ${maven.test.jvmargs}</argLine>
114+
<argLine>-XX:+IgnoreUnrecognizedVMOptions --enable-native-access=ALL-UNNAMED -Djna.nosys=true ${maven.test.jvmargs}</argLine>
116115
<excludes>
117116
<exclude>**/Test*.java</exclude>
118117
</excludes>
119118
</configuration>
120119
</plugin>
121120
<plugin>
122121
<groupId>org.apache.maven.plugins</groupId>
123-
<artifactId>maven-jar-plugin</artifactId>
124-
<version>3.1.2</version>
122+
<artifactId>maven-compiler-plugin</artifactId>
123+
<version>3.14.1</version>
125124
<configuration>
126-
<archive>
127-
<manifestEntries>
128-
<Automatic-Module-Name>org.freedesktop.gstreamer</Automatic-Module-Name>
129-
</manifestEntries>
130-
</archive>
131-
</configuration>
132-
</plugin>
133-
<plugin>
134-
<groupId>org.apache.maven.plugins</groupId>
135-
<artifactId>maven-javadoc-plugin</artifactId>
136-
<version>2.10.4</version>
137-
<configuration>
138-
<excludePackageNames>org.freedesktop.gstreamer.lowlevel</excludePackageNames>
125+
<release>8</release>
139126
</configuration>
140127
</plugin>
141128
</plugins>
@@ -173,7 +160,7 @@
173160
<plugin>
174161
<groupId>org.apache.maven.plugins</groupId>
175162
<artifactId>maven-source-plugin</artifactId>
176-
<version>2.2.1</version>
163+
<version>3.3.1</version>
177164
<executions>
178165
<execution>
179166
<id>attach-sources</id>
@@ -186,7 +173,7 @@
186173
<plugin>
187174
<groupId>org.apache.maven.plugins</groupId>
188175
<artifactId>maven-javadoc-plugin</artifactId>
189-
<version>2.10.4</version>
176+
<version>3.12.0</version>
190177
<configuration>
191178
<excludePackageNames>org.freedesktop.gstreamer.lowlevel</excludePackageNames>
192179
</configuration>
@@ -202,7 +189,7 @@
202189
<plugin>
203190
<groupId>org.apache.maven.plugins</groupId>
204191
<artifactId>maven-gpg-plugin</artifactId>
205-
<version>1.5</version>
192+
<version>3.2.8</version>
206193
<executions>
207194
<execution>
208195
<id>sign-artifacts</id>

src/org/freedesktop/gstreamer/Gst.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2020 Neil C Smith
2+
* Copyright (c) 2025 Neil C Smith
33
* Copyright (c) 2018 Antonio Morales
44
* Copyright (c) 2007 Wayne Meissner
55
*
@@ -358,7 +358,7 @@ private static GError extractError(Pointer errorPtr) {
358358
GErrorStruct struct = new GErrorStruct(errorPtr);
359359
struct.read();
360360
GError err = new GError(struct.getCode(), struct.getMessage());
361-
GLIB_API.g_error_free(struct);
361+
GLIB_API.g_error_free(errorPtr);
362362
return err;
363363
}
364364

src/org/freedesktop/gstreamer/glib/GSocket.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2021 Neil C Smith
2+
* Copyright (c) 2025 Neil C Smith
33
* Copyright (c) 2016 Isaac Raño Jares
44
*
55
* This file is part of gstreamer-java.
@@ -92,7 +92,7 @@ public boolean isBlocking() {
9292
private static String extractAndClearError(GErrorStruct struct) {
9393
struct.read();
9494
String err = struct.getMessage();
95-
GLIB_API.g_error_free(struct);
95+
GLIB_API.g_error_free(struct.getPointer());
9696
return err;
9797
}
9898

src/org/freedesktop/gstreamer/lowlevel/GlibAPI.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
/*
2+
* Copyright (c) 2025 Neil C Smith
23
* Copyright (c) 2009 Levente Farkas
34
* Copyright (c) 2007 Wayne Meissner
45
*
@@ -108,7 +109,6 @@ int g_timeout_add_full(int priority, int interval, GSourceFunc function,
108109
int g_timeout_add_seconds(int interval, GSourceFunc function, Pointer data);
109110
GstAPI.GErrorStruct g_error_new(int quark, int code, String message);
110111
void g_error_free(Pointer error);
111-
void g_error_free(GstAPI.GErrorStruct error);
112112

113113
void g_source_remove(int id);
114114
void g_free(Pointer ptr);

src/org/freedesktop/gstreamer/message/GErrorMessage.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (C) 2019 Neil C Smith
2+
* Copyright (C) 2025 Neil C Smith
33
* Copyright (C) 2008 Wayne Meissner
44
*
55
* This file is part of gstreamer-java.
@@ -50,7 +50,7 @@ public int getCode() {
5050
throw new NullPointerException("Could not parse message");
5151
}
5252
int code = err.code;
53-
GLIB_API.g_error_free(err);
53+
GLIB_API.g_error_free(err.getPointer());
5454
return code;
5555
}
5656

@@ -65,7 +65,7 @@ public String getMessage() {
6565
throw new NullPointerException("Could not parse message");
6666
}
6767
String message = err.getMessage();
68-
GLIB_API.g_error_free(err);
68+
GLIB_API.g_error_free(err.getPointer());
6969
return message;
7070
}
7171

test/org/freedesktop/gstreamer/BusTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2020 Neil C Smith
2+
* Copyright (c) 2025 Neil C Smith
33
* Copyright (c) 2007 Wayne Meissner
44
*
55
* This file is part of gstreamer-java.
@@ -145,7 +145,7 @@ public void errorMessage() {
145145
pipe.dispose();
146146
assertTrue("ERROR signal not received", signalFired.get());
147147
assertEquals("Incorrect source object on signal", pipe.src, signalSource.get());
148-
GlibAPI.GLIB_API.g_error_free(msg);
148+
GlibAPI.GLIB_API.g_error_free(msg.getPointer());
149149
}
150150

151151
@Test
@@ -171,7 +171,7 @@ public void warningMessage() {
171171
pipe.dispose();
172172
assertTrue("WARNING signal not received", signalFired.get());
173173
assertEquals("Incorrect source object on signal", pipe.src, signalSource.get());
174-
GlibAPI.GLIB_API.g_error_free(msg);
174+
GlibAPI.GLIB_API.g_error_free(msg.getPointer());
175175
}
176176

177177
@Test
@@ -197,7 +197,7 @@ public void infoMessage() {
197197
pipe.dispose();
198198
assertTrue("INFO signal not received", signalFired.get());
199199
assertEquals("Incorrect source object on signal", pipe.src, signalSource.get());
200-
GlibAPI.GLIB_API.g_error_free(msg);
200+
GlibAPI.GLIB_API.g_error_free(msg.getPointer());
201201
}
202202

203203
@Test

test/org/freedesktop/gstreamer/InitTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2019 Neil C Smith
2+
* Copyright (c) 2025 Neil C Smith
33
* Copyright (c) 2007 Wayne Meissner
44
*
55
* This file is part of gstreamer-java.
@@ -47,7 +47,7 @@ public void testInit() {
4747
System.out.println("Expected init failure");
4848
System.out.println(ex);
4949
}
50-
String[] args = Gst.init(available, "InitTest", "--gst-plugin-spew");
50+
String[] args = Gst.init(available, "InitTest", "--gst-debug-no-color");
5151
assertTrue(args.length == 0);
5252

5353
assertTrue(Gst.testVersion(available.getMajor(), available.getMinor()));

test/org/freedesktop/gstreamer/video/VideoTimeCodeMetaTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2020 Neil C Smith
2+
* Copyright (c) 2025 Neil C Smith
33
* Copyright (c) 2020 Petr Lastovka
44
*
55
* This file is part of gstreamer-java.
@@ -82,7 +82,7 @@ public void testVideoTimeCodeMetaPal() {
8282
assertEquals(1, timeCodeConfig.getDenominator());
8383
assertTrue(timeCodeConfig.getFlags().isEmpty());
8484

85-
}, "videotestsrc do-timestamp=true ! video/x-raw,framerate=25/1 ! timecodestamper ! videoconvert ! appsink name=myappsink");
85+
}, "videotestsrc ! video/x-raw,framerate=25/1 ! timecodestamper ! videoconvert ! appsink name=myappsink");
8686
}
8787

8888
@Test

0 commit comments

Comments
 (0)