[MTK] 如何去掉收费的wma格式?
文摘 MediaTek 2022-01-12 阅读:9207[DESCRIPTION]
WMA是收费格式,如果没有购买且也不打算购买licence,可以做如下设置
[SOLUTION]
下面以MT6765为例去掉WMA的方法如下
1.device/mediatek/mt6765/mtk_omx_core.cfg去掉如下这一行,是一整行完整去掉,不要留空白行
OMX.MTK.AUDIO.DECODER.WMA audio_decoder.wma libMtkOmxWmaDec.so 32
2.去掉device/mediatek/mt6765/media_codecs_mediatek_audio_phone.xml文件的
MediaCodec name="OMX.MTK.AUDIO.DECODER.WMA" type="audio/x-ms-wma"对应的行
3.对应的工程文件/device/mediateksample/k65v1_64_bsp/ProjectConfig.mk
把MTK_WMA_PLAYBACK_SUPPORT = yes改成MTK_WMA_PLAYBACK_SUPPORT = no
如果是MT6762/MT6765共branch的项目,而开的是MT6762的平台,则参考如下设置
1.修改alps/device/mediateksample/k62v1_64_bsp/ProjectConfig.mk
将MTK_WMA_PLAYBACK_SUPPORT = yes =>改为no
2.alps/device/mediatek中找不到mt6762目录,将/device/mediatek/mt6765/目录的如下两个文件
mtk_omx_core.cfg
media_codecs_mediatek_audio_phone.xml
copy到
/device/mediateksample/k62v1_64_bsp目录下,然后做如下移除WMA相关配置的动作
mtk_omx_core.cfg 去掉 OMX.MTK.AUDIO.DECODER.WMA audio_decoder.wma libMtkOmxWmaDec.so 32
media_codecs_mediatek_audio_phone.xml 去掉 <MediaCodec name="OMX.MTK.AUDIO.DECODER.WMA" type="audio/x-ms-wma" />
3.将如下内容加入/device/mediateksample/k62v1_64_bsp/device.mk
PRODUCT_COPY_FILES += device/mediateksample/k62v1_64_bsp/media_codecs_mediatek_audio_phone.xml: $(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_mediatek_audio.xml:mtk
PRODUCT_COPY_FILES += device/mediateksample/k62v1_64_bsp/mtk_omx_core.cfg:$(TARGET_COPY_OUT_VENDOR)/etc/mtk_omx_core.cfg:mtk