mirror of
https://github.com/zoriya/react-native-video.git
synced 2026-08-16 02:56:22 +00:00
66 lines
1.6 KiB
Swift
Generated
66 lines
1.6 KiB
Swift
Generated
///
|
|
/// BandwidthData.swift
|
|
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
/// https://github.com/mrousavy/nitro
|
|
/// Copyright © Marc Rousavy @ Margelo
|
|
///
|
|
|
|
import NitroModules
|
|
|
|
/**
|
|
* Represents an instance of `BandwidthData`, backed by a C++ struct.
|
|
*/
|
|
public typealias BandwidthData = margelo.nitro.video.BandwidthData
|
|
|
|
public extension BandwidthData {
|
|
private typealias bridge = margelo.nitro.video.bridge.swift
|
|
|
|
/**
|
|
* Create a new instance of `BandwidthData`.
|
|
*/
|
|
init(bitrate: Double, width: Double?, height: Double?) {
|
|
self.init(bitrate, { () -> bridge.std__optional_double_ in
|
|
if let __unwrappedValue = width {
|
|
return bridge.create_std__optional_double_(__unwrappedValue)
|
|
} else {
|
|
return .init()
|
|
}
|
|
}(), { () -> bridge.std__optional_double_ in
|
|
if let __unwrappedValue = height {
|
|
return bridge.create_std__optional_double_(__unwrappedValue)
|
|
} else {
|
|
return .init()
|
|
}
|
|
}())
|
|
}
|
|
|
|
@inline(__always)
|
|
var bitrate: Double {
|
|
return self.__bitrate
|
|
}
|
|
|
|
@inline(__always)
|
|
var width: Double? {
|
|
return { () -> Double? in
|
|
if bridge.has_value_std__optional_double_(self.__width) {
|
|
let __unwrapped = bridge.get_std__optional_double_(self.__width)
|
|
return __unwrapped
|
|
} else {
|
|
return nil
|
|
}
|
|
}()
|
|
}
|
|
|
|
@inline(__always)
|
|
var height: Double? {
|
|
return { () -> Double? in
|
|
if bridge.has_value_std__optional_double_(self.__height) {
|
|
let __unwrapped = bridge.get_std__optional_double_(self.__height)
|
|
return __unwrapped
|
|
} else {
|
|
return nil
|
|
}
|
|
}()
|
|
}
|
|
}
|