Skip to content
Snippets Groups Projects
Commit b76f99c9 authored by Felipe Cecagno's avatar Felipe Cecagno
Browse files

Merge branch 'fix-180-video-rotation' of github.com:pedrobmarin/bigbluebutton into mconf

parents 7973a4f8 e01554a6
No related branches found
No related tags found
No related merge requests found
......@@ -19,6 +19,7 @@ public class VideoRotator {
public static final String ROTATE_LEFT = "rotate_left";
public static final String ROTATE_RIGHT = "rotate_right";
public static final String ROTATE_UPSIDE_DOWN = "rotate_left/rotate_left";
private String streamName;
private FFmpegCommand.ROTATE direction;
......@@ -76,13 +77,19 @@ public class VideoRotator {
* @return FFmpegCommand.ROTATE for the given direction if present, null otherwise
*/
public static FFmpegCommand.ROTATE getDirection(String streamName) {
String parts[] = streamName.split("/");
int index = streamName.lastIndexOf("/");
String parts[] = {
streamName.substring(0, index),
streamName.substring(index + 1)
};
switch(parts[0]) {
case ROTATE_LEFT:
return FFmpegCommand.ROTATE.LEFT;
case ROTATE_RIGHT:
return FFmpegCommand.ROTATE.RIGHT;
case ROTATE_UPSIDE_DOWN:
return FFmpegCommand.ROTATE.UPSIDE_DOWN;
default:
return null;
}
......
......@@ -12,7 +12,7 @@ public class FFmpegCommand {
/**
* Indicate the direction to rotate the video
*/
public enum ROTATE { LEFT, RIGHT };
public enum ROTATE { LEFT, RIGHT, UPSIDE_DOWN };
private HashMap args;
private HashMap x264Params;
......@@ -164,6 +164,9 @@ public class FFmpegCommand {
case RIGHT:
this.args.put("-vf", "transpose=1");
break;
case UPSIDE_DOWN:
this.args.put("-vf", "transpose=2,transpose=2");
break;
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment