vaapi: register vaapipostproc only if supported
Query the GstVaapiDisplay to know if the driver supports video postprocessing. If does, then register vaapipostproc and vaapidecodebin elements. This patch will simplify the design of vaapidecodebin. https://bugzilla.gnome.org/show_bug.cgi?id=724352
This commit is contained in:
parent
90b0ba7e2b
commit
c60312c78f
@ -93,8 +93,14 @@ plugin_init (GstPlugin * plugin)
|
||||
|
||||
gst_vaapidecode_register (plugin);
|
||||
|
||||
gst_element_register (plugin, "vaapipostproc",
|
||||
GST_RANK_PRIMARY, GST_TYPE_VAAPIPOSTPROC);
|
||||
if (gst_vaapi_display_has_video_processing (display)) {
|
||||
gst_element_register (plugin, "vaapipostproc",
|
||||
GST_RANK_PRIMARY, GST_TYPE_VAAPIPOSTPROC);
|
||||
|
||||
gst_element_register (plugin, "vaapidecodebin",
|
||||
GST_RANK_PRIMARY + 2, GST_TYPE_VAAPI_DECODE_BIN);
|
||||
}
|
||||
|
||||
gst_element_register (plugin, "vaapisink",
|
||||
GST_RANK_PRIMARY, GST_TYPE_VAAPISINK);
|
||||
#if USE_ENCODERS
|
||||
@ -120,9 +126,6 @@ plugin_init (GstPlugin * plugin)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
gst_element_register (plugin, "vaapidecodebin",
|
||||
GST_RANK_PRIMARY + 2, GST_TYPE_VAAPI_DECODE_BIN);
|
||||
|
||||
gst_vaapi_display_unref (display);
|
||||
|
||||
return TRUE;
|
||||
|
Loading…
x
Reference in New Issue
Block a user