api: Also check "USE_PLAYBIN3" env

Some mobile distros seem to be under assumption that playbin3 is required to
get HW accel and setting this env by default is good idea. Both are wrong.

Check this env presence to avoid problems as factory will always return
playbin3 if set (even if playbin2 was requested).
This commit is contained in:
Rafał Dzięgiel
2022-04-11 19:43:59 +02:00
parent f8fe49a809
commit 3fadf13125

View File

@@ -3222,6 +3222,10 @@ gst_clapper_main (gpointer data)
_update_from_env (&self->use_playbin3, "GST_CLAPPER_USE_PLAYBIN3");
/* Takes precedence over `GST_CLAPPER_USE_PLAYBIN3` as it
* influences element factory behavior */
_update_from_env (&self->use_playbin3, "USE_PLAYBIN3");
if (self->use_playbin3) {
GST_DEBUG_OBJECT (self, "playbin3 enabled");
self->playbin = gst_element_factory_make ("playbin3", "playbin3");