mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-18 07:47:17 +00:00
amfcodec: Update plugin cache
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2143>
This commit is contained in:
parent
a0d8133d60
commit
89293656e4
5 changed files with 896 additions and 4 deletions
|
@ -456,6 +456,647 @@
|
|||
"tracers": {},
|
||||
"url": "Unknown package origin"
|
||||
},
|
||||
"amfcodec": {
|
||||
"description": "AMD AMF Codec plugin",
|
||||
"elements": {
|
||||
"amfh264enc": {
|
||||
"author": "Seungha Yang <seungha@centricular.com>",
|
||||
"description": "Encode H.264 video streams using AMF API",
|
||||
"hierarchy": [
|
||||
"GstAmfH264Enc",
|
||||
"GstAmfEncoder",
|
||||
"GstVideoEncoder",
|
||||
"GstElement",
|
||||
"GstObject",
|
||||
"GInitiallyUnowned",
|
||||
"GObject"
|
||||
],
|
||||
"interfaces": [
|
||||
"GstPreset"
|
||||
],
|
||||
"klass": "Codec/Encoder/Video/Hardware",
|
||||
"long-name": "AMD AMF H.264 Video Encoder",
|
||||
"pad-templates": {
|
||||
"sink": {
|
||||
"caps": "video/x-raw(memory:D3D11Memory):\n format: NV12\n width: [ 128, 4096 ]\n height: [ 128, 4096 ]\n interlace-mode: progressive\nvideo/x-raw:\n format: NV12\n width: [ 128, 4096 ]\n height: [ 128, 4096 ]\n interlace-mode: progressive\n",
|
||||
"direction": "sink",
|
||||
"presence": "always"
|
||||
},
|
||||
"src": {
|
||||
"caps": "video/x-h264:\n width: [ 128, 4096 ]\n height: [ 128, 4096 ]\n profile: { (string)main, (string)high, (string)constrained-baseline, (string)baseline }\n stream-format: { (string)avc, (string)byte-stream }\n alignment: au\n",
|
||||
"direction": "src",
|
||||
"presence": "always"
|
||||
}
|
||||
},
|
||||
"properties": {
|
||||
"adapter-luid": {
|
||||
"blurb": "DXGI Adapter LUID (Locally Unique Identifier) of associated GPU",
|
||||
"conditionally-available": false,
|
||||
"construct": false,
|
||||
"construct-only": false,
|
||||
"controllable": false,
|
||||
"default": "58766",
|
||||
"max": "9223372036854775807",
|
||||
"min": "-9223372036854775808",
|
||||
"mutable": "playing",
|
||||
"readable": true,
|
||||
"type": "gint64",
|
||||
"writable": true
|
||||
},
|
||||
"aud": {
|
||||
"blurb": "Use AU (Access Unit) delimiter",
|
||||
"conditionally-available": false,
|
||||
"construct": false,
|
||||
"construct-only": false,
|
||||
"controllable": false,
|
||||
"default": "true",
|
||||
"mutable": "playing",
|
||||
"readable": true,
|
||||
"type": "gboolean",
|
||||
"writable": true
|
||||
},
|
||||
"bitrate": {
|
||||
"blurb": "Target bitrate in kbit/sec (0: USAGE default)",
|
||||
"conditionally-available": false,
|
||||
"construct": false,
|
||||
"construct-only": false,
|
||||
"controllable": false,
|
||||
"default": "0",
|
||||
"max": "2147483",
|
||||
"min": "0",
|
||||
"mutable": "playing",
|
||||
"readable": true,
|
||||
"type": "guint",
|
||||
"writable": true
|
||||
},
|
||||
"cabac": {
|
||||
"blurb": "Enable CABAC entropy coding",
|
||||
"conditionally-available": false,
|
||||
"construct": false,
|
||||
"construct-only": false,
|
||||
"controllable": false,
|
||||
"default": "true",
|
||||
"mutable": "playing",
|
||||
"readable": true,
|
||||
"type": "gboolean",
|
||||
"writable": true
|
||||
},
|
||||
"gop-size": {
|
||||
"blurb": "Number of pictures within a GOP (-1: USAGE default)",
|
||||
"conditionally-available": false,
|
||||
"construct": false,
|
||||
"construct-only": false,
|
||||
"controllable": false,
|
||||
"default": "-1",
|
||||
"max": "2147483647",
|
||||
"min": "-1",
|
||||
"mutable": "playing",
|
||||
"readable": true,
|
||||
"type": "gint",
|
||||
"writable": true
|
||||
},
|
||||
"max-bitrate": {
|
||||
"blurb": "Maximum bitrate in kbit/sec (0: USAGE default)",
|
||||
"conditionally-available": false,
|
||||
"construct": false,
|
||||
"construct-only": false,
|
||||
"controllable": false,
|
||||
"default": "0",
|
||||
"max": "2147483",
|
||||
"min": "0",
|
||||
"mutable": "playing",
|
||||
"readable": true,
|
||||
"type": "guint",
|
||||
"writable": true
|
||||
},
|
||||
"max-qp": {
|
||||
"blurb": "Maximum allowed QP value (-1: USAGE default)",
|
||||
"conditionally-available": false,
|
||||
"construct": false,
|
||||
"construct-only": false,
|
||||
"controllable": false,
|
||||
"default": "-1",
|
||||
"max": "51",
|
||||
"min": "-1",
|
||||
"mutable": "playing",
|
||||
"readable": true,
|
||||
"type": "gint",
|
||||
"writable": true
|
||||
},
|
||||
"min-qp": {
|
||||
"blurb": "Minimum allowed QP value (-1: USAGE default)",
|
||||
"conditionally-available": false,
|
||||
"construct": false,
|
||||
"construct-only": false,
|
||||
"controllable": false,
|
||||
"default": "-1",
|
||||
"max": "51",
|
||||
"min": "-1",
|
||||
"mutable": "playing",
|
||||
"readable": true,
|
||||
"type": "gint",
|
||||
"writable": true
|
||||
},
|
||||
"preset": {
|
||||
"blurb": "Preset",
|
||||
"conditionally-available": false,
|
||||
"construct": false,
|
||||
"construct-only": false,
|
||||
"controllable": false,
|
||||
"default": "default (-1)",
|
||||
"mutable": "playing",
|
||||
"readable": true,
|
||||
"type": "GstAmfH264EncPreset",
|
||||
"writable": true
|
||||
},
|
||||
"qp-i": {
|
||||
"blurb": "Constant QP for I frames",
|
||||
"conditionally-available": false,
|
||||
"construct": false,
|
||||
"construct-only": false,
|
||||
"controllable": false,
|
||||
"default": "22",
|
||||
"max": "51",
|
||||
"min": "0",
|
||||
"mutable": "playing",
|
||||
"readable": true,
|
||||
"type": "guint",
|
||||
"writable": true
|
||||
},
|
||||
"qp-p": {
|
||||
"blurb": "Constant QP for P frames",
|
||||
"conditionally-available": false,
|
||||
"construct": false,
|
||||
"construct-only": false,
|
||||
"controllable": false,
|
||||
"default": "22",
|
||||
"max": "51",
|
||||
"min": "0",
|
||||
"mutable": "playing",
|
||||
"readable": true,
|
||||
"type": "guint",
|
||||
"writable": true
|
||||
},
|
||||
"rate-control": {
|
||||
"blurb": "Rate Control Method",
|
||||
"conditionally-available": false,
|
||||
"construct": false,
|
||||
"construct-only": false,
|
||||
"controllable": false,
|
||||
"default": "default (-1)",
|
||||
"mutable": "playing",
|
||||
"readable": true,
|
||||
"type": "GstAmfH264EncRateControl",
|
||||
"writable": true
|
||||
},
|
||||
"ref-frames": {
|
||||
"blurb": "Number of reference frames",
|
||||
"conditionally-available": false,
|
||||
"construct": false,
|
||||
"construct-only": false,
|
||||
"controllable": false,
|
||||
"default": "1",
|
||||
"max": "16",
|
||||
"min": "1",
|
||||
"mutable": "playing",
|
||||
"readable": true,
|
||||
"type": "guint",
|
||||
"writable": true
|
||||
},
|
||||
"usage": {
|
||||
"blurb": "Target usage",
|
||||
"conditionally-available": false,
|
||||
"construct": false,
|
||||
"construct-only": false,
|
||||
"controllable": false,
|
||||
"default": "transcoding (0)",
|
||||
"mutable": "playing",
|
||||
"readable": true,
|
||||
"type": "GstAmfH264EncUsage",
|
||||
"writable": true
|
||||
}
|
||||
},
|
||||
"rank": "none"
|
||||
},
|
||||
"amfh265enc": {
|
||||
"author": "Seungha Yang <seungha@centricular.com>",
|
||||
"description": "Encode H.265 video streams using AMF API",
|
||||
"hierarchy": [
|
||||
"GstAmfH265Enc",
|
||||
"GstAmfEncoder",
|
||||
"GstVideoEncoder",
|
||||
"GstElement",
|
||||
"GstObject",
|
||||
"GInitiallyUnowned",
|
||||
"GObject"
|
||||
],
|
||||
"interfaces": [
|
||||
"GstPreset"
|
||||
],
|
||||
"klass": "Codec/Encoder/Video/Hardware",
|
||||
"long-name": "AMD AMF H.265 Video Encoder",
|
||||
"pad-templates": {
|
||||
"sink": {
|
||||
"caps": "video/x-raw(memory:D3D11Memory):\n format: NV12\n width: [ 128, 4096 ]\n height: [ 128, 4096 ]\n interlace-mode: progressive\nvideo/x-raw:\n format: NV12\n width: [ 128, 4096 ]\n height: [ 128, 4096 ]\n interlace-mode: progressive\n",
|
||||
"direction": "sink",
|
||||
"presence": "always"
|
||||
},
|
||||
"src": {
|
||||
"caps": "video/x-h265:\n width: [ 128, 4096 ]\n height: [ 128, 4096 ]\n profile: main\n stream-format: byte-stream\n alignment: au\n",
|
||||
"direction": "src",
|
||||
"presence": "always"
|
||||
}
|
||||
},
|
||||
"properties": {
|
||||
"adapter-luid": {
|
||||
"blurb": "DXGI Adapter LUID (Locally Unique Identifier) of associated GPU",
|
||||
"conditionally-available": false,
|
||||
"construct": false,
|
||||
"construct-only": false,
|
||||
"controllable": false,
|
||||
"default": "58766",
|
||||
"max": "9223372036854775807",
|
||||
"min": "-9223372036854775808",
|
||||
"mutable": "playing",
|
||||
"readable": true,
|
||||
"type": "gint64",
|
||||
"writable": true
|
||||
},
|
||||
"aud": {
|
||||
"blurb": "Use AU (Access Unit) delimiter",
|
||||
"conditionally-available": false,
|
||||
"construct": false,
|
||||
"construct-only": false,
|
||||
"controllable": false,
|
||||
"default": "true",
|
||||
"mutable": "playing",
|
||||
"readable": true,
|
||||
"type": "gboolean",
|
||||
"writable": true
|
||||
},
|
||||
"bitrate": {
|
||||
"blurb": "Target bitrate in kbit/sec (0: USAGE default)",
|
||||
"conditionally-available": false,
|
||||
"construct": false,
|
||||
"construct-only": false,
|
||||
"controllable": false,
|
||||
"default": "0",
|
||||
"max": "2147483",
|
||||
"min": "0",
|
||||
"mutable": "playing",
|
||||
"readable": true,
|
||||
"type": "guint",
|
||||
"writable": true
|
||||
},
|
||||
"gop-size": {
|
||||
"blurb": "Number of pictures within a GOP",
|
||||
"conditionally-available": false,
|
||||
"construct": false,
|
||||
"construct-only": false,
|
||||
"controllable": false,
|
||||
"default": "30",
|
||||
"max": "2147483647",
|
||||
"min": "0",
|
||||
"mutable": "playing",
|
||||
"readable": true,
|
||||
"type": "guint",
|
||||
"writable": true
|
||||
},
|
||||
"max-bitrate": {
|
||||
"blurb": "Maximum bitrate in kbit/sec (0: USAGE default)",
|
||||
"conditionally-available": false,
|
||||
"construct": false,
|
||||
"construct-only": false,
|
||||
"controllable": false,
|
||||
"default": "0",
|
||||
"max": "2147483",
|
||||
"min": "0",
|
||||
"mutable": "playing",
|
||||
"readable": true,
|
||||
"type": "guint",
|
||||
"writable": true
|
||||
},
|
||||
"max-qp-i": {
|
||||
"blurb": "Maximum allowed QP value for I frames (-1: USAGE default)",
|
||||
"conditionally-available": false,
|
||||
"construct": false,
|
||||
"construct-only": false,
|
||||
"controllable": false,
|
||||
"default": "-1",
|
||||
"max": "51",
|
||||
"min": "-1",
|
||||
"mutable": "playing",
|
||||
"readable": true,
|
||||
"type": "gint",
|
||||
"writable": true
|
||||
},
|
||||
"max-qp-p": {
|
||||
"blurb": "Maximum allowed QP value for P frames (-1: USAGE default)",
|
||||
"conditionally-available": false,
|
||||
"construct": false,
|
||||
"construct-only": false,
|
||||
"controllable": false,
|
||||
"default": "-1",
|
||||
"max": "51",
|
||||
"min": "-1",
|
||||
"mutable": "playing",
|
||||
"readable": true,
|
||||
"type": "gint",
|
||||
"writable": true
|
||||
},
|
||||
"min-qp-i": {
|
||||
"blurb": "Minimum allowed QP value for I frames (-1: USAGE default)",
|
||||
"conditionally-available": false,
|
||||
"construct": false,
|
||||
"construct-only": false,
|
||||
"controllable": false,
|
||||
"default": "-1",
|
||||
"max": "51",
|
||||
"min": "-1",
|
||||
"mutable": "playing",
|
||||
"readable": true,
|
||||
"type": "gint",
|
||||
"writable": true
|
||||
},
|
||||
"min-qp-p": {
|
||||
"blurb": "Minimum allowed QP value for P frames (-1: USAGE default)",
|
||||
"conditionally-available": false,
|
||||
"construct": false,
|
||||
"construct-only": false,
|
||||
"controllable": false,
|
||||
"default": "-1",
|
||||
"max": "51",
|
||||
"min": "-1",
|
||||
"mutable": "playing",
|
||||
"readable": true,
|
||||
"type": "gint",
|
||||
"writable": true
|
||||
},
|
||||
"preset": {
|
||||
"blurb": "Preset",
|
||||
"conditionally-available": false,
|
||||
"construct": false,
|
||||
"construct-only": false,
|
||||
"controllable": false,
|
||||
"default": "default (-1)",
|
||||
"mutable": "playing",
|
||||
"readable": true,
|
||||
"type": "GstAmfH265EncPreset",
|
||||
"writable": true
|
||||
},
|
||||
"qp-i": {
|
||||
"blurb": "Constant QP for I frames",
|
||||
"conditionally-available": false,
|
||||
"construct": false,
|
||||
"construct-only": false,
|
||||
"controllable": false,
|
||||
"default": "26",
|
||||
"max": "51",
|
||||
"min": "0",
|
||||
"mutable": "playing",
|
||||
"readable": true,
|
||||
"type": "guint",
|
||||
"writable": true
|
||||
},
|
||||
"qp-p": {
|
||||
"blurb": "Constant QP for P frames",
|
||||
"conditionally-available": false,
|
||||
"construct": false,
|
||||
"construct-only": false,
|
||||
"controllable": false,
|
||||
"default": "26",
|
||||
"max": "51",
|
||||
"min": "0",
|
||||
"mutable": "playing",
|
||||
"readable": true,
|
||||
"type": "guint",
|
||||
"writable": true
|
||||
},
|
||||
"rate-control": {
|
||||
"blurb": "Rate Control Method",
|
||||
"conditionally-available": false,
|
||||
"construct": false,
|
||||
"construct-only": false,
|
||||
"controllable": false,
|
||||
"default": "default (-1)",
|
||||
"mutable": "playing",
|
||||
"readable": true,
|
||||
"type": "GstAmfH265EncRateControl",
|
||||
"writable": true
|
||||
},
|
||||
"ref-frames": {
|
||||
"blurb": "Number of reference frames",
|
||||
"conditionally-available": false,
|
||||
"construct": false,
|
||||
"construct-only": false,
|
||||
"controllable": false,
|
||||
"default": "1",
|
||||
"max": "16",
|
||||
"min": "1",
|
||||
"mutable": "playing",
|
||||
"readable": true,
|
||||
"type": "guint",
|
||||
"writable": true
|
||||
},
|
||||
"usage": {
|
||||
"blurb": "Target usage",
|
||||
"conditionally-available": false,
|
||||
"construct": false,
|
||||
"construct-only": false,
|
||||
"controllable": false,
|
||||
"default": "transcoding (0)",
|
||||
"mutable": "playing",
|
||||
"readable": true,
|
||||
"type": "GstAmfH265EncUsage",
|
||||
"writable": true
|
||||
}
|
||||
},
|
||||
"rank": "none"
|
||||
}
|
||||
},
|
||||
"filename": "gstamfcodec",
|
||||
"license": "LGPL",
|
||||
"other-types": {
|
||||
"GstAmfEncoder": {
|
||||
"hierarchy": [
|
||||
"GstAmfEncoder",
|
||||
"GstVideoEncoder",
|
||||
"GstElement",
|
||||
"GstObject",
|
||||
"GInitiallyUnowned",
|
||||
"GObject"
|
||||
],
|
||||
"interfaces": [
|
||||
"GstPreset"
|
||||
],
|
||||
"kind": "object"
|
||||
},
|
||||
"GstAmfH264EncPreset": {
|
||||
"kind": "enum",
|
||||
"values": [
|
||||
{
|
||||
"desc": "Default, depends on USAGE",
|
||||
"name": "default",
|
||||
"value": "-1"
|
||||
},
|
||||
{
|
||||
"desc": "Balanced",
|
||||
"name": "balanced",
|
||||
"value": "0"
|
||||
},
|
||||
{
|
||||
"desc": "Speed",
|
||||
"name": "speed",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"desc": "Quality",
|
||||
"name": "quality",
|
||||
"value": "2"
|
||||
}
|
||||
]
|
||||
},
|
||||
"GstAmfH264EncRateControl": {
|
||||
"kind": "enum",
|
||||
"values": [
|
||||
{
|
||||
"desc": "Default, depends on Usage",
|
||||
"name": "default",
|
||||
"value": "-1"
|
||||
},
|
||||
{
|
||||
"desc": "Constant QP",
|
||||
"name": "cqp",
|
||||
"value": "0"
|
||||
},
|
||||
{
|
||||
"desc": "Constant Bitrate",
|
||||
"name": "cbr",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"desc": "Peak Constrained VBR",
|
||||
"name": "vbr",
|
||||
"value": "2"
|
||||
},
|
||||
{
|
||||
"desc": "Latency Constrained VBR",
|
||||
"name": "lcvbr",
|
||||
"value": "3"
|
||||
}
|
||||
]
|
||||
},
|
||||
"GstAmfH264EncUsage": {
|
||||
"kind": "enum",
|
||||
"values": [
|
||||
{
|
||||
"desc": "Transcoding",
|
||||
"name": "transcoding",
|
||||
"value": "0"
|
||||
},
|
||||
{
|
||||
"desc": "Ultra Low Latency",
|
||||
"name": "ultra-low-latency",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"desc": "Low Latency",
|
||||
"name": "low-latency",
|
||||
"value": "2"
|
||||
},
|
||||
{
|
||||
"desc": "Webcam",
|
||||
"name": "webcam",
|
||||
"value": "3"
|
||||
}
|
||||
]
|
||||
},
|
||||
"GstAmfH265EncPreset": {
|
||||
"kind": "enum",
|
||||
"values": [
|
||||
{
|
||||
"desc": "Default, depends on USAGE",
|
||||
"name": "default",
|
||||
"value": "-1"
|
||||
},
|
||||
{
|
||||
"desc": "Quality",
|
||||
"name": "quality",
|
||||
"value": "0"
|
||||
},
|
||||
{
|
||||
"desc": "Balanced",
|
||||
"name": "balanced",
|
||||
"value": "5"
|
||||
},
|
||||
{
|
||||
"desc": "Speed",
|
||||
"name": "speed",
|
||||
"value": "10"
|
||||
}
|
||||
]
|
||||
},
|
||||
"GstAmfH265EncRateControl": {
|
||||
"kind": "enum",
|
||||
"values": [
|
||||
{
|
||||
"desc": "Default, depends on Usage",
|
||||
"name": "default",
|
||||
"value": "-1"
|
||||
},
|
||||
{
|
||||
"desc": "Constant QP",
|
||||
"name": "cqp",
|
||||
"value": "0"
|
||||
},
|
||||
{
|
||||
"desc": "Latency Constrained VBR",
|
||||
"name": "lcvbr",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"desc": "Peak Constrained VBR",
|
||||
"name": "vbr",
|
||||
"value": "2"
|
||||
},
|
||||
{
|
||||
"desc": "Constant Bitrate",
|
||||
"name": "cbr",
|
||||
"value": "3"
|
||||
}
|
||||
]
|
||||
},
|
||||
"GstAmfH265EncUsage": {
|
||||
"kind": "enum",
|
||||
"values": [
|
||||
{
|
||||
"desc": "Transcoding",
|
||||
"name": "transcoding",
|
||||
"value": "0"
|
||||
},
|
||||
{
|
||||
"desc": "Ultra Low Latency",
|
||||
"name": "ultra-low-latency",
|
||||
"value": "1"
|
||||
},
|
||||
{
|
||||
"desc": "Low Latency",
|
||||
"name": "low-latency",
|
||||
"value": "2"
|
||||
},
|
||||
{
|
||||
"desc": "Webcam",
|
||||
"name": "webcam",
|
||||
"value": "3"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"package": "GStreamer Bad Plug-ins",
|
||||
"source": "gst-plugins-bad",
|
||||
"tracers": {},
|
||||
"url": "Unknown package origin"
|
||||
},
|
||||
"aom": {
|
||||
"description": "AOM plugin library",
|
||||
"elements": {
|
||||
|
|
|
@ -117,6 +117,8 @@ gst_amf_encoder_class_init (GstAmfEncoderClass * klass)
|
|||
|
||||
GST_DEBUG_CATEGORY_INIT (gst_amf_encoder_debug,
|
||||
"amfencoder", 0, "amfencoder");
|
||||
|
||||
gst_type_mark_as_plugin_api (GST_TYPE_AMF_ENCODER, (GstPluginAPIFlags) 0);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -17,6 +17,23 @@
|
|||
* Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
/**
|
||||
* SECTION:element-amfh264enc
|
||||
* @title: amfh264enc
|
||||
* @short_description: An AMD AMF API based H.264 video encoder
|
||||
*
|
||||
* amfh264enc element encodes raw video stream into compressed H.264 bitstream
|
||||
* via AMD AMF API.
|
||||
*
|
||||
* ## Example launch line
|
||||
* ```
|
||||
* gst-launch-1.0 videotestsrc num-buffers=100 ! amfh264enc ! h264parse ! mp4mux ! filesink location=encoded.mp4
|
||||
* ```
|
||||
*
|
||||
* Since: 1.22
|
||||
*
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
@ -62,16 +79,46 @@ typedef struct
|
|||
guint valign;
|
||||
} GstAmfH264EncDeviceCaps;
|
||||
|
||||
/**
|
||||
* GstAmfH264EncUsage:
|
||||
*
|
||||
* Encoder usages
|
||||
*
|
||||
* Since: 1.22
|
||||
*/
|
||||
#define GST_TYPE_AMF_H264_ENC_USAGE (gst_amf_h264_enc_usage_get_type ())
|
||||
static GType
|
||||
gst_amf_h264_enc_usage_get_type (void)
|
||||
{
|
||||
static GType usage_type = 0;
|
||||
static const GEnumValue usages[] = {
|
||||
/**
|
||||
* GstAmfH264EncUsage::transcoding:
|
||||
*
|
||||
* Transcoding usage
|
||||
*/
|
||||
{AMF_VIDEO_ENCODER_USAGE_TRANSCODING, "Transcoding", "transcoding"},
|
||||
|
||||
/**
|
||||
* GstAmfH264EncUsage::ultra-low-latency:
|
||||
*
|
||||
* Ultra Low Latency usage
|
||||
*/
|
||||
{AMF_VIDEO_ENCODER_USAGE_ULTRA_LOW_LATENCY, "Ultra Low Latency",
|
||||
"ultra-low-latency"},
|
||||
|
||||
/**
|
||||
* GstAmfH264EncUsage::low-latency:
|
||||
*
|
||||
* Low Latency usage
|
||||
*/
|
||||
{AMF_VIDEO_ENCODER_USAGE_LOW_LATENCY, "Low Latency", "low-latency"},
|
||||
|
||||
/**
|
||||
* GstAmfH264EncUsage::webcam:
|
||||
*
|
||||
* Webcam usage
|
||||
*/
|
||||
{AMF_VIDEO_ENCODER_USAGE_WEBCAM, "Webcam", "webcam"},
|
||||
{0, nullptr, nullptr}
|
||||
};
|
||||
|
@ -84,18 +131,54 @@ gst_amf_h264_enc_usage_get_type (void)
|
|||
return usage_type;
|
||||
}
|
||||
|
||||
/**
|
||||
* GstAmfH264EncRateControl:
|
||||
*
|
||||
* Rate control methods
|
||||
*
|
||||
* Since: 1.22
|
||||
*/
|
||||
#define GST_TYPE_AMF_H264_ENC_RATE_CONTROL (gst_amf_h264_enc_rate_control_get_type ())
|
||||
static GType
|
||||
gst_amf_h264_enc_rate_control_get_type (void)
|
||||
{
|
||||
static GType rate_control_type = 0;
|
||||
static const GEnumValue rate_controls[] = {
|
||||
/**
|
||||
* GstAmfH264EncRateControl::default:
|
||||
*
|
||||
* Default rate control method depending on usage
|
||||
*/
|
||||
{AMF_VIDEO_ENCODER_RATE_CONTROL_METHOD_UNKNOWN, "Default, depends on Usage",
|
||||
"default"},
|
||||
|
||||
/**
|
||||
* GstAmfH264EncRateControl::cqp:
|
||||
*
|
||||
* Constant QP
|
||||
*/
|
||||
{AMF_VIDEO_ENCODER_RATE_CONTROL_METHOD_CONSTANT_QP, "Constant QP", "cqp"},
|
||||
|
||||
/**
|
||||
* GstAmfH264EncRateControl::cbr:
|
||||
*
|
||||
* Constant Bitrate
|
||||
*/
|
||||
{AMF_VIDEO_ENCODER_RATE_CONTROL_METHOD_CBR, "Constant Bitrate", "cbr"},
|
||||
|
||||
/**
|
||||
* GstAmfH264EncRateControl::vbr:
|
||||
*
|
||||
* Peak Constrained Variable Bitrate
|
||||
*/
|
||||
{AMF_VIDEO_ENCODER_RATE_CONTROL_METHOD_PEAK_CONSTRAINED_VBR,
|
||||
"Peak Constrained VBR", "vbr"},
|
||||
|
||||
/**
|
||||
* GstAmfH264EncRateControl::lcvbr:
|
||||
*
|
||||
* Latency Constrained Variable Bitrate
|
||||
*/
|
||||
{AMF_VIDEO_ENCODER_RATE_CONTROL_METHOD_LATENCY_CONSTRAINED_VBR,
|
||||
"Latency Constrained VBR", "lcvbr"},
|
||||
{0, nullptr, nullptr}
|
||||
|
@ -110,18 +193,47 @@ gst_amf_h264_enc_rate_control_get_type (void)
|
|||
return rate_control_type;
|
||||
}
|
||||
|
||||
/**
|
||||
* GstAmfH264EncPreset:
|
||||
*
|
||||
* Encoding quality presets
|
||||
*
|
||||
* Since: 1.22
|
||||
*/
|
||||
#define AMF_VIDEO_ENCODER_QUALITY_PRESET_UNKNOWN -1
|
||||
|
||||
#define GST_TYPE_AMF_H264_ENC_PRESET (gst_amf_h264_enc_preset_get_type ())
|
||||
static GType
|
||||
gst_amf_h264_enc_preset_get_type (void)
|
||||
{
|
||||
static GType preset_type = 0;
|
||||
static const GEnumValue presets[] = {
|
||||
/**
|
||||
* GstAmfH264EncRateControl::default:
|
||||
*
|
||||
* Default preset depends on usage
|
||||
*/
|
||||
{AMF_VIDEO_ENCODER_QUALITY_PRESET_UNKNOWN, "Default, depends on USAGE",
|
||||
"default"},
|
||||
|
||||
/**
|
||||
* GstAmfH264EncRateControl::balanced:
|
||||
*
|
||||
* Balanced preset
|
||||
*/
|
||||
{AMF_VIDEO_ENCODER_QUALITY_PRESET_BALANCED, "Balanced", "balanced"},
|
||||
|
||||
/**
|
||||
* GstAmfH264EncRateControl::speed:
|
||||
*
|
||||
* Speed oriented preset
|
||||
*/
|
||||
{AMF_VIDEO_ENCODER_QUALITY_PRESET_SPEED, "Speed", "speed"},
|
||||
|
||||
/**
|
||||
* GstAmfH264EncRateControl::quality:
|
||||
*
|
||||
* Quality oriented preset
|
||||
*/
|
||||
{AMF_VIDEO_ENCODER_QUALITY_PRESET_QUALITY, "Quality", "quality"},
|
||||
{0, nullptr, nullptr}
|
||||
};
|
||||
|
@ -332,6 +444,13 @@ gst_amf_h264_enc_class_init (GstAmfH264EncClass * klass, gpointer data)
|
|||
gst_caps_unref (cdata->sink_caps);
|
||||
gst_caps_unref (cdata->src_caps);
|
||||
g_free (cdata);
|
||||
|
||||
gst_type_mark_as_plugin_api (GST_TYPE_AMF_H264_ENC_USAGE,
|
||||
(GstPluginAPIFlags) 0);
|
||||
gst_type_mark_as_plugin_api (GST_TYPE_AMF_H264_ENC_RATE_CONTROL,
|
||||
(GstPluginAPIFlags) 0);
|
||||
gst_type_mark_as_plugin_api (GST_TYPE_AMF_H264_ENC_PRESET,
|
||||
(GstPluginAPIFlags) 0);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -1464,6 +1583,9 @@ gst_amf_h264_enc_register_d3d11 (GstPlugin * plugin, GstD3D11Device * device,
|
|||
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);
|
||||
|
||||
|
|
|
@ -17,6 +17,23 @@
|
|||
* Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
/**
|
||||
* SECTION:element-amfh265enc
|
||||
* @title: amfh265enc
|
||||
* @short_description: An AMD AMF API based H.265 video encoder
|
||||
*
|
||||
* amfh265enc element encodes raw video stream into compressed H.265 bitstream
|
||||
* via AMD AMF API.
|
||||
*
|
||||
* ## Example launch line
|
||||
* ```
|
||||
* gst-launch-1.0 videotestsrc num-buffers=100 ! amfh265enc ! h265parse ! mp4mux ! filesink location=encoded.mp4
|
||||
* ```
|
||||
*
|
||||
* Since: 1.22
|
||||
*
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
@ -59,16 +76,46 @@ typedef struct
|
|||
guint valign;
|
||||
} GstAmfH265EncDeviceCaps;
|
||||
|
||||
/**
|
||||
* GstAmfH265EncUsage:
|
||||
*
|
||||
* Encoder usages
|
||||
*
|
||||
* Since: 1.22
|
||||
*/
|
||||
#define GST_TYPE_AMF_H265_ENC_USAGE (gst_amf_h265_enc_usage_get_type ())
|
||||
static GType
|
||||
gst_amf_h265_enc_usage_get_type (void)
|
||||
{
|
||||
static GType usage_type = 0;
|
||||
static const GEnumValue usages[] = {
|
||||
/**
|
||||
* GstAmfH265EncUsage::transcoding:
|
||||
*
|
||||
* Transcoding usage
|
||||
*/
|
||||
{AMF_VIDEO_ENCODER_HEVC_USAGE_TRANSCODING, "Transcoding", "transcoding"},
|
||||
|
||||
/**
|
||||
* GstAmfH265EncUsage::ultra-low-latency:
|
||||
*
|
||||
* Ultra Low Latency usage
|
||||
*/
|
||||
{AMF_VIDEO_ENCODER_HEVC_USAGE_ULTRA_LOW_LATENCY, "Ultra Low Latency",
|
||||
"ultra-low-latency"},
|
||||
|
||||
/**
|
||||
* GstAmfH265EncUsage::low-latency:
|
||||
*
|
||||
* Low Latency usage
|
||||
*/
|
||||
{AMF_VIDEO_ENCODER_HEVC_USAGE_LOW_LATENCY, "Low Latency", "low-latency"},
|
||||
|
||||
/**
|
||||
* GstAmfH265EncUsage::webcam:
|
||||
*
|
||||
* Webcam usage
|
||||
*/
|
||||
{AMF_VIDEO_ENCODER_HEVC_USAGE_WEBCAM, "Webcam", "webcam"},
|
||||
{0, nullptr, nullptr}
|
||||
};
|
||||
|
@ -81,21 +128,56 @@ gst_amf_h265_enc_usage_get_type (void)
|
|||
return usage_type;
|
||||
}
|
||||
|
||||
/**
|
||||
* GstAmfH265EncRateControl:
|
||||
*
|
||||
* Rate control methods
|
||||
*
|
||||
* Since: 1.22
|
||||
*/
|
||||
#define GST_TYPE_AMF_H265_ENC_RATE_CONTROL (gst_amf_h265_enc_rate_control_get_type ())
|
||||
static GType
|
||||
gst_amf_h265_enc_rate_control_get_type (void)
|
||||
{
|
||||
static GType rate_control_type = 0;
|
||||
static const GEnumValue rate_controls[] = {
|
||||
/**
|
||||
* GstAmfH265EncRateControl::default:
|
||||
*
|
||||
* Default rate control method depending on usage
|
||||
*/
|
||||
{AMF_VIDEO_ENCODER_HEVC_RATE_CONTROL_METHOD_UNKNOWN,
|
||||
"Default, depends on Usage",
|
||||
"default"},
|
||||
"Default, depends on Usage", "default"},
|
||||
|
||||
/**
|
||||
* GstAmfH265EncRateControl::cqp:
|
||||
*
|
||||
* Constant QP
|
||||
*/
|
||||
{AMF_VIDEO_ENCODER_HEVC_RATE_CONTROL_METHOD_CONSTANT_QP, "Constant QP",
|
||||
"cqp"},
|
||||
|
||||
/**
|
||||
* GstAmfH265EncRateControl::lcvbr:
|
||||
*
|
||||
* Latency Constrained Variable Bitrate
|
||||
*/
|
||||
{AMF_VIDEO_ENCODER_HEVC_RATE_CONTROL_METHOD_LATENCY_CONSTRAINED_VBR,
|
||||
"Latency Constrained VBR", "lcvbr"},
|
||||
|
||||
/**
|
||||
* GstAmfH265EncRateControl::vbr:
|
||||
*
|
||||
* Peak Constrained Variable Bitrate
|
||||
*/
|
||||
{AMF_VIDEO_ENCODER_HEVC_RATE_CONTROL_METHOD_PEAK_CONSTRAINED_VBR,
|
||||
"Peak Constrained VBR", "vbr"},
|
||||
|
||||
/**
|
||||
* GstAmfH265EncRateControl::cbr:
|
||||
*
|
||||
* Constant Bitrate
|
||||
*/
|
||||
{AMF_VIDEO_ENCODER_HEVC_RATE_CONTROL_METHOD_CBR, "Constant Bitrate", "cbr"},
|
||||
{0, nullptr, nullptr}
|
||||
};
|
||||
|
@ -109,18 +191,47 @@ gst_amf_h265_enc_rate_control_get_type (void)
|
|||
return rate_control_type;
|
||||
}
|
||||
|
||||
/**
|
||||
* GstAmfH265EncPreset:
|
||||
*
|
||||
* Encoding quality presets
|
||||
*
|
||||
* Since: 1.22
|
||||
*/
|
||||
#define AMF_VIDEO_ENCODER_HEVC_QUALITY_PRESET_UNKNOWN -1
|
||||
|
||||
#define GST_TYPE_AMF_H265_ENC_PRESET (gst_amf_h265_enc_preset_get_type ())
|
||||
static GType
|
||||
gst_amf_h265_enc_preset_get_type (void)
|
||||
{
|
||||
static GType preset_type = 0;
|
||||
static const GEnumValue presets[] = {
|
||||
/**
|
||||
* GstAmfH265EncRateControl::default:
|
||||
*
|
||||
* Default preset depends on usage
|
||||
*/
|
||||
{AMF_VIDEO_ENCODER_HEVC_QUALITY_PRESET_UNKNOWN, "Default, depends on USAGE",
|
||||
"default"},
|
||||
|
||||
/**
|
||||
* GstAmfH265EncRateControl::quality:
|
||||
*
|
||||
* Quality oriented preset
|
||||
*/
|
||||
{AMF_VIDEO_ENCODER_HEVC_QUALITY_PRESET_QUALITY, "Quality", "quality"},
|
||||
/**
|
||||
*
|
||||
* GstAmfH265EncRateControl::balanced:
|
||||
*
|
||||
* Balanced preset
|
||||
*/
|
||||
{AMF_VIDEO_ENCODER_HEVC_QUALITY_PRESET_BALANCED, "Balanced", "balanced"},
|
||||
|
||||
/**
|
||||
* GstAmfH265EncRateControl::speed:
|
||||
*
|
||||
* Speed oriented preset
|
||||
*/
|
||||
{AMF_VIDEO_ENCODER_HEVC_QUALITY_PRESET_SPEED, "Speed", "speed"},
|
||||
{0, nullptr, nullptr}
|
||||
};
|
||||
|
@ -329,6 +440,13 @@ gst_amf_h265_enc_class_init (GstAmfH265EncClass * klass, gpointer data)
|
|||
gst_caps_unref (cdata->sink_caps);
|
||||
gst_caps_unref (cdata->src_caps);
|
||||
g_free (cdata);
|
||||
|
||||
gst_type_mark_as_plugin_api (GST_TYPE_AMF_H265_ENC_USAGE,
|
||||
(GstPluginAPIFlags) 0);
|
||||
gst_type_mark_as_plugin_api (GST_TYPE_AMF_H265_ENC_RATE_CONTROL,
|
||||
(GstPluginAPIFlags) 0);
|
||||
gst_type_mark_as_plugin_api (GST_TYPE_AMF_H265_ENC_PRESET,
|
||||
(GstPluginAPIFlags) 0);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -1078,6 +1196,9 @@ gst_amf_h265_enc_register_d3d11 (GstPlugin * plugin, GstD3D11Device * device,
|
|||
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);
|
||||
|
||||
|
|
|
@ -17,6 +17,12 @@
|
|||
* Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
/**
|
||||
* plugin-amfcodec:
|
||||
*
|
||||
* Since: 1.22
|
||||
*/
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include "config.h"
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue