mirror of
https://github.com/ArcaneChat/android.git
synced 2026-07-03 14:05:24 +02:00
Force video-recoding for videos which size is okay but the bitrate is too high. Correct maximum bitrate handing (was checked too son before and scaled down afterwards, on typical devices, this resulted in a bitrate of about 500 kbit which we use as a maximum now; everyone is welcome to improve all this stuff).
This commit is contained in:
@@ -1648,18 +1648,8 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
|
||||
VideoEditorActivity fragment = new VideoEditorActivity(args);
|
||||
fragment.setDelegate(new VideoEditorActivity.VideoEditorActivityDelegate() {
|
||||
@Override
|
||||
public void didFinishEditVideo(String videoPath, long startTime, long endTime, int resultWidth, int resultHeight, int rotationValue, int originalWidth, int originalHeight, int bitrate, long estimatedSize, long estimatedDuration) {
|
||||
VideoEditedInfo videoEditedInfo = new VideoEditedInfo();
|
||||
videoEditedInfo.startTime = startTime;
|
||||
videoEditedInfo.endTime = endTime;
|
||||
videoEditedInfo.rotationValue = rotationValue;
|
||||
videoEditedInfo.originalWidth = originalWidth;
|
||||
videoEditedInfo.originalHeight = originalHeight;
|
||||
videoEditedInfo.bitrate = bitrate;
|
||||
videoEditedInfo.resultWidth = resultWidth;
|
||||
videoEditedInfo.resultHeight = resultHeight;
|
||||
videoEditedInfo.originalPath = videoPath;
|
||||
SendMessagesHelper.prepareSendingVideo(videoPath, estimatedSize, estimatedDuration, resultWidth, resultHeight, videoEditedInfo, dialog_id);
|
||||
public void didFinishEditVideo(VideoEditedInfo vei, long estimatedSize, long estimatedDuration) {
|
||||
SendMessagesHelper.prepareSendingVideo(vei.originalPath, estimatedSize, estimatedDuration, vei.resultWidth, vei.resultHeight, vei, dialog_id);
|
||||
m_mrChat.cleanDraft();
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user