3 struct CaptureSessionConfiguration {
5 let outputFormats: OutputFormatSetting
6 let backendFormat: OutputFormatSetting
8 let shouldKeepLocalFiles: Bool
11 frameRate: Int? = nil,
12 outputFormats: OutputFormatSetting? = nil,
13 backendFormat: OutputFormatSetting? = nil,
15 shouldKeepLocalFiles: Bool? = nil
17 self.frameRate = frameRate ?? CapturaSettings.frameRate
18 self.outputFormats = outputFormats ?? CapturaSettings.outputFormats
19 self.backendFormat = backendFormat ?? CapturaSettings.backendFormat
20 self.backend = backend ?? CapturaSettings.backend
21 self.shouldKeepLocalFiles = shouldKeepLocalFiles ?? CapturaSettings.shouldKeepLocalFiles
24 var shouldSaveMp4: Bool {
25 outputFormats.shouldSaveMp4() || (shouldUseBackend && shouldUploadMp4)
28 var shouldSaveGif: Bool {
29 outputFormats.shouldSaveGif() || (shouldUseBackend && shouldUploadGif)
32 var shouldUploadGif: Bool {
33 backendFormat.shouldSaveGif()
36 var shouldUploadMp4: Bool {
37 backendFormat.shouldSaveMp4()
40 var shouldUseBackend: Bool {