gstreamer-java | UNMAINTAINED Unofficial Java bindings for GStreamer | Stream Processing library
kandi X-RAY | gstreamer-java Summary
kandi X-RAY | gstreamer-java Summary
UNMAINTAINED Unofficial Java bindings for GStreamer 0.10 (not 1.x)
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Initializes the instance
- Initializes the GStreamer library
- Copies a file to an output file
- Copy fonts
- Main command - line entry point
- Connects a GObject to a callback
- Set the value of a GObject property
- Test the video balance
- Builds a list from a GList
- Destroy the render component
- Entry point for the GStreamer
- Main entry point
- Returns a list of StaticPadTemplates associated with this ElementFactory
- Entry point for the audio stream
- Launches a pipeline
- Main method
- Main entry point for testing
- Entry point to the audio file
- Scales the output component by the aspect ratio
- Entry point for the video file
- Initialize app sink
- The main entry point
- Starts a SwingPlayer
- Entry point for the video player
- Create a new sink
- Returns a list of all stream - specific metadata
gstreamer-java Key Features
gstreamer-java Examples and Code Snippets
Community Discussions
Trending Discussions on gstreamer-java
QUESTION
Before we start allow me to just say that I know that it is possible to integrate Gstreamer into Android natively using C code as done in the Android Tutorials themselves.
This question is not related to simply just getting Gstreamer running on Android but rather running it on Android using the pre-existing native Java wrapper library gst1-java-core alongside JNA inside of Android Studio in a new Native project. However, if Native C code is the only way do let me know if you have tried and failed what I'm trying to do.
Lets begin.
System Information:
- OS: Linux Ubuntu 18.04
- Android Studio Version: 4.1.2
- Java version: 8
- SDK version: 30 (targetting API 21)
- NDK version: 21 (also tried 23)
- Testing Device: Samsung Galaxy Tab S6 Lite (even though haven't gotten there yet)
Process involved setting up a brand new project in Android Studio and choosing Native C++ as the Project Template followed by keeping everything else default including the toolchain. Once the project was built and finished it's Gradle business I did the usual git init and set it up in Git. Following that I downloaded and added the gst1-java-core-1.4.0.jar from the releases page to the "libs/" directly inside the "app/" folder.
Once I had done so I modified the build.gradle file in the app directory to match this Gradle Gist.
This was then naturally followed by a Gradle sync and when that had completed correctly I went to my MainActivity.java and added two lines of code total. First at the top:
...ANSWER
Answered 2021-Mar-12 at 00:33So it was my mistake not knowing enough about Android and the sub systems to know that even though Android is primarily developed in Java it does not support running Java "natively". This means that JNI is not relevant as according to Wikipedia JNI is:
In software design, the Java Native Interface is a foreign function interface programming framework that enables Java code running in a Java virtual machine to call and be called by native applications and libraries written in other languages such as C, C++ and assembly
So in saying that - because Android does not run a JVM but rather it runs Native C on a Linux Kernel this means that trying to integrate a "java wrapper" through the JNI is not currently possible on Android.
Because of this - the common solution and following Gstreamers official tutorials appears to currently be the only way to use Gstreamer in Android.
I only have myself to blame for thinking that everyone else had just "missed" JNI and gst1-java-core and that I somehow knew better than even the Gstreamer official website itself.
I felt like answering this question though because if anyone else goes down the wrong track I can now officially suggest to following the official tutorials and create an Android App with Native support so that you can compile and integrate the C code directly from Gstreamer and then make your app work like that.
I can currently say that following the above paragraph's advice resulted in me creating a working Android application with a Gstreamer live stream currently up and running using a custom pipeline. I'm not going to say it was easy; because it isn't; especially if you are not great at C programming. But it is definitely doable and the tutorials are good.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install gstreamer-java
You can use gstreamer-java like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the gstreamer-java component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page