From 3fadf131259a9af4ec51f894edca6b5bf2e236f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Dzi=C4=99giel?= Date: Mon, 11 Apr 2022 19:43:59 +0200 Subject: [PATCH] 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). --- lib/gst/clapper/gstclapper.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/gst/clapper/gstclapper.c b/lib/gst/clapper/gstclapper.c index d102486a..71d0d9f7 100644 --- a/lib/gst/clapper/gstclapper.c +++ b/lib/gst/clapper/gstclapper.c @@ -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");