Commit 28616c7c authored by Kevin Pouget's avatar Kevin Pouget

gst-plugin: Allow instantiating and configuring multiple GST plugins

This patch allows instantiating and configuring multiple GStreamer
plugins from the command-line.

One plugin will be instantiated for each 'gst.CODEC=ENCODER' found in
the command-line arguments.

The command-line argument format is:

    -c PLUGIN_OPT=VALUE
    -c gst.CODEC=ENCODER[:ENCODER_PROP=VALUE,[ENCODER_PROP=VALUE]*]

Where:

- PLUGIN_OPT=VALUE is an argument list which allows passing
  configuration parameters to the plugin. Currently, on the the
  "framerate" setting is used in the GStreamer plugin.

- The CODEC argument is a supported codec (currently, vp8, vp9, mjpeg,
  h264, h265).

- The ENCODER argument is the name of a GStreamer encoder property
  (see `gst-inspect-1.0 ENCODER`), or 'auto' to let GStreamer pickup
  an encoder for this CODEC.

- ENCODER_PROP=VALUE is an optional list of GStreamer encoder
  properties:
  - if ENCODER is 'auto', no encoder property can be passed.
  - ENCODER_PROP might be a plugin option (see PLUGIN_OPT=VALUE),
    overriding any value previously set for the current plugin.

EXAMPLES:

    -c framerate=30
    -c gst.vp8=vp8enc:target-bitrate=256000,threads=4,framerate=20
    -c gst.vp8=vaapivp8enc:rate-control=cqp,keyframe-period=128,bitrate=8000
    -c gst.h264=auto
Signed-off-by: Kevin Pouget's avatarKevin Pouget <kpouget@redhat.com>
Acked-by: Snir Sheriber's avatarSnir Sheriber <ssheribe@redhat.com>
Acked-by: Frediano Ziglio's avatarFrediano Ziglio <fziglio@redhat.com>
parent a316113a
Pipeline #121686 passed with stage
in 9 minutes and 52 seconds