diff options
author | Christian Schneppe <christian@pix-art.de> | 2017-03-04 22:00:46 +0100 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2017-03-04 22:00:46 +0100 |
commit | 33f0f1561bb3e0bc23a49e5c84513d41849d2160 (patch) | |
tree | a17b0280a7f196911233bf7e2ed6155fd3b293c7 /src/main/java/de/pixart | |
parent | e1a7a2738dde13353885a01c9ec9fd0cc64f6fc3 (diff) |
make video resolution configurable
Diffstat (limited to '')
-rw-r--r-- | src/main/java/de/pixart/messenger/services/XmppConnectionService.java | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/main/java/de/pixart/messenger/services/XmppConnectionService.java b/src/main/java/de/pixart/messenger/services/XmppConnectionService.java index b2b3e5d68..1a662356e 100644 --- a/src/main/java/de/pixart/messenger/services/XmppConnectionService.java +++ b/src/main/java/de/pixart/messenger/services/XmppConnectionService.java @@ -555,7 +555,7 @@ public class XmppConnectionService extends Service { } }; MediaTranscoder.getInstance().transcodeVideo(fileDescriptor, file.getAbsolutePath(), - MediaFormatStrategyPresets.createAndroid720pStrategy(Config.VIDEO_BITRATE), listener); + MediaFormatStrategyPresets.createAndroidStandardStrategy(Config.VIDEO_BITRATE, getCompressVideosPreference()), listener); } @Override @@ -882,6 +882,19 @@ public class XmppConnectionService extends Service { return getPreferences().getString("picture_compression", "auto"); } + private int getCompressVideosPreference() { + switch (getPreferences().getString("video_compression", "high")) { + case "low": + return 144; + case "mid": + return 360; + case "high": + return 720; + default: + return 720; + } + } + private Presence.Status getTargetPresence() { if (xaOnSilentMode() && isPhoneSilenced()) { return Presence.Status.XA; |