Replies: 4 comments
-
Can you replicate with the BasicPipeline example at https://github.com/gstreamer-java/gst1-java-examples/tree/master/BasicPipeline ? What's the relation with Unfortunately we don't have CI testing on 1.22 at the moment. It could be that updates are required in the bindings. If this is for a commercial project, please contact me as covered in the readme. |
Beta Was this translation helpful? Give feedback.
-
Hi Neil, `package com.cisco.jtapi.collabEdgeIvr; import java.time.format.DateTimeFormatter; import org.freedesktop.gstreamer.Gst; import java.util.List; public class test {
} |
Beta Was this translation helpful? Give feedback.
-
Thanks for posting the code. There are multiple issues here which would need resolving in order to confirm if there's a bug or not, so I've converted this into a discussion post.
This is a problem - by the time the invoke later code is executed you've probably changed the pipeline reference, so you'll be disposing the pipeline you've just launched. You could possibly rewrite this to use
Where has that code come from? This is never required! You should only
A no-op - will do nothing because you're not setting one in the first place.
Generally not designed for the purpose you're using them here. Set up the logic to change file / pipeline, and just use a single I'm not sure why you're using multiple pipelines here? Is this for testing purposes only? Because you could use a single pipeline, or even a PlayBin with custom audio sink, and change the source file location and restart after each EOS. |
Beta Was this translation helpful? Give feedback.
-
This should be close to what you're trying to do - private static List<String> files = List.of(
greetingsPath, closedPath
);
private static int index = 0;
private static PlayBin playbin;
private static String sinkDesc = "mulawenc ! rtppcmupay max-ptime=30000000 ! udpsink host=127.0.0.1 port=16895";
public static void main(String[] args) {
Gst.init();
playbin = new PlayBin("playbin");
playbin.getBus().connect((Bus.EOS) (e -> playNext()));
Bin sink = Gst.parseBinFromDescription(sinkDesc, true);
playbin.setAudioSink(sink);
playNext();
Gst.main();
}
private static void playNext() {
playbin.stop();
index = (index + 1) % files.size();
playbin.setInputFile(new File(files.get(index)));
playbin.play();
} |
Beta Was this translation helpful? Give feedback.
-
Hi,
I've been running lately into this issue (on version 1.22.2 and latest version 1.22.3).
The full exception output:
Exception in thread "main" java.lang.Error: Invalid memory access
at com.sun.jna.Native.invokePointer(Native Method)
at com.sun.jna.Function.invokePointer(Function.java:497)
at com.sun.jna.Function.invoke(Function.java:441)
at com.sun.jna.Function.invoke(Function.java:361)
at com.sun.jna.Library$Handler.invoke(Library.java:270)
at jdk.proxy1/jdk.proxy1.$Proxy3.gst_parse_launch(Unknown Source)
at org.freedesktop.gstreamer.Gst.parseLaunch(Gst.java:225)
at org.freedesktop.gstreamer.Gst.parseLaunch(Gst.java:256)
at com.cisco.jtapi.collabEdgeIvr.collabEdgeIvr.main(collabEdgeIvr.java:253)
Line 253: pipeline = (Pipeline) Gst.parseLaunch(pipeGreetingsDesc);
Looks like something is happening to the Gst object pointer which turns out to be a null for some reason.
Beta Was this translation helpful? Give feedback.
All reactions