Changes between Version 7 and Version 8 of gstreamer


Ignore:
Timestamp:
02/28/2020 08:28:00 PM (5 years ago)
Author:
Tim Harvey
Comment:

use GST_CONVERT to avoid confusion between GStreamer 1.12 and GStreamer 1.14 v4l2videoconvert element naming

Legend:

Unmodified
Added
Removed
Modified
  • gstreamer

    v7 v8  
    6363}}}
    6464
    65 **Note that we 'source' the setup file above instead of executing it. This is because it sets some env variables that we will use throughout our examples below. If you are using a shell that does not have 'source' the notation is '. setup'**
     65**Note that we 'source' the setup file above instead of executing it. This is because it sets some env variables that we will use throughout our examples below. If you are using a shell that does not have 'source' the notation is '. ./setup'**
    6666
    6767
     
    515515
    516516Notes:
    517  - for GStreamer-1.14 the name of the element depends on the video device the driver registers with the kernel (ie v4l2video8convert if mem2mem driver registers /dev/video8)
    518  - for GStreamer master (in development) the name of the element is always 'v4l2videoconvert'
     517 - For GStreamer-1.14 the name of the element depends on the video device the driver registers with the kernel (ie v4l2video8convert if mem2mem driver registers /dev/video8) but for GStreamer-1.16 and beyond the name of the element is stable and always 'v4l2videoconvert'. For the examples on this page we use the GST_CONVERT env variable that is set from the output of the media-ctl-setup script to avoid confusion.
    519518 - the {{{kmssink}}} examples below need a {{{can-scale=false}}} property to tell GStreamer not to scale via the KMS driver (as the IMX6 KMS driver does not support scaling)
    520519 - ensure that the input format differs from the output format otherwise GStreamer will bypass the conversion completely; note that GStreamer doesn't understand flipping or rotation as part of the format. Gstreamer master (in development) adds a 'disable-passthrough' property to the v4l2videoconvert entity that can be set to force the conversion regardless of input and output format
     
    532531video4linux2:  v4l2convert: V4L2 Video Converter
    533532}}}
    534   - Note that for GStreamer-1.14, the name of the element depends on the video device the driver registers with the kernel (video8 in the above example). This changes in GStreamer-1.16 to always be 'v4l2videoconvert'
    535533 * Obtain the name of the element (as it can vary between GStreaqmer-1.14 and GStreamer 1.16)
    536534{{{#!bash
     
    663661 * The CODA960 encoder requires NV12/I420/YV12 YUV pixel formats with rec709 colorimetry
    664662 * The CODA driver requires CMA memory for buffers when it is used. Make sure to provide the kernel with enough CMA memory with the kernel command-line (ie 'cma=64M' for 64MB which should be enough)
    665  * Encoder and Decoder options are exposed through the v4l2 control IDs (CID) and can be listed with the v4l2-ctl -L and v4l2-ctl -l parameters on the devices exposed by the coda driver:
     663 * Encoder and Decoder options are exposed through the v4l2 control IDs (CID) and can be listed with the v4l2-ctl -L and v4l2-ctl -l parameters on the devices exposed by the coda driver
     664 * Often you will need to use the mem2mem v4l2convert driver for format conversions (colorspace, colorimetry) to reconcile the format of the source device and the encoder element - notice the $GST_CONVERT env variable below.
    666665
    667666Examples:
     
    669668{{{#!bash
    670669# stream H264/RTP/UDP
     670GST_CONVERT=$(gst-inspect-1.0 | grep -e "v4l2.*convert*" | sed -e 's/.*:\s*\(v4l2.*convert\):.*/\1/')
    671671gst-launch-1.0 v4l2src device=$DEVICE ! \
    672         v4l2video10convert output-io-mode=dmabuf-import ! \
     672        $GST_CONVERT output-io-mode=dmabuf-import ! \
    673673        v4l2h264enc output-io-mode=dmabuf-import ! \
    674674        rtph264pay ! udpsink host=$SERVER port=$PORT