[Replicant] [PATCH] make video recording working again

Wolfgang Wiedmeyer wreg at wiedmeyer.de
Thu Sep 24 12:27:19 UTC 2015


> In the patch this line in common.mk is commented:
> # libOMX.SEC.VP8.Decoder
>
> Is that intentional? I presume not, as it's referenced in 
> media_codecs.xml, but I'm not familiar with the codebase.

I compared the code to the corresponding repository of cyanogenmod and
applied the diff that belonged to the encoding stuff. So this line is
just copied over. Basically this patch is a revert of these two commits:
http://git.replicant.us/gitweb/?p=replicant/device/samsung/smdk4412-common.git;a=commitdiff;h=6e123517906d0624c11e9dbf93bd1aa2eef8af02;hp=79aad88393eb8b9b668df93e765d84ec6e407db1
http://git.replicant.us/gitweb/?p=replicant/device/samsung/smdk4412-common.git;a=commitdiff;h=79aad88393eb8b9b668df93e765d84ec6e407db1;hp=3ea618f2da3ae170d8badd152dea54b1c30941ad

> Nice!  Would this also fix ZXing?

Tried it and it didn't work. Isn't this only related to the incomplete
egl implementation?

> Generally, I suspect there may be resistance to adopting this patch, but
> to me it looks comparable to the already existing Wifi/Bluetooth
> infrastructure support.  Replicant doesn't disable all Wifi/Bluetooth
> support even though no hardware Replicant supports Wifi/Bluetooth
> without non-free firmware.  The situation appears similar here.  If the
> modules that you enable are all free software, I think they should be
> built by default.  Are all of the following packages free software?

Yes, the only non-free dependencies are the firmware blobs. 

>> +++ b/configs/80cfw
>
> I don't think this file should go into Replicant.  People who care about
> non-free software has to install the files in the proper location
> themselves.

When I previously tested, I thought that this file is necessary, but I
removed it and the firmware in the /data/cfw directory and it works
nonetheless, so I updated the patch. The patch becomes now only a revert
of the commit 79aad88393eb8b9b668df93e765d84ec6e407db1

Signed-off-by: Wolfgang Wiedmeyer <wolfgit at wiedmeyer.de>
---
 BoardCommonConfig.mk     |  9 +++++++++
 common.mk                | 18 ++++++++++++++++++
 configs/media_codecs.xml | 10 ++++++++++
 3 files changed, 37 insertions(+)

diff --git a/BoardCommonConfig.mk b/BoardCommonConfig.mk
index b4ae1bf..e0f6852 100644
--- a/BoardCommonConfig.mk
+++ b/BoardCommonConfig.mk
@@ -90,6 +90,15 @@ BOARD_CAMERA_HAVE_ISO := true
 COMMON_GLOBAL_CFLAGS += -DHAVE_ISO
 COMMON_GLOBAL_CFLAGS += -DSAMSUNG_CAMERA_HARDWARE
 
+# OMX
+BOARD_USE_SAMSUNG_COLORFORMAT := true
+BOARD_NONBLOCK_MODE_PROCESS := true
+BOARD_USE_STOREMETADATA := true
+BOARD_USE_METADATABUFFERTYPE := true
+BOARD_USES_MFC_FPS := true
+BOARD_USE_S3D_SUPPORT := true
+BOARD_USE_CSC_FIMC := false
+
 # RIL
 BOARD_MOBILEDATA_INTERFACE_NAME := "pdp0"
 
diff --git a/common.mk b/common.mk
index 18b0715..34d9c95 100644
--- a/common.mk
+++ b/common.mk
@@ -66,6 +66,7 @@ PRODUCT_PACKAGES := \
     camera.smdk4x12 \
     Camera \
     com.android.future.usb.accessory \
+    gralloc.exynos4 \
     hwcomposer.exynos4 \
     libfimg \
     libnetcmdiface \
@@ -81,6 +82,23 @@ PRODUCT_PACKAGES += \
     charger \
     charger_res_images
 
+# MFC API
+PRODUCT_PACKAGES += \
+    libsecmfcdecapi \
+    libsecmfcencapi
+
+# OMX
+PRODUCT_PACKAGES += \
+    libstagefrighthw \
+    libSEC_OMX_Resourcemanager \
+    libSEC_OMX_Core \
+    libOMX.SEC.AVC.Decoder \
+    libOMX.SEC.M4V.Decoder \
+    libOMX.SEC.WMV.Decoder \
+    libOMX.SEC.AVC.Encoder \
+    libOMX.SEC.M4V.Encoder
+#   libOMX.SEC.VP8.Decoder
+
 PRODUCT_COPY_FILES += \
     $(COMMON_PATH)/configs/media_profiles.xml:system/etc/media_profiles.xml \
     $(COMMON_PATH)/configs/media_codecs.xml:system/etc/media_codecs.xml
diff --git a/configs/media_codecs.xml b/configs/media_codecs.xml
index e4298a8..c8719db 100644
--- a/configs/media_codecs.xml
+++ b/configs/media_codecs.xml
@@ -77,6 +77,12 @@ Only the three quirks included above are recognized at this point:
 
 <MediaCodecs>
     <Decoders>
+        <MediaCodec name="OMX.SEC.AVC.Decoder" type="video/avc" />
+        <MediaCodec name="OMX.SEC.MPEG4.Decoder" type="video/mp4v-es" />
+        <MediaCodec name="OMX.SEC.H263.Decoder" type="video/3gpp" />
+        <MediaCodec name="OMX.SEC.AVC.Decoder" type="video/avc" />
+        <MediaCodec name="OMX.SEC.VP8.Decoder" type="video/x-vnd.on2.vp8" />
+
         <MediaCodec name="OMX.google.mp3.decoder" type="audio/mpeg" />
         <MediaCodec name="OMX.google.amrnb.decoder" type="audio/3gpp" />
         <MediaCodec name="OMX.google.amrwb.decoder" type="audio/amr-wb" />
@@ -91,6 +97,10 @@ Only the three quirks included above are recognized at this point:
     </Decoders>
 
     <Encoders>
+        <MediaCodec name="OMX.SEC.MPEG4.Encoder" type="video/mp4v-es" />
+        <MediaCodec name="OMX.SEC.H263.Encoder" type="video/3gpp" />
+        <MediaCodec name="OMX.SEC.AVC.Encoder" type="video/avc" />
+
         <MediaCodec name="OMX.google.amrnb.encoder" type="audio/3gpp" />
         <MediaCodec name="OMX.google.amrwb.encoder" type="audio/amr-wb" />
         <MediaCodec name="OMX.google.aac.encoder" type="audio/mp4a-latm" />
-- 
2.1.4


More information about the Replicant mailing list