Bug 15537

Summary: Unable to build gstreamer1.0-plugins-ugly with a52dec (liba52) is enabled
Product: [Build System, Metadata & Runtime] Meta-yocto Reporter: Anh Nguyen <anh.nguyen.pv>
Component: meta-yoctoAssignee: Unassigned <unassigned>
Status: RESOLVED NOTABUG QA Contact:
Severity: normal    
Priority: Undecided CC: poky.bs.watcher, poky.watcher, randy.macleod
Version: 5.1   
Target Milestone: 0.0.0   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)
Attachments:
Description Flags
Remove a52dec into gstreamer ugly none

Description Anh Nguyen 2024-07-01 04:55:13 UTC
Add these to local.conf:

LICENSE_FLAGS_ACCEPTED = "commercial"
PACKAGECONFIG:pn-gstreamer1.0-plugins-ugly = "a52dec"

and get error:

Nothing PROVIDES 'liba52' (but poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.24.3.bb DEPENDS on or otherwise requires it).

because liba52 recipe has been removed by commit 148e0c87ccfa60b13f9548afdc8b4d9fb8f05716

With my point of view, in case we remove liba52, we should remove place where we use it as well, and consider which one can be used to replace it.
In this case, I am wondering if we can replace liba52 by libav?
Comment 1 Randy MacLeod 2024-07-04 14:43:06 UTC
We leave the packageconfig so that the feature is deterministically disabled.
If  you have an idea of how this could be handled differently, please send a patch to the list.

- YP bug reivewers.
Comment 2 Anh Nguyen 2024-07-05 04:37:13 UTC
Created attachment 5057 [details]
Remove a52dec into gstreamer ugly
Comment 3 Anh Nguyen 2024-07-05 04:40:06 UTC
Let me explain more details:
 - Build 'bitbake core-image-weston' --> OK because it doesn't build gstreamer1.0-plugins-ugly.

My case:
 - Add these to local.conf to enable a52dec:
LICENSE_FLAGS_ACCEPTED = "commercial"
PACKAGECONFIG:pn-gstreamer1.0-plugins-ugly = "a52dec"
 - Build 'bitbake gstreamer1.0-plugins-ugly'
 - Got Error:
Nothing PROVIDES 'liba52' (but poky/meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-ugly_1.24.3.bb DEPENDS on or otherwise requires it).

My solutions:
 - Option 1: Remove plugin a52dec into gstreamer1.0-plugins-ugly_1.24.3.bb
I added a patch to do that, it works (please check the attachment)
 - Option 2: Replace liba52 by libav (I will try and share a patch later).
Comment 4 Randy MacLeod 2024-07-08 19:44:01 UTC
You may be heading in the right direction but as you saw in 148e0c87ccfa60b13f9548afdc8b4d9fb8f05716 the library isn't actively maintained.
Interestingly it is still packaged for recent Fedora releases: 
    https://pkgs.org/download/liba52

Anyway, once you have the "replace liba52 by libav" patch, please send it to the list, ideally CCing people who have worked on this part of oe-core such as Alex Kanavin. That's the best way to get changes reviewed and merged.

I'm happy to provide a bit of feedback here as well, when I can.
-- Randy