Giter VIP home page Giter VIP logo

gst1-java-core's Introduction

gstreamer-java (0.10 compatible)

An unofficial/alternative set of java bindings for the gstreamer multimedia framework.

Please use the gstreamer-java google group to discuss using gstreamer-java or to ask any questions.

Although gstreamer is commonly associated with the gnome desktop, gstreamer itself, and these bindings are portable across operating systems.

You need a recent JNA version in order to be able to use gstreamer-java.

The current release is known to run on MacOSX, Linux, Windows and - for the experimental developer with the latest code - on Android. Before using gstreamer-java - and especially before opening issues against gstreamer-java - try to run your pipelines using the Gstreamer gst-launch command-line utility directly.

Important: Current version of the gstreamer-java is NOT compatible with GStreamer 1.0 or above. This means the last usable version are GStreamer 0.10.

Please note: this is not an easy-to-use multimedia framework for beginners. It currently requires people to both know the java language, and be familiar with the gstreamer framework (or be prepared to apply things from tutorials on gstreamer programming in other languages (e.g. python or C#) to the java bindings).

gst1-java-core's People

Contributors

armouroflight avatar chatanga avatar codeanticode avatar dmitrypalvov avatar frejcam avatar hamoid avatar i-n-g-o avatar jcortellatmagicleap avatar kezhuw avatar lafoletc avatar matthiasblaesing avatar mazdermind avatar mutantbob avatar neilcsmith-net avatar pertsevroman avatar sarxos avatar smarquard avatar sviperll avatar woglinde avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gst1-java-core's Issues

Could not load library: gstinterfaces when using PropertyProbe

Hello,

I wanted to test if PropertyProbe works well with v4l2src factory in 1.0. When I was working with 0.10 it was giving me error "element does not implement interface". In 1.0, however, gstreamer-java is trying to load library which is missing:

Exception in thread "main" java.lang.UnsatisfiedLinkError: Could not load library: gstinterfaces
	at org.freedesktop.gstreamer.lowlevel.GstNative.load(GstNative.java:56)
	at org.freedesktop.gstreamer.lowlevel.GstPropertyProbeAPI.<clinit>(GstPropertyProbeAPI.java:30)
	at org.freedesktop.gstreamer.interfaces.PropertyProbe.<init>(PropertyProbe.java:55)
	at org.freedesktop.gstreamer.interfaces.PropertyProbe.wrap(PropertyProbe.java:46)
	at com.github.sarxos.webcam.ds.gst1.ListUvcDevices.main(ListUvcDevices.java:25)

Here is my code:

import org.freedesktop.gstreamer.Element;
import org.freedesktop.gstreamer.ElementFactory;
import org.freedesktop.gstreamer.Gst;
import org.freedesktop.gstreamer.interfaces.PropertyProbe;


public class ListUvcDevices {

	static {
		String[] args = new String[] {};
		Gst.init(ListUvcDevices.class.getSimpleName(), args);
		Runtime.getRuntime().addShutdownHook(new Thread(new Runnable() {

			@Override
			public void run() {
				Gst.deinit();
			}
		}));
	}

	public static void main(String[] args) throws InterruptedException {
		Element source = ElementFactory.make("v4l2src", "source");
		PropertyProbe probe = PropertyProbe.wrap(source);
		for (Object name : probe.getValues("device")) {
			System.out.println(name.toString());
		}
	}
}

I tried to find this library in my filesystem and found only these for 0.10 from libgstreamer-plugins-base package.

sarxos@sarxos-comp:~/workspace/gst1-java-core$ dpkg -S /usr/lib/x86_64-linux-gnu/libgstinterfaces-0.10.so.0
libgstreamer-plugins-base0.10-0:amd64: /usr/lib/x86_64-linux-gnu/libgstinterfaces-0.10.so.0

In GStreamer 1.0 this library seems to be removed or it has been renamed to a different name.

My system is Ubuntu 14.04, gstreamer-java is the HEAD of master branch, JNA 4.2.2, JDK 1.8.0_51.

Gst.init() Gst.deinit() issue

Hi,

I use the gstreamer java library and I have an issue for which I cannot find any solution at this time.
The idea is that I want to start from the main class a new thread running a class that contains gstreamer code. This class contains the Gst.init() statement, and in the end, if I call Gst.deinit(), new threads will not run properly afterwards. Gst.deinit() doesn't seem to completely cancel the previous initialization. Otherwise, if I don't call Gst.deinit(), I can start new threads and these will run, but the memory will not be released at the end of the execution, so after starting multiple threads, the memory will be full.
I still have an idea:
I have noticed that all functions in the Gst class are static functions. I suspect this is a problem, so I would try to turn them into non-static. Would I solve something if I do that?
What other solution do you recommend?

Thank you!

Pipleline "p.getElements();" gives error

public class MultipleSinks {

/* receives messages from pipeline elements */
public static Bus bus = null;

/* send an EOS to this element to shutdown pipeline */
public static Element src = null;

public static void main(String[] args) {

    /* initialize gstreamer library */
    args = Gst.init("MultiSinkPipe", args);

    /* create pipeline */
    final Pipeline pipe = new Pipeline("MultiSinkPipe");

    /* create all pipeline elements */
    src = ElementFactory.make("filesrc", "filesrc0");
    Element tee = ElementFactory.make("tee", "tee0");
    Element h264q = ElementFactory.make("queue", "queue0");
    Element decodebin = ElementFactory.make("decodebin", "decodebin0");
    final Element enc = ElementFactory.make("x264enc", "x264enc0");
    Element mux = ElementFactory.make("avmux_mp4", "avmux_mp40");
    final Element sink = ElementFactory.make("filesink", "filesink0");
    Element mpegq = ElementFactory.make("queue", "queue1");
    final Element mpegsink = ElementFactory.make("filesink", "filesink1");

    /* set all necessary pipeline attributes */
    src.set("location", "D:\\backupx\\Twinkle Twinkle Little Star.mp4");
    tee.set("silent", "false");
    enc.set("bitrate", 4096);
    sink.set("location", "D:\\movies\\new\\output.mp4");
    mpegsink.set("location", "D:\\movies\\new\\output.mpg");

    /* store all elements in the pipeline bin */
    pipe.addMany(src, tee, h264q, decodebin, enc, mux, sink, 
                mpegq, mpegsink);

    /* linking each element separately and check for errors */
    if(!src.link(tee)) {
        System.out.println("src-tee");
        return;
    }
    if (!tee.link(h264q)) {
        System.out.println("tee-h264q");
        return;
    }
    if (!h264q.link(decodebin)) {
        System.out.println("h264q-bin");
        return;
    }
    /* need to connect a signal for dynamic pads */
    decodebin.connect(new Element.PAD_ADDED() {
        public void padAdded(Element e, final Pad p) {
            p.link(enc.getStaticPad("sink"));
        }
    });
    Pad np = new Pad(null, PadDirection.SRC);
    decodebin.addPad(np);
    if (!enc.link(mux)) {
        System.out.println("Enc-Mux");
        return;
    }
    if (!mux.link(sink)) {
        System.out.println("Mux-Sink");
        return;
    }
    if (!tee.link(mpegq)) {
        System.out.println("tee-mpegq");
        return;
    }
    if (!mpegq.link(mpegsink)) {
        System.out.println("mpegq-mpegsink");
    }

    /* listen for EOS signal (to shut pipeline down smoothly) and error
     * messages. */
    bus = pipe.getBus();
    bus.connect(new Bus.EOS() {
        public void endOfStream(GstObject source) {
            System.out.println("EOS");
            pipe.setState(State.NULL);
            Gst.quit();
        }
    });
    bus.connect(new Bus.ERROR() {
        public void errorMessage(GstObject arg0, int arg1, String arg2) {
            System.out.println("Error: " + arg2 + " " + arg0);
            Gst.quit();
        }
    });

    /* display some detailed information about the pipeline */
    //printPipeline(pipe);

    /* start up pipeline. use timer thread for now */
    pipe.setState(State.PLAYING);
    System.out.println("Starting pipeline...");
    while (pipe.getState() != State.PLAYING);
    System.out.println("Pipeline started.");
    new Thread(new TimerThread()).start();

    Gst.main();
    Gst.deinit();
}

/* Iterate through all the elements in the pipeline and display their
 * caps. Useful for debugging and general information about the pipeline */
public static void printPipeline(Pipeline p) {

    List<Element> elements = p.getElements();

    if (elements.size() > 0) {
        Iterator<Element> elemiter = elements.iterator();
        Element e = null;
        while (elemiter.hasNext()) {
            e = (Element) elemiter.next();

            List<Pad> pads = e.getPads();

            if (pads.size() > 0) {
                Iterator<Pad> paditer = pads.iterator();
                Pad pad = null;
                while (paditer.hasNext()) {
                    pad = (Pad) paditer.next();
                    System.out.print(e + " " + pad.getDirection()); 
                    System.out.println("\t" + pad.getCaps());
                }
            }
        }
    }
}

}

/* Used to time pipeline. A more appropriate method will be implemented later.

  • This is simply a quick solution to show the pipelines work */
    class TimerThread implements Runnable {

    /* two minute timer */
    long sleepTime = 2 * 60 * 1000;
    public void run() {
    try {
    Thread.sleep(sleepTime);
    } catch (Exception e) {
    System.out.println("Thread error.");
    }
    System.out.println("Sending EOS...");
    MultipleSinks.src.sendEvent(new EOSEvent());
    }
    }

printPipeline method gives the below error

Exception in thread "main" java.lang.Error: Invalid memory access
at com.sun.jna.Native.getInt(Native Method)
at com.sun.jna.Pointer.getInt(Pointer.java:601)
at com.sun.jna.Pointer.getNativeLong(Pointer.java:625)
at org.freedesktop.gstreamer.lowlevel.GstTypes.classFor(GstTypes.java:87)
at org.freedesktop.gstreamer.lowlevel.NativeObject.classFor(NativeObject.java:211)
at org.freedesktop.gstreamer.lowlevel.NativeObject.objectFor(NativeObject.java:188)
at org.freedesktop.gstreamer.GstIterator$IteratorImpl.getNext(GstIterator.java:69)
at org.freedesktop.gstreamer.GstIterator$IteratorImpl.(GstIterator.java:64)
at org.freedesktop.gstreamer.GstIterator.iterator(GstIterator.java:47)
at org.freedesktop.gstreamer.GstIterator.asList(GstIterator.java:55)
at org.freedesktop.gstreamer.Bin.elementList(Bin.java:166)
at org.freedesktop.gstreamer.Bin.getElements(Bin.java:174)
at com.MultipleSinks.printPipeline(MultipleSinks.java:138)
at com.MultipleSinks.main(MultipleSinks.java:121)

Windows: Failed to load plugin 'C:\gstreamer\1.0\x86_64\ .....

Hi,

Im trying to test gstreamer on windows using the example on:
gst1-java-examples/src/main/java/org/freedesktop/gstreamer/examples/CameraTest.java

it fails throwing:
(java.exe:7628): GStreamer-WARNING **: Failed to load plugin 'C:\gstreamer\1.0\x86_64\lib\gstreamer-1.0\libgsty4menc.dll': 'C:\gstreamer\1.0\x86_64\lib\gstreamer-1.0\libgsty4menc.dll': The specified module could not be found.
.
.
. (All plugins are the same)

I'm setting the path: -Djna.library.path=C:\gstreamer\1.0\x86_64\bin
gstreamer 1.8.2 (64bit)
java 8 (64bit)
Windows 10 64bit

Any support is appreciated.

Clarification of requirments

It should be more clear which GStreamer installer is required for the gst1-java-core to work, I suggest adding it to the requirement section in the README.md.
The reason I said that is that the developer will see all those files when trying to download the framework for windows:
  | gstreamer-1.0-devel-x86-1.12.4.msi | 2017-12-10 02:30 | 124M |  
  | gstreamer-1.0-devel-x86-1.12.4.msi.asc | 2017-12-10 06:11 | 801 |  
  | gstreamer-1.0-devel-x86-1.12.4.msi.sha256sum | 2017-12-10 06:13 | 101 |  
  | gstreamer-1.0-devel-x86_64-1.12.4.msi | 2017-12-10 02:30 | 132M |  
  | gstreamer-1.0-devel-x86_64-1.12.4.msi.asc | 2017-12-10 06:11 | 801 |  
  | gstreamer-1.0-devel-x86_64-1.12.4.msi.sha256sum | 2017-12-10 06:13 | 104 |  
  | gstreamer-1.0-x86-1.12.4-merge-modules.zip | 2017-12-10 02:30 | 114M |  
  | gstreamer-1.0-x86-1.12.4-merge-modules.zip.asc | 2017-12-10 06:11 | 801 |  
  | gstreamer-1.0-x86-1.12.4-merge-modules.zip.sha256sum | 2017-12-10 06:13 | 109 |  
  | gstreamer-1.0-x86-1.12.4.msi | 2017-12-10 02:30 | 115M |  
  | gstreamer-1.0-x86-1.12.4.msi.asc | 2017-12-10 06:11 | 801 |  
  | gstreamer-1.0-x86-1.12.4.msi.sha256sum | 2017-12-10 06:13 | 95 |  
  | gstreamer-1.0-x86_64-1.12.4-merge-modules.zip | 2017-12-10 02:30 | 122M |  
  | gstreamer-1.0-x86_64-1.12.4-merge-modules.zip.asc | 2017-12-10 06:11 | 801 |  
  | gstreamer-1.0-x86_64-1.12.4-merge-modules.zip.sha256sum | 2017-12-10 06:13 | 112 |  
  | gstreamer-1.0-x86_64-1.12.4.msi | 2017-12-10 02:30 | 123M |  
  | gstreamer-1.0-x86_64-1.12.4.msi.asc | 2017-12-10 06:12 | 801 |  
  | gstreamer-1.0-x86_64-1.12.4.msi.sha256sum | 2017-12-10 06:13 | 98 |  

and only one of this files will work for his JVM+JNA configuration.

UnsatisfiedLinkError on Windows

@lafoletc Since (I think) updates in the pull request for MiniObject fixes #25 I am getting an UnsatisfiedLlinkError for g_type_name on Windows. Not sure whether the native function is mapped incorrectly, or whether there's a problem linking to GObject?! Any thoughts on this?

Automatic testing infrastructure

Integrating pull requests is currently time consuming and buggy. One thing needed to make this easier is automatically running tests against baseline (1.8) and latest GStreamer versions on all pull requests. (Travis? Jenkins?)

Auto-generate bindings from gir files

Longer term we have been recommended by GStreamer developers to (re)look at auto-generation of bindings, but based on our existing GLib / GObject support. The initial stage of this will be to look at auto-generating the lowlevel package in a fully compatible way so that the API outside of that package remains stable. Auto-generating the API level packages could happen later.

This is similar to how the Rust bindings are structured and built, which will be one project used as a guide in this process. These are similarly split in a lowlevel (https://github.com/sdroege/gstreamer-sys) and high-level (https://github.com/sdroege/gstreamer-rs) way.

Plans for higher level abstractions

Are there any plans to support the higher level abstractions like SWTOverlay or PipelineMediaPlayer in one or multiple packages?

I need both and got the SWT stuff workinkg last week by copying over the needed pices to core and some tweaking.

Crashes when stop pipeline

My java application sometimes crashes when I stop the pipeline.
The application uses following pipe to play a rtsp stream;
"gst-launch-1.0 rtspsrc location=rtsp://... latency=200 protocols=2 ! rtph264depay ! vaapiparse_h264 ! vaapidecode ! vaapisink".

According to the log file hs_err_pid19332.txt, it seems it is related with gstreamer itself but I cannot be sure.

This is my configuration;
Linux localhost.localdomain 3.10.0-327.4.4.el7.x86_64
CentOS Linux release 7.2.1511 (Core)

gstreamer1-1.4.5-1.el7.x86_64
gstreamer1-plugins-base-1.4.5-2.el7.x86_64
gstreamer1-plugins-good-1.4.5-2.el7.x86_64
gstreamer1-plugins-bad-free-1.4.5-3.el7.x86_64
gstreamer1-plugins-bad-freeworld-1.0.6-1.el7.nux.x86_64
gstreamer1-vaapi-0.6.1-1.el7.x86_64

gst1-java-core-0.9-SNAPSHOT

If you need, i can also post the java code itself for reproducing the problem.

busMessage() silently catches exceptions

I spent the last half hour tracking down why my code wasn't executed to find out the the busMessage() callback silently caught my NullPointerException. Other callbacks are probably affected too.

Could not load library: gstreamer

Hello, excuse me, could you tell me how to deal with the mistake of "java.lang.UnsatisfiedLinkError: Could not load library: GStreamer"?

Remove cyclic dependencies from lowlevel (don't use high level types)

The current type mappers are problematic. Having lowlevel mappings using the highlevel types is inefficient. Having typed handlers / pointers in lowlevel would be more efficient, and also allow a future separation of lowlevel into a separate (auto-generated) library.

This can wait until post-1.0 if it can be proven we can do this without breaking API.

How to enable (manually compile) hardware video decoder on TX2?

Hi, I successfully run the example "PlayBinVideoPlayer" on my TX2 board, however it seems not using the hardware decoder that Nvidia provides. The result is reasonable to me if the maven remote repo does not support TX2. So my question is that if there is any hint for me to manually compile the java binding with the the gstreamer I compiled on my TX2 board?

Below is the log for "PlayBinVideoPlayer", the FrameRate shows its 30.0 but it actually like only 10.0.

NvMMLiteOpen : Block : BlockType = 261 
TVMR: NvMMLiteTVMRDecBlockOpen: 7907: NvMMLiteBlockOpen 
NvMMLiteBlockCreate : Block : BlockType = 261 
TVMR: cbBeginSequence: 1223: BeginSequence  3840x2160, bVPR = 0
TVMR: LowCorner Frequency = 345000 
TVMR: cbBeginSequence: 1622: DecodeBuffers = 3, pnvsi->eCodec = 4, codec = 0 
TVMR: cbBeginSequence: 1693: Display Resolution : (3840x2160) 
TVMR: cbBeginSequence: 1694: Display Aspect Ratio : (3840x2160) 
TVMR: cbBeginSequence: 1762: ColorFormat : 5 
TVMR: cbBeginSequence:1773 ColorSpace = NvColorSpace_YCbCr709
TVMR: cbBeginSequence: 1904: SurfaceLayout = 3
TVMR: cbBeginSequence: 2005: NumOfSurfaces = 10, InteraceStream = 0, InterlaceEnabled = 0, bSecure = 0, MVC = 0 Semiplanar = 1, bReinit = 1, BitDepthForSurface = 8 LumaBitDepth = 8, ChromaBitDepth = 8, ChromaFormat = 5
TVMR: cbBeginSequence: 2007: BeginSequence  ColorPrimaries = 1, TransferCharacteristics = 1, MatrixCoefficients = 1
Allocating new output: 3840x2160 (x 10), ThumbnailMode = 0
OPENMAX: HandleNewStreamFormat: 3464: Send OMX_EventPortSettingsChanged : nFrameWidth = 3840, nFrameHeight = 2160 

(unknown:21501): GStreamer-CRITICAL **: Registering meta implementation 'GstVideoMeta' without init function
TVMR: FrameRate = 30 
TVMR: NVDEC LowCorner Freq = (345000 * 1024) 
TVMR: FrameRate = 30.000030 
TVMR: FrameRate = 30.000030 
TVMR: FrameRate = 30.000030 
TVMR: FrameRate = 30.000030 
TVMR: FrameRate = 30.000030 
TVMR: FrameRate = 30.000030 
TVMR: FrameRate = 30.000030 
TVMR: FrameRate = 30.000030 
TVMR: FrameRate = 30.000030 
TVMR: FrameRate = 30.000030 
TVMR: FrameRate = 30.000030 
TVMR: FrameRate = 30.000030 
TVMR: FrameRate = 30.000030 
TVMR: FrameRate = 30.000030 

Thanks!

PlayBin.getVideoSinkFrameRate() UnsatisfiedLinkError

The gst_video_frame_rate defined in GstVideoAPI is unable to load.
GstVideoAPI try to load native library, GstNative.load("gstvideo", GstVideoAPI.class) but failed.
I installed gstreamer 1.13 on Windows 7 and found libgstvideorate.dll instead of libgstvideo.dll.

The trace as follows;

Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: Error looking up function 'gst_video_frame_rate'

at com.sun.jna.Function.<init>(Function.java:245)
at com.sun.jna.NativeLibrary.getFunction(NativeLibrary.java:566)
at com.sun.jna.NativeLibrary.getFunction(NativeLibrary.java:542)
at com.sun.jna.NativeLibrary.getFunction(NativeLibrary.java:528)
at com.sun.jna.Library$Handler.invoke(Library.java:228)
at com.sun.proxy.$Proxy26.gst_video_frame_rate(Unknown Source)
at org.freedesktop.gstreamer.Video.getVideoFrameRate(Video.java:22)
at org.freedesktop.gstreamer.elements.PlayBin.getVideoSinkFrameRate(PlayBin.java:281)
at net.aniot.cabincast.gstreamer.MediaPlayer.getFrameRate(MediaPlayer.java:236)
at net.aniot.cabincast.gstreamer.PlayBinVideoPlayer.lambda$5(PlayBinVideoPlayer.java:141)
at javax.swing.Timer.fireActionPerformed(Timer.java:313)
at javax.swing.Timer$DoPostEvent.run(Timer.java:245)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

Not working on 32 bit windows

Video freezes at the first frame when running on 32 bit windows. Works fine on 64 bit windows.

I am using gst1-java-core-0.9-SNAPSHOT.jar and jna-3.4.0.jar, and GStreamer 1.0 32 bit. GStreamer command line works fine too.

Did anyone see this and how to solve it? Thanks.

AppSink set emit-signal to true when capsfilter created hangs program

Hi,

I was doing some experiments with the code and found very weird issue. The problem is that when I create Element for capsfilter before AppSink, it hangs...

The code I used (please see line where code hangs marked with a comment):

import java.nio.ByteBuffer;
import org.freedesktop.gstreamer.Bin;
import org.freedesktop.gstreamer.Buffer;
import org.freedesktop.gstreamer.Caps;
import org.freedesktop.gstreamer.Element;
import org.freedesktop.gstreamer.ElementFactory;
import org.freedesktop.gstreamer.FlowReturn;
import org.freedesktop.gstreamer.Gst;
import org.freedesktop.gstreamer.Pad;
import org.freedesktop.gstreamer.Pipeline;
import org.freedesktop.gstreamer.Sample;
import org.freedesktop.gstreamer.Structure;
import org.freedesktop.gstreamer.elements.AppSink;


public class Poc {

	static {
		String[] args = new String[] {};
		Gst.init(Gst1Driver.class.getSimpleName(), args);
		Runtime.getRuntime().addShutdownHook(new Thread(new Runnable() {
			@Override
			public void run() {
				Gst.deinit();
			}
		}));
	}

	static class AppSinkNewSampleListener implements AppSink.NEW_SAMPLE {

		@Override
		public FlowReturn newSample(AppSink elem) {
			return FlowReturn.OK;
		}
	}

	public static void main(String[] args) throws InterruptedException {

		Bin source = Bin.launch("autovideosrc ! videoconvert", true);

		Element filter = ElementFactory.make("capsfilter", "filter");
		filter.setCaps(new Caps("video/x-raw,width=640,height=480"));

		AppSink sink = new AppSink("ApplicationSinkElement");
		sink.set("emit-signals", true); // <------------- IT HANGS HERE
		sink.connect(new AppSinkNewSampleListener());
		sink.setCaps(new Caps("video/x-raw,pixel-aspect-ratio=1/1,format=BGRx"));

		Pipeline pipeline = new Pipeline();
		pipeline.addMany(source, filter, sink);

		Element.linkMany(source, filter, sink);

		pipeline.ready();
		System.out.println("Play and wait for new samples");

		pipeline.play();
		Thread.sleep(5000);
		pipeline.stop();
	}
}

I did some debugging and found that it hangs on GValue object creation in GObject.java line 171.

GValue propValue = new GValue();

To resolve this problem I just had to replace this code:

		Element filter = ElementFactory.make("capsfilter", "filter");
		filter.setCaps(new Caps("video/x-raw,width=640,height=480"));

		AppSink sink = new AppSink("ApplicationSinkElement");
		sink.set("emit-signals", true); // <------------- IT HANGS HERE
		sink.connect(new AppSinkNewSampleListener());
		sink.setCaps(new Caps("video/x-raw,pixel-aspect-ratio=1/1,format=BGRx"));

With this one (instantiate sink before capsfilter):

		AppSink sink = new AppSink("ApplicationSinkElement");
		sink.set("emit-signals", true); // <------------- NO HANG
		sink.connect(new AppSinkNewSampleListener());
		sink.setCaps(new Caps("video/x-raw,pixel-aspect-ratio=1/1,format=BGRx"));

		Element filter = ElementFactory.make("capsfilter", "filter");
		filter.setCaps(new Caps("video/x-raw,width=640,height=480"));

Don't ask me why. It just work...

Getting gst1 driver to work

I'm trying to set up the gst1 driver for a project on windows 10, and having mixed luck so far. The older gstreamer doc refers to the gst1 module, which has no documentation. I'll gladly contribute a write-up for windows, if I can get this working, but I'm not familiar with gstreamer, jna, and everything else involved so far. Since you wrote this module, I assume you know your way around in all this stuff at least more than I do?

Situation so far:

  • installed gstreamer 1.14.4 to C:\Program Files (x86)\GStreamer and added C:\Program Files (x86)\GStreamer\1.0\x86_64\bin to PATH
  • downloaded webcam-capture 0.3.13-SNAPSHOT and mvn packaged the gst1 module to a jar locally (since it doesn't seem to be on Central - am I missing something or is the gst1 module really still unreleased?)
  • ClassDefNotFoundError made me check the gst1 module pom. I added gst1-java-core:0.9.0 and jna:4.2.2 to my dependencies, and an exclusion on webcam-capture for com.nativelibs4java, to mirror the gs1 module pom. Apparently maven doesn't properly apply poms from system jars...

Now when I call Webcam.getDefault() after installing new Gst1Driver(), I get this exception and I don't know what to make of it, seems like very internal stuff to me:

Caused by: com.github.sarxos.webcam.WebcamException: java.util.concurrent.ExecutionException: java.lang.IllegalArgumentException: No such Gstreamer factory: ksvideosrc
	at com.github.sarxos.webcam.WebcamDiscoveryService.getWebcams(WebcamDiscoveryService.java:124)
	at com.github.sarxos.webcam.Webcam.getWebcams(Webcam.java:893)
	at com.github.sarxos.webcam.Webcam.getDefault(Webcam.java:956)
	at com.github.sarxos.webcam.Webcam.getDefault(Webcam.java:933)
	at com.github.sarxos.webcam.Webcam.getDefault(Webcam.java:911)
	at net.leaumar.americam.PictureProviderSarxosNative.<init>(PictureProviderSarxosNative.java:31)
	at net.leaumar.americam.HttpServer.<clinit>(HttpServer.java:18)
	... 1 more
Caused by: java.util.concurrent.ExecutionException: java.lang.IllegalArgumentException: No such Gstreamer factory: ksvideosrc
	at java.util.concurrent.FutureTask.report(FutureTask.java:122)
	at java.util.concurrent.FutureTask.get(FutureTask.java:192)
	at com.github.sarxos.webcam.WebcamDiscoveryService.getWebcams(WebcamDiscoveryService.java:116)
	... 7 more
Caused by: java.lang.IllegalArgumentException: No such Gstreamer factory: ksvideosrc
	at org.freedesktop.gstreamer.ElementFactory.makeRawElement(ElementFactory.java:221)
	at org.freedesktop.gstreamer.ElementFactory.make(ElementFactory.java:91)
	at com.github.sarxos.webcam.ds.gst1.Gst1Driver.getDevices(Gst1Driver.java:71)
	at com.github.sarxos.webcam.WebcamDiscoveryService$WebcamsDiscovery.call(WebcamDiscoveryService.java:36)
	at com.github.sarxos.webcam.WebcamDiscoveryService$WebcamsDiscovery.call(WebcamDiscoveryService.java:26)

Could you help me get it working please? I'll write a setup guide for all this if we succeed.

Replace use of deprecated finalization

Use of finalization is rightfully deprecated and problematic. Memory management of GObjects and other native types should be moved to use a cleaner-like mechanism with PhantomReferences. This should also take into account alternative options for managing handles for native objects in addressing #122 and #78

pipeline I/O to and from java Streams

Hi, I'd like to feed a pipeline from a java InputStream and pipe the output of the pipeline to a java OutputStream.

Do you have any suggestions as to the best approach to take?

Move GLib / GObject code into separate package

It was suggested in conversation with upstream GStreamer devs that we look at moving GLib / GObject related code into a separate library. Most other language bindings have separate GLib libraries to rely on.

For 1.0 we should move the GLib / GObject code into a separate package with a view to splitting at a later date.

This will also involve moving some lowlevel classes, which will help with #79

Having multiple inputs often causes "Most likely this is a multi-threaded client and XInitThreads has not been called"

My program regularly crashes with this error when I have more than one video input and I'm composing them together:

[xcb] Unknown request in queue while dequeuing
[xcb] Most likely this is a multi-threaded client and XInitThreads has not been called
[xcb] Aborting, sorry about that.
java: xcb_io.c:165: dequeue_pending_request: Zusicherung »!xcb_xlib_unknown_req_in_deq« nicht erfüllt.
Abgebrochen (Speicherabzug geschrieben)

nicht erfüllt = not satisfied.

"Abgebrochen (Speicherabzug geschrieben)" = "Aborted (memory dump written)"

Do I have to do something special, or is that a missing call in the wrapper?

Performance improvement

Hi,

I'm facing rendering performance issue with high resolution stream. the video is not smooth at all. im using the FX port.
mainly the code is like:

import javafx.geometry.Insets;
import javafx.geometry.Pos;
import javafx.scene.layout.VBox;
import org.freedesktop.gstreamer.*;
import org.freedesktop.gstreamer.elements.AppSink;

import java.nio.ByteOrder;

import javafx.application.Platform;
import javafx.beans.value.ChangeListener;
import javafx.beans.value.ObservableValue;
import javafx.scene.image.Image;
import javafx.scene.image.ImageView;
import javafx.scene.layout.BorderPane;

import javax.sound.sampled.AudioFormat;
import javax.sound.sampled.AudioSystem;
import javax.sound.sampled.LineUnavailableException;
import javax.sound.sampled.TargetDataLine;

import static javafx.geometry.Orientation.VERTICAL;
import static javafx.scene.paint.Color.*;

public class GstreamerFX extends BorderPane
{
	Pipeline videoPipe, audioPipe;
	
	GstreamerFX()
	{
		long startTime = System.nanoTime();

		Gst.init();

		System.out.println("Gst.init(): " + ((double)(System.nanoTime() - startTime) / 1000000000.0));

		gstreamerFX_video();
	}

	void gstreamerFX_video()
	{
		videoPipe = Pipeline.launch(MainFX.cameraPipline);
		final AppSink videosink = (AppSink) videoPipe.getElementByName("appsink");

		//AppSink videosink = new AppSink("GstVideoComponent");
		videosink.set("emit-signals", true);
		AppSinkListener GstListener = new AppSinkListener();
		videosink.connect(GstListener);
		StringBuilder caps = new StringBuilder("video/x-raw,pixel-aspect-ratio=1/1,");

		// JNA creates ByteBuffer using native byte order, set masks according to that.
		if (ByteOrder.nativeOrder() == ByteOrder.LITTLE_ENDIAN)
			caps.append("format=BGRx");
		else
			caps.append("format=xRGB");

		videosink.setCaps(new Caps(caps.toString()));
		videosink.set("max-buffers", 5000);
		videosink.set("drop", true);

		final ImageView imageView = new ImageView();

		final ImageContainer imageContainer = GstListener.getImageContainer();
		imageContainer.addListener(new ChangeListener<Image>()
		{
			@Override
			public void changed(ObservableValue<? extends Image> observable, Image oldValue, Image newValue)
			{
				Platform.runLater(new Runnable()
				{
					@Override
					public void run()
					{
						imageView.setImage(newValue);
					}
				});
			}
		});

		// listen for EOS signal (to shut pipeline down smoothly) and error messages.
		// Without connecting the bus, it will stuck and not work !
		final Bus bus = videoPipe.getBus();
		bus.connect(new Bus.EOS()
		{
			public void endOfStream(GstObject source)
			{
				System.out.println("EOS: " + source); 
				exit();
			}
		});

		bus.connect(new Bus.ERROR()
		{
			public void errorMessage(GstObject source, int code, String message)
			{
				System.out.println("ERROR: " + source + " code: " + code + " message: " + message);
			}
		});

		bus.connect(new Bus.MESSAGE()
		{
			public void busMessage(Bus bus, Message message)
			{
				//System.out.println("Message: " + message.getStructure() + " Bus: " + bus);
			}
		});

		bus.connect(new Bus.WARNING()
		{
			@Override
			public void warningMessage(GstObject source, int code, String message)
			{
				System.out.println("WARNING: " + source + " code: " + code + " message: " + message);
			}
		});

		setCenter(imageView);

		//imageView.fitWidthProperty().bind(widthProperty());
		//imageView.fitHeightProperty().bind(heightProperty());
		//imageView.setPreserveRatio(true);

		final Thread t = new Thread()
		{
			public void run()
			{
				videoPipe.play();
			}
		};
		t.start();
	}
}

import java.nio.ByteBuffer;

import org.freedesktop.gstreamer.Buffer;
import org.freedesktop.gstreamer.FlowReturn;
import org.freedesktop.gstreamer.Sample;
import org.freedesktop.gstreamer.Structure;
import org.freedesktop.gstreamer.elements.AppSink;

import javafx.scene.image.Image;
import javafx.scene.image.PixelFormat;
import javafx.scene.image.PixelWriter;
import javafx.scene.image.WritableImage;

import javafx.beans.property.ObjectProperty;
import javafx.beans.property.SimpleObjectProperty;

public class AppSinkListener implements AppSink.NEW_SAMPLE
{
	Image actualFrame;
	int i = 0;
	int lastWidth = 0;
	int lastHeigth = 0;
	byte[] byteArray;
	public ObjectProperty<Image> frame = new SimpleObjectProperty<Image>(actualFrame);
	private ImageContainer imageContainer = new ImageContainer();

	@Override
	public FlowReturn newSample(AppSink appSink)
	{
		Sample sample = appSink.pullSample();
		Structure capsStruct = sample.getCaps().getStructure(0);
		Buffer buffer = sample.getBuffer();
		ByteBuffer byteBuffer = buffer.map(false);
		if (byteBuffer != null)
		{
			int width = capsStruct.getInteger("width");
			int height = capsStruct.getInteger("height");
			if (width != lastWidth || height != lastHeigth)
			{
				lastWidth = width;
				lastHeigth = height;
				byteArray = new byte[width * height * 4];
			}

			byteBuffer.get(byteArray);
			actualFrame = convertBytesToImage(byteArray, width, height);
			frame = new SimpleObjectProperty<Image>(actualFrame);
			imageContainer.setImage(actualFrame);
			buffer.unmap();
		}
		sample.dispose();
		return FlowReturn.OK;
	}

	public ImageContainer getImageContainer()
	{
		return imageContainer;
	}

	private Image convertBytesToImage(byte[] pixels, int width, int height)
	{
		WritableImage img = new WritableImage(width, height);
		PixelWriter pw = img.getPixelWriter();
		pw.setPixels(0, 0, width, height, PixelFormat.getByteBgraInstance(), pixels, 0, width * 4);
		return img;
	}
}

pipeline

rtspsrc location=rtsp://<ip>:8554/test latency=0 ! decodebin ! videoconvert ! textoverlay name=textoverlay ! appsink name=appsink

the pipeline is from raspberry (HD with 30 fps):

raspivid -n -vf -hf -fl -t 0 -w 1280 -h 720 -b 6000000 -fps 30 -pf baseline -drc med -md 5 -o - | gst-launch-1.0 -v fdsrc ! h264parse ! gdppay ! tcpserversink host=localhost port=5000 | /home/pi/gst-rtsp-server-1.11.2/examples/test-launch "( tcpclientsrc host=localhost port=5000 ! gdpdepay ! rtph264pay config-interval=1 name=pay0 pt=96 )"

any advise on how to improve the rendering.

procedures to compile

hi,

please provide guidlines on how to compile this library. i tried to compile it with maven in IntelliJ but no luck. non of the tasks are able to generate the library.

it will be great if you can have public repository with updated binaries all the time.

Add methods to Structure to support GValueArray and other collections

For use with eg. Level element, we need to provide a public API to Structure to get access to lists of values inside GValueArray and similar.

This is currently achievable using low-level API - eg.

GValueAPI.GValue value = GstStructureAPI.GSTSTRUCTURE_API.gst_structure_get_value(struct, "peak");
 GValueAPI.GValueArray array = new GValueAPI.GValueArray(GValueAPI.GVALUE_API.g_value_get_boxed(value));

Possible public API -

List<T> getValues(String fieldName, Class<T> type); // no way to achieve without type parameter?

// additional API ??? equivalent to getValues().toArray() but better performing
T[] toArray(String fieldName, T[] array);
double[] toDoubleArray(String fieldName, double[] array);
int[] toIntArray(String fieldName, int[] array);

crash when mapping empty GstBuffer

testcode:

        final Element elem = ElementFactory.make("identity", "src");
        final Pad     src  = elem.getStaticPad("src");

        final DATA_PROBE data_probe = new DATA_PROBE() {

            @Override
            public PadProbeReturn dataReceived(final Pad pad, final Buffer buffer) {

                final ByteBuffer data = buffer.map(false);

                // do something with data
                if (data != null) {
                    System.out.println("probeCB: buf with size: " + data.capacity());
                }

                buffer.unmap();
                return PadProbeReturn.OK;
            }
        };

        // add a dataprobe
        src.addDataProbe(data_probe);

        // start element
        elem.play();

        // push buffers to pad
        // crash with 0-size buffers
        // no crash when using a size > 0
        for (int i = 0; i < 2; i++) {
            final Buffer b = new Buffer(0);
            src.push(b);
        }

        elem.stop();

similar code in c does not show this behaviour:

#include <gst/gst.h>

GstPadProbeReturn probeCB (GstPad *pad,
                           GstPadProbeInfo *info,
                           gpointer user_data) {

  GstMapInfo mapinfo;
  // we know what we do, no need to check info for type!
  // directly get buffer from GstPadProbeInfo
  GstBuffer *buf = gst_pad_probe_info_get_buffer(info);
  if (buf != NULL) {
    if (gst_buffer_map (buf, &mapinfo, GST_MAP_READ)) {
      g_print("probeCB: buf with size: %lu\n", mapinfo.size);
    }
    gst_buffer_unmap(buf, &mapinfo);
  }
  return GST_PAD_PROBE_OK;
}

int main (int   argc, char *argv[]) {

  gst_init (&argc, &argv);
  GstElement *src;
  GstPad* pad;
  gulong probeid;
  int i;

  src = gst_element_factory_make ("identity", "src");
  pad = gst_element_get_static_pad(src, "src");
  probeid = gst_pad_add_probe (pad,
                               GST_PAD_PROBE_TYPE_BUFFER,
                               probeCB,
                               NULL,
                               NULL);
  g_print("probe id: %lu\n", probeid);

  // play
  gst_element_set_state (src, GST_STATE_PLAYING);

  for (i=0; i<2; i++) {
    GstBuffer* buf = gst_buffer_new_allocate(NULL, 0, NULL);
    gst_pad_push(pad, buf);
  }

  // stop
  gst_element_set_state (src, GST_STATE_NULL);

  // cleanup
  gst_pad_remove_probe (pad, probeid);
  gst_object_unref (GST_OBJECT (pad));
  gst_object_unref (GST_OBJECT (src));

  return 0;
}

Add JNA direct mapping to highly used methods

For performance reasons it might be useful to support JNA direct mapping on some highly used methods (eg. Sample, Buffer methods used in AppSink callbacks). Doing some of this work before 1.0.0 may also highlight any potential issues.

Are there known memory leaks?

I have a rather simple pipeline, consisting of a v4l2src, a pulsesrc, an appsink with a display I used from the JavaFX sample, and a encoder which is turned off via a valve.

GStreamer leaks about 80 Megabytes per second(!!). Where do I start looking for the cause? That's ridiculous.

java.lang.NoSuchFieldError: SIZE with jdk11

Hi,
I get the following exception on


Gst.init("AudioPlayer",args);

Exception in thread "main" java.lang.NoSuchFieldError: SIZE
	at org.freedesktop.gstreamer.Gst$NativeArgs.<init>(Gst.java:87)
	at org.freedesktop.gstreamer.Gst.init(Gst.java:292)
	at player.CLS_GST_Player.<init>(CLS_GST_Player.java:142)
	at player.gui.player_GUI.<init>(player_GUI.java:68)
	at player.player_main.main(player_main.java:119)

I'm not sure if this relates to the Fix in the 0.9.3 Version:
-> FIX code inherited from 0.10 bindings that assumed NativeLong size and Native.SIZE_T_SIZE were the same - broke bindings on Java 9+ with Windows 10 x64.

But I have a Ubuntu Linux with Netbeans 9 and OpenJDK11 with Lib 0.9.2 and 0.9.3 reproducible.
JNA Lib is 5.1.0 Gstreamer is /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0.1404.0

dpkg output:
ii  libgstreamer-gl1.0-0:amd64               1.14.4-1ubuntu1           amd64                     GStreamer GL libraries
ii  openjdk-11-jdk:amd64                     11.0.1+13-2ubuntu1        amd64                     OpenJDK Development Kit (JDK)

Minimal API to support multiple upstream GStreamer versions

In order to support mappings to functionality added in recent GStreamer versions we need to agree the baseline supported version (probably 1.8), and a minimal API for requesting / asserting version, optional tests, etc.

Suggested solution -

  • Add requested version API to be used prior to or in Gst.init(), and API for querying the requested version. Log or fail in init() if required version not met?
  • Documentation and runtime annotation ( @Since(minor = 10) ?) on high and low level methods and tests?
  • Use assert based on requested version inside methods that rely on newer functionality? Minimal overhead way of developers not relying on functionality they've not correctly targeted? Use Gst.checkVersion() or similar - have assert or whatever in one place.

How about make gst1-java can be assemblied

Now, gst1-java is not on maven. So, I think best way to use user library is package jar and use. So, how about add maven-assembly plugin? I will send you pull request

Buffer creation from another buffer

I want to construct a new org.freedesktop.gstreamer.Buffer object with data from another Buffer. For example, with the python library, I could do something like this:

buffer = gst.Buffer(otherBuffer.data)

Is there any way I could do this using the java library?

`new Pipeline()` results in "Invalid native pointer" exception

OpenJDK 8. This exception seems to have no consistent way. GStreamer also suddenly complains about missing factories.

I call new Pipeline() right after calling Gst.init("somename"). When I try the same thing in a REPL, it works fine. Are there known things that interfere with gstreamer-java?

Is is single-threaded only?

I have a bit of a problem with this. It seems it runs single-threaded only, and only on the thread on which I call pipeline.play(). Which of course is a serious bottleneck. Am I missing something?

Is there a RTSPBin like PlayBin?

I've just been in touch with GStreamer. I found a PlayBin in gst1-java-core that plays the local MP3 very well. I'd like to ask if you can write a RTSPBin like this. Thanks.

Try to use "gnlurisource" element from the Gnonlin

Hi,

I would like to know if Java Gstreamer binding supports the use of "gnlsource" element instead of filesrc. I want to read from an audio file just a segment, knowing the timestamps. I managed to do this directly fromthe terminal, using gst-launch, but I have problems implementing this pipeline in Java. Here I have described exactly what I did and I gave a code snippet: https://stackoverflow.com/questions/46504029/java-gstreamer-gnonlin-source-segmentation

Thanks!

Add querySeeking() to Pipeline

Requested addition to Pipeline.

Pipeline.java
    /**
     * Gets the {@link Segment} for the current media stream in terms of the specified {@link Format}.
     * @param format the {@code Format} to return the segment in.
     * @return The information regarding the current {@code Segment}.
     */
    public Segment querySeeking(Format format) {
        Query qry = new SeekingQuery(format);
        GSTELEMENT_API.gst_element_query(this, qry);
        Format[] fmt = { Format.UNDEFINED };
        boolean[] seekable = { false };
        long[] start_value = { 0 };
        long[] stop_value = { 0 };
        GSTQUERY_API.gst_query_parse_seeking(qry, fmt, seekable, start_value, stop_value);
        return new Segment(0, fmt[0], start_value[0], stop_value[0]);
    }

"Internal stream data error" on first source element

Thank u for developing such a nice gstreamer java bindings!
But, I have some issue about pipeline construction.

I'm currently writing network camera viewer using this library.
But when I launch pipeline from pipeline description string which like gst-launch-1.0 command, "Internal stream data error" occur on first source element.

I have tested the pipeline description with gst-launch-1.0 command and it works fine.
Here is the pipeline description which I tested.

gst-launch-1.0 -v rtspsrc protocols=GST_RTSP_LOWER_TRANS_TCP latency=0 location=rtsp://192.168.1.200/channel=5_stream=0.sdp ! rtph264depay ! avdec_h264 ! autovideosink

But when i try to launch same pipeline desciption in Java, "Internal stream data error" was reported by the bus of pipeline.
And here is my code i am trying...

	public static void main(String[] args)
	{
		Gst.init();

		try {
			final Dimension dimension = new Dimension(640, 480);
			final Pipeline pipe = new Pipeline();
			final Bin bin = Bin.launch("rtspsrc protocols=GST_RTSP_LOWER_TRANS_TCP latency=0 location=rtsp://10.5.0.200/user=admin_password=tlJwpbo6_channel=5_stream=0.sdp ! rtph264depay ! avdec_h264", true);

			pipe.getBus().connect(new Bus.ERROR() {
				@Override
				public void errorMessage(GstObject source, int code, String message) {
					System.err.println("[ERROR] [" + code + "]" + message);
					System.err.println("Source: " + source);
				}
			});

			SimpleVideoComponent videoComponent = new SimpleVideoComponent();
			Element sink = videoComponent.getElement();

			pipe.addMany(bin, sink);
			pipe.linkMany(bin, sink);

			SwingUtilities.invokeLater(() -> {
				JFrame frame = new JFrame("Surveillance Monitor");
				frame.getContentPane().add(videoComponent, BorderLayout.CENTER);

				frame.setPreferredSize(dimension);
				frame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
				frame.pack();
				frame.setVisible(true);

				pipe.play();
			});

			Gst.main();
			pipe.stop();
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

If I replace the pipeline description like below, it works.

final Bin bin = Bin.launch("videotestsrc", true);

And If i use AppBin class to play h264 video in the mp4 format on local disk, it works correctly.
But If i launch pipeline with following pipeline description, qtdemux cause "Internal stream data error".

final Bin bin = Bin.launch("filesrc location=/home/takuya/Downloads/test.mp4 ! qtdemux ! avdec_h264", true);

This pipeline description also work with gst-launch-1.0 command.
So, I'm not sure whether if this behaviour is a bug or just my wrong usage.

Please help me!
Sorry for my bad english.
Thank you and best regards,

Environement

OS

cat /etc/os-release 
NAME="Ubuntu"
VERSION="17.10 (Artful Aardvark)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 17.10"
VERSION_ID="17.10"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=artful
UBUNTU_CODENAME=artful

Installed Packages

sudo dpkg -l gstreamer*
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name                                                        Version                            Architecture                       Description
+++-===========================================================-==================================-==================================-============================================================================================================================
un  gstreamer0.10-packagekit                                    <none>                             <none>                             (no description available)
ii  gstreamer1.0-alsa:amd64                                     1.12.3-1                           amd64                              GStreamer plugin for ALSA
un  gstreamer1.0-audiosink                                      <none>                             <none>                             (no description available)
un  gstreamer1.0-audiosource                                    <none>                             <none>                             (no description available)
ii  gstreamer1.0-clutter-3.0                                    3.0.24-1                           amd64                              Clutter PLugin for GStreamer 1.0
un  gstreamer1.0-fluendo-mp3                                    <none>                             <none>                             (no description available)
ii  gstreamer1.0-libav:amd64                                    1.12.2-1                           amd64                              libav plugin for GStreamer
ii  gstreamer1.0-packagekit                                     1.1.7-1ubuntu0.1                   amd64                              GStreamer plugin to install codecs using PackageKit
ii  gstreamer1.0-plugins-bad:amd64                              1.12.3-1ubuntu1                    amd64                              GStreamer plugins from the "bad" set
un  gstreamer1.0-plugins-bad-faad                               <none>                             <none>                             (no description available)
un  gstreamer1.0-plugins-bad-videoparsers                       <none>                             <none>                             (no description available)
ii  gstreamer1.0-plugins-base:amd64                             1.12.3-1                           amd64                              GStreamer plugins from the "base" set
ii  gstreamer1.0-plugins-base:i386                              1.12.3-1                           i386                               GStreamer plugins from the "base" set
ii  gstreamer1.0-plugins-base-apps                              1.12.3-1                           amd64                              GStreamer helper programs from the "base" set
ii  gstreamer1.0-plugins-good:amd64                             1.12.3-1ubuntu1                    amd64                              GStreamer plugins from the "good" set
un  gstreamer1.0-plugins-ugly                                   <none>                             <none>                             (no description available)
ii  gstreamer1.0-pulseaudio:amd64                               1.12.3-1ubuntu1                    amd64                              GStreamer plugin for PulseAudio
ii  gstreamer1.0-tools                                          1.12.3-1                           amd64                              Tools for use with GStreamer
un  gstreamer1.0-videosink                                      <none>                             <none>                             (no description available)
un  gstreamer1.0-videosource                                    <none>                             <none>                             (no description available)
un  gstreamer1.0-visualization                                  <none>                             <none>                             (no description available)
ii  gstreamer1.0-x:amd64                                        1.12.3-1                           amd64                              GStreamer plugins for X11 and Pango

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.