testsrcbin

This is a simple GstBin source that wraps audiotestsrc/videotestsrc following specification passed in the URI (it implements the GstURIHandler interface) in the form of testbin://audio+video or setting the "stream-types" property with the same format.

This element also provides GstStream and GstStreamCollection and thus the element is useful for testing the new playbin3 infrastructure.

The uri format

testbin://<stream1 definition>[+<stream2 definition>]

With :

<media-type>,<element-properties>,[caps=<media caps>]

where:

  • <media-type>: Adds a new source of type <media-type>. Supported values:
    • video: A videotestsrc element will be used
    • audio: An audiotestsrc will be used you can use it as many time as wanted to expose new streams.
  • <element-properties>: key=value list of properties to be set on the source element. See videotestsrc properties for the video case and audiotestsrc properties for the audio case.
  • <media caps>: Caps to be set in the capsfilter that follows source elements for example to force the video source to output a full HD stream, you can use video/x-raw,width=1920,height=1080.

Note that stream definitions are interpreted as serialized GstStructure.

Examples pipeline:

One audio stream with volume=0.5 and a white video stream in full HD at 30fps

gst-launch-1.0 playbin3 uri="testbin://audio,volume=0.5+video,pattern=white,caps=[video/x-raw,width=1920,height=1080,framerate=30/1]"

Single full HD stream

gst-launch-1.0 playbin3 uri="testbin://video,pattern=green,caps=[video/x-raw,width=1920,height=1080,framerate=30/1]"

Two audio streams

gst-launch-1.0 playbin3 uri="testbin://audio+audio"

Hierarchy

GObject
    ╰──GInitiallyUnowned
        ╰──GstObject
            ╰──GstElement
                ╰──GstBin
                    ╰──testsrcbin

Implemented interfaces

Factory details

Authors: – Erik Walthinsen ,Wim Taymans

Classification:Generic/Bin

Rank – none

Plugin – debugutilsbad

Package – GStreamer Bad Plug-ins

Pad Templates

audio_src_%u

audio/x-raw(ANY):

Presencesometimes

Directionsrc

Object typeGstPad


video_src_%u

video/x-raw(ANY):

Presencesometimes

Directionsrc

Object typeGstPad


Properties

expose-sources-async

“expose-sources-async” gboolean

Whether to expose sources at random time to simulate a source that is reading a file and exposing the srcpads later.

Flags : Read / Write

Default value : false

Since : 1.20


stream-types

“stream-types” gchararray

String describing the stream types to expose, eg. "video+audio".

Flags : Read / Write

Default value : NULL


The results of the search are