ffmpeg-light-0.13.0: Minimal bindings to the FFmpeg library.
Safe HaskellNone
LanguageHaskell2010

Codec.FFmpeg.Scaler

Synopsis

Documentation

swsInit :: ImageInfo -> ImageInfo -> SwsAlgorithm -> IO SwsContext Source #

swsInit srcInfo dstInfo alg initializations an SwsContext to scale and convert from srcInfo to dstInfo using the algorithm alg when scaling.

swsReset :: SwsContext -> ImageInfo -> ImageInfo -> SwsAlgorithm -> IO SwsContext Source #

Obtain a context for converting the source to destination format. If the given context is already configured for the required conversion, it is returned. Otherwise, the given context is freed and a new, configured context is returned. See swsInit for a description of the arguments.

class SwsCompatible a where Source #

A common interface required of arguments to swsScale (a higher level wrapper for the sws_scale function from libswscale).

Methods

swsPlanes :: a -> (Ptr (Ptr CUChar) -> IO r) -> IO r Source #

swsStrides :: a -> (Ptr CInt -> IO r) -> IO r Source #

sliceHeight :: a -> (CInt -> IO r) -> IO r Source #

Instances

Instances details
SwsCompatible AVFrame Source # 
Instance details

Defined in Codec.FFmpeg.Scaler

Methods

swsPlanes :: AVFrame -> (Ptr (Ptr CUChar) -> IO r) -> IO r Source #

swsStrides :: AVFrame -> (Ptr CInt -> IO r) -> IO r Source #

sliceHeight :: AVFrame -> (CInt -> IO r) -> IO r Source #

(Pixel a, Storable (PixelBaseComponent a)) => SwsCompatible (Image a) Source # 
Instance details

Defined in Codec.FFmpeg.Scaler

Methods

swsPlanes :: Image a -> (Ptr (Ptr CUChar) -> IO r) -> IO r Source #

swsStrides :: Image a -> (Ptr CInt -> IO r) -> IO r Source #

sliceHeight :: Image a -> (CInt -> IO r) -> IO r Source #

SwsCompatible (AVPixelFormat, V2 CInt, Vector CUChar) Source # 
Instance details

Defined in Codec.FFmpeg.Scaler

Methods

swsPlanes :: (AVPixelFormat, V2 CInt, Vector CUChar) -> (Ptr (Ptr CUChar) -> IO r) -> IO r Source #

swsStrides :: (AVPixelFormat, V2 CInt, Vector CUChar) -> (Ptr CInt -> IO r) -> IO r Source #

sliceHeight :: (AVPixelFormat, V2 CInt, Vector CUChar) -> (CInt -> IO r) -> IO r Source #

withSws :: SwsCompatible a => a -> (Ptr (Ptr CUChar) -> Ptr CInt -> CInt -> IO r) -> IO r Source #

Supplies a continuation with all components provided by the SwsCompatible class.

swsScale :: (SwsCompatible src, SwsCompatible dst) => SwsContext -> src -> dst -> IO CInt Source #

swsScale ctx src dst scales the entire src image to dst using the previously initialized ctx.