@@ -31,6 +31,7 @@ public class IOSStartScreenRecordingOptions
31
31
private String videoType ;
32
32
private String videoQuality ;
33
33
private String videoScale ;
34
+ private String videoFilters ;
34
35
private Integer fps ;
35
36
36
37
public static IOSStartScreenRecordingOptions startScreenRecordingOptions () {
@@ -82,6 +83,7 @@ public IOSStartScreenRecordingOptions withFps(int fps) {
82
83
/**
83
84
* The scaling value to apply. Read https://trac.ffmpeg.org/wiki/Scaling for possible values.
84
85
* No scale is applied by default.
86
+ * If filters are set then the scale setting is effectively ignored.
85
87
*
86
88
* @since Appium 1.10.0
87
89
* @param videoScale ffmpeg-compatible scale format specifier.
@@ -106,13 +108,29 @@ public IOSStartScreenRecordingOptions withTimeLimit(Duration timeLimit) {
106
108
return super .withTimeLimit (timeLimit );
107
109
}
108
110
111
+ /**
112
+ * The FFMPEG video filters to apply. These filters allow to scale, flip, rotate and do many
113
+ * other useful transformations on the source video stream. The format of the property
114
+ * must comply with https://ffmpeg.org/ffmpeg-filters.html.
115
+ *
116
+ * @since Appium 1.15
117
+ * @param filters One or more filters to apply to the resulting video stream,
118
+ * for example "transpose=1" to rotate the resulting video 90 degrees clockwise.
119
+ * @return self instance for chaining.
120
+ */
121
+ public IOSStartScreenRecordingOptions withVideoFilters (String filters ) {
122
+ this .videoFilters = filters ;
123
+ return this ;
124
+ }
125
+
109
126
@ Override
110
127
public Map <String , Object > build () {
111
128
final ImmutableMap .Builder <String , Object > builder = ImmutableMap .builder ();
112
129
builder .putAll (super .build ());
113
130
ofNullable (videoType ).map (x -> builder .put ("videoType" , x ));
114
131
ofNullable (videoQuality ).map (x -> builder .put ("videoQuality" , x ));
115
132
ofNullable (videoScale ).map (x -> builder .put ("videoScale" , x ));
133
+ ofNullable (videoFilters ).map (x -> builder .put ("videoFilters" , x ));
116
134
ofNullable (fps ).map (x -> builder .put ("videoFps" , x ));
117
135
return builder .build ();
118
136
}
0 commit comments