Skip to content

Commit

Permalink
media: sunfish: enable Codec 2.0
Browse files Browse the repository at this point in the history
- Build Codec2 vendor binaries and install xml files
- Serve Codec2 data from media_codecs.xml
- Add sepolicy for vendor Codec2 service
- Add OMX components and lower default OMX ranks

Bug: 141594577
Test: local/youtube playback, sceenrecord
Change-Id: I72e37dbc96ee1585190e08b0210e9d5e5b968463
  • Loading branch information
Jerry Huang committed Nov 25, 2019
1 parent d16d39c commit 16901c9
Show file tree
Hide file tree
Showing 6 changed files with 304 additions and 368 deletions.
10 changes: 10 additions & 0 deletions device.mk
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,14 @@ PRODUCT_PACKAGES += \
PRODUCT_PACKAGES += \
libqcodec2 \
[email protected] \
media_codecs_c2.xml

# TODO: remove once we generate ours
PRODUCT_PACKAGES += \
media_codecs_performance_c2.xml

PRODUCT_PROPERTY_OVERRIDES += \
debug.stagefright.omx_default_rank=512

PRODUCT_PACKAGES += \
[email protected] \
Expand Down Expand Up @@ -548,13 +556,15 @@ PRODUCT_PACKAGES += \

PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/media_codecs.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs.xml \
$(LOCAL_PATH)/media_codecs_omx.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_omx.xml \
frameworks/av/media/libstagefright/data/media_codecs_google_audio.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_google_audio.xml \
frameworks/av/media/libstagefright/data/media_codecs_google_telephony.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_google_telephony.xml \
frameworks/av/media/libstagefright/data/media_codecs_google_video.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_codecs_google_video.xml \
$(LOCAL_PATH)/media_profiles_V1_0.xml:$(TARGET_COPY_OUT_VENDOR)/etc/media_profiles_V1_0.xml

# Vendor seccomp policy files for media components:
PRODUCT_COPY_FILES += \
$(LOCAL_PATH)/seccomp_policy/codec2.vendor.ext.policy:$(TARGET_COPY_OUT_VENDOR)/etc/seccomp_policy/codec2.vendor.ext.policy \
$(LOCAL_PATH)/seccomp_policy/mediacodec.policy:$(TARGET_COPY_OUT_VENDOR)/etc/seccomp_policy/mediacodec.policy

PRODUCT_PROPERTY_OVERRIDES += \
Expand Down
2 changes: 1 addition & 1 deletion device_framework_matrix.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
</interface>
</hal>
<hal format="hidl" optional="true">
<name>hardware.google.media.c2</name>
<name>android.hardware.media.c2</name>
<version>1.0</version>
<interface>
<name>IComponentStore</name>
Expand Down
11 changes: 11 additions & 0 deletions manifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,17 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
<instance>default</instance>
</interface>
</hal>
<!-- video Codec2 hal -->
<hal format="hidl">
<name>android.hardware.media.c2</name>
<transport>hwbinder</transport>
<version>1.0</version>
<interface>
<name>IComponentStore</name>
<instance>default</instance>
</interface>
</hal>
<!-- /video Codec2 hal -->
<!-- video omx hal -->
<hal format="hidl">
<name>android.hardware.media.omx</name>
Expand Down
Loading

0 comments on commit 16901c9

Please sign in to comment.