aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/pixart/messenger
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/de/pixart/messenger')
-rw-r--r--src/main/java/de/pixart/messenger/services/XmppConnectionService.java15
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;