mirror of
https://github.com/Rafostar/clapper.git
synced 2025-08-29 15:22:11 +02:00
Further alter default plugin feature ranks on startup
Too many problems with VAAPI decodebin, meanwhile VA works fine and there is already a pending MR on GStreamer to enable it by default, so we do that a little early. We also do promise working HW accel out of box, so enable all common NVDEC elements too. They can always be disabled back in player preferences window if any problems do happen. We can now remove the alternations of v4l2codecs as those are PRIMARY+1 by default and we now require GStreamer 1.20+ so no need for version checking there too. Fixes #236
This commit is contained in:
20
lib/gst/clapper/gstclapper.c
vendored
20
lib/gst/clapper/gstclapper.c
vendored
@@ -3550,19 +3550,23 @@ gst_clapper_prepare_gstreamer (void)
|
||||
|
||||
GST_DEBUG ("Preparing GStreamer plugins");
|
||||
|
||||
/* Too many problems with VAAPI decodebin, meanwhile VA works
|
||||
* fine and there is already a pending MR on GStreamer to enable
|
||||
* it by default, so we do that a little early */
|
||||
if (gst_clapper_has_plugin_with_features ("va")) {
|
||||
gst_clapper_set_feature_rank_versioned ("vah264dec", rank, 1, 19, 1);
|
||||
gst_clapper_set_feature_rank_versioned ("vampeg2dec", rank, 1, 19, 1);
|
||||
gst_clapper_set_feature_rank ("vampeg2dec", rank);
|
||||
gst_clapper_set_feature_rank ("vah264dec", rank);
|
||||
gst_clapper_set_feature_rank ("vah265dec", rank);
|
||||
gst_clapper_set_feature_rank ("vavp8dec", rank);
|
||||
gst_clapper_set_feature_rank ("vavp9dec", rank);
|
||||
gst_clapper_set_feature_rank ("vaav1dec", rank);
|
||||
}
|
||||
/* We do promise working HW accel out of box, so enable NVDEC too */
|
||||
if (gst_clapper_has_plugin_with_features ("nvcodec")) {
|
||||
gst_clapper_set_feature_rank ("nvh264dec", rank + 4);
|
||||
gst_clapper_set_feature_rank ("nvh265dec", rank + 4);
|
||||
}
|
||||
if (gst_clapper_has_plugin_with_features ("v4l2codecs")) {
|
||||
if (!gst_clapper_set_feature_rank_versioned ("v4l2slh264dec", rank + 10, 1, 19, 1))
|
||||
gst_clapper_set_feature_rank ("v4l2slh264dec", GST_RANK_NONE);
|
||||
if (!gst_clapper_set_feature_rank_versioned ("v4l2slvp8dec", rank + 10, 1, 19, 2))
|
||||
gst_clapper_set_feature_rank ("v4l2slvp8dec", GST_RANK_NONE);
|
||||
gst_clapper_set_feature_rank ("nvvp8dec", rank + 4);
|
||||
gst_clapper_set_feature_rank ("nvvp9dec", rank + 4);
|
||||
}
|
||||
|
||||
/* After setting defaults, update them from ENV */
|
||||
|
Reference in New Issue
Block a user