aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/main/java/de/pixart/messenger/services/XmppConnectionService.java17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/main/java/de/pixart/messenger/services/XmppConnectionService.java b/src/main/java/de/pixart/messenger/services/XmppConnectionService.java
index 1a662356e..c4570d6c0 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.createAndroidStandardStrategy(Config.VIDEO_BITRATE, getCompressVideosPreference()), listener);
+ MediaFormatStrategyPresets.createAndroidStandardStrategy(getCompressVideoBitratePreference(), getCompressVideoResolutionPreference()), listener);
}
@Override
@@ -882,7 +882,7 @@ public class XmppConnectionService extends Service {
return getPreferences().getString("picture_compression", "auto");
}
- private int getCompressVideosPreference() {
+ private int getCompressVideoResolutionPreference() {
switch (getPreferences().getString("video_compression", "high")) {
case "low":
return 144;
@@ -895,6 +895,19 @@ public class XmppConnectionService extends Service {
}
}
+ private int getCompressVideoBitratePreference() {
+ switch (getPreferences().getString("video_compression", "high")) {
+ case "low":
+ return 100000;
+ case "mid":
+ return 500000;
+ case "high":
+ return 2000000;
+ default:
+ return 2000000;
+ }
+ }
+
private Presence.Status getTargetPresence() {
if (xaOnSilentMode() && isPhoneSilenced()) {
return Presence.Status.XA;