gst-plugins-bad Elements

a2dpsink
accurip
adpcmdec
adpcmenc
aiffmux
aiffparse
asfmux
asfparse
assrender
audiobuffersplit
audiochannelmix
audiolatency
audiomixmatrix — Transform input/output channels according to a matrix
audioparse
audiosegmentclip
autoconvert
autovideoconvert
avdtpsink
avdtpsrc
avwait
bayer2rgb
bpmdetect
bs2b
bulge
burn
bz2dec
bz2enc
camerabin
checksumsink
chopmydata
chromahold
chromaprint
chromium
circle
coloreffects
combdetect
compare
curlfilesink — sink that uploads data to a server using libcurl
curlftpsink — sink that uploads data to a server using libcurl
curlhttpsink — sink that uploads data to a server using libcurl
curlhttpsrc
curlsftpsink — sink that uploads data to a server using libcurl
curlsmtpsink
cvdilate
cvequalizehist
cverode
cvlaplace
cvsmooth
cvsobel
dashdemux
dc1394src
debugspy
decklinkaudiosink — Outputs Audio to a BlackMagic DeckLink Device
decklinkaudiosrc — Inputs Audio from a BlackMagic DeckLink Device
decklinkvideosink — Outputs Video to a BlackMagic DeckLink Device
decklinkvideosrc — Inputs Video from a BlackMagic DeckLink Device
dewarp
dfbvideosink
diffuse
dilate
diracparse
disparity
dodge
dtlsdec
dtlsenc
dtlssrtpdec
dtlssrtpdemux
dtlssrtpenc
dtmfdetect — Detects DTMF tones
dtsdec
dvbbasebin
dvbsrc
dvbsuboverlay
dvdspu
edgedetect
errorignore
exclusion
faac
faad
faceblur
facedetect
faceoverlay
fakevideosink
fbdevsink
fdkaacdec
fdkaacenc
festival
fieldanalysis
fisheye
fluiddec
fpsdisplaysink
freeverb
gaussianblur
gdpdepay
gdppay
gmedec
grabcut
gsmdec
gsmenc
h263parse
h264parse
h265parse
handdetect
hlsdemux
hlssink2
hlssink
id3mux
interaudiosink
interaudiosrc
interlace
intersubsink
intersubsrc
intervideosink
intervideosrc
ipcpipelinesink
ipcpipelinesrc
ipcslavepipeline
iqa — Image Quality Assessment plugin.
irtspparse — Interleaved RTSP parser
ivfparse
ivtc
jifmux — JPEG interchange format writer
jp2kdecimator
jpeg2000parse
jpegparse — JPEG parser
kaleidoscope
katedec
kateenc
kateparse — parses kate streams
katetag — retags kate streams
kmssink — A KMS/DRM based video sink
ladspa — bridge for LADSPA (Linux Audio Developer's Simple Plugin API)
liveadder
marble
midiparse
mirror
mmssrc
modplug
motioncells
mpeg2enc
mpeg4videoparse
mpegpsdemux
mpegpsmux
mpegtsmux
mpegvideoparse
mplex
mssdemux
musepackdec
mxfdemux
mxfmux
neonhttpsrc
netsim
ofa
openalsink — capture raw audio samples through OpenAL
openalsrc — capture raw audio samples through OpenAL
opencvtextoverlay
openexrdec
openh264dec
openh264enc
openjpegdec
openjpegenc
opusparse
pcapparse
perspective
pinch
pitch
pngparse
pnmdec
pnmenc
proxysink
proxysrc
rawaudioparse
rawvideoparse
removesilence
retinex
rfbsrc
rgb2bayer
rotate
rsndvdbin
rsvgdec
rsvgoverlay
rtmpsink
rtmpsrc
rtpasfpay
rtponvifparse
rtponviftimestamp
sbcdec
sbcenc
scenechange
sdpdemux
sdpsrc
segmentation
sfdec
shmsink
shmsrc
simplevideomarkdetect
simplevideomark
sirendec
sirenenc
skindetect
smooth
solarize
spacescope
spanplc
spectrascope
speed
sphere
square
srtenc
srtpdec
srtpenc
stretch
synaescope
teletextdec
templatematch
testsrc
tiger
timecodestamper — Attach a timecode into incoming video frames
tonegeneratesrc
tsdemux
tsparse
ttmlparse
ttmlrender
tunnel
twirl
unalignedaudioparse
unalignedvideoparse
uvch264mjpgdemux — UVC H264 compliant MJPG demuxer
uvch264src
vc1parse
vdpaumpegdec
videoanalyse
videodiff
videoframe-audiolevel
videoparse
videosegmentclip
viewfinderbin
vmncdec
voaacenc
voamrwbenc
vulkansink
vulkanupload
wasapisink
wasapisrc
watchdog
waterripple
wavescope
waylandsink
webpdec
webpenc
webrtcbin
webrtcdsp — Audio Filter using WebRTC Audio Processing library
webrtcechoprobe
webvttenc
wildmidi
wrappercamerabinsrc
x265enc
y4mdec
yadif
zbar
zebrastripe

#include <directfb.h>

#ifdef __no_instrument_function__
#undef __no_instrument_function__
#endif

#include <stdio.h>
#include <gst/gst.h>

static IDirectFB *dfb = NULL;
static IDirectFBSurface *primary = NULL;
static GMainLoop *loop;

#define DFBCHECK(x...)                                         \
  {                                                            \
    DFBResult err = x;                                         \
                                                               \
    if (err != DFB_OK)                                         \
      {                                                        \
        fprintf( stderr, "%s <%d>:\n\t", __FILE__, __LINE__ ); \
        DirectFBErrorFatal( #x, err );                         \
      }                                                        \
  }

static gboolean
get_me_out (gpointer data)
{
  g_main_loop_quit (loop);
  return FALSE;
}

int
main (int argc, char *argv[])
{
  DFBSurfaceDescription dsc;
  GstElement *pipeline, *src, *sink;

  /* Init both GStreamer and DirectFB */
  DFBCHECK (DirectFBInit (&argc, &argv));
  gst_init (&argc, &argv);

  /* Creates DirectFB main context and set it to fullscreen layout */
  DFBCHECK (DirectFBCreate (&dfb));
  DFBCHECK (dfb->SetCooperativeLevel (dfb, DFSCL_FULLSCREEN));

  /* We want a double buffered primary surface */
  dsc.flags = DSDESC_CAPS;
  dsc.caps = DSCAPS_PRIMARY | DSCAPS_FLIPPING;

  DFBCHECK (dfb->CreateSurface (dfb, &dsc, &primary));

  /* Creating our pipeline : videotestsrc ! dfbvideosink */
  pipeline = gst_pipeline_new (NULL);
  g_assert (pipeline);
  src = gst_element_factory_make ("videotestsrc", NULL);
  g_assert (src);
  sink = gst_element_factory_make ("dfbvideosink", NULL);
  g_assert (sink);
  /* That's the interesting part, giving the primary surface to dfbvideosink */
  g_object_set (sink, "surface", primary, NULL);

  /* Adding elements to the pipeline */
  gst_bin_add_many (GST_BIN (pipeline), src, sink, NULL);
  if (!gst_element_link (src, sink))
    g_error ("Couldn't link videotestsrc and dfbvideosink");

  /* Let's play ! */
  gst_element_set_state (pipeline, GST_STATE_PLAYING);

  /* we need to run a GLib main loop to get out of here */
  loop = g_main_loop_new (NULL, FALSE);
  /* Get us out after 20 seconds */
  g_timeout_add (20000, get_me_out, NULL);
  g_main_loop_run (loop);

  /* Release elements and stop playback */
  gst_element_set_state (pipeline, GST_STATE_NULL);

  /* Free the main loop */
  g_main_loop_unref (loop);

  /* Release DirectFB context and surface */
  primary->Release (primary);
  dfb->Release (dfb);

  return 0;
}