[Samsung Galaxy S 5 Unified Development] tomm1e:
About:

This is a modification of the LineageOS camera wrapper, Snapdragon Camera app, libstagefright, and media profiles to allow recording video at 60FPS and 120FPS with stereo audio at 256kbps, also allows recording files over 4GB (the selected storage filesystem must support files larger than 4GB), and the ability to change AV bitrates/codecs on the fly. Album preference has been added in 1.3.

Q Users: Backup before install!

/system/lib/libstagefright.so

/system/product/priv-app/Snap/Snap.apk

/system/product/priv-app/Snap/oat/arm/Snap.odex

/system/product/priv-app/Snap/oat/arm/Snap.vdex

/system/vendor/etc/media_profiles_V1_0.xml

/system/vendor/lib/hw/camera.msm8974.so

P/O Users: Backup before install!

/system/lib/libstagefright.so

/system/priv-app/Snap/Snap.apk

/system/priv-app/Snap/oat/arm/Snap.odex

/system/priv-app/Snap/oat/arm/Snap.vdex

/system/vendor/etc/media_profiles_V1_0.xml (or /system/etc/media_profiles.xml)

/system/vendor/lib/hw/camera.msm8974.so

N Users: Backup before install!

/system/etc/media_profiles.xml

/system/lib/libstagefright.so

/system/lib/hw/camera.msm8974.so

/system/priv-app/Snap/Snap.apk

Download ZIP:

If you experience bugs or crashes please attach the adb log file, also include your mod version, OS, and device model in the post!

Q v1.3, TWRP 3.3.1: https://drive.google.com/file/d/1T3d6tIj_aM_zcfS7Q-RNNrT2IkvMwwvf/view?usp=sharing

P v1.3, TWRP 3.3.1: https://drive.google.com/file/d/1MPOfu7UXV-1RfWbW4EBJfSwmbVSnPXkC/view?usp=sharing

----------------

Q v1.2: https://drive.google.com/file/d/1wL5QeTFPaBGhbT3l3x4J52Q6f-fF9w8-/view?usp=sharing

P v1.2: https://drive.google.com/file/d/1Pjzu_Y5L0H8qqszYzwHJptD3uESvFKkB/view?usp=sharing

----------------

O v0.6: https://drive.google.com/open?id=1fM-SMDZT2iYxaX3AoYWCRegu918PqRFp

N v0.6: https://drive.google.com/open?id=1t2HalWYSObez0Xar0MOfk7opcLaSf0AD

----------------

Old versions: https://drive.google.com/drive/folders/1oFLPaoDmfDJlD8FAoRVhAk2haETI_dH6

v1.3 Changelog:

snap: Album preference: This will store media into subdirectories: Default, Date, Custom, Hidden.

snap: Media is now stored using the MediaStore API for Android 10 / LOS 17.1 builds.

Past Changelogs:

v1.2 Changelog:

snap: Merge upstream

snap: PiP and Multi-Window Removed (Bugs)

stagefright: Merge upstream

v1.1 Changelog:

snap: Added Picture-in-Picture support

snap: Fixed Multi-Window handling

profiles: Updated to proper location (again)

v0.9 Changelog:

snap: Merge upstream

stagefright: Merge upstream

profiles: Set all audio channels to stereo

v0.8-2 Changelog:

profiles: Updated path from upstream change, moved from /system/etc/media_profiles.xml to /system/vendor/etc/media_profiles_V1_0.xml

v0.8 Changelog:

snap: Upstream change now saves files in /Android/data/org.lineageos.snap/files instead of /DCIM/Camera

v0.7 Changelog:

snap: Fix compilation for Pie

v0.6 Changelog:

snap: Added new advanced video preferences: Video bitrate, Audio bitrate

To access these preferences, tap the "Bright screen" preference until it enables advanced camera preferences

Auto: Run the original code.

Profile: Use bitrate found in media profile, no scaling.

Manual: Set custom bitrate with slider dialog, based on the minimum and maximum bitrate caps, saving the preference for each codec.

Max: Set maximum bitrate from the encoder cap.

snap: Disabled 4GB file size limit

snap: Separate video denoise and photo denoise preferences

stagefright: Disabled 4GB file size limit

profiles: Cleanup

v0.5-3 Changelog:

wrapper: Fix quick settings flash

wrapper: Fix flash "On" photo mode

v0.5 Changelog:

wrapper: Fix hang during selfie shot

profiles: Increase audio bitrates in media_profiles.xml

v0.4 Changelog:

snap: Added "Denoise" setting to Video menu

wrapper: Restart flash during preview changes

wrapper: Removed focus modes from previous versions

wrapper: Code optimizations

profiles: Cleanup

v0.3 Changelog:

snap: Handle resource error

wrapper: Fix flash mode "On" in photo mode

v0.2 Changelog:

snap: Enabled advanced settings by default

wrapper: If torch is set, turn back on once recording in 60FPS

Known Bugs:

Camera name becomes assigned to a different resource ID on Android 9 and below. Android 10 does not have this issue.

On certain devices, front camera does not load or fails to save pictures.

1.2 Q is not parsing Snaps external storage, the files exist but they will not appear in the Gallery. In 1.3 this is fixed.

Android 9 still has the sdcard deletion bug.. if you do your own builds you can fix it with the commits below:

https://github.com/tomm1e/android_vendor_lineage/commit/6ad07dee60e26bdf88d9ac07face4d7a0fbe5610

https://github.com/tomm1e/android_p...mmit/7cad0838a254f6422343d17d5a578d2e09382359

https://github.com/LineageOS/android_frameworks_base/commit/c3f4b30d8e15228a12ca6bd1f4037d5c69dda6ea

Notes:

To access the Advanced camera preferences in Snap, tap the "Bright screen" preference until it enables.

Bitrates can be changed in media_profiles.xml. To reload them, clear the camera out of recent apps.

O+ users should force rebuild of dalvik cache after installing or upgrading: adb shell cmd package compile -m speed -f org.lineageos.snap

P and below should clear Data after upgrading so the Camera name does not get reassigned.

Source Code:

All of my changes can be found at Github:

https://github.com/tomm1e/android_device_samsung_klte-common

https://github.com/tomm1e/android_packages_apps_Snap

https://github.com/tomm1e/android_frameworks_av

Thanks to everyone at LOS and XDA! :good:

-Tom