qsv: Add plugin doc
authorSeungha Yang <seungha@centricular.com>
Fri, 21 Oct 2022 10:08:49 +0000 (19:08 +0900)
committerSeungha Yang <seungha@centricular.com>
Fri, 21 Oct 2022 12:29:25 +0000 (21:29 +0900)
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2738>

subprojects/gst-plugins-bad/docs/plugins/gst_plugins_cache.json
subprojects/gst-plugins-bad/sys/qsv/gstqsvav1enc.cpp
subprojects/gst-plugins-bad/sys/qsv/gstqsvdecoder.cpp
subprojects/gst-plugins-bad/sys/qsv/gstqsvencoder.cpp
subprojects/gst-plugins-bad/sys/qsv/gstqsvh264dec.cpp
subprojects/gst-plugins-bad/sys/qsv/gstqsvh264enc.cpp
subprojects/gst-plugins-bad/sys/qsv/gstqsvh265dec.cpp
subprojects/gst-plugins-bad/sys/qsv/gstqsvh265enc.cpp
subprojects/gst-plugins-bad/sys/qsv/gstqsvjpegenc.cpp
subprojects/gst-plugins-bad/sys/qsv/gstqsvvp9enc.cpp
subprojects/gst-plugins-bad/sys/qsv/plugin.cpp

index 5cca720..be3e06f 100644 (file)
     },
     "qsv": {
         "description": "Intel Quick Sync Video plugin",
-        "elements": {},
+        "elements": {
+            "qsvav1enc": {
+                "author": "Seungha Yang <seungha@centricular.com>",
+                "description": "Intel Quick Sync Video AV1 Encoder",
+                "hierarchy": [
+                    "GstQsvAV1Enc",
+                    "GstQsvEncoder",
+                    "GstVideoEncoder",
+                    "GstElement",
+                    "GstObject",
+                    "GInitiallyUnowned",
+                    "GObject"
+                ],
+                "interfaces": [
+                    "GstPreset"
+                ],
+                "klass": "Codec/Encoder/Video/Hardware",
+                "pad-templates": {
+                    "sink": {
+                        "caps": "video/x-raw(memory:D3D11Memory):\n         format: { NV12, P010_10LE }\n          width: [ 16, 8192 ]\n         height: [ 16, 8192 ]\n\nvideo/x-raw(memory:VAMemory):\n         format: { NV12, P010_10LE }\n          width: [ 16, 8192 ]\n         height: [ 16, 8192 ]\nvideo/x-raw:\n         format: { NV12, P010_10LE }\n          width: [ 16, 8192 ]\n         height: [ 16, 8192 ]\n",
+                        "direction": "sink",
+                        "presence": "always"
+                    },
+                    "src": {
+                        "caps": "video/x-av1:\n          width: [ 16, 8192 ]\n         height: [ 16, 8192 ]\n      alignment: tu\n",
+                        "direction": "src",
+                        "presence": "always"
+                    }
+                },
+                "properties": {
+                    "bitrate": {
+                        "blurb": "Target bitrate in kbit/sec, Ignored when selected rate-control mode is constant QP variants (i.e., \"cqp\" and \"icq\")",
+                        "conditionally-available": false,
+                        "construct": false,
+                        "construct-only": false,
+                        "controllable": false,
+                        "default": "2000",
+                        "max": "65535",
+                        "min": "0",
+                        "mutable": "null",
+                        "readable": true,
+                        "type": "guint",
+                        "writable": true
+                    },
+                    "gop-size": {
+                        "blurb": "Number of pictures within a GOP (0: unspecified)",
+                        "conditionally-available": false,
+                        "construct": false,
+                        "construct-only": false,
+                        "controllable": false,
+                        "default": "0",
+                        "max": "2147483647",
+                        "min": "0",
+                        "mutable": "null",
+                        "readable": true,
+                        "type": "guint",
+                        "writable": true
+                    },
+                    "max-bitrate": {
+                        "blurb": "Maximum bitrate in kbit/sec, Ignored when selected rate-control mode is constant QP variants (i.e., \"cqp\" and \"icq\")",
+                        "conditionally-available": false,
+                        "construct": false,
+                        "construct-only": false,
+                        "controllable": false,
+                        "default": "0",
+                        "max": "65535",
+                        "min": "0",
+                        "mutable": "null",
+                        "readable": true,
+                        "type": "guint",
+                        "writable": true
+                    },
+                    "qp-i": {
+                        "blurb": "Constant quantizer for I frames (0: default)",
+                        "conditionally-available": false,
+                        "construct": false,
+                        "construct-only": false,
+                        "controllable": false,
+                        "default": "0",
+                        "max": "255",
+                        "min": "0",
+                        "mutable": "null",
+                        "readable": true,
+                        "type": "guint",
+                        "writable": true
+                    },
+                    "qp-p": {
+                        "blurb": "Constant quantizer for P frames (0: default)",
+                        "conditionally-available": false,
+                        "construct": false,
+                        "construct-only": false,
+                        "controllable": false,
+                        "default": "0",
+                        "max": "255",
+                        "min": "0",
+                        "mutable": "null",
+                        "readable": true,
+                        "type": "guint",
+                        "writable": true
+                    },
+                    "rate-control": {
+                        "blurb": "Rate Control Method",
+                        "conditionally-available": false,
+                        "construct": false,
+                        "construct-only": false,
+                        "controllable": false,
+                        "default": "vbr (2)",
+                        "mutable": "null",
+                        "readable": true,
+                        "type": "GstQsvAV1EncRateControl",
+                        "writable": true
+                    },
+                    "ref-frames": {
+                        "blurb": "Number of reference frames (0: unspecified)",
+                        "conditionally-available": false,
+                        "construct": false,
+                        "construct-only": false,
+                        "controllable": false,
+                        "default": "1",
+                        "max": "3",
+                        "min": "0",
+                        "mutable": "null",
+                        "readable": true,
+                        "type": "guint",
+                        "writable": true
+                    }
+                },
+                "rank": "none"
+            },
+            "qsvh264dec": {
+                "author": "Seungha Yang <seungha@centricular.com>",
+                "description": "Intel Quick Sync Video H.264 Decoder",
+                "hierarchy": [
+                    "GstQsvH264Dec",
+                    "GstQsvDecoder",
+                    "GstVideoDecoder",
+                    "GstElement",
+                    "GstObject",
+                    "GInitiallyUnowned",
+                    "GObject"
+                ],
+                "klass": "Codec/Decoder/Video/Hardware",
+                "pad-templates": {
+                    "sink": {
+                        "caps": "video/x-h264:\n          width: [ 16, 4096 ]\n         height: [ 16, 4096 ]\n  stream-format: { (string)byte-stream, (string)avc, (string)avc3 }\n      alignment: au\n        profile: { (string)high, (string)progressive-high, (string)constrained-high, (string)main, (string)constrained-baseline, (string)baseline }\n",
+                        "direction": "sink",
+                        "presence": "always"
+                    },
+                    "src": {
+                        "caps": "video/x-raw(memory:D3D11Memory):\n         format: NV12\n          width: [ 16, 4096 ]\n         height: [ 16, 4096 ]\nvideo/x-raw:\n         format: NV12\n          width: [ 16, 4096 ]\n         height: [ 16, 4096 ]\n",
+                        "direction": "src",
+                        "presence": "always"
+                    }
+                },
+                "rank": "marginal"
+            },
+            "qsvh264enc": {
+                "author": "Seungha Yang <seungha@centricular.com>",
+                "description": "Intel Quick Sync Video H.264 Encoder",
+                "hierarchy": [
+                    "GstQsvH264Enc",
+                    "GstQsvEncoder",
+                    "GstVideoEncoder",
+                    "GstElement",
+                    "GstObject",
+                    "GInitiallyUnowned",
+                    "GObject"
+                ],
+                "interfaces": [
+                    "GstPreset"
+                ],
+                "klass": "Codec/Encoder/Video/Hardware",
+                "pad-templates": {
+                    "sink": {
+                        "caps": "video/x-raw(memory:D3D11Memory):\n         format: NV12\n          width: [ 16, 8192 ]\n         height: [ 16, 8192 ]\n\nvideo/x-raw(memory:VAMemory):\n         format: NV12\n          width: [ 16, 8192 ]\n         height: [ 16, 8192 ]\nvideo/x-raw:\n         format: NV12\n          width: [ 16, 8192 ]\n         height: [ 16, 8192 ]\n",
+                        "direction": "sink",
+                        "presence": "always"
+                    },
+                    "src": {
+                        "caps": "video/x-h264:\n          width: [ 16, 8192 ]\n         height: [ 16, 8192 ]\n  stream-format: { (string)avc, (string)byte-stream }\n      alignment: au\n        profile: { (string)high, (string)main, (string)constrained-baseline, (string)progressive-high, (string)constrained-high, (string)baseline }\n",
+                        "direction": "src",
+                        "presence": "always"
+                    }
+                },
+                "properties": {
+                    "avbr-accuracy": {
+                        "blurb": "AVBR Accuracy in the unit of tenth of percent",
+                        "conditionally-available": false,
+                        "construct": false,
+                        "construct-only": false,
+                        "controllable": false,
+                        "default": "0",
+                        "max": "65535",
+                        "min": "0",
+                        "mutable": "null",
+                        "readable": true,
+                        "type": "guint",
+                        "writable": true
+                    },
+                    "avbr-convergence": {
+                        "blurb": "AVBR Convergence in the unit of 100 frames",
+                        "conditionally-available": false,
+                        "construct": false,
+                        "construct-only": false,
+                        "controllable": false,
+                        "default": "0",
+                        "max": "65535",
+                        "min": "0",
+                        "mutable": "null",
+                        "readable": true,
+                        "type": "guint",
+                        "writable": true
+                    },
+                    "b-frames": {
+                        "blurb": "Number of B frames between I and P frames",
+                        "conditionally-available": false,
+                        "construct": false,
+                        "construct-only": false,
+                        "controllable": false,
+                        "default": "0",
+                        "max": "65535",
+                        "min": "0",
+                        "mutable": "null",
+                        "readable": true,
+                        "type": "guint",
+                        "writable": true
+                    },
+                    "bitrate": {
+                        "blurb": "Target bitrate in kbit/sec, Ignored when selected rate-control mode is constant QP variants (i.e., \"cqp\", \"icq\", and \"la_icq\")",
+                        "conditionally-available": false,
+                        "construct": false,
+                        "construct-only": false,
+                        "controllable": false,
+                        "default": "2000",
+                        "max": "2147483647",
+                        "min": "0",
+                        "mutable": "null",
+                        "readable": true,
+                        "type": "guint",
+                        "writable": true
+                    },
+                    "cabac": {
+                        "blurb": "Enables CABAC entropy coding",
+                        "conditionally-available": false,
+                        "construct": false,
+                        "construct-only": false,
+                        "controllable": false,
+                        "default": "unknown (0)",
+                        "mutable": "null",
+                        "readable": true,
+                        "type": "GstQsvCodingOption",
+                        "writable": true
+                    },
+                    "cc-insert": {
+                        "blurb": "Closed Caption Insert mode. Only CEA-708 RAW format is supported for now",
+                        "conditionally-available": false,
+                        "construct": false,
+                        "construct-only": false,
+                        "controllable": false,
+                        "default": "insert (0)",
+                        "mutable": "null",
+                        "readable": true,
+                        "type": "GstQsvH264EncSeiInsertMode",
+                        "writable": true
+                    },
+                    "disable-hrd-conformance": {
+                        "blurb": "Allow NAL HRD non-conformant stream",
+                        "conditionally-available": false,
+                        "construct": false,
+                        "construct-only": false,
+                        "controllable": false,
+                        "default": "false",
+                        "mutable": "null",
+                        "readable": true,
+                        "type": "gboolean",
+                        "writable": true
+                    },
+                    "gop-size": {
+                        "blurb": "Number of pictures within a GOP (0: unspecified)",
+                        "conditionally-available": false,
+                        "construct": false,
+                        "construct-only": false,
+                        "controllable": false,
+                        "default": "30",
+                        "max": "65535",
+                        "min": "0",
+                        "mutable": "null",
+                        "readable": true,
+                        "type": "guint",
+                        "writable": true
+                    },
+                    "icq-quality": {
+                        "blurb": "Intelligent Constant Quality for \"icq\" rate-control (0: default)",
+                        "conditionally-available": false,
+                        "construct": false,
+                        "construct-only": false,
+                        "controllable": false,
+                        "default": "0",
+                        "max": "51",
+                        "min": "0",
+                        "mutable": "null",
+                        "readable": true,
+                        "type": "guint",
+                        "writable": true
+                    },
+                    "idr-interval": {
+                        "blurb": "IDR-frame interval in terms of I-frames. 0: every I-frame is an IDR frame, N: \"N\" I-frames are inserted between IDR-frames",
+                        "conditionally-available": false,
+                        "construct": false,
+                        "construct-only": false,
+                        "controllable": false,
+                        "default": "0",
+                        "max": "65535",
+                        "min": "0",
+                        "mutable": "null",
+                        "readable": true,
+                        "type": "guint",
+                        "writable": true
+                    },
+                    "max-bitrate": {
+                        "blurb": "Maximum bitrate in kbit/sec, Ignored when selected rate-control mode is constant QP variants (i.e., \"cqp\", \"icq\", and \"la_icq\")",
+                        "conditionally-available": false,
+                        "construct": false,
+                        "construct-only": false,
+                        "controllable": false,
+                        "default": "0",
+                        "max": "2147483647",
+                        "min": "0",
+                        "mutable": "null",
+                        "readable": true,
+                        "type": "guint",
+                        "writable": true
+                    },
+                    "max-qp-b": {
+                        "blurb": "Maximum allowed QP value for B-frame types (0: default)",
+                        "conditionally-available": false,
+                        "construct": false,
+                        "construct-only": false,
+                        "controllable": false,
+                        "default": "0",
+                        "max": "51",
+                        "min": "0",
+                        "mutable": "null",
+                        "readable": true,
+                        "type": "guint",
+                        "writable": true
+                    },
+                    "max-qp-i": {
+                        "blurb": "Maximum allowed QP value for I-frame types (0: default)",
+                        "conditionally-available": false,
+                        "construct": false,
+                        "construct-only": false,
+                        "controllable": false,
+                        "default": "0",
+                        "max": "51",
+                        "min": "0",
+                        "mutable": "null",
+                        "readable": true,
+                        "type": "guint",
+                        "writable": true
+                    },
+                    "max-qp-p": {
+                        "blurb": "Maximum allowed QP value for P-frame types (0: default)",
+                        "conditionally-available": false,
+                        "construct": false,
+                        "construct-only": false,
+                        "controllable": false,
+                        "default": "0",
+                        "max": "51",
+                        "min": "0",
+                        "mutable": "null",
+                        "readable": true,
+                        "type": "guint",
+                        "writable": true
+                    },
+                    "min-qp-b": {
+                        "blurb": "Minimum allowed QP value for B-frame types (0: default)",
+                        "conditionally-available": false,
+                        "construct": false,
+                        "construct-only": false,
+                        "controllable": false,
+                        "default": "0",
+                        "max": "51",
+                        "min": "0",
+                        "mutable": "null",
+                        "readable": true,
+                        "type": "guint",
+                        "writable": true
+                    },
+                    "min-qp-i": {
+                        "blurb": "Minimum allowed QP value for I-frame types (0: default)",
+                        "conditionally-available": false,
+                        "construct": false,
+                        "construct-only": false,
+                        "controllable": false,
+                        "default": "0",
+                        "max": "51",
+                        "min": "0",
+                        "mutable": "null",
+                        "readable": true,
+                        "type": "guint",
+                        "writable": true
+                    },
+                    "min-qp-p": {
+                        "blurb": "Minimum allowed QP value for P-frame types (0: default)",
+                        "conditionally-available": false,
+                        "construct": false,
+                        "construct-only": false,
+                        "controllable": false,
+                        "default": "0",
+                        "max": "51",
+                        "min": "0",
+                        "mutable": "null",
+                        "readable": true,
+                        "type": "guint",
+                        "writable": true
+                    },
+                    "qp-b": {
+                        "blurb": "Constant quantizer for B frames (0: default)",
+                        "conditionally-available": false,
+                        "construct": false,
+                        "construct-only": false,
+                        "controllable": false,
+                        "default": "0",
+                        "max": "51",
+                        "min": "0",
+                        "mutable": "null",
+                        "readable": true,
+                        "type": "guint",
+                        "writable": true
+                    },
+                    "qp-i": {
+                        "blurb": "Constant quantizer for I frames (0: default)",
+                        "conditionally-available": false,
+                        "construct": false,
+                        "construct-only": false,
+                        "controllable": false,
+                        "default": "0",
+                        "max": "51",
+                        "min": "0",
+                        "mutable": "null",
+                        "readable": true,
+                        "type": "guint",
+                        "writable": true
+                    },
+                    "qp-p": {
+                        "blurb": "Constant quantizer for P frames (0: default)",
+                        "conditionally-available": false,
+                        "construct": false,
+                        "construct-only": false,
+                        "controllable": false,
+                        "default": "0",
+                        "max": "51",
+                        "min": "0",
+                        "mutable": "null",
+                        "readable": true,
+                        "type": "guint",
+                        "writable": true
+                    },
+                    "qvbr-quality": {
+                        "blurb": "Quality level used for \"qvbr\" rate-control mode (0: default)",
+                        "conditionally-available": false,
+                        "construct": false,
+                        "construct-only": false,
+                        "controllable": false,
+                        "default": "0",
+                        "max": "51",
+                        "min": "0",
+                        "mutable": "null",
+                        "readable": true,
+                        "type": "guint",
+                        "writable": true
+                    },
+                    "rate-control": {
+                        "blurb": "Rate Control Method",
+                        "conditionally-available": false,
+                        "construct": false,
+                        "construct-only": false,
+                        "controllable": false,
+                        "default": "vbr (2)",
+                        "mutable": "null",
+                        "readable": true,
+                        "type": "GstQsvH264EncRateControl",
+                        "writable": true
+                    },
+                    "rc-lookahead": {
+                        "blurb": "Number of frames to look ahead for Rate Control, used for \"la_vbr\", \"la_icq\", and \"la_hrd\" rate-control modes",
+                        "conditionally-available": false,
+                        "construct": false,
+                        "construct-only": false,
+                        "controllable": false,
+                        "default": "10",
+                        "max": "100",
+                        "min": "10",
+                        "mutable": "null",
+                        "readable": true,
+                        "type": "guint",
+                        "writable": true
+                    },
+                    "rc-lookahead-ds": {
+                        "blurb": "Downsampling method in look-ahead rate control",
+                        "conditionally-available": false,
+                        "construct": false,
+                        "construct-only": false,
+                        "controllable": false,
+                        "default": "unknown (0)",
+                        "mutable": "null",
+                        "readable": true,
+                        "type": "GstQsvH264EncRCLookAheadDS",
+                        "writable": true
+                    },
+                    "ref-frames": {
+                        "blurb": "Number of reference frames (0: unspecified)",
+                        "conditionally-available": false,
+                        "construct": false,
+                        "construct-only": false,
+                        "controllable": false,
+                        "default": "2",
+                        "max": "16",
+                        "min": "0",
+                        "mutable": "null",
+                        "readable": true,
+                        "type": "guint",
+                        "writable": true
+                    }
+                },
+                "rank": "none"
+            },
+            "qsvh265dec": {
+                "author": "Seungha Yang <seungha@centricular.com>",
+                "description": "Intel Quick Sync Video H.265 Decoder",
+                "hierarchy": [
+                    "GstQsvH265Dec",
+                    "GstQsvDecoder",
+                    "GstVideoDecoder",
+                    "GstElement",
+                    "GstObject",
+                    "GInitiallyUnowned",
+                    "GObject"
+                ],
+                "klass": "Codec/Decoder/Video/Hardware",
+                "pad-templates": {
+                    "sink": {
+                        "caps": "video/x-h265:\n          width: [ 16, 8192 ]\n         height: [ 16, 8192 ]\n  stream-format: { (string)byte-stream, (string)hev1, (string)hvc1 }\n      alignment: au\n        profile: { (string)main, (string)main-10 }\n",
+                        "direction": "sink",
+                        "presence": "always"
+                    },
+                    "src": {
+                        "caps": "video/x-raw(memory:D3D11Memory):\n         format: NV12\n          width: [ 16, 8192 ]\n         height: [ 16, 8192 ]\nvideo/x-raw:\n         format: NV12\n          width: [ 16, 8192 ]\n         height: [ 16, 8192 ]\n",
+                        "direction": "src",
+                        "presence": "always"
+                    }
+                },
+                "rank": "marginal"
+            },
+            "qsvh265enc": {
+                "author": "Seungha Yang <seungha@centricular.com>",
+                "description": "Intel Quick Sync Video H.265 Encoder",
+                "hierarchy": [
+                    "GstQsvH265Enc",
+                    "GstQsvEncoder",
+                    "GstVideoEncoder",
+                    "GstElement",
+                    "GstObject",
+                    "GInitiallyUnowned",
+                    "GObject"
+                ],
+                "interfaces": [
+                    "GstPreset"
+                ],
+                "klass": "Codec/Encoder/Video/Hardware",
+                "pad-templates": {
+                    "sink": {
+                        "caps": "video/x-raw(memory:D3D11Memory):\n         format: { NV12, P010_10LE }\n          width: [ 16, 8192 ]\n         height: [ 16, 8192 ]\n\nvideo/x-raw(memory:VAMemory):\n         format: { NV12, P010_10LE }\n          width: [ 16, 8192 ]\n         height: [ 16, 8192 ]\nvideo/x-raw:\n         format: { NV12, P010_10LE }\n          width: [ 16, 8192 ]\n         height: [ 16, 8192 ]\n",
+                        "direction": "sink",
+                        "presence": "always"
+                    },
+                    "src": {
+                        "caps": "video/x-h265:\n          width: [ 16, 8192 ]\n         height: [ 16, 8192 ]\n  stream-format: byte-stream\n      alignment: au\n        profile: { (string)main, (string)main-10 }\n",
+                        "direction": "src",
+                        "presence": "always"
+                    }
+                },
+                "properties": {
+                    "b-frames": {
+                        "blurb": "Number of B frames between I and P frames",
+                        "conditionally-available": false,
+                        "construct": false,
+                        "construct-only": false,
+                        "controllable": false,
+                        "default": "0",
+                        "max": "65535",
+                        "min": "0",
+                        "mutable": "null",
+                        "readable": true,
+                        "type": "guint",
+                        "writable": true
+                    },
+                    "bitrate": {
+                        "blurb": "Target bitrate in kbit/sec, Ignored when selected rate-control mode is constant QP variants (i.e., \"cqp\" and \"icq\")",
+                        "conditionally-available": false,
+                        "construct": false,
+                        "construct-only": false,
+                        "controllable": false,
+                        "default": "2000",
+                        "max": "2147483647",
+                        "min": "0",
+                        "mutable": "null",
+                        "readable": true,
+                        "type": "guint",
+                        "writable": true
+                    },
+                    "cc-insert": {
+                        "blurb": "Closed Caption Insert mode. Only CEA-708 RAW format is supported for now",
+                        "conditionally-available": false,
+                        "construct": false,
+                        "construct-only": false,
+                        "controllable": false,
+                        "default": "insert (0)",
+                        "mutable": "null",
+                        "readable": true,
+                        "type": "GstQsvH265EncSeiInsertMode",
+                        "writable": true
+                    },
+                    "disable-hrd-conformance": {
+                        "blurb": "Allow NAL HRD non-conformant stream",
+                        "conditionally-available": false,
+                        "construct": false,
+                        "construct-only": false,
+                        "controllable": false,
+                        "default": "false",
+                        "mutable": "null",
+                        "readable": true,
+                        "type": "gboolean",
+                        "writable": true
+                    },
+                    "gop-size": {
+                        "blurb": "Number of pictures within a GOP (0: unspecified)",
+                        "conditionally-available": false,
+                        "construct": false,
+                        "construct-only": false,
+                        "controllable": false,
+                        "default": "30",
+                        "max": "65535",
+                        "min": "0",
+                        "mutable": "null",
+                        "readable": true,
+                        "type": "guint",
+                        "writable": true
+                    },
+                    "icq-quality": {
+                        "blurb": "Intelligent Constant Quality for \"icq\" rate-control (0: default)",
+                        "conditionally-available": false,
+                        "construct": false,
+                        "construct-only": false,
+                        "controllable": false,
+                        "default": "0",
+                        "max": "51",
+                        "min": "0",
+                        "mutable": "null",
+                        "readable": true,
+                        "type": "guint",
+                        "writable": true
+                    },
+                    "idr-interval": {
+                        "blurb": "IDR-frame interval in terms of I-frames. 0: only first I-frame is is an IDR frame, 1: every I-frame is an IDR frame, N: \"N - 1\" I-frames are inserted between IDR-frames",
+                        "conditionally-available": false,
+                        "construct": false,
+                        "construct-only": false,
+                        "controllable": false,
+                        "default": "1",
+                        "max": "65535",
+                        "min": "0",
+                        "mutable": "null",
+                        "readable": true,
+                        "type": "guint",
+                        "writable": true
+                    },
+                    "max-bitrate": {
+                        "blurb": "Maximum bitrate in kbit/sec, Ignored when selected rate-control mode is constant QP variants (i.e., \"cqp\" and \"icq\")",
+                        "conditionally-available": false,
+                        "construct": false,
+                        "construct-only": false,
+                        "controllable": false,
+                        "default": "0",
+                        "max": "2147483647",
+                        "min": "0",
+                        "mutable": "null",
+                        "readable": true,
+                        "type": "guint",
+                        "writable": true
+                    },
+                    "max-qp-b": {
+                        "blurb": "Maximum allowed QP value for B-frame types (0: default)",
+                        "conditionally-available": false,
+                        "construct": false,
+                        "construct-only": false,
+                        "controllable": false,
+                        "default": "0",
+                        "max": "51",
+                        "min": "0",
+                        "mutable": "null",
+                        "readable": true,
+                        "type": "guint",
+                        "writable": true
+                    },
+                    "max-qp-i": {
+                        "blurb": "Maximum allowed QP value for I-frame types (0: default)",
+                        "conditionally-available": false,
+                        "construct": false,
+                        "construct-only": false,
+                        "controllable": false,
+                        "default": "0",
+                        "max": "51",
+                        "min": "0",
+                        "mutable": "null",
+                        "readable": true,
+                        "type": "guint",
+                        "writable": true
+                    },
+                    "max-qp-p": {
+                        "blurb": "Maximum allowed QP value for P-frame types (0: default)",
+                        "conditionally-available": false,
+                        "construct": false,
+                        "construct-only": false,
+                        "controllable": false,
+                        "default": "0",
+                        "max": "51",
+                        "min": "0",
+                        "mutable": "null",
+                        "readable": true,
+                        "type": "guint",
+                        "writable": true
+                    },
+                    "min-qp-b": {
+                        "blurb": "Minimum allowed QP value for B-frame types (0: default)",
+                        "conditionally-available": false,
+                        "construct": false,
+                        "construct-only": false,
+                        "controllable": false,
+                        "default": "0",
+                        "max": "51",
+                        "min": "0",
+                        "mutable": "null",
+                        "readable": true,
+                        "type": "guint",
+                        "writable": true
+                    },
+                    "min-qp-i": {
+                        "blurb": "Minimum allowed QP value for I-frame types (0: default)",
+                        "conditionally-available": false,
+                        "construct": false,
+                        "construct-only": false,
+                        "controllable": false,
+                        "default": "0",
+                        "max": "51",
+                        "min": "0",
+                        "mutable": "null",
+                        "readable": true,
+                        "type": "guint",
+                        "writable": true
+                    },
+                    "min-qp-p": {
+                        "blurb": "Minimum allowed QP value for P-frame types (0: default)",
+                        "conditionally-available": false,
+                        "construct": false,
+                        "construct-only": false,
+                        "controllable": false,
+                        "default": "0",
+                        "max": "51",
+                        "min": "0",
+                        "mutable": "null",
+                        "readable": true,
+                        "type": "guint",
+                        "writable": true
+                    },
+                    "qp-b": {
+                        "blurb": "Constant quantizer for B frames (0: default)",
+                        "conditionally-available": false,
+                        "construct": false,
+                        "construct-only": false,
+                        "controllable": false,
+                        "default": "0",
+                        "max": "51",
+                        "min": "0",
+                        "mutable": "null",
+                        "readable": true,
+                        "type": "guint",
+                        "writable": true
+                    },
+                    "qp-i": {
+                        "blurb": "Constant quantizer for I frames (0: default)",
+                        "conditionally-available": false,
+                        "construct": false,
+                        "construct-only": false,
+                        "controllable": false,
+                        "default": "0",
+                        "max": "51",
+                        "min": "0",
+                        "mutable": "null",
+                        "readable": true,
+                        "type": "guint",
+                        "writable": true
+                    },
+                    "qp-p": {
+                        "blurb": "Constant quantizer for P frames (0: default)",
+                        "conditionally-available": false,
+                        "construct": false,
+                        "construct-only": false,
+                        "controllable": false,
+                        "default": "0",
+                        "max": "51",
+                        "min": "0",
+                        "mutable": "null",
+                        "readable": true,
+                        "type": "guint",
+                        "writable": true
+                    },
+                    "qvbr-quality": {
+                        "blurb": "Quality level used for \"qvbr\" rate-control mode (0: default)",
+                        "conditionally-available": false,
+                        "construct": false,
+                        "construct-only": false,
+                        "controllable": false,
+                        "default": "0",
+                        "max": "51",
+                        "min": "0",
+                        "mutable": "null",
+                        "readable": true,
+                        "type": "guint",
+                        "writable": true
+                    },
+                    "rate-control": {
+                        "blurb": "Rate Control Method",
+                        "conditionally-available": false,
+                        "construct": false,
+                        "construct-only": false,
+                        "controllable": false,
+                        "default": "vbr (2)",
+                        "mutable": "null",
+                        "readable": true,
+                        "type": "GstQsvH265EncRateControl",
+                        "writable": true
+                    },
+                    "ref-frames": {
+                        "blurb": "Number of reference frames (0: unspecified)",
+                        "conditionally-available": false,
+                        "construct": false,
+                        "construct-only": false,
+                        "controllable": false,
+                        "default": "2",
+                        "max": "16",
+                        "min": "0",
+                        "mutable": "null",
+                        "readable": true,
+                        "type": "guint",
+                        "writable": true
+                    }
+                },
+                "rank": "none"
+            },
+            "qsvjpegenc": {
+                "author": "Seungha Yang <seungha@centricular.com>",
+                "description": "Intel Quick Sync Video JPEG Encoder",
+                "hierarchy": [
+                    "GstQsvJpegEnc",
+                    "GstQsvEncoder",
+                    "GstVideoEncoder",
+                    "GstElement",
+                    "GstObject",
+                    "GInitiallyUnowned",
+                    "GObject"
+                ],
+                "interfaces": [
+                    "GstPreset"
+                ],
+                "klass": "Codec/Encoder/Video/Hardware",
+                "pad-templates": {
+                    "sink": {
+                        "caps": "video/x-raw(memory:D3D11Memory):\n         format: { NV12, BGRA }\n          width: [ 16, 8192 ]\n         height: [ 16, 8192 ]\n\nvideo/x-raw(memory:VAMemory):\n         format: { NV12, BGRA }\n          width: [ 16, 8192 ]\n         height: [ 16, 8192 ]\nvideo/x-raw:\n         format: { NV12, BGRA }\n          width: [ 16, 8192 ]\n         height: [ 16, 8192 ]\n",
+                        "direction": "sink",
+                        "presence": "always"
+                    },
+                    "src": {
+                        "caps": "image/jpeg:\n          width: [ 16, 8192 ]\n         height: [ 16, 8192 ]\n",
+                        "direction": "src",
+                        "presence": "always"
+                    }
+                },
+                "properties": {
+                    "quality": {
+                        "blurb": "Encoding quality, 100 for best quality",
+                        "conditionally-available": false,
+                        "construct": false,
+                        "construct-only": false,
+                        "controllable": false,
+                        "default": "85",
+                        "max": "100",
+                        "min": "1",
+                        "mutable": "null",
+                        "readable": true,
+                        "type": "guint",
+                        "writable": true
+                    }
+                },
+                "rank": "none"
+            },
+            "qsvvp9enc": {
+                "author": "Seungha Yang <seungha@centricular.com>",
+                "description": "Intel Quick Sync Video VP9 Encoder",
+                "hierarchy": [
+                    "GstQsvVP9Enc",
+                    "GstQsvEncoder",
+                    "GstVideoEncoder",
+                    "GstElement",
+                    "GstObject",
+                    "GInitiallyUnowned",
+                    "GObject"
+                ],
+                "interfaces": [
+                    "GstPreset"
+                ],
+                "klass": "Codec/Encoder/Video/Hardware",
+                "pad-templates": {
+                    "sink": {
+                        "caps": "video/x-raw(memory:D3D11Memory):\n         format: { NV12, P010_10LE, VUYA, Y410 }\n          width: [ 16, 8192 ]\n         height: [ 16, 8192 ]\n\nvideo/x-raw(memory:VAMemory):\n         format: { NV12, P010_10LE, VUYA, Y410 }\n          width: [ 16, 8192 ]\n         height: [ 16, 8192 ]\nvideo/x-raw:\n         format: { NV12, P010_10LE, VUYA, Y410 }\n          width: [ 16, 8192 ]\n         height: [ 16, 8192 ]\n",
+                        "direction": "sink",
+                        "presence": "always"
+                    },
+                    "src": {
+                        "caps": "video/x-vp9:\n          width: [ 16, 8192 ]\n         height: [ 16, 8192 ]\n        profile: { (string)0, (string)2, (string)1, (string)3 }\n",
+                        "direction": "src",
+                        "presence": "always"
+                    }
+                },
+                "properties": {
+                    "bitrate": {
+                        "blurb": "Target bitrate in kbit/sec, Ignored when selected rate-control mode is constant QP variants (i.e., \"cqp\" and \"icq\")",
+                        "conditionally-available": false,
+                        "construct": false,
+                        "construct-only": false,
+                        "controllable": false,
+                        "default": "2000",
+                        "max": "65535",
+                        "min": "0",
+                        "mutable": "null",
+                        "readable": true,
+                        "type": "guint",
+                        "writable": true
+                    },
+                    "gop-size": {
+                        "blurb": "Number of pictures within a GOP (0: unspecified)",
+                        "conditionally-available": false,
+                        "construct": false,
+                        "construct-only": false,
+                        "controllable": false,
+                        "default": "0",
+                        "max": "2147483647",
+                        "min": "0",
+                        "mutable": "null",
+                        "readable": true,
+                        "type": "guint",
+                        "writable": true
+                    },
+                    "icq-quality": {
+                        "blurb": "Intelligent Constant Quality for \"icq\" rate-control (0: default)",
+                        "conditionally-available": false,
+                        "construct": false,
+                        "construct-only": false,
+                        "controllable": false,
+                        "default": "0",
+                        "max": "255",
+                        "min": "0",
+                        "mutable": "null",
+                        "readable": true,
+                        "type": "guint",
+                        "writable": true
+                    },
+                    "max-bitrate": {
+                        "blurb": "Maximum bitrate in kbit/sec, Ignored when selected rate-control mode is constant QP variants (i.e., \"cqp\" and \"icq\")",
+                        "conditionally-available": false,
+                        "construct": false,
+                        "construct-only": false,
+                        "controllable": false,
+                        "default": "0",
+                        "max": "65535",
+                        "min": "0",
+                        "mutable": "null",
+                        "readable": true,
+                        "type": "guint",
+                        "writable": true
+                    },
+                    "qp-i": {
+                        "blurb": "Constant quantizer for I frames (0: default)",
+                        "conditionally-available": false,
+                        "construct": false,
+                        "construct-only": false,
+                        "controllable": false,
+                        "default": "0",
+                        "max": "255",
+                        "min": "0",
+                        "mutable": "null",
+                        "readable": true,
+                        "type": "guint",
+                        "writable": true
+                    },
+                    "qp-p": {
+                        "blurb": "Constant quantizer for P frames (0: default)",
+                        "conditionally-available": false,
+                        "construct": false,
+                        "construct-only": false,
+                        "controllable": false,
+                        "default": "0",
+                        "max": "255",
+                        "min": "0",
+                        "mutable": "null",
+                        "readable": true,
+                        "type": "guint",
+                        "writable": true
+                    },
+                    "rate-control": {
+                        "blurb": "Rate Control Method",
+                        "conditionally-available": false,
+                        "construct": false,
+                        "construct-only": false,
+                        "controllable": false,
+                        "default": "vbr (2)",
+                        "mutable": "null",
+                        "readable": true,
+                        "type": "GstQsvVP9EncRateControl",
+                        "writable": true
+                    },
+                    "ref-frames": {
+                        "blurb": "Number of reference frames (0: unspecified)",
+                        "conditionally-available": false,
+                        "construct": false,
+                        "construct-only": false,
+                        "controllable": false,
+                        "default": "1",
+                        "max": "3",
+                        "min": "0",
+                        "mutable": "null",
+                        "readable": true,
+                        "type": "guint",
+                        "writable": true
+                    }
+                },
+                "rank": "none"
+            }
+        },
         "filename": "gstqsv",
         "license": "LGPL",
-        "other-types": {},
+        "other-types": {
+            "GstQsvAV1EncRateControl": {
+                "kind": "enum",
+                "values": [
+                    {
+                        "desc": "Constant Bitrate",
+                        "name": "cbr",
+                        "value": "1"
+                    },
+                    {
+                        "desc": "Variable Bitrate",
+                        "name": "vbr",
+                        "value": "2"
+                    },
+                    {
+                        "desc": "Constant Quantizer",
+                        "name": "cqp",
+                        "value": "3"
+                    }
+                ]
+            },
+            "GstQsvCodingOption": {
+                "kind": "enum",
+                "values": [
+                    {
+                        "desc": "Unknown",
+                        "name": "unknown",
+                        "value": "0"
+                    },
+                    {
+                        "desc": "On",
+                        "name": "on",
+                        "value": "16"
+                    },
+                    {
+                        "desc": "Off",
+                        "name": "off",
+                        "value": "32"
+                    }
+                ]
+            },
+            "GstQsvDecoder": {
+                "hierarchy": [
+                    "GstQsvDecoder",
+                    "GstVideoDecoder",
+                    "GstElement",
+                    "GstObject",
+                    "GInitiallyUnowned",
+                    "GObject"
+                ],
+                "kind": "object",
+                "properties": {
+                    "adapter-luid": {
+                        "blurb": "DXGI Adapter LUID (Locally Unique Identifier) of created device",
+                        "conditionally-available": true,
+                        "construct": false,
+                        "construct-only": false,
+                        "controllable": false,
+                        "default": "73102",
+                        "max": "9223372036854775807",
+                        "min": "-9223372036854775808",
+                        "mutable": "null",
+                        "readable": true,
+                        "type": "gint64",
+                        "writable": false
+                    }
+                }
+            },
+            "GstQsvEncoder": {
+                "hierarchy": [
+                    "GstQsvEncoder",
+                    "GstVideoEncoder",
+                    "GstElement",
+                    "GstObject",
+                    "GInitiallyUnowned",
+                    "GObject"
+                ],
+                "interfaces": [
+                    "GstPreset"
+                ],
+                "kind": "object",
+                "properties": {
+                    "adapter-luid": {
+                        "blurb": "DXGI Adapter LUID (Locally Unique Identifier) of created device",
+                        "conditionally-available": true,
+                        "construct": false,
+                        "construct-only": false,
+                        "controllable": false,
+                        "default": "73102",
+                        "max": "9223372036854775807",
+                        "min": "-9223372036854775808",
+                        "mutable": "null",
+                        "readable": true,
+                        "type": "gint64",
+                        "writable": false
+                    },
+                    "low-latency": {
+                        "blurb": "Enables low-latency encoding",
+                        "conditionally-available": false,
+                        "construct": false,
+                        "construct-only": false,
+                        "controllable": false,
+                        "default": "false",
+                        "mutable": "null",
+                        "readable": true,
+                        "type": "gboolean",
+                        "writable": true
+                    },
+                    "target-usage": {
+                        "blurb": "1: Best quality, 4: Balanced, 7: Best speed",
+                        "conditionally-available": false,
+                        "construct": false,
+                        "construct-only": false,
+                        "controllable": false,
+                        "default": "4",
+                        "max": "7",
+                        "min": "1",
+                        "mutable": "null",
+                        "readable": true,
+                        "type": "guint",
+                        "writable": true
+                    }
+                }
+            },
+            "GstQsvH264EncRCLookAheadDS": {
+                "kind": "enum",
+                "values": [
+                    {
+                        "desc": "Unknown",
+                        "name": "unknown",
+                        "value": "0"
+                    },
+                    {
+                        "desc": "Do not use down sampling",
+                        "name": "off",
+                        "value": "1"
+                    },
+                    {
+                        "desc": "Down sample frames two times before estimation",
+                        "name": "2x",
+                        "value": "2"
+                    },
+                    {
+                        "desc": "Down sample frames four times before estimation",
+                        "name": "4x",
+                        "value": "3"
+                    }
+                ]
+            },
+            "GstQsvH264EncRateControl": {
+                "kind": "enum",
+                "values": [
+                    {
+                        "desc": "Constant Bitrate",
+                        "name": "cbr",
+                        "value": "1"
+                    },
+                    {
+                        "desc": "Variable Bitrate",
+                        "name": "vbr",
+                        "value": "2"
+                    },
+                    {
+                        "desc": "Constant Quantizer",
+                        "name": "cqp",
+                        "value": "3"
+                    },
+                    {
+                        "desc": "Average Variable Bitrate",
+                        "name": "avbr",
+                        "value": "4"
+                    },
+                    {
+                        "desc": "VBR with look ahead (Non HRD compliant)",
+                        "name": "la-vbr",
+                        "value": "8"
+                    },
+                    {
+                        "desc": "Intelligent CQP",
+                        "name": "icq",
+                        "value": "9"
+                    },
+                    {
+                        "desc": "Video Conferencing Mode (Non HRD compliant)",
+                        "name": "vcm",
+                        "value": "10"
+                    },
+                    {
+                        "desc": "Intelligent CQP with LA (Non HRD compliant)",
+                        "name": "la-icq",
+                        "value": "11"
+                    },
+                    {
+                        "desc": "HRD compliant LA",
+                        "name": "la-hrd",
+                        "value": "13"
+                    },
+                    {
+                        "desc": "VBR with CQP",
+                        "name": "qvbr",
+                        "value": "14"
+                    }
+                ]
+            },
+            "GstQsvH264EncSeiInsertMode": {
+                "kind": "enum",
+                "values": [
+                    {
+                        "desc": "Insert SEI",
+                        "name": "insert",
+                        "value": "0"
+                    },
+                    {
+                        "desc": "Insert SEI and remove corresponding meta from output buffer",
+                        "name": "insert-and-drop",
+                        "value": "1"
+                    },
+                    {
+                        "desc": "Disable SEI insertion",
+                        "name": "disabled",
+                        "value": "2"
+                    }
+                ]
+            },
+            "GstQsvH265EncRateControl": {
+                "kind": "enum",
+                "values": [
+                    {
+                        "desc": "Constant Bitrate",
+                        "name": "cbr",
+                        "value": "1"
+                    },
+                    {
+                        "desc": "Variable Bitrate",
+                        "name": "vbr",
+                        "value": "2"
+                    },
+                    {
+                        "desc": "Constant Quantizer",
+                        "name": "cqp",
+                        "value": "3"
+                    },
+                    {
+                        "desc": "Intelligent CQP",
+                        "name": "icq",
+                        "value": "9"
+                    },
+                    {
+                        "desc": "Video Conferencing Mode (Non HRD compliant)",
+                        "name": "vcm",
+                        "value": "10"
+                    },
+                    {
+                        "desc": "VBR with CQP",
+                        "name": "qvbr",
+                        "value": "14"
+                    }
+                ]
+            },
+            "GstQsvH265EncSeiInsertMode": {
+                "kind": "enum",
+                "values": [
+                    {
+                        "desc": "Insert SEI",
+                        "name": "insert",
+                        "value": "0"
+                    },
+                    {
+                        "desc": "Insert SEI and remove corresponding meta from output buffer",
+                        "name": "insert-and-drop",
+                        "value": "1"
+                    },
+                    {
+                        "desc": "Disable SEI insertion",
+                        "name": "disabled",
+                        "value": "2"
+                    }
+                ]
+            },
+            "GstQsvVP9EncRateControl": {
+                "kind": "enum",
+                "values": [
+                    {
+                        "desc": "Constant Bitrate",
+                        "name": "cbr",
+                        "value": "1"
+                    },
+                    {
+                        "desc": "Variable Bitrate",
+                        "name": "vbr",
+                        "value": "2"
+                    },
+                    {
+                        "desc": "Constant Quantizer",
+                        "name": "cqp",
+                        "value": "3"
+                    },
+                    {
+                        "desc": "Intelligent CQP",
+                        "name": "icq",
+                        "value": "9"
+                    }
+                ]
+            }
+        },
         "package": "GStreamer Bad Plug-ins",
         "source": "gst-plugins-bad",
         "tracers": {},
index d0ec57c..9e44c1a 100644 (file)
  * Boston, MA 02110-1301, USA.
  */
 
+/**
+ * SECTION:element-qsvav1enc
+ * @title: qsvav1enc
+ *
+ * Intel Quick Sync AV1 encoder
+ *
+ * ## Example launch line
+ * ```
+ * gst-launch-1.0 videotestsrc ! qsvav1enc ! av1parse ! matroskamux ! filesink location=out.mkv
+ * ```
+ *
+ * Since: 1.22
+ */
+
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 GST_DEBUG_CATEGORY_STATIC (gst_qsv_av1_enc_debug);
 #define GST_CAT_DEFAULT gst_qsv_av1_enc_debug
 
+/**
+ * GstQsvAV1EncRateControl:
+ *
+ * Since: 1.22
+ */
 #define GST_TYPE_QSV_AV1_ENC_RATE_CONTROL (gst_qsv_av1_enc_rate_control_get_type ())
 static GType
 gst_qsv_av1_enc_rate_control_get_type (void)
 {
   static GType rate_control_type = 0;
   static const GEnumValue rate_controls[] = {
+    /**
+     * GstQsvAV1EncRateControl::cbr:
+     *
+     * Since: 1.22
+     */
     {MFX_RATECONTROL_CBR, "Constant Bitrate", "cbr"},
+
+    /**
+     * GstQsvAV1EncRateControl::vbr:
+     *
+     * Since: 1.22
+     */
     {MFX_RATECONTROL_VBR, "Variable Bitrate", "vbr"},
+
+    /**
+     * GstQsvAV1EncRateControl::cqp:
+     *
+     * Since: 1.22
+     */
     {MFX_RATECONTROL_CQP, "Constant Quantizer", "cqp"},
     {0, nullptr, nullptr}
   };
@@ -75,6 +111,19 @@ enum
 #define DEFAULT_MAX_BITRATE 0
 #define DEFAULT_RATE_CONTROL MFX_RATECONTROL_VBR
 
+#define DOC_SINK_CAPS_COMM \
+    "format = (string) { NV12, P010_10LE }, " \
+    "width = (int) [ 16, 8192 ], height = (int) [16, 8192 ]"
+
+#define DOC_SINK_CAPS \
+    "video/x-raw(memory:D3D11Memory), " DOC_SINK_CAPS_COMM "; " \
+    "video/x-raw(memory:VAMemory), " DOC_SINK_CAPS_COMM "; " \
+    "video/x-raw, " DOC_SINK_CAPS_COMM
+
+#define DOC_SRC_CAPS \
+    "video/x-av1, width = (int) [ 16, 8192 ], height = (int) [ 16, 8192 ], " \
+    "alignment = (string) tu"
+
 typedef struct _GstQsvAV1EncClassData
 {
   GstCaps *sink_caps;
@@ -140,6 +189,8 @@ gst_qsv_av1_enc_class_init (GstQsvAV1EncClass * klass, gpointer data)
   GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
   GstQsvEncoderClass *qsvenc_class = GST_QSV_ENCODER_CLASS (klass);
   GstQsvAV1EncClassData *cdata = (GstQsvAV1EncClassData *) data;
+  GstPadTemplate *pad_templ;
+  GstCaps *doc_caps;
 
   qsvenc_class->codec_id = MFX_CODEC_AV1;
   qsvenc_class->impl_index = cdata->impl_index;
@@ -206,12 +257,19 @@ gst_qsv_av1_enc_class_init (GstQsvAV1EncClass * klass, gpointer data)
       "Seungha Yang <seungha@centricular.com>");
 #endif
 
-  gst_element_class_add_pad_template (element_class,
-      gst_pad_template_new ("sink", GST_PAD_SINK, GST_PAD_ALWAYS,
-          cdata->sink_caps));
-  gst_element_class_add_pad_template (element_class,
-      gst_pad_template_new ("src", GST_PAD_SRC, GST_PAD_ALWAYS,
-          cdata->src_caps));
+  pad_templ = gst_pad_template_new ("sink",
+      GST_PAD_SINK, GST_PAD_ALWAYS, cdata->sink_caps);
+  doc_caps = gst_caps_from_string (DOC_SINK_CAPS);
+  gst_pad_template_set_documentation_caps (pad_templ, doc_caps);
+  gst_caps_unref (doc_caps);
+  gst_element_class_add_pad_template (element_class, pad_templ);
+
+  pad_templ = gst_pad_template_new ("src",
+      GST_PAD_SRC, GST_PAD_ALWAYS, cdata->src_caps);
+  doc_caps = gst_caps_from_string (DOC_SRC_CAPS);
+  gst_pad_template_set_documentation_caps (pad_templ, doc_caps);
+  gst_caps_unref (doc_caps);
+  gst_element_class_add_pad_template (element_class, pad_templ);
 
   qsvenc_class->set_format = GST_DEBUG_FUNCPTR (gst_qsv_av1_enc_set_format);
   qsvenc_class->set_output_state =
@@ -219,6 +277,9 @@ gst_qsv_av1_enc_class_init (GstQsvAV1EncClass * klass, gpointer data)
   qsvenc_class->check_reconfigure =
       GST_DEBUG_FUNCPTR (gst_qsv_av1_enc_check_reconfigure);
 
+  gst_type_mark_as_plugin_api (GST_TYPE_QSV_AV1_ENC_RATE_CONTROL,
+      (GstPluginAPIFlags) 0);
+
   gst_caps_unref (cdata->sink_caps);
   gst_caps_unref (cdata->src_caps);
   g_free (cdata->description);
@@ -781,6 +842,9 @@ gst_qsv_av1_enc_register (GstPlugin * plugin, guint rank, guint impl_index,
   if (rank > 0 && index != 0)
     rank--;
 
+  if (index != 0)
+    gst_element_type_set_skip_documentation (type);
+
   if (!gst_element_register (plugin, feature_name, rank, type))
     GST_WARNING ("Failed to register plugin '%s'", type_name);
 
index 7e9630d..e8044f3 100644 (file)
@@ -101,6 +101,13 @@ struct _GstQsvDecoderPrivate
   guint next_task_index;
 };
 
+/**
+ * GstQsvDecoder:
+ *
+ * Base class for Intel Quick Sync video decoders
+ *
+ * Since: 1.22
+ */
 #define gst_qsv_decoder_parent_class parent_class
 G_DEFINE_ABSTRACT_TYPE_WITH_CODE (GstQsvDecoder, gst_qsv_decoder,
     GST_TYPE_VIDEO_DECODER, G_ADD_PRIVATE (GstQsvDecoder);
@@ -178,6 +185,8 @@ gst_qsv_decoder_class_init (GstQsvDecoderClass * klass)
   videodec_class->drain = GST_DEBUG_FUNCPTR (gst_qsv_decoder_drain);
   videodec_class->finish = GST_DEBUG_FUNCPTR (gst_qsv_decoder_finish);
   videodec_class->flush = GST_DEBUG_FUNCPTR (gst_qsv_decoder_flush);
+
+  gst_type_mark_as_plugin_api (GST_TYPE_QSV_DECODER, (GstPluginAPIFlags) 0);
 }
 
 static void
index 7e45085..004f16d 100644 (file)
@@ -41,13 +41,35 @@ using namespace Microsoft::WRL;
 GST_DEBUG_CATEGORY_STATIC (gst_qsv_encoder_debug);
 #define GST_CAT_DEFAULT gst_qsv_encoder_debug
 
+/**
+ * GstQsvCodingOption:
+ *
+ * Since: 1.22
+ */
 GType
 gst_qsv_coding_option_get_type (void)
 {
   static GType coding_opt_type = 0;
   static const GEnumValue coding_opts[] = {
+    /**
+     * GstQsvCodingOption::unknown:
+     *
+     * Since: 1.22
+     */
     {MFX_CODINGOPTION_UNKNOWN, "Unknown", "unknown"},
+
+    /**
+     * GstQsvCodingOption::on:
+     *
+     * Since: 1.22
+     */
     {MFX_CODINGOPTION_ON, "On", "on"},
+
+    /**
+     * GstQsvCodingOption::off:
+     *
+     * Since: 1.22
+     */
     {MFX_CODINGOPTION_OFF, "Off", "off"},
     {0, nullptr, nullptr}
   };
@@ -130,6 +152,13 @@ struct _GstQsvEncoderPrivate
   gboolean low_latency;
 };
 
+/**
+ * GstQsvEncoder:
+ *
+ * Base class for Intel Quick Sync video encoders
+ *
+ * Since: 1.22
+ */
 #define gst_qsv_encoder_parent_class parent_class
 G_DEFINE_ABSTRACT_TYPE_WITH_CODE (GstQsvEncoder, gst_qsv_encoder,
     GST_TYPE_VIDEO_ENCODER, G_ADD_PRIVATE (GstQsvEncoder);
@@ -217,6 +246,10 @@ gst_qsv_encoder_class_init (GstQsvEncoderClass * klass)
   videoenc_class->src_query = GST_DEBUG_FUNCPTR (gst_qsv_encoder_src_query);
   videoenc_class->propose_allocation =
       GST_DEBUG_FUNCPTR (gst_qsv_encoder_propose_allocation);
+
+  gst_type_mark_as_plugin_api (GST_TYPE_QSV_ENCODER, (GstPluginAPIFlags) 0);
+  gst_type_mark_as_plugin_api (GST_TYPE_QSV_CODING_OPTION,
+      (GstPluginAPIFlags) 0);
 }
 
 static void
index 13b5d9b..a00300f 100644 (file)
  * Boston, MA 02110-1301, USA.
  */
 
+/**
+ * SECTION:element-qsvh264dec
+ * @title: qsvh264dec
+ *
+ * Intel Quick Sync H.264 decoder
+ *
+ * ## Example launch line
+ * ```
+ * gst-launch-1.0 filesrc location=/path/to/h264/file ! parsebin ! qsvh264dec ! videoconvert ! autovideosink
+ * ```
+ *
+ * Since: 1.22
+ */
+
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 GST_DEBUG_CATEGORY_STATIC (gst_qsv_h264_dec_debug);
 #define GST_CAT_DEFAULT gst_qsv_h264_dec_debug
 
+#define DOC_SINK_CAPS \
+    "video/x-h264, width = (int) [ 16, 4096 ], height = (int) [ 16, 4096 ], " \
+    "stream-format = (string) { byte-stream, avc, avc3 }, " \
+    "alignment = (string) au, " \
+    "profile = (string) { high, progressive-high, constrained-high, main, " \
+    "constrained-baseline, baseline }"
+
+#define DOC_SRC_CAPS_COMM \
+    "format = (string) NV12, " \
+    "width = (int) [ 16, 4096 ], height = (int) [ 16, 4096 ]"
+
+#define DOC_SRC_CAPS \
+    "video/x-raw(memory:D3D11Memory), " DOC_SRC_CAPS_COMM "; " \
+    "video/x-raw, " DOC_SRC_CAPS_COMM
+
 typedef struct _GstQsvH264Dec
 {
   GstQsvDecoder parent;
@@ -71,6 +100,8 @@ gst_qsv_h264_dec_class_init (GstQsvH264DecClass * klass, gpointer data)
   GstVideoDecoderClass *videodec_class = GST_VIDEO_DECODER_CLASS (klass);
   GstQsvDecoderClass *qsvdec_class = GST_QSV_DECODER_CLASS (klass);
   GstQsvDecoderClassData *cdata = (GstQsvDecoderClassData *) data;
+  GstPadTemplate *pad_templ;
+  GstCaps *doc_caps;
 
   parent_class = (GTypeClass *) g_type_class_peek_parent (klass);
 
@@ -90,12 +121,19 @@ gst_qsv_h264_dec_class_init (GstQsvH264DecClass * klass, gpointer data)
       "Seungha Yang <seungha@centricular.com>");
 #endif
 
-  gst_element_class_add_pad_template (element_class,
-      gst_pad_template_new ("sink", GST_PAD_SINK, GST_PAD_ALWAYS,
-          cdata->sink_caps));
-  gst_element_class_add_pad_template (element_class,
-      gst_pad_template_new ("src", GST_PAD_SRC, GST_PAD_ALWAYS,
-          cdata->src_caps));
+  pad_templ = gst_pad_template_new ("sink",
+      GST_PAD_SINK, GST_PAD_ALWAYS, cdata->sink_caps);
+  doc_caps = gst_caps_from_string (DOC_SINK_CAPS);
+  gst_pad_template_set_documentation_caps (pad_templ, doc_caps);
+  gst_caps_unref (doc_caps);
+  gst_element_class_add_pad_template (element_class, pad_templ);
+
+  pad_templ = gst_pad_template_new ("src",
+      GST_PAD_SRC, GST_PAD_ALWAYS, cdata->src_caps);
+  doc_caps = gst_caps_from_string (DOC_SRC_CAPS);
+  gst_pad_template_set_documentation_caps (pad_templ, doc_caps);
+  gst_caps_unref (doc_caps);
+  gst_element_class_add_pad_template (element_class, pad_templ);
 
   videodec_class->start = GST_DEBUG_FUNCPTR (gst_qsv_h264_dec_start);
   videodec_class->stop = GST_DEBUG_FUNCPTR (gst_qsv_h264_dec_stop);
@@ -538,6 +576,9 @@ gst_qsv_h264_dec_register (GstPlugin * plugin, guint rank, guint impl_index,
   if (rank > 0 && index != 0)
     rank--;
 
+  if (index != 0)
+    gst_element_type_set_skip_documentation (type);
+
   if (!gst_element_register (plugin, feature_name, rank, type))
     GST_WARNING ("Failed to register plugin '%s'", type_name);
 
index 2f07fcd..ece9024 100644 (file)
  * Boston, MA 02110-1301, USA.
  */
 
+/**
+ * SECTION:element-qsvh264enc
+ * @title: qsvh264enc
+ *
+ * Intel Quick Sync H.264 encoder
+ *
+ * ## Example launch line
+ * ```
+ * gst-launch-1.0 videotestsrc ! qsvh264enc ! h264parse ! matroskamux ! filesink location=out.mkv
+ * ```
+ *
+ * Since: 1.22
+ */
+
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
@@ -45,16 +59,38 @@ typedef enum
   GST_QSV_H264_ENC_SEI_DISABLED,
 } GstQsvH264EncSeiInsertMode;
 
+/**
+ * GstQsvH264EncSeiInsertMode:
+ *
+ * Since: 1.22
+ */
 #define GST_TYPE_QSV_H264_ENC_SEI_INSERT_MODE (gst_qsv_h264_enc_sei_insert_mode_get_type ())
 static GType
 gst_qsv_h264_enc_sei_insert_mode_get_type (void)
 {
   static GType sei_insert_mode_type = 0;
   static const GEnumValue insert_modes[] = {
+    /**
+     * GstQsvH264EncSeiInsertMode::insert:
+     *
+     * Since: 1.22
+     */
     {GST_QSV_H264_ENC_SEI_INSERT, "Insert SEI", "insert"},
+
+    /**
+     * GstQsvH264EncSeiInsertMode::insert-and-drop:
+     *
+     * Since: 1.22
+     */
     {GST_QSV_H264_ENC_SEI_INSERT_AND_DROP,
           "Insert SEI and remove corresponding meta from output buffer",
         "insert-and-drop"},
+
+    /**
+     * GstQsvH264EncSeiInsertMode::disabled:
+     *
+     * Since: 1.22
+     */
     {GST_QSV_H264_ENC_SEI_DISABLED, "Disable SEI insertion", "disabled"},
     {0, nullptr, nullptr}
   };
@@ -68,22 +104,86 @@ gst_qsv_h264_enc_sei_insert_mode_get_type (void)
   return sei_insert_mode_type;
 }
 
+/**
+ * GstQsvH264EncRateControl:
+ *
+ * Since: 1.22
+ */
 #define GST_TYPE_QSV_H264_ENC_RATE_CONTROL (gst_qsv_h264_enc_rate_control_get_type ())
 static GType
 gst_qsv_h264_enc_rate_control_get_type (void)
 {
   static GType rate_control_type = 0;
   static const GEnumValue rate_controls[] = {
+    /**
+     * GstQsvH264EncRateControl::cbr:
+     *
+     * Since: 1.22
+     */
     {MFX_RATECONTROL_CBR, "Constant Bitrate", "cbr"},
+
+    /**
+     * GstQsvH264EncRateControl::vbr:
+     *
+     * Since: 1.22
+     */
     {MFX_RATECONTROL_VBR, "Variable Bitrate", "vbr"},
+
+    /**
+     * GstQsvH264EncRateControl::cqp:
+     *
+     * Since: 1.22
+     */
     {MFX_RATECONTROL_CQP, "Constant Quantizer", "cqp"},
+
+    /**
+     * GstQsvH264EncRateControl::avbr:
+     *
+     * Since: 1.22
+     */
     {MFX_RATECONTROL_AVBR, "Average Variable Bitrate", "avbr"},
-    {MFX_RATECONTROL_LA, "VBR with look ahead (Non HRD compliant)", "la_vbr"},
+
+    /**
+     * GstQsvH264EncRateControl::la-vbr:
+     *
+     * Since: 1.22
+     */
+    {MFX_RATECONTROL_LA, "VBR with look ahead (Non HRD compliant)", "la-vbr"},
+
+    /**
+     * GstQsvH264EncRateControl::icq:
+     *
+     * Since: 1.22
+     */
     {MFX_RATECONTROL_ICQ, "Intelligent CQP", "icq"},
+
+    /**
+     * GstQsvH264EncRateControl::vcm:
+     *
+     * Since: 1.22
+     */
     {MFX_RATECONTROL_VCM, "Video Conferencing Mode (Non HRD compliant)", "vcm"},
+
+    /**
+     * GstQsvH264EncRateControl::la-icq:
+     *
+     * Since: 1.22
+     */
     {MFX_RATECONTROL_LA_ICQ, "Intelligent CQP with LA (Non HRD compliant)",
-        "la_icq"},
-    {MFX_RATECONTROL_LA_HRD, "HRD compliant LA", "la_hrd"},
+        "la-icq"},
+
+    /**
+     * GstQsvH264EncRateControl::la-hrd:
+     *
+     * Since: 1.22
+     */
+    {MFX_RATECONTROL_LA_HRD, "HRD compliant LA", "la-hrd"},
+
+    /**
+     * GstQsvH264EncRateControl::qvbr:
+     *
+     * Since: 1.22
+     */
     {MFX_RATECONTROL_QVBR, "VBR with CQP", "qvbr"},
     {0, nullptr, nullptr}
   };
@@ -97,16 +197,44 @@ gst_qsv_h264_enc_rate_control_get_type (void)
   return rate_control_type;
 }
 
+/**
+ * GstQsvH264EncRCLookAheadDS:
+ *
+ * Since: 1.22
+ */
 #define GST_TYPE_QSV_H264_ENC_RC_LOOKAHEAD_DS (gst_qsv_h264_enc_rc_lookahead_ds_get_type ())
 static GType
 gst_qsv_h264_enc_rc_lookahead_ds_get_type (void)
 {
   static GType rc_lookahead_ds_type = 0;
   static const GEnumValue rc_lookahead_ds[] = {
+    /**
+     * GstQsvH264EncRCLookAheadDS::unknown
+     *
+     * Since: 1.22
+     */
     {MFX_LOOKAHEAD_DS_UNKNOWN, "Unknown", "unknown"},
+
+    /**
+     * GstQsvH264EncRCLookAheadDS::off
+     *
+     * Since: 1.22
+     */
     {MFX_LOOKAHEAD_DS_OFF, "Do not use down sampling", "off"},
+
+    /**
+     * GstQsvH264EncRCLookAheadDS::2x
+     *
+     * Since: 1.22
+     */
     {MFX_LOOKAHEAD_DS_2x,
         "Down sample frames two times before estimation", "2x"},
+
+    /**
+     * GstQsvH264EncRCLookAheadDS::4x
+     *
+     * Since: 1.22
+     */
     {MFX_LOOKAHEAD_DS_4x,
         "Down sample frames four times before estimation", "4x"},
     {0, nullptr, nullptr}
@@ -169,6 +297,21 @@ enum
 #define DEFAULT_DISABLE_HRD_CONFORMANCE FALSE
 #define DEFAULT_CC_INSERT GST_QSV_H264_ENC_SEI_INSERT
 
+#define DOC_SINK_CAPS_COMM \
+    "format = (string) NV12, " \
+    "width = (int) [ 16, 8192 ], height = (int) [ 16, 8192 ]"
+
+#define DOC_SINK_CAPS \
+    "video/x-raw(memory:D3D11Memory), " DOC_SINK_CAPS_COMM "; " \
+    "video/x-raw(memory:VAMemory), " DOC_SINK_CAPS_COMM "; " \
+    "video/x-raw, " DOC_SINK_CAPS_COMM
+
+#define DOC_SRC_CAPS \
+    "video/x-h264, width = (int) [ 16, 8192 ], height = (int) [ 16, 8192 ], " \
+    "stream-format = (string) { avc, byte-stream }, alignment = (string) au, " \
+    "profile = (string) { high, main, constrained-baseline, " \
+    "progressive-high, constrained-high, baseline }"
+
 typedef struct _GstQsvH264EncClassData
 {
   GstCaps *sink_caps;
@@ -270,6 +413,8 @@ gst_qsv_h264_enc_class_init (GstQsvH264EncClass * klass, gpointer data)
   GstVideoEncoderClass *encoder_class = GST_VIDEO_ENCODER_CLASS (klass);
   GstQsvEncoderClass *qsvenc_class = GST_QSV_ENCODER_CLASS (klass);
   GstQsvH264EncClassData *cdata = (GstQsvH264EncClassData *) data;
+  GstPadTemplate *pad_templ;
+  GstCaps *doc_caps;
 
   qsvenc_class->codec_id = MFX_CODEC_AVC;
   qsvenc_class->impl_index = cdata->impl_index;
@@ -430,12 +575,19 @@ gst_qsv_h264_enc_class_init (GstQsvH264EncClass * klass, gpointer data)
       "Seungha Yang <seungha@centricular.com>");
 #endif
 
-  gst_element_class_add_pad_template (element_class,
-      gst_pad_template_new ("sink", GST_PAD_SINK, GST_PAD_ALWAYS,
-          cdata->sink_caps));
-  gst_element_class_add_pad_template (element_class,
-      gst_pad_template_new ("src", GST_PAD_SRC, GST_PAD_ALWAYS,
-          cdata->src_caps));
+  pad_templ = gst_pad_template_new ("sink",
+      GST_PAD_SINK, GST_PAD_ALWAYS, cdata->sink_caps);
+  doc_caps = gst_caps_from_string (DOC_SINK_CAPS);
+  gst_pad_template_set_documentation_caps (pad_templ, doc_caps);
+  gst_caps_unref (doc_caps);
+  gst_element_class_add_pad_template (element_class, pad_templ);
+
+  pad_templ = gst_pad_template_new ("src",
+      GST_PAD_SRC, GST_PAD_ALWAYS, cdata->src_caps);
+  doc_caps = gst_caps_from_string (DOC_SRC_CAPS);
+  gst_pad_template_set_documentation_caps (pad_templ, doc_caps);
+  gst_caps_unref (doc_caps);
+  gst_element_class_add_pad_template (element_class, pad_templ);
 
   encoder_class->start = GST_DEBUG_FUNCPTR (gst_qsv_h264_enc_start);
   encoder_class->transform_meta =
@@ -452,6 +604,13 @@ gst_qsv_h264_enc_class_init (GstQsvH264EncClass * klass, gpointer data)
   qsvenc_class->check_reconfigure =
       GST_DEBUG_FUNCPTR (gst_qsv_h264_enc_check_reconfigure);
 
+  gst_type_mark_as_plugin_api (GST_TYPE_QSV_H264_ENC_SEI_INSERT_MODE,
+      (GstPluginAPIFlags) 0);
+  gst_type_mark_as_plugin_api (GST_TYPE_QSV_H264_ENC_RATE_CONTROL,
+      (GstPluginAPIFlags) 0);
+  gst_type_mark_as_plugin_api (GST_TYPE_QSV_H264_ENC_RC_LOOKAHEAD_DS,
+      (GstPluginAPIFlags) 0);
+
   gst_caps_unref (cdata->sink_caps);
   gst_caps_unref (cdata->src_caps);
   g_free (cdata->description);
@@ -1906,6 +2065,9 @@ gst_qsv_h264_enc_register (GstPlugin * plugin, guint rank, guint impl_index,
   if (rank > 0 && index != 0)
     rank--;
 
+  if (index != 0)
+    gst_element_type_set_skip_documentation (type);
+
   if (!gst_element_register (plugin, feature_name, rank, type))
     GST_WARNING ("Failed to register plugin '%s'", type_name);
 
index bc9d54d..15c10f2 100644 (file)
  * Boston, MA 02110-1301, USA.
  */
 
+/**
+ * SECTION:element-qsvh265dec
+ * @title: qsvh264dec
+ *
+ * Intel Quick Sync H.265 decoder
+ *
+ * ## Example launch line
+ * ```
+ * gst-launch-1.0 filesrc location=/path/to/h265/file ! parsebin ! qsvh265dec ! videoconvert ! autovideosink
+ * ```
+ *
+ * Since: 1.22
+ */
+
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 GST_DEBUG_CATEGORY_STATIC (gst_qsv_h265_dec_debug);
 #define GST_CAT_DEFAULT gst_qsv_h265_dec_debug
 
+#define DOC_SINK_CAPS \
+    "video/x-h265, width = (int) [ 16, 8192 ], height = (int) [ 16, 8192 ], " \
+    "stream-format = (string) { byte-stream, hev1, hvc1 }, " \
+    "alignment = (string) au, profile = (string) { main, main-10 }"
+
+#define DOC_SRC_CAPS_COMM \
+    "format = (string) NV12, " \
+    "width = (int) [ 16, 8192 ], height = (int) [ 16, 8192 ]"
+
+#define DOC_SRC_CAPS \
+    "video/x-raw(memory:D3D11Memory), " DOC_SRC_CAPS_COMM "; " \
+    "video/x-raw, " DOC_SRC_CAPS_COMM
+
 typedef struct _GstQsvH265Dec
 {
   GstQsvDecoder parent;
@@ -73,6 +100,8 @@ gst_qsv_h265_dec_class_init (GstQsvH265DecClass * klass, gpointer data)
   GstVideoDecoderClass *videodec_class = GST_VIDEO_DECODER_CLASS (klass);
   GstQsvDecoderClass *qsvdec_class = GST_QSV_DECODER_CLASS (klass);
   GstQsvDecoderClassData *cdata = (GstQsvDecoderClassData *) data;
+  GstPadTemplate *pad_templ;
+  GstCaps *doc_caps;
 
   parent_class = (GTypeClass *) g_type_class_peek_parent (klass);
 
@@ -92,12 +121,19 @@ gst_qsv_h265_dec_class_init (GstQsvH265DecClass * klass, gpointer data)
       "Seungha Yang <seungha@centricular.com>");
 #endif
 
-  gst_element_class_add_pad_template (element_class,
-      gst_pad_template_new ("sink", GST_PAD_SINK, GST_PAD_ALWAYS,
-          cdata->sink_caps));
-  gst_element_class_add_pad_template (element_class,
-      gst_pad_template_new ("src", GST_PAD_SRC, GST_PAD_ALWAYS,
-          cdata->src_caps));
+  pad_templ = gst_pad_template_new ("sink",
+      GST_PAD_SINK, GST_PAD_ALWAYS, cdata->sink_caps);
+  doc_caps = gst_caps_from_string (DOC_SINK_CAPS);
+  gst_pad_template_set_documentation_caps (pad_templ, doc_caps);
+  gst_caps_unref (doc_caps);
+  gst_element_class_add_pad_template (element_class, pad_templ);
+
+  pad_templ = gst_pad_template_new ("src",
+      GST_PAD_SRC, GST_PAD_ALWAYS, cdata->src_caps);
+  doc_caps = gst_caps_from_string (DOC_SRC_CAPS);
+  gst_pad_template_set_documentation_caps (pad_templ, doc_caps);
+  gst_caps_unref (doc_caps);
+  gst_element_class_add_pad_template (element_class, pad_templ);
 
   videodec_class->start = GST_DEBUG_FUNCPTR (gst_qsv_h265_dec_start);
   videodec_class->stop = GST_DEBUG_FUNCPTR (gst_qsv_h265_dec_stop);
@@ -637,6 +673,9 @@ gst_qsv_h265_dec_register (GstPlugin * plugin, guint rank, guint impl_index,
   if (rank > 0 && index != 0)
     rank--;
 
+  if (index != 0)
+    gst_element_type_set_skip_documentation (type);
+
   if (!gst_element_register (plugin, feature_name, rank, type))
     GST_WARNING ("Failed to register plugin '%s'", type_name);
 
index 4434589..64f7daa 100644 (file)
  * Boston, MA 02110-1301, USA.
  */
 
+/**
+ * SECTION:element-qsvh265enc
+ * @title: qsvh265enc
+ *
+ * Intel Quick Sync H.265 encoder
+ *
+ * ## Example launch line
+ * ```
+ * gst-launch-1.0 videotestsrc ! qsvh265enc ! h265parse ! matroskamux ! filesink location=out.mkv
+ * ```
+ *
+ * Since: 1.22
+ */
+
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
@@ -44,16 +58,38 @@ typedef enum
   GST_QSV_H265_ENC_SEI_DISABLED,
 } GstQsvH265EncSeiInsertMode;
 
+/**
+ * GstQsvH265EncSeiInsertMode:
+ *
+ * Since: 1.22
+ */
 #define GST_TYPE_QSV_H265_ENC_SEI_INSERT_MODE (gst_qsv_h265_enc_sei_insert_mode_get_type ())
 static GType
 gst_qsv_h265_enc_sei_insert_mode_get_type (void)
 {
   static GType sei_insert_mode_type = 0;
   static const GEnumValue insert_modes[] = {
+    /**
+     * GstQsvH265EncSeiInsertMode::insert:
+     *
+     * Since: 1.22
+     */
     {GST_QSV_H265_ENC_SEI_INSERT, "Insert SEI", "insert"},
+
+    /**
+     * GstQsvH265EncSeiInsertMode::insert-and-drop:
+     *
+     * Since: 1.22
+     */
     {GST_QSV_H265_ENC_SEI_INSERT_AND_DROP,
           "Insert SEI and remove corresponding meta from output buffer",
         "insert-and-drop"},
+
+    /**
+     * GstQsvH265EncSeiInsertMode::disabled:
+     *
+     * Since: 1.22
+     */
     {GST_QSV_H265_ENC_SEI_DISABLED, "Disable SEI insertion", "disabled"},
     {0, nullptr, nullptr}
   };
@@ -67,17 +103,57 @@ gst_qsv_h265_enc_sei_insert_mode_get_type (void)
   return sei_insert_mode_type;
 }
 
+/**
+ * GstQsvH265EncRateControl:
+ *
+ * Since: 1.22
+ */
 #define GST_TYPE_QSV_H265_ENC_RATE_CONTROL (gst_qsv_h265_enc_rate_control_get_type ())
 static GType
 gst_qsv_h265_enc_rate_control_get_type (void)
 {
   static GType rate_control_type = 0;
   static const GEnumValue rate_controls[] = {
+    /**
+     * GstQsvH265EncSeiInsertMode::cbr:
+     *
+     * Since: 1.22
+     */
     {MFX_RATECONTROL_CBR, "Constant Bitrate", "cbr"},
+
+    /**
+     * GstQsvH265EncSeiInsertMode::vbr:
+     *
+     * Since: 1.22
+     */
     {MFX_RATECONTROL_VBR, "Variable Bitrate", "vbr"},
+
+    /**
+     * GstQsvH265EncSeiInsertMode::cqp:
+     *
+     * Since: 1.22
+     */
     {MFX_RATECONTROL_CQP, "Constant Quantizer", "cqp"},
+
+    /**
+     * GstQsvH265EncSeiInsertMode::icq:
+     *
+     * Since: 1.22
+     */
     {MFX_RATECONTROL_ICQ, "Intelligent CQP", "icq"},
+
+    /**
+     * GstQsvH265EncSeiInsertMode::vcm:
+     *
+     * Since: 1.22
+     */
     {MFX_RATECONTROL_VCM, "Video Conferencing Mode (Non HRD compliant)", "vcm"},
+
+    /**
+     * GstQsvH265EncSeiInsertMode::qvbr:
+     *
+     * Since: 1.22
+     */
     {MFX_RATECONTROL_QVBR, "VBR with CQP", "qvbr"},
     {0, nullptr, nullptr}
   };
@@ -129,6 +205,20 @@ enum
 #define DEFAULT_DISABLE_HRD_CONFORMANCE FALSE
 #define DEFAULT_CC_INSERT GST_QSV_H265_ENC_SEI_INSERT
 
+#define DOC_SINK_CAPS_COMM \
+    "format = (string) { NV12, P010_10LE }, " \
+    "width = (int) [ 16, 8192 ], height = (int) [ 16, 8192 ]"
+
+#define DOC_SINK_CAPS \
+    "video/x-raw(memory:D3D11Memory), " DOC_SINK_CAPS_COMM "; " \
+    "video/x-raw(memory:VAMemory), " DOC_SINK_CAPS_COMM "; " \
+    "video/x-raw, " DOC_SINK_CAPS_COMM
+
+#define DOC_SRC_CAPS \
+    "video/x-h265, width = (int) [ 16, 8192 ], height = (int) [ 16, 8192 ], " \
+    "stream-format = (string) byte-stream, alignment = (string) au, " \
+    "profile = (string) { main, main-10 }"
+
 typedef struct _GstQsvH265EncClassData
 {
   GstCaps *sink_caps;
@@ -227,6 +317,8 @@ gst_qsv_h265_enc_class_init (GstQsvH265EncClass * klass, gpointer data)
   GstVideoEncoderClass *encoder_class = GST_VIDEO_ENCODER_CLASS (klass);
   GstQsvEncoderClass *qsvenc_class = GST_QSV_ENCODER_CLASS (klass);
   GstQsvH265EncClassData *cdata = (GstQsvH265EncClassData *) data;
+  GstPadTemplate *pad_templ;
+  GstCaps *doc_caps;
 
   qsvenc_class->codec_id = MFX_CODEC_AVC;
   qsvenc_class->impl_index = cdata->impl_index;
@@ -362,12 +454,19 @@ gst_qsv_h265_enc_class_init (GstQsvH265EncClass * klass, gpointer data)
       "Seungha Yang <seungha@centricular.com>");
 #endif
 
-  gst_element_class_add_pad_template (element_class,
-      gst_pad_template_new ("sink", GST_PAD_SINK, GST_PAD_ALWAYS,
-          cdata->sink_caps));
-  gst_element_class_add_pad_template (element_class,
-      gst_pad_template_new ("src", GST_PAD_SRC, GST_PAD_ALWAYS,
-          cdata->src_caps));
+  pad_templ = gst_pad_template_new ("sink",
+      GST_PAD_SINK, GST_PAD_ALWAYS, cdata->sink_caps);
+  doc_caps = gst_caps_from_string (DOC_SINK_CAPS);
+  gst_pad_template_set_documentation_caps (pad_templ, doc_caps);
+  gst_caps_unref (doc_caps);
+  gst_element_class_add_pad_template (element_class, pad_templ);
+
+  pad_templ = gst_pad_template_new ("src",
+      GST_PAD_SRC, GST_PAD_ALWAYS, cdata->src_caps);
+  doc_caps = gst_caps_from_string (DOC_SRC_CAPS);
+  gst_pad_template_set_documentation_caps (pad_templ, doc_caps);
+  gst_caps_unref (doc_caps);
+  gst_element_class_add_pad_template (element_class, pad_templ);
 
   encoder_class->start = GST_DEBUG_FUNCPTR (gst_qsv_h265_enc_start);
   encoder_class->transform_meta =
@@ -386,6 +485,11 @@ gst_qsv_h265_enc_class_init (GstQsvH265EncClass * klass, gpointer data)
 
   klass->hdr10_aware = cdata->hdr10_aware;
 
+  gst_type_mark_as_plugin_api (GST_TYPE_QSV_H265_ENC_SEI_INSERT_MODE,
+      (GstPluginAPIFlags) 0);
+  gst_type_mark_as_plugin_api (GST_TYPE_QSV_H265_ENC_RATE_CONTROL,
+      (GstPluginAPIFlags) 0);
+
   gst_caps_unref (cdata->sink_caps);
   gst_caps_unref (cdata->src_caps);
   g_free (cdata->description);
@@ -1579,6 +1683,9 @@ gst_qsv_h265_enc_register (GstPlugin * plugin, guint rank, guint impl_index,
   if (rank > 0 && index != 0)
     rank--;
 
+  if (index != 0)
+    gst_element_type_set_skip_documentation (type);
+
   if (!gst_element_register (plugin, feature_name, rank, type))
     GST_WARNING ("Failed to register plugin '%s'", type_name);
 
index 44a5ac6..60be81d 100644 (file)
  * Boston, MA 02110-1301, USA.
  */
 
+/**
+ * SECTION:element-qsvjpegenc
+ * @title: qsvvp9enc
+ *
+ * Intel Quick Sync JPEG encoder
+ *
+ * ## Example launch line
+ * ```
+ * gst-launch-1.0 videotestsrc ! qsvjpegenc ! qtmux ! filesink location=out.mp4
+ * ```
+ *
+ * Since: 1.22
+ */
+
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
@@ -44,6 +58,18 @@ enum
 
 #define DEFAULT_JPEG_QUALITY 85
 
+#define DOC_SINK_CAPS_COMM \
+    "format = (string) { NV12, BGRA }, " \
+    "width = (int) [ 16, 8192 ], height = (int) [ 16, 8192 ]"
+
+#define DOC_SINK_CAPS \
+    "video/x-raw(memory:D3D11Memory), " DOC_SINK_CAPS_COMM "; " \
+    "video/x-raw(memory:VAMemory), " DOC_SINK_CAPS_COMM "; " \
+    "video/x-raw, " DOC_SINK_CAPS_COMM
+
+#define DOC_SRC_CAPS \
+    "image/jpeg, width = (int) [ 16, 8192 ], height = (int) [ 16, 8192 ]"
+
 typedef struct _GstQsvJpegEncClassData
 {
   GstCaps *sink_caps;
@@ -101,6 +127,8 @@ gst_qsv_jpeg_enc_class_init (GstQsvJpegEncClass * klass, gpointer data)
   GstElementClass *element_class = GST_ELEMENT_CLASS (klass);
   GstQsvEncoderClass *qsvenc_class = GST_QSV_ENCODER_CLASS (klass);
   GstQsvJpegEncClassData *cdata = (GstQsvJpegEncClassData *) data;
+  GstPadTemplate *pad_templ;
+  GstCaps *doc_caps;
 
   qsvenc_class->codec_id = MFX_CODEC_JPEG;
   qsvenc_class->impl_index = cdata->impl_index;
@@ -135,12 +163,19 @@ gst_qsv_jpeg_enc_class_init (GstQsvJpegEncClass * klass, gpointer data)
       "Seungha Yang <seungha@centricular.com>");
 #endif
 
-  gst_element_class_add_pad_template (element_class,
-      gst_pad_template_new ("sink", GST_PAD_SINK, GST_PAD_ALWAYS,
-          cdata->sink_caps));
-  gst_element_class_add_pad_template (element_class,
-      gst_pad_template_new ("src", GST_PAD_SRC, GST_PAD_ALWAYS,
-          cdata->src_caps));
+  pad_templ = gst_pad_template_new ("sink",
+      GST_PAD_SINK, GST_PAD_ALWAYS, cdata->sink_caps);
+  doc_caps = gst_caps_from_string (DOC_SINK_CAPS);
+  gst_pad_template_set_documentation_caps (pad_templ, doc_caps);
+  gst_caps_unref (doc_caps);
+  gst_element_class_add_pad_template (element_class, pad_templ);
+
+  pad_templ = gst_pad_template_new ("src",
+      GST_PAD_SRC, GST_PAD_ALWAYS, cdata->src_caps);
+  doc_caps = gst_caps_from_string (DOC_SRC_CAPS);
+  gst_pad_template_set_documentation_caps (pad_templ, doc_caps);
+  gst_caps_unref (doc_caps);
+  gst_element_class_add_pad_template (element_class, pad_templ);
 
   qsvenc_class->set_format = GST_DEBUG_FUNCPTR (gst_qsv_jpeg_enc_set_format);
   qsvenc_class->set_output_state =
@@ -512,6 +547,9 @@ gst_qsv_jpeg_enc_register (GstPlugin * plugin, guint rank, guint impl_index,
   if (rank > 0 && index != 0)
     rank--;
 
+  if (index != 0)
+    gst_element_type_set_skip_documentation (type);
+
   if (!gst_element_register (plugin, feature_name, rank, type))
     GST_WARNING ("Failed to register plugin '%s'", type_name);
 
index a24244a..c7d9f62 100644 (file)
  * Boston, MA 02110-1301, USA.
  */
 
+/**
+ * SECTION:element-qsvvp9enc
+ * @title: qsvvp9enc
+ *
+ * Intel Quick Sync VP9 encoder
+ *
+ * ## Example launch line
+ * ```
+ * gst-launch-1.0 videotestsrc ! qsvvp9enc ! vp9parse ! matroskamux ! filesink location=out.mkv
+ * ```
+ *
+ * Since: 1.22
+ */
+
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 GST_DEBUG_CATEGORY_STATIC (gst_qsv_vp9_enc_debug);
 #define GST_CAT_DEFAULT gst_qsv_vp9_enc_debug
 
+/**
+ * GstQsvVP9EncRateControl:
+ *
+ * Since: 1.22
+ */
 #define GST_TYPE_QSV_VP9_ENC_RATE_CONTROL (gst_qsv_vp9_enc_rate_control_get_type ())
 static GType
 gst_qsv_vp9_enc_rate_control_get_type (void)
 {
   static GType rate_control_type = 0;
   static const GEnumValue rate_controls[] = {
+    /**
+     * GstQsvVP9EncRateControl::cbr:
+     *
+     * Since: 1.22
+     */
     {MFX_RATECONTROL_CBR, "Constant Bitrate", "cbr"},
+
+    /**
+     * GstQsvVP9EncRateControl::vbr:
+     *
+     * Since: 1.22
+     */
     {MFX_RATECONTROL_VBR, "Variable Bitrate", "vbr"},
+
+    /**
+     * GstQsvVP9EncRateControl::cqp:
+     *
+     * Since: 1.22
+     */
     {MFX_RATECONTROL_CQP, "Constant Quantizer", "cqp"},
+
+    /**
+     * GstQsvVP9EncRateControl::icq:
+     *
+     * Since: 1.22
+     */
     {MFX_RATECONTROL_ICQ, "Intelligent CQP", "icq"},
     {0, nullptr, nullptr}
   };
@@ -79,6 +121,20 @@ enum
 #define DEFAULT_RATE_CONTROL MFX_RATECONTROL_VBR
 #define DEFAULT_IQC_QUALITY 0
 
+#define DOC_SINK_CAPS_COMM \
+    "format = (string) { NV12, P010_10LE, VUYA, Y410 }, " \
+    "width = (int) [16, 8192 ], " \
+    "height = (int) [16, 8192 ]"
+
+#define DOC_SINK_CAPS \
+    "video/x-raw(memory:D3D11Memory), " DOC_SINK_CAPS_COMM "; " \
+    "video/x-raw(memory:VAMemory), " DOC_SINK_CAPS_COMM "; " \
+    "video/x-raw, " DOC_SINK_CAPS_COMM
+
+#define DOC_SRC_CAPS \
+    "video/x-vp9, width = (int) [16, 8192 ], height = (int) [16, 8192 ], " \
+    "profile = (string) { 0, 2, 1, 3 }"
+
 typedef struct _GstQsvVP9EncClassData
 {
   GstCaps *sink_caps;
@@ -150,6 +206,8 @@ gst_qsv_vp9_enc_class_init (GstQsvVP9EncClass * klass, gpointer data)
   GstVideoEncoderClass *encoder_class = GST_VIDEO_ENCODER_CLASS (klass);
   GstQsvEncoderClass *qsvenc_class = GST_QSV_ENCODER_CLASS (klass);
   GstQsvVP9EncClassData *cdata = (GstQsvVP9EncClassData *) data;
+  GstPadTemplate *pad_templ;
+  GstCaps *doc_caps;
 
   qsvenc_class->codec_id = MFX_CODEC_VP9;
   qsvenc_class->impl_index = cdata->impl_index;
@@ -221,12 +279,19 @@ gst_qsv_vp9_enc_class_init (GstQsvVP9EncClass * klass, gpointer data)
       "Seungha Yang <seungha@centricular.com>");
 #endif
 
-  gst_element_class_add_pad_template (element_class,
-      gst_pad_template_new ("sink", GST_PAD_SINK, GST_PAD_ALWAYS,
-          cdata->sink_caps));
-  gst_element_class_add_pad_template (element_class,
-      gst_pad_template_new ("src", GST_PAD_SRC, GST_PAD_ALWAYS,
-          cdata->src_caps));
+  pad_templ = gst_pad_template_new ("sink",
+      GST_PAD_SINK, GST_PAD_ALWAYS, cdata->sink_caps);
+  doc_caps = gst_caps_from_string (DOC_SINK_CAPS);
+  gst_pad_template_set_documentation_caps (pad_templ, doc_caps);
+  gst_caps_unref (doc_caps);
+  gst_element_class_add_pad_template (element_class, pad_templ);
+
+  pad_templ = gst_pad_template_new ("src",
+      GST_PAD_SRC, GST_PAD_ALWAYS, cdata->src_caps);
+  doc_caps = gst_caps_from_string (DOC_SRC_CAPS);
+  gst_pad_template_set_documentation_caps (pad_templ, doc_caps);
+  gst_caps_unref (doc_caps);
+  gst_element_class_add_pad_template (element_class, pad_templ);
 
   encoder_class->getcaps = GST_DEBUG_FUNCPTR (gst_qsv_vp9_enc_getcaps);
 
@@ -236,6 +301,9 @@ gst_qsv_vp9_enc_class_init (GstQsvVP9EncClass * klass, gpointer data)
   qsvenc_class->check_reconfigure =
       GST_DEBUG_FUNCPTR (gst_qsv_vp9_enc_check_reconfigure);
 
+  gst_type_mark_as_plugin_api (GST_TYPE_QSV_VP9_ENC_RATE_CONTROL,
+      (GstPluginAPIFlags) 0);
+
   gst_caps_unref (cdata->sink_caps);
   gst_caps_unref (cdata->src_caps);
   g_free (cdata->description);
@@ -1021,6 +1089,9 @@ gst_qsv_vp9_enc_register (GstPlugin * plugin, guint rank, guint impl_index,
   if (rank > 0 && index != 0)
     rank--;
 
+  if (index != 0)
+    gst_element_type_set_skip_documentation (type);
+
   if (!gst_element_register (plugin, feature_name, rank, type))
     GST_WARNING ("Failed to register plugin '%s'", type_name);
 
index 18211d0..59c6e67 100644 (file)
 #endif
 
 /**
- * plugin-qsv:
+ * SECTION:plugin-qsv
+ *
+ * Intel Quick Sync plugin.
+ *
+ * This plugin consists of various video encoder and decoder elements.
+ * Depending on the hardware it runs on, some elements might not be registered
+ * in case that underlying hardware doesn't support the for feature.
+ *
+ * To get a list of all available elements, user can run
+ * ```sh
+ * gst-inspect-1.0 qsv
+ * ```
  *
  * Since: 1.22
  */