Re: Question about decodebin3 and decodebin availability in Android GStreamer 1.24

Aleksandr Slobodeniuk via gstreamer-devel <[email protected]> Sun, 28 Sep 2025 00:15:10 +0200
Newsgroups gmane.comp.video.gstreamer.devel
Message-ID <CAHuwaLAX213nYj2YLDg3ytCLhjyME5dYVY8oTgQanqNNQQ_d=Q@mail.gmail.com>
--000000000000f416f8063fcfbc03
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Hi, maybe some theory can help:

1. Both decodebin and decodebin3 elements reside in
`lib/gstreamer-1.0/libgstplayback.a`, this library has to be linked. Can
also be found though pkg-config as `pkg-config --libs gstplayback` if the
PKG_CONFIG_PATH includes `lib/gstreamer-1.0/pkgconfig/`.
2. You can register the element manually by calling

GST_ELEMENT_REGISTER_DECLARE (decodebin3);
GST_ELEMENT_REGISTER (decodebin3, NULL);

or the entire plugin by

 GST_PLUGIN_STATIC_DECLARE (playback);
 GST_PLUGIN_STATIC_REGISTER (playback);

Same should be done with any other element you want to be available in the
registry.
OR: There is a canonical way to init all the plugins at once, you probably
use that one - gst_init_static_plugins().

Now, following the release notes of 1.24:

> Add full static build support, including on Windows: Allow a project to
use gstreamer-full as a static library and link to create a binary without
dependencies. Introduce the meson build option gst-full-target-type to
select the build type: dynamic (default) or static

If I understand correctly starting from 1.24 there's a way to build all the
plugins into one big static library and init them in one call as well.
I haven't ever tried but it looks like the steps are:
- add -Dgst-full-target-type=3Dstatic_library -Dgst-full=3Denabled to meson
- link with libgstreamer-full-1.0.a
- call `gst_init_static_plugins()`

Best Regards,

Aleksandr Slobodeniuk

Senior Software Engineer

+34 936 03 42 35

Carrer de Jordi Girona, 29

08034, Barcelona, Spain.

<http://fluendo.com>

<https://es.linkedin.com/company/fluendo>   <https://twitter.com/fluendo>
<https://github.com/fluendo>


On Sat, Sep 27, 2025 at 12:15=E2=80=AFPM =D0=90=D1=80=D1=82=D0=B5=D0=BC=D0=
=B8=D0=B9 =D0=92=D0=B5=D0=BB=D0=B8=D1=87=D0=BA=D0=BE via gstreamer-devel <
[email protected]> wrote:

> Hello GStreamer developers,
>
> I am working on an Android project using GStreamer 1.24 and have
> encountered an issue with decodebin3 and decodebin.
>
> In GStreamer 1.22, I was able to create a decodebin element on Android
> without issues. However, after upgrading to 1.24, the call:
>
> gst_element_factory_make("decodebin3", "decodebin3")
> and
> gst_eleement_factory_make("decodebin", "decodebin")
>
> returns NULL.
>
> I have verified the libraries included in my Android build, and the
> following are present:
>
>    -
>
>    libgstplay-1.0.a
>    -
>
>    libgstplayer-1.0.a
>    -
>
>    libgstbase-1.0.a
>    -
>
>    libgstaudio-1.0.a
>
> Despite this, decodebin3 is unavailable.
>
> According to the GStreamer 1.24 release notes, decodebin3 and playbin3
> are now the recommended components and stable:
>
> =E2=80=9CPlaybin3 and decodebin3 are now stable and the default in gst-pl=
ay-1.0,
> GstPlay/GstPlayer =E2=80=A6 Application developers are strongly recommend=
ed to
> switch to using those components instead of the legacy playbin and
> (uri)decodebin.=E2=80=9D
>
> My questions are:
>
>    1.
>
>    Should decodebin3 be included by default in the Android universal
>    static build, or is it necessary to explicitly enable some modules/plu=
gins
>    during the Cerbero build?
>    2.
>
>    If it is not included by default, which libraries or plugins need to
>    be linked so that decodebin3  and decodebin become available on
>    Android?
>    3.
>
>    Is there a recommended way to build a static Android GStreamer 1.24
>    that ensures decodebin3 and decodebin are included, similar to how it
>    worked in GStreamer 1.22?
>
> Any guidance would be greatly appreciated, as this is critical for
> upgrading our Android application to GStreamer 1.24.
>
> Thank you very much for your time and support.
>

--000000000000f416f8063fcfbc03
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>Hi, maybe some theory can help:<br><br></div><div>1. =
Both decodebin and decodebin3 elements reside in `lib/gstreamer-1.0/libgstp=
layback.a`, this library has to be linked. Can also be found though pkg-con=
fig as `pkg-config --libs gstplayback` if the PKG_CONFIG_PATH includes `lib=
/gstreamer-1.0/pkgconfig/`.=C2=A0</div><div>2. You can register the element=
 manually by calling<br><br></div><div>GST_ELEMENT_REGISTER_DECLARE (decode=
bin3);</div><div>GST_ELEMENT_REGISTER (decodebin3, NULL);<br><br>or the ent=
ire plugin by</div><div><br></div><div>=C2=A0GST_PLUGIN_STATIC_DECLARE (pla=
yback);<br>=C2=A0GST_PLUGIN_STATIC_REGISTER (playback);<br><br>Same should =
be done with any other element you want to be available in the registry.</d=
iv><div>OR: There is a canonical way to init all the plugins at once, you p=
robably use that one -=C2=A0gst_init_static_plugins().</div><div><br>Now, f=
ollowing the release notes of 1.24:<br><br>&gt; Add full static build suppo=
rt, including on Windows: Allow a project to use gstreamer-full as a static=
 library and link to create a binary without dependencies. Introduce the me=
son build option gst-full-target-type to select the build type: dynamic (de=
fault) or static<br><br>If I understand correctly starting from 1.24 there&=
#39;s a way to build all the plugins into one big static library and init t=
hem in one call as well.<br>I haven&#39;t ever tried but it looks like the =
steps are:</div><div>- add -Dgst-full-target-type=3Dstatic_library -Dgst-fu=
ll=3Denabled to meson</div><div>- link with libgstreamer-full-1.0.a</div><d=
iv>- call `gst_init_static_plugins()`<br><br>Best Regards,<br><br></div><di=
v><div dir=3D"ltr" class=3D"gmail_signature" data-smartmail=3D"gmail_signat=
ure"><div dir=3D"ltr"><span><div dir=3D"ltr" style=3D"margin-left:0pt" alig=
n=3D"left"><table style=3D"border:none;border-collapse:collapse"><colgroup>=
<col width=3D"220"><col width=3D"175"></colgroup><tbody><tr style=3D"height=
:50.25pt"><td style=3D"border-left:solid #ffffff 1pt;border-right:solid #ff=
ffff 1pt;border-bottom:solid #f915ab 1pt;border-top:solid #ffffff 1pt;verti=
cal-align:top;padding:5pt 5pt 5pt 5pt;overflow:hidden"><p dir=3D"ltr" style=
=3D"line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style=3D"font-=
size:10pt;font-family:&quot;DM Sans&quot;,sans-serif;color:rgb(0,0,0);backg=
round-color:transparent;font-weight:700;vertical-align:baseline">Aleksandr =
Slobodeniuk</span></p><p dir=3D"ltr" style=3D"line-height:1.2;margin-top:0p=
t;margin-bottom:0pt"><span style=3D"font-size:8pt;font-family:&quot;DM Sans=
&quot;,sans-serif;color:rgb(0,0,0);background-color:transparent;vertical-al=
ign:baseline">Senior Software Engineer</span></p></td><td style=3D"border-l=
eft:solid #ffffff 1pt;border-right:solid #ffffff 1pt;border-bottom:solid #f=
915ab 1pt;border-top:solid #ffffff 1pt;vertical-align:top;padding:5pt 5pt 5=
pt 5pt;overflow:hidden"><p dir=3D"ltr" style=3D"line-height:1.38;margin-top=
:0pt;margin-bottom:0pt"><span style=3D"font-size:8pt;font-family:&quot;DM S=
ans&quot;,sans-serif;color:rgb(249,21,171);background-color:transparent;fon=
t-weight:700;vertical-align:baseline">+34 936 03 42 35</span></p><p dir=3D"=
ltr" style=3D"line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span styl=
e=3D"font-size:8pt;font-family:&quot;DM Sans&quot;,sans-serif;color:rgb(0,0=
,0);background-color:transparent;vertical-align:baseline">Carrer de Jordi G=
irona, 29</span></p><p dir=3D"ltr" style=3D"line-height:1.38;margin-top:0pt=
;margin-bottom:0pt"><span style=3D"font-size:8pt;font-family:&quot;DM Sans&=
quot;,sans-serif;color:rgb(0,0,0);background-color:transparent;vertical-ali=
gn:baseline">08034, Barcelona, Spain.</span></p></td></tr><tr style=3D"heig=
ht:0pt"><td style=3D"border-left:solid #ffffff 1pt;border-right:solid #ffff=
ff 1pt;border-bottom:solid #ffffff 1pt;border-top:solid #f915ab 1pt;vertica=
l-align:top;padding:5pt 5pt 5pt 5pt;overflow:hidden"><br><p dir=3D"ltr" sty=
le=3D"line-height:1.2;margin-top:0pt;margin-bottom:0pt"><a href=3D"http://f=
luendo.com" target=3D"_blank"><span style=3D"font-size:11pt;font-family:Ari=
al,sans-serif;color:rgb(17,85,204);background-color:transparent;vertical-al=
ign:baseline"><span style=3D"border:none;display:inline-block;overflow:hidd=
en;width:135px;height:23px"><img src=3D"https://lh7-us.googleusercontent.co=
m/7f4gLdr2vrB3tXPMwJmLsq1xFFFqPKnq7My8TnumcBKpIMI0HfrvUTStJeCYVUP7FynvoYZw1=
jq-6fQtHdK7u3qLC7NEmPMet6iQkYpoPcyp3EUYQBrOnhgFYa7XDzgeDkJjVBknQdmb76YE2o3c=
63s" width=3D"135" height=3D"23" style=3D"margin-left:0px;margin-top:0px"><=
/span></span></a></p></td><td style=3D"border-left:solid #ffffff 1pt;border=
-right:solid #ffffff 1pt;border-bottom:solid #ffffff 1pt;border-top:solid #=
f915ab 1pt;vertical-align:top;padding:5pt 5pt 5pt 5pt;overflow:hidden"><br>=
<p dir=3D"ltr" style=3D"line-height:1.2;margin-top:0pt;margin-bottom:0pt"><=
a href=3D"https://es.linkedin.com/company/fluendo" target=3D"_blank"><span =
style=3D"font-size:10pt;font-family:&quot;DM Sans&quot;,sans-serif;color:rg=
b(17,85,204);background-color:transparent;font-weight:700;vertical-align:ba=
seline"><span style=3D"border:none;display:inline-block;overflow:hidden;wid=
th:23px;height:22px"><img src=3D"https://lh7-us.googleusercontent.com/OzDx4=
NDORH8FwQh0Ux7Eqszty4oDNvLyo5ad22JS7q56cErOlNi67GdfCqrm0usd5BLylF7NHaveLM3x=
gRy99wMKYbhF-BxnrlHeUpOzDHYrG0E70Yb78WFAZuuTG4XQAgSVBxhPIXz3WvcK2_PrW9I" wi=
dth=3D"23" height=3D"22" style=3D"margin-left:0px;margin-top:0px"></span></=
span></a><span style=3D"font-size:10pt;font-family:&quot;DM Sans&quot;,sans=
-serif;color:rgb(51,113,242);background-color:transparent;font-weight:700;v=
ertical-align:baseline"> =C2=A0 </span><a href=3D"https://twitter.com/fluen=
do" target=3D"_blank"><span style=3D"font-size:11pt;font-family:Arial,sans-=
serif;color:rgb(17,85,204);background-color:transparent;vertical-align:base=
line"><span style=3D"border:none;display:inline-block;overflow:hidden;width=
:22px;height:22px"><img src=3D"https://lh7-us.googleusercontent.com/dP_zElA=
4XMeIAQtvlavqqCuEG9zesjnBeqAMRtw-5HKzaLT5nyX49DGsOuwokHCOLVQZTvc1Ng7NPJ8ozU=
hweGF6BWx-33UYp5XEQSCAcefq4NfZOUGRQgRVWvv5Jyb725Rlc-zuXkM-T-MXCmqfVqo" widt=
h=3D"22" height=3D"22" style=3D"margin-left:0px;margin-top:0px"></span></sp=
an></a><span style=3D"font-size:10pt;font-family:&quot;DM Sans&quot;,sans-s=
erif;color:rgb(51,113,242);background-color:transparent;font-weight:700;ver=
tical-align:baseline"> =C2=A0 </span><a href=3D"https://github.com/fluendo"=
 target=3D"_blank"><span style=3D"font-size:10pt;font-family:&quot;DM Sans&=
quot;,sans-serif;color:rgb(17,85,204);background-color:transparent;font-wei=
ght:700;vertical-align:baseline"><span style=3D"border:none;display:inline-=
block;overflow:hidden;width:24px;height:23px"><img src=3D"https://lh7-us.go=
ogleusercontent.com/xe27dLIuIPtsQqcHCI4EhUQzqxQmQTe3h0rsuabYwOv8-BoHKM50vhx=
MKUsssJ91DmCTt_MsYCwxQmZq-8bIQY-9e3TFdbr3ckIfX3eSx1YKF5JB7LgH7v6qbjsn0ntflP=
yrb694cH-t9BYspEeZK-Q" width=3D"24" height=3D"23" style=3D"margin-left:0px;=
margin-top:0px"></span></span></a><span style=3D"font-size:10pt;font-family=
:&quot;DM Sans&quot;,sans-serif;color:rgb(51,113,242);background-color:tran=
sparent;font-weight:700;vertical-align:baseline">=C2=A0=C2=A0=C2=A0=C2=A0</=
span></p></td></tr></tbody></table></div></span></div></div></div><br></div=
><br><div class=3D"gmail_quote gmail_quote_container"><div dir=3D"ltr" clas=
s=3D"gmail_attr">On Sat, Sep 27, 2025 at 12:15=E2=80=AFPM =D0=90=D1=80=D1=
=82=D0=B5=D0=BC=D0=B8=D0=B9 =D0=92=D0=B5=D0=BB=D0=B8=D1=87=D0=BA=D0=BE via =
gstreamer-devel &lt;<a href=3D"mailto:[email protected]=
">[email protected]</a>&gt; wrote:<br></div><blockquote=
 class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px so=
lid rgb(204,204,204);padding-left:1ex"><div dir=3D"ltr"><p>Hello GStreamer =
developers,</p>
<p>I am working on an Android project using GStreamer 1.24 and have encount=
ered an issue with <code>decodebin3 and decodebin</code>.</p>
<p>In GStreamer 1.22, I was able to create a <code>decodebin</code> element=
 on Android without issues. However, after upgrading to 1.24, the call:</p>
<pre><div><div><div><div></div></div></div><div dir=3D"ltr"><code>gst_eleme=
nt_factory_make(<span>&quot;decodebin3&quot;</span>, <span>&quot;decodebin3=
&quot;</span>)
and=20
gst_eleement_factory_make(&quot;decodebin&quot;, &quot;decodebin&quot;)</co=
de></div></div></pre>
<p>returns <code>NULL</code>.</p>
<p>I have verified the libraries included in my Android build, and the foll=
owing are present:</p>
<ul>
<li>
<p><code>libgstplay-1.0.a</code></p>
</li>
<li>
<p><code>libgstplayer-1.0.a</code></p>
</li>
<li>
<p><code>libgstbase-1.0.a</code></p>
</li>
<li>
<p><code>libgstaudio-1.0.a</code></p>
</li>
</ul>
<p>Despite this, <code>decodebin3</code> is unavailable.</p>
<p>According to the GStreamer 1.24 release notes, <code>decodebin3</code> a=
nd <code>playbin3</code> are now the recommended components and stable:</p>
<blockquote>
<p>=E2=80=9CPlaybin3 and decodebin3 are now stable and the default in gst-p=
lay-1.0, GstPlay/GstPlayer =E2=80=A6 Application developers are strongly re=
commended to switch to using those components instead of the legacy playbin=
 and (uri)decodebin.=E2=80=9D</p>
</blockquote>
<p>My questions are:</p>
<ol>
<li>
<p>Should <code>decodebin3</code> be included by default in the Android uni=
versal static build, or is it necessary to explicitly enable some modules/p=
lugins during the Cerbero build?</p>
</li>
<li>
<p>If it is not included by default, which libraries or plugins need to be =
linked so that <code>decodebin3</code>=C2=A0 and decodebin become available=
 on Android?</p>
</li>
<li>
<p>Is there a recommended way to build a static Android GStreamer 1.24 that=
 ensures <code>decodebin3 and decodebin</code>=C2=A0are included, similar t=
o how it worked in GStreamer 1.22?</p>
</li>
</ol>
<p>Any guidance would be greatly appreciated, as this is critical for upgra=
ding our Android application to GStreamer 1.24.</p>
<p>Thank you very much for your time and support.</p></div>
</blockquote></div>

--000000000000f416f8063fcfbc03--