module GI.Gst.Structs.BufferPoolAcquireParams
(
BufferPoolAcquireParams(..) ,
newZeroBufferPoolAcquireParams ,
noBufferPoolAcquireParams ,
bufferPoolAcquireParams_flags ,
getBufferPoolAcquireParamsFlags ,
setBufferPoolAcquireParamsFlags ,
bufferPoolAcquireParams_format ,
getBufferPoolAcquireParamsFormat ,
setBufferPoolAcquireParamsFormat ,
bufferPoolAcquireParams_start ,
getBufferPoolAcquireParamsStart ,
setBufferPoolAcquireParamsStart ,
bufferPoolAcquireParams_stop ,
getBufferPoolAcquireParamsStop ,
setBufferPoolAcquireParamsStop ,
) where
import Data.GI.Base.ShortPrelude
import qualified Data.GI.Base.ShortPrelude as SP
import qualified Data.GI.Base.Overloading as O
import qualified Prelude as P
import qualified Data.GI.Base.Attributes as GI.Attributes
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GI.Gst.Enums as Gst.Enums
import qualified GI.Gst.Flags as Gst.Flags
newtype BufferPoolAcquireParams = BufferPoolAcquireParams (ManagedPtr BufferPoolAcquireParams)
instance WrappedPtr BufferPoolAcquireParams where
wrappedPtrCalloc = callocBytes 64
wrappedPtrCopy = \p -> withManagedPtr p (copyBytes 64 >=> wrapPtr BufferPoolAcquireParams)
wrappedPtrFree = Just ptr_to_g_free
newZeroBufferPoolAcquireParams :: MonadIO m => m BufferPoolAcquireParams
newZeroBufferPoolAcquireParams = liftIO $ wrappedPtrCalloc >>= wrapPtr BufferPoolAcquireParams
instance tag ~ 'AttrSet => Constructible BufferPoolAcquireParams tag where
new _ attrs = do
o <- newZeroBufferPoolAcquireParams
GI.Attributes.set o attrs
return o
noBufferPoolAcquireParams :: Maybe BufferPoolAcquireParams
noBufferPoolAcquireParams = Nothing
getBufferPoolAcquireParamsFormat :: MonadIO m => BufferPoolAcquireParams -> m Gst.Enums.Format
getBufferPoolAcquireParamsFormat s = liftIO $ withManagedPtr s $ \ptr -> do
val <- peek (ptr `plusPtr` 0) :: IO CUInt
let val' = (toEnum . fromIntegral) val
return val'
setBufferPoolAcquireParamsFormat :: MonadIO m => BufferPoolAcquireParams -> Gst.Enums.Format -> m ()
setBufferPoolAcquireParamsFormat s val = liftIO $ withManagedPtr s $ \ptr -> do
let val' = (fromIntegral . fromEnum) val
poke (ptr `plusPtr` 0) (val' :: CUInt)
data BufferPoolAcquireParamsFormatFieldInfo
instance AttrInfo BufferPoolAcquireParamsFormatFieldInfo where
type AttrAllowedOps BufferPoolAcquireParamsFormatFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint BufferPoolAcquireParamsFormatFieldInfo = (~) Gst.Enums.Format
type AttrBaseTypeConstraint BufferPoolAcquireParamsFormatFieldInfo = (~) BufferPoolAcquireParams
type AttrGetType BufferPoolAcquireParamsFormatFieldInfo = Gst.Enums.Format
type AttrLabel BufferPoolAcquireParamsFormatFieldInfo = "format"
type AttrOrigin BufferPoolAcquireParamsFormatFieldInfo = BufferPoolAcquireParams
attrGet _ = getBufferPoolAcquireParamsFormat
attrSet _ = setBufferPoolAcquireParamsFormat
attrConstruct = undefined
attrClear _ = undefined
bufferPoolAcquireParams_format :: AttrLabelProxy "format"
bufferPoolAcquireParams_format = AttrLabelProxy
getBufferPoolAcquireParamsStart :: MonadIO m => BufferPoolAcquireParams -> m Int64
getBufferPoolAcquireParamsStart s = liftIO $ withManagedPtr s $ \ptr -> do
val <- peek (ptr `plusPtr` 8) :: IO Int64
return val
setBufferPoolAcquireParamsStart :: MonadIO m => BufferPoolAcquireParams -> Int64 -> m ()
setBufferPoolAcquireParamsStart s val = liftIO $ withManagedPtr s $ \ptr -> do
poke (ptr `plusPtr` 8) (val :: Int64)
data BufferPoolAcquireParamsStartFieldInfo
instance AttrInfo BufferPoolAcquireParamsStartFieldInfo where
type AttrAllowedOps BufferPoolAcquireParamsStartFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint BufferPoolAcquireParamsStartFieldInfo = (~) Int64
type AttrBaseTypeConstraint BufferPoolAcquireParamsStartFieldInfo = (~) BufferPoolAcquireParams
type AttrGetType BufferPoolAcquireParamsStartFieldInfo = Int64
type AttrLabel BufferPoolAcquireParamsStartFieldInfo = "start"
type AttrOrigin BufferPoolAcquireParamsStartFieldInfo = BufferPoolAcquireParams
attrGet _ = getBufferPoolAcquireParamsStart
attrSet _ = setBufferPoolAcquireParamsStart
attrConstruct = undefined
attrClear _ = undefined
bufferPoolAcquireParams_start :: AttrLabelProxy "start"
bufferPoolAcquireParams_start = AttrLabelProxy
getBufferPoolAcquireParamsStop :: MonadIO m => BufferPoolAcquireParams -> m Int64
getBufferPoolAcquireParamsStop s = liftIO $ withManagedPtr s $ \ptr -> do
val <- peek (ptr `plusPtr` 16) :: IO Int64
return val
setBufferPoolAcquireParamsStop :: MonadIO m => BufferPoolAcquireParams -> Int64 -> m ()
setBufferPoolAcquireParamsStop s val = liftIO $ withManagedPtr s $ \ptr -> do
poke (ptr `plusPtr` 16) (val :: Int64)
data BufferPoolAcquireParamsStopFieldInfo
instance AttrInfo BufferPoolAcquireParamsStopFieldInfo where
type AttrAllowedOps BufferPoolAcquireParamsStopFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint BufferPoolAcquireParamsStopFieldInfo = (~) Int64
type AttrBaseTypeConstraint BufferPoolAcquireParamsStopFieldInfo = (~) BufferPoolAcquireParams
type AttrGetType BufferPoolAcquireParamsStopFieldInfo = Int64
type AttrLabel BufferPoolAcquireParamsStopFieldInfo = "stop"
type AttrOrigin BufferPoolAcquireParamsStopFieldInfo = BufferPoolAcquireParams
attrGet _ = getBufferPoolAcquireParamsStop
attrSet _ = setBufferPoolAcquireParamsStop
attrConstruct = undefined
attrClear _ = undefined
bufferPoolAcquireParams_stop :: AttrLabelProxy "stop"
bufferPoolAcquireParams_stop = AttrLabelProxy
getBufferPoolAcquireParamsFlags :: MonadIO m => BufferPoolAcquireParams -> m [Gst.Flags.BufferPoolAcquireFlags]
getBufferPoolAcquireParamsFlags s = liftIO $ withManagedPtr s $ \ptr -> do
val <- peek (ptr `plusPtr` 24) :: IO CUInt
let val' = wordToGFlags val
return val'
setBufferPoolAcquireParamsFlags :: MonadIO m => BufferPoolAcquireParams -> [Gst.Flags.BufferPoolAcquireFlags] -> m ()
setBufferPoolAcquireParamsFlags s val = liftIO $ withManagedPtr s $ \ptr -> do
let val' = gflagsToWord val
poke (ptr `plusPtr` 24) (val' :: CUInt)
data BufferPoolAcquireParamsFlagsFieldInfo
instance AttrInfo BufferPoolAcquireParamsFlagsFieldInfo where
type AttrAllowedOps BufferPoolAcquireParamsFlagsFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint BufferPoolAcquireParamsFlagsFieldInfo = (~) [Gst.Flags.BufferPoolAcquireFlags]
type AttrBaseTypeConstraint BufferPoolAcquireParamsFlagsFieldInfo = (~) BufferPoolAcquireParams
type AttrGetType BufferPoolAcquireParamsFlagsFieldInfo = [Gst.Flags.BufferPoolAcquireFlags]
type AttrLabel BufferPoolAcquireParamsFlagsFieldInfo = "flags"
type AttrOrigin BufferPoolAcquireParamsFlagsFieldInfo = BufferPoolAcquireParams
attrGet _ = getBufferPoolAcquireParamsFlags
attrSet _ = setBufferPoolAcquireParamsFlags
attrConstruct = undefined
attrClear _ = undefined
bufferPoolAcquireParams_flags :: AttrLabelProxy "flags"
bufferPoolAcquireParams_flags = AttrLabelProxy
instance O.HasAttributeList BufferPoolAcquireParams
type instance O.AttributeList BufferPoolAcquireParams = BufferPoolAcquireParamsAttributeList
type BufferPoolAcquireParamsAttributeList = ('[ '("format", BufferPoolAcquireParamsFormatFieldInfo), '("start", BufferPoolAcquireParamsStartFieldInfo), '("stop", BufferPoolAcquireParamsStopFieldInfo), '("flags", BufferPoolAcquireParamsFlagsFieldInfo)] :: [(Symbol, *)])
type family ResolveBufferPoolAcquireParamsMethod (t :: Symbol) (o :: *) :: * where
ResolveBufferPoolAcquireParamsMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveBufferPoolAcquireParamsMethod t BufferPoolAcquireParams, O.MethodInfo info BufferPoolAcquireParams p) => O.IsLabelProxy t (BufferPoolAcquireParams -> p) where
fromLabelProxy _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#if MIN_VERSION_base(4,9,0)
instance (info ~ ResolveBufferPoolAcquireParamsMethod t BufferPoolAcquireParams, O.MethodInfo info BufferPoolAcquireParams p) => O.IsLabel t (BufferPoolAcquireParams -> p) where
fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#endif