mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 19:51:11 +00:00
avvideenc,avvidedec: Filtering hardware en/decoder by flag
... instead of filtering them by hardcoded string compare.
This commit is contained in:
parent
80c8c05457
commit
30d0674e7d
2 changed files with 22 additions and 32 deletions
|
@ -2341,6 +2341,22 @@ gst_ffmpegviddec_register (GstPlugin * plugin)
|
|||
continue;
|
||||
}
|
||||
|
||||
/* Skip hardware or hybrid (hardware with software fallback) */
|
||||
if ((in_plugin->capabilities & AV_CODEC_CAP_HARDWARE) ==
|
||||
AV_CODEC_CAP_HARDWARE) {
|
||||
GST_DEBUG
|
||||
("Ignoring hardware decoder %s. We can't handle this outside of ffmpeg",
|
||||
in_plugin->name);
|
||||
continue;
|
||||
}
|
||||
|
||||
if ((in_plugin->capabilities & AV_CODEC_CAP_HYBRID) == AV_CODEC_CAP_HYBRID) {
|
||||
GST_DEBUG
|
||||
("Ignoring hybrid decoder %s. We can't handle this outside of ffmpeg",
|
||||
in_plugin->name);
|
||||
continue;
|
||||
}
|
||||
|
||||
/* No vdpau plugins until we can figure out how to properly use them
|
||||
* outside of ffmpeg. */
|
||||
if (g_str_has_suffix (in_plugin->name, "_vdpau")) {
|
||||
|
@ -2371,20 +2387,6 @@ gst_ffmpegviddec_register (GstPlugin * plugin)
|
|||
continue;
|
||||
}
|
||||
|
||||
if (g_str_has_suffix (in_plugin->name, "_cuvid")) {
|
||||
GST_DEBUG
|
||||
("Ignoring CUVID decoder %s. We can't handle this outside of ffmpeg",
|
||||
in_plugin->name);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (g_str_has_suffix (in_plugin->name, "_v4l2m2m")) {
|
||||
GST_DEBUG
|
||||
("Ignoring V4L2 mem-to-mem decoder %s. We can't handle this outside of ffmpeg",
|
||||
in_plugin->name);
|
||||
continue;
|
||||
}
|
||||
|
||||
GST_DEBUG ("Trying plugin %s [%s]", in_plugin->name, in_plugin->long_name);
|
||||
|
||||
/* no codecs for which we're GUARANTEED to have better alternatives */
|
||||
|
|
|
@ -932,30 +932,18 @@ gst_ffmpegvidenc_register (GstPlugin * plugin)
|
|||
continue;
|
||||
}
|
||||
|
||||
if (strstr (in_plugin->name, "vaapi")) {
|
||||
/* Skip hardware or hybrid (hardware with software fallback) */
|
||||
if ((in_plugin->capabilities & AV_CODEC_CAP_HARDWARE) ==
|
||||
AV_CODEC_CAP_HARDWARE) {
|
||||
GST_DEBUG
|
||||
("Ignoring VAAPI encoder %s. We can't handle this outside of ffmpeg",
|
||||
("Ignoring hardware encoder %s. We can't handle this outside of ffmpeg",
|
||||
in_plugin->name);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (strstr (in_plugin->name, "nvenc")) {
|
||||
if ((in_plugin->capabilities & AV_CODEC_CAP_HYBRID) == AV_CODEC_CAP_HYBRID) {
|
||||
GST_DEBUG
|
||||
("Ignoring nvenc encoder %s. We can't handle this outside of ffmpeg",
|
||||
in_plugin->name);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (g_str_has_suffix (in_plugin->name, "_qsv")) {
|
||||
GST_DEBUG
|
||||
("Ignoring qsv encoder %s. We can't handle this outside of ffmpeg",
|
||||
in_plugin->name);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (g_str_has_suffix (in_plugin->name, "_v4l2m2m")) {
|
||||
GST_DEBUG
|
||||
("Ignoring V4L2 mem-to-mem encoder %s. We can't handle this outside of ffmpeg",
|
||||
("Ignoring hybrid encoder %s. We can't handle this outside of ffmpeg",
|
||||
in_plugin->name);
|
||||
continue;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue