mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 08:46:40 +00:00
amfcodec: fix setting quality presets
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2159>
This commit is contained in:
parent
25b37c33dd
commit
2df32360b2
1 changed files with 10 additions and 0 deletions
|
@ -849,6 +849,16 @@ gst_amf_h264_enc_set_format (GstAmfEncoder * encoder,
|
|||
goto error;
|
||||
}
|
||||
|
||||
if (self->preset > AMF_VIDEO_ENCODER_QUALITY_PRESET_UNKNOWN) {
|
||||
result = comp->SetProperty (AMF_VIDEO_ENCODER_QUALITY_PRESET,
|
||||
(amf_int64) self->preset);
|
||||
if (result != AMF_OK) {
|
||||
GST_ERROR_OBJECT (self, "Failed to set quality preset, result %"
|
||||
GST_AMF_RESULT_FORMAT, GST_AMF_RESULT_ARGS (result));
|
||||
goto error;
|
||||
}
|
||||
}
|
||||
|
||||
result = comp->SetProperty (AMF_VIDEO_ENCODER_PROFILE, (amf_int64) profile);
|
||||
if (result != AMF_OK) {
|
||||
GST_ERROR_OBJECT (self, "Failed to set profile, result %"
|
||||
|
|
Loading…
Reference in a new issue