ffmpeg: move media codecs config & seccomp policy to device

* 71ac744017
This commit is contained in:
Konsta
2025-04-07 21:07:48 +03:00
parent 7120a38fea
commit e9e4222534
3 changed files with 169 additions and 0 deletions

View File

@@ -0,0 +1,108 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2022 Michael Goffioul <michael.goffioul@gmail.com>
Copyright (C) 2025 KonstaKANG
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<MediaCodecs>
<Decoders>
<!-- Audio codecs -->
<MediaCodec name="c2.ffmpeg.aac.decoder" type="audio/mp4a-latm">
<Alias name="OMX.ffmpeg.aac.decoder" />
<Limit name="channel-count" max="8" />
<Limit name="sample-rate" ranges="8000-192000" />
</MediaCodec>
<MediaCodec name="c2.ffmpeg.ac3.decoder" type="audio/ac3">
<Alias name="OMX.ffmpeg.ac3.decoder" />
<Limit name="channel-count" max="8" />
<Limit name="sample-rate" ranges="8000-192000" />
</MediaCodec>
<MediaCodec name="c2.ffmpeg.alac.decoder" type="audio/alac">
<Alias name="OMX.ffmpeg.alac.decoder" />
<Limit name="channel-count" max="8" />
<Limit name="sample-rate" ranges="8000-192000" />
</MediaCodec>
<MediaCodec name="c2.ffmpeg.flac.decoder" type="audio/flac">
<Alias name="OMX.ffmpeg.flac.decoder" />
<Limit name="channel-count" max="8" />
<Limit name="sample-rate" ranges="8000-192000" />
</MediaCodec>
<MediaCodec name="c2.ffmpeg.mp2.decoder" type="audio/mpeg-L2">
<Alias name="OMX.ffmpeg.mp2.decoder" />
<Limit name="channel-count" max="8" />
<Limit name="sample-rate" ranges="8000-192000" />
</MediaCodec>
<MediaCodec name="c2.ffmpeg.mp3.decoder" type="audio/mpeg">
<Alias name="OMX.ffmpeg.mp3.decoder" />
<Limit name="channel-count" max="8" />
<Limit name="sample-rate" ranges="8000-192000" />
</MediaCodec>
<MediaCodec name="c2.ffmpeg.vorbis.decoder" type="audio/vorbis">
<Alias name="OMX.ffmpeg.vorbisac3.decoder" />
<Limit name="channel-count" max="8" />
<Limit name="sample-rate" ranges="8000-192000" />
</MediaCodec>
<!-- Video codecs -->
<MediaCodec name="c2.ffmpeg.av1.decoder" type="video/av01">
<Alias name="OMX.ffmpeg.av1.decoder" />
<Limit name="size" min="2x2" max="2048x2048" />
<Limit name="alignment" value="2x2" />
<Feature name="adaptive-playback" />
</MediaCodec>
<MediaCodec name="c2.ffmpeg.h263.decoder" type="video/3gpp">
<Alias name="OMX.ffmpeg.h263.decoder" />
<Limit name="size" min="2x2" max="2048x2048" />
<Limit name="alignment" value="2x2" />
<Feature name="adaptive-playback" />
</MediaCodec>
<MediaCodec name="c2.ffmpeg.h264.decoder" type="video/avc">
<Alias name="OMX.ffmpeg.h264.decoder" />
<Limit name="size" min="2x2" max="4080x4080" />
<Limit name="alignment" value="2x2" />
<Feature name="adaptive-playback" />
</MediaCodec>
<MediaCodec name="c2.ffmpeg.hevc.decoder" type="video/hevc">
<Alias name="OMX.ffmpeg.hevc.decoder" />
<Limit name="size" min="2x2" max="4096x4096" />
<Limit name="alignment" value="2x2" />
<Feature name="adaptive-playback" />
</MediaCodec>
<MediaCodec name="c2.ffmpeg.mpeg2.decoder" type="video/mpeg2">
<Alias name="OMX.ffmpeg.mpeg2.decoder" />
<Limit name="size" min="2x2" max="2048x2048" />
<Limit name="alignment" value="2x2" />
<Feature name="adaptive-playback" />
</MediaCodec>
<MediaCodec name="c2.ffmpeg.mpeg4.decoder" type="video/mp4v-es">
<Alias name="OMX.ffmpeg.mpeg4.decoder" />
<Limit name="size" min="2x2" max="2048x2048" />
<Limit name="alignment" value="2x2" />
<Feature name="adaptive-playback" />
</MediaCodec>
<MediaCodec name="c2.ffmpeg.vp8.decoder" type="video/x-vnd.on2.vp8">
<Alias name="OMX.ffmpeg.vp8.decoder" />
<Limit name="size" min="2x2" max="2048x2048" />
<Limit name="alignment" value="2x2" />
<Feature name="adaptive-playback" />
</MediaCodec>
<MediaCodec name="c2.ffmpeg.vp9.decoder" type="video/x-vnd.on2.vp9">
<Alias name="OMX.ffmpeg.vp9.decoder" />
<Limit name="size" min="2x2" max="2048x2048" />
<Limit name="alignment" value="2x2" />
<Feature name="adaptive-playback" />
</MediaCodec>
</Decoders>
</MediaCodecs>