SwsContext
public final class SwsContext
Undocumented
-
Create an empty
SwsContext
.Declaration
Swift
public init()
-
Create an
SwsContext
use the given parameters.Declaration
Swift
public init?( srcWidth: Int, srcHeight: Int, srcPixelFormat: AVPixelFormat, dstWidth: Int, dstHeight: Int, dstPixelFormat: AVPixelFormat, flags: Flag )
Parameters
srcWidth
the width of the source image
srcHeight
the height of the source image
srcPixelFormat
the source image format
dstWidth
the width of the destination image
dstHeight
the height of the destination image
dstPixelFormat
the destination image format
flags
specify which algorithm and options to use for rescaling
-
Scale the image slice in
src
and 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 -> Int
Parameters
src
the array containing the pointers to the planes of the source slice
srcStride
the array containing the strides for each plane of the source image
srcSliceY
the 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
srcSliceHeight
the height of the source slice, that is the number of rows in the slice
dst
the array containing the pointers to the planes of the destination image
dstStride
the 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) -> Bool
Parameters
pixFmt
pixel format
Return Value
true
if 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) -> Bool
Parameters
pixFmt
pixel format
Return Value
true
if it is supported; otherwisefalse
. -
Returns a Boolean value indicating whether an endianness conversion is supported.
Declaration
Swift
public static func supportsEndiannessConversion(_ pixFmt: AVPixelFormat) -> Bool
Parameters
pixFmt
pixel format
Return Value
true
if 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