Using Gstd

From RidgeRun Developer Wiki



Previous: Examples/Gstreamer pipelines Index Next: Examples/C Application Example





The following is an example of how to insert metadata and receive a signal using gstd and the GstOBU plugin. Make sure you have gstd plugin to perform this example.

Start the Gstd daemon:

gstd -e

Create the pipeline inserting and extracting metadata

gst-client pipeline_create test videotestsrc is-live=true ! av1enc cpu-used=8 ! obuinject metadata="Hello-World" ! obuextract signal-new-metadata=true name=extract ! av1dec ! xvimagesink sync=false async=true

Expect for the signal:

gst-client signal_connect test extract new-metadata

In other terminal, play the pipeline:

gst-client pipeline_play test

The signal will be receive with and will show the size of the injected message and the data as a gpointer. The expected output similar to:

{
  "code" : 0,
  "description" : "Success",
  "response" : {
    "name" : "new-metadata",
    "arguments" : [
        {
            "type" : "GstObuExtract",
            "value" : "(GstObuExtract) extract"
        },
        {
            "type" : "guint",
            "value" : 11
        },
        {
            "type" : "gpointer",
            "value" : "((gpointer) 0x7f0c4ffb9d60)"
        }
    ]
}
}

Stop the pipeline and kill the Gstd daemon

gst-client pipeline_stop test
gstd -k



Previous: Examples/Gstreamer pipelines Index Next: Examples/C Application Example