swiftlint --fix

This commit is contained in:
shogo4405 2021-03-05 21:48:35 +09:00
parent fb73a5954a
commit 26e973eb54
16 changed files with 48 additions and 48 deletions

View File

@ -31,7 +31,7 @@ open class ScreenCaptureSession: NSObject, CustomCaptureSession {
kCVPixelBufferCGBitmapContextCompatibilityKey: true as NSObject
]
public var enabledScale: Bool = false
public var enabledScale = false
public var frameInterval: Int = ScreenCaptureSession.defaultFrameInterval
public var attributes: [NSString: NSObject] {
var attributes: [NSString: NSObject] = ScreenCaptureSession.defaultAttributes
@ -45,7 +45,7 @@ open class ScreenCaptureSession: NSObject, CustomCaptureSession {
private var shared: UIApplication?
private var viewToCapture: UIView?
public var afterScreenUpdates: Bool = false
public var afterScreenUpdates = false
private var context = CIContext(options: [.useSoftwareRenderer: NSNumber(value: false)])
private let semaphore = DispatchSemaphore(value: 1)
private let lockQueue = DispatchQueue(

View File

@ -53,7 +53,7 @@ public class AudioConverter {
}
private static let numSamples: Int = 1024
var muted: Bool = false
var muted = false
var bitrate: UInt32 = AudioConverter.defaultBitrate {
didSet {
guard bitrate != oldValue else {

View File

@ -60,7 +60,7 @@ final class H264Decoder {
}
}
}
private var invalidateSession: Bool = true
private var invalidateSession = true
private var callback: VTDecompressionOutputCallback = {(decompressionOutputRefCon: UnsafeMutableRawPointer?, _: UnsafeMutableRawPointer?, status: OSStatus, infoFlags: VTDecodeInfoFlags, imageBuffer: CVBuffer?, presentationTimeStamp: CMTime, duration: CMTime) in
let decoder: H264Decoder = Unmanaged<H264Decoder>.fromOpaque(decompressionOutputRefCon!).takeUnretainedValue()
decoder.didOutputForSession(status, infoFlags: infoFlags, imageBuffer: imageBuffer, presentationTimeStamp: presentationTimeStamp, duration: duration)

View File

@ -73,7 +73,7 @@ public final class H264Encoder {
}
public private(set) var isRunning: Atomic<Bool> = .init(false)
var muted: Bool = false
var muted = false
var scalingMode: ScalingMode = H264Encoder.defaultScalingMode {
didSet {
guard scalingMode != oldValue else {
@ -100,7 +100,7 @@ public final class H264Encoder {
}
}
#if os(macOS)
var enabledHardwareEncoder: Bool = true {
var enabledHardwareEncoder = true {
didSet {
guard enabledHardwareEncoder != oldValue else {
return
@ -160,7 +160,7 @@ public final class H264Encoder {
attributes[kCVPixelBufferHeightKey] = NSNumber(value: height)
return attributes
}
private var invalidateSession: Bool = true
private var invalidateSession = true
private var lastImageBuffer: CVImageBuffer?
// @see: https://developer.apple.com/library/mac/releasenotes/General/APIDiffsMacOSX10_8/VideoToolbox.html

View File

@ -12,7 +12,7 @@ struct AudioSpecificConfig {
let type: AudioObjectType
let frequency: SamplingFrequency
let channel: ChannelConfiguration
let frameLengthFlag: Bool = false
let frameLengthFlag = false
var bytes: [UInt8] {
var bytes: [UInt8] = [UInt8](repeating: 0, count: 2)

View File

@ -25,17 +25,17 @@ struct PESOptionalHeader {
var markerBits: UInt8 = PESOptionalHeader.defaultMarkerBits
var scramblingControl: UInt8 = 0
var priority: Bool = false
var dataAlignmentIndicator: Bool = false
var copyright: Bool = false
var originalOrCopy: Bool = false
var priority = false
var dataAlignmentIndicator = false
var copyright = false
var originalOrCopy = false
var PTSDTSIndicator: UInt8 = PESPTSDTSIndicator.none.rawValue
var ESCRFlag: Bool = false
var ESRateFlag: Bool = false
var DSMTrickModeFlag: Bool = false
var additionalCopyInfoFlag: Bool = false
var CRCFlag: Bool = false
var extentionFlag: Bool = false
var ESCRFlag = false
var ESRateFlag = false
var DSMTrickModeFlag = false
var additionalCopyInfoFlag = false
var CRCFlag = false
var extentionFlag = false
var PESHeaderLength: UInt8 = 0
var optionalFields = Data()
var stuffingBytes = Data()

View File

@ -38,14 +38,14 @@ class ProgramSpecific: PSIPointer, PSITableHeader, PSITableSyntax {
// MARK: PSITableHeader
var tableID: UInt8 = 0
var sectionSyntaxIndicator: Bool = false
var privateBit: Bool = false
var sectionSyntaxIndicator = false
var privateBit = false
var sectionLength: UInt16 = 0
// MARK: PSITableSyntax
var tableIDExtension: UInt16 = ProgramSpecific.defaultTableIDExtension
var versionNumber: UInt8 = 0
var currentNextIndicator: Bool = true
var currentNextIndicator = true
var sectionNumber: UInt8 = 0
var lastSectionNumber: UInt8 = 0
var tableData: Data {

View File

@ -8,13 +8,13 @@ struct TSPacket {
static let defaultSyncByte: UInt8 = 0x47
var syncByte: UInt8 = TSPacket.defaultSyncByte
var transportErrorIndicator: Bool = false
var payloadUnitStartIndicator: Bool = false
var transportPriority: Bool = false
var transportErrorIndicator = false
var payloadUnitStartIndicator = false
var transportPriority = false
var PID: UInt16 = 0
var scramblingControl: UInt8 = 0
var adaptationFieldFlag: Bool = false
var payloadFlag: Bool = false
var adaptationFieldFlag = false
var payloadFlag = false
var continuityCounter: UInt8 = 0
var adaptationField: TSAdaptationField?
var payload = Data()
@ -192,14 +192,14 @@ class TSAdaptationField {
static let fixedSectionSize: Int = 2
var length: UInt8 = 0
var discontinuityIndicator: Bool = false
var randomAccessIndicator: Bool = false
var discontinuityIndicator = false
var randomAccessIndicator = false
var elementaryStreamPriorityIndicator = false
var PCRFlag: Bool = false
var OPCRFlag: Bool = false
var splicingPointFlag: Bool = false
var transportPrivateDataFlag: Bool = false
var adaptationFieldExtensionFlag: Bool = false
var PCRFlag = false
var OPCRFlag = false
var splicingPointFlag = false
var transportPrivateDataFlag = false
var adaptationFieldExtensionFlag = false
var PCR = Data()
var OPCR = Data()
var spliceCountdown: UInt8 = 0
@ -315,9 +315,9 @@ extension TSAdaptationField: CustomDebugStringConvertible {
// MARK: -
struct TSAdaptationExtensionField {
var length: UInt8 = 0
var legalTimeWindowFlag: Bool = false
var piecewiseRateFlag: Bool = false
var seamlessSpiceFlag: Bool = false
var legalTimeWindowFlag = false
var piecewiseRateFlag = false
var seamlessSpiceFlag = false
var legalTimeWindowOffset: UInt16 = 0
var piecewiseRate: UInt32 = 0
var spliceType: UInt8 = 0

View File

@ -13,7 +13,7 @@ open class GLHKView: GLKView, NetStreamRenderer {
]
public static var defaultBackgroundColor: UIColor = .black
open var isMirrored: Bool = false
open var isMirrored = false
/// A value that specifies how the video is displayed within a player layers bounds.
open var videoGravity: AVLayerVideoGravity = .resizeAspect
/// A value that displays a video format.

View File

@ -5,7 +5,7 @@ import MetalKit
A view that displays a video content of a NetStream object which uses Metal api.
*/
open class MTHKView: MTKView, NetStreamRenderer {
open var isMirrored: Bool = false
open var isMirrored = false
/// A value that specifies how the video is displayed within a player layers bounds.
open var videoGravity: AVLayerVideoGravity = .resizeAspect
/// A value that displays a video format.

View File

@ -143,7 +143,7 @@ final class VideoIOComponent: IOComponent {
}
}
var torch: Bool = false {
var torch = false {
didSet {
guard torch != oldValue else {
return
@ -152,7 +152,7 @@ final class VideoIOComponent: IOComponent {
}
}
var continuousAutofocus: Bool = false {
var continuousAutofocus = false {
didSet {
guard continuousAutofocus != oldValue else {
return
@ -211,7 +211,7 @@ final class VideoIOComponent: IOComponent {
}
}
var continuousExposure: Bool = false {
var continuousExposure = false {
didSet {
guard continuousExposure != oldValue else {
return

View File

@ -104,7 +104,7 @@ open class NetSocket: NSObject {
/// The time to wait for TCP/IP Handshake done.
open var timeout: Int = NetSocket.defaultTimeout
/// This instance connected to server(true) or not(false).
open var connected: Bool = false
open var connected = false
open var windowSizeC: Int = NetSocket.defaultWindowSizeC
/// The statistics of total incoming bytes.
open var totalBytesIn: Atomic<Int64> = .init(0)

View File

@ -8,7 +8,7 @@ class HKPictureInPicureControllerImpl: HKPictureInPicureController {
static let cornerRadius: CGFloat = 8
static let animationDuration: TimeInterval = 0.3
var isPictureInPictureActive: Bool = false
var isPictureInPictureActive = false
var pictureInPictureSize: CGSize = .init(width: 160, height: 90)
var pictureInPictureMargin: CGFloat = HKPictureInPicureControllerImpl.margin
var pictureInPicturePosition: HKPictureInPicureControllerPosition = HKPictureInPicureControllerImpl.position

View File

@ -180,7 +180,7 @@ final class RTMPChunk {
}
private(set) var message: RTMPMessage?
private(set) var fragmented: Bool = false
private(set) var fragmented = false
private var _data = Data()
init(type: RTMPChunkType, streamId: UInt16, message: RTMPMessage) {

View File

@ -103,7 +103,7 @@ open class RTMPSharedObject: EventDispatcher {
open private(set) var objectEncoding: RTMPObjectEncoding = RTMPConnection.defaultObjectEncoding
open private(set) var data: [String: Any?] = [:]
private var succeeded: Bool = false {
private var succeeded = false {
didSet {
guard succeeded else {
return

View File

@ -10,7 +10,7 @@ final class RTMPTSocket: NSObject, RTMPSocketCompatible {
var qualityOfService: DispatchQoS = .default
var securityLevel: StreamSocketSecurityLevel = .none
weak var delegate: RTMPSocketDelegate?
var connected: Bool = false {
var connected = false {
didSet {
if connected {
handshake.timestamp = Date().timeIntervalSince1970
@ -59,12 +59,12 @@ final class RTMPTSocket: NSObject, RTMPSocketCompatible {
private var handshake = RTMPHandshake()
private let outputQueue = DispatchQueue(label: "com.haishinkit.HaishinKit.RTMPTSocket.output")
private var connectionID: String?
private var isRequesting: Bool = false
private var isRequesting = false
private var outputBuffer = Data()
private var lastResponse = Date()
private var lastRequestPathComponent: String?
private var lastRequestData: Data?
private var isRetryingRequest: Bool = true
private var isRetryingRequest = true
override init() {
super.init()