-- | Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte -- License : LGPL-2.1 -- Maintainer : Iñaki García Etxebarria #if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__)) #define ENABLE_OVERLOADING #endif module GI.Gst.Functions ( -- * Methods -- ** debugAddLogFunction #method:debugAddLogFunction# debugAddLogFunction , -- ** debugAddRingBufferLogger #method:debugAddRingBufferLogger# debugAddRingBufferLogger , -- ** debugBinToDotData #method:debugBinToDotData# debugBinToDotData , -- ** debugBinToDotFile #method:debugBinToDotFile# debugBinToDotFile , -- ** debugBinToDotFileWithTs #method:debugBinToDotFileWithTs# debugBinToDotFileWithTs , -- ** debugConstructTermColor #method:debugConstructTermColor# debugConstructTermColor , -- ** debugConstructWinColor #method:debugConstructWinColor# debugConstructWinColor , -- ** debugGetAllCategories #method:debugGetAllCategories# debugGetAllCategories , -- ** debugGetColorMode #method:debugGetColorMode# debugGetColorMode , -- ** debugGetDefaultThreshold #method:debugGetDefaultThreshold# debugGetDefaultThreshold , -- ** debugGetStackTrace #method:debugGetStackTrace# debugGetStackTrace , -- ** debugIsActive #method:debugIsActive# debugIsActive , -- ** debugIsColored #method:debugIsColored# debugIsColored , -- ** debugLogDefault #method:debugLogDefault# debugLogDefault , -- ** debugLogGetLine #method:debugLogGetLine# debugLogGetLine , -- ** debugPrintStackTrace #method:debugPrintStackTrace# debugPrintStackTrace , -- ** debugRemoveLogFunction #method:debugRemoveLogFunction# debugRemoveLogFunction , -- ** debugRemoveLogFunctionByData #method:debugRemoveLogFunctionByData# debugRemoveLogFunctionByData , -- ** debugRemoveRingBufferLogger #method:debugRemoveRingBufferLogger# debugRemoveRingBufferLogger , -- ** debugRingBufferLoggerGetLogs #method:debugRingBufferLoggerGetLogs# debugRingBufferLoggerGetLogs , -- ** debugSetActive #method:debugSetActive# debugSetActive , -- ** debugSetColorMode #method:debugSetColorMode# debugSetColorMode , -- ** debugSetColorModeFromString #method:debugSetColorModeFromString# debugSetColorModeFromString , -- ** debugSetColored #method:debugSetColored# debugSetColored , -- ** debugSetDefaultThreshold #method:debugSetDefaultThreshold# debugSetDefaultThreshold , -- ** debugSetThresholdForName #method:debugSetThresholdForName# debugSetThresholdForName , -- ** debugSetThresholdFromString #method:debugSetThresholdFromString# debugSetThresholdFromString , -- ** debugUnsetThresholdForName #method:debugUnsetThresholdForName# debugUnsetThresholdForName , -- ** deinit #method:deinit# deinit , -- ** dynamicTypeRegister #method:dynamicTypeRegister# dynamicTypeRegister , -- ** errorGetMessage #method:errorGetMessage# errorGetMessage , -- ** filenameToUri #method:filenameToUri# filenameToUri , -- ** flowGetName #method:flowGetName# flowGetName , -- ** flowToQuark #method:flowToQuark# flowToQuark , -- ** formatsContains #method:formatsContains# formatsContains , -- ** getMainExecutablePath #method:getMainExecutablePath# getMainExecutablePath , -- ** init #method:init# init , -- ** initCheck #method:initCheck# initCheck , -- ** isCapsFeatures #method:isCapsFeatures# isCapsFeatures , -- ** isInitialized #method:isInitialized# isInitialized , -- ** paramSpecArray #method:paramSpecArray# paramSpecArray , -- ** paramSpecFraction #method:paramSpecFraction# paramSpecFraction , -- ** parentBufferMetaApiGetType #method:parentBufferMetaApiGetType# parentBufferMetaApiGetType , -- ** parseBinFromDescription #method:parseBinFromDescription# parseBinFromDescription , -- ** parseBinFromDescriptionFull #method:parseBinFromDescriptionFull# parseBinFromDescriptionFull , -- ** parseLaunch #method:parseLaunch# parseLaunch , -- ** parseLaunchFull #method:parseLaunchFull# parseLaunchFull , -- ** parseLaunchv #method:parseLaunchv# parseLaunchv , -- ** parseLaunchvFull #method:parseLaunchvFull# parseLaunchvFull , -- ** protectionFilterSystemsByAvailableDecryptors #method:protectionFilterSystemsByAvailableDecryptors# protectionFilterSystemsByAvailableDecryptors, -- ** protectionMetaApiGetType #method:protectionMetaApiGetType# protectionMetaApiGetType , -- ** protectionSelectSystem #method:protectionSelectSystem# protectionSelectSystem , -- ** referenceTimestampMetaApiGetType #method:referenceTimestampMetaApiGetType# referenceTimestampMetaApiGetType , -- ** segtrapIsEnabled #method:segtrapIsEnabled# segtrapIsEnabled , -- ** segtrapSetEnabled #method:segtrapSetEnabled# segtrapSetEnabled , -- ** staticCapsGetType #method:staticCapsGetType# staticCapsGetType , -- ** staticPadTemplateGetType #method:staticPadTemplateGetType# staticPadTemplateGetType , -- ** tagExists #method:tagExists# tagExists , -- ** tagGetDescription #method:tagGetDescription# tagGetDescription , -- ** tagGetFlag #method:tagGetFlag# tagGetFlag , -- ** tagGetNick #method:tagGetNick# tagGetNick , -- ** tagGetType #method:tagGetType# tagGetType , -- ** tagIsFixed #method:tagIsFixed# tagIsFixed , -- ** tagMergeStringsWithComma #method:tagMergeStringsWithComma# tagMergeStringsWithComma , -- ** tagMergeUseFirst #method:tagMergeUseFirst# tagMergeUseFirst , -- ** tracingGetActiveTracers #method:tracingGetActiveTracers# tracingGetActiveTracers , -- ** tracingRegisterHook #method:tracingRegisterHook# tracingRegisterHook , -- ** typeFindGetType #method:typeFindGetType# typeFindGetType , -- ** typeIsPluginApi #method:typeIsPluginApi# typeIsPluginApi , -- ** typeMarkAsPluginApi #method:typeMarkAsPluginApi# typeMarkAsPluginApi , -- ** updateRegistry #method:updateRegistry# updateRegistry , -- ** utilArrayBinarySearch #method:utilArrayBinarySearch# utilArrayBinarySearch , -- ** utilDoubleToFraction #method:utilDoubleToFraction# utilDoubleToFraction , -- ** utilDumpBuffer #method:utilDumpBuffer# utilDumpBuffer , -- ** utilDumpMem #method:utilDumpMem# utilDumpMem , -- ** utilFractionAdd #method:utilFractionAdd# utilFractionAdd , -- ** utilFractionCompare #method:utilFractionCompare# utilFractionCompare , -- ** utilFractionMultiply #method:utilFractionMultiply# utilFractionMultiply , -- ** utilFractionToDouble #method:utilFractionToDouble# utilFractionToDouble , -- ** utilGdoubleToGuint64 #method:utilGdoubleToGuint64# utilGdoubleToGuint64 , -- ** utilGetObjectArray #method:utilGetObjectArray# utilGetObjectArray , -- ** utilGetTimestamp #method:utilGetTimestamp# utilGetTimestamp , -- ** utilGreatestCommonDivisor #method:utilGreatestCommonDivisor# utilGreatestCommonDivisor , -- ** utilGreatestCommonDivisorInt64 #method:utilGreatestCommonDivisorInt64# utilGreatestCommonDivisorInt64 , -- ** utilGroupIdNext #method:utilGroupIdNext# utilGroupIdNext , -- ** utilGuint64ToGdouble #method:utilGuint64ToGdouble# utilGuint64ToGdouble , -- ** utilSeqnumCompare #method:utilSeqnumCompare# utilSeqnumCompare , -- ** utilSeqnumNext #method:utilSeqnumNext# utilSeqnumNext , -- ** utilSetObjectArg #method:utilSetObjectArg# utilSetObjectArg , -- ** utilSetObjectArray #method:utilSetObjectArray# utilSetObjectArray , -- ** utilSetValueFromString #method:utilSetValueFromString# utilSetValueFromString , -- ** utilUint64Scale #method:utilUint64Scale# utilUint64Scale , -- ** utilUint64ScaleCeil #method:utilUint64ScaleCeil# utilUint64ScaleCeil , -- ** utilUint64ScaleInt #method:utilUint64ScaleInt# utilUint64ScaleInt , -- ** utilUint64ScaleIntCeil #method:utilUint64ScaleIntCeil# utilUint64ScaleIntCeil , -- ** utilUint64ScaleIntRound #method:utilUint64ScaleIntRound# utilUint64ScaleIntRound , -- ** utilUint64ScaleRound #method:utilUint64ScaleRound# utilUint64ScaleRound , -- ** valueCanCompare #method:valueCanCompare# valueCanCompare , -- ** valueCanIntersect #method:valueCanIntersect# valueCanIntersect , -- ** valueCanSubtract #method:valueCanSubtract# valueCanSubtract , -- ** valueCanUnion #method:valueCanUnion# valueCanUnion , -- ** valueCompare #method:valueCompare# valueCompare , -- ** valueDeserialize #method:valueDeserialize# valueDeserialize , -- ** valueFixate #method:valueFixate# valueFixate , -- ** valueFractionMultiply #method:valueFractionMultiply# valueFractionMultiply , -- ** valueFractionSubtract #method:valueFractionSubtract# valueFractionSubtract , -- ** valueGetBitmask #method:valueGetBitmask# valueGetBitmask , -- ** valueGetCaps #method:valueGetCaps# valueGetCaps , -- ** valueGetCapsFeatures #method:valueGetCapsFeatures# valueGetCapsFeatures , -- ** valueGetDoubleRangeMax #method:valueGetDoubleRangeMax# valueGetDoubleRangeMax , -- ** valueGetDoubleRangeMin #method:valueGetDoubleRangeMin# valueGetDoubleRangeMin , -- ** valueGetFlagsetFlags #method:valueGetFlagsetFlags# valueGetFlagsetFlags , -- ** valueGetFlagsetMask #method:valueGetFlagsetMask# valueGetFlagsetMask , -- ** valueGetFractionDenominator #method:valueGetFractionDenominator# valueGetFractionDenominator , -- ** valueGetFractionNumerator #method:valueGetFractionNumerator# valueGetFractionNumerator , -- ** valueGetFractionRangeMax #method:valueGetFractionRangeMax# valueGetFractionRangeMax , -- ** valueGetFractionRangeMin #method:valueGetFractionRangeMin# valueGetFractionRangeMin , -- ** valueGetInt64RangeMax #method:valueGetInt64RangeMax# valueGetInt64RangeMax , -- ** valueGetInt64RangeMin #method:valueGetInt64RangeMin# valueGetInt64RangeMin , -- ** valueGetInt64RangeStep #method:valueGetInt64RangeStep# valueGetInt64RangeStep , -- ** valueGetIntRangeMax #method:valueGetIntRangeMax# valueGetIntRangeMax , -- ** valueGetIntRangeMin #method:valueGetIntRangeMin# valueGetIntRangeMin , -- ** valueGetIntRangeStep #method:valueGetIntRangeStep# valueGetIntRangeStep , -- ** valueGetStructure #method:valueGetStructure# valueGetStructure , -- ** valueInitAndCopy #method:valueInitAndCopy# valueInitAndCopy , -- ** valueIntersect #method:valueIntersect# valueIntersect , -- ** valueIsFixed #method:valueIsFixed# valueIsFixed , -- ** valueIsSubset #method:valueIsSubset# valueIsSubset , -- ** valueRegister #method:valueRegister# valueRegister , -- ** valueSerialize #method:valueSerialize# valueSerialize , -- ** valueSetBitmask #method:valueSetBitmask# valueSetBitmask , -- ** valueSetCaps #method:valueSetCaps# valueSetCaps , -- ** valueSetCapsFeatures #method:valueSetCapsFeatures# valueSetCapsFeatures , -- ** valueSetDoubleRange #method:valueSetDoubleRange# valueSetDoubleRange , -- ** valueSetFlagset #method:valueSetFlagset# valueSetFlagset , -- ** valueSetFraction #method:valueSetFraction# valueSetFraction , -- ** valueSetFractionRange #method:valueSetFractionRange# valueSetFractionRange , -- ** valueSetFractionRangeFull #method:valueSetFractionRangeFull# valueSetFractionRangeFull , -- ** valueSetInt64Range #method:valueSetInt64Range# valueSetInt64Range , -- ** valueSetInt64RangeStep #method:valueSetInt64RangeStep# valueSetInt64RangeStep , -- ** valueSetIntRange #method:valueSetIntRange# valueSetIntRange , -- ** valueSetIntRangeStep #method:valueSetIntRangeStep# valueSetIntRangeStep , -- ** valueSetStructure #method:valueSetStructure# valueSetStructure , -- ** valueSubtract #method:valueSubtract# valueSubtract , -- ** valueUnion #method:valueUnion# valueUnion , -- ** version #method:version# version , -- ** versionString #method:versionString# versionString , ) 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.BasicTypes as B.Types import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr import qualified Data.GI.Base.GArray as B.GArray import qualified Data.GI.Base.GClosure as B.GClosure import qualified Data.GI.Base.GError as B.GError import qualified Data.GI.Base.GVariant as B.GVariant import qualified Data.GI.Base.GValue as B.GValue import qualified Data.GI.Base.GParamSpec as B.GParamSpec import qualified Data.GI.Base.CallStack as B.CallStack import qualified Data.GI.Base.Properties as B.Properties import qualified Data.GI.Base.Signals as B.Signals import qualified Control.Monad.IO.Class as MIO 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 GHC.OverloadedLabels as OL import qualified GHC.Records as R import qualified GI.GLib.Callbacks as GLib.Callbacks import qualified GI.GObject.Callbacks as GObject.Callbacks import qualified GI.GObject.Flags as GObject.Flags import qualified GI.GObject.Objects.Object as GObject.Object import qualified GI.GObject.Structs.ValueArray as GObject.ValueArray import qualified GI.Gst.Callbacks as Gst.Callbacks import {-# SOURCE #-} qualified GI.Gst.Enums as Gst.Enums import {-# SOURCE #-} qualified GI.Gst.Flags as Gst.Flags import {-# SOURCE #-} qualified GI.Gst.Objects.Bin as Gst.Bin import {-# SOURCE #-} qualified GI.Gst.Objects.Element as Gst.Element import {-# SOURCE #-} qualified GI.Gst.Objects.Plugin as Gst.Plugin import {-# SOURCE #-} qualified GI.Gst.Objects.Tracer as Gst.Tracer import {-# SOURCE #-} qualified GI.Gst.Structs.Buffer as Gst.Buffer import {-# SOURCE #-} qualified GI.Gst.Structs.Caps as Gst.Caps import {-# SOURCE #-} qualified GI.Gst.Structs.CapsFeatures as Gst.CapsFeatures import {-# SOURCE #-} qualified GI.Gst.Structs.DebugCategory as Gst.DebugCategory import {-# SOURCE #-} qualified GI.Gst.Structs.DebugMessage as Gst.DebugMessage import {-# SOURCE #-} qualified GI.Gst.Structs.ParseContext as Gst.ParseContext import {-# SOURCE #-} qualified GI.Gst.Structs.Structure as Gst.Structure import {-# SOURCE #-} qualified GI.Gst.Structs.ValueTable as Gst.ValueTable -- function version_string -- Args: [] -- Lengths: [] -- returnType: Just (TBasicType TUTF8) -- throws : False -- Skip return : False foreign import ccall "gst_version_string" gst_version_string :: IO CString -- | This function returns a string that is useful for describing this version -- of GStreamer to the outside world: user agent strings, logging, ... versionString :: (B.CallStack.HasCallStack, MonadIO m) => m T.Text -- ^ __Returns:__ a newly allocated string describing this version -- of GStreamer. versionString :: forall (m :: * -> *). (HasCallStack, MonadIO m) => m Text versionString = IO Text -> m Text forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO Text -> m Text) -> IO Text -> m Text forall a b. (a -> b) -> a -> b $ do CString result <- IO CString gst_version_string Text -> CString -> IO () forall a. HasCallStack => Text -> Ptr a -> IO () checkUnexpectedReturnNULL Text "versionString" CString result Text result' <- HasCallStack => CString -> IO Text CString -> IO Text cstringToText CString result CString -> IO () forall a. Ptr a -> IO () freeMem CString result Text -> IO Text forall (m :: * -> *) a. Monad m => a -> m a return Text result' -- function version -- Args: [ Arg -- { argCName = "major" -- , argType = TBasicType TUInt -- , direction = DirectionOut -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = -- Just "pointer to a guint to store the major version number" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferEverything -- } -- , Arg -- { argCName = "minor" -- , argType = TBasicType TUInt -- , direction = DirectionOut -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = -- Just "pointer to a guint to store the minor version number" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferEverything -- } -- , Arg -- { argCName = "micro" -- , argType = TBasicType TUInt -- , direction = DirectionOut -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = -- Just "pointer to a guint to store the micro version number" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferEverything -- } -- , Arg -- { argCName = "nano" -- , argType = TBasicType TUInt -- , direction = DirectionOut -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = -- Just "pointer to a guint to store the nano version number" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferEverything -- } -- ] -- Lengths: [] -- returnType: Nothing -- throws : False -- Skip return : False foreign import ccall "gst_version" gst_version :: Ptr Word32 -> -- major : TBasicType TUInt Ptr Word32 -> -- minor : TBasicType TUInt Ptr Word32 -> -- micro : TBasicType TUInt Ptr Word32 -> -- nano : TBasicType TUInt IO () -- | Gets the version number of the GStreamer library. version :: (B.CallStack.HasCallStack, MonadIO m) => m ((Word32, Word32, Word32, Word32)) version :: forall (m :: * -> *). (HasCallStack, MonadIO m) => m (Word32, Word32, Word32, Word32) version = IO (Word32, Word32, Word32, Word32) -> m (Word32, Word32, Word32, Word32) forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO (Word32, Word32, Word32, Word32) -> m (Word32, Word32, Word32, Word32)) -> IO (Word32, Word32, Word32, Word32) -> m (Word32, Word32, Word32, Word32) forall a b. (a -> b) -> a -> b $ do Ptr Word32 major <- IO (Ptr Word32) forall a. Storable a => IO (Ptr a) allocMem :: IO (Ptr Word32) Ptr Word32 minor <- IO (Ptr Word32) forall a. Storable a => IO (Ptr a) allocMem :: IO (Ptr Word32) Ptr Word32 micro <- IO (Ptr Word32) forall a. Storable a => IO (Ptr a) allocMem :: IO (Ptr Word32) Ptr Word32 nano <- IO (Ptr Word32) forall a. Storable a => IO (Ptr a) allocMem :: IO (Ptr Word32) Ptr Word32 -> Ptr Word32 -> Ptr Word32 -> Ptr Word32 -> IO () gst_version Ptr Word32 major Ptr Word32 minor Ptr Word32 micro Ptr Word32 nano Word32 major' <- Ptr Word32 -> IO Word32 forall a. Storable a => Ptr a -> IO a peek Ptr Word32 major Word32 minor' <- Ptr Word32 -> IO Word32 forall a. Storable a => Ptr a -> IO a peek Ptr Word32 minor Word32 micro' <- Ptr Word32 -> IO Word32 forall a. Storable a => Ptr a -> IO a peek Ptr Word32 micro Word32 nano' <- Ptr Word32 -> IO Word32 forall a. Storable a => Ptr a -> IO a peek Ptr Word32 nano Ptr Word32 -> IO () forall a. Ptr a -> IO () freeMem Ptr Word32 major Ptr Word32 -> IO () forall a. Ptr a -> IO () freeMem Ptr Word32 minor Ptr Word32 -> IO () forall a. Ptr a -> IO () freeMem Ptr Word32 micro Ptr Word32 -> IO () forall a. Ptr a -> IO () freeMem Ptr Word32 nano (Word32, Word32, Word32, Word32) -> IO (Word32, Word32, Word32, Word32) forall (m :: * -> *) a. Monad m => a -> m a return (Word32 major', Word32 minor', Word32 micro', Word32 nano') -- function value_union -- Args: [ Arg -- { argCName = "dest" -- , argType = TGValue -- , direction = DirectionOut -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "the destination value" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = True -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "value1" -- , argType = TGValue -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "a value to union" , sinceVersion = Nothing } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "value2" -- , argType = TGValue -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "another value to union" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Just (TBasicType TBoolean) -- throws : False -- Skip return : False foreign import ccall "gst_value_union" gst_value_union :: Ptr GValue -> -- dest : TGValue Ptr GValue -> -- value1 : TGValue Ptr GValue -> -- value2 : TGValue IO CInt -- | Creates a GValue corresponding to the union of /@value1@/ and /@value2@/. valueUnion :: (B.CallStack.HasCallStack, MonadIO m) => GValue -- ^ /@value1@/: a value to union -> GValue -- ^ /@value2@/: another value to union -> m ((Bool, GValue)) -- ^ __Returns:__ 'P.True' if the union succeeded. valueUnion :: forall (m :: * -> *). (HasCallStack, MonadIO m) => GValue -> GValue -> m (Bool, GValue) valueUnion GValue value1 GValue value2 = IO (Bool, GValue) -> m (Bool, GValue) forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO (Bool, GValue) -> m (Bool, GValue)) -> IO (Bool, GValue) -> m (Bool, GValue) forall a b. (a -> b) -> a -> b $ do Ptr GValue dest <- Int -> IO (Ptr GValue) forall a. Int -> IO (Ptr a) SP.callocBytes Int 24 :: IO (Ptr GValue) Ptr GValue value1' <- GValue -> IO (Ptr GValue) forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a) unsafeManagedPtrGetPtr GValue value1 Ptr GValue value2' <- GValue -> IO (Ptr GValue) forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a) unsafeManagedPtrGetPtr GValue value2 CInt result <- Ptr GValue -> Ptr GValue -> Ptr GValue -> IO CInt gst_value_union Ptr GValue dest Ptr GValue value1' Ptr GValue value2' let result' :: Bool result' = (CInt -> CInt -> Bool forall a. Eq a => a -> a -> Bool /= CInt 0) CInt result GValue dest' <- Ptr GValue -> IO GValue B.GValue.wrapGValuePtr Ptr GValue dest GValue -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr GValue value1 GValue -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr GValue value2 (Bool, GValue) -> IO (Bool, GValue) forall (m :: * -> *) a. Monad m => a -> m a return (Bool result', GValue dest') -- function value_subtract -- Args: [ Arg -- { argCName = "dest" -- , argType = TGValue -- , direction = DirectionOut -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = -- Just -- "the destination value\n for the result if the subtraction is not empty. May be %NULL,\n in which case the resulting set will not be computed, which can\n give a fair speedup." -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = True -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "minuend" -- , argType = TGValue -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "the value to subtract from" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "subtrahend" -- , argType = TGValue -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "the value to subtract" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Just (TBasicType TBoolean) -- throws : False -- Skip return : False foreign import ccall "gst_value_subtract" gst_value_subtract :: Ptr GValue -> -- dest : TGValue Ptr GValue -> -- minuend : TGValue Ptr GValue -> -- subtrahend : TGValue IO CInt -- | Subtracts /@subtrahend@/ from /@minuend@/ and stores the result in /@dest@/. -- Note that this means subtraction as in sets, not as in mathematics. valueSubtract :: (B.CallStack.HasCallStack, MonadIO m) => GValue -- ^ /@minuend@/: the value to subtract from -> GValue -- ^ /@subtrahend@/: the value to subtract -> m ((Bool, GValue)) -- ^ __Returns:__ 'P.True' if the subtraction is not empty valueSubtract :: forall (m :: * -> *). (HasCallStack, MonadIO m) => GValue -> GValue -> m (Bool, GValue) valueSubtract GValue minuend GValue subtrahend = IO (Bool, GValue) -> m (Bool, GValue) forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO (Bool, GValue) -> m (Bool, GValue)) -> IO (Bool, GValue) -> m (Bool, GValue) forall a b. (a -> b) -> a -> b $ do Ptr GValue dest <- Int -> IO (Ptr GValue) forall a. Int -> IO (Ptr a) SP.callocBytes Int 24 :: IO (Ptr GValue) Ptr GValue minuend' <- GValue -> IO (Ptr GValue) forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a) unsafeManagedPtrGetPtr GValue minuend Ptr GValue subtrahend' <- GValue -> IO (Ptr GValue) forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a) unsafeManagedPtrGetPtr GValue subtrahend CInt result <- Ptr GValue -> Ptr GValue -> Ptr GValue -> IO CInt gst_value_subtract Ptr GValue dest Ptr GValue minuend' Ptr GValue subtrahend' let result' :: Bool result' = (CInt -> CInt -> Bool forall a. Eq a => a -> a -> Bool /= CInt 0) CInt result GValue dest' <- Ptr GValue -> IO GValue B.GValue.wrapGValuePtr Ptr GValue dest GValue -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr GValue minuend GValue -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr GValue subtrahend (Bool, GValue) -> IO (Bool, GValue) forall (m :: * -> *) a. Monad m => a -> m a return (Bool result', GValue dest') -- function value_set_structure -- Args: [ Arg -- { argCName = "value" -- , argType = TGValue -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "a GValue initialized to GST_TYPE_STRUCTURE" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "structure" -- , argType = -- TInterface Name { namespace = "Gst" , name = "Structure" } -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "the structure to set the value to" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Nothing -- throws : False -- Skip return : False foreign import ccall "gst_value_set_structure" gst_value_set_structure :: Ptr GValue -> -- value : TGValue Ptr Gst.Structure.Structure -> -- structure : TInterface (Name {namespace = "Gst", name = "Structure"}) IO () -- | Sets the contents of /@value@/ to /@structure@/. valueSetStructure :: (B.CallStack.HasCallStack, MonadIO m) => GValue -- ^ /@value@/: a GValue initialized to GST_TYPE_STRUCTURE -> Gst.Structure.Structure -- ^ /@structure@/: the structure to set the value to -> m () valueSetStructure :: forall (m :: * -> *). (HasCallStack, MonadIO m) => GValue -> Structure -> m () valueSetStructure GValue value Structure structure = IO () -> m () forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO () -> m ()) -> IO () -> m () forall a b. (a -> b) -> a -> b $ do Ptr GValue value' <- GValue -> IO (Ptr GValue) forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a) unsafeManagedPtrGetPtr GValue value Ptr Structure structure' <- Structure -> IO (Ptr Structure) forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a) unsafeManagedPtrGetPtr Structure structure Ptr GValue -> Ptr Structure -> IO () gst_value_set_structure Ptr GValue value' Ptr Structure structure' GValue -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr GValue value Structure -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr Structure structure () -> IO () forall (m :: * -> *) a. Monad m => a -> m a return () -- function value_set_int_range_step -- Args: [ Arg -- { argCName = "value" -- , argType = TGValue -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "a GValue initialized to GST_TYPE_INT_RANGE" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "start" -- , argType = TBasicType TInt -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "the start of the range" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "end" -- , argType = TBasicType TInt -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "the end of the range" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "step" -- , argType = TBasicType TInt -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "the step of the range" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Nothing -- throws : False -- Skip return : False foreign import ccall "gst_value_set_int_range_step" gst_value_set_int_range_step :: Ptr GValue -> -- value : TGValue Int32 -> -- start : TBasicType TInt Int32 -> -- end : TBasicType TInt Int32 -> -- step : TBasicType TInt IO () -- | Sets /@value@/ to the range specified by /@start@/, /@end@/ and /@step@/. valueSetIntRangeStep :: (B.CallStack.HasCallStack, MonadIO m) => GValue -- ^ /@value@/: a GValue initialized to GST_TYPE_INT_RANGE -> Int32 -- ^ /@start@/: the start of the range -> Int32 -- ^ /@end@/: the end of the range -> Int32 -- ^ /@step@/: the step of the range -> m () valueSetIntRangeStep :: forall (m :: * -> *). (HasCallStack, MonadIO m) => GValue -> Int32 -> Int32 -> Int32 -> m () valueSetIntRangeStep GValue value Int32 start Int32 end Int32 step = IO () -> m () forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO () -> m ()) -> IO () -> m () forall a b. (a -> b) -> a -> b $ do Ptr GValue value' <- GValue -> IO (Ptr GValue) forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a) unsafeManagedPtrGetPtr GValue value Ptr GValue -> Int32 -> Int32 -> Int32 -> IO () gst_value_set_int_range_step Ptr GValue value' Int32 start Int32 end Int32 step GValue -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr GValue value () -> IO () forall (m :: * -> *) a. Monad m => a -> m a return () -- function value_set_int_range -- Args: [ Arg -- { argCName = "value" -- , argType = TGValue -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "a GValue initialized to GST_TYPE_INT_RANGE" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "start" -- , argType = TBasicType TInt -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "the start of the range" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "end" -- , argType = TBasicType TInt -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "the end of the range" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Nothing -- throws : False -- Skip return : False foreign import ccall "gst_value_set_int_range" gst_value_set_int_range :: Ptr GValue -> -- value : TGValue Int32 -> -- start : TBasicType TInt Int32 -> -- end : TBasicType TInt IO () -- | Sets /@value@/ to the range specified by /@start@/ and /@end@/. valueSetIntRange :: (B.CallStack.HasCallStack, MonadIO m) => GValue -- ^ /@value@/: a GValue initialized to GST_TYPE_INT_RANGE -> Int32 -- ^ /@start@/: the start of the range -> Int32 -- ^ /@end@/: the end of the range -> m () valueSetIntRange :: forall (m :: * -> *). (HasCallStack, MonadIO m) => GValue -> Int32 -> Int32 -> m () valueSetIntRange GValue value Int32 start Int32 end = IO () -> m () forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO () -> m ()) -> IO () -> m () forall a b. (a -> b) -> a -> b $ do Ptr GValue value' <- GValue -> IO (Ptr GValue) forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a) unsafeManagedPtrGetPtr GValue value Ptr GValue -> Int32 -> Int32 -> IO () gst_value_set_int_range Ptr GValue value' Int32 start Int32 end GValue -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr GValue value () -> IO () forall (m :: * -> *) a. Monad m => a -> m a return () -- function value_set_int64_range_step -- Args: [ Arg -- { argCName = "value" -- , argType = TGValue -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "a GValue initialized to GST_TYPE_INT64_RANGE" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "start" -- , argType = TBasicType TInt64 -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "the start of the range" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "end" -- , argType = TBasicType TInt64 -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "the end of the range" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "step" -- , argType = TBasicType TInt64 -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "the step of the range" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Nothing -- throws : False -- Skip return : False foreign import ccall "gst_value_set_int64_range_step" gst_value_set_int64_range_step :: Ptr GValue -> -- value : TGValue Int64 -> -- start : TBasicType TInt64 Int64 -> -- end : TBasicType TInt64 Int64 -> -- step : TBasicType TInt64 IO () -- | Sets /@value@/ to the range specified by /@start@/, /@end@/ and /@step@/. valueSetInt64RangeStep :: (B.CallStack.HasCallStack, MonadIO m) => GValue -- ^ /@value@/: a GValue initialized to GST_TYPE_INT64_RANGE -> Int64 -- ^ /@start@/: the start of the range -> Int64 -- ^ /@end@/: the end of the range -> Int64 -- ^ /@step@/: the step of the range -> m () valueSetInt64RangeStep :: forall (m :: * -> *). (HasCallStack, MonadIO m) => GValue -> Int64 -> Int64 -> Int64 -> m () valueSetInt64RangeStep GValue value Int64 start Int64 end Int64 step = IO () -> m () forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO () -> m ()) -> IO () -> m () forall a b. (a -> b) -> a -> b $ do Ptr GValue value' <- GValue -> IO (Ptr GValue) forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a) unsafeManagedPtrGetPtr GValue value Ptr GValue -> Int64 -> Int64 -> Int64 -> IO () gst_value_set_int64_range_step Ptr GValue value' Int64 start Int64 end Int64 step GValue -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr GValue value () -> IO () forall (m :: * -> *) a. Monad m => a -> m a return () -- function value_set_int64_range -- Args: [ Arg -- { argCName = "value" -- , argType = TGValue -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "a GValue initialized to GST_TYPE_INT64_RANGE" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "start" -- , argType = TBasicType TInt64 -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "the start of the range" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "end" -- , argType = TBasicType TInt64 -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "the end of the range" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Nothing -- throws : False -- Skip return : False foreign import ccall "gst_value_set_int64_range" gst_value_set_int64_range :: Ptr GValue -> -- value : TGValue Int64 -> -- start : TBasicType TInt64 Int64 -> -- end : TBasicType TInt64 IO () -- | Sets /@value@/ to the range specified by /@start@/ and /@end@/. valueSetInt64Range :: (B.CallStack.HasCallStack, MonadIO m) => GValue -- ^ /@value@/: a GValue initialized to GST_TYPE_INT64_RANGE -> Int64 -- ^ /@start@/: the start of the range -> Int64 -- ^ /@end@/: the end of the range -> m () valueSetInt64Range :: forall (m :: * -> *). (HasCallStack, MonadIO m) => GValue -> Int64 -> Int64 -> m () valueSetInt64Range GValue value Int64 start Int64 end = IO () -> m () forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO () -> m ()) -> IO () -> m () forall a b. (a -> b) -> a -> b $ do Ptr GValue value' <- GValue -> IO (Ptr GValue) forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a) unsafeManagedPtrGetPtr GValue value Ptr GValue -> Int64 -> Int64 -> IO () gst_value_set_int64_range Ptr GValue value' Int64 start Int64 end GValue -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr GValue value () -> IO () forall (m :: * -> *) a. Monad m => a -> m a return () -- function value_set_fraction_range_full -- Args: [ Arg -- { argCName = "value" -- , argType = TGValue -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = -- Just "a GValue initialized to GST_TYPE_FRACTION_RANGE" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "numerator_start" -- , argType = TBasicType TInt -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "the numerator start of the range" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "denominator_start" -- , argType = TBasicType TInt -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "the denominator start of the range" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "numerator_end" -- , argType = TBasicType TInt -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "the numerator end of the range" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "denominator_end" -- , argType = TBasicType TInt -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "the denominator end of the range" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Nothing -- throws : False -- Skip return : False foreign import ccall "gst_value_set_fraction_range_full" gst_value_set_fraction_range_full :: Ptr GValue -> -- value : TGValue Int32 -> -- numerator_start : TBasicType TInt Int32 -> -- denominator_start : TBasicType TInt Int32 -> -- numerator_end : TBasicType TInt Int32 -> -- denominator_end : TBasicType TInt IO () -- | Sets /@value@/ to the range specified by /@numeratorStart@/\//@denominatorStart@/ -- and /@numeratorEnd@/\//@denominatorEnd@/. valueSetFractionRangeFull :: (B.CallStack.HasCallStack, MonadIO m) => GValue -- ^ /@value@/: a GValue initialized to GST_TYPE_FRACTION_RANGE -> Int32 -- ^ /@numeratorStart@/: the numerator start of the range -> Int32 -- ^ /@denominatorStart@/: the denominator start of the range -> Int32 -- ^ /@numeratorEnd@/: the numerator end of the range -> Int32 -- ^ /@denominatorEnd@/: the denominator end of the range -> m () valueSetFractionRangeFull :: forall (m :: * -> *). (HasCallStack, MonadIO m) => GValue -> Int32 -> Int32 -> Int32 -> Int32 -> m () valueSetFractionRangeFull GValue value Int32 numeratorStart Int32 denominatorStart Int32 numeratorEnd Int32 denominatorEnd = IO () -> m () forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO () -> m ()) -> IO () -> m () forall a b. (a -> b) -> a -> b $ do Ptr GValue value' <- GValue -> IO (Ptr GValue) forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a) unsafeManagedPtrGetPtr GValue value Ptr GValue -> Int32 -> Int32 -> Int32 -> Int32 -> IO () gst_value_set_fraction_range_full Ptr GValue value' Int32 numeratorStart Int32 denominatorStart Int32 numeratorEnd Int32 denominatorEnd GValue -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr GValue value () -> IO () forall (m :: * -> *) a. Monad m => a -> m a return () -- function value_set_fraction_range -- Args: [ Arg -- { argCName = "value" -- , argType = TGValue -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = -- Just "a GValue initialized to GST_TYPE_FRACTION_RANGE" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "start" -- , argType = TGValue -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = -- Just "the start of the range (a GST_TYPE_FRACTION GValue)" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "end" -- , argType = TGValue -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = -- Just "the end of the range (a GST_TYPE_FRACTION GValue)" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Nothing -- throws : False -- Skip return : False foreign import ccall "gst_value_set_fraction_range" gst_value_set_fraction_range :: Ptr GValue -> -- value : TGValue Ptr GValue -> -- start : TGValue Ptr GValue -> -- end : TGValue IO () -- | Sets /@value@/ to the range specified by /@start@/ and /@end@/. valueSetFractionRange :: (B.CallStack.HasCallStack, MonadIO m) => GValue -- ^ /@value@/: a GValue initialized to GST_TYPE_FRACTION_RANGE -> GValue -- ^ /@start@/: the start of the range (a GST_TYPE_FRACTION GValue) -> GValue -- ^ /@end@/: the end of the range (a GST_TYPE_FRACTION GValue) -> m () valueSetFractionRange :: forall (m :: * -> *). (HasCallStack, MonadIO m) => GValue -> GValue -> GValue -> m () valueSetFractionRange GValue value GValue start GValue end = IO () -> m () forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO () -> m ()) -> IO () -> m () forall a b. (a -> b) -> a -> b $ do Ptr GValue value' <- GValue -> IO (Ptr GValue) forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a) unsafeManagedPtrGetPtr GValue value Ptr GValue start' <- GValue -> IO (Ptr GValue) forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a) unsafeManagedPtrGetPtr GValue start Ptr GValue end' <- GValue -> IO (Ptr GValue) forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a) unsafeManagedPtrGetPtr GValue end Ptr GValue -> Ptr GValue -> Ptr GValue -> IO () gst_value_set_fraction_range Ptr GValue value' Ptr GValue start' Ptr GValue end' GValue -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr GValue value GValue -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr GValue start GValue -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr GValue end () -> IO () forall (m :: * -> *) a. Monad m => a -> m a return () -- function value_set_fraction -- Args: [ Arg -- { argCName = "value" -- , argType = TGValue -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "a GValue initialized to #GST_TYPE_FRACTION" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "numerator" -- , argType = TBasicType TInt -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "the numerator of the fraction" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "denominator" -- , argType = TBasicType TInt -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "the denominator of the fraction" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Nothing -- throws : False -- Skip return : False foreign import ccall "gst_value_set_fraction" gst_value_set_fraction :: Ptr GValue -> -- value : TGValue Int32 -> -- numerator : TBasicType TInt Int32 -> -- denominator : TBasicType TInt IO () -- | Sets /@value@/ to the fraction specified by /@numerator@/ over /@denominator@/. -- The fraction gets reduced to the smallest numerator and denominator, -- and if necessary the sign is moved to the numerator. valueSetFraction :: (B.CallStack.HasCallStack, MonadIO m) => GValue -- ^ /@value@/: a GValue initialized to @/GST_TYPE_FRACTION/@ -> Int32 -- ^ /@numerator@/: the numerator of the fraction -> Int32 -- ^ /@denominator@/: the denominator of the fraction -> m () valueSetFraction :: forall (m :: * -> *). (HasCallStack, MonadIO m) => GValue -> Int32 -> Int32 -> m () valueSetFraction GValue value Int32 numerator Int32 denominator = IO () -> m () forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO () -> m ()) -> IO () -> m () forall a b. (a -> b) -> a -> b $ do Ptr GValue value' <- GValue -> IO (Ptr GValue) forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a) unsafeManagedPtrGetPtr GValue value Ptr GValue -> Int32 -> Int32 -> IO () gst_value_set_fraction Ptr GValue value' Int32 numerator Int32 denominator GValue -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr GValue value () -> IO () forall (m :: * -> *) a. Monad m => a -> m a return () -- function value_set_flagset -- Args: [ Arg -- { argCName = "value" -- , argType = TGValue -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "a GValue initialized to %GST_TYPE_FLAG_SET" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "flags" -- , argType = TBasicType TUInt -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "The value of the flags set or unset" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "mask" -- , argType = TBasicType TUInt -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = -- Just -- "The mask indicate which flags bits must match for comparisons" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Nothing -- throws : False -- Skip return : False foreign import ccall "gst_value_set_flagset" gst_value_set_flagset :: Ptr GValue -> -- value : TGValue Word32 -> -- flags : TBasicType TUInt Word32 -> -- mask : TBasicType TUInt IO () -- | Sets /@value@/ to the flags and mask values provided in /@flags@/ and /@mask@/. -- The /@flags@/ value indicates the values of flags, the /@mask@/ represents -- which bits in the flag value have been set, and which are \"don\'t care\" -- -- /Since: 1.6/ valueSetFlagset :: (B.CallStack.HasCallStack, MonadIO m) => GValue -- ^ /@value@/: a GValue initialized to @/GST_TYPE_FLAG_SET/@ -> Word32 -- ^ /@flags@/: The value of the flags set or unset -> Word32 -- ^ /@mask@/: The mask indicate which flags bits must match for comparisons -> m () valueSetFlagset :: forall (m :: * -> *). (HasCallStack, MonadIO m) => GValue -> Word32 -> Word32 -> m () valueSetFlagset GValue value Word32 flags Word32 mask = IO () -> m () forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO () -> m ()) -> IO () -> m () forall a b. (a -> b) -> a -> b $ do Ptr GValue value' <- GValue -> IO (Ptr GValue) forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a) unsafeManagedPtrGetPtr GValue value Ptr GValue -> Word32 -> Word32 -> IO () gst_value_set_flagset Ptr GValue value' Word32 flags Word32 mask GValue -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr GValue value () -> IO () forall (m :: * -> *) a. Monad m => a -> m a return () -- function value_set_double_range -- Args: [ Arg -- { argCName = "value" -- , argType = TGValue -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "a GValue initialized to GST_TYPE_DOUBLE_RANGE" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "start" -- , argType = TBasicType TDouble -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "the start of the range" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "end" -- , argType = TBasicType TDouble -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "the end of the range" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Nothing -- throws : False -- Skip return : False foreign import ccall "gst_value_set_double_range" gst_value_set_double_range :: Ptr GValue -> -- value : TGValue CDouble -> -- start : TBasicType TDouble CDouble -> -- end : TBasicType TDouble IO () -- | Sets /@value@/ to the range specified by /@start@/ and /@end@/. valueSetDoubleRange :: (B.CallStack.HasCallStack, MonadIO m) => GValue -- ^ /@value@/: a GValue initialized to GST_TYPE_DOUBLE_RANGE -> Double -- ^ /@start@/: the start of the range -> Double -- ^ /@end@/: the end of the range -> m () valueSetDoubleRange :: forall (m :: * -> *). (HasCallStack, MonadIO m) => GValue -> Double -> Double -> m () valueSetDoubleRange GValue value Double start Double end = IO () -> m () forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO () -> m ()) -> IO () -> m () forall a b. (a -> b) -> a -> b $ do Ptr GValue value' <- GValue -> IO (Ptr GValue) forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a) unsafeManagedPtrGetPtr GValue value let start' :: CDouble start' = Double -> CDouble forall a b. (Real a, Fractional b) => a -> b realToFrac Double start let end' :: CDouble end' = Double -> CDouble forall a b. (Real a, Fractional b) => a -> b realToFrac Double end Ptr GValue -> CDouble -> CDouble -> IO () gst_value_set_double_range Ptr GValue value' CDouble start' CDouble end' GValue -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr GValue value () -> IO () forall (m :: * -> *) a. Monad m => a -> m a return () -- function value_set_caps_features -- Args: [ Arg -- { argCName = "value" -- , argType = TGValue -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = -- Just "a GValue initialized to GST_TYPE_CAPS_FEATURES" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "features" -- , argType = -- TInterface Name { namespace = "Gst" , name = "CapsFeatures" } -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "the features to set the value to" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Nothing -- throws : False -- Skip return : False foreign import ccall "gst_value_set_caps_features" gst_value_set_caps_features :: Ptr GValue -> -- value : TGValue Ptr Gst.CapsFeatures.CapsFeatures -> -- features : TInterface (Name {namespace = "Gst", name = "CapsFeatures"}) IO () -- | Sets the contents of /@value@/ to /@features@/. valueSetCapsFeatures :: (B.CallStack.HasCallStack, MonadIO m) => GValue -- ^ /@value@/: a GValue initialized to GST_TYPE_CAPS_FEATURES -> Gst.CapsFeatures.CapsFeatures -- ^ /@features@/: the features to set the value to -> m () valueSetCapsFeatures :: forall (m :: * -> *). (HasCallStack, MonadIO m) => GValue -> CapsFeatures -> m () valueSetCapsFeatures GValue value CapsFeatures features = IO () -> m () forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO () -> m ()) -> IO () -> m () forall a b. (a -> b) -> a -> b $ do Ptr GValue value' <- GValue -> IO (Ptr GValue) forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a) unsafeManagedPtrGetPtr GValue value Ptr CapsFeatures features' <- CapsFeatures -> IO (Ptr CapsFeatures) forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a) unsafeManagedPtrGetPtr CapsFeatures features Ptr GValue -> Ptr CapsFeatures -> IO () gst_value_set_caps_features Ptr GValue value' Ptr CapsFeatures features' GValue -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr GValue value CapsFeatures -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr CapsFeatures features () -> IO () forall (m :: * -> *) a. Monad m => a -> m a return () -- function value_set_caps -- Args: [ Arg -- { argCName = "value" -- , argType = TGValue -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "a GValue initialized to GST_TYPE_CAPS" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "caps" -- , argType = TInterface Name { namespace = "Gst" , name = "Caps" } -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "the caps to set the value to" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Nothing -- throws : False -- Skip return : False foreign import ccall "gst_value_set_caps" gst_value_set_caps :: Ptr GValue -> -- value : TGValue Ptr Gst.Caps.Caps -> -- caps : TInterface (Name {namespace = "Gst", name = "Caps"}) IO () -- | Sets the contents of /@value@/ to /@caps@/. A reference to the -- provided /@caps@/ will be taken by the /@value@/. valueSetCaps :: (B.CallStack.HasCallStack, MonadIO m) => GValue -- ^ /@value@/: a GValue initialized to GST_TYPE_CAPS -> Gst.Caps.Caps -- ^ /@caps@/: the caps to set the value to -> m () valueSetCaps :: forall (m :: * -> *). (HasCallStack, MonadIO m) => GValue -> Caps -> m () valueSetCaps GValue value Caps caps = IO () -> m () forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO () -> m ()) -> IO () -> m () forall a b. (a -> b) -> a -> b $ do Ptr GValue value' <- GValue -> IO (Ptr GValue) forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a) unsafeManagedPtrGetPtr GValue value Ptr Caps caps' <- Caps -> IO (Ptr Caps) forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a) unsafeManagedPtrGetPtr Caps caps Ptr GValue -> Ptr Caps -> IO () gst_value_set_caps Ptr GValue value' Ptr Caps caps' GValue -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr GValue value Caps -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr Caps caps () -> IO () forall (m :: * -> *) a. Monad m => a -> m a return () -- function value_set_bitmask -- Args: [ Arg -- { argCName = "value" -- , argType = TGValue -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "a GValue initialized to #GST_TYPE_BITMASK" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "bitmask" -- , argType = TBasicType TUInt64 -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "the bitmask" , sinceVersion = Nothing } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Nothing -- throws : False -- Skip return : False foreign import ccall "gst_value_set_bitmask" gst_value_set_bitmask :: Ptr GValue -> -- value : TGValue Word64 -> -- bitmask : TBasicType TUInt64 IO () -- | Sets /@value@/ to the bitmask specified by /@bitmask@/. valueSetBitmask :: (B.CallStack.HasCallStack, MonadIO m) => GValue -- ^ /@value@/: a GValue initialized to @/GST_TYPE_BITMASK/@ -> Word64 -- ^ /@bitmask@/: the bitmask -> m () valueSetBitmask :: forall (m :: * -> *). (HasCallStack, MonadIO m) => GValue -> Word64 -> m () valueSetBitmask GValue value Word64 bitmask = IO () -> m () forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO () -> m ()) -> IO () -> m () forall a b. (a -> b) -> a -> b $ do Ptr GValue value' <- GValue -> IO (Ptr GValue) forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a) unsafeManagedPtrGetPtr GValue value Ptr GValue -> Word64 -> IO () gst_value_set_bitmask Ptr GValue value' Word64 bitmask GValue -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr GValue value () -> IO () forall (m :: * -> *) a. Monad m => a -> m a return () -- function value_serialize -- Args: [ Arg -- { argCName = "value" -- , argType = TGValue -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "a #GValue to serialize" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Just (TBasicType TUTF8) -- throws : False -- Skip return : False foreign import ccall "gst_value_serialize" gst_value_serialize :: Ptr GValue -> -- value : TGValue IO CString -- | tries to transform the given /@value@/ into a string representation that allows -- getting back this string later on using 'GI.Gst.Functions.valueDeserialize'. -- -- Free-function: g_free valueSerialize :: (B.CallStack.HasCallStack, MonadIO m) => GValue -- ^ /@value@/: a t'GI.GObject.Structs.Value.Value' to serialize -> m (Maybe T.Text) -- ^ __Returns:__ the serialization for /@value@/ -- or 'P.Nothing' if none exists valueSerialize :: forall (m :: * -> *). (HasCallStack, MonadIO m) => GValue -> m (Maybe Text) valueSerialize GValue value = IO (Maybe Text) -> m (Maybe Text) forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO (Maybe Text) -> m (Maybe Text)) -> IO (Maybe Text) -> m (Maybe Text) forall a b. (a -> b) -> a -> b $ do Ptr GValue value' <- GValue -> IO (Ptr GValue) forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a) unsafeManagedPtrGetPtr GValue value CString result <- Ptr GValue -> IO CString gst_value_serialize Ptr GValue value' Maybe Text maybeResult <- CString -> (CString -> IO Text) -> IO (Maybe Text) forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b) convertIfNonNull CString result ((CString -> IO Text) -> IO (Maybe Text)) -> (CString -> IO Text) -> IO (Maybe Text) forall a b. (a -> b) -> a -> b $ \CString result' -> do Text result'' <- HasCallStack => CString -> IO Text CString -> IO Text cstringToText CString result' CString -> IO () forall a. Ptr a -> IO () freeMem CString result' Text -> IO Text forall (m :: * -> *) a. Monad m => a -> m a return Text result'' GValue -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr GValue value Maybe Text -> IO (Maybe Text) forall (m :: * -> *) a. Monad m => a -> m a return Maybe Text maybeResult -- function value_register -- Args: [ Arg -- { argCName = "table" -- , argType = -- TInterface Name { namespace = "Gst" , name = "ValueTable" } -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "structure containing functions to register" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Nothing -- throws : False -- Skip return : False foreign import ccall "gst_value_register" gst_value_register :: Ptr Gst.ValueTable.ValueTable -> -- table : TInterface (Name {namespace = "Gst", name = "ValueTable"}) IO () -- | Registers functions to perform calculations on t'GI.GObject.Structs.Value.Value' items of a given -- type. Each type can only be added once. valueRegister :: (B.CallStack.HasCallStack, MonadIO m) => Gst.ValueTable.ValueTable -- ^ /@table@/: structure containing functions to register -> m () valueRegister :: forall (m :: * -> *). (HasCallStack, MonadIO m) => ValueTable -> m () valueRegister ValueTable table = IO () -> m () forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO () -> m ()) -> IO () -> m () forall a b. (a -> b) -> a -> b $ do Ptr ValueTable table' <- ValueTable -> IO (Ptr ValueTable) forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a) unsafeManagedPtrGetPtr ValueTable table Ptr ValueTable -> IO () gst_value_register Ptr ValueTable table' ValueTable -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr ValueTable table () -> IO () forall (m :: * -> *) a. Monad m => a -> m a return () -- function value_is_subset -- Args: [ Arg -- { argCName = "value1" -- , argType = TGValue -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "a #GValue" , sinceVersion = Nothing } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "value2" -- , argType = TGValue -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "a #GValue" , sinceVersion = Nothing } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Just (TBasicType TBoolean) -- throws : False -- Skip return : False foreign import ccall "gst_value_is_subset" gst_value_is_subset :: Ptr GValue -> -- value1 : TGValue Ptr GValue -> -- value2 : TGValue IO CInt -- | Check that /@value1@/ is a subset of /@value2@/. valueIsSubset :: (B.CallStack.HasCallStack, MonadIO m) => GValue -- ^ /@value1@/: a t'GI.GObject.Structs.Value.Value' -> GValue -- ^ /@value2@/: a t'GI.GObject.Structs.Value.Value' -> m Bool -- ^ __Returns:__ 'P.True' is /@value1@/ is a subset of /@value2@/ valueIsSubset :: forall (m :: * -> *). (HasCallStack, MonadIO m) => GValue -> GValue -> m Bool valueIsSubset GValue value1 GValue value2 = IO Bool -> m Bool forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool forall a b. (a -> b) -> a -> b $ do Ptr GValue value1' <- GValue -> IO (Ptr GValue) forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a) unsafeManagedPtrGetPtr GValue value1 Ptr GValue value2' <- GValue -> IO (Ptr GValue) forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a) unsafeManagedPtrGetPtr GValue value2 CInt result <- Ptr GValue -> Ptr GValue -> IO CInt gst_value_is_subset Ptr GValue value1' Ptr GValue value2' let result' :: Bool result' = (CInt -> CInt -> Bool forall a. Eq a => a -> a -> Bool /= CInt 0) CInt result GValue -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr GValue value1 GValue -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr GValue value2 Bool -> IO Bool forall (m :: * -> *) a. Monad m => a -> m a return Bool result' -- function value_is_fixed -- Args: [ Arg -- { argCName = "value" -- , argType = TGValue -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "the #GValue to check" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Just (TBasicType TBoolean) -- throws : False -- Skip return : False foreign import ccall "gst_value_is_fixed" gst_value_is_fixed :: Ptr GValue -> -- value : TGValue IO CInt -- | Tests if the given GValue, if available in a GstStructure (or any other -- container) contains a \"fixed\" (which means: one value) or an \"unfixed\" -- (which means: multiple possible values, such as data lists or data -- ranges) value. valueIsFixed :: (B.CallStack.HasCallStack, MonadIO m) => GValue -- ^ /@value@/: the t'GI.GObject.Structs.Value.Value' to check -> m Bool -- ^ __Returns:__ true if the value is \"fixed\". valueIsFixed :: forall (m :: * -> *). (HasCallStack, MonadIO m) => GValue -> m Bool valueIsFixed GValue value = IO Bool -> m Bool forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool forall a b. (a -> b) -> a -> b $ do Ptr GValue value' <- GValue -> IO (Ptr GValue) forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a) unsafeManagedPtrGetPtr GValue value CInt result <- Ptr GValue -> IO CInt gst_value_is_fixed Ptr GValue value' let result' :: Bool result' = (CInt -> CInt -> Bool forall a. Eq a => a -> a -> Bool /= CInt 0) CInt result GValue -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr GValue value Bool -> IO Bool forall (m :: * -> *) a. Monad m => a -> m a return Bool result' -- function value_intersect -- Args: [ Arg -- { argCName = "dest" -- , argType = TGValue -- , direction = DirectionOut -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = -- Just -- "\n a uninitialized #GValue that will hold the calculated\n intersection value. May be %NULL if the resulting set if not\n needed." -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = True -- , transfer = TransferEverything -- } -- , Arg -- { argCName = "value1" -- , argType = TGValue -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "a value to intersect" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "value2" -- , argType = TGValue -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "another value to intersect" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Just (TBasicType TBoolean) -- throws : False -- Skip return : False foreign import ccall "gst_value_intersect" gst_value_intersect :: Ptr GValue -> -- dest : TGValue Ptr GValue -> -- value1 : TGValue Ptr GValue -> -- value2 : TGValue IO CInt -- | Calculates the intersection of two values. If the values have -- a non-empty intersection, the value representing the intersection -- is placed in /@dest@/, unless 'P.Nothing'. If the intersection is non-empty, -- /@dest@/ is not modified. valueIntersect :: (B.CallStack.HasCallStack, MonadIO m) => GValue -- ^ /@value1@/: a value to intersect -> GValue -- ^ /@value2@/: another value to intersect -> m ((Bool, GValue)) -- ^ __Returns:__ 'P.True' if the intersection is non-empty valueIntersect :: forall (m :: * -> *). (HasCallStack, MonadIO m) => GValue -> GValue -> m (Bool, GValue) valueIntersect GValue value1 GValue value2 = IO (Bool, GValue) -> m (Bool, GValue) forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO (Bool, GValue) -> m (Bool, GValue)) -> IO (Bool, GValue) -> m (Bool, GValue) forall a b. (a -> b) -> a -> b $ do Ptr GValue dest <- Int -> IO (Ptr GValue) forall a. Int -> IO (Ptr a) SP.callocBytes Int 24 :: IO (Ptr GValue) Ptr GValue value1' <- GValue -> IO (Ptr GValue) forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a) unsafeManagedPtrGetPtr GValue value1 Ptr GValue value2' <- GValue -> IO (Ptr GValue) forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a) unsafeManagedPtrGetPtr GValue value2 CInt result <- Ptr GValue -> Ptr GValue -> Ptr GValue -> IO CInt gst_value_intersect Ptr GValue dest Ptr GValue value1' Ptr GValue value2' let result' :: Bool result' = (CInt -> CInt -> Bool forall a. Eq a => a -> a -> Bool /= CInt 0) CInt result GValue dest' <- Ptr GValue -> IO GValue B.GValue.wrapGValuePtr Ptr GValue dest GValue -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr GValue value1 GValue -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr GValue value2 (Bool, GValue) -> IO (Bool, GValue) forall (m :: * -> *) a. Monad m => a -> m a return (Bool result', GValue dest') -- function value_init_and_copy -- Args: [ Arg -- { argCName = "dest" -- , argType = TGValue -- , direction = DirectionOut -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "the target value" , sinceVersion = Nothing } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = True -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "src" -- , argType = TGValue -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "the source value" , sinceVersion = Nothing } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Nothing -- throws : False -- Skip return : False foreign import ccall "gst_value_init_and_copy" gst_value_init_and_copy :: Ptr GValue -> -- dest : TGValue Ptr GValue -> -- src : TGValue IO () -- | Initialises the target value to be of the same type as source and then copies -- the contents from source to target. valueInitAndCopy :: (B.CallStack.HasCallStack, MonadIO m) => GValue -- ^ /@src@/: the source value -> m (GValue) valueInitAndCopy :: forall (m :: * -> *). (HasCallStack, MonadIO m) => GValue -> m GValue valueInitAndCopy GValue src = IO GValue -> m GValue forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO GValue -> m GValue) -> IO GValue -> m GValue forall a b. (a -> b) -> a -> b $ do Ptr GValue dest <- Int -> IO (Ptr GValue) forall a. Int -> IO (Ptr a) SP.callocBytes Int 24 :: IO (Ptr GValue) Ptr GValue src' <- GValue -> IO (Ptr GValue) forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a) unsafeManagedPtrGetPtr GValue src Ptr GValue -> Ptr GValue -> IO () gst_value_init_and_copy Ptr GValue dest Ptr GValue src' GValue dest' <- Ptr GValue -> IO GValue B.GValue.wrapGValuePtr Ptr GValue dest GValue -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr GValue src GValue -> IO GValue forall (m :: * -> *) a. Monad m => a -> m a return GValue dest' -- function value_get_structure -- Args: [ Arg -- { argCName = "value" -- , argType = TGValue -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "a GValue initialized to GST_TYPE_STRUCTURE" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Just (TInterface Name { namespace = "Gst" , name = "Structure" }) -- throws : False -- Skip return : False foreign import ccall "gst_value_get_structure" gst_value_get_structure :: Ptr GValue -> -- value : TGValue IO (Ptr Gst.Structure.Structure) -- | Gets the contents of /@value@/. valueGetStructure :: (B.CallStack.HasCallStack, MonadIO m) => GValue -- ^ /@value@/: a GValue initialized to GST_TYPE_STRUCTURE -> m Gst.Structure.Structure -- ^ __Returns:__ the contents of /@value@/ valueGetStructure :: forall (m :: * -> *). (HasCallStack, MonadIO m) => GValue -> m Structure valueGetStructure GValue value = IO Structure -> m Structure forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO Structure -> m Structure) -> IO Structure -> m Structure forall a b. (a -> b) -> a -> b $ do Ptr GValue value' <- GValue -> IO (Ptr GValue) forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a) unsafeManagedPtrGetPtr GValue value Ptr Structure result <- Ptr GValue -> IO (Ptr Structure) gst_value_get_structure Ptr GValue value' Text -> Ptr Structure -> IO () forall a. HasCallStack => Text -> Ptr a -> IO () checkUnexpectedReturnNULL Text "valueGetStructure" Ptr Structure result Structure result' <- ((ManagedPtr Structure -> Structure) -> Ptr Structure -> IO Structure forall a. (HasCallStack, GBoxed a) => (ManagedPtr a -> a) -> Ptr a -> IO a newBoxed ManagedPtr Structure -> Structure Gst.Structure.Structure) Ptr Structure result GValue -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr GValue value Structure -> IO Structure forall (m :: * -> *) a. Monad m => a -> m a return Structure result' -- function value_get_int_range_step -- Args: [ Arg -- { argCName = "value" -- , argType = TGValue -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "a GValue initialized to GST_TYPE_INT_RANGE" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Just (TBasicType TInt) -- throws : False -- Skip return : False foreign import ccall "gst_value_get_int_range_step" gst_value_get_int_range_step :: Ptr GValue -> -- value : TGValue IO Int32 -- | Gets the step of the range specified by /@value@/. valueGetIntRangeStep :: (B.CallStack.HasCallStack, MonadIO m) => GValue -- ^ /@value@/: a GValue initialized to GST_TYPE_INT_RANGE -> m Int32 -- ^ __Returns:__ the step of the range valueGetIntRangeStep :: forall (m :: * -> *). (HasCallStack, MonadIO m) => GValue -> m Int32 valueGetIntRangeStep GValue value = IO Int32 -> m Int32 forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32 forall a b. (a -> b) -> a -> b $ do Ptr GValue value' <- GValue -> IO (Ptr GValue) forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a) unsafeManagedPtrGetPtr GValue value Int32 result <- Ptr GValue -> IO Int32 gst_value_get_int_range_step Ptr GValue value' GValue -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr GValue value Int32 -> IO Int32 forall (m :: * -> *) a. Monad m => a -> m a return Int32 result -- function value_get_int_range_min -- Args: [ Arg -- { argCName = "value" -- , argType = TGValue -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "a GValue initialized to GST_TYPE_INT_RANGE" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Just (TBasicType TInt) -- throws : False -- Skip return : False foreign import ccall "gst_value_get_int_range_min" gst_value_get_int_range_min :: Ptr GValue -> -- value : TGValue IO Int32 -- | Gets the minimum of the range specified by /@value@/. valueGetIntRangeMin :: (B.CallStack.HasCallStack, MonadIO m) => GValue -- ^ /@value@/: a GValue initialized to GST_TYPE_INT_RANGE -> m Int32 -- ^ __Returns:__ the minimum of the range valueGetIntRangeMin :: forall (m :: * -> *). (HasCallStack, MonadIO m) => GValue -> m Int32 valueGetIntRangeMin GValue value = IO Int32 -> m Int32 forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32 forall a b. (a -> b) -> a -> b $ do Ptr GValue value' <- GValue -> IO (Ptr GValue) forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a) unsafeManagedPtrGetPtr GValue value Int32 result <- Ptr GValue -> IO Int32 gst_value_get_int_range_min Ptr GValue value' GValue -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr GValue value Int32 -> IO Int32 forall (m :: * -> *) a. Monad m => a -> m a return Int32 result -- function value_get_int_range_max -- Args: [ Arg -- { argCName = "value" -- , argType = TGValue -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "a GValue initialized to GST_TYPE_INT_RANGE" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Just (TBasicType TInt) -- throws : False -- Skip return : False foreign import ccall "gst_value_get_int_range_max" gst_value_get_int_range_max :: Ptr GValue -> -- value : TGValue IO Int32 -- | Gets the maximum of the range specified by /@value@/. valueGetIntRangeMax :: (B.CallStack.HasCallStack, MonadIO m) => GValue -- ^ /@value@/: a GValue initialized to GST_TYPE_INT_RANGE -> m Int32 -- ^ __Returns:__ the maximum of the range valueGetIntRangeMax :: forall (m :: * -> *). (HasCallStack, MonadIO m) => GValue -> m Int32 valueGetIntRangeMax GValue value = IO Int32 -> m Int32 forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32 forall a b. (a -> b) -> a -> b $ do Ptr GValue value' <- GValue -> IO (Ptr GValue) forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a) unsafeManagedPtrGetPtr GValue value Int32 result <- Ptr GValue -> IO Int32 gst_value_get_int_range_max Ptr GValue value' GValue -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr GValue value Int32 -> IO Int32 forall (m :: * -> *) a. Monad m => a -> m a return Int32 result -- function value_get_int64_range_step -- Args: [ Arg -- { argCName = "value" -- , argType = TGValue -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "a GValue initialized to GST_TYPE_INT64_RANGE" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Just (TBasicType TInt64) -- throws : False -- Skip return : False foreign import ccall "gst_value_get_int64_range_step" gst_value_get_int64_range_step :: Ptr GValue -> -- value : TGValue IO Int64 -- | Gets the step of the range specified by /@value@/. valueGetInt64RangeStep :: (B.CallStack.HasCallStack, MonadIO m) => GValue -- ^ /@value@/: a GValue initialized to GST_TYPE_INT64_RANGE -> m Int64 -- ^ __Returns:__ the step of the range valueGetInt64RangeStep :: forall (m :: * -> *). (HasCallStack, MonadIO m) => GValue -> m Int64 valueGetInt64RangeStep GValue value = IO Int64 -> m Int64 forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO Int64 -> m Int64) -> IO Int64 -> m Int64 forall a b. (a -> b) -> a -> b $ do Ptr GValue value' <- GValue -> IO (Ptr GValue) forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a) unsafeManagedPtrGetPtr GValue value Int64 result <- Ptr GValue -> IO Int64 gst_value_get_int64_range_step Ptr GValue value' GValue -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr GValue value Int64 -> IO Int64 forall (m :: * -> *) a. Monad m => a -> m a return Int64 result -- function value_get_int64_range_min -- Args: [ Arg -- { argCName = "value" -- , argType = TGValue -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "a GValue initialized to GST_TYPE_INT64_RANGE" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Just (TBasicType TInt64) -- throws : False -- Skip return : False foreign import ccall "gst_value_get_int64_range_min" gst_value_get_int64_range_min :: Ptr GValue -> -- value : TGValue IO Int64 -- | Gets the minimum of the range specified by /@value@/. valueGetInt64RangeMin :: (B.CallStack.HasCallStack, MonadIO m) => GValue -- ^ /@value@/: a GValue initialized to GST_TYPE_INT64_RANGE -> m Int64 -- ^ __Returns:__ the minimum of the range valueGetInt64RangeMin :: forall (m :: * -> *). (HasCallStack, MonadIO m) => GValue -> m Int64 valueGetInt64RangeMin GValue value = IO Int64 -> m Int64 forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO Int64 -> m Int64) -> IO Int64 -> m Int64 forall a b. (a -> b) -> a -> b $ do Ptr GValue value' <- GValue -> IO (Ptr GValue) forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a) unsafeManagedPtrGetPtr GValue value Int64 result <- Ptr GValue -> IO Int64 gst_value_get_int64_range_min Ptr GValue value' GValue -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr GValue value Int64 -> IO Int64 forall (m :: * -> *) a. Monad m => a -> m a return Int64 result -- function value_get_int64_range_max -- Args: [ Arg -- { argCName = "value" -- , argType = TGValue -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "a GValue initialized to GST_TYPE_INT64_RANGE" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Just (TBasicType TInt64) -- throws : False -- Skip return : False foreign import ccall "gst_value_get_int64_range_max" gst_value_get_int64_range_max :: Ptr GValue -> -- value : TGValue IO Int64 -- | Gets the maximum of the range specified by /@value@/. valueGetInt64RangeMax :: (B.CallStack.HasCallStack, MonadIO m) => GValue -- ^ /@value@/: a GValue initialized to GST_TYPE_INT64_RANGE -> m Int64 -- ^ __Returns:__ the maximum of the range valueGetInt64RangeMax :: forall (m :: * -> *). (HasCallStack, MonadIO m) => GValue -> m Int64 valueGetInt64RangeMax GValue value = IO Int64 -> m Int64 forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO Int64 -> m Int64) -> IO Int64 -> m Int64 forall a b. (a -> b) -> a -> b $ do Ptr GValue value' <- GValue -> IO (Ptr GValue) forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a) unsafeManagedPtrGetPtr GValue value Int64 result <- Ptr GValue -> IO Int64 gst_value_get_int64_range_max Ptr GValue value' GValue -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr GValue value Int64 -> IO Int64 forall (m :: * -> *) a. Monad m => a -> m a return Int64 result -- function value_get_fraction_range_min -- Args: [ Arg -- { argCName = "value" -- , argType = TGValue -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = -- Just "a GValue initialized to GST_TYPE_FRACTION_RANGE" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Just TGValue -- throws : False -- Skip return : False foreign import ccall "gst_value_get_fraction_range_min" gst_value_get_fraction_range_min :: Ptr GValue -> -- value : TGValue IO (Ptr GValue) -- | Gets the minimum of the range specified by /@value@/. valueGetFractionRangeMin :: (B.CallStack.HasCallStack, MonadIO m) => GValue -- ^ /@value@/: a GValue initialized to GST_TYPE_FRACTION_RANGE -> m (Maybe GValue) -- ^ __Returns:__ the minimum of the range valueGetFractionRangeMin :: forall (m :: * -> *). (HasCallStack, MonadIO m) => GValue -> m (Maybe GValue) valueGetFractionRangeMin GValue value = IO (Maybe GValue) -> m (Maybe GValue) forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO (Maybe GValue) -> m (Maybe GValue)) -> IO (Maybe GValue) -> m (Maybe GValue) forall a b. (a -> b) -> a -> b $ do Ptr GValue value' <- GValue -> IO (Ptr GValue) forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a) unsafeManagedPtrGetPtr GValue value Ptr GValue result <- Ptr GValue -> IO (Ptr GValue) gst_value_get_fraction_range_min Ptr GValue value' Maybe GValue maybeResult <- Ptr GValue -> (Ptr GValue -> IO GValue) -> IO (Maybe GValue) forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b) convertIfNonNull Ptr GValue result ((Ptr GValue -> IO GValue) -> IO (Maybe GValue)) -> (Ptr GValue -> IO GValue) -> IO (Maybe GValue) forall a b. (a -> b) -> a -> b $ \Ptr GValue result' -> do GValue result'' <- Ptr GValue -> IO GValue B.GValue.newGValueFromPtr Ptr GValue result' GValue -> IO GValue forall (m :: * -> *) a. Monad m => a -> m a return GValue result'' GValue -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr GValue value Maybe GValue -> IO (Maybe GValue) forall (m :: * -> *) a. Monad m => a -> m a return Maybe GValue maybeResult -- function value_get_fraction_range_max -- Args: [ Arg -- { argCName = "value" -- , argType = TGValue -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = -- Just "a GValue initialized to GST_TYPE_FRACTION_RANGE" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Just TGValue -- throws : False -- Skip return : False foreign import ccall "gst_value_get_fraction_range_max" gst_value_get_fraction_range_max :: Ptr GValue -> -- value : TGValue IO (Ptr GValue) -- | Gets the maximum of the range specified by /@value@/. valueGetFractionRangeMax :: (B.CallStack.HasCallStack, MonadIO m) => GValue -- ^ /@value@/: a GValue initialized to GST_TYPE_FRACTION_RANGE -> m (Maybe GValue) -- ^ __Returns:__ the maximum of the range valueGetFractionRangeMax :: forall (m :: * -> *). (HasCallStack, MonadIO m) => GValue -> m (Maybe GValue) valueGetFractionRangeMax GValue value = IO (Maybe GValue) -> m (Maybe GValue) forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO (Maybe GValue) -> m (Maybe GValue)) -> IO (Maybe GValue) -> m (Maybe GValue) forall a b. (a -> b) -> a -> b $ do Ptr GValue value' <- GValue -> IO (Ptr GValue) forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a) unsafeManagedPtrGetPtr GValue value Ptr GValue result <- Ptr GValue -> IO (Ptr GValue) gst_value_get_fraction_range_max Ptr GValue value' Maybe GValue maybeResult <- Ptr GValue -> (Ptr GValue -> IO GValue) -> IO (Maybe GValue) forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b) convertIfNonNull Ptr GValue result ((Ptr GValue -> IO GValue) -> IO (Maybe GValue)) -> (Ptr GValue -> IO GValue) -> IO (Maybe GValue) forall a b. (a -> b) -> a -> b $ \Ptr GValue result' -> do GValue result'' <- Ptr GValue -> IO GValue B.GValue.newGValueFromPtr Ptr GValue result' GValue -> IO GValue forall (m :: * -> *) a. Monad m => a -> m a return GValue result'' GValue -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr GValue value Maybe GValue -> IO (Maybe GValue) forall (m :: * -> *) a. Monad m => a -> m a return Maybe GValue maybeResult -- function value_get_fraction_numerator -- Args: [ Arg -- { argCName = "value" -- , argType = TGValue -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "a GValue initialized to #GST_TYPE_FRACTION" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Just (TBasicType TInt) -- throws : False -- Skip return : False foreign import ccall "gst_value_get_fraction_numerator" gst_value_get_fraction_numerator :: Ptr GValue -> -- value : TGValue IO Int32 -- | Gets the numerator of the fraction specified by /@value@/. valueGetFractionNumerator :: (B.CallStack.HasCallStack, MonadIO m) => GValue -- ^ /@value@/: a GValue initialized to @/GST_TYPE_FRACTION/@ -> m Int32 -- ^ __Returns:__ the numerator of the fraction. valueGetFractionNumerator :: forall (m :: * -> *). (HasCallStack, MonadIO m) => GValue -> m Int32 valueGetFractionNumerator GValue value = IO Int32 -> m Int32 forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32 forall a b. (a -> b) -> a -> b $ do Ptr GValue value' <- GValue -> IO (Ptr GValue) forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a) unsafeManagedPtrGetPtr GValue value Int32 result <- Ptr GValue -> IO Int32 gst_value_get_fraction_numerator Ptr GValue value' GValue -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr GValue value Int32 -> IO Int32 forall (m :: * -> *) a. Monad m => a -> m a return Int32 result -- function value_get_fraction_denominator -- Args: [ Arg -- { argCName = "value" -- , argType = TGValue -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "a GValue initialized to #GST_TYPE_FRACTION" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Just (TBasicType TInt) -- throws : False -- Skip return : False foreign import ccall "gst_value_get_fraction_denominator" gst_value_get_fraction_denominator :: Ptr GValue -> -- value : TGValue IO Int32 -- | Gets the denominator of the fraction specified by /@value@/. valueGetFractionDenominator :: (B.CallStack.HasCallStack, MonadIO m) => GValue -- ^ /@value@/: a GValue initialized to @/GST_TYPE_FRACTION/@ -> m Int32 -- ^ __Returns:__ the denominator of the fraction. valueGetFractionDenominator :: forall (m :: * -> *). (HasCallStack, MonadIO m) => GValue -> m Int32 valueGetFractionDenominator GValue value = IO Int32 -> m Int32 forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32 forall a b. (a -> b) -> a -> b $ do Ptr GValue value' <- GValue -> IO (Ptr GValue) forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a) unsafeManagedPtrGetPtr GValue value Int32 result <- Ptr GValue -> IO Int32 gst_value_get_fraction_denominator Ptr GValue value' GValue -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr GValue value Int32 -> IO Int32 forall (m :: * -> *) a. Monad m => a -> m a return Int32 result -- function value_get_flagset_mask -- Args: [ Arg -- { argCName = "value" -- , argType = TGValue -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "a GValue initialized to #GST_TYPE_FLAG_SET" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Just (TBasicType TUInt) -- throws : False -- Skip return : False foreign import ccall "gst_value_get_flagset_mask" gst_value_get_flagset_mask :: Ptr GValue -> -- value : TGValue IO Word32 -- | Retrieve the mask field of a GstFlagSet /@value@/. -- -- /Since: 1.6/ valueGetFlagsetMask :: (B.CallStack.HasCallStack, MonadIO m) => GValue -- ^ /@value@/: a GValue initialized to @/GST_TYPE_FLAG_SET/@ -> m Word32 -- ^ __Returns:__ the mask field of the flagset instance. valueGetFlagsetMask :: forall (m :: * -> *). (HasCallStack, MonadIO m) => GValue -> m Word32 valueGetFlagsetMask GValue value = IO Word32 -> m Word32 forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32 forall a b. (a -> b) -> a -> b $ do Ptr GValue value' <- GValue -> IO (Ptr GValue) forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a) unsafeManagedPtrGetPtr GValue value Word32 result <- Ptr GValue -> IO Word32 gst_value_get_flagset_mask Ptr GValue value' GValue -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr GValue value Word32 -> IO Word32 forall (m :: * -> *) a. Monad m => a -> m a return Word32 result -- function value_get_flagset_flags -- Args: [ Arg -- { argCName = "value" -- , argType = TGValue -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "a GValue initialized to #GST_TYPE_FLAG_SET" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Just (TBasicType TUInt) -- throws : False -- Skip return : False foreign import ccall "gst_value_get_flagset_flags" gst_value_get_flagset_flags :: Ptr GValue -> -- value : TGValue IO Word32 -- | Retrieve the flags field of a GstFlagSet /@value@/. -- -- /Since: 1.6/ valueGetFlagsetFlags :: (B.CallStack.HasCallStack, MonadIO m) => GValue -- ^ /@value@/: a GValue initialized to @/GST_TYPE_FLAG_SET/@ -> m Word32 -- ^ __Returns:__ the flags field of the flagset instance. valueGetFlagsetFlags :: forall (m :: * -> *). (HasCallStack, MonadIO m) => GValue -> m Word32 valueGetFlagsetFlags GValue value = IO Word32 -> m Word32 forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32 forall a b. (a -> b) -> a -> b $ do Ptr GValue value' <- GValue -> IO (Ptr GValue) forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a) unsafeManagedPtrGetPtr GValue value Word32 result <- Ptr GValue -> IO Word32 gst_value_get_flagset_flags Ptr GValue value' GValue -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr GValue value Word32 -> IO Word32 forall (m :: * -> *) a. Monad m => a -> m a return Word32 result -- function value_get_double_range_min -- Args: [ Arg -- { argCName = "value" -- , argType = TGValue -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "a GValue initialized to GST_TYPE_DOUBLE_RANGE" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Just (TBasicType TDouble) -- throws : False -- Skip return : False foreign import ccall "gst_value_get_double_range_min" gst_value_get_double_range_min :: Ptr GValue -> -- value : TGValue IO CDouble -- | Gets the minimum of the range specified by /@value@/. valueGetDoubleRangeMin :: (B.CallStack.HasCallStack, MonadIO m) => GValue -- ^ /@value@/: a GValue initialized to GST_TYPE_DOUBLE_RANGE -> m Double -- ^ __Returns:__ the minimum of the range valueGetDoubleRangeMin :: forall (m :: * -> *). (HasCallStack, MonadIO m) => GValue -> m Double valueGetDoubleRangeMin GValue value = IO Double -> m Double forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO Double -> m Double) -> IO Double -> m Double forall a b. (a -> b) -> a -> b $ do Ptr GValue value' <- GValue -> IO (Ptr GValue) forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a) unsafeManagedPtrGetPtr GValue value CDouble result <- Ptr GValue -> IO CDouble gst_value_get_double_range_min Ptr GValue value' let result' :: Double result' = CDouble -> Double forall a b. (Real a, Fractional b) => a -> b realToFrac CDouble result GValue -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr GValue value Double -> IO Double forall (m :: * -> *) a. Monad m => a -> m a return Double result' -- function value_get_double_range_max -- Args: [ Arg -- { argCName = "value" -- , argType = TGValue -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "a GValue initialized to GST_TYPE_DOUBLE_RANGE" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Just (TBasicType TDouble) -- throws : False -- Skip return : False foreign import ccall "gst_value_get_double_range_max" gst_value_get_double_range_max :: Ptr GValue -> -- value : TGValue IO CDouble -- | Gets the maximum of the range specified by /@value@/. valueGetDoubleRangeMax :: (B.CallStack.HasCallStack, MonadIO m) => GValue -- ^ /@value@/: a GValue initialized to GST_TYPE_DOUBLE_RANGE -> m Double -- ^ __Returns:__ the maximum of the range valueGetDoubleRangeMax :: forall (m :: * -> *). (HasCallStack, MonadIO m) => GValue -> m Double valueGetDoubleRangeMax GValue value = IO Double -> m Double forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO Double -> m Double) -> IO Double -> m Double forall a b. (a -> b) -> a -> b $ do Ptr GValue value' <- GValue -> IO (Ptr GValue) forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a) unsafeManagedPtrGetPtr GValue value CDouble result <- Ptr GValue -> IO CDouble gst_value_get_double_range_max Ptr GValue value' let result' :: Double result' = CDouble -> Double forall a b. (Real a, Fractional b) => a -> b realToFrac CDouble result GValue -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr GValue value Double -> IO Double forall (m :: * -> *) a. Monad m => a -> m a return Double result' -- function value_get_caps_features -- Args: [ Arg -- { argCName = "value" -- , argType = TGValue -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = -- Just "a GValue initialized to GST_TYPE_CAPS_FEATURES" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Just -- (TInterface Name { namespace = "Gst" , name = "CapsFeatures" }) -- throws : False -- Skip return : False foreign import ccall "gst_value_get_caps_features" gst_value_get_caps_features :: Ptr GValue -> -- value : TGValue IO (Ptr Gst.CapsFeatures.CapsFeatures) -- | Gets the contents of /@value@/. valueGetCapsFeatures :: (B.CallStack.HasCallStack, MonadIO m) => GValue -- ^ /@value@/: a GValue initialized to GST_TYPE_CAPS_FEATURES -> m Gst.CapsFeatures.CapsFeatures -- ^ __Returns:__ the contents of /@value@/ valueGetCapsFeatures :: forall (m :: * -> *). (HasCallStack, MonadIO m) => GValue -> m CapsFeatures valueGetCapsFeatures GValue value = IO CapsFeatures -> m CapsFeatures forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO CapsFeatures -> m CapsFeatures) -> IO CapsFeatures -> m CapsFeatures forall a b. (a -> b) -> a -> b $ do Ptr GValue value' <- GValue -> IO (Ptr GValue) forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a) unsafeManagedPtrGetPtr GValue value Ptr CapsFeatures result <- Ptr GValue -> IO (Ptr CapsFeatures) gst_value_get_caps_features Ptr GValue value' Text -> Ptr CapsFeatures -> IO () forall a. HasCallStack => Text -> Ptr a -> IO () checkUnexpectedReturnNULL Text "valueGetCapsFeatures" Ptr CapsFeatures result CapsFeatures result' <- ((ManagedPtr CapsFeatures -> CapsFeatures) -> Ptr CapsFeatures -> IO CapsFeatures forall a. (HasCallStack, GBoxed a) => (ManagedPtr a -> a) -> Ptr a -> IO a newBoxed ManagedPtr CapsFeatures -> CapsFeatures Gst.CapsFeatures.CapsFeatures) Ptr CapsFeatures result GValue -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr GValue value CapsFeatures -> IO CapsFeatures forall (m :: * -> *) a. Monad m => a -> m a return CapsFeatures result' -- function value_get_caps -- Args: [ Arg -- { argCName = "value" -- , argType = TGValue -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "a GValue initialized to GST_TYPE_CAPS" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Just (TInterface Name { namespace = "Gst" , name = "Caps" }) -- throws : False -- Skip return : False foreign import ccall "gst_value_get_caps" gst_value_get_caps :: Ptr GValue -> -- value : TGValue IO (Ptr Gst.Caps.Caps) -- | Gets the contents of /@value@/. The reference count of the returned -- t'GI.Gst.Structs.Caps.Caps' will not be modified, therefore the caller must take one -- before getting rid of the /@value@/. valueGetCaps :: (B.CallStack.HasCallStack, MonadIO m) => GValue -- ^ /@value@/: a GValue initialized to GST_TYPE_CAPS -> m Gst.Caps.Caps -- ^ __Returns:__ the contents of /@value@/ valueGetCaps :: forall (m :: * -> *). (HasCallStack, MonadIO m) => GValue -> m Caps valueGetCaps GValue value = IO Caps -> m Caps forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO Caps -> m Caps) -> IO Caps -> m Caps forall a b. (a -> b) -> a -> b $ do Ptr GValue value' <- GValue -> IO (Ptr GValue) forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a) unsafeManagedPtrGetPtr GValue value Ptr Caps result <- Ptr GValue -> IO (Ptr Caps) gst_value_get_caps Ptr GValue value' Text -> Ptr Caps -> IO () forall a. HasCallStack => Text -> Ptr a -> IO () checkUnexpectedReturnNULL Text "valueGetCaps" Ptr Caps result Caps result' <- ((ManagedPtr Caps -> Caps) -> Ptr Caps -> IO Caps forall a. (HasCallStack, GBoxed a) => (ManagedPtr a -> a) -> Ptr a -> IO a newBoxed ManagedPtr Caps -> Caps Gst.Caps.Caps) Ptr Caps result GValue -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr GValue value Caps -> IO Caps forall (m :: * -> *) a. Monad m => a -> m a return Caps result' -- function value_get_bitmask -- Args: [ Arg -- { argCName = "value" -- , argType = TGValue -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "a GValue initialized to #GST_TYPE_BITMASK" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Just (TBasicType TUInt64) -- throws : False -- Skip return : False foreign import ccall "gst_value_get_bitmask" gst_value_get_bitmask :: Ptr GValue -> -- value : TGValue IO Word64 -- | Gets the bitmask specified by /@value@/. valueGetBitmask :: (B.CallStack.HasCallStack, MonadIO m) => GValue -- ^ /@value@/: a GValue initialized to @/GST_TYPE_BITMASK/@ -> m Word64 -- ^ __Returns:__ the bitmask. valueGetBitmask :: forall (m :: * -> *). (HasCallStack, MonadIO m) => GValue -> m Word64 valueGetBitmask GValue value = IO Word64 -> m Word64 forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO Word64 -> m Word64) -> IO Word64 -> m Word64 forall a b. (a -> b) -> a -> b $ do Ptr GValue value' <- GValue -> IO (Ptr GValue) forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a) unsafeManagedPtrGetPtr GValue value Word64 result <- Ptr GValue -> IO Word64 gst_value_get_bitmask Ptr GValue value' GValue -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr GValue value Word64 -> IO Word64 forall (m :: * -> *) a. Monad m => a -> m a return Word64 result -- function value_fraction_subtract -- Args: [ Arg -- { argCName = "dest" -- , argType = TGValue -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "a GValue initialized to #GST_TYPE_FRACTION" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "minuend" -- , argType = TGValue -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "a GValue initialized to #GST_TYPE_FRACTION" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "subtrahend" -- , argType = TGValue -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "a GValue initialized to #GST_TYPE_FRACTION" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Just (TBasicType TBoolean) -- throws : False -- Skip return : False foreign import ccall "gst_value_fraction_subtract" gst_value_fraction_subtract :: Ptr GValue -> -- dest : TGValue Ptr GValue -> -- minuend : TGValue Ptr GValue -> -- subtrahend : TGValue IO CInt -- | Subtracts the /@subtrahend@/ from the /@minuend@/ and sets /@dest@/ to the result. valueFractionSubtract :: (B.CallStack.HasCallStack, MonadIO m) => GValue -- ^ /@dest@/: a GValue initialized to @/GST_TYPE_FRACTION/@ -> GValue -- ^ /@minuend@/: a GValue initialized to @/GST_TYPE_FRACTION/@ -> GValue -- ^ /@subtrahend@/: a GValue initialized to @/GST_TYPE_FRACTION/@ -> m Bool -- ^ __Returns:__ 'P.False' in case of an error (like integer overflow), 'P.True' otherwise. valueFractionSubtract :: forall (m :: * -> *). (HasCallStack, MonadIO m) => GValue -> GValue -> GValue -> m Bool valueFractionSubtract GValue dest GValue minuend GValue subtrahend = IO Bool -> m Bool forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool forall a b. (a -> b) -> a -> b $ do Ptr GValue dest' <- GValue -> IO (Ptr GValue) forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a) unsafeManagedPtrGetPtr GValue dest Ptr GValue minuend' <- GValue -> IO (Ptr GValue) forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a) unsafeManagedPtrGetPtr GValue minuend Ptr GValue subtrahend' <- GValue -> IO (Ptr GValue) forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a) unsafeManagedPtrGetPtr GValue subtrahend CInt result <- Ptr GValue -> Ptr GValue -> Ptr GValue -> IO CInt gst_value_fraction_subtract Ptr GValue dest' Ptr GValue minuend' Ptr GValue subtrahend' let result' :: Bool result' = (CInt -> CInt -> Bool forall a. Eq a => a -> a -> Bool /= CInt 0) CInt result GValue -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr GValue dest GValue -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr GValue minuend GValue -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr GValue subtrahend Bool -> IO Bool forall (m :: * -> *) a. Monad m => a -> m a return Bool result' -- function value_fraction_multiply -- Args: [ Arg -- { argCName = "product" -- , argType = TGValue -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "a GValue initialized to #GST_TYPE_FRACTION" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "factor1" -- , argType = TGValue -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "a GValue initialized to #GST_TYPE_FRACTION" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "factor2" -- , argType = TGValue -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "a GValue initialized to #GST_TYPE_FRACTION" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Just (TBasicType TBoolean) -- throws : False -- Skip return : False foreign import ccall "gst_value_fraction_multiply" gst_value_fraction_multiply :: Ptr GValue -> -- product : TGValue Ptr GValue -> -- factor1 : TGValue Ptr GValue -> -- factor2 : TGValue IO CInt -- | Multiplies the two t'GI.GObject.Structs.Value.Value' items containing a @/GST_TYPE_FRACTION/@ and sets -- /@product@/ to the product of the two fractions. valueFractionMultiply :: (B.CallStack.HasCallStack, MonadIO m) => GValue -- ^ /@product@/: a GValue initialized to @/GST_TYPE_FRACTION/@ -> GValue -- ^ /@factor1@/: a GValue initialized to @/GST_TYPE_FRACTION/@ -> GValue -- ^ /@factor2@/: a GValue initialized to @/GST_TYPE_FRACTION/@ -> m Bool -- ^ __Returns:__ 'P.False' in case of an error (like integer overflow), 'P.True' otherwise. valueFractionMultiply :: forall (m :: * -> *). (HasCallStack, MonadIO m) => GValue -> GValue -> GValue -> m Bool valueFractionMultiply GValue product GValue factor1 GValue factor2 = IO Bool -> m Bool forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool forall a b. (a -> b) -> a -> b $ do Ptr GValue product' <- GValue -> IO (Ptr GValue) forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a) unsafeManagedPtrGetPtr GValue product Ptr GValue factor1' <- GValue -> IO (Ptr GValue) forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a) unsafeManagedPtrGetPtr GValue factor1 Ptr GValue factor2' <- GValue -> IO (Ptr GValue) forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a) unsafeManagedPtrGetPtr GValue factor2 CInt result <- Ptr GValue -> Ptr GValue -> Ptr GValue -> IO CInt gst_value_fraction_multiply Ptr GValue product' Ptr GValue factor1' Ptr GValue factor2' let result' :: Bool result' = (CInt -> CInt -> Bool forall a. Eq a => a -> a -> Bool /= CInt 0) CInt result GValue -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr GValue product GValue -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr GValue factor1 GValue -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr GValue factor2 Bool -> IO Bool forall (m :: * -> *) a. Monad m => a -> m a return Bool result' -- function value_fixate -- Args: [ Arg -- { argCName = "dest" -- , argType = TGValue -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "the #GValue destination" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "src" -- , argType = TGValue -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "the #GValue to fixate" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Just (TBasicType TBoolean) -- throws : False -- Skip return : False foreign import ccall "gst_value_fixate" gst_value_fixate :: Ptr GValue -> -- dest : TGValue Ptr GValue -> -- src : TGValue IO CInt -- | Fixate /@src@/ into a new value /@dest@/. -- For ranges, the first element is taken. For lists and arrays, the -- first item is fixated and returned. -- If /@src@/ is already fixed, this function returns 'P.False'. valueFixate :: (B.CallStack.HasCallStack, MonadIO m) => GValue -- ^ /@dest@/: the t'GI.GObject.Structs.Value.Value' destination -> GValue -- ^ /@src@/: the t'GI.GObject.Structs.Value.Value' to fixate -> m Bool -- ^ __Returns:__ 'P.True' if /@dest@/ contains a fixated version of /@src@/. valueFixate :: forall (m :: * -> *). (HasCallStack, MonadIO m) => GValue -> GValue -> m Bool valueFixate GValue dest GValue src = IO Bool -> m Bool forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool forall a b. (a -> b) -> a -> b $ do Ptr GValue dest' <- GValue -> IO (Ptr GValue) forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a) unsafeManagedPtrGetPtr GValue dest Ptr GValue src' <- GValue -> IO (Ptr GValue) forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a) unsafeManagedPtrGetPtr GValue src CInt result <- Ptr GValue -> Ptr GValue -> IO CInt gst_value_fixate Ptr GValue dest' Ptr GValue src' let result' :: Bool result' = (CInt -> CInt -> Bool forall a. Eq a => a -> a -> Bool /= CInt 0) CInt result GValue -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr GValue dest GValue -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr GValue src Bool -> IO Bool forall (m :: * -> *) a. Monad m => a -> m a return Bool result' -- function value_deserialize -- Args: [ Arg -- { argCName = "dest" -- , argType = TGValue -- , direction = DirectionOut -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = -- Just "#GValue to fill with contents of\n deserialization" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = True -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "src" -- , argType = TBasicType TUTF8 -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "string to deserialize" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Just (TBasicType TBoolean) -- throws : False -- Skip return : False foreign import ccall "gst_value_deserialize" gst_value_deserialize :: Ptr GValue -> -- dest : TGValue CString -> -- src : TBasicType TUTF8 IO CInt -- | Tries to deserialize a string into the type specified by the given GValue. -- If the operation succeeds, 'P.True' is returned, 'P.False' otherwise. valueDeserialize :: (B.CallStack.HasCallStack, MonadIO m) => T.Text -- ^ /@src@/: string to deserialize -> m ((Bool, GValue)) -- ^ __Returns:__ 'P.True' on success valueDeserialize :: forall (m :: * -> *). (HasCallStack, MonadIO m) => Text -> m (Bool, GValue) valueDeserialize Text src = IO (Bool, GValue) -> m (Bool, GValue) forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO (Bool, GValue) -> m (Bool, GValue)) -> IO (Bool, GValue) -> m (Bool, GValue) forall a b. (a -> b) -> a -> b $ do Ptr GValue dest <- Int -> IO (Ptr GValue) forall a. Int -> IO (Ptr a) SP.callocBytes Int 24 :: IO (Ptr GValue) CString src' <- Text -> IO CString textToCString Text src CInt result <- Ptr GValue -> CString -> IO CInt gst_value_deserialize Ptr GValue dest CString src' let result' :: Bool result' = (CInt -> CInt -> Bool forall a. Eq a => a -> a -> Bool /= CInt 0) CInt result GValue dest' <- Ptr GValue -> IO GValue B.GValue.wrapGValuePtr Ptr GValue dest CString -> IO () forall a. Ptr a -> IO () freeMem CString src' (Bool, GValue) -> IO (Bool, GValue) forall (m :: * -> *) a. Monad m => a -> m a return (Bool result', GValue dest') -- function value_compare -- Args: [ Arg -- { argCName = "value1" -- , argType = TGValue -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "a value to compare" , sinceVersion = Nothing } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "value2" -- , argType = TGValue -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "another value to compare" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Just (TBasicType TInt) -- throws : False -- Skip return : False foreign import ccall "gst_value_compare" gst_value_compare :: Ptr GValue -> -- value1 : TGValue Ptr GValue -> -- value2 : TGValue IO Int32 -- | Compares /@value1@/ and /@value2@/. If /@value1@/ and /@value2@/ cannot be -- compared, the function returns GST_VALUE_UNORDERED. Otherwise, -- if /@value1@/ is greater than /@value2@/, GST_VALUE_GREATER_THAN is returned. -- If /@value1@/ is less than /@value2@/, GST_VALUE_LESS_THAN is returned. -- If the values are equal, GST_VALUE_EQUAL is returned. valueCompare :: (B.CallStack.HasCallStack, MonadIO m) => GValue -- ^ /@value1@/: a value to compare -> GValue -- ^ /@value2@/: another value to compare -> m Int32 -- ^ __Returns:__ comparison result valueCompare :: forall (m :: * -> *). (HasCallStack, MonadIO m) => GValue -> GValue -> m Int32 valueCompare GValue value1 GValue value2 = IO Int32 -> m Int32 forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32 forall a b. (a -> b) -> a -> b $ do Ptr GValue value1' <- GValue -> IO (Ptr GValue) forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a) unsafeManagedPtrGetPtr GValue value1 Ptr GValue value2' <- GValue -> IO (Ptr GValue) forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a) unsafeManagedPtrGetPtr GValue value2 Int32 result <- Ptr GValue -> Ptr GValue -> IO Int32 gst_value_compare Ptr GValue value1' Ptr GValue value2' GValue -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr GValue value1 GValue -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr GValue value2 Int32 -> IO Int32 forall (m :: * -> *) a. Monad m => a -> m a return Int32 result -- function value_can_union -- Args: [ Arg -- { argCName = "value1" -- , argType = TGValue -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "a value to union" , sinceVersion = Nothing } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "value2" -- , argType = TGValue -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "another value to union" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Just (TBasicType TBoolean) -- throws : False -- Skip return : False foreign import ccall "gst_value_can_union" gst_value_can_union :: Ptr GValue -> -- value1 : TGValue Ptr GValue -> -- value2 : TGValue IO CInt -- | Determines if /@value1@/ and /@value2@/ can be non-trivially unioned. -- Any two values can be trivially unioned by adding both of them -- to a GstValueList. However, certain types have the possibility -- to be unioned in a simpler way. For example, an integer range -- and an integer can be unioned if the integer is a subset of the -- integer range. If there is the possibility that two values can -- be unioned, this function returns 'P.True'. valueCanUnion :: (B.CallStack.HasCallStack, MonadIO m) => GValue -- ^ /@value1@/: a value to union -> GValue -- ^ /@value2@/: another value to union -> m Bool -- ^ __Returns:__ 'P.True' if there is a function allowing the two values to -- be unioned. valueCanUnion :: forall (m :: * -> *). (HasCallStack, MonadIO m) => GValue -> GValue -> m Bool valueCanUnion GValue value1 GValue value2 = IO Bool -> m Bool forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool forall a b. (a -> b) -> a -> b $ do Ptr GValue value1' <- GValue -> IO (Ptr GValue) forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a) unsafeManagedPtrGetPtr GValue value1 Ptr GValue value2' <- GValue -> IO (Ptr GValue) forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a) unsafeManagedPtrGetPtr GValue value2 CInt result <- Ptr GValue -> Ptr GValue -> IO CInt gst_value_can_union Ptr GValue value1' Ptr GValue value2' let result' :: Bool result' = (CInt -> CInt -> Bool forall a. Eq a => a -> a -> Bool /= CInt 0) CInt result GValue -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr GValue value1 GValue -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr GValue value2 Bool -> IO Bool forall (m :: * -> *) a. Monad m => a -> m a return Bool result' -- function value_can_subtract -- Args: [ Arg -- { argCName = "minuend" -- , argType = TGValue -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "the value to subtract from" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "subtrahend" -- , argType = TGValue -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "the value to subtract" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Just (TBasicType TBoolean) -- throws : False -- Skip return : False foreign import ccall "gst_value_can_subtract" gst_value_can_subtract :: Ptr GValue -> -- minuend : TGValue Ptr GValue -> -- subtrahend : TGValue IO CInt -- | Checks if it\'s possible to subtract /@subtrahend@/ from /@minuend@/. valueCanSubtract :: (B.CallStack.HasCallStack, MonadIO m) => GValue -- ^ /@minuend@/: the value to subtract from -> GValue -- ^ /@subtrahend@/: the value to subtract -> m Bool -- ^ __Returns:__ 'P.True' if a subtraction is possible valueCanSubtract :: forall (m :: * -> *). (HasCallStack, MonadIO m) => GValue -> GValue -> m Bool valueCanSubtract GValue minuend GValue subtrahend = IO Bool -> m Bool forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool forall a b. (a -> b) -> a -> b $ do Ptr GValue minuend' <- GValue -> IO (Ptr GValue) forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a) unsafeManagedPtrGetPtr GValue minuend Ptr GValue subtrahend' <- GValue -> IO (Ptr GValue) forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a) unsafeManagedPtrGetPtr GValue subtrahend CInt result <- Ptr GValue -> Ptr GValue -> IO CInt gst_value_can_subtract Ptr GValue minuend' Ptr GValue subtrahend' let result' :: Bool result' = (CInt -> CInt -> Bool forall a. Eq a => a -> a -> Bool /= CInt 0) CInt result GValue -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr GValue minuend GValue -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr GValue subtrahend Bool -> IO Bool forall (m :: * -> *) a. Monad m => a -> m a return Bool result' -- function value_can_intersect -- Args: [ Arg -- { argCName = "value1" -- , argType = TGValue -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "a value to intersect" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "value2" -- , argType = TGValue -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "another value to intersect" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Just (TBasicType TBoolean) -- throws : False -- Skip return : False foreign import ccall "gst_value_can_intersect" gst_value_can_intersect :: Ptr GValue -> -- value1 : TGValue Ptr GValue -> -- value2 : TGValue IO CInt -- | Determines if intersecting two values will produce a valid result. -- Two values will produce a valid intersection if they have the same -- type. valueCanIntersect :: (B.CallStack.HasCallStack, MonadIO m) => GValue -- ^ /@value1@/: a value to intersect -> GValue -- ^ /@value2@/: another value to intersect -> m Bool -- ^ __Returns:__ 'P.True' if the values can intersect valueCanIntersect :: forall (m :: * -> *). (HasCallStack, MonadIO m) => GValue -> GValue -> m Bool valueCanIntersect GValue value1 GValue value2 = IO Bool -> m Bool forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool forall a b. (a -> b) -> a -> b $ do Ptr GValue value1' <- GValue -> IO (Ptr GValue) forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a) unsafeManagedPtrGetPtr GValue value1 Ptr GValue value2' <- GValue -> IO (Ptr GValue) forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a) unsafeManagedPtrGetPtr GValue value2 CInt result <- Ptr GValue -> Ptr GValue -> IO CInt gst_value_can_intersect Ptr GValue value1' Ptr GValue value2' let result' :: Bool result' = (CInt -> CInt -> Bool forall a. Eq a => a -> a -> Bool /= CInt 0) CInt result GValue -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr GValue value1 GValue -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr GValue value2 Bool -> IO Bool forall (m :: * -> *) a. Monad m => a -> m a return Bool result' -- function value_can_compare -- Args: [ Arg -- { argCName = "value1" -- , argType = TGValue -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "a value to compare" , sinceVersion = Nothing } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "value2" -- , argType = TGValue -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "another value to compare" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Just (TBasicType TBoolean) -- throws : False -- Skip return : False foreign import ccall "gst_value_can_compare" gst_value_can_compare :: Ptr GValue -> -- value1 : TGValue Ptr GValue -> -- value2 : TGValue IO CInt -- | Determines if /@value1@/ and /@value2@/ can be compared. valueCanCompare :: (B.CallStack.HasCallStack, MonadIO m) => GValue -- ^ /@value1@/: a value to compare -> GValue -- ^ /@value2@/: another value to compare -> m Bool -- ^ __Returns:__ 'P.True' if the values can be compared valueCanCompare :: forall (m :: * -> *). (HasCallStack, MonadIO m) => GValue -> GValue -> m Bool valueCanCompare GValue value1 GValue value2 = IO Bool -> m Bool forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool forall a b. (a -> b) -> a -> b $ do Ptr GValue value1' <- GValue -> IO (Ptr GValue) forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a) unsafeManagedPtrGetPtr GValue value1 Ptr GValue value2' <- GValue -> IO (Ptr GValue) forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a) unsafeManagedPtrGetPtr GValue value2 CInt result <- Ptr GValue -> Ptr GValue -> IO CInt gst_value_can_compare Ptr GValue value1' Ptr GValue value2' let result' :: Bool result' = (CInt -> CInt -> Bool forall a. Eq a => a -> a -> Bool /= CInt 0) CInt result GValue -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr GValue value1 GValue -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr GValue value2 Bool -> IO Bool forall (m :: * -> *) a. Monad m => a -> m a return Bool result' -- function util_uint64_scale_round -- Args: [ Arg -- { argCName = "val" -- , argType = TBasicType TUInt64 -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "the number to scale" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "num" -- , argType = TBasicType TUInt64 -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "the numerator of the scale ratio" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "denom" -- , argType = TBasicType TUInt64 -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "the denominator of the scale ratio" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Just (TBasicType TUInt64) -- throws : False -- Skip return : False foreign import ccall "gst_util_uint64_scale_round" gst_util_uint64_scale_round :: Word64 -> -- val : TBasicType TUInt64 Word64 -> -- num : TBasicType TUInt64 Word64 -> -- denom : TBasicType TUInt64 IO Word64 -- | Scale /@val@/ by the rational number /@num@/ \/ /@denom@/, avoiding overflows and -- underflows and without loss of precision. -- -- This function can potentially be very slow if val and num are both -- greater than G_MAXUINT32. utilUint64ScaleRound :: (B.CallStack.HasCallStack, MonadIO m) => Word64 -- ^ /@val@/: the number to scale -> Word64 -- ^ /@num@/: the numerator of the scale ratio -> Word64 -- ^ /@denom@/: the denominator of the scale ratio -> m Word64 -- ^ __Returns:__ /@val@/ * /@num@/ \/ /@denom@/. In the case of an overflow, this -- function returns G_MAXUINT64. If the result is not exactly -- representable as an integer, it is rounded to the nearest integer -- (half-way cases are rounded up). See also 'GI.Gst.Functions.utilUint64Scale', -- 'GI.Gst.Functions.utilUint64ScaleCeil', 'GI.Gst.Functions.utilUint64ScaleInt', -- 'GI.Gst.Functions.utilUint64ScaleIntRound', 'GI.Gst.Functions.utilUint64ScaleIntCeil'. utilUint64ScaleRound :: forall (m :: * -> *). (HasCallStack, MonadIO m) => Word64 -> Word64 -> Word64 -> m Word64 utilUint64ScaleRound Word64 val Word64 num Word64 denom = IO Word64 -> m Word64 forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO Word64 -> m Word64) -> IO Word64 -> m Word64 forall a b. (a -> b) -> a -> b $ do Word64 result <- Word64 -> Word64 -> Word64 -> IO Word64 gst_util_uint64_scale_round Word64 val Word64 num Word64 denom Word64 -> IO Word64 forall (m :: * -> *) a. Monad m => a -> m a return Word64 result -- function util_uint64_scale_int_round -- Args: [ Arg -- { argCName = "val" -- , argType = TBasicType TUInt64 -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "guint64 (such as a #GstClockTime) to scale." -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "num" -- , argType = TBasicType TInt -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "numerator of the scale factor." -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "denom" -- , argType = TBasicType TInt -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "denominator of the scale factor." -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Just (TBasicType TUInt64) -- throws : False -- Skip return : False foreign import ccall "gst_util_uint64_scale_int_round" gst_util_uint64_scale_int_round :: Word64 -> -- val : TBasicType TUInt64 Int32 -> -- num : TBasicType TInt Int32 -> -- denom : TBasicType TInt IO Word64 -- | Scale /@val@/ by the rational number /@num@/ \/ /@denom@/, avoiding overflows and -- underflows and without loss of precision. /@num@/ must be non-negative and -- /@denom@/ must be positive. utilUint64ScaleIntRound :: (B.CallStack.HasCallStack, MonadIO m) => Word64 -- ^ /@val@/: guint64 (such as a @/GstClockTime/@) to scale. -> Int32 -- ^ /@num@/: numerator of the scale factor. -> Int32 -- ^ /@denom@/: denominator of the scale factor. -> m Word64 -- ^ __Returns:__ /@val@/ * /@num@/ \/ /@denom@/. In the case of an overflow, this -- function returns G_MAXUINT64. If the result is not exactly -- representable as an integer, it is rounded to the nearest integer -- (half-way cases are rounded up). See also 'GI.Gst.Functions.utilUint64ScaleInt', -- 'GI.Gst.Functions.utilUint64ScaleIntCeil', 'GI.Gst.Functions.utilUint64Scale', -- 'GI.Gst.Functions.utilUint64ScaleRound', 'GI.Gst.Functions.utilUint64ScaleCeil'. utilUint64ScaleIntRound :: forall (m :: * -> *). (HasCallStack, MonadIO m) => Word64 -> Int32 -> Int32 -> m Word64 utilUint64ScaleIntRound Word64 val Int32 num Int32 denom = IO Word64 -> m Word64 forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO Word64 -> m Word64) -> IO Word64 -> m Word64 forall a b. (a -> b) -> a -> b $ do Word64 result <- Word64 -> Int32 -> Int32 -> IO Word64 gst_util_uint64_scale_int_round Word64 val Int32 num Int32 denom Word64 -> IO Word64 forall (m :: * -> *) a. Monad m => a -> m a return Word64 result -- function util_uint64_scale_int_ceil -- Args: [ Arg -- { argCName = "val" -- , argType = TBasicType TUInt64 -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "guint64 (such as a #GstClockTime) to scale." -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "num" -- , argType = TBasicType TInt -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "numerator of the scale factor." -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "denom" -- , argType = TBasicType TInt -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "denominator of the scale factor." -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Just (TBasicType TUInt64) -- throws : False -- Skip return : False foreign import ccall "gst_util_uint64_scale_int_ceil" gst_util_uint64_scale_int_ceil :: Word64 -> -- val : TBasicType TUInt64 Int32 -> -- num : TBasicType TInt Int32 -> -- denom : TBasicType TInt IO Word64 -- | Scale /@val@/ by the rational number /@num@/ \/ /@denom@/, avoiding overflows and -- underflows and without loss of precision. /@num@/ must be non-negative and -- /@denom@/ must be positive. utilUint64ScaleIntCeil :: (B.CallStack.HasCallStack, MonadIO m) => Word64 -- ^ /@val@/: guint64 (such as a @/GstClockTime/@) to scale. -> Int32 -- ^ /@num@/: numerator of the scale factor. -> Int32 -- ^ /@denom@/: denominator of the scale factor. -> m Word64 -- ^ __Returns:__ /@val@/ * /@num@/ \/ /@denom@/. In the case of an overflow, this -- function returns G_MAXUINT64. If the result is not exactly -- representable as an integer, it is rounded up. See also -- 'GI.Gst.Functions.utilUint64ScaleInt', 'GI.Gst.Functions.utilUint64ScaleIntRound', -- 'GI.Gst.Functions.utilUint64Scale', 'GI.Gst.Functions.utilUint64ScaleRound', -- 'GI.Gst.Functions.utilUint64ScaleCeil'. utilUint64ScaleIntCeil :: forall (m :: * -> *). (HasCallStack, MonadIO m) => Word64 -> Int32 -> Int32 -> m Word64 utilUint64ScaleIntCeil Word64 val Int32 num Int32 denom = IO Word64 -> m Word64 forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO Word64 -> m Word64) -> IO Word64 -> m Word64 forall a b. (a -> b) -> a -> b $ do Word64 result <- Word64 -> Int32 -> Int32 -> IO Word64 gst_util_uint64_scale_int_ceil Word64 val Int32 num Int32 denom Word64 -> IO Word64 forall (m :: * -> *) a. Monad m => a -> m a return Word64 result -- function util_uint64_scale_int -- Args: [ Arg -- { argCName = "val" -- , argType = TBasicType TUInt64 -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "guint64 (such as a #GstClockTime) to scale." -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "num" -- , argType = TBasicType TInt -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "numerator of the scale factor." -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "denom" -- , argType = TBasicType TInt -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "denominator of the scale factor." -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Just (TBasicType TUInt64) -- throws : False -- Skip return : False foreign import ccall "gst_util_uint64_scale_int" gst_util_uint64_scale_int :: Word64 -> -- val : TBasicType TUInt64 Int32 -> -- num : TBasicType TInt Int32 -> -- denom : TBasicType TInt IO Word64 -- | Scale /@val@/ by the rational number /@num@/ \/ /@denom@/, avoiding overflows and -- underflows and without loss of precision. /@num@/ must be non-negative and -- /@denom@/ must be positive. utilUint64ScaleInt :: (B.CallStack.HasCallStack, MonadIO m) => Word64 -- ^ /@val@/: guint64 (such as a @/GstClockTime/@) to scale. -> Int32 -- ^ /@num@/: numerator of the scale factor. -> Int32 -- ^ /@denom@/: denominator of the scale factor. -> m Word64 -- ^ __Returns:__ /@val@/ * /@num@/ \/ /@denom@/. In the case of an overflow, this -- function returns G_MAXUINT64. If the result is not exactly -- representable as an integer, it is truncated. See also -- 'GI.Gst.Functions.utilUint64ScaleIntRound', 'GI.Gst.Functions.utilUint64ScaleIntCeil', -- 'GI.Gst.Functions.utilUint64Scale', 'GI.Gst.Functions.utilUint64ScaleRound', -- 'GI.Gst.Functions.utilUint64ScaleCeil'. utilUint64ScaleInt :: forall (m :: * -> *). (HasCallStack, MonadIO m) => Word64 -> Int32 -> Int32 -> m Word64 utilUint64ScaleInt Word64 val Int32 num Int32 denom = IO Word64 -> m Word64 forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO Word64 -> m Word64) -> IO Word64 -> m Word64 forall a b. (a -> b) -> a -> b $ do Word64 result <- Word64 -> Int32 -> Int32 -> IO Word64 gst_util_uint64_scale_int Word64 val Int32 num Int32 denom Word64 -> IO Word64 forall (m :: * -> *) a. Monad m => a -> m a return Word64 result -- function util_uint64_scale_ceil -- Args: [ Arg -- { argCName = "val" -- , argType = TBasicType TUInt64 -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "the number to scale" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "num" -- , argType = TBasicType TUInt64 -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "the numerator of the scale ratio" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "denom" -- , argType = TBasicType TUInt64 -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "the denominator of the scale ratio" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Just (TBasicType TUInt64) -- throws : False -- Skip return : False foreign import ccall "gst_util_uint64_scale_ceil" gst_util_uint64_scale_ceil :: Word64 -> -- val : TBasicType TUInt64 Word64 -> -- num : TBasicType TUInt64 Word64 -> -- denom : TBasicType TUInt64 IO Word64 -- | Scale /@val@/ by the rational number /@num@/ \/ /@denom@/, avoiding overflows and -- underflows and without loss of precision. -- -- This function can potentially be very slow if val and num are both -- greater than G_MAXUINT32. utilUint64ScaleCeil :: (B.CallStack.HasCallStack, MonadIO m) => Word64 -- ^ /@val@/: the number to scale -> Word64 -- ^ /@num@/: the numerator of the scale ratio -> Word64 -- ^ /@denom@/: the denominator of the scale ratio -> m Word64 -- ^ __Returns:__ /@val@/ * /@num@/ \/ /@denom@/. In the case of an overflow, this -- function returns G_MAXUINT64. If the result is not exactly -- representable as an integer, it is rounded up. See also -- 'GI.Gst.Functions.utilUint64Scale', 'GI.Gst.Functions.utilUint64ScaleRound', -- 'GI.Gst.Functions.utilUint64ScaleInt', 'GI.Gst.Functions.utilUint64ScaleIntRound', -- 'GI.Gst.Functions.utilUint64ScaleIntCeil'. utilUint64ScaleCeil :: forall (m :: * -> *). (HasCallStack, MonadIO m) => Word64 -> Word64 -> Word64 -> m Word64 utilUint64ScaleCeil Word64 val Word64 num Word64 denom = IO Word64 -> m Word64 forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO Word64 -> m Word64) -> IO Word64 -> m Word64 forall a b. (a -> b) -> a -> b $ do Word64 result <- Word64 -> Word64 -> Word64 -> IO Word64 gst_util_uint64_scale_ceil Word64 val Word64 num Word64 denom Word64 -> IO Word64 forall (m :: * -> *) a. Monad m => a -> m a return Word64 result -- function util_uint64_scale -- Args: [ Arg -- { argCName = "val" -- , argType = TBasicType TUInt64 -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "the number to scale" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "num" -- , argType = TBasicType TUInt64 -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "the numerator of the scale ratio" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "denom" -- , argType = TBasicType TUInt64 -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "the denominator of the scale ratio" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Just (TBasicType TUInt64) -- throws : False -- Skip return : False foreign import ccall "gst_util_uint64_scale" gst_util_uint64_scale :: Word64 -> -- val : TBasicType TUInt64 Word64 -> -- num : TBasicType TUInt64 Word64 -> -- denom : TBasicType TUInt64 IO Word64 -- | Scale /@val@/ by the rational number /@num@/ \/ /@denom@/, avoiding overflows and -- underflows and without loss of precision. -- -- This function can potentially be very slow if val and num are both -- greater than G_MAXUINT32. utilUint64Scale :: (B.CallStack.HasCallStack, MonadIO m) => Word64 -- ^ /@val@/: the number to scale -> Word64 -- ^ /@num@/: the numerator of the scale ratio -> Word64 -- ^ /@denom@/: the denominator of the scale ratio -> m Word64 -- ^ __Returns:__ /@val@/ * /@num@/ \/ /@denom@/. In the case of an overflow, this -- function returns G_MAXUINT64. If the result is not exactly -- representable as an integer it is truncated. See also -- 'GI.Gst.Functions.utilUint64ScaleRound', 'GI.Gst.Functions.utilUint64ScaleCeil', -- 'GI.Gst.Functions.utilUint64ScaleInt', 'GI.Gst.Functions.utilUint64ScaleIntRound', -- 'GI.Gst.Functions.utilUint64ScaleIntCeil'. utilUint64Scale :: forall (m :: * -> *). (HasCallStack, MonadIO m) => Word64 -> Word64 -> Word64 -> m Word64 utilUint64Scale Word64 val Word64 num Word64 denom = IO Word64 -> m Word64 forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO Word64 -> m Word64) -> IO Word64 -> m Word64 forall a b. (a -> b) -> a -> b $ do Word64 result <- Word64 -> Word64 -> Word64 -> IO Word64 gst_util_uint64_scale Word64 val Word64 num Word64 denom Word64 -> IO Word64 forall (m :: * -> *) a. Monad m => a -> m a return Word64 result -- function util_set_value_from_string -- Args: [ Arg -- { argCName = "value" -- , argType = TGValue -- , direction = DirectionOut -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "the value to set" , sinceVersion = Nothing } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = True -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "value_str" -- , argType = TBasicType TUTF8 -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "the string to get the value from" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Nothing -- throws : False -- Skip return : False foreign import ccall "gst_util_set_value_from_string" gst_util_set_value_from_string :: Ptr GValue -> -- value : TGValue CString -> -- value_str : TBasicType TUTF8 IO () -- | Converts the string to the type of the value and -- sets the value with it. -- -- Note that this function is dangerous as it does not return any indication -- if the conversion worked or not. utilSetValueFromString :: (B.CallStack.HasCallStack, MonadIO m) => T.Text -- ^ /@valueStr@/: the string to get the value from -> m (GValue) utilSetValueFromString :: forall (m :: * -> *). (HasCallStack, MonadIO m) => Text -> m GValue utilSetValueFromString Text valueStr = IO GValue -> m GValue forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO GValue -> m GValue) -> IO GValue -> m GValue forall a b. (a -> b) -> a -> b $ do Ptr GValue value <- Int -> IO (Ptr GValue) forall a. Int -> IO (Ptr a) SP.callocBytes Int 24 :: IO (Ptr GValue) CString valueStr' <- Text -> IO CString textToCString Text valueStr Ptr GValue -> CString -> IO () gst_util_set_value_from_string Ptr GValue value CString valueStr' GValue value' <- Ptr GValue -> IO GValue B.GValue.wrapGValuePtr Ptr GValue value CString -> IO () forall a. Ptr a -> IO () freeMem CString valueStr' GValue -> IO GValue forall (m :: * -> *) a. Monad m => a -> m a return GValue value' -- function util_set_object_array -- Args: [ Arg -- { argCName = "object" -- , argType = -- TInterface Name { namespace = "GObject" , name = "Object" } -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "the object to set the array to" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "name" -- , argType = TBasicType TUTF8 -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "the name of the property to set" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "array" -- , argType = -- TInterface Name { namespace = "GObject" , name = "ValueArray" } -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "a #GValueArray containing the values" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Just (TBasicType TBoolean) -- throws : False -- Skip return : False foreign import ccall "gst_util_set_object_array" gst_util_set_object_array :: Ptr GObject.Object.Object -> -- object : TInterface (Name {namespace = "GObject", name = "Object"}) CString -> -- name : TBasicType TUTF8 Ptr GObject.ValueArray.ValueArray -> -- array : TInterface (Name {namespace = "GObject", name = "ValueArray"}) IO CInt -- | Transfer a t'GI.GObject.Structs.ValueArray.ValueArray' to @/GST_TYPE_ARRAY/@ and set this value on the -- specified property name. This allow language bindings to set GST_TYPE_ARRAY -- properties which are otherwise not an accessible type. -- -- /Since: 1.12/ utilSetObjectArray :: (B.CallStack.HasCallStack, MonadIO m, GObject.Object.IsObject a) => a -- ^ /@object@/: the object to set the array to -> T.Text -- ^ /@name@/: the name of the property to set -> GObject.ValueArray.ValueArray -- ^ /@array@/: a t'GI.GObject.Structs.ValueArray.ValueArray' containing the values -> m Bool utilSetObjectArray :: forall (m :: * -> *) a. (HasCallStack, MonadIO m, IsObject a) => a -> Text -> ValueArray -> m Bool utilSetObjectArray a object Text name ValueArray array = IO Bool -> m Bool forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool forall a b. (a -> b) -> a -> b $ do Ptr Object object' <- a -> IO (Ptr Object) forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b) unsafeManagedPtrCastPtr a object CString name' <- Text -> IO CString textToCString Text name Ptr ValueArray array' <- ValueArray -> IO (Ptr ValueArray) forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a) unsafeManagedPtrGetPtr ValueArray array CInt result <- Ptr Object -> CString -> Ptr ValueArray -> IO CInt gst_util_set_object_array Ptr Object object' CString name' Ptr ValueArray array' let result' :: Bool result' = (CInt -> CInt -> Bool forall a. Eq a => a -> a -> Bool /= CInt 0) CInt result a -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr a object ValueArray -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr ValueArray array CString -> IO () forall a. Ptr a -> IO () freeMem CString name' Bool -> IO Bool forall (m :: * -> *) a. Monad m => a -> m a return Bool result' -- function util_set_object_arg -- Args: [ Arg -- { argCName = "object" -- , argType = -- TInterface Name { namespace = "GObject" , name = "Object" } -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "the object to set the argument of" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "name" -- , argType = TBasicType TUTF8 -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "the name of the argument to set" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "value" -- , argType = TBasicType TUTF8 -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "the string value to set" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Nothing -- throws : False -- Skip return : False foreign import ccall "gst_util_set_object_arg" gst_util_set_object_arg :: Ptr GObject.Object.Object -> -- object : TInterface (Name {namespace = "GObject", name = "Object"}) CString -> -- name : TBasicType TUTF8 CString -> -- value : TBasicType TUTF8 IO () -- | Converts the string value to the type of the objects argument and -- sets the argument with it. -- -- Note that this function silently returns if /@object@/ has no property named -- /@name@/ or when /@value@/ cannot be converted to the type of the property. utilSetObjectArg :: (B.CallStack.HasCallStack, MonadIO m, GObject.Object.IsObject a) => a -- ^ /@object@/: the object to set the argument of -> T.Text -- ^ /@name@/: the name of the argument to set -> T.Text -- ^ /@value@/: the string value to set -> m () utilSetObjectArg :: forall (m :: * -> *) a. (HasCallStack, MonadIO m, IsObject a) => a -> Text -> Text -> m () utilSetObjectArg a object Text name Text value = IO () -> m () forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO () -> m ()) -> IO () -> m () forall a b. (a -> b) -> a -> b $ do Ptr Object object' <- a -> IO (Ptr Object) forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b) unsafeManagedPtrCastPtr a object CString name' <- Text -> IO CString textToCString Text name CString value' <- Text -> IO CString textToCString Text value Ptr Object -> CString -> CString -> IO () gst_util_set_object_arg Ptr Object object' CString name' CString value' a -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr a object CString -> IO () forall a. Ptr a -> IO () freeMem CString name' CString -> IO () forall a. Ptr a -> IO () freeMem CString value' () -> IO () forall (m :: * -> *) a. Monad m => a -> m a return () -- function util_seqnum_next -- Args: [] -- Lengths: [] -- returnType: Just (TBasicType TUInt32) -- throws : False -- Skip return : False foreign import ccall "gst_util_seqnum_next" gst_util_seqnum_next :: IO Word32 -- | Return a constantly incrementing sequence number. -- -- This function is used internally to GStreamer to be able to determine which -- events and messages are \"the same\". For example, elements may set the seqnum -- on a segment-done message to be the same as that of the last seek event, to -- indicate that event and the message correspond to the same segment. -- -- This function never returns 'GI.Gst.Constants.SEQNUM_INVALID' (which is 0). utilSeqnumNext :: (B.CallStack.HasCallStack, MonadIO m) => m Word32 -- ^ __Returns:__ A constantly incrementing 32-bit unsigned integer, which might -- overflow at some point. Use 'GI.Gst.Functions.utilSeqnumCompare' to make sure -- you handle wraparound correctly. utilSeqnumNext :: forall (m :: * -> *). (HasCallStack, MonadIO m) => m Word32 utilSeqnumNext = IO Word32 -> m Word32 forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32 forall a b. (a -> b) -> a -> b $ do Word32 result <- IO Word32 gst_util_seqnum_next Word32 -> IO Word32 forall (m :: * -> *) a. Monad m => a -> m a return Word32 result -- function util_seqnum_compare -- Args: [ Arg -- { argCName = "s1" -- , argType = TBasicType TUInt32 -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "A sequence number." , sinceVersion = Nothing } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "s2" -- , argType = TBasicType TUInt32 -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "Another sequence number." -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Just (TBasicType TInt32) -- throws : False -- Skip return : False foreign import ccall "gst_util_seqnum_compare" gst_util_seqnum_compare :: Word32 -> -- s1 : TBasicType TUInt32 Word32 -> -- s2 : TBasicType TUInt32 IO Int32 -- | Compare two sequence numbers, handling wraparound. -- -- The current implementation just returns (gint32)(/@s1@/ - /@s2@/). utilSeqnumCompare :: (B.CallStack.HasCallStack, MonadIO m) => Word32 -- ^ /@s1@/: A sequence number. -> Word32 -- ^ /@s2@/: Another sequence number. -> m Int32 -- ^ __Returns:__ A negative number if /@s1@/ is before /@s2@/, 0 if they are equal, or a -- positive number if /@s1@/ is after /@s2@/. utilSeqnumCompare :: forall (m :: * -> *). (HasCallStack, MonadIO m) => Word32 -> Word32 -> m Int32 utilSeqnumCompare Word32 s1 Word32 s2 = IO Int32 -> m Int32 forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32 forall a b. (a -> b) -> a -> b $ do Int32 result <- Word32 -> Word32 -> IO Int32 gst_util_seqnum_compare Word32 s1 Word32 s2 Int32 -> IO Int32 forall (m :: * -> *) a. Monad m => a -> m a return Int32 result -- function util_guint64_to_gdouble -- Args: [ Arg -- { argCName = "value" -- , argType = TBasicType TUInt64 -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "The #guint64 value to convert to double" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Just (TBasicType TDouble) -- throws : False -- Skip return : False foreign import ccall "gst_util_guint64_to_gdouble" gst_util_guint64_to_gdouble :: Word64 -> -- value : TBasicType TUInt64 IO CDouble -- | /No description available in the introspection data./ utilGuint64ToGdouble :: (B.CallStack.HasCallStack, MonadIO m) => Word64 -- ^ /@value@/: The @/guint64/@ value to convert to double -> m Double -- ^ __Returns:__ /@value@/ casted to @/gdouble/@ utilGuint64ToGdouble :: forall (m :: * -> *). (HasCallStack, MonadIO m) => Word64 -> m Double utilGuint64ToGdouble Word64 value = IO Double -> m Double forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO Double -> m Double) -> IO Double -> m Double forall a b. (a -> b) -> a -> b $ do CDouble result <- Word64 -> IO CDouble gst_util_guint64_to_gdouble Word64 value let result' :: Double result' = CDouble -> Double forall a b. (Real a, Fractional b) => a -> b realToFrac CDouble result Double -> IO Double forall (m :: * -> *) a. Monad m => a -> m a return Double result' -- function util_group_id_next -- Args: [] -- Lengths: [] -- returnType: Just (TBasicType TUInt) -- throws : False -- Skip return : False foreign import ccall "gst_util_group_id_next" gst_util_group_id_next :: IO Word32 -- | Return a constantly incrementing group id. -- -- This function is used to generate a new group-id for the -- stream-start event. -- -- This function never returns 'GI.Gst.Constants.GROUP_ID_INVALID' (which is 0) utilGroupIdNext :: (B.CallStack.HasCallStack, MonadIO m) => m Word32 -- ^ __Returns:__ A constantly incrementing unsigned integer, which might -- overflow back to 0 at some point. utilGroupIdNext :: forall (m :: * -> *). (HasCallStack, MonadIO m) => m Word32 utilGroupIdNext = IO Word32 -> m Word32 forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32 forall a b. (a -> b) -> a -> b $ do Word32 result <- IO Word32 gst_util_group_id_next Word32 -> IO Word32 forall (m :: * -> *) a. Monad m => a -> m a return Word32 result -- function util_greatest_common_divisor_int64 -- Args: [ Arg -- { argCName = "a" -- , argType = TBasicType TInt64 -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "First value as #gint64" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "b" -- , argType = TBasicType TInt64 -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "Second value as #gint64" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Just (TBasicType TInt64) -- throws : False -- Skip return : False foreign import ccall "gst_util_greatest_common_divisor_int64" gst_util_greatest_common_divisor_int64 :: Int64 -> -- a : TBasicType TInt64 Int64 -> -- b : TBasicType TInt64 IO Int64 -- | Calculates the greatest common divisor of /@a@/ -- and /@b@/. utilGreatestCommonDivisorInt64 :: (B.CallStack.HasCallStack, MonadIO m) => Int64 -- ^ /@a@/: First value as @/gint64/@ -> Int64 -- ^ /@b@/: Second value as @/gint64/@ -> m Int64 -- ^ __Returns:__ Greatest common divisor of /@a@/ and /@b@/ utilGreatestCommonDivisorInt64 :: forall (m :: * -> *). (HasCallStack, MonadIO m) => Int64 -> Int64 -> m Int64 utilGreatestCommonDivisorInt64 Int64 a Int64 b = IO Int64 -> m Int64 forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO Int64 -> m Int64) -> IO Int64 -> m Int64 forall a b. (a -> b) -> a -> b $ do Int64 result <- Int64 -> Int64 -> IO Int64 gst_util_greatest_common_divisor_int64 Int64 a Int64 b Int64 -> IO Int64 forall (m :: * -> *) a. Monad m => a -> m a return Int64 result -- function util_greatest_common_divisor -- Args: [ Arg -- { argCName = "a" -- , argType = TBasicType TInt -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "First value as #gint" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "b" -- , argType = TBasicType TInt -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "Second value as #gint" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Just (TBasicType TInt) -- throws : False -- Skip return : False foreign import ccall "gst_util_greatest_common_divisor" gst_util_greatest_common_divisor :: Int32 -> -- a : TBasicType TInt Int32 -> -- b : TBasicType TInt IO Int32 -- | Calculates the greatest common divisor of /@a@/ -- and /@b@/. utilGreatestCommonDivisor :: (B.CallStack.HasCallStack, MonadIO m) => Int32 -- ^ /@a@/: First value as @/gint/@ -> Int32 -- ^ /@b@/: Second value as @/gint/@ -> m Int32 -- ^ __Returns:__ Greatest common divisor of /@a@/ and /@b@/ utilGreatestCommonDivisor :: forall (m :: * -> *). (HasCallStack, MonadIO m) => Int32 -> Int32 -> m Int32 utilGreatestCommonDivisor Int32 a Int32 b = IO Int32 -> m Int32 forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32 forall a b. (a -> b) -> a -> b $ do Int32 result <- Int32 -> Int32 -> IO Int32 gst_util_greatest_common_divisor Int32 a Int32 b Int32 -> IO Int32 forall (m :: * -> *) a. Monad m => a -> m a return Int32 result -- function util_get_timestamp -- Args: [] -- Lengths: [] -- returnType: Just (TBasicType TUInt64) -- throws : False -- Skip return : False foreign import ccall "gst_util_get_timestamp" gst_util_get_timestamp :: IO Word64 -- | Get a timestamp as GstClockTime to be used for interval measurements. -- The timestamp should not be interpreted in any other way. utilGetTimestamp :: (B.CallStack.HasCallStack, MonadIO m) => m Word64 -- ^ __Returns:__ the timestamp utilGetTimestamp :: forall (m :: * -> *). (HasCallStack, MonadIO m) => m Word64 utilGetTimestamp = IO Word64 -> m Word64 forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO Word64 -> m Word64) -> IO Word64 -> m Word64 forall a b. (a -> b) -> a -> b $ do Word64 result <- IO Word64 gst_util_get_timestamp Word64 -> IO Word64 forall (m :: * -> *) a. Monad m => a -> m a return Word64 result -- function util_get_object_array -- Args: [ Arg -- { argCName = "object" -- , argType = -- TInterface Name { namespace = "GObject" , name = "Object" } -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "the object to set the array to" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "name" -- , argType = TBasicType TUTF8 -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "the name of the property to set" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "array" -- , argType = -- TInterface Name { namespace = "GObject" , name = "ValueArray" } -- , direction = DirectionOut -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "a return #GValueArray" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferEverything -- } -- ] -- Lengths: [] -- returnType: Just (TBasicType TBoolean) -- throws : False -- Skip return : False foreign import ccall "gst_util_get_object_array" gst_util_get_object_array :: Ptr GObject.Object.Object -> -- object : TInterface (Name {namespace = "GObject", name = "Object"}) CString -> -- name : TBasicType TUTF8 Ptr (Ptr GObject.ValueArray.ValueArray) -> -- array : TInterface (Name {namespace = "GObject", name = "ValueArray"}) IO CInt -- | Get a property of type @/GST_TYPE_ARRAY/@ and transform it into a -- t'GI.GObject.Structs.ValueArray.ValueArray'. This allow language bindings to get GST_TYPE_ARRAY -- properties which are otherwise not an accessible type. -- -- /Since: 1.12/ utilGetObjectArray :: (B.CallStack.HasCallStack, MonadIO m, GObject.Object.IsObject a) => a -- ^ /@object@/: the object to set the array to -> T.Text -- ^ /@name@/: the name of the property to set -> m ((Bool, GObject.ValueArray.ValueArray)) utilGetObjectArray :: forall (m :: * -> *) a. (HasCallStack, MonadIO m, IsObject a) => a -> Text -> m (Bool, ValueArray) utilGetObjectArray a object Text name = IO (Bool, ValueArray) -> m (Bool, ValueArray) forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO (Bool, ValueArray) -> m (Bool, ValueArray)) -> IO (Bool, ValueArray) -> m (Bool, ValueArray) forall a b. (a -> b) -> a -> b $ do Ptr Object object' <- a -> IO (Ptr Object) forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b) unsafeManagedPtrCastPtr a object CString name' <- Text -> IO CString textToCString Text name Ptr (Ptr ValueArray) array <- IO (Ptr (Ptr ValueArray)) forall a. Storable a => IO (Ptr a) callocMem :: IO (Ptr (Ptr GObject.ValueArray.ValueArray)) CInt result <- Ptr Object -> CString -> Ptr (Ptr ValueArray) -> IO CInt gst_util_get_object_array Ptr Object object' CString name' Ptr (Ptr ValueArray) array let result' :: Bool result' = (CInt -> CInt -> Bool forall a. Eq a => a -> a -> Bool /= CInt 0) CInt result Ptr ValueArray array' <- Ptr (Ptr ValueArray) -> IO (Ptr ValueArray) forall a. Storable a => Ptr a -> IO a peek Ptr (Ptr ValueArray) array ValueArray array'' <- ((ManagedPtr ValueArray -> ValueArray) -> Ptr ValueArray -> IO ValueArray forall a. (HasCallStack, GBoxed a) => (ManagedPtr a -> a) -> Ptr a -> IO a wrapBoxed ManagedPtr ValueArray -> ValueArray GObject.ValueArray.ValueArray) Ptr ValueArray array' a -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr a object CString -> IO () forall a. Ptr a -> IO () freeMem CString name' Ptr (Ptr ValueArray) -> IO () forall a. Ptr a -> IO () freeMem Ptr (Ptr ValueArray) array (Bool, ValueArray) -> IO (Bool, ValueArray) forall (m :: * -> *) a. Monad m => a -> m a return (Bool result', ValueArray array'') -- function util_gdouble_to_guint64 -- Args: [ Arg -- { argCName = "value" -- , argType = TBasicType TDouble -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "The #gdouble value to convert guint64 double" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Just (TBasicType TUInt64) -- throws : False -- Skip return : False foreign import ccall "gst_util_gdouble_to_guint64" gst_util_gdouble_to_guint64 :: CDouble -> -- value : TBasicType TDouble IO Word64 -- | /No description available in the introspection data./ utilGdoubleToGuint64 :: (B.CallStack.HasCallStack, MonadIO m) => Double -- ^ /@value@/: The @/gdouble/@ value to convert guint64 double -> m Word64 -- ^ __Returns:__ /@value@/ casted to @/guint64/@ utilGdoubleToGuint64 :: forall (m :: * -> *). (HasCallStack, MonadIO m) => Double -> m Word64 utilGdoubleToGuint64 Double value = IO Word64 -> m Word64 forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO Word64 -> m Word64) -> IO Word64 -> m Word64 forall a b. (a -> b) -> a -> b $ do let value' :: CDouble value' = Double -> CDouble forall a b. (Real a, Fractional b) => a -> b realToFrac Double value Word64 result <- CDouble -> IO Word64 gst_util_gdouble_to_guint64 CDouble value' Word64 -> IO Word64 forall (m :: * -> *) a. Monad m => a -> m a return Word64 result -- function util_fraction_to_double -- Args: [ Arg -- { argCName = "src_n" -- , argType = TBasicType TInt -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "Fraction numerator as #gint" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "src_d" -- , argType = TBasicType TInt -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "Fraction denominator #gint" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "dest" -- , argType = TBasicType TDouble -- , direction = DirectionOut -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "pointer to a #gdouble for the result" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferEverything -- } -- ] -- Lengths: [] -- returnType: Nothing -- throws : False -- Skip return : False foreign import ccall "gst_util_fraction_to_double" gst_util_fraction_to_double :: Int32 -> -- src_n : TBasicType TInt Int32 -> -- src_d : TBasicType TInt Ptr CDouble -> -- dest : TBasicType TDouble IO () -- | Transforms a fraction to a @/gdouble/@. utilFractionToDouble :: (B.CallStack.HasCallStack, MonadIO m) => Int32 -- ^ /@srcN@/: Fraction numerator as @/gint/@ -> Int32 -- ^ /@srcD@/: Fraction denominator @/gint/@ -> m (Double) utilFractionToDouble :: forall (m :: * -> *). (HasCallStack, MonadIO m) => Int32 -> Int32 -> m Double utilFractionToDouble Int32 srcN Int32 srcD = IO Double -> m Double forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO Double -> m Double) -> IO Double -> m Double forall a b. (a -> b) -> a -> b $ do Ptr CDouble dest <- IO (Ptr CDouble) forall a. Storable a => IO (Ptr a) allocMem :: IO (Ptr CDouble) Int32 -> Int32 -> Ptr CDouble -> IO () gst_util_fraction_to_double Int32 srcN Int32 srcD Ptr CDouble dest CDouble dest' <- Ptr CDouble -> IO CDouble forall a. Storable a => Ptr a -> IO a peek Ptr CDouble dest let dest'' :: Double dest'' = CDouble -> Double forall a b. (Real a, Fractional b) => a -> b realToFrac CDouble dest' Ptr CDouble -> IO () forall a. Ptr a -> IO () freeMem Ptr CDouble dest Double -> IO Double forall (m :: * -> *) a. Monad m => a -> m a return Double dest'' -- function util_fraction_multiply -- Args: [ Arg -- { argCName = "a_n" -- , argType = TBasicType TInt -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "Numerator of first value" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "a_d" -- , argType = TBasicType TInt -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "Denominator of first value" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "b_n" -- , argType = TBasicType TInt -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "Numerator of second value" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "b_d" -- , argType = TBasicType TInt -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "Denominator of second value" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "res_n" -- , argType = TBasicType TInt -- , direction = DirectionOut -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "Pointer to #gint to hold the result numerator" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferEverything -- } -- , Arg -- { argCName = "res_d" -- , argType = TBasicType TInt -- , direction = DirectionOut -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = -- Just "Pointer to #gint to hold the result denominator" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferEverything -- } -- ] -- Lengths: [] -- returnType: Just (TBasicType TBoolean) -- throws : False -- Skip return : False foreign import ccall "gst_util_fraction_multiply" gst_util_fraction_multiply :: Int32 -> -- a_n : TBasicType TInt Int32 -> -- a_d : TBasicType TInt Int32 -> -- b_n : TBasicType TInt Int32 -> -- b_d : TBasicType TInt Ptr Int32 -> -- res_n : TBasicType TInt Ptr Int32 -> -- res_d : TBasicType TInt IO CInt -- | Multiplies the fractions /@aN@/\//@aD@/ and /@bN@/\//@bD@/ and stores -- the result in /@resN@/ and /@resD@/. utilFractionMultiply :: (B.CallStack.HasCallStack, MonadIO m) => Int32 -- ^ /@aN@/: Numerator of first value -> Int32 -- ^ /@aD@/: Denominator of first value -> Int32 -- ^ /@bN@/: Numerator of second value -> Int32 -- ^ /@bD@/: Denominator of second value -> m ((Bool, Int32, Int32)) -- ^ __Returns:__ 'P.False' on overflow, 'P.True' otherwise. utilFractionMultiply :: forall (m :: * -> *). (HasCallStack, MonadIO m) => Int32 -> Int32 -> Int32 -> Int32 -> m (Bool, Int32, Int32) utilFractionMultiply Int32 aN Int32 aD Int32 bN Int32 bD = IO (Bool, Int32, Int32) -> m (Bool, Int32, Int32) forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO (Bool, Int32, Int32) -> m (Bool, Int32, Int32)) -> IO (Bool, Int32, Int32) -> m (Bool, Int32, Int32) forall a b. (a -> b) -> a -> b $ do Ptr Int32 resN <- IO (Ptr Int32) forall a. Storable a => IO (Ptr a) allocMem :: IO (Ptr Int32) Ptr Int32 resD <- IO (Ptr Int32) forall a. Storable a => IO (Ptr a) allocMem :: IO (Ptr Int32) CInt result <- Int32 -> Int32 -> Int32 -> Int32 -> Ptr Int32 -> Ptr Int32 -> IO CInt gst_util_fraction_multiply Int32 aN Int32 aD Int32 bN Int32 bD Ptr Int32 resN Ptr Int32 resD let result' :: Bool result' = (CInt -> CInt -> Bool forall a. Eq a => a -> a -> Bool /= CInt 0) CInt result Int32 resN' <- Ptr Int32 -> IO Int32 forall a. Storable a => Ptr a -> IO a peek Ptr Int32 resN Int32 resD' <- Ptr Int32 -> IO Int32 forall a. Storable a => Ptr a -> IO a peek Ptr Int32 resD Ptr Int32 -> IO () forall a. Ptr a -> IO () freeMem Ptr Int32 resN Ptr Int32 -> IO () forall a. Ptr a -> IO () freeMem Ptr Int32 resD (Bool, Int32, Int32) -> IO (Bool, Int32, Int32) forall (m :: * -> *) a. Monad m => a -> m a return (Bool result', Int32 resN', Int32 resD') -- function util_fraction_compare -- Args: [ Arg -- { argCName = "a_n" -- , argType = TBasicType TInt -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "Numerator of first value" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "a_d" -- , argType = TBasicType TInt -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "Denominator of first value" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "b_n" -- , argType = TBasicType TInt -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "Numerator of second value" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "b_d" -- , argType = TBasicType TInt -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "Denominator of second value" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Just (TBasicType TInt) -- throws : False -- Skip return : False foreign import ccall "gst_util_fraction_compare" gst_util_fraction_compare :: Int32 -> -- a_n : TBasicType TInt Int32 -> -- a_d : TBasicType TInt Int32 -> -- b_n : TBasicType TInt Int32 -> -- b_d : TBasicType TInt IO Int32 -- | Compares the fractions /@aN@/\//@aD@/ and /@bN@/\//@bD@/ and returns -- -1 if a \< b, 0 if a = b and 1 if a > b. utilFractionCompare :: (B.CallStack.HasCallStack, MonadIO m) => Int32 -- ^ /@aN@/: Numerator of first value -> Int32 -- ^ /@aD@/: Denominator of first value -> Int32 -- ^ /@bN@/: Numerator of second value -> Int32 -- ^ /@bD@/: Denominator of second value -> m Int32 -- ^ __Returns:__ -1 if a \< b; 0 if a = b; 1 if a > b. utilFractionCompare :: forall (m :: * -> *). (HasCallStack, MonadIO m) => Int32 -> Int32 -> Int32 -> Int32 -> m Int32 utilFractionCompare Int32 aN Int32 aD Int32 bN Int32 bD = IO Int32 -> m Int32 forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32 forall a b. (a -> b) -> a -> b $ do Int32 result <- Int32 -> Int32 -> Int32 -> Int32 -> IO Int32 gst_util_fraction_compare Int32 aN Int32 aD Int32 bN Int32 bD Int32 -> IO Int32 forall (m :: * -> *) a. Monad m => a -> m a return Int32 result -- function util_fraction_add -- Args: [ Arg -- { argCName = "a_n" -- , argType = TBasicType TInt -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "Numerator of first value" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "a_d" -- , argType = TBasicType TInt -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "Denominator of first value" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "b_n" -- , argType = TBasicType TInt -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "Numerator of second value" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "b_d" -- , argType = TBasicType TInt -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "Denominator of second value" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "res_n" -- , argType = TBasicType TInt -- , direction = DirectionOut -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "Pointer to #gint to hold the result numerator" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferEverything -- } -- , Arg -- { argCName = "res_d" -- , argType = TBasicType TInt -- , direction = DirectionOut -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = -- Just "Pointer to #gint to hold the result denominator" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferEverything -- } -- ] -- Lengths: [] -- returnType: Just (TBasicType TBoolean) -- throws : False -- Skip return : False foreign import ccall "gst_util_fraction_add" gst_util_fraction_add :: Int32 -> -- a_n : TBasicType TInt Int32 -> -- a_d : TBasicType TInt Int32 -> -- b_n : TBasicType TInt Int32 -> -- b_d : TBasicType TInt Ptr Int32 -> -- res_n : TBasicType TInt Ptr Int32 -> -- res_d : TBasicType TInt IO CInt -- | Adds the fractions /@aN@/\//@aD@/ and /@bN@/\//@bD@/ and stores -- the result in /@resN@/ and /@resD@/. utilFractionAdd :: (B.CallStack.HasCallStack, MonadIO m) => Int32 -- ^ /@aN@/: Numerator of first value -> Int32 -- ^ /@aD@/: Denominator of first value -> Int32 -- ^ /@bN@/: Numerator of second value -> Int32 -- ^ /@bD@/: Denominator of second value -> m ((Bool, Int32, Int32)) -- ^ __Returns:__ 'P.False' on overflow, 'P.True' otherwise. utilFractionAdd :: forall (m :: * -> *). (HasCallStack, MonadIO m) => Int32 -> Int32 -> Int32 -> Int32 -> m (Bool, Int32, Int32) utilFractionAdd Int32 aN Int32 aD Int32 bN Int32 bD = IO (Bool, Int32, Int32) -> m (Bool, Int32, Int32) forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO (Bool, Int32, Int32) -> m (Bool, Int32, Int32)) -> IO (Bool, Int32, Int32) -> m (Bool, Int32, Int32) forall a b. (a -> b) -> a -> b $ do Ptr Int32 resN <- IO (Ptr Int32) forall a. Storable a => IO (Ptr a) allocMem :: IO (Ptr Int32) Ptr Int32 resD <- IO (Ptr Int32) forall a. Storable a => IO (Ptr a) allocMem :: IO (Ptr Int32) CInt result <- Int32 -> Int32 -> Int32 -> Int32 -> Ptr Int32 -> Ptr Int32 -> IO CInt gst_util_fraction_add Int32 aN Int32 aD Int32 bN Int32 bD Ptr Int32 resN Ptr Int32 resD let result' :: Bool result' = (CInt -> CInt -> Bool forall a. Eq a => a -> a -> Bool /= CInt 0) CInt result Int32 resN' <- Ptr Int32 -> IO Int32 forall a. Storable a => Ptr a -> IO a peek Ptr Int32 resN Int32 resD' <- Ptr Int32 -> IO Int32 forall a. Storable a => Ptr a -> IO a peek Ptr Int32 resD Ptr Int32 -> IO () forall a. Ptr a -> IO () freeMem Ptr Int32 resN Ptr Int32 -> IO () forall a. Ptr a -> IO () freeMem Ptr Int32 resD (Bool, Int32, Int32) -> IO (Bool, Int32, Int32) forall (m :: * -> *) a. Monad m => a -> m a return (Bool result', Int32 resN', Int32 resD') -- function util_dump_mem -- Args: [ Arg -- { argCName = "mem" -- , argType = TCArray False (-1) 1 (TBasicType TUInt8) -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "a pointer to the memory to dump" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "size" -- , argType = TBasicType TUInt -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "the size of the memory block to dump" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [ Arg -- { argCName = "size" -- , argType = TBasicType TUInt -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "the size of the memory block to dump" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- returnType: Nothing -- throws : False -- Skip return : False foreign import ccall "gst_util_dump_mem" gst_util_dump_mem :: Ptr Word8 -> -- mem : TCArray False (-1) 1 (TBasicType TUInt8) Word32 -> -- size : TBasicType TUInt IO () -- | Dumps the memory block into a hex representation. Useful for debugging. utilDumpMem :: (B.CallStack.HasCallStack, MonadIO m) => ByteString -- ^ /@mem@/: a pointer to the memory to dump -> m () utilDumpMem :: forall (m :: * -> *). (HasCallStack, MonadIO m) => ByteString -> m () utilDumpMem ByteString mem = IO () -> m () forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO () -> m ()) -> IO () -> m () forall a b. (a -> b) -> a -> b $ do let size :: Word32 size = Int -> Word32 forall a b. (Integral a, Num b) => a -> b fromIntegral (Int -> Word32) -> Int -> Word32 forall a b. (a -> b) -> a -> b $ ByteString -> Int B.length ByteString mem Ptr Word8 mem' <- ByteString -> IO (Ptr Word8) packByteString ByteString mem Ptr Word8 -> Word32 -> IO () gst_util_dump_mem Ptr Word8 mem' Word32 size Ptr Word8 -> IO () forall a. Ptr a -> IO () freeMem Ptr Word8 mem' () -> IO () forall (m :: * -> *) a. Monad m => a -> m a return () -- function util_dump_buffer -- Args: [ Arg -- { argCName = "buf" -- , argType = TInterface Name { namespace = "Gst" , name = "Buffer" } -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "a #GstBuffer whose memory to dump" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Nothing -- throws : False -- Skip return : False foreign import ccall "gst_util_dump_buffer" gst_util_dump_buffer :: Ptr Gst.Buffer.Buffer -> -- buf : TInterface (Name {namespace = "Gst", name = "Buffer"}) IO () -- | Dumps the buffer memory into a hex representation. Useful for debugging. -- -- /Since: 1.14/ utilDumpBuffer :: (B.CallStack.HasCallStack, MonadIO m) => Gst.Buffer.Buffer -- ^ /@buf@/: a t'GI.Gst.Structs.Buffer.Buffer' whose memory to dump -> m () utilDumpBuffer :: forall (m :: * -> *). (HasCallStack, MonadIO m) => Buffer -> m () utilDumpBuffer Buffer buf = IO () -> m () forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO () -> m ()) -> IO () -> m () forall a b. (a -> b) -> a -> b $ do Ptr Buffer buf' <- Buffer -> IO (Ptr Buffer) forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a) unsafeManagedPtrGetPtr Buffer buf Ptr Buffer -> IO () gst_util_dump_buffer Ptr Buffer buf' Buffer -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr Buffer buf () -> IO () forall (m :: * -> *) a. Monad m => a -> m a return () -- function util_double_to_fraction -- Args: [ Arg -- { argCName = "src" -- , argType = TBasicType TDouble -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "#gdouble to transform" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "dest_n" -- , argType = TBasicType TInt -- , direction = DirectionOut -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = -- Just "pointer to a #gint to hold the result numerator" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferEverything -- } -- , Arg -- { argCName = "dest_d" -- , argType = TBasicType TInt -- , direction = DirectionOut -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = -- Just "pointer to a #gint to hold the result denominator" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferEverything -- } -- ] -- Lengths: [] -- returnType: Nothing -- throws : False -- Skip return : False foreign import ccall "gst_util_double_to_fraction" gst_util_double_to_fraction :: CDouble -> -- src : TBasicType TDouble Ptr Int32 -> -- dest_n : TBasicType TInt Ptr Int32 -> -- dest_d : TBasicType TInt IO () -- | Transforms a @/gdouble/@ to a fraction and simplifies -- the result. utilDoubleToFraction :: (B.CallStack.HasCallStack, MonadIO m) => Double -- ^ /@src@/: @/gdouble/@ to transform -> m ((Int32, Int32)) utilDoubleToFraction :: forall (m :: * -> *). (HasCallStack, MonadIO m) => Double -> m (Int32, Int32) utilDoubleToFraction Double src = IO (Int32, Int32) -> m (Int32, Int32) forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO (Int32, Int32) -> m (Int32, Int32)) -> IO (Int32, Int32) -> m (Int32, Int32) forall a b. (a -> b) -> a -> b $ do let src' :: CDouble src' = Double -> CDouble forall a b. (Real a, Fractional b) => a -> b realToFrac Double src Ptr Int32 destN <- IO (Ptr Int32) forall a. Storable a => IO (Ptr a) allocMem :: IO (Ptr Int32) Ptr Int32 destD <- IO (Ptr Int32) forall a. Storable a => IO (Ptr a) allocMem :: IO (Ptr Int32) CDouble -> Ptr Int32 -> Ptr Int32 -> IO () gst_util_double_to_fraction CDouble src' Ptr Int32 destN Ptr Int32 destD Int32 destN' <- Ptr Int32 -> IO Int32 forall a. Storable a => Ptr a -> IO a peek Ptr Int32 destN Int32 destD' <- Ptr Int32 -> IO Int32 forall a. Storable a => Ptr a -> IO a peek Ptr Int32 destD Ptr Int32 -> IO () forall a. Ptr a -> IO () freeMem Ptr Int32 destN Ptr Int32 -> IO () forall a. Ptr a -> IO () freeMem Ptr Int32 destD (Int32, Int32) -> IO (Int32, Int32) forall (m :: * -> *) a. Monad m => a -> m a return (Int32 destN', Int32 destD') -- function util_array_binary_search -- Args: [ Arg -- { argCName = "array" -- , argType = TBasicType TPtr -- , direction = DirectionIn -- , mayBeNull = True -- , argDoc = -- Documentation -- { rawDocText = Just "the sorted input array" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "num_elements" -- , argType = TBasicType TUInt -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "number of elements in the array" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "element_size" -- , argType = TBasicType TUInt64 -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "size of every element in bytes" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "search_func" -- , argType = -- TInterface Name { namespace = "GLib" , name = "CompareDataFunc" } -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = -- Just -- "function to compare two elements, @search_data will always be passed as second argument" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeCall -- , argClosure = 6 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "mode" -- , argType = -- TInterface Name { namespace = "Gst" , name = "SearchMode" } -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "search mode that should be used" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "search_data" -- , argType = TBasicType TPtr -- , direction = DirectionIn -- , mayBeNull = True -- , argDoc = -- Documentation -- { rawDocText = Just "element that should be found" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "user_data" -- , argType = TBasicType TPtr -- , direction = DirectionIn -- , mayBeNull = True -- , argDoc = -- Documentation -- { rawDocText = Just "data to pass to @search_func" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Just (TBasicType TPtr) -- throws : False -- Skip return : False foreign import ccall "gst_util_array_binary_search" gst_util_array_binary_search :: Ptr () -> -- array : TBasicType TPtr Word32 -> -- num_elements : TBasicType TUInt Word64 -> -- element_size : TBasicType TUInt64 FunPtr GLib.Callbacks.C_CompareDataFunc -> -- search_func : TInterface (Name {namespace = "GLib", name = "CompareDataFunc"}) CUInt -> -- mode : TInterface (Name {namespace = "Gst", name = "SearchMode"}) Ptr () -> -- search_data : TBasicType TPtr Ptr () -> -- user_data : TBasicType TPtr IO (Ptr ()) -- | Searches inside /@array@/ for /@searchData@/ by using the comparison function -- /@searchFunc@/. /@array@/ must be sorted ascending. -- -- As /@searchData@/ is always passed as second argument to /@searchFunc@/ it\'s -- not required that /@searchData@/ has the same type as the array elements. -- -- The complexity of this search function is O(log (num_elements)). utilArrayBinarySearch :: (B.CallStack.HasCallStack, MonadIO m) => Ptr () -- ^ /@array@/: the sorted input array -> Word32 -- ^ /@numElements@/: number of elements in the array -> Word64 -- ^ /@elementSize@/: size of every element in bytes -> GLib.Callbacks.CompareDataFunc -- ^ /@searchFunc@/: function to compare two elements, /@searchData@/ will always be passed as second argument -> Gst.Enums.SearchMode -- ^ /@mode@/: search mode that should be used -> Ptr () -- ^ /@searchData@/: element that should be found -> m (Ptr ()) -- ^ __Returns:__ The address of the found -- element or 'P.Nothing' if nothing was found utilArrayBinarySearch :: forall (m :: * -> *). (HasCallStack, MonadIO m) => Ptr () -> Word32 -> Word64 -> CompareDataFunc -> SearchMode -> Ptr () -> m (Ptr ()) utilArrayBinarySearch Ptr () array Word32 numElements Word64 elementSize CompareDataFunc searchFunc SearchMode mode Ptr () searchData = IO (Ptr ()) -> m (Ptr ()) forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO (Ptr ()) -> m (Ptr ())) -> IO (Ptr ()) -> m (Ptr ()) forall a b. (a -> b) -> a -> b $ do FunPtr C_CompareDataFunc searchFunc' <- C_CompareDataFunc -> IO (FunPtr C_CompareDataFunc) GLib.Callbacks.mk_CompareDataFunc (Maybe (Ptr (FunPtr C_CompareDataFunc)) -> C_CompareDataFunc -> C_CompareDataFunc GLib.Callbacks.wrap_CompareDataFunc Maybe (Ptr (FunPtr C_CompareDataFunc)) forall a. Maybe a Nothing (CompareDataFunc -> C_CompareDataFunc GLib.Callbacks.drop_closures_CompareDataFunc CompareDataFunc searchFunc)) let mode' :: CUInt mode' = (Int -> CUInt forall a b. (Integral a, Num b) => a -> b fromIntegral (Int -> CUInt) -> (SearchMode -> Int) -> SearchMode -> CUInt forall b c a. (b -> c) -> (a -> b) -> a -> c . SearchMode -> Int forall a. Enum a => a -> Int fromEnum) SearchMode mode let userData :: Ptr a userData = Ptr a forall a. Ptr a nullPtr Ptr () result <- Ptr () -> Word32 -> Word64 -> FunPtr C_CompareDataFunc -> CUInt -> Ptr () -> Ptr () -> IO (Ptr ()) gst_util_array_binary_search Ptr () array Word32 numElements Word64 elementSize FunPtr C_CompareDataFunc searchFunc' CUInt mode' Ptr () searchData Ptr () forall a. Ptr a userData Ptr Any -> IO () forall a. Ptr a -> IO () safeFreeFunPtr (Ptr Any -> IO ()) -> Ptr Any -> IO () forall a b. (a -> b) -> a -> b $ FunPtr C_CompareDataFunc -> Ptr Any forall a b. FunPtr a -> Ptr b castFunPtrToPtr FunPtr C_CompareDataFunc searchFunc' Ptr () -> IO (Ptr ()) forall (m :: * -> *) a. Monad m => a -> m a return Ptr () result -- function update_registry -- Args: [] -- Lengths: [] -- returnType: Just (TBasicType TBoolean) -- throws : False -- Skip return : False foreign import ccall "gst_update_registry" gst_update_registry :: IO CInt -- | Forces GStreamer to re-scan its plugin paths and update the default -- plugin registry. -- -- Applications will almost never need to call this function, it is only -- useful if the application knows new plugins have been installed (or old -- ones removed) since the start of the application (or, to be precise, the -- first call to 'GI.Gst.Functions.init') and the application wants to make use of any -- newly-installed plugins without restarting the application. -- -- Applications should assume that the registry update is neither atomic nor -- thread-safe and should therefore not have any dynamic pipelines running -- (including the playbin and decodebin elements) and should also not create -- any elements or access the GStreamer registry while the update is in -- progress. -- -- Note that this function may block for a significant amount of time. updateRegistry :: (B.CallStack.HasCallStack, MonadIO m) => m Bool -- ^ __Returns:__ 'P.True' if the registry has been updated successfully (does not -- imply that there were changes), otherwise 'P.False'. updateRegistry :: forall (m :: * -> *). (HasCallStack, MonadIO m) => m Bool updateRegistry = IO Bool -> m Bool forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool forall a b. (a -> b) -> a -> b $ do CInt result <- IO CInt gst_update_registry let result' :: Bool result' = (CInt -> CInt -> Bool forall a. Eq a => a -> a -> Bool /= CInt 0) CInt result Bool -> IO Bool forall (m :: * -> *) a. Monad m => a -> m a return Bool result' -- function type_mark_as_plugin_api -- Args: [ Arg -- { argCName = "type" -- , argType = TBasicType TGType -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "a GType" , sinceVersion = Nothing } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "flags" -- , argType = -- TInterface Name { namespace = "Gst" , name = "PluginAPIFlags" } -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = -- Just -- "a set of #GstPluginAPIFlags to further inform cache generation." -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Nothing -- throws : False -- Skip return : False foreign import ccall "gst_type_mark_as_plugin_api" gst_type_mark_as_plugin_api :: CGType -> -- type : TBasicType TGType CUInt -> -- flags : TInterface (Name {namespace = "Gst", name = "PluginAPIFlags"}) IO () -- | Marks /@type@/ as plugin API. This should be called in @class_init@ of -- elements that expose new types (i.e. enums, flags or internal GObjects) via -- properties, signals or pad templates. -- -- Types exposed by plugins are not automatically added to the documentation -- as they might originate from another library and should in that case be -- documented via that library instead. -- -- By marking a type as plugin API it will be included in the documentation of -- the plugin that defines it. -- -- /Since: 1.18/ typeMarkAsPluginApi :: (B.CallStack.HasCallStack, MonadIO m) => GType -- ^ /@type@/: a GType -> [Gst.Flags.PluginAPIFlags] -- ^ /@flags@/: a set of t'GI.Gst.Flags.PluginAPIFlags' to further inform cache generation. -> m () typeMarkAsPluginApi :: forall (m :: * -> *). (HasCallStack, MonadIO m) => GType -> [PluginAPIFlags] -> m () typeMarkAsPluginApi GType type_ [PluginAPIFlags] flags = IO () -> m () forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO () -> m ()) -> IO () -> m () forall a b. (a -> b) -> a -> b $ do let type_' :: Word64 type_' = GType -> Word64 gtypeToCGType GType type_ let flags' :: CUInt flags' = [PluginAPIFlags] -> CUInt forall b a. (Num b, IsGFlag a) => [a] -> b gflagsToWord [PluginAPIFlags] flags Word64 -> CUInt -> IO () gst_type_mark_as_plugin_api Word64 type_' CUInt flags' () -> IO () forall (m :: * -> *) a. Monad m => a -> m a return () -- function type_is_plugin_api -- Args: [ Arg -- { argCName = "type" -- , argType = TBasicType TGType -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "a GType" , sinceVersion = Nothing } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "flags" -- , argType = -- TInterface Name { namespace = "Gst" , name = "PluginAPIFlags" } -- , direction = DirectionOut -- , mayBeNull = True -- , argDoc = -- Documentation -- { rawDocText = -- Just "What #GstPluginAPIFlags the plugin was marked with" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferEverything -- } -- ] -- Lengths: [] -- returnType: Just (TBasicType TBoolean) -- throws : False -- Skip return : False foreign import ccall "gst_type_is_plugin_api" gst_type_is_plugin_api :: CGType -> -- type : TBasicType TGType Ptr CUInt -> -- flags : TInterface (Name {namespace = "Gst", name = "PluginAPIFlags"}) IO CInt -- | Checks if /@type@/ is plugin API. See 'GI.Gst.Functions.typeMarkAsPluginApi' for -- details. -- -- /Since: 1.18/ typeIsPluginApi :: (B.CallStack.HasCallStack, MonadIO m) => GType -- ^ /@type@/: a GType -> m ((Bool, [Gst.Flags.PluginAPIFlags])) -- ^ __Returns:__ 'P.True' if /@type@/ is plugin API or 'P.False' otherwise. typeIsPluginApi :: forall (m :: * -> *). (HasCallStack, MonadIO m) => GType -> m (Bool, [PluginAPIFlags]) typeIsPluginApi GType type_ = IO (Bool, [PluginAPIFlags]) -> m (Bool, [PluginAPIFlags]) forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO (Bool, [PluginAPIFlags]) -> m (Bool, [PluginAPIFlags])) -> IO (Bool, [PluginAPIFlags]) -> m (Bool, [PluginAPIFlags]) forall a b. (a -> b) -> a -> b $ do let type_' :: Word64 type_' = GType -> Word64 gtypeToCGType GType type_ Ptr CUInt flags <- IO (Ptr CUInt) forall a. Storable a => IO (Ptr a) allocMem :: IO (Ptr CUInt) CInt result <- Word64 -> Ptr CUInt -> IO CInt gst_type_is_plugin_api Word64 type_' Ptr CUInt flags let result' :: Bool result' = (CInt -> CInt -> Bool forall a. Eq a => a -> a -> Bool /= CInt 0) CInt result CUInt flags' <- Ptr CUInt -> IO CUInt forall a. Storable a => Ptr a -> IO a peek Ptr CUInt flags let flags'' :: [PluginAPIFlags] flags'' = CUInt -> [PluginAPIFlags] forall a b. (Storable a, Integral a, Bits a, IsGFlag b) => a -> [b] wordToGFlags CUInt flags' Ptr CUInt -> IO () forall a. Ptr a -> IO () freeMem Ptr CUInt flags (Bool, [PluginAPIFlags]) -> IO (Bool, [PluginAPIFlags]) forall (m :: * -> *) a. Monad m => a -> m a return (Bool result', [PluginAPIFlags] flags'') -- function type_find_get_type -- Args: [] -- Lengths: [] -- returnType: Just (TBasicType TGType) -- throws : False -- Skip return : False foreign import ccall "gst_type_find_get_type" gst_type_find_get_type :: IO CGType -- | /No description available in the introspection data./ typeFindGetType :: (B.CallStack.HasCallStack, MonadIO m) => m GType typeFindGetType :: forall (m :: * -> *). (HasCallStack, MonadIO m) => m GType typeFindGetType = IO GType -> m GType forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO GType -> m GType) -> IO GType -> m GType forall a b. (a -> b) -> a -> b $ do Word64 result <- IO Word64 gst_type_find_get_type let result' :: GType result' = Word64 -> GType GType Word64 result GType -> IO GType forall (m :: * -> *) a. Monad m => a -> m a return GType result' -- function tracing_register_hook -- Args: [ Arg -- { argCName = "tracer" -- , argType = TInterface Name { namespace = "Gst" , name = "Tracer" } -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "the tracer" , sinceVersion = Nothing } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "detail" -- , argType = TBasicType TUTF8 -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "the detailed hook" , sinceVersion = Nothing } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "func" -- , argType = -- TInterface Name { namespace = "GObject" , name = "Callback" } -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "the callback" , sinceVersion = Nothing } -- , argScope = ScopeTypeAsync -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Nothing -- throws : False -- Skip return : False foreign import ccall "gst_tracing_register_hook" gst_tracing_register_hook :: Ptr Gst.Tracer.Tracer -> -- tracer : TInterface (Name {namespace = "Gst", name = "Tracer"}) CString -> -- detail : TBasicType TUTF8 FunPtr GObject.Callbacks.C_Callback -> -- func : TInterface (Name {namespace = "GObject", name = "Callback"}) IO () -- | Register /@func@/ to be called when the trace hook /@detail@/ is getting invoked. -- Use 'P.Nothing' for /@detail@/ to register to all hooks. -- -- /Since: 1.8/ tracingRegisterHook :: (B.CallStack.HasCallStack, MonadIO m, Gst.Tracer.IsTracer a) => a -- ^ /@tracer@/: the tracer -> T.Text -- ^ /@detail@/: the detailed hook -> GObject.Callbacks.Callback -- ^ /@func@/: the callback -> m () tracingRegisterHook :: forall (m :: * -> *) a. (HasCallStack, MonadIO m, IsTracer a) => a -> Text -> IO () -> m () tracingRegisterHook a tracer Text detail IO () func = IO () -> m () forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO () -> m ()) -> IO () -> m () forall a b. (a -> b) -> a -> b $ do Ptr Tracer tracer' <- a -> IO (Ptr Tracer) forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b) unsafeManagedPtrCastPtr a tracer CString detail' <- Text -> IO CString textToCString Text detail Ptr (FunPtr (IO ())) ptrfunc <- IO (Ptr (FunPtr (IO ()))) forall a. Storable a => IO (Ptr a) callocMem :: IO (Ptr (FunPtr GObject.Callbacks.C_Callback)) FunPtr (IO ()) func' <- IO () -> IO (FunPtr (IO ())) GObject.Callbacks.mk_Callback (Maybe (Ptr (FunPtr (IO ()))) -> IO () -> IO () GObject.Callbacks.wrap_Callback (Ptr (FunPtr (IO ())) -> Maybe (Ptr (FunPtr (IO ()))) forall a. a -> Maybe a Just Ptr (FunPtr (IO ())) ptrfunc) IO () func) Ptr (FunPtr (IO ())) -> FunPtr (IO ()) -> IO () forall a. Storable a => Ptr a -> a -> IO () poke Ptr (FunPtr (IO ())) ptrfunc FunPtr (IO ()) func' Ptr Tracer -> CString -> FunPtr (IO ()) -> IO () gst_tracing_register_hook Ptr Tracer tracer' CString detail' FunPtr (IO ()) func' a -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr a tracer CString -> IO () forall a. Ptr a -> IO () freeMem CString detail' () -> IO () forall (m :: * -> *) a. Monad m => a -> m a return () -- function tracing_get_active_tracers -- Args: [] -- Lengths: [] -- returnType: Just -- (TGList (TInterface Name { namespace = "Gst" , name = "Tracer" })) -- throws : False -- Skip return : False foreign import ccall "gst_tracing_get_active_tracers" gst_tracing_get_active_tracers :: IO (Ptr (GList (Ptr Gst.Tracer.Tracer))) -- | Get a list of all active tracer objects owned by the tracing framework for -- the entirety of the run-time of the process or till 'GI.Gst.Functions.deinit' is called. -- -- /Since: 1.18/ tracingGetActiveTracers :: (B.CallStack.HasCallStack, MonadIO m) => m [Gst.Tracer.Tracer] -- ^ __Returns:__ A t'GI.GLib.Structs.List.List' of -- t'GI.Gst.Objects.Tracer.Tracer' objects tracingGetActiveTracers :: forall (m :: * -> *). (HasCallStack, MonadIO m) => m [Tracer] tracingGetActiveTracers = IO [Tracer] -> m [Tracer] forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO [Tracer] -> m [Tracer]) -> IO [Tracer] -> m [Tracer] forall a b. (a -> b) -> a -> b $ do Ptr (GList (Ptr Tracer)) result <- IO (Ptr (GList (Ptr Tracer))) gst_tracing_get_active_tracers [Ptr Tracer] result' <- Ptr (GList (Ptr Tracer)) -> IO [Ptr Tracer] forall a. Ptr (GList (Ptr a)) -> IO [Ptr a] unpackGList Ptr (GList (Ptr Tracer)) result [Tracer] result'' <- (Ptr Tracer -> IO Tracer) -> [Ptr Tracer] -> IO [Tracer] forall (t :: * -> *) (m :: * -> *) a b. (Traversable t, Monad m) => (a -> m b) -> t a -> m (t b) mapM ((ManagedPtr Tracer -> Tracer) -> Ptr Tracer -> IO Tracer forall a b. (HasCallStack, GObject a, GObject b) => (ManagedPtr a -> a) -> Ptr b -> IO a wrapObject ManagedPtr Tracer -> Tracer Gst.Tracer.Tracer) [Ptr Tracer] result' Ptr (GList (Ptr Tracer)) -> IO () forall a. Ptr (GList a) -> IO () g_list_free Ptr (GList (Ptr Tracer)) result [Tracer] -> IO [Tracer] forall (m :: * -> *) a. Monad m => a -> m a return [Tracer] result'' -- function tag_merge_use_first -- Args: [ Arg -- { argCName = "dest" -- , argType = TGValue -- , direction = DirectionOut -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "uninitialized GValue to store result in" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = True -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "src" -- , argType = TGValue -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "GValue to copy from" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Nothing -- throws : False -- Skip return : False foreign import ccall "gst_tag_merge_use_first" gst_tag_merge_use_first :: Ptr GValue -> -- dest : TGValue Ptr GValue -> -- src : TGValue IO () -- | This is a convenience function for the func argument of @/gst_tag_register()/@. -- It creates a copy of the first value from the list. tagMergeUseFirst :: (B.CallStack.HasCallStack, MonadIO m) => GValue -- ^ /@src@/: GValue to copy from -> m (GValue) tagMergeUseFirst :: forall (m :: * -> *). (HasCallStack, MonadIO m) => GValue -> m GValue tagMergeUseFirst GValue src = IO GValue -> m GValue forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO GValue -> m GValue) -> IO GValue -> m GValue forall a b. (a -> b) -> a -> b $ do Ptr GValue dest <- Int -> IO (Ptr GValue) forall a. Int -> IO (Ptr a) SP.callocBytes Int 24 :: IO (Ptr GValue) Ptr GValue src' <- GValue -> IO (Ptr GValue) forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a) unsafeManagedPtrGetPtr GValue src Ptr GValue -> Ptr GValue -> IO () gst_tag_merge_use_first Ptr GValue dest Ptr GValue src' GValue dest' <- Ptr GValue -> IO GValue B.GValue.wrapGValuePtr Ptr GValue dest GValue -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr GValue src GValue -> IO GValue forall (m :: * -> *) a. Monad m => a -> m a return GValue dest' -- function tag_merge_strings_with_comma -- Args: [ Arg -- { argCName = "dest" -- , argType = TGValue -- , direction = DirectionOut -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "uninitialized GValue to store result in" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = True -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "src" -- , argType = TGValue -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "GValue to copy from" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Nothing -- throws : False -- Skip return : False foreign import ccall "gst_tag_merge_strings_with_comma" gst_tag_merge_strings_with_comma :: Ptr GValue -> -- dest : TGValue Ptr GValue -> -- src : TGValue IO () -- | This is a convenience function for the func argument of @/gst_tag_register()/@. -- It concatenates all given strings using a comma. The tag must be registered -- as a G_TYPE_STRING or this function will fail. tagMergeStringsWithComma :: (B.CallStack.HasCallStack, MonadIO m) => GValue -- ^ /@src@/: GValue to copy from -> m (GValue) tagMergeStringsWithComma :: forall (m :: * -> *). (HasCallStack, MonadIO m) => GValue -> m GValue tagMergeStringsWithComma GValue src = IO GValue -> m GValue forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO GValue -> m GValue) -> IO GValue -> m GValue forall a b. (a -> b) -> a -> b $ do Ptr GValue dest <- Int -> IO (Ptr GValue) forall a. Int -> IO (Ptr a) SP.callocBytes Int 24 :: IO (Ptr GValue) Ptr GValue src' <- GValue -> IO (Ptr GValue) forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a) unsafeManagedPtrGetPtr GValue src Ptr GValue -> Ptr GValue -> IO () gst_tag_merge_strings_with_comma Ptr GValue dest Ptr GValue src' GValue dest' <- Ptr GValue -> IO GValue B.GValue.wrapGValuePtr Ptr GValue dest GValue -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr GValue src GValue -> IO GValue forall (m :: * -> *) a. Monad m => a -> m a return GValue dest' -- function tag_is_fixed -- Args: [ Arg -- { argCName = "tag" -- , argType = TBasicType TUTF8 -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "tag to check" , sinceVersion = Nothing } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Just (TBasicType TBoolean) -- throws : False -- Skip return : False foreign import ccall "gst_tag_is_fixed" gst_tag_is_fixed :: CString -> -- tag : TBasicType TUTF8 IO CInt -- | Checks if the given tag is fixed. A fixed tag can only contain one value. -- Unfixed tags can contain lists of values. tagIsFixed :: (B.CallStack.HasCallStack, MonadIO m) => T.Text -- ^ /@tag@/: tag to check -> m Bool -- ^ __Returns:__ 'P.True', if the given tag is fixed. tagIsFixed :: forall (m :: * -> *). (HasCallStack, MonadIO m) => Text -> m Bool tagIsFixed Text tag = IO Bool -> m Bool forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool forall a b. (a -> b) -> a -> b $ do CString tag' <- Text -> IO CString textToCString Text tag CInt result <- CString -> IO CInt gst_tag_is_fixed CString tag' let result' :: Bool result' = (CInt -> CInt -> Bool forall a. Eq a => a -> a -> Bool /= CInt 0) CInt result CString -> IO () forall a. Ptr a -> IO () freeMem CString tag' Bool -> IO Bool forall (m :: * -> *) a. Monad m => a -> m a return Bool result' -- function tag_get_type -- Args: [ Arg -- { argCName = "tag" -- , argType = TBasicType TUTF8 -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "the tag" , sinceVersion = Nothing } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Just (TBasicType TGType) -- throws : False -- Skip return : False foreign import ccall "gst_tag_get_type" gst_tag_get_type :: CString -> -- tag : TBasicType TUTF8 IO CGType -- | Gets the t'GType' used for this tag. tagGetType :: (B.CallStack.HasCallStack, MonadIO m) => T.Text -- ^ /@tag@/: the tag -> m GType -- ^ __Returns:__ the t'GType' of this tag tagGetType :: forall (m :: * -> *). (HasCallStack, MonadIO m) => Text -> m GType tagGetType Text tag = IO GType -> m GType forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO GType -> m GType) -> IO GType -> m GType forall a b. (a -> b) -> a -> b $ do CString tag' <- Text -> IO CString textToCString Text tag Word64 result <- CString -> IO Word64 gst_tag_get_type CString tag' let result' :: GType result' = Word64 -> GType GType Word64 result CString -> IO () forall a. Ptr a -> IO () freeMem CString tag' GType -> IO GType forall (m :: * -> *) a. Monad m => a -> m a return GType result' -- function tag_get_nick -- Args: [ Arg -- { argCName = "tag" -- , argType = TBasicType TUTF8 -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "the tag" , sinceVersion = Nothing } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Just (TBasicType TUTF8) -- throws : False -- Skip return : False foreign import ccall "gst_tag_get_nick" gst_tag_get_nick :: CString -> -- tag : TBasicType TUTF8 IO CString -- | Returns the human-readable name of this tag, You must not change or free -- this string. tagGetNick :: (B.CallStack.HasCallStack, MonadIO m) => T.Text -- ^ /@tag@/: the tag -> m (Maybe T.Text) -- ^ __Returns:__ the human-readable name of this tag tagGetNick :: forall (m :: * -> *). (HasCallStack, MonadIO m) => Text -> m (Maybe Text) tagGetNick Text tag = IO (Maybe Text) -> m (Maybe Text) forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO (Maybe Text) -> m (Maybe Text)) -> IO (Maybe Text) -> m (Maybe Text) forall a b. (a -> b) -> a -> b $ do CString tag' <- Text -> IO CString textToCString Text tag CString result <- CString -> IO CString gst_tag_get_nick CString tag' Maybe Text maybeResult <- CString -> (CString -> IO Text) -> IO (Maybe Text) forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b) convertIfNonNull CString result ((CString -> IO Text) -> IO (Maybe Text)) -> (CString -> IO Text) -> IO (Maybe Text) forall a b. (a -> b) -> a -> b $ \CString result' -> do Text result'' <- HasCallStack => CString -> IO Text CString -> IO Text cstringToText CString result' Text -> IO Text forall (m :: * -> *) a. Monad m => a -> m a return Text result'' CString -> IO () forall a. Ptr a -> IO () freeMem CString tag' Maybe Text -> IO (Maybe Text) forall (m :: * -> *) a. Monad m => a -> m a return Maybe Text maybeResult -- function tag_get_flag -- Args: [ Arg -- { argCName = "tag" -- , argType = TBasicType TUTF8 -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "the tag" , sinceVersion = Nothing } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Just (TInterface Name { namespace = "Gst" , name = "TagFlag" }) -- throws : False -- Skip return : False foreign import ccall "gst_tag_get_flag" gst_tag_get_flag :: CString -> -- tag : TBasicType TUTF8 IO CUInt -- | Gets the flag of /@tag@/. tagGetFlag :: (B.CallStack.HasCallStack, MonadIO m) => T.Text -- ^ /@tag@/: the tag -> m Gst.Enums.TagFlag -- ^ __Returns:__ the flag of this tag. tagGetFlag :: forall (m :: * -> *). (HasCallStack, MonadIO m) => Text -> m TagFlag tagGetFlag Text tag = IO TagFlag -> m TagFlag forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO TagFlag -> m TagFlag) -> IO TagFlag -> m TagFlag forall a b. (a -> b) -> a -> b $ do CString tag' <- Text -> IO CString textToCString Text tag CUInt result <- CString -> IO CUInt gst_tag_get_flag CString tag' let result' :: TagFlag result' = (Int -> TagFlag forall a. Enum a => Int -> a toEnum (Int -> TagFlag) -> (CUInt -> Int) -> CUInt -> TagFlag forall b c a. (b -> c) -> (a -> b) -> a -> c . CUInt -> Int forall a b. (Integral a, Num b) => a -> b fromIntegral) CUInt result CString -> IO () forall a. Ptr a -> IO () freeMem CString tag' TagFlag -> IO TagFlag forall (m :: * -> *) a. Monad m => a -> m a return TagFlag result' -- function tag_get_description -- Args: [ Arg -- { argCName = "tag" -- , argType = TBasicType TUTF8 -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "the tag" , sinceVersion = Nothing } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Just (TBasicType TUTF8) -- throws : False -- Skip return : False foreign import ccall "gst_tag_get_description" gst_tag_get_description :: CString -> -- tag : TBasicType TUTF8 IO CString -- | Returns the human-readable description of this tag, You must not change or -- free this string. tagGetDescription :: (B.CallStack.HasCallStack, MonadIO m) => T.Text -- ^ /@tag@/: the tag -> m (Maybe T.Text) -- ^ __Returns:__ the human-readable description of this tag tagGetDescription :: forall (m :: * -> *). (HasCallStack, MonadIO m) => Text -> m (Maybe Text) tagGetDescription Text tag = IO (Maybe Text) -> m (Maybe Text) forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO (Maybe Text) -> m (Maybe Text)) -> IO (Maybe Text) -> m (Maybe Text) forall a b. (a -> b) -> a -> b $ do CString tag' <- Text -> IO CString textToCString Text tag CString result <- CString -> IO CString gst_tag_get_description CString tag' Maybe Text maybeResult <- CString -> (CString -> IO Text) -> IO (Maybe Text) forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b) convertIfNonNull CString result ((CString -> IO Text) -> IO (Maybe Text)) -> (CString -> IO Text) -> IO (Maybe Text) forall a b. (a -> b) -> a -> b $ \CString result' -> do Text result'' <- HasCallStack => CString -> IO Text CString -> IO Text cstringToText CString result' Text -> IO Text forall (m :: * -> *) a. Monad m => a -> m a return Text result'' CString -> IO () forall a. Ptr a -> IO () freeMem CString tag' Maybe Text -> IO (Maybe Text) forall (m :: * -> *) a. Monad m => a -> m a return Maybe Text maybeResult -- function tag_exists -- Args: [ Arg -- { argCName = "tag" -- , argType = TBasicType TUTF8 -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "name of the tag" , sinceVersion = Nothing } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Just (TBasicType TBoolean) -- throws : False -- Skip return : False foreign import ccall "gst_tag_exists" gst_tag_exists :: CString -> -- tag : TBasicType TUTF8 IO CInt -- | Checks if the given type is already registered. tagExists :: (B.CallStack.HasCallStack, MonadIO m) => T.Text -- ^ /@tag@/: name of the tag -> m Bool -- ^ __Returns:__ 'P.True' if the type is already registered tagExists :: forall (m :: * -> *). (HasCallStack, MonadIO m) => Text -> m Bool tagExists Text tag = IO Bool -> m Bool forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool forall a b. (a -> b) -> a -> b $ do CString tag' <- Text -> IO CString textToCString Text tag CInt result <- CString -> IO CInt gst_tag_exists CString tag' let result' :: Bool result' = (CInt -> CInt -> Bool forall a. Eq a => a -> a -> Bool /= CInt 0) CInt result CString -> IO () forall a. Ptr a -> IO () freeMem CString tag' Bool -> IO Bool forall (m :: * -> *) a. Monad m => a -> m a return Bool result' -- function static_pad_template_get_type -- Args: [] -- Lengths: [] -- returnType: Just (TBasicType TGType) -- throws : False -- Skip return : False foreign import ccall "gst_static_pad_template_get_type" gst_static_pad_template_get_type :: IO CGType -- | /No description available in the introspection data./ staticPadTemplateGetType :: (B.CallStack.HasCallStack, MonadIO m) => m GType staticPadTemplateGetType :: forall (m :: * -> *). (HasCallStack, MonadIO m) => m GType staticPadTemplateGetType = IO GType -> m GType forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO GType -> m GType) -> IO GType -> m GType forall a b. (a -> b) -> a -> b $ do Word64 result <- IO Word64 gst_static_pad_template_get_type let result' :: GType result' = Word64 -> GType GType Word64 result GType -> IO GType forall (m :: * -> *) a. Monad m => a -> m a return GType result' -- function static_caps_get_type -- Args: [] -- Lengths: [] -- returnType: Just (TBasicType TGType) -- throws : False -- Skip return : False foreign import ccall "gst_static_caps_get_type" gst_static_caps_get_type :: IO CGType -- | /No description available in the introspection data./ staticCapsGetType :: (B.CallStack.HasCallStack, MonadIO m) => m GType staticCapsGetType :: forall (m :: * -> *). (HasCallStack, MonadIO m) => m GType staticCapsGetType = IO GType -> m GType forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO GType -> m GType) -> IO GType -> m GType forall a b. (a -> b) -> a -> b $ do Word64 result <- IO Word64 gst_static_caps_get_type let result' :: GType result' = Word64 -> GType GType Word64 result GType -> IO GType forall (m :: * -> *) a. Monad m => a -> m a return GType result' -- function segtrap_set_enabled -- Args: [ Arg -- { argCName = "enabled" -- , argType = TBasicType TBoolean -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = -- Just "whether a custom SIGSEGV handler should be installed." -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Nothing -- throws : False -- Skip return : False foreign import ccall "gst_segtrap_set_enabled" gst_segtrap_set_enabled :: CInt -> -- enabled : TBasicType TBoolean IO () -- | Applications might want to disable\/enable the SIGSEGV handling of -- the GStreamer core. See 'GI.Gst.Functions.segtrapIsEnabled' for more information. segtrapSetEnabled :: (B.CallStack.HasCallStack, MonadIO m) => Bool -- ^ /@enabled@/: whether a custom SIGSEGV handler should be installed. -> m () segtrapSetEnabled :: forall (m :: * -> *). (HasCallStack, MonadIO m) => Bool -> m () segtrapSetEnabled Bool enabled = IO () -> m () forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO () -> m ()) -> IO () -> m () forall a b. (a -> b) -> a -> b $ do let enabled' :: CInt enabled' = (Int -> CInt forall a b. (Integral a, Num b) => a -> b fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt forall b c a. (b -> c) -> (a -> b) -> a -> c . Bool -> Int forall a. Enum a => a -> Int fromEnum) Bool enabled CInt -> IO () gst_segtrap_set_enabled CInt enabled' () -> IO () forall (m :: * -> *) a. Monad m => a -> m a return () -- function segtrap_is_enabled -- Args: [] -- Lengths: [] -- returnType: Just (TBasicType TBoolean) -- throws : False -- Skip return : False foreign import ccall "gst_segtrap_is_enabled" gst_segtrap_is_enabled :: IO CInt -- | Some functions in the GStreamer core might install a custom SIGSEGV handler -- to better catch and report errors to the application. Currently this feature -- is enabled by default when loading plugins. -- -- Applications might want to disable this behaviour with the -- 'GI.Gst.Functions.segtrapSetEnabled' function. This is typically done if the application -- wants to install its own handler without GStreamer interfering. segtrapIsEnabled :: (B.CallStack.HasCallStack, MonadIO m) => m Bool -- ^ __Returns:__ 'P.True' if GStreamer is allowed to install a custom SIGSEGV handler. segtrapIsEnabled :: forall (m :: * -> *). (HasCallStack, MonadIO m) => m Bool segtrapIsEnabled = IO Bool -> m Bool forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool forall a b. (a -> b) -> a -> b $ do CInt result <- IO CInt gst_segtrap_is_enabled let result' :: Bool result' = (CInt -> CInt -> Bool forall a. Eq a => a -> a -> Bool /= CInt 0) CInt result Bool -> IO Bool forall (m :: * -> *) a. Monad m => a -> m a return Bool result' -- function reference_timestamp_meta_api_get_type -- Args: [] -- Lengths: [] -- returnType: Just (TBasicType TGType) -- throws : False -- Skip return : False foreign import ccall "gst_reference_timestamp_meta_api_get_type" gst_reference_timestamp_meta_api_get_type :: IO CGType -- | /No description available in the introspection data./ referenceTimestampMetaApiGetType :: (B.CallStack.HasCallStack, MonadIO m) => m GType referenceTimestampMetaApiGetType :: forall (m :: * -> *). (HasCallStack, MonadIO m) => m GType referenceTimestampMetaApiGetType = IO GType -> m GType forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO GType -> m GType) -> IO GType -> m GType forall a b. (a -> b) -> a -> b $ do Word64 result <- IO Word64 gst_reference_timestamp_meta_api_get_type let result' :: GType result' = Word64 -> GType GType Word64 result GType -> IO GType forall (m :: * -> *) a. Monad m => a -> m a return GType result' -- function protection_select_system -- Args: [ Arg -- { argCName = "system_identifiers" -- , argType = TCArray True (-1) (-1) (TBasicType TUTF8) -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = -- Just -- "A null terminated array of strings\nthat contains the UUID values of each protection system that is to be\nchecked." -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Just (TBasicType TUTF8) -- throws : False -- Skip return : False foreign import ccall "gst_protection_select_system" gst_protection_select_system :: Ptr CString -> -- system_identifiers : TCArray True (-1) (-1) (TBasicType TUTF8) IO CString -- | Iterates the supplied list of UUIDs and checks the GstRegistry for -- an element that supports one of the supplied UUIDs. If more than one -- element matches, the system ID of the highest ranked element is selected. -- -- /Since: 1.6/ protectionSelectSystem :: (B.CallStack.HasCallStack, MonadIO m) => [T.Text] -- ^ /@systemIdentifiers@/: A null terminated array of strings -- that contains the UUID values of each protection system that is to be -- checked. -> m (Maybe T.Text) -- ^ __Returns:__ One of the strings from -- /@systemIdentifiers@/ that indicates the highest ranked element that -- implements the protection system indicated by that system ID, or 'P.Nothing' if no -- element has been found. protectionSelectSystem :: forall (m :: * -> *). (HasCallStack, MonadIO m) => [Text] -> m (Maybe Text) protectionSelectSystem [Text] systemIdentifiers = IO (Maybe Text) -> m (Maybe Text) forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO (Maybe Text) -> m (Maybe Text)) -> IO (Maybe Text) -> m (Maybe Text) forall a b. (a -> b) -> a -> b $ do Ptr CString systemIdentifiers' <- [Text] -> IO (Ptr CString) packZeroTerminatedUTF8CArray [Text] systemIdentifiers CString result <- Ptr CString -> IO CString gst_protection_select_system Ptr CString systemIdentifiers' Maybe Text maybeResult <- CString -> (CString -> IO Text) -> IO (Maybe Text) forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b) convertIfNonNull CString result ((CString -> IO Text) -> IO (Maybe Text)) -> (CString -> IO Text) -> IO (Maybe Text) forall a b. (a -> b) -> a -> b $ \CString result' -> do Text result'' <- HasCallStack => CString -> IO Text CString -> IO Text cstringToText CString result' Text -> IO Text forall (m :: * -> *) a. Monad m => a -> m a return Text result'' (CString -> IO ()) -> Ptr CString -> IO () forall a b. (Ptr a -> IO b) -> Ptr (Ptr a) -> IO () mapZeroTerminatedCArray CString -> IO () forall a. Ptr a -> IO () freeMem Ptr CString systemIdentifiers' Ptr CString -> IO () forall a. Ptr a -> IO () freeMem Ptr CString systemIdentifiers' Maybe Text -> IO (Maybe Text) forall (m :: * -> *) a. Monad m => a -> m a return Maybe Text maybeResult -- function protection_meta_api_get_type -- Args: [] -- Lengths: [] -- returnType: Just (TBasicType TGType) -- throws : False -- Skip return : False foreign import ccall "gst_protection_meta_api_get_type" gst_protection_meta_api_get_type :: IO CGType -- | /No description available in the introspection data./ protectionMetaApiGetType :: (B.CallStack.HasCallStack, MonadIO m) => m GType protectionMetaApiGetType :: forall (m :: * -> *). (HasCallStack, MonadIO m) => m GType protectionMetaApiGetType = IO GType -> m GType forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO GType -> m GType) -> IO GType -> m GType forall a b. (a -> b) -> a -> b $ do Word64 result <- IO Word64 gst_protection_meta_api_get_type let result' :: GType result' = Word64 -> GType GType Word64 result GType -> IO GType forall (m :: * -> *) a. Monad m => a -> m a return GType result' -- function protection_filter_systems_by_available_decryptors -- Args: [ Arg -- { argCName = "system_identifiers" -- , argType = TCArray True (-1) (-1) (TBasicType TUTF8) -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = -- Just -- "\nA null terminated array of strings that contains the UUID values of each\nprotection system that is to be checked." -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Just (TCArray True (-1) (-1) (TBasicType TUTF8)) -- throws : False -- Skip return : False foreign import ccall "gst_protection_filter_systems_by_available_decryptors" gst_protection_filter_systems_by_available_decryptors :: Ptr CString -> -- system_identifiers : TCArray True (-1) (-1) (TBasicType TUTF8) IO (Ptr CString) -- | Iterates the supplied list of UUIDs and checks the GstRegistry for -- all the decryptors supporting one of the supplied UUIDs. -- -- /Since: 1.14/ protectionFilterSystemsByAvailableDecryptors :: (B.CallStack.HasCallStack, MonadIO m) => [T.Text] -- ^ /@systemIdentifiers@/: -- A null terminated array of strings that contains the UUID values of each -- protection system that is to be checked. -> m (Maybe [T.Text]) -- ^ __Returns:__ -- A null terminated array containing all -- the /@systemIdentifiers@/ supported by the set of available decryptors, or -- 'P.Nothing' if no matches were found. protectionFilterSystemsByAvailableDecryptors :: forall (m :: * -> *). (HasCallStack, MonadIO m) => [Text] -> m (Maybe [Text]) protectionFilterSystemsByAvailableDecryptors [Text] systemIdentifiers = IO (Maybe [Text]) -> m (Maybe [Text]) forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO (Maybe [Text]) -> m (Maybe [Text])) -> IO (Maybe [Text]) -> m (Maybe [Text]) forall a b. (a -> b) -> a -> b $ do Ptr CString systemIdentifiers' <- [Text] -> IO (Ptr CString) packZeroTerminatedUTF8CArray [Text] systemIdentifiers Ptr CString result <- Ptr CString -> IO (Ptr CString) gst_protection_filter_systems_by_available_decryptors Ptr CString systemIdentifiers' Maybe [Text] maybeResult <- Ptr CString -> (Ptr CString -> IO [Text]) -> IO (Maybe [Text]) forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b) convertIfNonNull Ptr CString result ((Ptr CString -> IO [Text]) -> IO (Maybe [Text])) -> (Ptr CString -> IO [Text]) -> IO (Maybe [Text]) forall a b. (a -> b) -> a -> b $ \Ptr CString result' -> do [Text] result'' <- HasCallStack => Ptr CString -> IO [Text] Ptr CString -> IO [Text] unpackZeroTerminatedUTF8CArray Ptr CString result' (CString -> IO ()) -> Ptr CString -> IO () forall a b. (Ptr a -> IO b) -> Ptr (Ptr a) -> IO () mapZeroTerminatedCArray CString -> IO () forall a. Ptr a -> IO () freeMem Ptr CString result' Ptr CString -> IO () forall a. Ptr a -> IO () freeMem Ptr CString result' [Text] -> IO [Text] forall (m :: * -> *) a. Monad m => a -> m a return [Text] result'' (CString -> IO ()) -> Ptr CString -> IO () forall a b. (Ptr a -> IO b) -> Ptr (Ptr a) -> IO () mapZeroTerminatedCArray CString -> IO () forall a. Ptr a -> IO () freeMem Ptr CString systemIdentifiers' Ptr CString -> IO () forall a. Ptr a -> IO () freeMem Ptr CString systemIdentifiers' Maybe [Text] -> IO (Maybe [Text]) forall (m :: * -> *) a. Monad m => a -> m a return Maybe [Text] maybeResult -- function parse_launchv_full -- Args: [ Arg -- { argCName = "argv" -- , argType = TCArray True (-1) (-1) (TBasicType TUTF8) -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "null-terminated array of arguments" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "context" -- , argType = -- TInterface Name { namespace = "Gst" , name = "ParseContext" } -- , direction = DirectionIn -- , mayBeNull = True -- , argDoc = -- Documentation -- { rawDocText = -- Just -- "a parse context allocated with\n gst_parse_context_new(), or %NULL" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "flags" -- , argType = -- TInterface Name { namespace = "Gst" , name = "ParseFlags" } -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "parsing options, or #GST_PARSE_FLAG_NONE" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Just (TInterface Name { namespace = "Gst" , name = "Element" }) -- throws : True -- Skip return : False foreign import ccall "gst_parse_launchv_full" gst_parse_launchv_full :: Ptr CString -> -- argv : TCArray True (-1) (-1) (TBasicType TUTF8) Ptr Gst.ParseContext.ParseContext -> -- context : TInterface (Name {namespace = "Gst", name = "ParseContext"}) CUInt -> -- flags : TInterface (Name {namespace = "Gst", name = "ParseFlags"}) Ptr (Ptr GError) -> -- error IO (Ptr Gst.Element.Element) -- | Create a new element based on command line syntax. -- /@error@/ will contain an error message if an erroneous pipeline is specified. -- An error does not mean that the pipeline could not be constructed. parseLaunchvFull :: (B.CallStack.HasCallStack, MonadIO m) => [T.Text] -- ^ /@argv@/: null-terminated array of arguments -> Maybe (Gst.ParseContext.ParseContext) -- ^ /@context@/: a parse context allocated with -- 'GI.Gst.Structs.ParseContext.parseContextNew', or 'P.Nothing' -> [Gst.Flags.ParseFlags] -- ^ /@flags@/: parsing options, or @/GST_PARSE_FLAG_NONE/@ -> m Gst.Element.Element -- ^ __Returns:__ a new element on success; on -- failure, either 'P.Nothing' or a partially-constructed bin or element will be -- returned and /@error@/ will be set (unless you passed -- @/GST_PARSE_FLAG_FATAL_ERRORS/@ in /@flags@/, then 'P.Nothing' will always be returned -- on failure) /(Can throw 'Data.GI.Base.GError.GError')/ parseLaunchvFull :: forall (m :: * -> *). (HasCallStack, MonadIO m) => [Text] -> Maybe ParseContext -> [ParseFlags] -> m Element parseLaunchvFull [Text] argv Maybe ParseContext context [ParseFlags] flags = IO Element -> m Element forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO Element -> m Element) -> IO Element -> m Element forall a b. (a -> b) -> a -> b $ do Ptr CString argv' <- [Text] -> IO (Ptr CString) packZeroTerminatedUTF8CArray [Text] argv Ptr ParseContext maybeContext <- case Maybe ParseContext context of Maybe ParseContext Nothing -> Ptr ParseContext -> IO (Ptr ParseContext) forall (m :: * -> *) a. Monad m => a -> m a return Ptr ParseContext forall a. Ptr a nullPtr Just ParseContext jContext -> do Ptr ParseContext jContext' <- ParseContext -> IO (Ptr ParseContext) forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a) unsafeManagedPtrGetPtr ParseContext jContext Ptr ParseContext -> IO (Ptr ParseContext) forall (m :: * -> *) a. Monad m => a -> m a return Ptr ParseContext jContext' let flags' :: CUInt flags' = [ParseFlags] -> CUInt forall b a. (Num b, IsGFlag a) => [a] -> b gflagsToWord [ParseFlags] flags IO Element -> IO () -> IO Element forall a b. IO a -> IO b -> IO a onException (do Ptr Element result <- (Ptr (Ptr GError) -> IO (Ptr Element)) -> IO (Ptr Element) forall a. (Ptr (Ptr GError) -> IO a) -> IO a propagateGError ((Ptr (Ptr GError) -> IO (Ptr Element)) -> IO (Ptr Element)) -> (Ptr (Ptr GError) -> IO (Ptr Element)) -> IO (Ptr Element) forall a b. (a -> b) -> a -> b $ Ptr CString -> Ptr ParseContext -> CUInt -> Ptr (Ptr GError) -> IO (Ptr Element) gst_parse_launchv_full Ptr CString argv' Ptr ParseContext maybeContext CUInt flags' Text -> Ptr Element -> IO () forall a. HasCallStack => Text -> Ptr a -> IO () checkUnexpectedReturnNULL Text "parseLaunchvFull" Ptr Element result Element result' <- ((ManagedPtr Element -> Element) -> Ptr Element -> IO Element forall a b. (HasCallStack, GObject a, GObject b) => (ManagedPtr a -> a) -> Ptr b -> IO a newObject ManagedPtr Element -> Element Gst.Element.Element) Ptr Element result Maybe ParseContext -> (ParseContext -> IO ()) -> IO () forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m () whenJust Maybe ParseContext context ParseContext -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr (CString -> IO ()) -> Ptr CString -> IO () forall a b. (Ptr a -> IO b) -> Ptr (Ptr a) -> IO () mapZeroTerminatedCArray CString -> IO () forall a. Ptr a -> IO () freeMem Ptr CString argv' Ptr CString -> IO () forall a. Ptr a -> IO () freeMem Ptr CString argv' Element -> IO Element forall (m :: * -> *) a. Monad m => a -> m a return Element result' ) (do (CString -> IO ()) -> Ptr CString -> IO () forall a b. (Ptr a -> IO b) -> Ptr (Ptr a) -> IO () mapZeroTerminatedCArray CString -> IO () forall a. Ptr a -> IO () freeMem Ptr CString argv' Ptr CString -> IO () forall a. Ptr a -> IO () freeMem Ptr CString argv' ) -- function parse_launchv -- Args: [ Arg -- { argCName = "argv" -- , argType = TCArray True (-1) (-1) (TBasicType TUTF8) -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "null-terminated array of arguments" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Just (TInterface Name { namespace = "Gst" , name = "Element" }) -- throws : True -- Skip return : False foreign import ccall "gst_parse_launchv" gst_parse_launchv :: Ptr CString -> -- argv : TCArray True (-1) (-1) (TBasicType TUTF8) Ptr (Ptr GError) -> -- error IO (Ptr Gst.Element.Element) -- | Create a new element based on command line syntax. -- /@error@/ will contain an error message if an erroneous pipeline is specified. -- An error does not mean that the pipeline could not be constructed. parseLaunchv :: (B.CallStack.HasCallStack, MonadIO m) => [T.Text] -- ^ /@argv@/: null-terminated array of arguments -> m Gst.Element.Element -- ^ __Returns:__ a new element on success and 'P.Nothing' -- on failure. /(Can throw 'Data.GI.Base.GError.GError')/ parseLaunchv :: forall (m :: * -> *). (HasCallStack, MonadIO m) => [Text] -> m Element parseLaunchv [Text] argv = IO Element -> m Element forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO Element -> m Element) -> IO Element -> m Element forall a b. (a -> b) -> a -> b $ do Ptr CString argv' <- [Text] -> IO (Ptr CString) packZeroTerminatedUTF8CArray [Text] argv IO Element -> IO () -> IO Element forall a b. IO a -> IO b -> IO a onException (do Ptr Element result <- (Ptr (Ptr GError) -> IO (Ptr Element)) -> IO (Ptr Element) forall a. (Ptr (Ptr GError) -> IO a) -> IO a propagateGError ((Ptr (Ptr GError) -> IO (Ptr Element)) -> IO (Ptr Element)) -> (Ptr (Ptr GError) -> IO (Ptr Element)) -> IO (Ptr Element) forall a b. (a -> b) -> a -> b $ Ptr CString -> Ptr (Ptr GError) -> IO (Ptr Element) gst_parse_launchv Ptr CString argv' Text -> Ptr Element -> IO () forall a. HasCallStack => Text -> Ptr a -> IO () checkUnexpectedReturnNULL Text "parseLaunchv" Ptr Element result Element result' <- ((ManagedPtr Element -> Element) -> Ptr Element -> IO Element forall a b. (HasCallStack, GObject a, GObject b) => (ManagedPtr a -> a) -> Ptr b -> IO a newObject ManagedPtr Element -> Element Gst.Element.Element) Ptr Element result (CString -> IO ()) -> Ptr CString -> IO () forall a b. (Ptr a -> IO b) -> Ptr (Ptr a) -> IO () mapZeroTerminatedCArray CString -> IO () forall a. Ptr a -> IO () freeMem Ptr CString argv' Ptr CString -> IO () forall a. Ptr a -> IO () freeMem Ptr CString argv' Element -> IO Element forall (m :: * -> *) a. Monad m => a -> m a return Element result' ) (do (CString -> IO ()) -> Ptr CString -> IO () forall a b. (Ptr a -> IO b) -> Ptr (Ptr a) -> IO () mapZeroTerminatedCArray CString -> IO () forall a. Ptr a -> IO () freeMem Ptr CString argv' Ptr CString -> IO () forall a. Ptr a -> IO () freeMem Ptr CString argv' ) -- function parse_launch_full -- Args: [ Arg -- { argCName = "pipeline_description" -- , argType = TBasicType TUTF8 -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "the command line describing the pipeline" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "context" -- , argType = -- TInterface Name { namespace = "Gst" , name = "ParseContext" } -- , direction = DirectionIn -- , mayBeNull = True -- , argDoc = -- Documentation -- { rawDocText = -- Just -- "a parse context allocated with\n gst_parse_context_new(), or %NULL" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "flags" -- , argType = -- TInterface Name { namespace = "Gst" , name = "ParseFlags" } -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "parsing options, or #GST_PARSE_FLAG_NONE" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Just (TInterface Name { namespace = "Gst" , name = "Element" }) -- throws : True -- Skip return : False foreign import ccall "gst_parse_launch_full" gst_parse_launch_full :: CString -> -- pipeline_description : TBasicType TUTF8 Ptr Gst.ParseContext.ParseContext -> -- context : TInterface (Name {namespace = "Gst", name = "ParseContext"}) CUInt -> -- flags : TInterface (Name {namespace = "Gst", name = "ParseFlags"}) Ptr (Ptr GError) -> -- error IO (Ptr Gst.Element.Element) -- | Create a new pipeline based on command line syntax. -- Please note that you might get a return value that is not 'P.Nothing' even though -- the /@error@/ is set. In this case there was a recoverable parsing error and you -- can try to play the pipeline. -- -- To create a sub-pipeline (bin) for embedding into an existing pipeline -- use 'GI.Gst.Functions.parseBinFromDescriptionFull'. parseLaunchFull :: (B.CallStack.HasCallStack, MonadIO m) => T.Text -- ^ /@pipelineDescription@/: the command line describing the pipeline -> Maybe (Gst.ParseContext.ParseContext) -- ^ /@context@/: a parse context allocated with -- 'GI.Gst.Structs.ParseContext.parseContextNew', or 'P.Nothing' -> [Gst.Flags.ParseFlags] -- ^ /@flags@/: parsing options, or @/GST_PARSE_FLAG_NONE/@ -> m Gst.Element.Element -- ^ __Returns:__ a new element on success, 'P.Nothing' on -- failure. If more than one toplevel element is specified by the -- /@pipelineDescription@/, all elements are put into a t'GI.Gst.Objects.Pipeline.Pipeline', which -- then is returned (unless the GST_PARSE_FLAG_PLACE_IN_BIN flag is set, in -- which case they are put in a t'GI.Gst.Objects.Bin.Bin' instead). /(Can throw 'Data.GI.Base.GError.GError')/ parseLaunchFull :: forall (m :: * -> *). (HasCallStack, MonadIO m) => Text -> Maybe ParseContext -> [ParseFlags] -> m Element parseLaunchFull Text pipelineDescription Maybe ParseContext context [ParseFlags] flags = IO Element -> m Element forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO Element -> m Element) -> IO Element -> m Element forall a b. (a -> b) -> a -> b $ do CString pipelineDescription' <- Text -> IO CString textToCString Text pipelineDescription Ptr ParseContext maybeContext <- case Maybe ParseContext context of Maybe ParseContext Nothing -> Ptr ParseContext -> IO (Ptr ParseContext) forall (m :: * -> *) a. Monad m => a -> m a return Ptr ParseContext forall a. Ptr a nullPtr Just ParseContext jContext -> do Ptr ParseContext jContext' <- ParseContext -> IO (Ptr ParseContext) forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a) unsafeManagedPtrGetPtr ParseContext jContext Ptr ParseContext -> IO (Ptr ParseContext) forall (m :: * -> *) a. Monad m => a -> m a return Ptr ParseContext jContext' let flags' :: CUInt flags' = [ParseFlags] -> CUInt forall b a. (Num b, IsGFlag a) => [a] -> b gflagsToWord [ParseFlags] flags IO Element -> IO () -> IO Element forall a b. IO a -> IO b -> IO a onException (do Ptr Element result <- (Ptr (Ptr GError) -> IO (Ptr Element)) -> IO (Ptr Element) forall a. (Ptr (Ptr GError) -> IO a) -> IO a propagateGError ((Ptr (Ptr GError) -> IO (Ptr Element)) -> IO (Ptr Element)) -> (Ptr (Ptr GError) -> IO (Ptr Element)) -> IO (Ptr Element) forall a b. (a -> b) -> a -> b $ CString -> Ptr ParseContext -> CUInt -> Ptr (Ptr GError) -> IO (Ptr Element) gst_parse_launch_full CString pipelineDescription' Ptr ParseContext maybeContext CUInt flags' Text -> Ptr Element -> IO () forall a. HasCallStack => Text -> Ptr a -> IO () checkUnexpectedReturnNULL Text "parseLaunchFull" Ptr Element result Element result' <- ((ManagedPtr Element -> Element) -> Ptr Element -> IO Element forall a b. (HasCallStack, GObject a, GObject b) => (ManagedPtr a -> a) -> Ptr b -> IO a newObject ManagedPtr Element -> Element Gst.Element.Element) Ptr Element result Maybe ParseContext -> (ParseContext -> IO ()) -> IO () forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m () whenJust Maybe ParseContext context ParseContext -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr CString -> IO () forall a. Ptr a -> IO () freeMem CString pipelineDescription' Element -> IO Element forall (m :: * -> *) a. Monad m => a -> m a return Element result' ) (do CString -> IO () forall a. Ptr a -> IO () freeMem CString pipelineDescription' ) -- function parse_launch -- Args: [ Arg -- { argCName = "pipeline_description" -- , argType = TBasicType TUTF8 -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "the command line describing the pipeline" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Just (TInterface Name { namespace = "Gst" , name = "Element" }) -- throws : True -- Skip return : False foreign import ccall "gst_parse_launch" gst_parse_launch :: CString -> -- pipeline_description : TBasicType TUTF8 Ptr (Ptr GError) -> -- error IO (Ptr Gst.Element.Element) -- | Create a new pipeline based on command line syntax. -- Please note that you might get a return value that is not 'P.Nothing' even though -- the /@error@/ is set. In this case there was a recoverable parsing error and you -- can try to play the pipeline. -- -- To create a sub-pipeline (bin) for embedding into an existing pipeline -- use 'GI.Gst.Functions.parseBinFromDescription'. parseLaunch :: (B.CallStack.HasCallStack, MonadIO m) => T.Text -- ^ /@pipelineDescription@/: the command line describing the pipeline -> m Gst.Element.Element -- ^ __Returns:__ a new element on success, 'P.Nothing' on -- failure. If more than one toplevel element is specified by the -- /@pipelineDescription@/, all elements are put into a t'GI.Gst.Objects.Pipeline.Pipeline', which -- than is returned. /(Can throw 'Data.GI.Base.GError.GError')/ parseLaunch :: forall (m :: * -> *). (HasCallStack, MonadIO m) => Text -> m Element parseLaunch Text pipelineDescription = IO Element -> m Element forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO Element -> m Element) -> IO Element -> m Element forall a b. (a -> b) -> a -> b $ do CString pipelineDescription' <- Text -> IO CString textToCString Text pipelineDescription IO Element -> IO () -> IO Element forall a b. IO a -> IO b -> IO a onException (do Ptr Element result <- (Ptr (Ptr GError) -> IO (Ptr Element)) -> IO (Ptr Element) forall a. (Ptr (Ptr GError) -> IO a) -> IO a propagateGError ((Ptr (Ptr GError) -> IO (Ptr Element)) -> IO (Ptr Element)) -> (Ptr (Ptr GError) -> IO (Ptr Element)) -> IO (Ptr Element) forall a b. (a -> b) -> a -> b $ CString -> Ptr (Ptr GError) -> IO (Ptr Element) gst_parse_launch CString pipelineDescription' Text -> Ptr Element -> IO () forall a. HasCallStack => Text -> Ptr a -> IO () checkUnexpectedReturnNULL Text "parseLaunch" Ptr Element result Element result' <- ((ManagedPtr Element -> Element) -> Ptr Element -> IO Element forall a b. (HasCallStack, GObject a, GObject b) => (ManagedPtr a -> a) -> Ptr b -> IO a newObject ManagedPtr Element -> Element Gst.Element.Element) Ptr Element result CString -> IO () forall a. Ptr a -> IO () freeMem CString pipelineDescription' Element -> IO Element forall (m :: * -> *) a. Monad m => a -> m a return Element result' ) (do CString -> IO () forall a. Ptr a -> IO () freeMem CString pipelineDescription' ) -- function parse_bin_from_description_full -- Args: [ Arg -- { argCName = "bin_description" -- , argType = TBasicType TUTF8 -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "command line describing the bin" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "ghost_unlinked_pads" -- , argType = TBasicType TBoolean -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = -- Just -- "whether to automatically create ghost pads\n for unlinked source or sink pads within the bin" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "context" -- , argType = -- TInterface Name { namespace = "Gst" , name = "ParseContext" } -- , direction = DirectionIn -- , mayBeNull = True -- , argDoc = -- Documentation -- { rawDocText = -- Just -- "a parse context allocated with\n gst_parse_context_new(), or %NULL" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "flags" -- , argType = -- TInterface Name { namespace = "Gst" , name = "ParseFlags" } -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "parsing options, or #GST_PARSE_FLAG_NONE" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Just (TInterface Name { namespace = "Gst" , name = "Element" }) -- throws : True -- Skip return : False foreign import ccall "gst_parse_bin_from_description_full" gst_parse_bin_from_description_full :: CString -> -- bin_description : TBasicType TUTF8 CInt -> -- ghost_unlinked_pads : TBasicType TBoolean Ptr Gst.ParseContext.ParseContext -> -- context : TInterface (Name {namespace = "Gst", name = "ParseContext"}) CUInt -> -- flags : TInterface (Name {namespace = "Gst", name = "ParseFlags"}) Ptr (Ptr GError) -> -- error IO (Ptr Gst.Element.Element) -- | This is a convenience wrapper around 'GI.Gst.Functions.parseLaunch' to create a -- t'GI.Gst.Objects.Bin.Bin' from a gst-launch-style pipeline description. See -- 'GI.Gst.Functions.parseLaunch' and the gst-launch man page for details about the -- syntax. Ghost pads on the bin for unlinked source or sink pads -- within the bin can automatically be created (but only a maximum of -- one ghost pad for each direction will be created; if you expect -- multiple unlinked source pads or multiple unlinked sink pads -- and want them all ghosted, you will have to create the ghost pads -- yourself). parseBinFromDescriptionFull :: (B.CallStack.HasCallStack, MonadIO m) => T.Text -- ^ /@binDescription@/: command line describing the bin -> Bool -- ^ /@ghostUnlinkedPads@/: whether to automatically create ghost pads -- for unlinked source or sink pads within the bin -> Maybe (Gst.ParseContext.ParseContext) -- ^ /@context@/: a parse context allocated with -- 'GI.Gst.Structs.ParseContext.parseContextNew', or 'P.Nothing' -> [Gst.Flags.ParseFlags] -- ^ /@flags@/: parsing options, or @/GST_PARSE_FLAG_NONE/@ -> m Gst.Element.Element -- ^ __Returns:__ a newly-created -- element, which is guaranteed to be a bin unless -- @/GST_PARSE_FLAG_NO_SINGLE_ELEMENT_BINS/@ was passed, or 'P.Nothing' if an error -- occurred. /(Can throw 'Data.GI.Base.GError.GError')/ parseBinFromDescriptionFull :: forall (m :: * -> *). (HasCallStack, MonadIO m) => Text -> Bool -> Maybe ParseContext -> [ParseFlags] -> m Element parseBinFromDescriptionFull Text binDescription Bool ghostUnlinkedPads Maybe ParseContext context [ParseFlags] flags = IO Element -> m Element forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO Element -> m Element) -> IO Element -> m Element forall a b. (a -> b) -> a -> b $ do CString binDescription' <- Text -> IO CString textToCString Text binDescription let ghostUnlinkedPads' :: CInt ghostUnlinkedPads' = (Int -> CInt forall a b. (Integral a, Num b) => a -> b fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt forall b c a. (b -> c) -> (a -> b) -> a -> c . Bool -> Int forall a. Enum a => a -> Int fromEnum) Bool ghostUnlinkedPads Ptr ParseContext maybeContext <- case Maybe ParseContext context of Maybe ParseContext Nothing -> Ptr ParseContext -> IO (Ptr ParseContext) forall (m :: * -> *) a. Monad m => a -> m a return Ptr ParseContext forall a. Ptr a nullPtr Just ParseContext jContext -> do Ptr ParseContext jContext' <- ParseContext -> IO (Ptr ParseContext) forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a) unsafeManagedPtrGetPtr ParseContext jContext Ptr ParseContext -> IO (Ptr ParseContext) forall (m :: * -> *) a. Monad m => a -> m a return Ptr ParseContext jContext' let flags' :: CUInt flags' = [ParseFlags] -> CUInt forall b a. (Num b, IsGFlag a) => [a] -> b gflagsToWord [ParseFlags] flags IO Element -> IO () -> IO Element forall a b. IO a -> IO b -> IO a onException (do Ptr Element result <- (Ptr (Ptr GError) -> IO (Ptr Element)) -> IO (Ptr Element) forall a. (Ptr (Ptr GError) -> IO a) -> IO a propagateGError ((Ptr (Ptr GError) -> IO (Ptr Element)) -> IO (Ptr Element)) -> (Ptr (Ptr GError) -> IO (Ptr Element)) -> IO (Ptr Element) forall a b. (a -> b) -> a -> b $ CString -> CInt -> Ptr ParseContext -> CUInt -> Ptr (Ptr GError) -> IO (Ptr Element) gst_parse_bin_from_description_full CString binDescription' CInt ghostUnlinkedPads' Ptr ParseContext maybeContext CUInt flags' Text -> Ptr Element -> IO () forall a. HasCallStack => Text -> Ptr a -> IO () checkUnexpectedReturnNULL Text "parseBinFromDescriptionFull" Ptr Element result Element result' <- ((ManagedPtr Element -> Element) -> Ptr Element -> IO Element forall a b. (HasCallStack, GObject a, GObject b) => (ManagedPtr a -> a) -> Ptr b -> IO a newObject ManagedPtr Element -> Element Gst.Element.Element) Ptr Element result Maybe ParseContext -> (ParseContext -> IO ()) -> IO () forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m () whenJust Maybe ParseContext context ParseContext -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr CString -> IO () forall a. Ptr a -> IO () freeMem CString binDescription' Element -> IO Element forall (m :: * -> *) a. Monad m => a -> m a return Element result' ) (do CString -> IO () forall a. Ptr a -> IO () freeMem CString binDescription' ) -- function parse_bin_from_description -- Args: [ Arg -- { argCName = "bin_description" -- , argType = TBasicType TUTF8 -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "command line describing the bin" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "ghost_unlinked_pads" -- , argType = TBasicType TBoolean -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = -- Just -- "whether to automatically create ghost pads\n for unlinked source or sink pads within the bin" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Just (TInterface Name { namespace = "Gst" , name = "Bin" }) -- throws : True -- Skip return : False foreign import ccall "gst_parse_bin_from_description" gst_parse_bin_from_description :: CString -> -- bin_description : TBasicType TUTF8 CInt -> -- ghost_unlinked_pads : TBasicType TBoolean Ptr (Ptr GError) -> -- error IO (Ptr Gst.Bin.Bin) -- | This is a convenience wrapper around 'GI.Gst.Functions.parseLaunch' to create a -- t'GI.Gst.Objects.Bin.Bin' from a gst-launch-style pipeline description. See -- 'GI.Gst.Functions.parseLaunch' and the gst-launch man page for details about the -- syntax. Ghost pads on the bin for unlinked source or sink pads -- within the bin can automatically be created (but only a maximum of -- one ghost pad for each direction will be created; if you expect -- multiple unlinked source pads or multiple unlinked sink pads -- and want them all ghosted, you will have to create the ghost pads -- yourself). parseBinFromDescription :: (B.CallStack.HasCallStack, MonadIO m) => T.Text -- ^ /@binDescription@/: command line describing the bin -> Bool -- ^ /@ghostUnlinkedPads@/: whether to automatically create ghost pads -- for unlinked source or sink pads within the bin -> m (Maybe Gst.Bin.Bin) -- ^ __Returns:__ a -- newly-created bin, or 'P.Nothing' if an error occurred. /(Can throw 'Data.GI.Base.GError.GError')/ parseBinFromDescription :: forall (m :: * -> *). (HasCallStack, MonadIO m) => Text -> Bool -> m (Maybe Bin) parseBinFromDescription Text binDescription Bool ghostUnlinkedPads = IO (Maybe Bin) -> m (Maybe Bin) forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO (Maybe Bin) -> m (Maybe Bin)) -> IO (Maybe Bin) -> m (Maybe Bin) forall a b. (a -> b) -> a -> b $ do CString binDescription' <- Text -> IO CString textToCString Text binDescription let ghostUnlinkedPads' :: CInt ghostUnlinkedPads' = (Int -> CInt forall a b. (Integral a, Num b) => a -> b fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt forall b c a. (b -> c) -> (a -> b) -> a -> c . Bool -> Int forall a. Enum a => a -> Int fromEnum) Bool ghostUnlinkedPads IO (Maybe Bin) -> IO () -> IO (Maybe Bin) forall a b. IO a -> IO b -> IO a onException (do Ptr Bin result <- (Ptr (Ptr GError) -> IO (Ptr Bin)) -> IO (Ptr Bin) forall a. (Ptr (Ptr GError) -> IO a) -> IO a propagateGError ((Ptr (Ptr GError) -> IO (Ptr Bin)) -> IO (Ptr Bin)) -> (Ptr (Ptr GError) -> IO (Ptr Bin)) -> IO (Ptr Bin) forall a b. (a -> b) -> a -> b $ CString -> CInt -> Ptr (Ptr GError) -> IO (Ptr Bin) gst_parse_bin_from_description CString binDescription' CInt ghostUnlinkedPads' Maybe Bin maybeResult <- Ptr Bin -> (Ptr Bin -> IO Bin) -> IO (Maybe Bin) forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b) convertIfNonNull Ptr Bin result ((Ptr Bin -> IO Bin) -> IO (Maybe Bin)) -> (Ptr Bin -> IO Bin) -> IO (Maybe Bin) forall a b. (a -> b) -> a -> b $ \Ptr Bin result' -> do Bin result'' <- ((ManagedPtr Bin -> Bin) -> Ptr Bin -> IO Bin forall a b. (HasCallStack, GObject a, GObject b) => (ManagedPtr a -> a) -> Ptr b -> IO a newObject ManagedPtr Bin -> Bin Gst.Bin.Bin) Ptr Bin result' Bin -> IO Bin forall (m :: * -> *) a. Monad m => a -> m a return Bin result'' CString -> IO () forall a. Ptr a -> IO () freeMem CString binDescription' Maybe Bin -> IO (Maybe Bin) forall (m :: * -> *) a. Monad m => a -> m a return Maybe Bin maybeResult ) (do CString -> IO () forall a. Ptr a -> IO () freeMem CString binDescription' ) -- function parent_buffer_meta_api_get_type -- Args: [] -- Lengths: [] -- returnType: Just (TBasicType TGType) -- throws : False -- Skip return : False foreign import ccall "gst_parent_buffer_meta_api_get_type" gst_parent_buffer_meta_api_get_type :: IO CGType -- | /No description available in the introspection data./ parentBufferMetaApiGetType :: (B.CallStack.HasCallStack, MonadIO m) => m GType parentBufferMetaApiGetType :: forall (m :: * -> *). (HasCallStack, MonadIO m) => m GType parentBufferMetaApiGetType = IO GType -> m GType forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO GType -> m GType) -> IO GType -> m GType forall a b. (a -> b) -> a -> b $ do Word64 result <- IO Word64 gst_parent_buffer_meta_api_get_type let result' :: GType result' = Word64 -> GType GType Word64 result GType -> IO GType forall (m :: * -> *) a. Monad m => a -> m a return GType result' -- function param_spec_fraction -- Args: [ Arg -- { argCName = "name" -- , argType = TBasicType TUTF8 -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "canonical name of the property specified" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "nick" -- , argType = TBasicType TUTF8 -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "nick name for the property specified" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "blurb" -- , argType = TBasicType TUTF8 -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "description of the property specified" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "min_num" -- , argType = TBasicType TInt -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "minimum value (fraction numerator)" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "min_denom" -- , argType = TBasicType TInt -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "minimum value (fraction denominator)" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "max_num" -- , argType = TBasicType TInt -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "maximum value (fraction numerator)" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "max_denom" -- , argType = TBasicType TInt -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "maximum value (fraction denominator)" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "default_num" -- , argType = TBasicType TInt -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "default value (fraction numerator)" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "default_denom" -- , argType = TBasicType TInt -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "default value (fraction denominator)" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "flags" -- , argType = -- TInterface Name { namespace = "GObject" , name = "ParamFlags" } -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "flags for the property specified" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Just TParamSpec -- throws : False -- Skip return : False foreign import ccall "gst_param_spec_fraction" gst_param_spec_fraction :: CString -> -- name : TBasicType TUTF8 CString -> -- nick : TBasicType TUTF8 CString -> -- blurb : TBasicType TUTF8 Int32 -> -- min_num : TBasicType TInt Int32 -> -- min_denom : TBasicType TInt Int32 -> -- max_num : TBasicType TInt Int32 -> -- max_denom : TBasicType TInt Int32 -> -- default_num : TBasicType TInt Int32 -> -- default_denom : TBasicType TInt CUInt -> -- flags : TInterface (Name {namespace = "GObject", name = "ParamFlags"}) IO (Ptr GParamSpec) -- | This function creates a fraction GParamSpec for use by objects\/elements -- that want to expose properties of fraction type. This function is typically -- used in connection with 'GI.GObject.Structs.ObjectClass.objectClassInstallProperty' in a GObjects\'s -- instance_init function. paramSpecFraction :: (B.CallStack.HasCallStack, MonadIO m) => T.Text -- ^ /@name@/: canonical name of the property specified -> T.Text -- ^ /@nick@/: nick name for the property specified -> T.Text -- ^ /@blurb@/: description of the property specified -> Int32 -- ^ /@minNum@/: minimum value (fraction numerator) -> Int32 -- ^ /@minDenom@/: minimum value (fraction denominator) -> Int32 -- ^ /@maxNum@/: maximum value (fraction numerator) -> Int32 -- ^ /@maxDenom@/: maximum value (fraction denominator) -> Int32 -- ^ /@defaultNum@/: default value (fraction numerator) -> Int32 -- ^ /@defaultDenom@/: default value (fraction denominator) -> [GObject.Flags.ParamFlags] -- ^ /@flags@/: flags for the property specified -> m (Maybe GParamSpec) -- ^ __Returns:__ a newly created parameter specification paramSpecFraction :: forall (m :: * -> *). (HasCallStack, MonadIO m) => Text -> Text -> Text -> Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> [ParamFlags] -> m (Maybe GParamSpec) paramSpecFraction Text name Text nick Text blurb Int32 minNum Int32 minDenom Int32 maxNum Int32 maxDenom Int32 defaultNum Int32 defaultDenom [ParamFlags] flags = IO (Maybe GParamSpec) -> m (Maybe GParamSpec) forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO (Maybe GParamSpec) -> m (Maybe GParamSpec)) -> IO (Maybe GParamSpec) -> m (Maybe GParamSpec) forall a b. (a -> b) -> a -> b $ do CString name' <- Text -> IO CString textToCString Text name CString nick' <- Text -> IO CString textToCString Text nick CString blurb' <- Text -> IO CString textToCString Text blurb let flags' :: CUInt flags' = [ParamFlags] -> CUInt forall b a. (Num b, IsGFlag a) => [a] -> b gflagsToWord [ParamFlags] flags Ptr GParamSpec result <- CString -> CString -> CString -> Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> Int32 -> CUInt -> IO (Ptr GParamSpec) gst_param_spec_fraction CString name' CString nick' CString blurb' Int32 minNum Int32 minDenom Int32 maxNum Int32 maxDenom Int32 defaultNum Int32 defaultDenom CUInt flags' Maybe GParamSpec maybeResult <- Ptr GParamSpec -> (Ptr GParamSpec -> IO GParamSpec) -> IO (Maybe GParamSpec) forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b) convertIfNonNull Ptr GParamSpec result ((Ptr GParamSpec -> IO GParamSpec) -> IO (Maybe GParamSpec)) -> (Ptr GParamSpec -> IO GParamSpec) -> IO (Maybe GParamSpec) forall a b. (a -> b) -> a -> b $ \Ptr GParamSpec result' -> do GParamSpec result'' <- Ptr GParamSpec -> IO GParamSpec B.GParamSpec.wrapGParamSpecPtr Ptr GParamSpec result' GParamSpec -> IO GParamSpec forall (m :: * -> *) a. Monad m => a -> m a return GParamSpec result'' CString -> IO () forall a. Ptr a -> IO () freeMem CString name' CString -> IO () forall a. Ptr a -> IO () freeMem CString nick' CString -> IO () forall a. Ptr a -> IO () freeMem CString blurb' Maybe GParamSpec -> IO (Maybe GParamSpec) forall (m :: * -> *) a. Monad m => a -> m a return Maybe GParamSpec maybeResult -- function param_spec_array -- Args: [ Arg -- { argCName = "name" -- , argType = TBasicType TUTF8 -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "canonical name of the property specified" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "nick" -- , argType = TBasicType TUTF8 -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "nick name for the property specified" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "blurb" -- , argType = TBasicType TUTF8 -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "description of the property specified" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "element_spec" -- , argType = TParamSpec -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "GParamSpec of the array" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "flags" -- , argType = -- TInterface Name { namespace = "GObject" , name = "ParamFlags" } -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "flags for the property specified" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Just TParamSpec -- throws : False -- Skip return : False foreign import ccall "gst_param_spec_array" gst_param_spec_array :: CString -> -- name : TBasicType TUTF8 CString -> -- nick : TBasicType TUTF8 CString -> -- blurb : TBasicType TUTF8 Ptr GParamSpec -> -- element_spec : TParamSpec CUInt -> -- flags : TInterface (Name {namespace = "GObject", name = "ParamFlags"}) IO (Ptr GParamSpec) -- | This function creates a GstArray GParamSpec for use by objects\/elements -- that want to expose properties of GstArray type. This function is -- typically * used in connection with 'GI.GObject.Structs.ObjectClass.objectClassInstallProperty' in a -- GObjects\'s instance_init function. -- -- /Since: 1.14/ paramSpecArray :: (B.CallStack.HasCallStack, MonadIO m) => T.Text -- ^ /@name@/: canonical name of the property specified -> T.Text -- ^ /@nick@/: nick name for the property specified -> T.Text -- ^ /@blurb@/: description of the property specified -> GParamSpec -- ^ /@elementSpec@/: GParamSpec of the array -> [GObject.Flags.ParamFlags] -- ^ /@flags@/: flags for the property specified -> m GParamSpec -- ^ __Returns:__ a newly created parameter specification paramSpecArray :: forall (m :: * -> *). (HasCallStack, MonadIO m) => Text -> Text -> Text -> GParamSpec -> [ParamFlags] -> m GParamSpec paramSpecArray Text name Text nick Text blurb GParamSpec elementSpec [ParamFlags] flags = IO GParamSpec -> m GParamSpec forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO GParamSpec -> m GParamSpec) -> IO GParamSpec -> m GParamSpec forall a b. (a -> b) -> a -> b $ do CString name' <- Text -> IO CString textToCString Text name CString nick' <- Text -> IO CString textToCString Text nick CString blurb' <- Text -> IO CString textToCString Text blurb Ptr GParamSpec elementSpec' <- GParamSpec -> IO (Ptr GParamSpec) forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a) unsafeManagedPtrGetPtr GParamSpec elementSpec let flags' :: CUInt flags' = [ParamFlags] -> CUInt forall b a. (Num b, IsGFlag a) => [a] -> b gflagsToWord [ParamFlags] flags Ptr GParamSpec result <- CString -> CString -> CString -> Ptr GParamSpec -> CUInt -> IO (Ptr GParamSpec) gst_param_spec_array CString name' CString nick' CString blurb' Ptr GParamSpec elementSpec' CUInt flags' Text -> Ptr GParamSpec -> IO () forall a. HasCallStack => Text -> Ptr a -> IO () checkUnexpectedReturnNULL Text "paramSpecArray" Ptr GParamSpec result GParamSpec result' <- Ptr GParamSpec -> IO GParamSpec B.GParamSpec.wrapGParamSpecPtr Ptr GParamSpec result GParamSpec -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr GParamSpec elementSpec CString -> IO () forall a. Ptr a -> IO () freeMem CString name' CString -> IO () forall a. Ptr a -> IO () freeMem CString nick' CString -> IO () forall a. Ptr a -> IO () freeMem CString blurb' GParamSpec -> IO GParamSpec forall (m :: * -> *) a. Monad m => a -> m a return GParamSpec result' -- function is_initialized -- Args: [] -- Lengths: [] -- returnType: Just (TBasicType TBoolean) -- throws : False -- Skip return : False foreign import ccall "gst_is_initialized" gst_is_initialized :: IO CInt -- | Use this function to check if GStreamer has been initialized with 'GI.Gst.Functions.init' -- or 'GI.Gst.Functions.initCheck'. isInitialized :: (B.CallStack.HasCallStack, MonadIO m) => m Bool -- ^ __Returns:__ 'P.True' if initialization has been done, 'P.False' otherwise. isInitialized :: forall (m :: * -> *). (HasCallStack, MonadIO m) => m Bool isInitialized = IO Bool -> m Bool forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool forall a b. (a -> b) -> a -> b $ do CInt result <- IO CInt gst_is_initialized let result' :: Bool result' = (CInt -> CInt -> Bool forall a. Eq a => a -> a -> Bool /= CInt 0) CInt result Bool -> IO Bool forall (m :: * -> *) a. Monad m => a -> m a return Bool result' -- function is_caps_features -- Args: [ Arg -- { argCName = "obj" -- , argType = TBasicType TPtr -- , direction = DirectionIn -- , mayBeNull = True -- , argDoc = -- Documentation { rawDocText = Nothing , sinceVersion = Nothing } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Just (TBasicType TBoolean) -- throws : False -- Skip return : False foreign import ccall "gst_is_caps_features" gst_is_caps_features :: Ptr () -> -- obj : TBasicType TPtr IO CInt -- | Checks if /@obj@/ is a t'GI.Gst.Structs.CapsFeatures.CapsFeatures' isCapsFeatures :: (B.CallStack.HasCallStack, MonadIO m) => Ptr () -> m Bool -- ^ __Returns:__ 'P.True' if /@obj@/ is a t'GI.Gst.Structs.CapsFeatures.CapsFeatures' 'P.False' otherwise isCapsFeatures :: forall (m :: * -> *). (HasCallStack, MonadIO m) => Ptr () -> m Bool isCapsFeatures Ptr () obj = IO Bool -> m Bool forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool forall a b. (a -> b) -> a -> b $ do CInt result <- Ptr () -> IO CInt gst_is_caps_features Ptr () obj let result' :: Bool result' = (CInt -> CInt -> Bool forall a. Eq a => a -> a -> Bool /= CInt 0) CInt result Bool -> IO Bool forall (m :: * -> *) a. Monad m => a -> m a return Bool result' -- function init_check -- Args: [ Arg -- { argCName = "argc" -- , argType = TBasicType TInt -- , direction = DirectionInout -- , mayBeNull = True -- , argDoc = -- Documentation -- { rawDocText = Just "pointer to application's argc" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferEverything -- } -- , Arg -- { argCName = "argv" -- , argType = TCArray False (-1) 0 (TBasicType TUTF8) -- , direction = DirectionInout -- , mayBeNull = True -- , argDoc = -- Documentation -- { rawDocText = Just "pointer to application's argv" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferEverything -- } -- ] -- Lengths: [ Arg -- { argCName = "argc" -- , argType = TBasicType TInt -- , direction = DirectionInout -- , mayBeNull = True -- , argDoc = -- Documentation -- { rawDocText = Just "pointer to application's argc" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferEverything -- } -- ] -- returnType: Just (TBasicType TBoolean) -- throws : True -- Skip return : False foreign import ccall "gst_init_check" gst_init_check :: Ptr Int32 -> -- argc : TBasicType TInt Ptr (Ptr CString) -> -- argv : TCArray False (-1) 0 (TBasicType TUTF8) Ptr (Ptr GError) -> -- error IO CInt -- | Initializes the GStreamer library, setting up internal path lists, -- registering built-in elements, and loading standard plugins. -- -- This function will return 'P.False' if GStreamer could not be initialized -- for some reason. If you want your program to fail fatally, -- use 'GI.Gst.Functions.init' instead. initCheck :: (B.CallStack.HasCallStack, MonadIO m) => Maybe ([T.Text]) -- ^ /@argv@/: pointer to application\'s argv -> m ((Maybe [T.Text])) -- ^ /(Can throw 'Data.GI.Base.GError.GError')/ initCheck :: forall (m :: * -> *). (HasCallStack, MonadIO m) => Maybe [Text] -> m (Maybe [Text]) initCheck Maybe [Text] argv = IO (Maybe [Text]) -> m (Maybe [Text]) forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO (Maybe [Text]) -> m (Maybe [Text])) -> IO (Maybe [Text]) -> m (Maybe [Text]) forall a b. (a -> b) -> a -> b $ do let argc :: Int32 argc = case Maybe [Text] argv of Maybe [Text] Nothing -> Int32 0 Just [Text] jArgv -> Int -> Int32 forall a b. (Integral a, Num b) => a -> b fromIntegral (Int -> Int32) -> Int -> Int32 forall a b. (a -> b) -> a -> b $ [Text] -> Int forall (t :: * -> *) a. Foldable t => t a -> Int P.length [Text] jArgv Ptr Int32 argc' <- IO (Ptr Int32) forall a. Storable a => IO (Ptr a) allocMem :: IO (Ptr Int32) Ptr Int32 -> Int32 -> IO () forall a. Storable a => Ptr a -> a -> IO () poke Ptr Int32 argc' Int32 argc Ptr CString maybeArgv <- case Maybe [Text] argv of Maybe [Text] Nothing -> Ptr CString -> IO (Ptr CString) forall (m :: * -> *) a. Monad m => a -> m a return Ptr CString forall a. Ptr a nullPtr Just [Text] jArgv -> do Ptr CString jArgv' <- [Text] -> IO (Ptr CString) packUTF8CArray [Text] jArgv Ptr CString -> IO (Ptr CString) forall (m :: * -> *) a. Monad m => a -> m a return Ptr CString jArgv' Ptr (Ptr CString) maybeArgv' <- IO (Ptr (Ptr CString)) forall a. Storable a => IO (Ptr a) allocMem :: IO (Ptr (Ptr CString)) Ptr (Ptr CString) -> Ptr CString -> IO () forall a. Storable a => Ptr a -> a -> IO () poke Ptr (Ptr CString) maybeArgv' Ptr CString maybeArgv IO (Maybe [Text]) -> IO () -> IO (Maybe [Text]) forall a b. IO a -> IO b -> IO a onException (do CInt _ <- (Ptr (Ptr GError) -> IO CInt) -> IO CInt forall a. (Ptr (Ptr GError) -> IO a) -> IO a propagateGError ((Ptr (Ptr GError) -> IO CInt) -> IO CInt) -> (Ptr (Ptr GError) -> IO CInt) -> IO CInt forall a b. (a -> b) -> a -> b $ Ptr Int32 -> Ptr (Ptr CString) -> Ptr (Ptr GError) -> IO CInt gst_init_check Ptr Int32 argc' Ptr (Ptr CString) maybeArgv' Int32 argc'' <- Ptr Int32 -> IO Int32 forall a. Storable a => Ptr a -> IO a peek Ptr Int32 argc' Ptr CString maybeArgv'' <- Ptr (Ptr CString) -> IO (Ptr CString) forall a. Storable a => Ptr a -> IO a peek Ptr (Ptr CString) maybeArgv' Maybe [Text] maybeMaybeArgv'' <- Ptr CString -> (Ptr CString -> IO [Text]) -> IO (Maybe [Text]) forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b) convertIfNonNull Ptr CString maybeArgv'' ((Ptr CString -> IO [Text]) -> IO (Maybe [Text])) -> (Ptr CString -> IO [Text]) -> IO (Maybe [Text]) forall a b. (a -> b) -> a -> b $ \Ptr CString maybeArgv''' -> do [Text] maybeArgv'''' <- (Int32 -> Ptr CString -> IO [Text] forall a. (HasCallStack, Integral a) => a -> Ptr CString -> IO [Text] unpackUTF8CArrayWithLength Int32 argc'') Ptr CString maybeArgv''' (Int32 -> (CString -> IO ()) -> Ptr CString -> IO () forall a b c. (Storable a, Integral b) => b -> (a -> IO c) -> Ptr a -> IO () mapCArrayWithLength Int32 argc'') CString -> IO () forall a. Ptr a -> IO () freeMem Ptr CString maybeArgv''' Ptr CString -> IO () forall a. Ptr a -> IO () freeMem Ptr CString maybeArgv''' [Text] -> IO [Text] forall (m :: * -> *) a. Monad m => a -> m a return [Text] maybeArgv'''' Ptr Int32 -> IO () forall a. Ptr a -> IO () freeMem Ptr Int32 argc' Ptr (Ptr CString) -> IO () forall a. Ptr a -> IO () freeMem Ptr (Ptr CString) maybeArgv' Maybe [Text] -> IO (Maybe [Text]) forall (m :: * -> *) a. Monad m => a -> m a return Maybe [Text] maybeMaybeArgv'' ) (do Ptr Int32 -> IO () forall a. Ptr a -> IO () freeMem Ptr Int32 argc' Ptr (Ptr CString) -> IO () forall a. Ptr a -> IO () freeMem Ptr (Ptr CString) maybeArgv' ) -- function init -- Args: [ Arg -- { argCName = "argc" -- , argType = TBasicType TInt -- , direction = DirectionInout -- , mayBeNull = True -- , argDoc = -- Documentation -- { rawDocText = Just "pointer to application's argc" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferEverything -- } -- , Arg -- { argCName = "argv" -- , argType = TCArray False (-1) 0 (TBasicType TUTF8) -- , direction = DirectionInout -- , mayBeNull = True -- , argDoc = -- Documentation -- { rawDocText = Just "pointer to application's argv" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferEverything -- } -- ] -- Lengths: [ Arg -- { argCName = "argc" -- , argType = TBasicType TInt -- , direction = DirectionInout -- , mayBeNull = True -- , argDoc = -- Documentation -- { rawDocText = Just "pointer to application's argc" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferEverything -- } -- ] -- returnType: Nothing -- throws : False -- Skip return : False foreign import ccall "gst_init" gst_init :: Ptr Int32 -> -- argc : TBasicType TInt Ptr (Ptr CString) -> -- argv : TCArray False (-1) 0 (TBasicType TUTF8) IO () -- | Initializes the GStreamer library, setting up internal path lists, -- registering built-in elements, and loading standard plugins. -- -- Unless the plugin registry is disabled at compile time, the registry will be -- loaded. By default this will also check if the registry cache needs to be -- updated and rescan all plugins if needed. See 'GI.Gst.Functions.updateRegistry' for -- details and section -- \<link linkend=\"gst-running\">Running GStreamer Applications\<\/link> -- for how to disable automatic registry updates. -- -- > This function will terminate your program if it was unable to initialize -- > GStreamer for some reason. If you want your program to fall back, -- > use 'GI.Gst.Functions.initCheck' instead. -- -- WARNING: This function does not work in the same way as corresponding -- functions in other glib-style libraries, such as gtk_init\\(\\). In -- particular, unknown command line options cause this function to -- abort program execution. init :: (B.CallStack.HasCallStack, MonadIO m) => Maybe ([T.Text]) -- ^ /@argv@/: pointer to application\'s argv -> m ((Maybe [T.Text])) init :: forall (m :: * -> *). (HasCallStack, MonadIO m) => Maybe [Text] -> m (Maybe [Text]) init Maybe [Text] argv = IO (Maybe [Text]) -> m (Maybe [Text]) forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO (Maybe [Text]) -> m (Maybe [Text])) -> IO (Maybe [Text]) -> m (Maybe [Text]) forall a b. (a -> b) -> a -> b $ do let argc :: Int32 argc = case Maybe [Text] argv of Maybe [Text] Nothing -> Int32 0 Just [Text] jArgv -> Int -> Int32 forall a b. (Integral a, Num b) => a -> b fromIntegral (Int -> Int32) -> Int -> Int32 forall a b. (a -> b) -> a -> b $ [Text] -> Int forall (t :: * -> *) a. Foldable t => t a -> Int P.length [Text] jArgv Ptr Int32 argc' <- IO (Ptr Int32) forall a. Storable a => IO (Ptr a) allocMem :: IO (Ptr Int32) Ptr Int32 -> Int32 -> IO () forall a. Storable a => Ptr a -> a -> IO () poke Ptr Int32 argc' Int32 argc Ptr CString maybeArgv <- case Maybe [Text] argv of Maybe [Text] Nothing -> Ptr CString -> IO (Ptr CString) forall (m :: * -> *) a. Monad m => a -> m a return Ptr CString forall a. Ptr a nullPtr Just [Text] jArgv -> do Ptr CString jArgv' <- [Text] -> IO (Ptr CString) packUTF8CArray [Text] jArgv Ptr CString -> IO (Ptr CString) forall (m :: * -> *) a. Monad m => a -> m a return Ptr CString jArgv' Ptr (Ptr CString) maybeArgv' <- IO (Ptr (Ptr CString)) forall a. Storable a => IO (Ptr a) allocMem :: IO (Ptr (Ptr CString)) Ptr (Ptr CString) -> Ptr CString -> IO () forall a. Storable a => Ptr a -> a -> IO () poke Ptr (Ptr CString) maybeArgv' Ptr CString maybeArgv Ptr Int32 -> Ptr (Ptr CString) -> IO () gst_init Ptr Int32 argc' Ptr (Ptr CString) maybeArgv' Int32 argc'' <- Ptr Int32 -> IO Int32 forall a. Storable a => Ptr a -> IO a peek Ptr Int32 argc' Ptr CString maybeArgv'' <- Ptr (Ptr CString) -> IO (Ptr CString) forall a. Storable a => Ptr a -> IO a peek Ptr (Ptr CString) maybeArgv' Maybe [Text] maybeMaybeArgv'' <- Ptr CString -> (Ptr CString -> IO [Text]) -> IO (Maybe [Text]) forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b) convertIfNonNull Ptr CString maybeArgv'' ((Ptr CString -> IO [Text]) -> IO (Maybe [Text])) -> (Ptr CString -> IO [Text]) -> IO (Maybe [Text]) forall a b. (a -> b) -> a -> b $ \Ptr CString maybeArgv''' -> do [Text] maybeArgv'''' <- (Int32 -> Ptr CString -> IO [Text] forall a. (HasCallStack, Integral a) => a -> Ptr CString -> IO [Text] unpackUTF8CArrayWithLength Int32 argc'') Ptr CString maybeArgv''' (Int32 -> (CString -> IO ()) -> Ptr CString -> IO () forall a b c. (Storable a, Integral b) => b -> (a -> IO c) -> Ptr a -> IO () mapCArrayWithLength Int32 argc'') CString -> IO () forall a. Ptr a -> IO () freeMem Ptr CString maybeArgv''' Ptr CString -> IO () forall a. Ptr a -> IO () freeMem Ptr CString maybeArgv''' [Text] -> IO [Text] forall (m :: * -> *) a. Monad m => a -> m a return [Text] maybeArgv'''' Ptr Int32 -> IO () forall a. Ptr a -> IO () freeMem Ptr Int32 argc' Ptr (Ptr CString) -> IO () forall a. Ptr a -> IO () freeMem Ptr (Ptr CString) maybeArgv' Maybe [Text] -> IO (Maybe [Text]) forall (m :: * -> *) a. Monad m => a -> m a return Maybe [Text] maybeMaybeArgv'' -- function get_main_executable_path -- Args: [] -- Lengths: [] -- returnType: Just (TBasicType TUTF8) -- throws : False -- Skip return : False foreign import ccall "gst_get_main_executable_path" gst_get_main_executable_path :: IO CString -- | This helper is mostly helpful for plugins that need to -- inspect the folder of the main executable to determine -- their set of features. -- -- When a plugin is initialized from the gst-plugin-scanner -- external process, the returned path will be the same as from the -- parent process. -- -- /Since: 1.14/ getMainExecutablePath :: (B.CallStack.HasCallStack, MonadIO m) => m (Maybe T.Text) -- ^ __Returns:__ The path of the executable that -- initialized GStreamer, or 'P.Nothing' if it could not be determined. getMainExecutablePath :: forall (m :: * -> *). (HasCallStack, MonadIO m) => m (Maybe Text) getMainExecutablePath = IO (Maybe Text) -> m (Maybe Text) forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO (Maybe Text) -> m (Maybe Text)) -> IO (Maybe Text) -> m (Maybe Text) forall a b. (a -> b) -> a -> b $ do CString result <- IO CString gst_get_main_executable_path Maybe Text maybeResult <- CString -> (CString -> IO Text) -> IO (Maybe Text) forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b) convertIfNonNull CString result ((CString -> IO Text) -> IO (Maybe Text)) -> (CString -> IO Text) -> IO (Maybe Text) forall a b. (a -> b) -> a -> b $ \CString result' -> do Text result'' <- HasCallStack => CString -> IO Text CString -> IO Text cstringToText CString result' Text -> IO Text forall (m :: * -> *) a. Monad m => a -> m a return Text result'' Maybe Text -> IO (Maybe Text) forall (m :: * -> *) a. Monad m => a -> m a return Maybe Text maybeResult -- function formats_contains -- Args: [ Arg -- { argCName = "formats" -- , argType = -- TCArray -- True -- (-1) -- (-1) -- (TInterface Name { namespace = "Gst" , name = "Format" }) -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "The format array to search" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "format" -- , argType = TInterface Name { namespace = "Gst" , name = "Format" } -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "the format to find" , sinceVersion = Nothing } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Just (TBasicType TBoolean) -- throws : False -- Skip return : False foreign import ccall "gst_formats_contains" gst_formats_contains :: Ptr CUInt -> -- formats : TCArray True (-1) (-1) (TInterface (Name {namespace = "Gst", name = "Format"})) CUInt -> -- format : TInterface (Name {namespace = "Gst", name = "Format"}) IO CInt -- | See if the given format is inside the format array. formatsContains :: (B.CallStack.HasCallStack, MonadIO m) => [Gst.Enums.Format] -- ^ /@formats@/: The format array to search -> Gst.Enums.Format -- ^ /@format@/: the format to find -> m Bool -- ^ __Returns:__ 'P.True' if the format is found inside the array formatsContains :: forall (m :: * -> *). (HasCallStack, MonadIO m) => [Format] -> Format -> m Bool formatsContains [Format] formats Format format = IO Bool -> m Bool forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool forall a b. (a -> b) -> a -> b $ do let formats' :: [CUInt] formats' = (Format -> CUInt) -> [Format] -> [CUInt] forall a b. (a -> b) -> [a] -> [b] map (Int -> CUInt forall a b. (Integral a, Num b) => a -> b fromIntegral (Int -> CUInt) -> (Format -> Int) -> Format -> CUInt forall b c a. (b -> c) -> (a -> b) -> a -> c . Format -> Int forall a. Enum a => a -> Int fromEnum) [Format] formats Ptr CUInt formats'' <- [CUInt] -> IO (Ptr CUInt) forall a. (Num a, Storable a) => [a] -> IO (Ptr a) packZeroTerminatedStorableArray [CUInt] formats' let format' :: CUInt format' = (Int -> CUInt forall a b. (Integral a, Num b) => a -> b fromIntegral (Int -> CUInt) -> (Format -> Int) -> Format -> CUInt forall b c a. (b -> c) -> (a -> b) -> a -> c . Format -> Int forall a. Enum a => a -> Int fromEnum) Format format CInt result <- Ptr CUInt -> CUInt -> IO CInt gst_formats_contains Ptr CUInt formats'' CUInt format' let result' :: Bool result' = (CInt -> CInt -> Bool forall a. Eq a => a -> a -> Bool /= CInt 0) CInt result Ptr CUInt -> IO () forall a. Ptr a -> IO () freeMem Ptr CUInt formats'' Bool -> IO Bool forall (m :: * -> *) a. Monad m => a -> m a return Bool result' -- function flow_to_quark -- Args: [ Arg -- { argCName = "ret" -- , argType = -- TInterface Name { namespace = "Gst" , name = "FlowReturn" } -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "a #GstFlowReturn to get the quark of." -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Just (TBasicType TUInt32) -- throws : False -- Skip return : False foreign import ccall "gst_flow_to_quark" gst_flow_to_quark :: CInt -> -- ret : TInterface (Name {namespace = "Gst", name = "FlowReturn"}) IO Word32 -- | Get the unique quark for the given GstFlowReturn. flowToQuark :: (B.CallStack.HasCallStack, MonadIO m) => Gst.Enums.FlowReturn -- ^ /@ret@/: a t'GI.Gst.Enums.FlowReturn' to get the quark of. -> m Word32 -- ^ __Returns:__ the quark associated with the flow return or 0 if an -- invalid return was specified. flowToQuark :: forall (m :: * -> *). (HasCallStack, MonadIO m) => FlowReturn -> m Word32 flowToQuark FlowReturn ret = IO Word32 -> m Word32 forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32 forall a b. (a -> b) -> a -> b $ do let ret' :: CInt ret' = (Int -> CInt forall a b. (Integral a, Num b) => a -> b fromIntegral (Int -> CInt) -> (FlowReturn -> Int) -> FlowReturn -> CInt forall b c a. (b -> c) -> (a -> b) -> a -> c . FlowReturn -> Int forall a. Enum a => a -> Int fromEnum) FlowReturn ret Word32 result <- CInt -> IO Word32 gst_flow_to_quark CInt ret' Word32 -> IO Word32 forall (m :: * -> *) a. Monad m => a -> m a return Word32 result -- function flow_get_name -- Args: [ Arg -- { argCName = "ret" -- , argType = -- TInterface Name { namespace = "Gst" , name = "FlowReturn" } -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "a #GstFlowReturn to get the name of." -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Just (TBasicType TUTF8) -- throws : False -- Skip return : False foreign import ccall "gst_flow_get_name" gst_flow_get_name :: CInt -> -- ret : TInterface (Name {namespace = "Gst", name = "FlowReturn"}) IO CString -- | Gets a string representing the given flow return. flowGetName :: (B.CallStack.HasCallStack, MonadIO m) => Gst.Enums.FlowReturn -- ^ /@ret@/: a t'GI.Gst.Enums.FlowReturn' to get the name of. -> m T.Text -- ^ __Returns:__ a static string with the name of the flow return. flowGetName :: forall (m :: * -> *). (HasCallStack, MonadIO m) => FlowReturn -> m Text flowGetName FlowReturn ret = IO Text -> m Text forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO Text -> m Text) -> IO Text -> m Text forall a b. (a -> b) -> a -> b $ do let ret' :: CInt ret' = (Int -> CInt forall a b. (Integral a, Num b) => a -> b fromIntegral (Int -> CInt) -> (FlowReturn -> Int) -> FlowReturn -> CInt forall b c a. (b -> c) -> (a -> b) -> a -> c . FlowReturn -> Int forall a. Enum a => a -> Int fromEnum) FlowReturn ret CString result <- CInt -> IO CString gst_flow_get_name CInt ret' Text -> CString -> IO () forall a. HasCallStack => Text -> Ptr a -> IO () checkUnexpectedReturnNULL Text "flowGetName" CString result Text result' <- HasCallStack => CString -> IO Text CString -> IO Text cstringToText CString result Text -> IO Text forall (m :: * -> *) a. Monad m => a -> m a return Text result' -- function filename_to_uri -- Args: [ Arg -- { argCName = "filename" -- , argType = TBasicType TFileName -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "absolute or relative file name path" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Just (TBasicType TUTF8) -- throws : True -- Skip return : False foreign import ccall "gst_filename_to_uri" gst_filename_to_uri :: CString -> -- filename : TBasicType TFileName Ptr (Ptr GError) -> -- error IO CString -- | Similar to 'GI.GLib.Functions.filenameToUri', but attempts to handle relative file paths -- as well. Before converting /@filename@/ into an URI, it will be prefixed by -- the current working directory if it is a relative path, and then the path -- will be canonicalised so that it doesn\'t contain any \'.\/\' or \'..\/\' segments. -- -- On Windows /@filename@/ should be in UTF-8 encoding. filenameToUri :: (B.CallStack.HasCallStack, MonadIO m) => [Char] -- ^ /@filename@/: absolute or relative file name path -> m T.Text -- ^ __Returns:__ newly-allocated URI string, or NULL on error. The caller must -- free the URI string with 'GI.GLib.Functions.free' when no longer needed. /(Can throw 'Data.GI.Base.GError.GError')/ filenameToUri :: forall (m :: * -> *). (HasCallStack, MonadIO m) => [Char] -> m Text filenameToUri [Char] filename = IO Text -> m Text forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO Text -> m Text) -> IO Text -> m Text forall a b. (a -> b) -> a -> b $ do CString filename' <- [Char] -> IO CString stringToCString [Char] filename IO Text -> IO () -> IO Text forall a b. IO a -> IO b -> IO a onException (do CString result <- (Ptr (Ptr GError) -> IO CString) -> IO CString forall a. (Ptr (Ptr GError) -> IO a) -> IO a propagateGError ((Ptr (Ptr GError) -> IO CString) -> IO CString) -> (Ptr (Ptr GError) -> IO CString) -> IO CString forall a b. (a -> b) -> a -> b $ CString -> Ptr (Ptr GError) -> IO CString gst_filename_to_uri CString filename' Text -> CString -> IO () forall a. HasCallStack => Text -> Ptr a -> IO () checkUnexpectedReturnNULL Text "filenameToUri" CString result Text result' <- HasCallStack => CString -> IO Text CString -> IO Text cstringToText CString result CString -> IO () forall a. Ptr a -> IO () freeMem CString result CString -> IO () forall a. Ptr a -> IO () freeMem CString filename' Text -> IO Text forall (m :: * -> *) a. Monad m => a -> m a return Text result' ) (do CString -> IO () forall a. Ptr a -> IO () freeMem CString filename' ) -- function error_get_message -- Args: [ Arg -- { argCName = "domain" -- , argType = TBasicType TUInt32 -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = -- Just "the GStreamer error domain this error belongs to." -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "code" -- , argType = TBasicType TInt -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "the error code belonging to the domain." -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Just (TBasicType TUTF8) -- throws : False -- Skip return : False foreign import ccall "gst_error_get_message" gst_error_get_message :: Word32 -> -- domain : TBasicType TUInt32 Int32 -> -- code : TBasicType TInt IO CString -- | Get a string describing the error message in the current locale. errorGetMessage :: (B.CallStack.HasCallStack, MonadIO m) => Word32 -- ^ /@domain@/: the GStreamer error domain this error belongs to. -> Int32 -- ^ /@code@/: the error code belonging to the domain. -> m T.Text -- ^ __Returns:__ a newly allocated string describing -- the error message (in UTF-8 encoding) errorGetMessage :: forall (m :: * -> *). (HasCallStack, MonadIO m) => Word32 -> Int32 -> m Text errorGetMessage Word32 domain Int32 code = IO Text -> m Text forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO Text -> m Text) -> IO Text -> m Text forall a b. (a -> b) -> a -> b $ do CString result <- Word32 -> Int32 -> IO CString gst_error_get_message Word32 domain Int32 code Text -> CString -> IO () forall a. HasCallStack => Text -> Ptr a -> IO () checkUnexpectedReturnNULL Text "errorGetMessage" CString result Text result' <- HasCallStack => CString -> IO Text CString -> IO Text cstringToText CString result CString -> IO () forall a. Ptr a -> IO () freeMem CString result Text -> IO Text forall (m :: * -> *) a. Monad m => a -> m a return Text result' -- function dynamic_type_register -- Args: [ Arg -- { argCName = "plugin" -- , argType = TInterface Name { namespace = "Gst" , name = "Plugin" } -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "The #GstPlugin to register @dyn_type for" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "type" -- , argType = TBasicType TGType -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "The #GType to register dynamically" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Just (TBasicType TBoolean) -- throws : False -- Skip return : False foreign import ccall "gst_dynamic_type_register" gst_dynamic_type_register :: Ptr Gst.Plugin.Plugin -> -- plugin : TInterface (Name {namespace = "Gst", name = "Plugin"}) CGType -> -- type : TBasicType TGType IO CInt -- | Registers a new t'GI.Gst.Objects.DynamicTypeFactory.DynamicTypeFactory' in the registry -- -- /Since: 1.12/ dynamicTypeRegister :: (B.CallStack.HasCallStack, MonadIO m, Gst.Plugin.IsPlugin a) => a -- ^ /@plugin@/: The t'GI.Gst.Objects.Plugin.Plugin' to register /@dynType@/ for -> GType -- ^ /@type@/: The t'GType' to register dynamically -> m Bool dynamicTypeRegister :: forall (m :: * -> *) a. (HasCallStack, MonadIO m, IsPlugin a) => a -> GType -> m Bool dynamicTypeRegister a plugin GType type_ = IO Bool -> m Bool forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool forall a b. (a -> b) -> a -> b $ do Ptr Plugin plugin' <- a -> IO (Ptr Plugin) forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b) unsafeManagedPtrCastPtr a plugin let type_' :: Word64 type_' = GType -> Word64 gtypeToCGType GType type_ CInt result <- Ptr Plugin -> Word64 -> IO CInt gst_dynamic_type_register Ptr Plugin plugin' Word64 type_' let result' :: Bool result' = (CInt -> CInt -> Bool forall a. Eq a => a -> a -> Bool /= CInt 0) CInt result a -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr a plugin Bool -> IO Bool forall (m :: * -> *) a. Monad m => a -> m a return Bool result' -- function deinit -- Args: [] -- Lengths: [] -- returnType: Nothing -- throws : False -- Skip return : False foreign import ccall "gst_deinit" gst_deinit :: IO () -- | Clean up any resources created by GStreamer in 'GI.Gst.Functions.init'. -- -- It is normally not needed to call this function in a normal application -- as the resources will automatically be freed when the program terminates. -- This function is therefore mostly used by testsuites and other memory -- profiling tools. -- -- After this call GStreamer (including this method) should not be used anymore. deinit :: (B.CallStack.HasCallStack, MonadIO m) => m () deinit :: forall (m :: * -> *). (HasCallStack, MonadIO m) => m () deinit = IO () -> m () forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO () -> m ()) -> IO () -> m () forall a b. (a -> b) -> a -> b $ do IO () gst_deinit () -> IO () forall (m :: * -> *) a. Monad m => a -> m a return () -- function debug_unset_threshold_for_name -- Args: [ Arg -- { argCName = "name" -- , argType = TBasicType TUTF8 -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "name of the categories to set" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Nothing -- throws : False -- Skip return : False foreign import ccall "gst_debug_unset_threshold_for_name" gst_debug_unset_threshold_for_name :: CString -> -- name : TBasicType TUTF8 IO () -- | Resets all categories with the given name back to the default level. debugUnsetThresholdForName :: (B.CallStack.HasCallStack, MonadIO m) => T.Text -- ^ /@name@/: name of the categories to set -> m () debugUnsetThresholdForName :: forall (m :: * -> *). (HasCallStack, MonadIO m) => Text -> m () debugUnsetThresholdForName Text name = IO () -> m () forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO () -> m ()) -> IO () -> m () forall a b. (a -> b) -> a -> b $ do CString name' <- Text -> IO CString textToCString Text name CString -> IO () gst_debug_unset_threshold_for_name CString name' CString -> IO () forall a. Ptr a -> IO () freeMem CString name' () -> IO () forall (m :: * -> *) a. Monad m => a -> m a return () -- function debug_set_threshold_from_string -- Args: [ Arg -- { argCName = "list" -- , argType = TBasicType TUTF8 -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = -- Just -- "comma-separated list of \"category:level\" pairs to be used\n as debug logging levels" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "reset" -- , argType = TBasicType TBoolean -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = -- Just -- "%TRUE to clear all previously-set debug levels before setting\n new thresholds\n%FALSE if adding the threshold described by @list to the one already set." -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Nothing -- throws : False -- Skip return : False foreign import ccall "gst_debug_set_threshold_from_string" gst_debug_set_threshold_from_string :: CString -> -- list : TBasicType TUTF8 CInt -> -- reset : TBasicType TBoolean IO () -- | Sets the debug logging wanted in the same form as with the GST_DEBUG -- environment variable. You can use wildcards such as \'*\', but note that -- the order matters when you use wild cards, e.g. \"foosrc:6,*src:3,*:2\" sets -- everything to log level 2. -- -- /Since: 1.2/ debugSetThresholdFromString :: (B.CallStack.HasCallStack, MonadIO m) => T.Text -- ^ /@list@/: comma-separated list of \"category:level\" pairs to be used -- as debug logging levels -> Bool -- ^ /@reset@/: 'P.True' to clear all previously-set debug levels before setting -- new thresholds -- 'P.False' if adding the threshold described by /@list@/ to the one already set. -> m () debugSetThresholdFromString :: forall (m :: * -> *). (HasCallStack, MonadIO m) => Text -> Bool -> m () debugSetThresholdFromString Text list Bool reset = IO () -> m () forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO () -> m ()) -> IO () -> m () forall a b. (a -> b) -> a -> b $ do CString list' <- Text -> IO CString textToCString Text list let reset' :: CInt reset' = (Int -> CInt forall a b. (Integral a, Num b) => a -> b fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt forall b c a. (b -> c) -> (a -> b) -> a -> c . Bool -> Int forall a. Enum a => a -> Int fromEnum) Bool reset CString -> CInt -> IO () gst_debug_set_threshold_from_string CString list' CInt reset' CString -> IO () forall a. Ptr a -> IO () freeMem CString list' () -> IO () forall (m :: * -> *) a. Monad m => a -> m a return () -- function debug_set_threshold_for_name -- Args: [ Arg -- { argCName = "name" -- , argType = TBasicType TUTF8 -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "name of the categories to set" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "level" -- , argType = -- TInterface Name { namespace = "Gst" , name = "DebugLevel" } -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "level to set them to" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Nothing -- throws : False -- Skip return : False foreign import ccall "gst_debug_set_threshold_for_name" gst_debug_set_threshold_for_name :: CString -> -- name : TBasicType TUTF8 CUInt -> -- level : TInterface (Name {namespace = "Gst", name = "DebugLevel"}) IO () -- | Sets all categories which match the given glob style pattern to the given -- level. debugSetThresholdForName :: (B.CallStack.HasCallStack, MonadIO m) => T.Text -- ^ /@name@/: name of the categories to set -> Gst.Enums.DebugLevel -- ^ /@level@/: level to set them to -> m () debugSetThresholdForName :: forall (m :: * -> *). (HasCallStack, MonadIO m) => Text -> DebugLevel -> m () debugSetThresholdForName Text name DebugLevel level = IO () -> m () forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO () -> m ()) -> IO () -> m () forall a b. (a -> b) -> a -> b $ do CString name' <- Text -> IO CString textToCString Text name let level' :: CUInt level' = (Int -> CUInt forall a b. (Integral a, Num b) => a -> b fromIntegral (Int -> CUInt) -> (DebugLevel -> Int) -> DebugLevel -> CUInt forall b c a. (b -> c) -> (a -> b) -> a -> c . DebugLevel -> Int forall a. Enum a => a -> Int fromEnum) DebugLevel level CString -> CUInt -> IO () gst_debug_set_threshold_for_name CString name' CUInt level' CString -> IO () forall a. Ptr a -> IO () freeMem CString name' () -> IO () forall (m :: * -> *) a. Monad m => a -> m a return () -- function debug_set_default_threshold -- Args: [ Arg -- { argCName = "level" -- , argType = -- TInterface Name { namespace = "Gst" , name = "DebugLevel" } -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "level to set" , sinceVersion = Nothing } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Nothing -- throws : False -- Skip return : False foreign import ccall "gst_debug_set_default_threshold" gst_debug_set_default_threshold :: CUInt -> -- level : TInterface (Name {namespace = "Gst", name = "DebugLevel"}) IO () -- | Sets the default threshold to the given level and updates all categories to -- use this threshold. -- -- This function may be called before 'GI.Gst.Functions.init'. debugSetDefaultThreshold :: (B.CallStack.HasCallStack, MonadIO m) => Gst.Enums.DebugLevel -- ^ /@level@/: level to set -> m () debugSetDefaultThreshold :: forall (m :: * -> *). (HasCallStack, MonadIO m) => DebugLevel -> m () debugSetDefaultThreshold DebugLevel level = IO () -> m () forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO () -> m ()) -> IO () -> m () forall a b. (a -> b) -> a -> b $ do let level' :: CUInt level' = (Int -> CUInt forall a b. (Integral a, Num b) => a -> b fromIntegral (Int -> CUInt) -> (DebugLevel -> Int) -> DebugLevel -> CUInt forall b c a. (b -> c) -> (a -> b) -> a -> c . DebugLevel -> Int forall a. Enum a => a -> Int fromEnum) DebugLevel level CUInt -> IO () gst_debug_set_default_threshold CUInt level' () -> IO () forall (m :: * -> *) a. Monad m => a -> m a return () -- function debug_set_colored -- Args: [ Arg -- { argCName = "colored" -- , argType = TBasicType TBoolean -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "Whether to use colored output or not" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Nothing -- throws : False -- Skip return : False foreign import ccall "gst_debug_set_colored" gst_debug_set_colored :: CInt -> -- colored : TBasicType TBoolean IO () -- | Sets or unsets the use of coloured debugging output. -- Same as gst_debug_set_color_mode () with the argument being -- being GST_DEBUG_COLOR_MODE_ON or GST_DEBUG_COLOR_MODE_OFF. -- -- This function may be called before 'GI.Gst.Functions.init'. debugSetColored :: (B.CallStack.HasCallStack, MonadIO m) => Bool -- ^ /@colored@/: Whether to use colored output or not -> m () debugSetColored :: forall (m :: * -> *). (HasCallStack, MonadIO m) => Bool -> m () debugSetColored Bool colored = IO () -> m () forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO () -> m ()) -> IO () -> m () forall a b. (a -> b) -> a -> b $ do let colored' :: CInt colored' = (Int -> CInt forall a b. (Integral a, Num b) => a -> b fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt forall b c a. (b -> c) -> (a -> b) -> a -> c . Bool -> Int forall a. Enum a => a -> Int fromEnum) Bool colored CInt -> IO () gst_debug_set_colored CInt colored' () -> IO () forall (m :: * -> *) a. Monad m => a -> m a return () -- function debug_set_color_mode_from_string -- Args: [ Arg -- { argCName = "mode" -- , argType = TBasicType TUTF8 -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = -- Just -- "The coloring mode for debug output. One of the following:\n\"on\", \"auto\", \"off\", \"disable\", \"unix\"." -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Nothing -- throws : False -- Skip return : False foreign import ccall "gst_debug_set_color_mode_from_string" gst_debug_set_color_mode_from_string :: CString -> -- mode : TBasicType TUTF8 IO () -- | Changes the coloring mode for debug output. -- -- This function may be called before 'GI.Gst.Functions.init'. -- -- /Since: 1.2/ debugSetColorModeFromString :: (B.CallStack.HasCallStack, MonadIO m) => T.Text -- ^ /@mode@/: The coloring mode for debug output. One of the following: -- \"on\", \"auto\", \"off\", \"disable\", \"unix\". -> m () debugSetColorModeFromString :: forall (m :: * -> *). (HasCallStack, MonadIO m) => Text -> m () debugSetColorModeFromString Text mode = IO () -> m () forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO () -> m ()) -> IO () -> m () forall a b. (a -> b) -> a -> b $ do CString mode' <- Text -> IO CString textToCString Text mode CString -> IO () gst_debug_set_color_mode_from_string CString mode' CString -> IO () forall a. Ptr a -> IO () freeMem CString mode' () -> IO () forall (m :: * -> *) a. Monad m => a -> m a return () -- function debug_set_color_mode -- Args: [ Arg -- { argCName = "mode" -- , argType = -- TInterface Name { namespace = "Gst" , name = "DebugColorMode" } -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = -- Just "The coloring mode for debug output. See @GstDebugColorMode." -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Nothing -- throws : False -- Skip return : False foreign import ccall "gst_debug_set_color_mode" gst_debug_set_color_mode :: CUInt -> -- mode : TInterface (Name {namespace = "Gst", name = "DebugColorMode"}) IO () -- | Changes the coloring mode for debug output. -- -- This function may be called before 'GI.Gst.Functions.init'. -- -- /Since: 1.2/ debugSetColorMode :: (B.CallStack.HasCallStack, MonadIO m) => Gst.Enums.DebugColorMode -- ^ /@mode@/: The coloring mode for debug output. See /@gstDebugColorMode@/. -> m () debugSetColorMode :: forall (m :: * -> *). (HasCallStack, MonadIO m) => DebugColorMode -> m () debugSetColorMode DebugColorMode mode = IO () -> m () forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO () -> m ()) -> IO () -> m () forall a b. (a -> b) -> a -> b $ do let mode' :: CUInt mode' = (Int -> CUInt forall a b. (Integral a, Num b) => a -> b fromIntegral (Int -> CUInt) -> (DebugColorMode -> Int) -> DebugColorMode -> CUInt forall b c a. (b -> c) -> (a -> b) -> a -> c . DebugColorMode -> Int forall a. Enum a => a -> Int fromEnum) DebugColorMode mode CUInt -> IO () gst_debug_set_color_mode CUInt mode' () -> IO () forall (m :: * -> *) a. Monad m => a -> m a return () -- function debug_set_active -- Args: [ Arg -- { argCName = "active" -- , argType = TBasicType TBoolean -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "Whether to use debugging output or not" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Nothing -- throws : False -- Skip return : False foreign import ccall "gst_debug_set_active" gst_debug_set_active :: CInt -> -- active : TBasicType TBoolean IO () -- | If activated, debugging messages are sent to the debugging -- handlers. -- It makes sense to deactivate it for speed issues. -- > This function is not threadsafe. It makes sense to only call it -- during initialization. debugSetActive :: (B.CallStack.HasCallStack, MonadIO m) => Bool -- ^ /@active@/: Whether to use debugging output or not -> m () debugSetActive :: forall (m :: * -> *). (HasCallStack, MonadIO m) => Bool -> m () debugSetActive Bool active = IO () -> m () forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO () -> m ()) -> IO () -> m () forall a b. (a -> b) -> a -> b $ do let active' :: CInt active' = (Int -> CInt forall a b. (Integral a, Num b) => a -> b fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt forall b c a. (b -> c) -> (a -> b) -> a -> c . Bool -> Int forall a. Enum a => a -> Int fromEnum) Bool active CInt -> IO () gst_debug_set_active CInt active' () -> IO () forall (m :: * -> *) a. Monad m => a -> m a return () -- function debug_ring_buffer_logger_get_logs -- Args: [] -- Lengths: [] -- returnType: Just (TCArray True (-1) (-1) (TBasicType TUTF8)) -- throws : False -- Skip return : False foreign import ccall "gst_debug_ring_buffer_logger_get_logs" gst_debug_ring_buffer_logger_get_logs :: IO (Ptr CString) -- | Fetches the current logs per thread from the ring buffer logger. See -- 'GI.Gst.Functions.debugAddRingBufferLogger' for details. -- -- /Since: 1.14/ debugRingBufferLoggerGetLogs :: (B.CallStack.HasCallStack, MonadIO m) => m [T.Text] -- ^ __Returns:__ NULL-terminated array of -- strings with the debug output per thread debugRingBufferLoggerGetLogs :: forall (m :: * -> *). (HasCallStack, MonadIO m) => m [Text] debugRingBufferLoggerGetLogs = IO [Text] -> m [Text] forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO [Text] -> m [Text]) -> IO [Text] -> m [Text] forall a b. (a -> b) -> a -> b $ do Ptr CString result <- IO (Ptr CString) gst_debug_ring_buffer_logger_get_logs Text -> Ptr CString -> IO () forall a. HasCallStack => Text -> Ptr a -> IO () checkUnexpectedReturnNULL Text "debugRingBufferLoggerGetLogs" Ptr CString result [Text] result' <- HasCallStack => Ptr CString -> IO [Text] Ptr CString -> IO [Text] unpackZeroTerminatedUTF8CArray Ptr CString result (CString -> IO ()) -> Ptr CString -> IO () forall a b. (Ptr a -> IO b) -> Ptr (Ptr a) -> IO () mapZeroTerminatedCArray CString -> IO () forall a. Ptr a -> IO () freeMem Ptr CString result Ptr CString -> IO () forall a. Ptr a -> IO () freeMem Ptr CString result [Text] -> IO [Text] forall (m :: * -> *) a. Monad m => a -> m a return [Text] result' -- function debug_remove_ring_buffer_logger -- Args: [] -- Lengths: [] -- returnType: Nothing -- throws : False -- Skip return : False foreign import ccall "gst_debug_remove_ring_buffer_logger" gst_debug_remove_ring_buffer_logger :: IO () -- | Removes any previously added ring buffer logger with -- 'GI.Gst.Functions.debugAddRingBufferLogger'. -- -- /Since: 1.14/ debugRemoveRingBufferLogger :: (B.CallStack.HasCallStack, MonadIO m) => m () debugRemoveRingBufferLogger :: forall (m :: * -> *). (HasCallStack, MonadIO m) => m () debugRemoveRingBufferLogger = IO () -> m () forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO () -> m ()) -> IO () -> m () forall a b. (a -> b) -> a -> b $ do IO () gst_debug_remove_ring_buffer_logger () -> IO () forall (m :: * -> *) a. Monad m => a -> m a return () -- function debug_remove_log_function_by_data -- Args: [ Arg -- { argCName = "data" -- , argType = TBasicType TPtr -- , direction = DirectionIn -- , mayBeNull = True -- , argDoc = -- Documentation -- { rawDocText = Just "user data of the log function to remove" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Just (TBasicType TUInt) -- throws : False -- Skip return : False foreign import ccall "gst_debug_remove_log_function_by_data" gst_debug_remove_log_function_by_data :: Ptr () -> -- data : TBasicType TPtr IO Word32 -- | Removes all registered instances of log functions with the given user data. debugRemoveLogFunctionByData :: (B.CallStack.HasCallStack, MonadIO m) => Ptr () -- ^ /@data@/: user data of the log function to remove -> m Word32 -- ^ __Returns:__ How many instances of the function were removed debugRemoveLogFunctionByData :: forall (m :: * -> *). (HasCallStack, MonadIO m) => Ptr () -> m Word32 debugRemoveLogFunctionByData Ptr () data_ = IO Word32 -> m Word32 forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32 forall a b. (a -> b) -> a -> b $ do Word32 result <- Ptr () -> IO Word32 gst_debug_remove_log_function_by_data Ptr () data_ Word32 -> IO Word32 forall (m :: * -> *) a. Monad m => a -> m a return Word32 result -- function debug_remove_log_function -- Args: [ Arg -- { argCName = "func" -- , argType = -- TInterface Name { namespace = "Gst" , name = "LogFunction" } -- , direction = DirectionIn -- , mayBeNull = True -- , argDoc = -- Documentation -- { rawDocText = -- Just -- "the log function to remove, or %NULL to\n remove the default log function" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeCall -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Just (TBasicType TUInt) -- throws : False -- Skip return : False foreign import ccall "gst_debug_remove_log_function" gst_debug_remove_log_function :: FunPtr Gst.Callbacks.C_LogFunction -> -- func : TInterface (Name {namespace = "Gst", name = "LogFunction"}) IO Word32 -- | Removes all registered instances of the given logging functions. debugRemoveLogFunction :: (B.CallStack.HasCallStack, MonadIO m) => Maybe (Gst.Callbacks.LogFunction) -- ^ /@func@/: the log function to remove, or 'P.Nothing' to -- remove the default log function -> m Word32 -- ^ __Returns:__ How many instances of the function were removed debugRemoveLogFunction :: forall (m :: * -> *). (HasCallStack, MonadIO m) => Maybe LogFunction -> m Word32 debugRemoveLogFunction Maybe LogFunction func = IO Word32 -> m Word32 forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO Word32 -> m Word32) -> IO Word32 -> m Word32 forall a b. (a -> b) -> a -> b $ do FunPtr C_LogFunction maybeFunc <- case Maybe LogFunction func of Maybe LogFunction Nothing -> FunPtr C_LogFunction -> IO (FunPtr C_LogFunction) forall (m :: * -> *) a. Monad m => a -> m a return (Ptr Any -> FunPtr C_LogFunction forall a b. Ptr a -> FunPtr b castPtrToFunPtr Ptr Any forall a. Ptr a nullPtr) Just LogFunction jFunc -> do FunPtr C_LogFunction jFunc' <- C_LogFunction -> IO (FunPtr C_LogFunction) Gst.Callbacks.mk_LogFunction (Maybe (Ptr (FunPtr C_LogFunction)) -> LogFunction_WithClosures -> C_LogFunction Gst.Callbacks.wrap_LogFunction Maybe (Ptr (FunPtr C_LogFunction)) forall a. Maybe a Nothing (LogFunction -> LogFunction_WithClosures Gst.Callbacks.drop_closures_LogFunction LogFunction jFunc)) FunPtr C_LogFunction -> IO (FunPtr C_LogFunction) forall (m :: * -> *) a. Monad m => a -> m a return FunPtr C_LogFunction jFunc' Word32 result <- FunPtr C_LogFunction -> IO Word32 gst_debug_remove_log_function FunPtr C_LogFunction maybeFunc Ptr Any -> IO () forall a. Ptr a -> IO () safeFreeFunPtr (Ptr Any -> IO ()) -> Ptr Any -> IO () forall a b. (a -> b) -> a -> b $ FunPtr C_LogFunction -> Ptr Any forall a b. FunPtr a -> Ptr b castFunPtrToPtr FunPtr C_LogFunction maybeFunc Word32 -> IO Word32 forall (m :: * -> *) a. Monad m => a -> m a return Word32 result -- function debug_print_stack_trace -- Args: [] -- Lengths: [] -- returnType: Nothing -- throws : False -- Skip return : False foreign import ccall "gst_debug_print_stack_trace" gst_debug_print_stack_trace :: IO () -- | If libunwind, glibc backtrace or DbgHelp are present -- a stack trace is printed. debugPrintStackTrace :: (B.CallStack.HasCallStack, MonadIO m) => m () debugPrintStackTrace :: forall (m :: * -> *). (HasCallStack, MonadIO m) => m () debugPrintStackTrace = IO () -> m () forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO () -> m ()) -> IO () -> m () forall a b. (a -> b) -> a -> b $ do IO () gst_debug_print_stack_trace () -> IO () forall (m :: * -> *) a. Monad m => a -> m a return () -- function debug_log_get_line -- Args: [ Arg -- { argCName = "category" -- , argType = -- TInterface Name { namespace = "Gst" , name = "DebugCategory" } -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "category to log" , sinceVersion = Nothing } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "level" -- , argType = -- TInterface Name { namespace = "Gst" , name = "DebugLevel" } -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "level of the message" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "file" -- , argType = TBasicType TUTF8 -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = -- Just -- "the file that emitted the message, usually the __FILE__ identifier" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "function" -- , argType = TBasicType TUTF8 -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "the function that emitted the message" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "line" -- , argType = TBasicType TInt -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = -- Just "the line from that the message was emitted, usually __LINE__" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "object" -- , argType = -- TInterface Name { namespace = "GObject" , name = "Object" } -- , direction = DirectionIn -- , mayBeNull = True -- , argDoc = -- Documentation -- { rawDocText = -- Just "the object this message relates to,\n or %NULL if none" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "message" -- , argType = -- TInterface Name { namespace = "Gst" , name = "DebugMessage" } -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "the actual message" , sinceVersion = Nothing } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Just (TBasicType TUTF8) -- throws : False -- Skip return : False foreign import ccall "gst_debug_log_get_line" gst_debug_log_get_line :: Ptr Gst.DebugCategory.DebugCategory -> -- category : TInterface (Name {namespace = "Gst", name = "DebugCategory"}) CUInt -> -- level : TInterface (Name {namespace = "Gst", name = "DebugLevel"}) CString -> -- file : TBasicType TUTF8 CString -> -- function : TBasicType TUTF8 Int32 -> -- line : TBasicType TInt Ptr GObject.Object.Object -> -- object : TInterface (Name {namespace = "GObject", name = "Object"}) Ptr Gst.DebugMessage.DebugMessage -> -- message : TInterface (Name {namespace = "Gst", name = "DebugMessage"}) IO CString -- | Returns the string representation for the specified debug log message -- formatted in the same way as 'GI.Gst.Functions.debugLogDefault' (the default handler), -- without color. The purpose is to make it easy for custom log output -- handlers to get a log output that is identical to what the default handler -- would write out. -- -- /Since: 1.18/ debugLogGetLine :: (B.CallStack.HasCallStack, MonadIO m, GObject.Object.IsObject a) => Gst.DebugCategory.DebugCategory -- ^ /@category@/: category to log -> Gst.Enums.DebugLevel -- ^ /@level@/: level of the message -> T.Text -- ^ /@file@/: the file that emitted the message, usually the __FILE__ identifier -> T.Text -- ^ /@function@/: the function that emitted the message -> Int32 -- ^ /@line@/: the line from that the message was emitted, usually __LINE__ -> Maybe (a) -- ^ /@object@/: the object this message relates to, -- or 'P.Nothing' if none -> Gst.DebugMessage.DebugMessage -- ^ /@message@/: the actual message -> m T.Text debugLogGetLine :: forall (m :: * -> *) a. (HasCallStack, MonadIO m, IsObject a) => DebugCategory -> DebugLevel -> Text -> Text -> Int32 -> Maybe a -> DebugMessage -> m Text debugLogGetLine DebugCategory category DebugLevel level Text file Text function Int32 line Maybe a object DebugMessage message = IO Text -> m Text forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO Text -> m Text) -> IO Text -> m Text forall a b. (a -> b) -> a -> b $ do Ptr DebugCategory category' <- DebugCategory -> IO (Ptr DebugCategory) forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a) unsafeManagedPtrGetPtr DebugCategory category let level' :: CUInt level' = (Int -> CUInt forall a b. (Integral a, Num b) => a -> b fromIntegral (Int -> CUInt) -> (DebugLevel -> Int) -> DebugLevel -> CUInt forall b c a. (b -> c) -> (a -> b) -> a -> c . DebugLevel -> Int forall a. Enum a => a -> Int fromEnum) DebugLevel level CString file' <- Text -> IO CString textToCString Text file CString function' <- Text -> IO CString textToCString Text function Ptr Object maybeObject <- case Maybe a object of Maybe a Nothing -> Ptr Object -> IO (Ptr Object) forall (m :: * -> *) a. Monad m => a -> m a return Ptr Object forall a. Ptr a nullPtr Just a jObject -> do Ptr Object jObject' <- a -> IO (Ptr Object) forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b) unsafeManagedPtrCastPtr a jObject Ptr Object -> IO (Ptr Object) forall (m :: * -> *) a. Monad m => a -> m a return Ptr Object jObject' Ptr DebugMessage message' <- DebugMessage -> IO (Ptr DebugMessage) forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a) unsafeManagedPtrGetPtr DebugMessage message CString result <- Ptr DebugCategory -> CUInt -> CString -> CString -> Int32 -> Ptr Object -> Ptr DebugMessage -> IO CString gst_debug_log_get_line Ptr DebugCategory category' CUInt level' CString file' CString function' Int32 line Ptr Object maybeObject Ptr DebugMessage message' Text -> CString -> IO () forall a. HasCallStack => Text -> Ptr a -> IO () checkUnexpectedReturnNULL Text "debugLogGetLine" CString result Text result' <- HasCallStack => CString -> IO Text CString -> IO Text cstringToText CString result CString -> IO () forall a. Ptr a -> IO () freeMem CString result DebugCategory -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr DebugCategory category Maybe a -> (a -> IO ()) -> IO () forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m () whenJust Maybe a object a -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr DebugMessage -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr DebugMessage message CString -> IO () forall a. Ptr a -> IO () freeMem CString file' CString -> IO () forall a. Ptr a -> IO () freeMem CString function' Text -> IO Text forall (m :: * -> *) a. Monad m => a -> m a return Text result' -- function debug_log_default -- Args: [ Arg -- { argCName = "category" -- , argType = -- TInterface Name { namespace = "Gst" , name = "DebugCategory" } -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "category to log" , sinceVersion = Nothing } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "level" -- , argType = -- TInterface Name { namespace = "Gst" , name = "DebugLevel" } -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "level of the message" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "file" -- , argType = TBasicType TUTF8 -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = -- Just -- "the file that emitted the message, usually the __FILE__ identifier" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "function" -- , argType = TBasicType TUTF8 -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "the function that emitted the message" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "line" -- , argType = TBasicType TInt -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = -- Just "the line from that the message was emitted, usually __LINE__" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "object" -- , argType = -- TInterface Name { namespace = "GObject" , name = "Object" } -- , direction = DirectionIn -- , mayBeNull = True -- , argDoc = -- Documentation -- { rawDocText = -- Just "the object this message relates to,\n or %NULL if none" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "message" -- , argType = -- TInterface Name { namespace = "Gst" , name = "DebugMessage" } -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "the actual message" , sinceVersion = Nothing } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "user_data" -- , argType = TBasicType TPtr -- , direction = DirectionIn -- , mayBeNull = True -- , argDoc = -- Documentation -- { rawDocText = Just "the FILE* to log to" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Nothing -- throws : False -- Skip return : False foreign import ccall "gst_debug_log_default" gst_debug_log_default :: Ptr Gst.DebugCategory.DebugCategory -> -- category : TInterface (Name {namespace = "Gst", name = "DebugCategory"}) CUInt -> -- level : TInterface (Name {namespace = "Gst", name = "DebugLevel"}) CString -> -- file : TBasicType TUTF8 CString -> -- function : TBasicType TUTF8 Int32 -> -- line : TBasicType TInt Ptr GObject.Object.Object -> -- object : TInterface (Name {namespace = "GObject", name = "Object"}) Ptr Gst.DebugMessage.DebugMessage -> -- message : TInterface (Name {namespace = "Gst", name = "DebugMessage"}) Ptr () -> -- user_data : TBasicType TPtr IO () -- | The default logging handler used by GStreamer. Logging functions get called -- whenever a macro like GST_DEBUG or similar is used. By default this function -- is setup to output the message and additional info to stderr (or the log file -- specified via the GST_DEBUG_FILE environment variable) as received via -- /@userData@/. -- -- You can add other handlers by using 'GI.Gst.Functions.debugAddLogFunction'. -- And you can remove this handler by calling -- gst_debug_remove_log_function(gst_debug_log_default); debugLogDefault :: (B.CallStack.HasCallStack, MonadIO m, GObject.Object.IsObject a) => Gst.DebugCategory.DebugCategory -- ^ /@category@/: category to log -> Gst.Enums.DebugLevel -- ^ /@level@/: level of the message -> T.Text -- ^ /@file@/: the file that emitted the message, usually the __FILE__ identifier -> T.Text -- ^ /@function@/: the function that emitted the message -> Int32 -- ^ /@line@/: the line from that the message was emitted, usually __LINE__ -> Maybe (a) -- ^ /@object@/: the object this message relates to, -- or 'P.Nothing' if none -> Gst.DebugMessage.DebugMessage -- ^ /@message@/: the actual message -> Ptr () -- ^ /@userData@/: the FILE* to log to -> m () debugLogDefault :: forall (m :: * -> *) a. (HasCallStack, MonadIO m, IsObject a) => DebugCategory -> DebugLevel -> Text -> Text -> Int32 -> Maybe a -> DebugMessage -> Ptr () -> m () debugLogDefault DebugCategory category DebugLevel level Text file Text function Int32 line Maybe a object DebugMessage message Ptr () userData = IO () -> m () forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO () -> m ()) -> IO () -> m () forall a b. (a -> b) -> a -> b $ do Ptr DebugCategory category' <- DebugCategory -> IO (Ptr DebugCategory) forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a) unsafeManagedPtrGetPtr DebugCategory category let level' :: CUInt level' = (Int -> CUInt forall a b. (Integral a, Num b) => a -> b fromIntegral (Int -> CUInt) -> (DebugLevel -> Int) -> DebugLevel -> CUInt forall b c a. (b -> c) -> (a -> b) -> a -> c . DebugLevel -> Int forall a. Enum a => a -> Int fromEnum) DebugLevel level CString file' <- Text -> IO CString textToCString Text file CString function' <- Text -> IO CString textToCString Text function Ptr Object maybeObject <- case Maybe a object of Maybe a Nothing -> Ptr Object -> IO (Ptr Object) forall (m :: * -> *) a. Monad m => a -> m a return Ptr Object forall a. Ptr a nullPtr Just a jObject -> do Ptr Object jObject' <- a -> IO (Ptr Object) forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b) unsafeManagedPtrCastPtr a jObject Ptr Object -> IO (Ptr Object) forall (m :: * -> *) a. Monad m => a -> m a return Ptr Object jObject' Ptr DebugMessage message' <- DebugMessage -> IO (Ptr DebugMessage) forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a) unsafeManagedPtrGetPtr DebugMessage message C_LogFunction gst_debug_log_default Ptr DebugCategory category' CUInt level' CString file' CString function' Int32 line Ptr Object maybeObject Ptr DebugMessage message' Ptr () userData DebugCategory -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr DebugCategory category Maybe a -> (a -> IO ()) -> IO () forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m () whenJust Maybe a object a -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr DebugMessage -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr DebugMessage message CString -> IO () forall a. Ptr a -> IO () freeMem CString file' CString -> IO () forall a. Ptr a -> IO () freeMem CString function' () -> IO () forall (m :: * -> *) a. Monad m => a -> m a return () -- function debug_is_colored -- Args: [] -- Lengths: [] -- returnType: Just (TBasicType TBoolean) -- throws : False -- Skip return : False foreign import ccall "gst_debug_is_colored" gst_debug_is_colored :: IO CInt -- | Checks if the debugging output should be colored. debugIsColored :: (B.CallStack.HasCallStack, MonadIO m) => m Bool -- ^ __Returns:__ 'P.True', if the debug output should be colored. debugIsColored :: forall (m :: * -> *). (HasCallStack, MonadIO m) => m Bool debugIsColored = IO Bool -> m Bool forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool forall a b. (a -> b) -> a -> b $ do CInt result <- IO CInt gst_debug_is_colored let result' :: Bool result' = (CInt -> CInt -> Bool forall a. Eq a => a -> a -> Bool /= CInt 0) CInt result Bool -> IO Bool forall (m :: * -> *) a. Monad m => a -> m a return Bool result' -- function debug_is_active -- Args: [] -- Lengths: [] -- returnType: Just (TBasicType TBoolean) -- throws : False -- Skip return : False foreign import ccall "gst_debug_is_active" gst_debug_is_active :: IO CInt -- | Checks if debugging output is activated. debugIsActive :: (B.CallStack.HasCallStack, MonadIO m) => m Bool -- ^ __Returns:__ 'P.True', if debugging is activated debugIsActive :: forall (m :: * -> *). (HasCallStack, MonadIO m) => m Bool debugIsActive = IO Bool -> m Bool forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO Bool -> m Bool) -> IO Bool -> m Bool forall a b. (a -> b) -> a -> b $ do CInt result <- IO CInt gst_debug_is_active let result' :: Bool result' = (CInt -> CInt -> Bool forall a. Eq a => a -> a -> Bool /= CInt 0) CInt result Bool -> IO Bool forall (m :: * -> *) a. Monad m => a -> m a return Bool result' -- function debug_get_stack_trace -- Args: [ Arg -- { argCName = "flags" -- , argType = -- TInterface Name { namespace = "Gst" , name = "StackTraceFlags" } -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = -- Just -- "A set of #GstStackTraceFlags to determine how the stack trace should\nlook like. Pass #GST_STACK_TRACE_SHOW_NONE to retrieve a minimal backtrace." -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Just (TBasicType TUTF8) -- throws : False -- Skip return : False foreign import ccall "gst_debug_get_stack_trace" gst_debug_get_stack_trace :: CUInt -> -- flags : TInterface (Name {namespace = "Gst", name = "StackTraceFlags"}) IO CString -- | /No description available in the introspection data./ -- -- /Since: 1.12/ debugGetStackTrace :: (B.CallStack.HasCallStack, MonadIO m) => [Gst.Flags.StackTraceFlags] -- ^ /@flags@/: A set of t'GI.Gst.Flags.StackTraceFlags' to determine how the stack trace should -- look like. Pass @/GST_STACK_TRACE_SHOW_NONE/@ to retrieve a minimal backtrace. -> m (Maybe T.Text) -- ^ __Returns:__ a stack trace, if libunwind or glibc backtrace are -- present, else 'P.Nothing'. debugGetStackTrace :: forall (m :: * -> *). (HasCallStack, MonadIO m) => [StackTraceFlags] -> m (Maybe Text) debugGetStackTrace [StackTraceFlags] flags = IO (Maybe Text) -> m (Maybe Text) forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO (Maybe Text) -> m (Maybe Text)) -> IO (Maybe Text) -> m (Maybe Text) forall a b. (a -> b) -> a -> b $ do let flags' :: CUInt flags' = [StackTraceFlags] -> CUInt forall b a. (Num b, IsGFlag a) => [a] -> b gflagsToWord [StackTraceFlags] flags CString result <- CUInt -> IO CString gst_debug_get_stack_trace CUInt flags' Maybe Text maybeResult <- CString -> (CString -> IO Text) -> IO (Maybe Text) forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b) convertIfNonNull CString result ((CString -> IO Text) -> IO (Maybe Text)) -> (CString -> IO Text) -> IO (Maybe Text) forall a b. (a -> b) -> a -> b $ \CString result' -> do Text result'' <- HasCallStack => CString -> IO Text CString -> IO Text cstringToText CString result' CString -> IO () forall a. Ptr a -> IO () freeMem CString result' Text -> IO Text forall (m :: * -> *) a. Monad m => a -> m a return Text result'' Maybe Text -> IO (Maybe Text) forall (m :: * -> *) a. Monad m => a -> m a return Maybe Text maybeResult -- function debug_get_default_threshold -- Args: [] -- Lengths: [] -- returnType: Just (TInterface Name { namespace = "Gst" , name = "DebugLevel" }) -- throws : False -- Skip return : False foreign import ccall "gst_debug_get_default_threshold" gst_debug_get_default_threshold :: IO CUInt -- | Returns the default threshold that is used for new categories. debugGetDefaultThreshold :: (B.CallStack.HasCallStack, MonadIO m) => m Gst.Enums.DebugLevel -- ^ __Returns:__ the default threshold level debugGetDefaultThreshold :: forall (m :: * -> *). (HasCallStack, MonadIO m) => m DebugLevel debugGetDefaultThreshold = IO DebugLevel -> m DebugLevel forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO DebugLevel -> m DebugLevel) -> IO DebugLevel -> m DebugLevel forall a b. (a -> b) -> a -> b $ do CUInt result <- IO CUInt gst_debug_get_default_threshold let result' :: DebugLevel result' = (Int -> DebugLevel forall a. Enum a => Int -> a toEnum (Int -> DebugLevel) -> (CUInt -> Int) -> CUInt -> DebugLevel forall b c a. (b -> c) -> (a -> b) -> a -> c . CUInt -> Int forall a b. (Integral a, Num b) => a -> b fromIntegral) CUInt result DebugLevel -> IO DebugLevel forall (m :: * -> *) a. Monad m => a -> m a return DebugLevel result' -- function debug_get_color_mode -- Args: [] -- Lengths: [] -- returnType: Just -- (TInterface Name { namespace = "Gst" , name = "DebugColorMode" }) -- throws : False -- Skip return : False foreign import ccall "gst_debug_get_color_mode" gst_debug_get_color_mode :: IO CUInt -- | Changes the coloring mode for debug output. -- -- /Since: 1.2/ debugGetColorMode :: (B.CallStack.HasCallStack, MonadIO m) => m Gst.Enums.DebugColorMode -- ^ __Returns:__ see /@gstDebugColorMode@/ for possible values. debugGetColorMode :: forall (m :: * -> *). (HasCallStack, MonadIO m) => m DebugColorMode debugGetColorMode = IO DebugColorMode -> m DebugColorMode forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO DebugColorMode -> m DebugColorMode) -> IO DebugColorMode -> m DebugColorMode forall a b. (a -> b) -> a -> b $ do CUInt result <- IO CUInt gst_debug_get_color_mode let result' :: DebugColorMode result' = (Int -> DebugColorMode forall a. Enum a => Int -> a toEnum (Int -> DebugColorMode) -> (CUInt -> Int) -> CUInt -> DebugColorMode forall b c a. (b -> c) -> (a -> b) -> a -> c . CUInt -> Int forall a b. (Integral a, Num b) => a -> b fromIntegral) CUInt result DebugColorMode -> IO DebugColorMode forall (m :: * -> *) a. Monad m => a -> m a return DebugColorMode result' -- function debug_get_all_categories -- Args: [] -- Lengths: [] -- returnType: Just -- (TGSList -- (TInterface Name { namespace = "Gst" , name = "DebugCategory" })) -- throws : False -- Skip return : False foreign import ccall "gst_debug_get_all_categories" gst_debug_get_all_categories :: IO (Ptr (GSList (Ptr Gst.DebugCategory.DebugCategory))) -- | Returns a snapshot of a all categories that are currently in use . This list -- may change anytime. -- The caller has to free the list after use. debugGetAllCategories :: (B.CallStack.HasCallStack, MonadIO m) => m [Gst.DebugCategory.DebugCategory] -- ^ __Returns:__ the list of -- debug categories debugGetAllCategories :: forall (m :: * -> *). (HasCallStack, MonadIO m) => m [DebugCategory] debugGetAllCategories = IO [DebugCategory] -> m [DebugCategory] forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO [DebugCategory] -> m [DebugCategory]) -> IO [DebugCategory] -> m [DebugCategory] forall a b. (a -> b) -> a -> b $ do Ptr (GSList (Ptr DebugCategory)) result <- IO (Ptr (GSList (Ptr DebugCategory))) gst_debug_get_all_categories [Ptr DebugCategory] result' <- Ptr (GSList (Ptr DebugCategory)) -> IO [Ptr DebugCategory] forall a. Ptr (GSList (Ptr a)) -> IO [Ptr a] unpackGSList Ptr (GSList (Ptr DebugCategory)) result [DebugCategory] result'' <- (Ptr DebugCategory -> IO DebugCategory) -> [Ptr DebugCategory] -> IO [DebugCategory] forall (t :: * -> *) (m :: * -> *) a b. (Traversable t, Monad m) => (a -> m b) -> t a -> m (t b) mapM ((ManagedPtr DebugCategory -> DebugCategory) -> Ptr DebugCategory -> IO DebugCategory forall a. (HasCallStack, BoxedPtr a) => (ManagedPtr a -> a) -> Ptr a -> IO a newPtr ManagedPtr DebugCategory -> DebugCategory Gst.DebugCategory.DebugCategory) [Ptr DebugCategory] result' Ptr (GSList (Ptr DebugCategory)) -> IO () forall a. Ptr (GSList a) -> IO () g_slist_free Ptr (GSList (Ptr DebugCategory)) result [DebugCategory] -> IO [DebugCategory] forall (m :: * -> *) a. Monad m => a -> m a return [DebugCategory] result'' -- function debug_construct_win_color -- Args: [ Arg -- { argCName = "colorinfo" -- , argType = TBasicType TUInt -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "the color info" , sinceVersion = Nothing } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Just (TBasicType TInt) -- throws : False -- Skip return : False foreign import ccall "gst_debug_construct_win_color" gst_debug_construct_win_color :: Word32 -> -- colorinfo : TBasicType TUInt IO Int32 -- | Constructs an integer that can be used for getting the desired color in -- windows\' terminals (cmd.exe). As there is no mean to underline, we simply -- ignore this attribute. -- -- This function returns 0 on non-windows machines. debugConstructWinColor :: (B.CallStack.HasCallStack, MonadIO m) => Word32 -- ^ /@colorinfo@/: the color info -> m Int32 -- ^ __Returns:__ an integer containing the color definition debugConstructWinColor :: forall (m :: * -> *). (HasCallStack, MonadIO m) => Word32 -> m Int32 debugConstructWinColor Word32 colorinfo = IO Int32 -> m Int32 forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO Int32 -> m Int32) -> IO Int32 -> m Int32 forall a b. (a -> b) -> a -> b $ do Int32 result <- Word32 -> IO Int32 gst_debug_construct_win_color Word32 colorinfo Int32 -> IO Int32 forall (m :: * -> *) a. Monad m => a -> m a return Int32 result -- function debug_construct_term_color -- Args: [ Arg -- { argCName = "colorinfo" -- , argType = TBasicType TUInt -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "the color info" , sinceVersion = Nothing } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Just (TBasicType TUTF8) -- throws : False -- Skip return : False foreign import ccall "gst_debug_construct_term_color" gst_debug_construct_term_color :: Word32 -> -- colorinfo : TBasicType TUInt IO CString -- | Constructs a string that can be used for getting the desired color in color -- terminals. -- You need to free the string after use. debugConstructTermColor :: (B.CallStack.HasCallStack, MonadIO m) => Word32 -- ^ /@colorinfo@/: the color info -> m T.Text -- ^ __Returns:__ a string containing the color -- definition debugConstructTermColor :: forall (m :: * -> *). (HasCallStack, MonadIO m) => Word32 -> m Text debugConstructTermColor Word32 colorinfo = IO Text -> m Text forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO Text -> m Text) -> IO Text -> m Text forall a b. (a -> b) -> a -> b $ do CString result <- Word32 -> IO CString gst_debug_construct_term_color Word32 colorinfo Text -> CString -> IO () forall a. HasCallStack => Text -> Ptr a -> IO () checkUnexpectedReturnNULL Text "debugConstructTermColor" CString result Text result' <- HasCallStack => CString -> IO Text CString -> IO Text cstringToText CString result CString -> IO () forall a. Ptr a -> IO () freeMem CString result Text -> IO Text forall (m :: * -> *) a. Monad m => a -> m a return Text result' -- function debug_bin_to_dot_file_with_ts -- Args: [ Arg -- { argCName = "bin" -- , argType = TInterface Name { namespace = "Gst" , name = "Bin" } -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = -- Just "the top-level pipeline that should be analyzed" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "details" -- , argType = -- TInterface Name { namespace = "Gst" , name = "DebugGraphDetails" } -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "type of #GstDebugGraphDetails to use" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "file_name" -- , argType = TBasicType TFileName -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "output base filename (e.g. \"myplayer\")" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Nothing -- throws : False -- Skip return : False foreign import ccall "gst_debug_bin_to_dot_file_with_ts" gst_debug_bin_to_dot_file_with_ts :: Ptr Gst.Bin.Bin -> -- bin : TInterface (Name {namespace = "Gst", name = "Bin"}) CUInt -> -- details : TInterface (Name {namespace = "Gst", name = "DebugGraphDetails"}) CString -> -- file_name : TBasicType TFileName IO () -- | This works like 'GI.Gst.Functions.debugBinToDotFile', but adds the current timestamp -- to the filename, so that it can be used to take multiple snapshots. debugBinToDotFileWithTs :: (B.CallStack.HasCallStack, MonadIO m, Gst.Bin.IsBin a) => a -- ^ /@bin@/: the top-level pipeline that should be analyzed -> [Gst.Flags.DebugGraphDetails] -- ^ /@details@/: type of t'GI.Gst.Flags.DebugGraphDetails' to use -> [Char] -- ^ /@fileName@/: output base filename (e.g. \"myplayer\") -> m () debugBinToDotFileWithTs :: forall (m :: * -> *) a. (HasCallStack, MonadIO m, IsBin a) => a -> [DebugGraphDetails] -> [Char] -> m () debugBinToDotFileWithTs a bin [DebugGraphDetails] details [Char] fileName = IO () -> m () forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO () -> m ()) -> IO () -> m () forall a b. (a -> b) -> a -> b $ do Ptr Bin bin' <- a -> IO (Ptr Bin) forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b) unsafeManagedPtrCastPtr a bin let details' :: CUInt details' = [DebugGraphDetails] -> CUInt forall b a. (Num b, IsGFlag a) => [a] -> b gflagsToWord [DebugGraphDetails] details CString fileName' <- [Char] -> IO CString stringToCString [Char] fileName Ptr Bin -> CUInt -> CString -> IO () gst_debug_bin_to_dot_file_with_ts Ptr Bin bin' CUInt details' CString fileName' a -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr a bin CString -> IO () forall a. Ptr a -> IO () freeMem CString fileName' () -> IO () forall (m :: * -> *) a. Monad m => a -> m a return () -- function debug_bin_to_dot_file -- Args: [ Arg -- { argCName = "bin" -- , argType = TInterface Name { namespace = "Gst" , name = "Bin" } -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = -- Just "the top-level pipeline that should be analyzed" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "details" -- , argType = -- TInterface Name { namespace = "Gst" , name = "DebugGraphDetails" } -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "type of #GstDebugGraphDetails to use" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "file_name" -- , argType = TBasicType TFileName -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "output base filename (e.g. \"myplayer\")" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Nothing -- throws : False -- Skip return : False foreign import ccall "gst_debug_bin_to_dot_file" gst_debug_bin_to_dot_file :: Ptr Gst.Bin.Bin -> -- bin : TInterface (Name {namespace = "Gst", name = "Bin"}) CUInt -> -- details : TInterface (Name {namespace = "Gst", name = "DebugGraphDetails"}) CString -> -- file_name : TBasicType TFileName IO () -- | To aid debugging applications one can use this method to write out the whole -- network of gstreamer elements that form the pipeline into an dot file. -- This file can be processed with graphviz to get an image. -- -- \`\`@ shell -- dot -Tpng -oimage.png graph_lowlevel.dot -- @\`\` debugBinToDotFile :: (B.CallStack.HasCallStack, MonadIO m, Gst.Bin.IsBin a) => a -- ^ /@bin@/: the top-level pipeline that should be analyzed -> [Gst.Flags.DebugGraphDetails] -- ^ /@details@/: type of t'GI.Gst.Flags.DebugGraphDetails' to use -> [Char] -- ^ /@fileName@/: output base filename (e.g. \"myplayer\") -> m () debugBinToDotFile :: forall (m :: * -> *) a. (HasCallStack, MonadIO m, IsBin a) => a -> [DebugGraphDetails] -> [Char] -> m () debugBinToDotFile a bin [DebugGraphDetails] details [Char] fileName = IO () -> m () forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO () -> m ()) -> IO () -> m () forall a b. (a -> b) -> a -> b $ do Ptr Bin bin' <- a -> IO (Ptr Bin) forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b) unsafeManagedPtrCastPtr a bin let details' :: CUInt details' = [DebugGraphDetails] -> CUInt forall b a. (Num b, IsGFlag a) => [a] -> b gflagsToWord [DebugGraphDetails] details CString fileName' <- [Char] -> IO CString stringToCString [Char] fileName Ptr Bin -> CUInt -> CString -> IO () gst_debug_bin_to_dot_file Ptr Bin bin' CUInt details' CString fileName' a -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr a bin CString -> IO () forall a. Ptr a -> IO () freeMem CString fileName' () -> IO () forall (m :: * -> *) a. Monad m => a -> m a return () -- function debug_bin_to_dot_data -- Args: [ Arg -- { argCName = "bin" -- , argType = TInterface Name { namespace = "Gst" , name = "Bin" } -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = -- Just "the top-level pipeline that should be analyzed" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "details" -- , argType = -- TInterface Name { namespace = "Gst" , name = "DebugGraphDetails" } -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "type of #GstDebugGraphDetails to use" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Just (TBasicType TUTF8) -- throws : False -- Skip return : False foreign import ccall "gst_debug_bin_to_dot_data" gst_debug_bin_to_dot_data :: Ptr Gst.Bin.Bin -> -- bin : TInterface (Name {namespace = "Gst", name = "Bin"}) CUInt -> -- details : TInterface (Name {namespace = "Gst", name = "DebugGraphDetails"}) IO CString -- | To aid debugging applications one can use this method to obtain the whole -- network of gstreamer elements that form the pipeline into an dot file. -- This data can be processed with graphviz to get an image. debugBinToDotData :: (B.CallStack.HasCallStack, MonadIO m, Gst.Bin.IsBin a) => a -- ^ /@bin@/: the top-level pipeline that should be analyzed -> [Gst.Flags.DebugGraphDetails] -- ^ /@details@/: type of t'GI.Gst.Flags.DebugGraphDetails' to use -> m T.Text -- ^ __Returns:__ a string containing the pipeline in graphviz -- dot format. debugBinToDotData :: forall (m :: * -> *) a. (HasCallStack, MonadIO m, IsBin a) => a -> [DebugGraphDetails] -> m Text debugBinToDotData a bin [DebugGraphDetails] details = IO Text -> m Text forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO Text -> m Text) -> IO Text -> m Text forall a b. (a -> b) -> a -> b $ do Ptr Bin bin' <- a -> IO (Ptr Bin) forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b) unsafeManagedPtrCastPtr a bin let details' :: CUInt details' = [DebugGraphDetails] -> CUInt forall b a. (Num b, IsGFlag a) => [a] -> b gflagsToWord [DebugGraphDetails] details CString result <- Ptr Bin -> CUInt -> IO CString gst_debug_bin_to_dot_data Ptr Bin bin' CUInt details' Text -> CString -> IO () forall a. HasCallStack => Text -> Ptr a -> IO () checkUnexpectedReturnNULL Text "debugBinToDotData" CString result Text result' <- HasCallStack => CString -> IO Text CString -> IO Text cstringToText CString result CString -> IO () forall a. Ptr a -> IO () freeMem CString result a -> IO () forall a. ManagedPtrNewtype a => a -> IO () touchManagedPtr a bin Text -> IO Text forall (m :: * -> *) a. Monad m => a -> m a return Text result' -- function debug_add_ring_buffer_logger -- Args: [ Arg -- { argCName = "max_size_per_thread" -- , argType = TBasicType TUInt -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "Maximum size of log per thread in bytes" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "thread_timeout" -- , argType = TBasicType TUInt -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "Timeout for threads in seconds" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Nothing -- throws : False -- Skip return : False foreign import ccall "gst_debug_add_ring_buffer_logger" gst_debug_add_ring_buffer_logger :: Word32 -> -- max_size_per_thread : TBasicType TUInt Word32 -> -- thread_timeout : TBasicType TUInt IO () -- | Adds a memory ringbuffer based debug logger that stores up to -- /@maxSizePerThread@/ bytes of logs per thread and times out threads after -- /@threadTimeout@/ seconds of inactivity. -- -- Logs can be fetched with 'GI.Gst.Functions.debugRingBufferLoggerGetLogs' and the -- logger can be removed again with 'GI.Gst.Functions.debugRemoveRingBufferLogger'. -- Only one logger at a time is possible. -- -- /Since: 1.14/ debugAddRingBufferLogger :: (B.CallStack.HasCallStack, MonadIO m) => Word32 -- ^ /@maxSizePerThread@/: Maximum size of log per thread in bytes -> Word32 -- ^ /@threadTimeout@/: Timeout for threads in seconds -> m () debugAddRingBufferLogger :: forall (m :: * -> *). (HasCallStack, MonadIO m) => Word32 -> Word32 -> m () debugAddRingBufferLogger Word32 maxSizePerThread Word32 threadTimeout = IO () -> m () forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO () -> m ()) -> IO () -> m () forall a b. (a -> b) -> a -> b $ do Word32 -> Word32 -> IO () gst_debug_add_ring_buffer_logger Word32 maxSizePerThread Word32 threadTimeout () -> IO () forall (m :: * -> *) a. Monad m => a -> m a return () -- function debug_add_log_function -- Args: [ Arg -- { argCName = "func" -- , argType = -- TInterface Name { namespace = "Gst" , name = "LogFunction" } -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "the function to use" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeNotified -- , argClosure = 1 -- , argDestroy = 2 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "user_data" -- , argType = TBasicType TPtr -- , direction = DirectionIn -- , mayBeNull = True -- , argDoc = -- Documentation -- { rawDocText = Just "user data" , sinceVersion = Nothing } -- , argScope = ScopeTypeInvalid -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- , Arg -- { argCName = "notify" -- , argType = -- TInterface Name { namespace = "GLib" , name = "DestroyNotify" } -- , direction = DirectionIn -- , mayBeNull = False -- , argDoc = -- Documentation -- { rawDocText = Just "called when @user_data is not used anymore" -- , sinceVersion = Nothing -- } -- , argScope = ScopeTypeAsync -- , argClosure = -1 -- , argDestroy = -1 -- , argCallerAllocates = False -- , transfer = TransferNothing -- } -- ] -- Lengths: [] -- returnType: Nothing -- throws : False -- Skip return : False foreign import ccall "gst_debug_add_log_function" gst_debug_add_log_function :: FunPtr Gst.Callbacks.C_LogFunction -> -- func : TInterface (Name {namespace = "Gst", name = "LogFunction"}) Ptr () -> -- user_data : TBasicType TPtr FunPtr GLib.Callbacks.C_DestroyNotify -> -- notify : TInterface (Name {namespace = "GLib", name = "DestroyNotify"}) IO () -- | Adds the logging function to the list of logging functions. -- Be sure to use @/G_GNUC_NO_INSTRUMENT/@ on that function, it is needed. debugAddLogFunction :: (B.CallStack.HasCallStack, MonadIO m) => Gst.Callbacks.LogFunction -- ^ /@func@/: the function to use -> m () debugAddLogFunction :: forall (m :: * -> *). (HasCallStack, MonadIO m) => LogFunction -> m () debugAddLogFunction LogFunction func = IO () -> m () forall (m :: * -> *) a. MonadIO m => IO a -> m a liftIO (IO () -> m ()) -> IO () -> m () forall a b. (a -> b) -> a -> b $ do FunPtr C_LogFunction func' <- C_LogFunction -> IO (FunPtr C_LogFunction) Gst.Callbacks.mk_LogFunction (Maybe (Ptr (FunPtr C_LogFunction)) -> LogFunction_WithClosures -> C_LogFunction Gst.Callbacks.wrap_LogFunction Maybe (Ptr (FunPtr C_LogFunction)) forall a. Maybe a Nothing (LogFunction -> LogFunction_WithClosures Gst.Callbacks.drop_closures_LogFunction LogFunction func)) let userData :: Ptr () userData = FunPtr C_LogFunction -> Ptr () forall a b. FunPtr a -> Ptr b castFunPtrToPtr FunPtr C_LogFunction func' let notify :: FunPtr (Ptr a -> IO ()) notify = FunPtr (Ptr a -> IO ()) forall a. FunPtr (Ptr a -> IO ()) SP.safeFreeFunPtrPtr FunPtr C_LogFunction -> Ptr () -> FunPtr C_DestroyNotify -> IO () gst_debug_add_log_function FunPtr C_LogFunction func' Ptr () userData FunPtr C_DestroyNotify forall a. FunPtr (Ptr a -> IO ()) notify () -> IO () forall (m :: * -> *) a. Monad m => a -> m a return ()