aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/pixart/messenger
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2017-03-05 10:47:56 +0100
committerChristian Schneppe <christian@pix-art.de>2017-03-05 10:47:56 +0100
commite20e7893a546b700e5a4ca00d523cf078bb28747 (patch)
tree07a8a21a1b78c71d46366d2d9ae3fa3fe9aeceae /src/main/java/de/pixart/messenger
parent67d2f08e7470ae1cd933c96e35a091aef048fa79 (diff)
change bitrate with video quality settings too
Diffstat (limited to 'src/main/java/de/pixart/messenger')
-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;