SwsContext
public final class SwsContext
Undocumented
-
Create an empty
SwsContext.Declaration
Swift
public init() -
Create an
SwsContextuse the given parameters.Declaration
Swift
public init?( srcWidth: Int, srcHeight: Int, srcPixelFormat: AVPixelFormat, dstWidth: Int, dstHeight: Int, dstPixelFormat: AVPixelFormat, flags: Flag )Parameters
srcWidththe width of the source image
srcHeightthe height of the source image
srcPixelFormatthe source image format
dstWidththe width of the destination image
dstHeightthe height of the destination image
dstPixelFormatthe destination image format
flagsspecify which algorithm and options to use for rescaling
-
Scale the image slice in
srcand put the resulting scaled slice in the image indst.A slice is a sequence of consecutive rows in an image.
Slices have to be provided in sequential order, either in top-bottom or bottom-top order. If slices are provided in non-sequential order the behavior of the function is undefined.
Throws
AVErrorDeclaration
Swift
@discardableResult public func scale( src: UnsafePointer<UnsafePointer<UInt8>?>, srcStride: UnsafePointer<Int32>, srcSliceY: Int, srcSliceHeight: Int, dst: UnsafePointer<UnsafeMutablePointer<UInt8>?>, dstStride: UnsafePointer<Int32> ) throws -> IntParameters
srcthe array containing the pointers to the planes of the source slice
srcStridethe array containing the strides for each plane of the source image
srcSliceYthe position in the source image of the slice to process, that is the number (counted starting from zero) in the image of the first row of the slice
srcSliceHeightthe height of the source slice, that is the number of rows in the slice
dstthe array containing the pointers to the planes of the destination image
dstStridethe array containing the strides for each plane of the destination image
Return Value
the height of the output slice
-
Returns a Boolean value indicating whether the pixel format is a supported input format.
Declaration
Swift
public static func supportsInput(_ pixFmt: AVPixelFormat) -> BoolParameters
pixFmtpixel format
Return Value
trueif it is supported; otherwisefalse. -
Returns a Boolean value indicating whether the pixel format is a supported output format.
Declaration
Swift
public static func supportsOutput(_ pixFmt: AVPixelFormat) -> BoolParameters
pixFmtpixel format
Return Value
trueif it is supported; otherwisefalse. -
Returns a Boolean value indicating whether an endianness conversion is supported.
Declaration
Swift
public static func supportsEndiannessConversion(_ pixFmt: AVPixelFormat) -> BoolParameters
pixFmtpixel format
Return Value
trueif it is supported; otherwisefalse.
-
Undocumented
See moreDeclaration
Swift
public struct Flag : OptionSet
-
Undocumented
Declaration
Swift
public static let `class`: AVClass -
Undocumented
Declaration
Swift
public func withUnsafeClassObjectPointer<T>(_ body: (UnsafeMutableRawPointer) throws -> T) rethrows -> T
-
Undocumented
Declaration
Swift
public func withUnsafeObjectPointer<T>(_ body: (UnsafeMutableRawPointer) throws -> T) rethrows -> T
View on GitHub
Install in Dash
SwsContext Class Reference