{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.Gst.Structs.Query
(
Query(..) ,
newZeroQuery ,
#if defined(ENABLE_OVERLOADING)
ResolveQueryMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
QueryAddAllocationMetaMethodInfo ,
#endif
queryAddAllocationMeta ,
#if defined(ENABLE_OVERLOADING)
QueryAddAllocationParamMethodInfo ,
#endif
queryAddAllocationParam ,
#if defined(ENABLE_OVERLOADING)
QueryAddAllocationPoolMethodInfo ,
#endif
queryAddAllocationPool ,
#if defined(ENABLE_OVERLOADING)
QueryAddBufferingRangeMethodInfo ,
#endif
queryAddBufferingRange ,
#if defined(ENABLE_OVERLOADING)
QueryAddSchedulingModeMethodInfo ,
#endif
queryAddSchedulingMode ,
#if defined(ENABLE_OVERLOADING)
QueryFindAllocationMetaMethodInfo ,
#endif
queryFindAllocationMeta ,
#if defined(ENABLE_OVERLOADING)
QueryGetNAllocationMetasMethodInfo ,
#endif
queryGetNAllocationMetas ,
#if defined(ENABLE_OVERLOADING)
QueryGetNAllocationParamsMethodInfo ,
#endif
queryGetNAllocationParams ,
#if defined(ENABLE_OVERLOADING)
QueryGetNAllocationPoolsMethodInfo ,
#endif
queryGetNAllocationPools ,
#if defined(ENABLE_OVERLOADING)
QueryGetNBufferingRangesMethodInfo ,
#endif
queryGetNBufferingRanges ,
#if defined(ENABLE_OVERLOADING)
QueryGetNSchedulingModesMethodInfo ,
#endif
queryGetNSchedulingModes ,
#if defined(ENABLE_OVERLOADING)
QueryGetStructureMethodInfo ,
#endif
queryGetStructure ,
#if defined(ENABLE_OVERLOADING)
QueryHasSchedulingModeMethodInfo ,
#endif
queryHasSchedulingMode ,
#if defined(ENABLE_OVERLOADING)
QueryHasSchedulingModeWithFlagsMethodInfo,
#endif
queryHasSchedulingModeWithFlags ,
queryNewAcceptCaps ,
queryNewAllocation ,
queryNewBitrate ,
queryNewBuffering ,
queryNewCaps ,
queryNewContext ,
queryNewConvert ,
queryNewCustom ,
queryNewDrain ,
queryNewDuration ,
queryNewFormats ,
queryNewLatency ,
queryNewPosition ,
queryNewScheduling ,
queryNewSeeking ,
queryNewSegment ,
queryNewUri ,
#if defined(ENABLE_OVERLOADING)
QueryParseAcceptCapsMethodInfo ,
#endif
queryParseAcceptCaps ,
#if defined(ENABLE_OVERLOADING)
QueryParseAcceptCapsResultMethodInfo ,
#endif
queryParseAcceptCapsResult ,
#if defined(ENABLE_OVERLOADING)
QueryParseAllocationMethodInfo ,
#endif
queryParseAllocation ,
#if defined(ENABLE_OVERLOADING)
QueryParseBitrateMethodInfo ,
#endif
queryParseBitrate ,
#if defined(ENABLE_OVERLOADING)
QueryParseBufferingPercentMethodInfo ,
#endif
queryParseBufferingPercent ,
#if defined(ENABLE_OVERLOADING)
QueryParseBufferingRangeMethodInfo ,
#endif
queryParseBufferingRange ,
#if defined(ENABLE_OVERLOADING)
QueryParseBufferingStatsMethodInfo ,
#endif
queryParseBufferingStats ,
#if defined(ENABLE_OVERLOADING)
QueryParseCapsMethodInfo ,
#endif
queryParseCaps ,
#if defined(ENABLE_OVERLOADING)
QueryParseCapsResultMethodInfo ,
#endif
queryParseCapsResult ,
#if defined(ENABLE_OVERLOADING)
QueryParseContextMethodInfo ,
#endif
queryParseContext ,
#if defined(ENABLE_OVERLOADING)
QueryParseContextTypeMethodInfo ,
#endif
queryParseContextType ,
#if defined(ENABLE_OVERLOADING)
QueryParseConvertMethodInfo ,
#endif
queryParseConvert ,
#if defined(ENABLE_OVERLOADING)
QueryParseDurationMethodInfo ,
#endif
queryParseDuration ,
#if defined(ENABLE_OVERLOADING)
QueryParseLatencyMethodInfo ,
#endif
queryParseLatency ,
#if defined(ENABLE_OVERLOADING)
QueryParseNFormatsMethodInfo ,
#endif
queryParseNFormats ,
#if defined(ENABLE_OVERLOADING)
QueryParseNthAllocationMetaMethodInfo ,
#endif
queryParseNthAllocationMeta ,
#if defined(ENABLE_OVERLOADING)
QueryParseNthAllocationParamMethodInfo ,
#endif
queryParseNthAllocationParam ,
#if defined(ENABLE_OVERLOADING)
QueryParseNthAllocationPoolMethodInfo ,
#endif
queryParseNthAllocationPool ,
#if defined(ENABLE_OVERLOADING)
QueryParseNthBufferingRangeMethodInfo ,
#endif
queryParseNthBufferingRange ,
#if defined(ENABLE_OVERLOADING)
QueryParseNthFormatMethodInfo ,
#endif
queryParseNthFormat ,
#if defined(ENABLE_OVERLOADING)
QueryParseNthSchedulingModeMethodInfo ,
#endif
queryParseNthSchedulingMode ,
#if defined(ENABLE_OVERLOADING)
QueryParsePositionMethodInfo ,
#endif
queryParsePosition ,
#if defined(ENABLE_OVERLOADING)
QueryParseSchedulingMethodInfo ,
#endif
queryParseScheduling ,
#if defined(ENABLE_OVERLOADING)
QueryParseSeekingMethodInfo ,
#endif
queryParseSeeking ,
#if defined(ENABLE_OVERLOADING)
QueryParseSegmentMethodInfo ,
#endif
queryParseSegment ,
#if defined(ENABLE_OVERLOADING)
QueryParseUriMethodInfo ,
#endif
queryParseUri ,
#if defined(ENABLE_OVERLOADING)
QueryParseUriRedirectionMethodInfo ,
#endif
queryParseUriRedirection ,
#if defined(ENABLE_OVERLOADING)
QueryParseUriRedirectionPermanentMethodInfo,
#endif
queryParseUriRedirectionPermanent ,
#if defined(ENABLE_OVERLOADING)
QueryRemoveNthAllocationMetaMethodInfo ,
#endif
queryRemoveNthAllocationMeta ,
#if defined(ENABLE_OVERLOADING)
QueryRemoveNthAllocationParamMethodInfo ,
#endif
queryRemoveNthAllocationParam ,
#if defined(ENABLE_OVERLOADING)
QueryRemoveNthAllocationPoolMethodInfo ,
#endif
queryRemoveNthAllocationPool ,
#if defined(ENABLE_OVERLOADING)
QuerySetAcceptCapsResultMethodInfo ,
#endif
querySetAcceptCapsResult ,
#if defined(ENABLE_OVERLOADING)
QuerySetBitrateMethodInfo ,
#endif
querySetBitrate ,
#if defined(ENABLE_OVERLOADING)
QuerySetBufferingPercentMethodInfo ,
#endif
querySetBufferingPercent ,
#if defined(ENABLE_OVERLOADING)
QuerySetBufferingRangeMethodInfo ,
#endif
querySetBufferingRange ,
#if defined(ENABLE_OVERLOADING)
QuerySetBufferingStatsMethodInfo ,
#endif
querySetBufferingStats ,
#if defined(ENABLE_OVERLOADING)
QuerySetCapsResultMethodInfo ,
#endif
querySetCapsResult ,
#if defined(ENABLE_OVERLOADING)
QuerySetContextMethodInfo ,
#endif
querySetContext ,
#if defined(ENABLE_OVERLOADING)
QuerySetConvertMethodInfo ,
#endif
querySetConvert ,
#if defined(ENABLE_OVERLOADING)
QuerySetDurationMethodInfo ,
#endif
querySetDuration ,
#if defined(ENABLE_OVERLOADING)
QuerySetFormatsvMethodInfo ,
#endif
querySetFormatsv ,
#if defined(ENABLE_OVERLOADING)
QuerySetLatencyMethodInfo ,
#endif
querySetLatency ,
#if defined(ENABLE_OVERLOADING)
QuerySetNthAllocationParamMethodInfo ,
#endif
querySetNthAllocationParam ,
#if defined(ENABLE_OVERLOADING)
QuerySetNthAllocationPoolMethodInfo ,
#endif
querySetNthAllocationPool ,
#if defined(ENABLE_OVERLOADING)
QuerySetPositionMethodInfo ,
#endif
querySetPosition ,
#if defined(ENABLE_OVERLOADING)
QuerySetSchedulingMethodInfo ,
#endif
querySetScheduling ,
#if defined(ENABLE_OVERLOADING)
QuerySetSeekingMethodInfo ,
#endif
querySetSeeking ,
#if defined(ENABLE_OVERLOADING)
QuerySetSegmentMethodInfo ,
#endif
querySetSegment ,
#if defined(ENABLE_OVERLOADING)
QuerySetUriMethodInfo ,
#endif
querySetUri ,
#if defined(ENABLE_OVERLOADING)
QuerySetUriRedirectionMethodInfo ,
#endif
querySetUriRedirection ,
#if defined(ENABLE_OVERLOADING)
QuerySetUriRedirectionPermanentMethodInfo,
#endif
querySetUriRedirectionPermanent ,
#if defined(ENABLE_OVERLOADING)
QueryWritableStructureMethodInfo ,
#endif
queryWritableStructure ,
getQueryMiniObject ,
#if defined(ENABLE_OVERLOADING)
query_miniObject ,
#endif
getQueryType ,
#if defined(ENABLE_OVERLOADING)
query_type ,
#endif
setQueryType ,
) 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.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 {-# SOURCE #-} qualified GI.Gst.Enums as Gst.Enums
import {-# SOURCE #-} qualified GI.Gst.Flags as Gst.Flags
import {-# SOURCE #-} qualified GI.Gst.Objects.Allocator as Gst.Allocator
import {-# SOURCE #-} qualified GI.Gst.Objects.BufferPool as Gst.BufferPool
import {-# SOURCE #-} qualified GI.Gst.Structs.AllocationParams as Gst.AllocationParams
import {-# SOURCE #-} qualified GI.Gst.Structs.Caps as Gst.Caps
import {-# SOURCE #-} qualified GI.Gst.Structs.Context as Gst.Context
import {-# SOURCE #-} qualified GI.Gst.Structs.MiniObject as Gst.MiniObject
import {-# SOURCE #-} qualified GI.Gst.Structs.Structure as Gst.Structure
newtype Query = Query (SP.ManagedPtr Query)
deriving (Query -> Query -> Bool
(Query -> Query -> Bool) -> (Query -> Query -> Bool) -> Eq Query
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Query -> Query -> Bool
$c/= :: Query -> Query -> Bool
== :: Query -> Query -> Bool
$c== :: Query -> Query -> Bool
Eq)
instance SP.ManagedPtrNewtype Query where
toManagedPtr :: Query -> ManagedPtr Query
toManagedPtr (Query ManagedPtr Query
p) = ManagedPtr Query
p
foreign import ccall "gst_query_get_type" c_gst_query_get_type ::
IO GType
type instance O.ParentTypes Query = '[]
instance O.HasParentTypes Query
instance B.Types.TypedObject Query where
glibType :: IO GType
glibType = IO GType
c_gst_query_get_type
instance B.Types.GBoxed Query
instance B.GValue.IsGValue Query where
toGValue :: Query -> IO GValue
toGValue Query
o = do
GType
gtype <- IO GType
c_gst_query_get_type
Query -> (Ptr Query -> IO GValue) -> IO GValue
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr Query
o (GType -> (GValue -> Ptr Query -> IO ()) -> Ptr Query -> IO GValue
forall a. GType -> (GValue -> a -> IO ()) -> a -> IO GValue
B.GValue.buildGValue GType
gtype GValue -> Ptr Query -> IO ()
forall a. GValue -> Ptr a -> IO ()
B.GValue.set_boxed)
fromGValue :: GValue -> IO Query
fromGValue GValue
gv = do
Ptr Query
ptr <- GValue -> IO (Ptr Query)
forall b. GValue -> IO (Ptr b)
B.GValue.get_boxed GValue
gv :: IO (Ptr Query)
(ManagedPtr Query -> Query) -> Ptr Query -> IO Query
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
B.ManagedPtr.newBoxed ManagedPtr Query -> Query
Query Ptr Query
ptr
newZeroQuery :: MonadIO m => m Query
newZeroQuery :: m Query
newZeroQuery = IO Query -> m Query
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Query -> m Query) -> IO Query -> m Query
forall a b. (a -> b) -> a -> b
$ Int -> IO (Ptr Query)
forall a. GBoxed a => Int -> IO (Ptr a)
callocBoxedBytes Int
72 IO (Ptr Query) -> (Ptr Query -> IO Query) -> IO Query
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= (ManagedPtr Query -> Query) -> Ptr Query -> IO Query
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Query -> Query
Query
instance tag ~ 'AttrSet => Constructible Query tag where
new :: (ManagedPtr Query -> Query) -> [AttrOp Query tag] -> m Query
new ManagedPtr Query -> Query
_ [AttrOp Query tag]
attrs = do
Query
o <- m Query
forall (m :: * -> *). MonadIO m => m Query
newZeroQuery
Query -> [AttrOp Query 'AttrSet] -> m ()
forall o (m :: * -> *).
MonadIO m =>
o -> [AttrOp o 'AttrSet] -> m ()
GI.Attributes.set Query
o [AttrOp Query tag]
[AttrOp Query 'AttrSet]
attrs
Query -> m Query
forall (m :: * -> *) a. Monad m => a -> m a
return Query
o
getQueryMiniObject :: MonadIO m => Query -> m Gst.MiniObject.MiniObject
getQueryMiniObject :: Query -> m MiniObject
getQueryMiniObject Query
s = IO MiniObject -> m MiniObject
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO MiniObject -> m MiniObject) -> IO MiniObject -> m MiniObject
forall a b. (a -> b) -> a -> b
$ Query -> (Ptr Query -> IO MiniObject) -> IO MiniObject
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr Query
s ((Ptr Query -> IO MiniObject) -> IO MiniObject)
-> (Ptr Query -> IO MiniObject) -> IO MiniObject
forall a b. (a -> b) -> a -> b
$ \Ptr Query
ptr -> do
let val :: Ptr MiniObject
val = Ptr Query
ptr Ptr Query -> Int -> Ptr MiniObject
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
0 :: (Ptr Gst.MiniObject.MiniObject)
MiniObject
val' <- ((ManagedPtr MiniObject -> MiniObject)
-> Ptr MiniObject -> IO MiniObject
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newPtr ManagedPtr MiniObject -> MiniObject
Gst.MiniObject.MiniObject) Ptr MiniObject
val
MiniObject -> IO MiniObject
forall (m :: * -> *) a. Monad m => a -> m a
return MiniObject
val'
#if defined(ENABLE_OVERLOADING)
data QueryMiniObjectFieldInfo
instance AttrInfo QueryMiniObjectFieldInfo where
type AttrBaseTypeConstraint QueryMiniObjectFieldInfo = (~) Query
type AttrAllowedOps QueryMiniObjectFieldInfo = '[ 'AttrGet]
type AttrSetTypeConstraint QueryMiniObjectFieldInfo = (~) (Ptr Gst.MiniObject.MiniObject)
type AttrTransferTypeConstraint QueryMiniObjectFieldInfo = (~)(Ptr Gst.MiniObject.MiniObject)
type AttrTransferType QueryMiniObjectFieldInfo = (Ptr Gst.MiniObject.MiniObject)
type AttrGetType QueryMiniObjectFieldInfo = Gst.MiniObject.MiniObject
type AttrLabel QueryMiniObjectFieldInfo = "mini_object"
type AttrOrigin QueryMiniObjectFieldInfo = Query
attrGet = getQueryMiniObject
attrSet = undefined
attrConstruct = undefined
attrClear = undefined
attrTransfer = undefined
query_miniObject :: AttrLabelProxy "miniObject"
query_miniObject = AttrLabelProxy
#endif
getQueryType :: MonadIO m => Query -> m Gst.Enums.QueryType
getQueryType :: Query -> m QueryType
getQueryType Query
s = IO QueryType -> m QueryType
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO QueryType -> m QueryType) -> IO QueryType -> m QueryType
forall a b. (a -> b) -> a -> b
$ Query -> (Ptr Query -> IO QueryType) -> IO QueryType
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr Query
s ((Ptr Query -> IO QueryType) -> IO QueryType)
-> (Ptr Query -> IO QueryType) -> IO QueryType
forall a b. (a -> b) -> a -> b
$ \Ptr Query
ptr -> do
CUInt
val <- Ptr CUInt -> IO CUInt
forall a. Storable a => Ptr a -> IO a
peek (Ptr Query
ptr Ptr Query -> Int -> Ptr CUInt
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
64) :: IO CUInt
let val' :: QueryType
val' = (Int -> QueryType
forall a. Enum a => Int -> a
toEnum (Int -> QueryType) -> (CUInt -> Int) -> CUInt -> QueryType
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
val
QueryType -> IO QueryType
forall (m :: * -> *) a. Monad m => a -> m a
return QueryType
val'
setQueryType :: MonadIO m => Query -> Gst.Enums.QueryType -> m ()
setQueryType :: Query -> QueryType -> m ()
setQueryType Query
s QueryType
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ Query -> (Ptr Query -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr Query
s ((Ptr Query -> IO ()) -> IO ()) -> (Ptr Query -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr Query
ptr -> do
let val' :: CUInt
val' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (QueryType -> Int) -> QueryType -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. QueryType -> Int
forall a. Enum a => a -> Int
fromEnum) QueryType
val
Ptr CUInt -> CUInt -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr Query
ptr Ptr Query -> Int -> Ptr CUInt
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
64) (CUInt
val' :: CUInt)
#if defined(ENABLE_OVERLOADING)
data QueryTypeFieldInfo
instance AttrInfo QueryTypeFieldInfo where
type AttrBaseTypeConstraint QueryTypeFieldInfo = (~) Query
type AttrAllowedOps QueryTypeFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint QueryTypeFieldInfo = (~) Gst.Enums.QueryType
type AttrTransferTypeConstraint QueryTypeFieldInfo = (~)Gst.Enums.QueryType
type AttrTransferType QueryTypeFieldInfo = Gst.Enums.QueryType
type AttrGetType QueryTypeFieldInfo = Gst.Enums.QueryType
type AttrLabel QueryTypeFieldInfo = "type"
type AttrOrigin QueryTypeFieldInfo = Query
attrGet = getQueryType
attrSet = setQueryType
attrConstruct = undefined
attrClear = undefined
attrTransfer _ v = do
return v
query_type :: AttrLabelProxy "type"
query_type = AttrLabelProxy
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList Query
type instance O.AttributeList Query = QueryAttributeList
type QueryAttributeList = ('[ '("miniObject", QueryMiniObjectFieldInfo), '("type", QueryTypeFieldInfo)] :: [(Symbol, *)])
#endif
foreign import ccall "gst_query_new_accept_caps" gst_query_new_accept_caps ::
Ptr Gst.Caps.Caps ->
IO (Ptr Query)
queryNewAcceptCaps ::
(B.CallStack.HasCallStack, MonadIO m) =>
Gst.Caps.Caps
-> m Query
queryNewAcceptCaps :: Caps -> m Query
queryNewAcceptCaps Caps
caps = IO Query -> m Query
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Query -> m Query) -> IO Query -> m Query
forall a b. (a -> b) -> a -> b
$ do
Ptr Caps
caps' <- Caps -> IO (Ptr Caps)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Caps
caps
Ptr Query
result <- Ptr Caps -> IO (Ptr Query)
gst_query_new_accept_caps Ptr Caps
caps'
Text -> Ptr Query -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"queryNewAcceptCaps" Ptr Query
result
Query
result' <- ((ManagedPtr Query -> Query) -> Ptr Query -> IO Query
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Query -> Query
Query) Ptr Query
result
Caps -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Caps
caps
Query -> IO Query
forall (m :: * -> *) a. Monad m => a -> m a
return Query
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "gst_query_new_allocation" gst_query_new_allocation ::
Ptr Gst.Caps.Caps ->
CInt ->
IO (Ptr Query)
queryNewAllocation ::
(B.CallStack.HasCallStack, MonadIO m) =>
Gst.Caps.Caps
-> Bool
-> m Query
queryNewAllocation :: Caps -> Bool -> m Query
queryNewAllocation Caps
caps Bool
needPool = IO Query -> m Query
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Query -> m Query) -> IO Query -> m Query
forall a b. (a -> b) -> a -> b
$ do
Ptr Caps
caps' <- Caps -> IO (Ptr Caps)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Caps
caps
let needPool' :: CInt
needPool' = (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
needPool
Ptr Query
result <- Ptr Caps -> CInt -> IO (Ptr Query)
gst_query_new_allocation Ptr Caps
caps' CInt
needPool'
Text -> Ptr Query -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"queryNewAllocation" Ptr Query
result
Query
result' <- ((ManagedPtr Query -> Query) -> Ptr Query -> IO Query
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Query -> Query
Query) Ptr Query
result
Caps -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Caps
caps
Query -> IO Query
forall (m :: * -> *) a. Monad m => a -> m a
return Query
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "gst_query_new_bitrate" gst_query_new_bitrate ::
IO (Ptr Query)
queryNewBitrate ::
(B.CallStack.HasCallStack, MonadIO m) =>
m Query
queryNewBitrate :: m Query
queryNewBitrate = IO Query -> m Query
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Query -> m Query) -> IO Query -> m Query
forall a b. (a -> b) -> a -> b
$ do
Ptr Query
result <- IO (Ptr Query)
gst_query_new_bitrate
Text -> Ptr Query -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"queryNewBitrate" Ptr Query
result
Query
result' <- ((ManagedPtr Query -> Query) -> Ptr Query -> IO Query
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Query -> Query
Query) Ptr Query
result
Query -> IO Query
forall (m :: * -> *) a. Monad m => a -> m a
return Query
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "gst_query_new_buffering" gst_query_new_buffering ::
CUInt ->
IO (Ptr Query)
queryNewBuffering ::
(B.CallStack.HasCallStack, MonadIO m) =>
Gst.Enums.Format
-> m Query
queryNewBuffering :: Format -> m Query
queryNewBuffering Format
format = IO Query -> m Query
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Query -> m Query) -> IO Query -> m Query
forall a b. (a -> b) -> a -> b
$ do
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
Ptr Query
result <- CUInt -> IO (Ptr Query)
gst_query_new_buffering CUInt
format'
Text -> Ptr Query -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"queryNewBuffering" Ptr Query
result
Query
result' <- ((ManagedPtr Query -> Query) -> Ptr Query -> IO Query
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Query -> Query
Query) Ptr Query
result
Query -> IO Query
forall (m :: * -> *) a. Monad m => a -> m a
return Query
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "gst_query_new_caps" gst_query_new_caps ::
Ptr Gst.Caps.Caps ->
IO (Ptr Query)
queryNewCaps ::
(B.CallStack.HasCallStack, MonadIO m) =>
Gst.Caps.Caps
-> m Query
queryNewCaps :: Caps -> m Query
queryNewCaps Caps
filter = IO Query -> m Query
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Query -> m Query) -> IO Query -> m Query
forall a b. (a -> b) -> a -> b
$ do
Ptr Caps
filter' <- Caps -> IO (Ptr Caps)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Caps
filter
Ptr Query
result <- Ptr Caps -> IO (Ptr Query)
gst_query_new_caps Ptr Caps
filter'
Text -> Ptr Query -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"queryNewCaps" Ptr Query
result
Query
result' <- ((ManagedPtr Query -> Query) -> Ptr Query -> IO Query
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Query -> Query
Query) Ptr Query
result
Caps -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Caps
filter
Query -> IO Query
forall (m :: * -> *) a. Monad m => a -> m a
return Query
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "gst_query_new_context" gst_query_new_context ::
CString ->
IO (Ptr Query)
queryNewContext ::
(B.CallStack.HasCallStack, MonadIO m) =>
T.Text
-> m Query
queryNewContext :: Text -> m Query
queryNewContext Text
contextType = IO Query -> m Query
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Query -> m Query) -> IO Query -> m Query
forall a b. (a -> b) -> a -> b
$ do
CString
contextType' <- Text -> IO CString
textToCString Text
contextType
Ptr Query
result <- CString -> IO (Ptr Query)
gst_query_new_context CString
contextType'
Text -> Ptr Query -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"queryNewContext" Ptr Query
result
Query
result' <- ((ManagedPtr Query -> Query) -> Ptr Query -> IO Query
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Query -> Query
Query) Ptr Query
result
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
contextType'
Query -> IO Query
forall (m :: * -> *) a. Monad m => a -> m a
return Query
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "gst_query_new_convert" gst_query_new_convert ::
CUInt ->
Int64 ->
CUInt ->
IO (Ptr Query)
queryNewConvert ::
(B.CallStack.HasCallStack, MonadIO m) =>
Gst.Enums.Format
-> Int64
-> Gst.Enums.Format
-> m Query
queryNewConvert :: Format -> Int64 -> Format -> m Query
queryNewConvert Format
srcFormat Int64
value Format
destFormat = IO Query -> m Query
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Query -> m Query) -> IO Query -> m Query
forall a b. (a -> b) -> a -> b
$ do
let srcFormat' :: CUInt
srcFormat' = (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
srcFormat
let destFormat' :: CUInt
destFormat' = (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
destFormat
Ptr Query
result <- CUInt -> Int64 -> CUInt -> IO (Ptr Query)
gst_query_new_convert CUInt
srcFormat' Int64
value CUInt
destFormat'
Text -> Ptr Query -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"queryNewConvert" Ptr Query
result
Query
result' <- ((ManagedPtr Query -> Query) -> Ptr Query -> IO Query
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Query -> Query
Query) Ptr Query
result
Query -> IO Query
forall (m :: * -> *) a. Monad m => a -> m a
return Query
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "gst_query_new_custom" gst_query_new_custom ::
CUInt ->
Ptr Gst.Structure.Structure ->
IO (Ptr Query)
queryNewCustom ::
(B.CallStack.HasCallStack, MonadIO m) =>
Gst.Enums.QueryType
-> Maybe (Gst.Structure.Structure)
-> m (Maybe Query)
queryNewCustom :: QueryType -> Maybe Structure -> m (Maybe Query)
queryNewCustom QueryType
type_ Maybe Structure
structure = IO (Maybe Query) -> m (Maybe Query)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Query) -> m (Maybe Query))
-> IO (Maybe Query) -> m (Maybe Query)
forall a b. (a -> b) -> a -> b
$ do
let type_' :: CUInt
type_' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (QueryType -> Int) -> QueryType -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. QueryType -> Int
forall a. Enum a => a -> Int
fromEnum) QueryType
type_
Ptr Structure
maybeStructure <- case Maybe Structure
structure of
Maybe Structure
Nothing -> Ptr Structure -> IO (Ptr Structure)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Structure
forall a. Ptr a
nullPtr
Just Structure
jStructure -> do
Ptr Structure
jStructure' <- Structure -> IO (Ptr Structure)
forall a. (HasCallStack, GBoxed a) => a -> IO (Ptr a)
B.ManagedPtr.disownBoxed Structure
jStructure
Ptr Structure -> IO (Ptr Structure)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Structure
jStructure'
Ptr Query
result <- CUInt -> Ptr Structure -> IO (Ptr Query)
gst_query_new_custom CUInt
type_' Ptr Structure
maybeStructure
Maybe Query
maybeResult <- Ptr Query -> (Ptr Query -> IO Query) -> IO (Maybe Query)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Query
result ((Ptr Query -> IO Query) -> IO (Maybe Query))
-> (Ptr Query -> IO Query) -> IO (Maybe Query)
forall a b. (a -> b) -> a -> b
$ \Ptr Query
result' -> do
Query
result'' <- ((ManagedPtr Query -> Query) -> Ptr Query -> IO Query
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Query -> Query
Query) Ptr Query
result'
Query -> IO Query
forall (m :: * -> *) a. Monad m => a -> m a
return Query
result''
Maybe Structure -> (Structure -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe Structure
structure Structure -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
Maybe Query -> IO (Maybe Query)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Query
maybeResult
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "gst_query_new_drain" gst_query_new_drain ::
IO (Ptr Query)
queryNewDrain ::
(B.CallStack.HasCallStack, MonadIO m) =>
m Query
queryNewDrain :: m Query
queryNewDrain = IO Query -> m Query
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Query -> m Query) -> IO Query -> m Query
forall a b. (a -> b) -> a -> b
$ do
Ptr Query
result <- IO (Ptr Query)
gst_query_new_drain
Text -> Ptr Query -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"queryNewDrain" Ptr Query
result
Query
result' <- ((ManagedPtr Query -> Query) -> Ptr Query -> IO Query
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Query -> Query
Query) Ptr Query
result
Query -> IO Query
forall (m :: * -> *) a. Monad m => a -> m a
return Query
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "gst_query_new_duration" gst_query_new_duration ::
CUInt ->
IO (Ptr Query)
queryNewDuration ::
(B.CallStack.HasCallStack, MonadIO m) =>
Gst.Enums.Format
-> m Query
queryNewDuration :: Format -> m Query
queryNewDuration Format
format = IO Query -> m Query
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Query -> m Query) -> IO Query -> m Query
forall a b. (a -> b) -> a -> b
$ do
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
Ptr Query
result <- CUInt -> IO (Ptr Query)
gst_query_new_duration CUInt
format'
Text -> Ptr Query -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"queryNewDuration" Ptr Query
result
Query
result' <- ((ManagedPtr Query -> Query) -> Ptr Query -> IO Query
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Query -> Query
Query) Ptr Query
result
Query -> IO Query
forall (m :: * -> *) a. Monad m => a -> m a
return Query
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "gst_query_new_formats" gst_query_new_formats ::
IO (Ptr Query)
queryNewFormats ::
(B.CallStack.HasCallStack, MonadIO m) =>
m Query
queryNewFormats :: m Query
queryNewFormats = IO Query -> m Query
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Query -> m Query) -> IO Query -> m Query
forall a b. (a -> b) -> a -> b
$ do
Ptr Query
result <- IO (Ptr Query)
gst_query_new_formats
Text -> Ptr Query -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"queryNewFormats" Ptr Query
result
Query
result' <- ((ManagedPtr Query -> Query) -> Ptr Query -> IO Query
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Query -> Query
Query) Ptr Query
result
Query -> IO Query
forall (m :: * -> *) a. Monad m => a -> m a
return Query
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "gst_query_new_latency" gst_query_new_latency ::
IO (Ptr Query)
queryNewLatency ::
(B.CallStack.HasCallStack, MonadIO m) =>
m Query
queryNewLatency :: m Query
queryNewLatency = IO Query -> m Query
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Query -> m Query) -> IO Query -> m Query
forall a b. (a -> b) -> a -> b
$ do
Ptr Query
result <- IO (Ptr Query)
gst_query_new_latency
Text -> Ptr Query -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"queryNewLatency" Ptr Query
result
Query
result' <- ((ManagedPtr Query -> Query) -> Ptr Query -> IO Query
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Query -> Query
Query) Ptr Query
result
Query -> IO Query
forall (m :: * -> *) a. Monad m => a -> m a
return Query
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "gst_query_new_position" gst_query_new_position ::
CUInt ->
IO (Ptr Query)
queryNewPosition ::
(B.CallStack.HasCallStack, MonadIO m) =>
Gst.Enums.Format
-> m Query
queryNewPosition :: Format -> m Query
queryNewPosition Format
format = IO Query -> m Query
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Query -> m Query) -> IO Query -> m Query
forall a b. (a -> b) -> a -> b
$ do
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
Ptr Query
result <- CUInt -> IO (Ptr Query)
gst_query_new_position CUInt
format'
Text -> Ptr Query -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"queryNewPosition" Ptr Query
result
Query
result' <- ((ManagedPtr Query -> Query) -> Ptr Query -> IO Query
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Query -> Query
Query) Ptr Query
result
Query -> IO Query
forall (m :: * -> *) a. Monad m => a -> m a
return Query
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "gst_query_new_scheduling" gst_query_new_scheduling ::
IO (Ptr Query)
queryNewScheduling ::
(B.CallStack.HasCallStack, MonadIO m) =>
m Query
queryNewScheduling :: m Query
queryNewScheduling = IO Query -> m Query
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Query -> m Query) -> IO Query -> m Query
forall a b. (a -> b) -> a -> b
$ do
Ptr Query
result <- IO (Ptr Query)
gst_query_new_scheduling
Text -> Ptr Query -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"queryNewScheduling" Ptr Query
result
Query
result' <- ((ManagedPtr Query -> Query) -> Ptr Query -> IO Query
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Query -> Query
Query) Ptr Query
result
Query -> IO Query
forall (m :: * -> *) a. Monad m => a -> m a
return Query
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "gst_query_new_seeking" gst_query_new_seeking ::
CUInt ->
IO (Ptr Query)
queryNewSeeking ::
(B.CallStack.HasCallStack, MonadIO m) =>
Gst.Enums.Format
-> m Query
queryNewSeeking :: Format -> m Query
queryNewSeeking Format
format = IO Query -> m Query
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Query -> m Query) -> IO Query -> m Query
forall a b. (a -> b) -> a -> b
$ do
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
Ptr Query
result <- CUInt -> IO (Ptr Query)
gst_query_new_seeking CUInt
format'
Text -> Ptr Query -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"queryNewSeeking" Ptr Query
result
Query
result' <- ((ManagedPtr Query -> Query) -> Ptr Query -> IO Query
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Query -> Query
Query) Ptr Query
result
Query -> IO Query
forall (m :: * -> *) a. Monad m => a -> m a
return Query
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "gst_query_new_segment" gst_query_new_segment ::
CUInt ->
IO (Ptr Query)
queryNewSegment ::
(B.CallStack.HasCallStack, MonadIO m) =>
Gst.Enums.Format
-> m Query
queryNewSegment :: Format -> m Query
queryNewSegment Format
format = IO Query -> m Query
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Query -> m Query) -> IO Query -> m Query
forall a b. (a -> b) -> a -> b
$ do
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
Ptr Query
result <- CUInt -> IO (Ptr Query)
gst_query_new_segment CUInt
format'
Text -> Ptr Query -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"queryNewSegment" Ptr Query
result
Query
result' <- ((ManagedPtr Query -> Query) -> Ptr Query -> IO Query
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Query -> Query
Query) Ptr Query
result
Query -> IO Query
forall (m :: * -> *) a. Monad m => a -> m a
return Query
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "gst_query_new_uri" gst_query_new_uri ::
IO (Ptr Query)
queryNewUri ::
(B.CallStack.HasCallStack, MonadIO m) =>
m Query
queryNewUri :: m Query
queryNewUri = IO Query -> m Query
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Query -> m Query) -> IO Query -> m Query
forall a b. (a -> b) -> a -> b
$ do
Ptr Query
result <- IO (Ptr Query)
gst_query_new_uri
Text -> Ptr Query -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"queryNewUri" Ptr Query
result
Query
result' <- ((ManagedPtr Query -> Query) -> Ptr Query -> IO Query
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Query -> Query
Query) Ptr Query
result
Query -> IO Query
forall (m :: * -> *) a. Monad m => a -> m a
return Query
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "gst_query_add_allocation_meta" gst_query_add_allocation_meta ::
Ptr Query ->
CGType ->
Ptr Gst.Structure.Structure ->
IO ()
queryAddAllocationMeta ::
(B.CallStack.HasCallStack, MonadIO m) =>
Query
-> GType
-> Maybe (Gst.Structure.Structure)
-> m ()
queryAddAllocationMeta :: Query -> GType -> Maybe Structure -> m ()
queryAddAllocationMeta Query
query GType
api Maybe Structure
params = 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 Query
query' <- Query -> IO (Ptr Query)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Query
query
let api' :: CGType
api' = GType -> CGType
gtypeToCGType GType
api
Ptr Structure
maybeParams <- case Maybe Structure
params of
Maybe Structure
Nothing -> Ptr Structure -> IO (Ptr Structure)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Structure
forall a. Ptr a
nullPtr
Just Structure
jParams -> do
Ptr Structure
jParams' <- Structure -> IO (Ptr Structure)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Structure
jParams
Ptr Structure -> IO (Ptr Structure)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Structure
jParams'
Ptr Query -> CGType -> Ptr Structure -> IO ()
gst_query_add_allocation_meta Ptr Query
query' CGType
api' Ptr Structure
maybeParams
Query -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Query
query
Maybe Structure -> (Structure -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe Structure
params Structure -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data QueryAddAllocationMetaMethodInfo
instance (signature ~ (GType -> Maybe (Gst.Structure.Structure) -> m ()), MonadIO m) => O.MethodInfo QueryAddAllocationMetaMethodInfo Query signature where
overloadedMethod = queryAddAllocationMeta
#endif
foreign import ccall "gst_query_add_allocation_param" gst_query_add_allocation_param ::
Ptr Query ->
Ptr Gst.Allocator.Allocator ->
Ptr Gst.AllocationParams.AllocationParams ->
IO ()
queryAddAllocationParam ::
(B.CallStack.HasCallStack, MonadIO m, Gst.Allocator.IsAllocator a) =>
Query
-> Maybe (a)
-> Maybe (Gst.AllocationParams.AllocationParams)
-> m ()
queryAddAllocationParam :: Query -> Maybe a -> Maybe AllocationParams -> m ()
queryAddAllocationParam Query
query Maybe a
allocator Maybe AllocationParams
params = 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 Query
query' <- Query -> IO (Ptr Query)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Query
query
Ptr Allocator
maybeAllocator <- case Maybe a
allocator of
Maybe a
Nothing -> Ptr Allocator -> IO (Ptr Allocator)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Allocator
forall a. Ptr a
nullPtr
Just a
jAllocator -> do
Ptr Allocator
jAllocator' <- a -> IO (Ptr Allocator)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
jAllocator
Ptr Allocator -> IO (Ptr Allocator)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Allocator
jAllocator'
Ptr AllocationParams
maybeParams <- case Maybe AllocationParams
params of
Maybe AllocationParams
Nothing -> Ptr AllocationParams -> IO (Ptr AllocationParams)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr AllocationParams
forall a. Ptr a
nullPtr
Just AllocationParams
jParams -> do
Ptr AllocationParams
jParams' <- AllocationParams -> IO (Ptr AllocationParams)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr AllocationParams
jParams
Ptr AllocationParams -> IO (Ptr AllocationParams)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr AllocationParams
jParams'
Ptr Query -> Ptr Allocator -> Ptr AllocationParams -> IO ()
gst_query_add_allocation_param Ptr Query
query' Ptr Allocator
maybeAllocator Ptr AllocationParams
maybeParams
Query -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Query
query
Maybe a -> (a -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe a
allocator a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
Maybe AllocationParams -> (AllocationParams -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe AllocationParams
params AllocationParams -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data QueryAddAllocationParamMethodInfo
instance (signature ~ (Maybe (a) -> Maybe (Gst.AllocationParams.AllocationParams) -> m ()), MonadIO m, Gst.Allocator.IsAllocator a) => O.MethodInfo QueryAddAllocationParamMethodInfo Query signature where
overloadedMethod = queryAddAllocationParam
#endif
foreign import ccall "gst_query_add_allocation_pool" gst_query_add_allocation_pool ::
Ptr Query ->
Ptr Gst.BufferPool.BufferPool ->
Word32 ->
Word32 ->
Word32 ->
IO ()
queryAddAllocationPool ::
(B.CallStack.HasCallStack, MonadIO m, Gst.BufferPool.IsBufferPool a) =>
Query
-> Maybe (a)
-> Word32
-> Word32
-> Word32
-> m ()
queryAddAllocationPool :: Query -> Maybe a -> Word32 -> Word32 -> Word32 -> m ()
queryAddAllocationPool Query
query Maybe a
pool Word32
size Word32
minBuffers Word32
maxBuffers = 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 Query
query' <- Query -> IO (Ptr Query)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Query
query
Ptr BufferPool
maybePool <- case Maybe a
pool of
Maybe a
Nothing -> Ptr BufferPool -> IO (Ptr BufferPool)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr BufferPool
forall a. Ptr a
nullPtr
Just a
jPool -> do
Ptr BufferPool
jPool' <- a -> IO (Ptr BufferPool)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
jPool
Ptr BufferPool -> IO (Ptr BufferPool)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr BufferPool
jPool'
Ptr Query -> Ptr BufferPool -> Word32 -> Word32 -> Word32 -> IO ()
gst_query_add_allocation_pool Ptr Query
query' Ptr BufferPool
maybePool Word32
size Word32
minBuffers Word32
maxBuffers
Query -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Query
query
Maybe a -> (a -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe a
pool a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data QueryAddAllocationPoolMethodInfo
instance (signature ~ (Maybe (a) -> Word32 -> Word32 -> Word32 -> m ()), MonadIO m, Gst.BufferPool.IsBufferPool a) => O.MethodInfo QueryAddAllocationPoolMethodInfo Query signature where
overloadedMethod = queryAddAllocationPool
#endif
foreign import ccall "gst_query_add_buffering_range" gst_query_add_buffering_range ::
Ptr Query ->
Int64 ->
Int64 ->
IO CInt
queryAddBufferingRange ::
(B.CallStack.HasCallStack, MonadIO m) =>
Query
-> Int64
-> Int64
-> m Bool
queryAddBufferingRange :: Query -> Int64 -> Int64 -> m Bool
queryAddBufferingRange Query
query Int64
start Int64
stop = 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 Query
query' <- Query -> IO (Ptr Query)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Query
query
CInt
result <- Ptr Query -> Int64 -> Int64 -> IO CInt
gst_query_add_buffering_range Ptr Query
query' Int64
start Int64
stop
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
Query -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Query
query
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data QueryAddBufferingRangeMethodInfo
instance (signature ~ (Int64 -> Int64 -> m Bool), MonadIO m) => O.MethodInfo QueryAddBufferingRangeMethodInfo Query signature where
overloadedMethod = queryAddBufferingRange
#endif
foreign import ccall "gst_query_add_scheduling_mode" gst_query_add_scheduling_mode ::
Ptr Query ->
CUInt ->
IO ()
queryAddSchedulingMode ::
(B.CallStack.HasCallStack, MonadIO m) =>
Query
-> Gst.Enums.PadMode
-> m ()
queryAddSchedulingMode :: Query -> PadMode -> m ()
queryAddSchedulingMode Query
query PadMode
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
Ptr Query
query' <- Query -> IO (Ptr Query)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Query
query
let mode' :: CUInt
mode' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (PadMode -> Int) -> PadMode -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. PadMode -> Int
forall a. Enum a => a -> Int
fromEnum) PadMode
mode
Ptr Query -> CUInt -> IO ()
gst_query_add_scheduling_mode Ptr Query
query' CUInt
mode'
Query -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Query
query
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data QueryAddSchedulingModeMethodInfo
instance (signature ~ (Gst.Enums.PadMode -> m ()), MonadIO m) => O.MethodInfo QueryAddSchedulingModeMethodInfo Query signature where
overloadedMethod = queryAddSchedulingMode
#endif
foreign import ccall "gst_query_find_allocation_meta" gst_query_find_allocation_meta ::
Ptr Query ->
CGType ->
Ptr Word32 ->
IO CInt
queryFindAllocationMeta ::
(B.CallStack.HasCallStack, MonadIO m) =>
Query
-> GType
-> m ((Bool, Word32))
queryFindAllocationMeta :: Query -> GType -> m (Bool, Word32)
queryFindAllocationMeta Query
query GType
api = IO (Bool, Word32) -> m (Bool, Word32)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Bool, Word32) -> m (Bool, Word32))
-> IO (Bool, Word32) -> m (Bool, Word32)
forall a b. (a -> b) -> a -> b
$ do
Ptr Query
query' <- Query -> IO (Ptr Query)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Query
query
let api' :: CGType
api' = GType -> CGType
gtypeToCGType GType
api
Ptr Word32
index <- IO (Ptr Word32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Word32)
CInt
result <- Ptr Query -> CGType -> Ptr Word32 -> IO CInt
gst_query_find_allocation_meta Ptr Query
query' CGType
api' Ptr Word32
index
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
Word32
index' <- Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek Ptr Word32
index
Query -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Query
query
Ptr Word32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word32
index
(Bool, Word32) -> IO (Bool, Word32)
forall (m :: * -> *) a. Monad m => a -> m a
return (Bool
result', Word32
index')
#if defined(ENABLE_OVERLOADING)
data QueryFindAllocationMetaMethodInfo
instance (signature ~ (GType -> m ((Bool, Word32))), MonadIO m) => O.MethodInfo QueryFindAllocationMetaMethodInfo Query signature where
overloadedMethod = queryFindAllocationMeta
#endif
foreign import ccall "gst_query_get_n_allocation_metas" gst_query_get_n_allocation_metas ::
Ptr Query ->
IO Word32
queryGetNAllocationMetas ::
(B.CallStack.HasCallStack, MonadIO m) =>
Query
-> m Word32
queryGetNAllocationMetas :: Query -> m Word32
queryGetNAllocationMetas Query
query = 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 Query
query' <- Query -> IO (Ptr Query)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Query
query
Word32
result <- Ptr Query -> IO Word32
gst_query_get_n_allocation_metas Ptr Query
query'
Query -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Query
query
Word32 -> IO Word32
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
result
#if defined(ENABLE_OVERLOADING)
data QueryGetNAllocationMetasMethodInfo
instance (signature ~ (m Word32), MonadIO m) => O.MethodInfo QueryGetNAllocationMetasMethodInfo Query signature where
overloadedMethod = queryGetNAllocationMetas
#endif
foreign import ccall "gst_query_get_n_allocation_params" gst_query_get_n_allocation_params ::
Ptr Query ->
IO Word32
queryGetNAllocationParams ::
(B.CallStack.HasCallStack, MonadIO m) =>
Query
-> m Word32
queryGetNAllocationParams :: Query -> m Word32
queryGetNAllocationParams Query
query = 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 Query
query' <- Query -> IO (Ptr Query)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Query
query
Word32
result <- Ptr Query -> IO Word32
gst_query_get_n_allocation_params Ptr Query
query'
Query -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Query
query
Word32 -> IO Word32
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
result
#if defined(ENABLE_OVERLOADING)
data QueryGetNAllocationParamsMethodInfo
instance (signature ~ (m Word32), MonadIO m) => O.MethodInfo QueryGetNAllocationParamsMethodInfo Query signature where
overloadedMethod = queryGetNAllocationParams
#endif
foreign import ccall "gst_query_get_n_allocation_pools" gst_query_get_n_allocation_pools ::
Ptr Query ->
IO Word32
queryGetNAllocationPools ::
(B.CallStack.HasCallStack, MonadIO m) =>
Query
-> m Word32
queryGetNAllocationPools :: Query -> m Word32
queryGetNAllocationPools Query
query = 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 Query
query' <- Query -> IO (Ptr Query)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Query
query
Word32
result <- Ptr Query -> IO Word32
gst_query_get_n_allocation_pools Ptr Query
query'
Query -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Query
query
Word32 -> IO Word32
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
result
#if defined(ENABLE_OVERLOADING)
data QueryGetNAllocationPoolsMethodInfo
instance (signature ~ (m Word32), MonadIO m) => O.MethodInfo QueryGetNAllocationPoolsMethodInfo Query signature where
overloadedMethod = queryGetNAllocationPools
#endif
foreign import ccall "gst_query_get_n_buffering_ranges" gst_query_get_n_buffering_ranges ::
Ptr Query ->
IO Word32
queryGetNBufferingRanges ::
(B.CallStack.HasCallStack, MonadIO m) =>
Query
-> m Word32
queryGetNBufferingRanges :: Query -> m Word32
queryGetNBufferingRanges Query
query = 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 Query
query' <- Query -> IO (Ptr Query)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Query
query
Word32
result <- Ptr Query -> IO Word32
gst_query_get_n_buffering_ranges Ptr Query
query'
Query -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Query
query
Word32 -> IO Word32
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
result
#if defined(ENABLE_OVERLOADING)
data QueryGetNBufferingRangesMethodInfo
instance (signature ~ (m Word32), MonadIO m) => O.MethodInfo QueryGetNBufferingRangesMethodInfo Query signature where
overloadedMethod = queryGetNBufferingRanges
#endif
foreign import ccall "gst_query_get_n_scheduling_modes" gst_query_get_n_scheduling_modes ::
Ptr Query ->
IO Word32
queryGetNSchedulingModes ::
(B.CallStack.HasCallStack, MonadIO m) =>
Query
-> m Word32
queryGetNSchedulingModes :: Query -> m Word32
queryGetNSchedulingModes Query
query = 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 Query
query' <- Query -> IO (Ptr Query)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Query
query
Word32
result <- Ptr Query -> IO Word32
gst_query_get_n_scheduling_modes Ptr Query
query'
Query -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Query
query
Word32 -> IO Word32
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
result
#if defined(ENABLE_OVERLOADING)
data QueryGetNSchedulingModesMethodInfo
instance (signature ~ (m Word32), MonadIO m) => O.MethodInfo QueryGetNSchedulingModesMethodInfo Query signature where
overloadedMethod = queryGetNSchedulingModes
#endif
foreign import ccall "gst_query_get_structure" gst_query_get_structure ::
Ptr Query ->
IO (Ptr Gst.Structure.Structure)
queryGetStructure ::
(B.CallStack.HasCallStack, MonadIO m) =>
Query
-> m (Maybe Gst.Structure.Structure)
queryGetStructure :: Query -> m (Maybe Structure)
queryGetStructure Query
query = IO (Maybe Structure) -> m (Maybe Structure)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Structure) -> m (Maybe Structure))
-> IO (Maybe Structure) -> m (Maybe Structure)
forall a b. (a -> b) -> a -> b
$ do
Ptr Query
query' <- Query -> IO (Ptr Query)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Query
query
Ptr Structure
result <- Ptr Query -> IO (Ptr Structure)
gst_query_get_structure Ptr Query
query'
Maybe Structure
maybeResult <- Ptr Structure
-> (Ptr Structure -> IO Structure) -> IO (Maybe Structure)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
convertIfNonNull Ptr Structure
result ((Ptr Structure -> IO Structure) -> IO (Maybe Structure))
-> (Ptr Structure -> IO Structure) -> IO (Maybe Structure)
forall a b. (a -> b) -> a -> b
$ \Ptr Structure
result' -> do
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'
Structure -> IO Structure
forall (m :: * -> *) a. Monad m => a -> m a
return Structure
result''
Query -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Query
query
Maybe Structure -> IO (Maybe Structure)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Structure
maybeResult
#if defined(ENABLE_OVERLOADING)
data QueryGetStructureMethodInfo
instance (signature ~ (m (Maybe Gst.Structure.Structure)), MonadIO m) => O.MethodInfo QueryGetStructureMethodInfo Query signature where
overloadedMethod = queryGetStructure
#endif
foreign import ccall "gst_query_has_scheduling_mode" gst_query_has_scheduling_mode ::
Ptr Query ->
CUInt ->
IO CInt
queryHasSchedulingMode ::
(B.CallStack.HasCallStack, MonadIO m) =>
Query
-> Gst.Enums.PadMode
-> m Bool
queryHasSchedulingMode :: Query -> PadMode -> m Bool
queryHasSchedulingMode Query
query PadMode
mode = 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 Query
query' <- Query -> IO (Ptr Query)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Query
query
let mode' :: CUInt
mode' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (PadMode -> Int) -> PadMode -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. PadMode -> Int
forall a. Enum a => a -> Int
fromEnum) PadMode
mode
CInt
result <- Ptr Query -> CUInt -> IO CInt
gst_query_has_scheduling_mode Ptr Query
query' CUInt
mode'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
Query -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Query
query
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data QueryHasSchedulingModeMethodInfo
instance (signature ~ (Gst.Enums.PadMode -> m Bool), MonadIO m) => O.MethodInfo QueryHasSchedulingModeMethodInfo Query signature where
overloadedMethod = queryHasSchedulingMode
#endif
foreign import ccall "gst_query_has_scheduling_mode_with_flags" gst_query_has_scheduling_mode_with_flags ::
Ptr Query ->
CUInt ->
CUInt ->
IO CInt
queryHasSchedulingModeWithFlags ::
(B.CallStack.HasCallStack, MonadIO m) =>
Query
-> Gst.Enums.PadMode
-> [Gst.Flags.SchedulingFlags]
-> m Bool
queryHasSchedulingModeWithFlags :: Query -> PadMode -> [SchedulingFlags] -> m Bool
queryHasSchedulingModeWithFlags Query
query PadMode
mode [SchedulingFlags]
flags = 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 Query
query' <- Query -> IO (Ptr Query)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Query
query
let mode' :: CUInt
mode' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (PadMode -> Int) -> PadMode -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. PadMode -> Int
forall a. Enum a => a -> Int
fromEnum) PadMode
mode
let flags' :: CUInt
flags' = [SchedulingFlags] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [SchedulingFlags]
flags
CInt
result <- Ptr Query -> CUInt -> CUInt -> IO CInt
gst_query_has_scheduling_mode_with_flags Ptr Query
query' CUInt
mode' CUInt
flags'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
Query -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Query
query
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data QueryHasSchedulingModeWithFlagsMethodInfo
instance (signature ~ (Gst.Enums.PadMode -> [Gst.Flags.SchedulingFlags] -> m Bool), MonadIO m) => O.MethodInfo QueryHasSchedulingModeWithFlagsMethodInfo Query signature where
overloadedMethod = queryHasSchedulingModeWithFlags
#endif
foreign import ccall "gst_query_parse_accept_caps" gst_query_parse_accept_caps ::
Ptr Query ->
Ptr (Ptr Gst.Caps.Caps) ->
IO ()
queryParseAcceptCaps ::
(B.CallStack.HasCallStack, MonadIO m) =>
Query
-> m (Gst.Caps.Caps)
queryParseAcceptCaps :: Query -> m Caps
queryParseAcceptCaps Query
query = 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 Query
query' <- Query -> IO (Ptr Query)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Query
query
Ptr (Ptr Caps)
caps <- IO (Ptr (Ptr Caps))
forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr (Ptr Gst.Caps.Caps))
Ptr Query -> Ptr (Ptr Caps) -> IO ()
gst_query_parse_accept_caps Ptr Query
query' Ptr (Ptr Caps)
caps
Ptr Caps
caps' <- Ptr (Ptr Caps) -> IO (Ptr Caps)
forall a. Storable a => Ptr a -> IO a
peek Ptr (Ptr Caps)
caps
Caps
caps'' <- ((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
caps'
Query -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Query
query
Ptr (Ptr Caps) -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr Caps)
caps
Caps -> IO Caps
forall (m :: * -> *) a. Monad m => a -> m a
return Caps
caps''
#if defined(ENABLE_OVERLOADING)
data QueryParseAcceptCapsMethodInfo
instance (signature ~ (m (Gst.Caps.Caps)), MonadIO m) => O.MethodInfo QueryParseAcceptCapsMethodInfo Query signature where
overloadedMethod = queryParseAcceptCaps
#endif
foreign import ccall "gst_query_parse_accept_caps_result" gst_query_parse_accept_caps_result ::
Ptr Query ->
Ptr CInt ->
IO ()
queryParseAcceptCapsResult ::
(B.CallStack.HasCallStack, MonadIO m) =>
Query
-> m (Bool)
queryParseAcceptCapsResult :: Query -> m Bool
queryParseAcceptCapsResult Query
query = 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 Query
query' <- Query -> IO (Ptr Query)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Query
query
Ptr CInt
result_ <- IO (Ptr CInt)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr CInt)
Ptr Query -> Ptr CInt -> IO ()
gst_query_parse_accept_caps_result Ptr Query
query' Ptr CInt
result_
CInt
result_' <- Ptr CInt -> IO CInt
forall a. Storable a => Ptr a -> IO a
peek Ptr CInt
result_
let result_'' :: Bool
result_'' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result_'
Query -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Query
query
Ptr CInt -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CInt
result_
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result_''
#if defined(ENABLE_OVERLOADING)
data QueryParseAcceptCapsResultMethodInfo
instance (signature ~ (m (Bool)), MonadIO m) => O.MethodInfo QueryParseAcceptCapsResultMethodInfo Query signature where
overloadedMethod = queryParseAcceptCapsResult
#endif
foreign import ccall "gst_query_parse_allocation" gst_query_parse_allocation ::
Ptr Query ->
Ptr (Ptr Gst.Caps.Caps) ->
Ptr CInt ->
IO ()
queryParseAllocation ::
(B.CallStack.HasCallStack, MonadIO m) =>
Query
-> m ((Gst.Caps.Caps, Bool))
queryParseAllocation :: Query -> m (Caps, Bool)
queryParseAllocation Query
query = IO (Caps, Bool) -> m (Caps, Bool)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Caps, Bool) -> m (Caps, Bool))
-> IO (Caps, Bool) -> m (Caps, Bool)
forall a b. (a -> b) -> a -> b
$ do
Ptr Query
query' <- Query -> IO (Ptr Query)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Query
query
Ptr (Ptr Caps)
caps <- IO (Ptr (Ptr Caps))
forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr (Ptr Gst.Caps.Caps))
Ptr CInt
needPool <- IO (Ptr CInt)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr CInt)
Ptr Query -> Ptr (Ptr Caps) -> Ptr CInt -> IO ()
gst_query_parse_allocation Ptr Query
query' Ptr (Ptr Caps)
caps Ptr CInt
needPool
Ptr Caps
caps' <- Ptr (Ptr Caps) -> IO (Ptr Caps)
forall a. Storable a => Ptr a -> IO a
peek Ptr (Ptr Caps)
caps
Caps
caps'' <- ((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
caps'
CInt
needPool' <- Ptr CInt -> IO CInt
forall a. Storable a => Ptr a -> IO a
peek Ptr CInt
needPool
let needPool'' :: Bool
needPool'' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
needPool'
Query -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Query
query
Ptr (Ptr Caps) -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr Caps)
caps
Ptr CInt -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CInt
needPool
(Caps, Bool) -> IO (Caps, Bool)
forall (m :: * -> *) a. Monad m => a -> m a
return (Caps
caps'', Bool
needPool'')
#if defined(ENABLE_OVERLOADING)
data QueryParseAllocationMethodInfo
instance (signature ~ (m ((Gst.Caps.Caps, Bool))), MonadIO m) => O.MethodInfo QueryParseAllocationMethodInfo Query signature where
overloadedMethod = queryParseAllocation
#endif
foreign import ccall "gst_query_parse_bitrate" gst_query_parse_bitrate ::
Ptr Query ->
Ptr Word32 ->
IO ()
queryParseBitrate ::
(B.CallStack.HasCallStack, MonadIO m) =>
Query
-> m (Word32)
queryParseBitrate :: Query -> m Word32
queryParseBitrate Query
query = 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 Query
query' <- Query -> IO (Ptr Query)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Query
query
Ptr Word32
nominalBitrate <- IO (Ptr Word32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Word32)
Ptr Query -> Ptr Word32 -> IO ()
gst_query_parse_bitrate Ptr Query
query' Ptr Word32
nominalBitrate
Word32
nominalBitrate' <- Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek Ptr Word32
nominalBitrate
Query -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Query
query
Ptr Word32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word32
nominalBitrate
Word32 -> IO Word32
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
nominalBitrate'
#if defined(ENABLE_OVERLOADING)
data QueryParseBitrateMethodInfo
instance (signature ~ (m (Word32)), MonadIO m) => O.MethodInfo QueryParseBitrateMethodInfo Query signature where
overloadedMethod = queryParseBitrate
#endif
foreign import ccall "gst_query_parse_buffering_percent" gst_query_parse_buffering_percent ::
Ptr Query ->
Ptr CInt ->
Ptr Int32 ->
IO ()
queryParseBufferingPercent ::
(B.CallStack.HasCallStack, MonadIO m) =>
Query
-> m ((Bool, Int32))
queryParseBufferingPercent :: Query -> m (Bool, Int32)
queryParseBufferingPercent Query
query = IO (Bool, Int32) -> m (Bool, Int32)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Bool, Int32) -> m (Bool, Int32))
-> IO (Bool, Int32) -> m (Bool, Int32)
forall a b. (a -> b) -> a -> b
$ do
Ptr Query
query' <- Query -> IO (Ptr Query)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Query
query
Ptr CInt
busy <- IO (Ptr CInt)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr CInt)
Ptr Int32
percent <- IO (Ptr Int32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int32)
Ptr Query -> Ptr CInt -> Ptr Int32 -> IO ()
gst_query_parse_buffering_percent Ptr Query
query' Ptr CInt
busy Ptr Int32
percent
CInt
busy' <- Ptr CInt -> IO CInt
forall a. Storable a => Ptr a -> IO a
peek Ptr CInt
busy
let busy'' :: Bool
busy'' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
busy'
Int32
percent' <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek Ptr Int32
percent
Query -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Query
query
Ptr CInt -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CInt
busy
Ptr Int32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int32
percent
(Bool, Int32) -> IO (Bool, Int32)
forall (m :: * -> *) a. Monad m => a -> m a
return (Bool
busy'', Int32
percent')
#if defined(ENABLE_OVERLOADING)
data QueryParseBufferingPercentMethodInfo
instance (signature ~ (m ((Bool, Int32))), MonadIO m) => O.MethodInfo QueryParseBufferingPercentMethodInfo Query signature where
overloadedMethod = queryParseBufferingPercent
#endif
foreign import ccall "gst_query_parse_buffering_range" gst_query_parse_buffering_range ::
Ptr Query ->
Ptr CUInt ->
Ptr Int64 ->
Ptr Int64 ->
Ptr Int64 ->
IO ()
queryParseBufferingRange ::
(B.CallStack.HasCallStack, MonadIO m) =>
Query
-> m ((Gst.Enums.Format, Int64, Int64, Int64))
queryParseBufferingRange :: Query -> m (Format, Int64, Int64, Int64)
queryParseBufferingRange Query
query = IO (Format, Int64, Int64, Int64) -> m (Format, Int64, Int64, Int64)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Format, Int64, Int64, Int64)
-> m (Format, Int64, Int64, Int64))
-> IO (Format, Int64, Int64, Int64)
-> m (Format, Int64, Int64, Int64)
forall a b. (a -> b) -> a -> b
$ do
Ptr Query
query' <- Query -> IO (Ptr Query)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Query
query
Ptr CUInt
format <- IO (Ptr CUInt)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr CUInt)
Ptr Int64
start <- IO (Ptr Int64)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int64)
Ptr Int64
stop <- IO (Ptr Int64)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int64)
Ptr Int64
estimatedTotal <- IO (Ptr Int64)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int64)
Ptr Query
-> Ptr CUInt -> Ptr Int64 -> Ptr Int64 -> Ptr Int64 -> IO ()
gst_query_parse_buffering_range Ptr Query
query' Ptr CUInt
format Ptr Int64
start Ptr Int64
stop Ptr Int64
estimatedTotal
CUInt
format' <- Ptr CUInt -> IO CUInt
forall a. Storable a => Ptr a -> IO a
peek Ptr CUInt
format
let format'' :: Format
format'' = (Int -> Format
forall a. Enum a => Int -> a
toEnum (Int -> Format) -> (CUInt -> Int) -> CUInt -> Format
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
format'
Int64
start' <- Ptr Int64 -> IO Int64
forall a. Storable a => Ptr a -> IO a
peek Ptr Int64
start
Int64
stop' <- Ptr Int64 -> IO Int64
forall a. Storable a => Ptr a -> IO a
peek Ptr Int64
stop
Int64
estimatedTotal' <- Ptr Int64 -> IO Int64
forall a. Storable a => Ptr a -> IO a
peek Ptr Int64
estimatedTotal
Query -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Query
query
Ptr CUInt -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CUInt
format
Ptr Int64 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int64
start
Ptr Int64 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int64
stop
Ptr Int64 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int64
estimatedTotal
(Format, Int64, Int64, Int64) -> IO (Format, Int64, Int64, Int64)
forall (m :: * -> *) a. Monad m => a -> m a
return (Format
format'', Int64
start', Int64
stop', Int64
estimatedTotal')
#if defined(ENABLE_OVERLOADING)
data QueryParseBufferingRangeMethodInfo
instance (signature ~ (m ((Gst.Enums.Format, Int64, Int64, Int64))), MonadIO m) => O.MethodInfo QueryParseBufferingRangeMethodInfo Query signature where
overloadedMethod = queryParseBufferingRange
#endif
foreign import ccall "gst_query_parse_buffering_stats" gst_query_parse_buffering_stats ::
Ptr Query ->
Ptr CUInt ->
Ptr Int32 ->
Ptr Int32 ->
Ptr Int64 ->
IO ()
queryParseBufferingStats ::
(B.CallStack.HasCallStack, MonadIO m) =>
Query
-> m ((Gst.Enums.BufferingMode, Int32, Int32, Int64))
queryParseBufferingStats :: Query -> m (BufferingMode, Int32, Int32, Int64)
queryParseBufferingStats Query
query = IO (BufferingMode, Int32, Int32, Int64)
-> m (BufferingMode, Int32, Int32, Int64)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (BufferingMode, Int32, Int32, Int64)
-> m (BufferingMode, Int32, Int32, Int64))
-> IO (BufferingMode, Int32, Int32, Int64)
-> m (BufferingMode, Int32, Int32, Int64)
forall a b. (a -> b) -> a -> b
$ do
Ptr Query
query' <- Query -> IO (Ptr Query)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Query
query
Ptr CUInt
mode <- IO (Ptr CUInt)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr CUInt)
Ptr Int32
avgIn <- IO (Ptr Int32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int32)
Ptr Int32
avgOut <- IO (Ptr Int32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int32)
Ptr Int64
bufferingLeft <- IO (Ptr Int64)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int64)
Ptr Query
-> Ptr CUInt -> Ptr Int32 -> Ptr Int32 -> Ptr Int64 -> IO ()
gst_query_parse_buffering_stats Ptr Query
query' Ptr CUInt
mode Ptr Int32
avgIn Ptr Int32
avgOut Ptr Int64
bufferingLeft
CUInt
mode' <- Ptr CUInt -> IO CUInt
forall a. Storable a => Ptr a -> IO a
peek Ptr CUInt
mode
let mode'' :: BufferingMode
mode'' = (Int -> BufferingMode
forall a. Enum a => Int -> a
toEnum (Int -> BufferingMode) -> (CUInt -> Int) -> CUInt -> BufferingMode
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
mode'
Int32
avgIn' <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek Ptr Int32
avgIn
Int32
avgOut' <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek Ptr Int32
avgOut
Int64
bufferingLeft' <- Ptr Int64 -> IO Int64
forall a. Storable a => Ptr a -> IO a
peek Ptr Int64
bufferingLeft
Query -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Query
query
Ptr CUInt -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CUInt
mode
Ptr Int32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int32
avgIn
Ptr Int32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int32
avgOut
Ptr Int64 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int64
bufferingLeft
(BufferingMode, Int32, Int32, Int64)
-> IO (BufferingMode, Int32, Int32, Int64)
forall (m :: * -> *) a. Monad m => a -> m a
return (BufferingMode
mode'', Int32
avgIn', Int32
avgOut', Int64
bufferingLeft')
#if defined(ENABLE_OVERLOADING)
data QueryParseBufferingStatsMethodInfo
instance (signature ~ (m ((Gst.Enums.BufferingMode, Int32, Int32, Int64))), MonadIO m) => O.MethodInfo QueryParseBufferingStatsMethodInfo Query signature where
overloadedMethod = queryParseBufferingStats
#endif
foreign import ccall "gst_query_parse_caps" gst_query_parse_caps ::
Ptr Query ->
Ptr (Ptr Gst.Caps.Caps) ->
IO ()
queryParseCaps ::
(B.CallStack.HasCallStack, MonadIO m) =>
Query
-> m (Gst.Caps.Caps)
queryParseCaps :: Query -> m Caps
queryParseCaps Query
query = 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 Query
query' <- Query -> IO (Ptr Query)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Query
query
Ptr (Ptr Caps)
filter <- IO (Ptr (Ptr Caps))
forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr (Ptr Gst.Caps.Caps))
Ptr Query -> Ptr (Ptr Caps) -> IO ()
gst_query_parse_caps Ptr Query
query' Ptr (Ptr Caps)
filter
Ptr Caps
filter' <- Ptr (Ptr Caps) -> IO (Ptr Caps)
forall a. Storable a => Ptr a -> IO a
peek Ptr (Ptr Caps)
filter
Caps
filter'' <- ((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
filter'
Query -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Query
query
Ptr (Ptr Caps) -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr Caps)
filter
Caps -> IO Caps
forall (m :: * -> *) a. Monad m => a -> m a
return Caps
filter''
#if defined(ENABLE_OVERLOADING)
data QueryParseCapsMethodInfo
instance (signature ~ (m (Gst.Caps.Caps)), MonadIO m) => O.MethodInfo QueryParseCapsMethodInfo Query signature where
overloadedMethod = queryParseCaps
#endif
foreign import ccall "gst_query_parse_caps_result" gst_query_parse_caps_result ::
Ptr Query ->
Ptr (Ptr Gst.Caps.Caps) ->
IO ()
queryParseCapsResult ::
(B.CallStack.HasCallStack, MonadIO m) =>
Query
-> m (Gst.Caps.Caps)
queryParseCapsResult :: Query -> m Caps
queryParseCapsResult Query
query = 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 Query
query' <- Query -> IO (Ptr Query)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Query
query
Ptr (Ptr Caps)
caps <- IO (Ptr (Ptr Caps))
forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr (Ptr Gst.Caps.Caps))
Ptr Query -> Ptr (Ptr Caps) -> IO ()
gst_query_parse_caps_result Ptr Query
query' Ptr (Ptr Caps)
caps
Ptr Caps
caps' <- Ptr (Ptr Caps) -> IO (Ptr Caps)
forall a. Storable a => Ptr a -> IO a
peek Ptr (Ptr Caps)
caps
Caps
caps'' <- ((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
caps'
Query -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Query
query
Ptr (Ptr Caps) -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr Caps)
caps
Caps -> IO Caps
forall (m :: * -> *) a. Monad m => a -> m a
return Caps
caps''
#if defined(ENABLE_OVERLOADING)
data QueryParseCapsResultMethodInfo
instance (signature ~ (m (Gst.Caps.Caps)), MonadIO m) => O.MethodInfo QueryParseCapsResultMethodInfo Query signature where
overloadedMethod = queryParseCapsResult
#endif
foreign import ccall "gst_query_parse_context" gst_query_parse_context ::
Ptr Query ->
Ptr (Ptr Gst.Context.Context) ->
IO ()
queryParseContext ::
(B.CallStack.HasCallStack, MonadIO m) =>
Query
-> m (Gst.Context.Context)
queryParseContext :: Query -> m Context
queryParseContext Query
query = IO Context -> m Context
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Context -> m Context) -> IO Context -> m Context
forall a b. (a -> b) -> a -> b
$ do
Ptr Query
query' <- Query -> IO (Ptr Query)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Query
query
Ptr (Ptr Context)
context <- IO (Ptr (Ptr Context))
forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr (Ptr Gst.Context.Context))
Ptr Query -> Ptr (Ptr Context) -> IO ()
gst_query_parse_context Ptr Query
query' Ptr (Ptr Context)
context
Ptr Context
context' <- Ptr (Ptr Context) -> IO (Ptr Context)
forall a. Storable a => Ptr a -> IO a
peek Ptr (Ptr Context)
context
Context
context'' <- ((ManagedPtr Context -> Context) -> Ptr Context -> IO Context
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newBoxed ManagedPtr Context -> Context
Gst.Context.Context) Ptr Context
context'
Query -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Query
query
Ptr (Ptr Context) -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr Context)
context
Context -> IO Context
forall (m :: * -> *) a. Monad m => a -> m a
return Context
context''
#if defined(ENABLE_OVERLOADING)
data QueryParseContextMethodInfo
instance (signature ~ (m (Gst.Context.Context)), MonadIO m) => O.MethodInfo QueryParseContextMethodInfo Query signature where
overloadedMethod = queryParseContext
#endif
foreign import ccall "gst_query_parse_context_type" gst_query_parse_context_type ::
Ptr Query ->
Ptr CString ->
IO CInt
queryParseContextType ::
(B.CallStack.HasCallStack, MonadIO m) =>
Query
-> m ((Bool, T.Text))
queryParseContextType :: Query -> m (Bool, Text)
queryParseContextType Query
query = IO (Bool, Text) -> m (Bool, Text)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Bool, Text) -> m (Bool, Text))
-> IO (Bool, Text) -> m (Bool, Text)
forall a b. (a -> b) -> a -> b
$ do
Ptr Query
query' <- Query -> IO (Ptr Query)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Query
query
Ptr CString
contextType <- IO (Ptr CString)
forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr CString)
CInt
result <- Ptr Query -> Ptr CString -> IO CInt
gst_query_parse_context_type Ptr Query
query' Ptr CString
contextType
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
CString
contextType' <- Ptr CString -> IO CString
forall a. Storable a => Ptr a -> IO a
peek Ptr CString
contextType
Text
contextType'' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
contextType'
Query -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Query
query
Ptr CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
contextType
(Bool, Text) -> IO (Bool, Text)
forall (m :: * -> *) a. Monad m => a -> m a
return (Bool
result', Text
contextType'')
#if defined(ENABLE_OVERLOADING)
data QueryParseContextTypeMethodInfo
instance (signature ~ (m ((Bool, T.Text))), MonadIO m) => O.MethodInfo QueryParseContextTypeMethodInfo Query signature where
overloadedMethod = queryParseContextType
#endif
foreign import ccall "gst_query_parse_convert" gst_query_parse_convert ::
Ptr Query ->
Ptr CUInt ->
Ptr Int64 ->
Ptr CUInt ->
Ptr Int64 ->
IO ()
queryParseConvert ::
(B.CallStack.HasCallStack, MonadIO m) =>
Query
-> m ((Gst.Enums.Format, Int64, Gst.Enums.Format, Int64))
queryParseConvert :: Query -> m (Format, Int64, Format, Int64)
queryParseConvert Query
query = IO (Format, Int64, Format, Int64)
-> m (Format, Int64, Format, Int64)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Format, Int64, Format, Int64)
-> m (Format, Int64, Format, Int64))
-> IO (Format, Int64, Format, Int64)
-> m (Format, Int64, Format, Int64)
forall a b. (a -> b) -> a -> b
$ do
Ptr Query
query' <- Query -> IO (Ptr Query)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Query
query
Ptr CUInt
srcFormat <- IO (Ptr CUInt)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr CUInt)
Ptr Int64
srcValue <- IO (Ptr Int64)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int64)
Ptr CUInt
destFormat <- IO (Ptr CUInt)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr CUInt)
Ptr Int64
destValue <- IO (Ptr Int64)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int64)
Ptr Query
-> Ptr CUInt -> Ptr Int64 -> Ptr CUInt -> Ptr Int64 -> IO ()
gst_query_parse_convert Ptr Query
query' Ptr CUInt
srcFormat Ptr Int64
srcValue Ptr CUInt
destFormat Ptr Int64
destValue
CUInt
srcFormat' <- Ptr CUInt -> IO CUInt
forall a. Storable a => Ptr a -> IO a
peek Ptr CUInt
srcFormat
let srcFormat'' :: Format
srcFormat'' = (Int -> Format
forall a. Enum a => Int -> a
toEnum (Int -> Format) -> (CUInt -> Int) -> CUInt -> Format
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
srcFormat'
Int64
srcValue' <- Ptr Int64 -> IO Int64
forall a. Storable a => Ptr a -> IO a
peek Ptr Int64
srcValue
CUInt
destFormat' <- Ptr CUInt -> IO CUInt
forall a. Storable a => Ptr a -> IO a
peek Ptr CUInt
destFormat
let destFormat'' :: Format
destFormat'' = (Int -> Format
forall a. Enum a => Int -> a
toEnum (Int -> Format) -> (CUInt -> Int) -> CUInt -> Format
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
destFormat'
Int64
destValue' <- Ptr Int64 -> IO Int64
forall a. Storable a => Ptr a -> IO a
peek Ptr Int64
destValue
Query -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Query
query
Ptr CUInt -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CUInt
srcFormat
Ptr Int64 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int64
srcValue
Ptr CUInt -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CUInt
destFormat
Ptr Int64 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int64
destValue
(Format, Int64, Format, Int64) -> IO (Format, Int64, Format, Int64)
forall (m :: * -> *) a. Monad m => a -> m a
return (Format
srcFormat'', Int64
srcValue', Format
destFormat'', Int64
destValue')
#if defined(ENABLE_OVERLOADING)
data QueryParseConvertMethodInfo
instance (signature ~ (m ((Gst.Enums.Format, Int64, Gst.Enums.Format, Int64))), MonadIO m) => O.MethodInfo QueryParseConvertMethodInfo Query signature where
overloadedMethod = queryParseConvert
#endif
foreign import ccall "gst_query_parse_duration" gst_query_parse_duration ::
Ptr Query ->
Ptr CUInt ->
Ptr Int64 ->
IO ()
queryParseDuration ::
(B.CallStack.HasCallStack, MonadIO m) =>
Query
-> m ((Gst.Enums.Format, Int64))
queryParseDuration :: Query -> m (Format, Int64)
queryParseDuration Query
query = IO (Format, Int64) -> m (Format, Int64)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Format, Int64) -> m (Format, Int64))
-> IO (Format, Int64) -> m (Format, Int64)
forall a b. (a -> b) -> a -> b
$ do
Ptr Query
query' <- Query -> IO (Ptr Query)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Query
query
Ptr CUInt
format <- IO (Ptr CUInt)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr CUInt)
Ptr Int64
duration <- IO (Ptr Int64)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int64)
Ptr Query -> Ptr CUInt -> Ptr Int64 -> IO ()
gst_query_parse_duration Ptr Query
query' Ptr CUInt
format Ptr Int64
duration
CUInt
format' <- Ptr CUInt -> IO CUInt
forall a. Storable a => Ptr a -> IO a
peek Ptr CUInt
format
let format'' :: Format
format'' = (Int -> Format
forall a. Enum a => Int -> a
toEnum (Int -> Format) -> (CUInt -> Int) -> CUInt -> Format
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
format'
Int64
duration' <- Ptr Int64 -> IO Int64
forall a. Storable a => Ptr a -> IO a
peek Ptr Int64
duration
Query -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Query
query
Ptr CUInt -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CUInt
format
Ptr Int64 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int64
duration
(Format, Int64) -> IO (Format, Int64)
forall (m :: * -> *) a. Monad m => a -> m a
return (Format
format'', Int64
duration')
#if defined(ENABLE_OVERLOADING)
data QueryParseDurationMethodInfo
instance (signature ~ (m ((Gst.Enums.Format, Int64))), MonadIO m) => O.MethodInfo QueryParseDurationMethodInfo Query signature where
overloadedMethod = queryParseDuration
#endif
foreign import ccall "gst_query_parse_latency" gst_query_parse_latency ::
Ptr Query ->
Ptr CInt ->
Ptr Word64 ->
Ptr Word64 ->
IO ()
queryParseLatency ::
(B.CallStack.HasCallStack, MonadIO m) =>
Query
-> m ((Bool, Word64, Word64))
queryParseLatency :: Query -> m (Bool, CGType, CGType)
queryParseLatency Query
query = IO (Bool, CGType, CGType) -> m (Bool, CGType, CGType)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Bool, CGType, CGType) -> m (Bool, CGType, CGType))
-> IO (Bool, CGType, CGType) -> m (Bool, CGType, CGType)
forall a b. (a -> b) -> a -> b
$ do
Ptr Query
query' <- Query -> IO (Ptr Query)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Query
query
Ptr CInt
live <- IO (Ptr CInt)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr CInt)
Ptr CGType
minLatency <- IO (Ptr CGType)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Word64)
Ptr CGType
maxLatency <- IO (Ptr CGType)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Word64)
Ptr Query -> Ptr CInt -> Ptr CGType -> Ptr CGType -> IO ()
gst_query_parse_latency Ptr Query
query' Ptr CInt
live Ptr CGType
minLatency Ptr CGType
maxLatency
CInt
live' <- Ptr CInt -> IO CInt
forall a. Storable a => Ptr a -> IO a
peek Ptr CInt
live
let live'' :: Bool
live'' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
live'
CGType
minLatency' <- Ptr CGType -> IO CGType
forall a. Storable a => Ptr a -> IO a
peek Ptr CGType
minLatency
CGType
maxLatency' <- Ptr CGType -> IO CGType
forall a. Storable a => Ptr a -> IO a
peek Ptr CGType
maxLatency
Query -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Query
query
Ptr CInt -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CInt
live
Ptr CGType -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CGType
minLatency
Ptr CGType -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CGType
maxLatency
(Bool, CGType, CGType) -> IO (Bool, CGType, CGType)
forall (m :: * -> *) a. Monad m => a -> m a
return (Bool
live'', CGType
minLatency', CGType
maxLatency')
#if defined(ENABLE_OVERLOADING)
data QueryParseLatencyMethodInfo
instance (signature ~ (m ((Bool, Word64, Word64))), MonadIO m) => O.MethodInfo QueryParseLatencyMethodInfo Query signature where
overloadedMethod = queryParseLatency
#endif
foreign import ccall "gst_query_parse_n_formats" gst_query_parse_n_formats ::
Ptr Query ->
Ptr Word32 ->
IO ()
queryParseNFormats ::
(B.CallStack.HasCallStack, MonadIO m) =>
Query
-> m (Word32)
queryParseNFormats :: Query -> m Word32
queryParseNFormats Query
query = 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 Query
query' <- Query -> IO (Ptr Query)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Query
query
Ptr Word32
nFormats <- IO (Ptr Word32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Word32)
Ptr Query -> Ptr Word32 -> IO ()
gst_query_parse_n_formats Ptr Query
query' Ptr Word32
nFormats
Word32
nFormats' <- Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek Ptr Word32
nFormats
Query -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Query
query
Ptr Word32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word32
nFormats
Word32 -> IO Word32
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
nFormats'
#if defined(ENABLE_OVERLOADING)
data QueryParseNFormatsMethodInfo
instance (signature ~ (m (Word32)), MonadIO m) => O.MethodInfo QueryParseNFormatsMethodInfo Query signature where
overloadedMethod = queryParseNFormats
#endif
foreign import ccall "gst_query_parse_nth_allocation_meta" gst_query_parse_nth_allocation_meta ::
Ptr Query ->
Word32 ->
Ptr (Ptr Gst.Structure.Structure) ->
IO CGType
queryParseNthAllocationMeta ::
(B.CallStack.HasCallStack, MonadIO m) =>
Query
-> Word32
-> m ((GType, Gst.Structure.Structure))
queryParseNthAllocationMeta :: Query -> Word32 -> m (GType, Structure)
queryParseNthAllocationMeta Query
query Word32
index = IO (GType, Structure) -> m (GType, Structure)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (GType, Structure) -> m (GType, Structure))
-> IO (GType, Structure) -> m (GType, Structure)
forall a b. (a -> b) -> a -> b
$ do
Ptr Query
query' <- Query -> IO (Ptr Query)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Query
query
Ptr (Ptr Structure)
params <- IO (Ptr (Ptr Structure))
forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr (Ptr Gst.Structure.Structure))
CGType
result <- Ptr Query -> Word32 -> Ptr (Ptr Structure) -> IO CGType
gst_query_parse_nth_allocation_meta Ptr Query
query' Word32
index Ptr (Ptr Structure)
params
let result' :: GType
result' = CGType -> GType
GType CGType
result
Ptr Structure
params' <- Ptr (Ptr Structure) -> IO (Ptr Structure)
forall a. Storable a => Ptr a -> IO a
peek Ptr (Ptr Structure)
params
Structure
params'' <- ((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
params'
Query -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Query
query
Ptr (Ptr Structure) -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr Structure)
params
(GType, Structure) -> IO (GType, Structure)
forall (m :: * -> *) a. Monad m => a -> m a
return (GType
result', Structure
params'')
#if defined(ENABLE_OVERLOADING)
data QueryParseNthAllocationMetaMethodInfo
instance (signature ~ (Word32 -> m ((GType, Gst.Structure.Structure))), MonadIO m) => O.MethodInfo QueryParseNthAllocationMetaMethodInfo Query signature where
overloadedMethod = queryParseNthAllocationMeta
#endif
foreign import ccall "gst_query_parse_nth_allocation_param" gst_query_parse_nth_allocation_param ::
Ptr Query ->
Word32 ->
Ptr (Ptr Gst.Allocator.Allocator) ->
Ptr Gst.AllocationParams.AllocationParams ->
IO ()
queryParseNthAllocationParam ::
(B.CallStack.HasCallStack, MonadIO m) =>
Query
-> Word32
-> m ((Gst.Allocator.Allocator, Gst.AllocationParams.AllocationParams))
queryParseNthAllocationParam :: Query -> Word32 -> m (Allocator, AllocationParams)
queryParseNthAllocationParam Query
query Word32
index = IO (Allocator, AllocationParams) -> m (Allocator, AllocationParams)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Allocator, AllocationParams)
-> m (Allocator, AllocationParams))
-> IO (Allocator, AllocationParams)
-> m (Allocator, AllocationParams)
forall a b. (a -> b) -> a -> b
$ do
Ptr Query
query' <- Query -> IO (Ptr Query)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Query
query
Ptr (Ptr Allocator)
allocator <- IO (Ptr (Ptr Allocator))
forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr (Ptr Gst.Allocator.Allocator))
Ptr AllocationParams
params <- Int -> IO (Ptr AllocationParams)
forall a. GBoxed a => Int -> IO (Ptr a)
SP.callocBoxedBytes Int
64 :: IO (Ptr Gst.AllocationParams.AllocationParams)
Ptr Query
-> Word32 -> Ptr (Ptr Allocator) -> Ptr AllocationParams -> IO ()
gst_query_parse_nth_allocation_param Ptr Query
query' Word32
index Ptr (Ptr Allocator)
allocator Ptr AllocationParams
params
Ptr Allocator
allocator' <- Ptr (Ptr Allocator) -> IO (Ptr Allocator)
forall a. Storable a => Ptr a -> IO a
peek Ptr (Ptr Allocator)
allocator
Allocator
allocator'' <- ((ManagedPtr Allocator -> Allocator)
-> Ptr Allocator -> IO Allocator
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr Allocator -> Allocator
Gst.Allocator.Allocator) Ptr Allocator
allocator'
AllocationParams
params' <- ((ManagedPtr AllocationParams -> AllocationParams)
-> Ptr AllocationParams -> IO AllocationParams
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr AllocationParams -> AllocationParams
Gst.AllocationParams.AllocationParams) Ptr AllocationParams
params
Query -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Query
query
Ptr (Ptr Allocator) -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr Allocator)
allocator
(Allocator, AllocationParams) -> IO (Allocator, AllocationParams)
forall (m :: * -> *) a. Monad m => a -> m a
return (Allocator
allocator'', AllocationParams
params')
#if defined(ENABLE_OVERLOADING)
data QueryParseNthAllocationParamMethodInfo
instance (signature ~ (Word32 -> m ((Gst.Allocator.Allocator, Gst.AllocationParams.AllocationParams))), MonadIO m) => O.MethodInfo QueryParseNthAllocationParamMethodInfo Query signature where
overloadedMethod = queryParseNthAllocationParam
#endif
foreign import ccall "gst_query_parse_nth_allocation_pool" gst_query_parse_nth_allocation_pool ::
Ptr Query ->
Word32 ->
Ptr (Ptr Gst.BufferPool.BufferPool) ->
Ptr Word32 ->
Ptr Word32 ->
Ptr Word32 ->
IO ()
queryParseNthAllocationPool ::
(B.CallStack.HasCallStack, MonadIO m) =>
Query
-> Word32
-> m ((Gst.BufferPool.BufferPool, Word32, Word32, Word32))
queryParseNthAllocationPool :: Query -> Word32 -> m (BufferPool, Word32, Word32, Word32)
queryParseNthAllocationPool Query
query Word32
index = IO (BufferPool, Word32, Word32, Word32)
-> m (BufferPool, Word32, Word32, Word32)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (BufferPool, Word32, Word32, Word32)
-> m (BufferPool, Word32, Word32, Word32))
-> IO (BufferPool, Word32, Word32, Word32)
-> m (BufferPool, Word32, Word32, Word32)
forall a b. (a -> b) -> a -> b
$ do
Ptr Query
query' <- Query -> IO (Ptr Query)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Query
query
Ptr (Ptr BufferPool)
pool <- IO (Ptr (Ptr BufferPool))
forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr (Ptr Gst.BufferPool.BufferPool))
Ptr Word32
size <- IO (Ptr Word32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Word32)
Ptr Word32
minBuffers <- IO (Ptr Word32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Word32)
Ptr Word32
maxBuffers <- IO (Ptr Word32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Word32)
Ptr Query
-> Word32
-> Ptr (Ptr BufferPool)
-> Ptr Word32
-> Ptr Word32
-> Ptr Word32
-> IO ()
gst_query_parse_nth_allocation_pool Ptr Query
query' Word32
index Ptr (Ptr BufferPool)
pool Ptr Word32
size Ptr Word32
minBuffers Ptr Word32
maxBuffers
Ptr BufferPool
pool' <- Ptr (Ptr BufferPool) -> IO (Ptr BufferPool)
forall a. Storable a => Ptr a -> IO a
peek Ptr (Ptr BufferPool)
pool
BufferPool
pool'' <- ((ManagedPtr BufferPool -> BufferPool)
-> Ptr BufferPool -> IO BufferPool
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr BufferPool -> BufferPool
Gst.BufferPool.BufferPool) Ptr BufferPool
pool'
Word32
size' <- Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek Ptr Word32
size
Word32
minBuffers' <- Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek Ptr Word32
minBuffers
Word32
maxBuffers' <- Ptr Word32 -> IO Word32
forall a. Storable a => Ptr a -> IO a
peek Ptr Word32
maxBuffers
Query -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Query
query
Ptr (Ptr BufferPool) -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr (Ptr BufferPool)
pool
Ptr Word32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word32
size
Ptr Word32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word32
minBuffers
Ptr Word32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Word32
maxBuffers
(BufferPool, Word32, Word32, Word32)
-> IO (BufferPool, Word32, Word32, Word32)
forall (m :: * -> *) a. Monad m => a -> m a
return (BufferPool
pool'', Word32
size', Word32
minBuffers', Word32
maxBuffers')
#if defined(ENABLE_OVERLOADING)
data QueryParseNthAllocationPoolMethodInfo
instance (signature ~ (Word32 -> m ((Gst.BufferPool.BufferPool, Word32, Word32, Word32))), MonadIO m) => O.MethodInfo QueryParseNthAllocationPoolMethodInfo Query signature where
overloadedMethod = queryParseNthAllocationPool
#endif
foreign import ccall "gst_query_parse_nth_buffering_range" gst_query_parse_nth_buffering_range ::
Ptr Query ->
Word32 ->
Ptr Int64 ->
Ptr Int64 ->
IO CInt
queryParseNthBufferingRange ::
(B.CallStack.HasCallStack, MonadIO m) =>
Query
-> Word32
-> m ((Bool, Int64, Int64))
queryParseNthBufferingRange :: Query -> Word32 -> m (Bool, Int64, Int64)
queryParseNthBufferingRange Query
query Word32
index = IO (Bool, Int64, Int64) -> m (Bool, Int64, Int64)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Bool, Int64, Int64) -> m (Bool, Int64, Int64))
-> IO (Bool, Int64, Int64) -> m (Bool, Int64, Int64)
forall a b. (a -> b) -> a -> b
$ do
Ptr Query
query' <- Query -> IO (Ptr Query)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Query
query
Ptr Int64
start <- IO (Ptr Int64)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int64)
Ptr Int64
stop <- IO (Ptr Int64)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int64)
CInt
result <- Ptr Query -> Word32 -> Ptr Int64 -> Ptr Int64 -> IO CInt
gst_query_parse_nth_buffering_range Ptr Query
query' Word32
index Ptr Int64
start Ptr Int64
stop
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
result
Int64
start' <- Ptr Int64 -> IO Int64
forall a. Storable a => Ptr a -> IO a
peek Ptr Int64
start
Int64
stop' <- Ptr Int64 -> IO Int64
forall a. Storable a => Ptr a -> IO a
peek Ptr Int64
stop
Query -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Query
query
Ptr Int64 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int64
start
Ptr Int64 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int64
stop
(Bool, Int64, Int64) -> IO (Bool, Int64, Int64)
forall (m :: * -> *) a. Monad m => a -> m a
return (Bool
result', Int64
start', Int64
stop')
#if defined(ENABLE_OVERLOADING)
data QueryParseNthBufferingRangeMethodInfo
instance (signature ~ (Word32 -> m ((Bool, Int64, Int64))), MonadIO m) => O.MethodInfo QueryParseNthBufferingRangeMethodInfo Query signature where
overloadedMethod = queryParseNthBufferingRange
#endif
foreign import ccall "gst_query_parse_nth_format" gst_query_parse_nth_format ::
Ptr Query ->
Word32 ->
Ptr CUInt ->
IO ()
queryParseNthFormat ::
(B.CallStack.HasCallStack, MonadIO m) =>
Query
-> Word32
-> m (Gst.Enums.Format)
queryParseNthFormat :: Query -> Word32 -> m Format
queryParseNthFormat Query
query Word32
nth = IO Format -> m Format
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO Format -> m Format) -> IO Format -> m Format
forall a b. (a -> b) -> a -> b
$ do
Ptr Query
query' <- Query -> IO (Ptr Query)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Query
query
Ptr CUInt
format <- IO (Ptr CUInt)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr CUInt)
Ptr Query -> Word32 -> Ptr CUInt -> IO ()
gst_query_parse_nth_format Ptr Query
query' Word32
nth Ptr CUInt
format
CUInt
format' <- Ptr CUInt -> IO CUInt
forall a. Storable a => Ptr a -> IO a
peek Ptr CUInt
format
let format'' :: Format
format'' = (Int -> Format
forall a. Enum a => Int -> a
toEnum (Int -> Format) -> (CUInt -> Int) -> CUInt -> Format
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
format'
Query -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Query
query
Ptr CUInt -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CUInt
format
Format -> IO Format
forall (m :: * -> *) a. Monad m => a -> m a
return Format
format''
#if defined(ENABLE_OVERLOADING)
data QueryParseNthFormatMethodInfo
instance (signature ~ (Word32 -> m (Gst.Enums.Format)), MonadIO m) => O.MethodInfo QueryParseNthFormatMethodInfo Query signature where
overloadedMethod = queryParseNthFormat
#endif
foreign import ccall "gst_query_parse_nth_scheduling_mode" gst_query_parse_nth_scheduling_mode ::
Ptr Query ->
Word32 ->
IO CUInt
queryParseNthSchedulingMode ::
(B.CallStack.HasCallStack, MonadIO m) =>
Query
-> Word32
-> m Gst.Enums.PadMode
queryParseNthSchedulingMode :: Query -> Word32 -> m PadMode
queryParseNthSchedulingMode Query
query Word32
index = IO PadMode -> m PadMode
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO PadMode -> m PadMode) -> IO PadMode -> m PadMode
forall a b. (a -> b) -> a -> b
$ do
Ptr Query
query' <- Query -> IO (Ptr Query)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Query
query
CUInt
result <- Ptr Query -> Word32 -> IO CUInt
gst_query_parse_nth_scheduling_mode Ptr Query
query' Word32
index
let result' :: PadMode
result' = (Int -> PadMode
forall a. Enum a => Int -> a
toEnum (Int -> PadMode) -> (CUInt -> Int) -> CUInt -> PadMode
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
result
Query -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Query
query
PadMode -> IO PadMode
forall (m :: * -> *) a. Monad m => a -> m a
return PadMode
result'
#if defined(ENABLE_OVERLOADING)
data QueryParseNthSchedulingModeMethodInfo
instance (signature ~ (Word32 -> m Gst.Enums.PadMode), MonadIO m) => O.MethodInfo QueryParseNthSchedulingModeMethodInfo Query signature where
overloadedMethod = queryParseNthSchedulingMode
#endif
foreign import ccall "gst_query_parse_position" gst_query_parse_position ::
Ptr Query ->
Ptr CUInt ->
Ptr Int64 ->
IO ()
queryParsePosition ::
(B.CallStack.HasCallStack, MonadIO m) =>
Query
-> m ((Gst.Enums.Format, Int64))
queryParsePosition :: Query -> m (Format, Int64)
queryParsePosition Query
query = IO (Format, Int64) -> m (Format, Int64)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Format, Int64) -> m (Format, Int64))
-> IO (Format, Int64) -> m (Format, Int64)
forall a b. (a -> b) -> a -> b
$ do
Ptr Query
query' <- Query -> IO (Ptr Query)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Query
query
Ptr CUInt
format <- IO (Ptr CUInt)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr CUInt)
Ptr Int64
cur <- IO (Ptr Int64)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int64)
Ptr Query -> Ptr CUInt -> Ptr Int64 -> IO ()
gst_query_parse_position Ptr Query
query' Ptr CUInt
format Ptr Int64
cur
CUInt
format' <- Ptr CUInt -> IO CUInt
forall a. Storable a => Ptr a -> IO a
peek Ptr CUInt
format
let format'' :: Format
format'' = (Int -> Format
forall a. Enum a => Int -> a
toEnum (Int -> Format) -> (CUInt -> Int) -> CUInt -> Format
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
format'
Int64
cur' <- Ptr Int64 -> IO Int64
forall a. Storable a => Ptr a -> IO a
peek Ptr Int64
cur
Query -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Query
query
Ptr CUInt -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CUInt
format
Ptr Int64 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int64
cur
(Format, Int64) -> IO (Format, Int64)
forall (m :: * -> *) a. Monad m => a -> m a
return (Format
format'', Int64
cur')
#if defined(ENABLE_OVERLOADING)
data QueryParsePositionMethodInfo
instance (signature ~ (m ((Gst.Enums.Format, Int64))), MonadIO m) => O.MethodInfo QueryParsePositionMethodInfo Query signature where
overloadedMethod = queryParsePosition
#endif
foreign import ccall "gst_query_parse_scheduling" gst_query_parse_scheduling ::
Ptr Query ->
Ptr CUInt ->
Ptr Int32 ->
Ptr Int32 ->
Ptr Int32 ->
IO ()
queryParseScheduling ::
(B.CallStack.HasCallStack, MonadIO m) =>
Query
-> m (([Gst.Flags.SchedulingFlags], Int32, Int32, Int32))
queryParseScheduling :: Query -> m ([SchedulingFlags], Int32, Int32, Int32)
queryParseScheduling Query
query = IO ([SchedulingFlags], Int32, Int32, Int32)
-> m ([SchedulingFlags], Int32, Int32, Int32)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO ([SchedulingFlags], Int32, Int32, Int32)
-> m ([SchedulingFlags], Int32, Int32, Int32))
-> IO ([SchedulingFlags], Int32, Int32, Int32)
-> m ([SchedulingFlags], Int32, Int32, Int32)
forall a b. (a -> b) -> a -> b
$ do
Ptr Query
query' <- Query -> IO (Ptr Query)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Query
query
Ptr CUInt
flags <- IO (Ptr CUInt)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr CUInt)
Ptr Int32
minsize <- IO (Ptr Int32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int32)
Ptr Int32
maxsize <- IO (Ptr Int32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int32)
Ptr Int32
align <- IO (Ptr Int32)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int32)
Ptr Query
-> Ptr CUInt -> Ptr Int32 -> Ptr Int32 -> Ptr Int32 -> IO ()
gst_query_parse_scheduling Ptr Query
query' Ptr CUInt
flags Ptr Int32
minsize Ptr Int32
maxsize Ptr Int32
align
CUInt
flags' <- Ptr CUInt -> IO CUInt
forall a. Storable a => Ptr a -> IO a
peek Ptr CUInt
flags
let flags'' :: [SchedulingFlags]
flags'' = CUInt -> [SchedulingFlags]
forall a b. (Storable a, Integral a, Bits a, IsGFlag b) => a -> [b]
wordToGFlags CUInt
flags'
Int32
minsize' <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek Ptr Int32
minsize
Int32
maxsize' <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek Ptr Int32
maxsize
Int32
align' <- Ptr Int32 -> IO Int32
forall a. Storable a => Ptr a -> IO a
peek Ptr Int32
align
Query -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Query
query
Ptr CUInt -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CUInt
flags
Ptr Int32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int32
minsize
Ptr Int32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int32
maxsize
Ptr Int32 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int32
align
([SchedulingFlags], Int32, Int32, Int32)
-> IO ([SchedulingFlags], Int32, Int32, Int32)
forall (m :: * -> *) a. Monad m => a -> m a
return ([SchedulingFlags]
flags'', Int32
minsize', Int32
maxsize', Int32
align')
#if defined(ENABLE_OVERLOADING)
data QueryParseSchedulingMethodInfo
instance (signature ~ (m (([Gst.Flags.SchedulingFlags], Int32, Int32, Int32))), MonadIO m) => O.MethodInfo QueryParseSchedulingMethodInfo Query signature where
overloadedMethod = queryParseScheduling
#endif
foreign import ccall "gst_query_parse_seeking" gst_query_parse_seeking ::
Ptr Query ->
Ptr CUInt ->
Ptr CInt ->
Ptr Int64 ->
Ptr Int64 ->
IO ()
queryParseSeeking ::
(B.CallStack.HasCallStack, MonadIO m) =>
Query
-> m ((Gst.Enums.Format, Bool, Int64, Int64))
queryParseSeeking :: Query -> m (Format, Bool, Int64, Int64)
queryParseSeeking Query
query = IO (Format, Bool, Int64, Int64) -> m (Format, Bool, Int64, Int64)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Format, Bool, Int64, Int64) -> m (Format, Bool, Int64, Int64))
-> IO (Format, Bool, Int64, Int64)
-> m (Format, Bool, Int64, Int64)
forall a b. (a -> b) -> a -> b
$ do
Ptr Query
query' <- Query -> IO (Ptr Query)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Query
query
Ptr CUInt
format <- IO (Ptr CUInt)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr CUInt)
Ptr CInt
seekable <- IO (Ptr CInt)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr CInt)
Ptr Int64
segmentStart <- IO (Ptr Int64)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int64)
Ptr Int64
segmentEnd <- IO (Ptr Int64)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int64)
Ptr Query
-> Ptr CUInt -> Ptr CInt -> Ptr Int64 -> Ptr Int64 -> IO ()
gst_query_parse_seeking Ptr Query
query' Ptr CUInt
format Ptr CInt
seekable Ptr Int64
segmentStart Ptr Int64
segmentEnd
CUInt
format' <- Ptr CUInt -> IO CUInt
forall a. Storable a => Ptr a -> IO a
peek Ptr CUInt
format
let format'' :: Format
format'' = (Int -> Format
forall a. Enum a => Int -> a
toEnum (Int -> Format) -> (CUInt -> Int) -> CUInt -> Format
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
format'
CInt
seekable' <- Ptr CInt -> IO CInt
forall a. Storable a => Ptr a -> IO a
peek Ptr CInt
seekable
let seekable'' :: Bool
seekable'' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
seekable'
Int64
segmentStart' <- Ptr Int64 -> IO Int64
forall a. Storable a => Ptr a -> IO a
peek Ptr Int64
segmentStart
Int64
segmentEnd' <- Ptr Int64 -> IO Int64
forall a. Storable a => Ptr a -> IO a
peek Ptr Int64
segmentEnd
Query -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Query
query
Ptr CUInt -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CUInt
format
Ptr CInt -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CInt
seekable
Ptr Int64 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int64
segmentStart
Ptr Int64 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int64
segmentEnd
(Format, Bool, Int64, Int64) -> IO (Format, Bool, Int64, Int64)
forall (m :: * -> *) a. Monad m => a -> m a
return (Format
format'', Bool
seekable'', Int64
segmentStart', Int64
segmentEnd')
#if defined(ENABLE_OVERLOADING)
data QueryParseSeekingMethodInfo
instance (signature ~ (m ((Gst.Enums.Format, Bool, Int64, Int64))), MonadIO m) => O.MethodInfo QueryParseSeekingMethodInfo Query signature where
overloadedMethod = queryParseSeeking
#endif
foreign import ccall "gst_query_parse_segment" gst_query_parse_segment ::
Ptr Query ->
Ptr CDouble ->
Ptr CUInt ->
Ptr Int64 ->
Ptr Int64 ->
IO ()
queryParseSegment ::
(B.CallStack.HasCallStack, MonadIO m) =>
Query
-> m ((Double, Gst.Enums.Format, Int64, Int64))
queryParseSegment :: Query -> m (Double, Format, Int64, Int64)
queryParseSegment Query
query = IO (Double, Format, Int64, Int64)
-> m (Double, Format, Int64, Int64)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Double, Format, Int64, Int64)
-> m (Double, Format, Int64, Int64))
-> IO (Double, Format, Int64, Int64)
-> m (Double, Format, Int64, Int64)
forall a b. (a -> b) -> a -> b
$ do
Ptr Query
query' <- Query -> IO (Ptr Query)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Query
query
Ptr CDouble
rate <- IO (Ptr CDouble)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr CDouble)
Ptr CUInt
format <- IO (Ptr CUInt)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr CUInt)
Ptr Int64
startValue <- IO (Ptr Int64)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int64)
Ptr Int64
stopValue <- IO (Ptr Int64)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr Int64)
Ptr Query
-> Ptr CDouble -> Ptr CUInt -> Ptr Int64 -> Ptr Int64 -> IO ()
gst_query_parse_segment Ptr Query
query' Ptr CDouble
rate Ptr CUInt
format Ptr Int64
startValue Ptr Int64
stopValue
CDouble
rate' <- Ptr CDouble -> IO CDouble
forall a. Storable a => Ptr a -> IO a
peek Ptr CDouble
rate
let rate'' :: Double
rate'' = CDouble -> Double
forall a b. (Real a, Fractional b) => a -> b
realToFrac CDouble
rate'
CUInt
format' <- Ptr CUInt -> IO CUInt
forall a. Storable a => Ptr a -> IO a
peek Ptr CUInt
format
let format'' :: Format
format'' = (Int -> Format
forall a. Enum a => Int -> a
toEnum (Int -> Format) -> (CUInt -> Int) -> CUInt -> Format
forall b c a. (b -> c) -> (a -> b) -> a -> c
. CUInt -> Int
forall a b. (Integral a, Num b) => a -> b
fromIntegral) CUInt
format'
Int64
startValue' <- Ptr Int64 -> IO Int64
forall a. Storable a => Ptr a -> IO a
peek Ptr Int64
startValue
Int64
stopValue' <- Ptr Int64 -> IO Int64
forall a. Storable a => Ptr a -> IO a
peek Ptr Int64
stopValue
Query -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Query
query
Ptr CDouble -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CDouble
rate
Ptr CUInt -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CUInt
format
Ptr Int64 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int64
startValue
Ptr Int64 -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr Int64
stopValue
(Double, Format, Int64, Int64) -> IO (Double, Format, Int64, Int64)
forall (m :: * -> *) a. Monad m => a -> m a
return (Double
rate'', Format
format'', Int64
startValue', Int64
stopValue')
#if defined(ENABLE_OVERLOADING)
data QueryParseSegmentMethodInfo
instance (signature ~ (m ((Double, Gst.Enums.Format, Int64, Int64))), MonadIO m) => O.MethodInfo QueryParseSegmentMethodInfo Query signature where
overloadedMethod = queryParseSegment
#endif
foreign import ccall "gst_query_parse_uri" gst_query_parse_uri ::
Ptr Query ->
Ptr CString ->
IO ()
queryParseUri ::
(B.CallStack.HasCallStack, MonadIO m) =>
Query
-> m (T.Text)
queryParseUri :: Query -> m Text
queryParseUri Query
query = 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 Query
query' <- Query -> IO (Ptr Query)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Query
query
Ptr CString
uri <- IO (Ptr CString)
forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr CString)
Ptr Query -> Ptr CString -> IO ()
gst_query_parse_uri Ptr Query
query' Ptr CString
uri
CString
uri' <- Ptr CString -> IO CString
forall a. Storable a => Ptr a -> IO a
peek Ptr CString
uri
Text
uri'' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
uri'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
uri'
Query -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Query
query
Ptr CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
uri
Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
uri''
#if defined(ENABLE_OVERLOADING)
data QueryParseUriMethodInfo
instance (signature ~ (m (T.Text)), MonadIO m) => O.MethodInfo QueryParseUriMethodInfo Query signature where
overloadedMethod = queryParseUri
#endif
foreign import ccall "gst_query_parse_uri_redirection" gst_query_parse_uri_redirection ::
Ptr Query ->
Ptr CString ->
IO ()
queryParseUriRedirection ::
(B.CallStack.HasCallStack, MonadIO m) =>
Query
-> m (T.Text)
queryParseUriRedirection :: Query -> m Text
queryParseUriRedirection Query
query = 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 Query
query' <- Query -> IO (Ptr Query)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Query
query
Ptr CString
uri <- IO (Ptr CString)
forall a. Storable a => IO (Ptr a)
callocMem :: IO (Ptr CString)
Ptr Query -> Ptr CString -> IO ()
gst_query_parse_uri_redirection Ptr Query
query' Ptr CString
uri
CString
uri' <- Ptr CString -> IO CString
forall a. Storable a => Ptr a -> IO a
peek Ptr CString
uri
Text
uri'' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
uri'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
uri'
Query -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Query
query
Ptr CString -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CString
uri
Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
uri''
#if defined(ENABLE_OVERLOADING)
data QueryParseUriRedirectionMethodInfo
instance (signature ~ (m (T.Text)), MonadIO m) => O.MethodInfo QueryParseUriRedirectionMethodInfo Query signature where
overloadedMethod = queryParseUriRedirection
#endif
foreign import ccall "gst_query_parse_uri_redirection_permanent" gst_query_parse_uri_redirection_permanent ::
Ptr Query ->
Ptr CInt ->
IO ()
queryParseUriRedirectionPermanent ::
(B.CallStack.HasCallStack, MonadIO m) =>
Query
-> m (Bool)
queryParseUriRedirectionPermanent :: Query -> m Bool
queryParseUriRedirectionPermanent Query
query = 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 Query
query' <- Query -> IO (Ptr Query)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Query
query
Ptr CInt
permanent <- IO (Ptr CInt)
forall a. Storable a => IO (Ptr a)
allocMem :: IO (Ptr CInt)
Ptr Query -> Ptr CInt -> IO ()
gst_query_parse_uri_redirection_permanent Ptr Query
query' Ptr CInt
permanent
CInt
permanent' <- Ptr CInt -> IO CInt
forall a. Storable a => Ptr a -> IO a
peek Ptr CInt
permanent
let permanent'' :: Bool
permanent'' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= CInt
0) CInt
permanent'
Query -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Query
query
Ptr CInt -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CInt
permanent
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
permanent''
#if defined(ENABLE_OVERLOADING)
data QueryParseUriRedirectionPermanentMethodInfo
instance (signature ~ (m (Bool)), MonadIO m) => O.MethodInfo QueryParseUriRedirectionPermanentMethodInfo Query signature where
overloadedMethod = queryParseUriRedirectionPermanent
#endif
foreign import ccall "gst_query_remove_nth_allocation_meta" gst_query_remove_nth_allocation_meta ::
Ptr Query ->
Word32 ->
IO ()
queryRemoveNthAllocationMeta ::
(B.CallStack.HasCallStack, MonadIO m) =>
Query
-> Word32
-> m ()
queryRemoveNthAllocationMeta :: Query -> Word32 -> m ()
queryRemoveNthAllocationMeta Query
query Word32
index = 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 Query
query' <- Query -> IO (Ptr Query)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Query
query
Ptr Query -> Word32 -> IO ()
gst_query_remove_nth_allocation_meta Ptr Query
query' Word32
index
Query -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Query
query
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data QueryRemoveNthAllocationMetaMethodInfo
instance (signature ~ (Word32 -> m ()), MonadIO m) => O.MethodInfo QueryRemoveNthAllocationMetaMethodInfo Query signature where
overloadedMethod = queryRemoveNthAllocationMeta
#endif
foreign import ccall "gst_query_remove_nth_allocation_param" gst_query_remove_nth_allocation_param ::
Ptr Query ->
Word32 ->
IO ()
queryRemoveNthAllocationParam ::
(B.CallStack.HasCallStack, MonadIO m) =>
Query
-> Word32
-> m ()
queryRemoveNthAllocationParam :: Query -> Word32 -> m ()
queryRemoveNthAllocationParam Query
query Word32
index = 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 Query
query' <- Query -> IO (Ptr Query)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Query
query
Ptr Query -> Word32 -> IO ()
gst_query_remove_nth_allocation_param Ptr Query
query' Word32
index
Query -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Query
query
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data QueryRemoveNthAllocationParamMethodInfo
instance (signature ~ (Word32 -> m ()), MonadIO m) => O.MethodInfo QueryRemoveNthAllocationParamMethodInfo Query signature where
overloadedMethod = queryRemoveNthAllocationParam
#endif
foreign import ccall "gst_query_remove_nth_allocation_pool" gst_query_remove_nth_allocation_pool ::
Ptr Query ->
Word32 ->
IO ()
queryRemoveNthAllocationPool ::
(B.CallStack.HasCallStack, MonadIO m) =>
Query
-> Word32
-> m ()
queryRemoveNthAllocationPool :: Query -> Word32 -> m ()
queryRemoveNthAllocationPool Query
query Word32
index = 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 Query
query' <- Query -> IO (Ptr Query)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Query
query
Ptr Query -> Word32 -> IO ()
gst_query_remove_nth_allocation_pool Ptr Query
query' Word32
index
Query -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Query
query
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data QueryRemoveNthAllocationPoolMethodInfo
instance (signature ~ (Word32 -> m ()), MonadIO m) => O.MethodInfo QueryRemoveNthAllocationPoolMethodInfo Query signature where
overloadedMethod = queryRemoveNthAllocationPool
#endif
foreign import ccall "gst_query_set_accept_caps_result" gst_query_set_accept_caps_result ::
Ptr Query ->
CInt ->
IO ()
querySetAcceptCapsResult ::
(B.CallStack.HasCallStack, MonadIO m) =>
Query
-> Bool
-> m ()
querySetAcceptCapsResult :: Query -> Bool -> m ()
querySetAcceptCapsResult Query
query Bool
result_ = 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 Query
query' <- Query -> IO (Ptr Query)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Query
query
let result_' :: CInt
result_' = (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
result_
Ptr Query -> CInt -> IO ()
gst_query_set_accept_caps_result Ptr Query
query' CInt
result_'
Query -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Query
query
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data QuerySetAcceptCapsResultMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m) => O.MethodInfo QuerySetAcceptCapsResultMethodInfo Query signature where
overloadedMethod = querySetAcceptCapsResult
#endif
foreign import ccall "gst_query_set_bitrate" gst_query_set_bitrate ::
Ptr Query ->
Word32 ->
IO ()
querySetBitrate ::
(B.CallStack.HasCallStack, MonadIO m) =>
Query
-> Word32
-> m ()
querySetBitrate :: Query -> Word32 -> m ()
querySetBitrate Query
query Word32
nominalBitrate = 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 Query
query' <- Query -> IO (Ptr Query)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Query
query
Ptr Query -> Word32 -> IO ()
gst_query_set_bitrate Ptr Query
query' Word32
nominalBitrate
Query -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Query
query
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data QuerySetBitrateMethodInfo
instance (signature ~ (Word32 -> m ()), MonadIO m) => O.MethodInfo QuerySetBitrateMethodInfo Query signature where
overloadedMethod = querySetBitrate
#endif
foreign import ccall "gst_query_set_buffering_percent" gst_query_set_buffering_percent ::
Ptr Query ->
CInt ->
Int32 ->
IO ()
querySetBufferingPercent ::
(B.CallStack.HasCallStack, MonadIO m) =>
Query
-> Bool
-> Int32
-> m ()
querySetBufferingPercent :: Query -> Bool -> Int32 -> m ()
querySetBufferingPercent Query
query Bool
busy Int32
percent = 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 Query
query' <- Query -> IO (Ptr Query)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Query
query
let busy' :: CInt
busy' = (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
busy
Ptr Query -> CInt -> Int32 -> IO ()
gst_query_set_buffering_percent Ptr Query
query' CInt
busy' Int32
percent
Query -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Query
query
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data QuerySetBufferingPercentMethodInfo
instance (signature ~ (Bool -> Int32 -> m ()), MonadIO m) => O.MethodInfo QuerySetBufferingPercentMethodInfo Query signature where
overloadedMethod = querySetBufferingPercent
#endif
foreign import ccall "gst_query_set_buffering_range" gst_query_set_buffering_range ::
Ptr Query ->
CUInt ->
Int64 ->
Int64 ->
Int64 ->
IO ()
querySetBufferingRange ::
(B.CallStack.HasCallStack, MonadIO m) =>
Query
-> Gst.Enums.Format
-> Int64
-> Int64
-> Int64
-> m ()
querySetBufferingRange :: Query -> Format -> Int64 -> Int64 -> Int64 -> m ()
querySetBufferingRange Query
query Format
format Int64
start Int64
stop Int64
estimatedTotal = 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 Query
query' <- Query -> IO (Ptr Query)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Query
query
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
Ptr Query -> CUInt -> Int64 -> Int64 -> Int64 -> IO ()
gst_query_set_buffering_range Ptr Query
query' CUInt
format' Int64
start Int64
stop Int64
estimatedTotal
Query -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Query
query
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data QuerySetBufferingRangeMethodInfo
instance (signature ~ (Gst.Enums.Format -> Int64 -> Int64 -> Int64 -> m ()), MonadIO m) => O.MethodInfo QuerySetBufferingRangeMethodInfo Query signature where
overloadedMethod = querySetBufferingRange
#endif
foreign import ccall "gst_query_set_buffering_stats" gst_query_set_buffering_stats ::
Ptr Query ->
CUInt ->
Int32 ->
Int32 ->
Int64 ->
IO ()
querySetBufferingStats ::
(B.CallStack.HasCallStack, MonadIO m) =>
Query
-> Gst.Enums.BufferingMode
-> Int32
-> Int32
-> Int64
-> m ()
querySetBufferingStats :: Query -> BufferingMode -> Int32 -> Int32 -> Int64 -> m ()
querySetBufferingStats Query
query BufferingMode
mode Int32
avgIn Int32
avgOut Int64
bufferingLeft = 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 Query
query' <- Query -> IO (Ptr Query)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Query
query
let mode' :: CUInt
mode' = (Int -> CUInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CUInt) -> (BufferingMode -> Int) -> BufferingMode -> CUInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. BufferingMode -> Int
forall a. Enum a => a -> Int
fromEnum) BufferingMode
mode
Ptr Query -> CUInt -> Int32 -> Int32 -> Int64 -> IO ()
gst_query_set_buffering_stats Ptr Query
query' CUInt
mode' Int32
avgIn Int32
avgOut Int64
bufferingLeft
Query -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Query
query
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data QuerySetBufferingStatsMethodInfo
instance (signature ~ (Gst.Enums.BufferingMode -> Int32 -> Int32 -> Int64 -> m ()), MonadIO m) => O.MethodInfo QuerySetBufferingStatsMethodInfo Query signature where
overloadedMethod = querySetBufferingStats
#endif
foreign import ccall "gst_query_set_caps_result" gst_query_set_caps_result ::
Ptr Query ->
Ptr Gst.Caps.Caps ->
IO ()
querySetCapsResult ::
(B.CallStack.HasCallStack, MonadIO m) =>
Query
-> Gst.Caps.Caps
-> m ()
querySetCapsResult :: Query -> Caps -> m ()
querySetCapsResult Query
query 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 Query
query' <- Query -> IO (Ptr Query)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Query
query
Ptr Caps
caps' <- Caps -> IO (Ptr Caps)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Caps
caps
Ptr Query -> Ptr Caps -> IO ()
gst_query_set_caps_result Ptr Query
query' Ptr Caps
caps'
Query -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Query
query
Caps -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Caps
caps
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data QuerySetCapsResultMethodInfo
instance (signature ~ (Gst.Caps.Caps -> m ()), MonadIO m) => O.MethodInfo QuerySetCapsResultMethodInfo Query signature where
overloadedMethod = querySetCapsResult
#endif
foreign import ccall "gst_query_set_context" gst_query_set_context ::
Ptr Query ->
Ptr Gst.Context.Context ->
IO ()
querySetContext ::
(B.CallStack.HasCallStack, MonadIO m) =>
Query
-> Gst.Context.Context
-> m ()
querySetContext :: Query -> Context -> m ()
querySetContext Query
query Context
context = 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 Query
query' <- Query -> IO (Ptr Query)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Query
query
Ptr Context
context' <- Context -> IO (Ptr Context)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Context
context
Ptr Query -> Ptr Context -> IO ()
gst_query_set_context Ptr Query
query' Ptr Context
context'
Query -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Query
query
Context -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Context
context
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data QuerySetContextMethodInfo
instance (signature ~ (Gst.Context.Context -> m ()), MonadIO m) => O.MethodInfo QuerySetContextMethodInfo Query signature where
overloadedMethod = querySetContext
#endif
foreign import ccall "gst_query_set_convert" gst_query_set_convert ::
Ptr Query ->
CUInt ->
Int64 ->
CUInt ->
Int64 ->
IO ()
querySetConvert ::
(B.CallStack.HasCallStack, MonadIO m) =>
Query
-> Gst.Enums.Format
-> Int64
-> Gst.Enums.Format
-> Int64
-> m ()
querySetConvert :: Query -> Format -> Int64 -> Format -> Int64 -> m ()
querySetConvert Query
query Format
srcFormat Int64
srcValue Format
destFormat Int64
destValue = 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 Query
query' <- Query -> IO (Ptr Query)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Query
query
let srcFormat' :: CUInt
srcFormat' = (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
srcFormat
let destFormat' :: CUInt
destFormat' = (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
destFormat
Ptr Query -> CUInt -> Int64 -> CUInt -> Int64 -> IO ()
gst_query_set_convert Ptr Query
query' CUInt
srcFormat' Int64
srcValue CUInt
destFormat' Int64
destValue
Query -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Query
query
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data QuerySetConvertMethodInfo
instance (signature ~ (Gst.Enums.Format -> Int64 -> Gst.Enums.Format -> Int64 -> m ()), MonadIO m) => O.MethodInfo QuerySetConvertMethodInfo Query signature where
overloadedMethod = querySetConvert
#endif
foreign import ccall "gst_query_set_duration" gst_query_set_duration ::
Ptr Query ->
CUInt ->
Int64 ->
IO ()
querySetDuration ::
(B.CallStack.HasCallStack, MonadIO m) =>
Query
-> Gst.Enums.Format
-> Int64
-> m ()
querySetDuration :: Query -> Format -> Int64 -> m ()
querySetDuration Query
query Format
format Int64
duration = 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 Query
query' <- Query -> IO (Ptr Query)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Query
query
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
Ptr Query -> CUInt -> Int64 -> IO ()
gst_query_set_duration Ptr Query
query' CUInt
format' Int64
duration
Query -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Query
query
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data QuerySetDurationMethodInfo
instance (signature ~ (Gst.Enums.Format -> Int64 -> m ()), MonadIO m) => O.MethodInfo QuerySetDurationMethodInfo Query signature where
overloadedMethod = querySetDuration
#endif
foreign import ccall "gst_query_set_formatsv" gst_query_set_formatsv ::
Ptr Query ->
Int32 ->
Ptr CUInt ->
IO ()
querySetFormatsv ::
(B.CallStack.HasCallStack, MonadIO m) =>
Query
-> [Gst.Enums.Format]
-> m ()
querySetFormatsv :: Query -> [Format] -> m ()
querySetFormatsv Query
query [Format]
formats = 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 nFormats :: Int32
nFormats = Int -> Int32
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> Int32) -> Int -> Int32
forall a b. (a -> b) -> a -> b
$ [Format] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
P.length [Format]
formats
Ptr Query
query' <- Query -> IO (Ptr Query)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Query
query
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. Storable a => [a] -> IO (Ptr a)
packStorableArray [CUInt]
formats'
Ptr Query -> Int32 -> Ptr CUInt -> IO ()
gst_query_set_formatsv Ptr Query
query' Int32
nFormats Ptr CUInt
formats''
Query -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Query
query
Ptr CUInt -> IO ()
forall a. Ptr a -> IO ()
freeMem Ptr CUInt
formats''
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data QuerySetFormatsvMethodInfo
instance (signature ~ ([Gst.Enums.Format] -> m ()), MonadIO m) => O.MethodInfo QuerySetFormatsvMethodInfo Query signature where
overloadedMethod = querySetFormatsv
#endif
foreign import ccall "gst_query_set_latency" gst_query_set_latency ::
Ptr Query ->
CInt ->
Word64 ->
Word64 ->
IO ()
querySetLatency ::
(B.CallStack.HasCallStack, MonadIO m) =>
Query
-> Bool
-> Word64
-> Word64
-> m ()
querySetLatency :: Query -> Bool -> CGType -> CGType -> m ()
querySetLatency Query
query Bool
live CGType
minLatency CGType
maxLatency = 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 Query
query' <- Query -> IO (Ptr Query)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Query
query
let live' :: CInt
live' = (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
live
Ptr Query -> CInt -> CGType -> CGType -> IO ()
gst_query_set_latency Ptr Query
query' CInt
live' CGType
minLatency CGType
maxLatency
Query -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Query
query
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data QuerySetLatencyMethodInfo
instance (signature ~ (Bool -> Word64 -> Word64 -> m ()), MonadIO m) => O.MethodInfo QuerySetLatencyMethodInfo Query signature where
overloadedMethod = querySetLatency
#endif
foreign import ccall "gst_query_set_nth_allocation_param" gst_query_set_nth_allocation_param ::
Ptr Query ->
Word32 ->
Ptr Gst.Allocator.Allocator ->
Ptr Gst.AllocationParams.AllocationParams ->
IO ()
querySetNthAllocationParam ::
(B.CallStack.HasCallStack, MonadIO m, Gst.Allocator.IsAllocator a) =>
Query
-> Word32
-> Maybe (a)
-> Maybe (Gst.AllocationParams.AllocationParams)
-> m ()
querySetNthAllocationParam :: Query -> Word32 -> Maybe a -> Maybe AllocationParams -> m ()
querySetNthAllocationParam Query
query Word32
index Maybe a
allocator Maybe AllocationParams
params = 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 Query
query' <- Query -> IO (Ptr Query)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Query
query
Ptr Allocator
maybeAllocator <- case Maybe a
allocator of
Maybe a
Nothing -> Ptr Allocator -> IO (Ptr Allocator)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Allocator
forall a. Ptr a
nullPtr
Just a
jAllocator -> do
Ptr Allocator
jAllocator' <- a -> IO (Ptr Allocator)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
jAllocator
Ptr Allocator -> IO (Ptr Allocator)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Allocator
jAllocator'
Ptr AllocationParams
maybeParams <- case Maybe AllocationParams
params of
Maybe AllocationParams
Nothing -> Ptr AllocationParams -> IO (Ptr AllocationParams)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr AllocationParams
forall a. Ptr a
nullPtr
Just AllocationParams
jParams -> do
Ptr AllocationParams
jParams' <- AllocationParams -> IO (Ptr AllocationParams)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr AllocationParams
jParams
Ptr AllocationParams -> IO (Ptr AllocationParams)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr AllocationParams
jParams'
Ptr Query
-> Word32 -> Ptr Allocator -> Ptr AllocationParams -> IO ()
gst_query_set_nth_allocation_param Ptr Query
query' Word32
index Ptr Allocator
maybeAllocator Ptr AllocationParams
maybeParams
Query -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Query
query
Maybe a -> (a -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe a
allocator a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
Maybe AllocationParams -> (AllocationParams -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe AllocationParams
params AllocationParams -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data QuerySetNthAllocationParamMethodInfo
instance (signature ~ (Word32 -> Maybe (a) -> Maybe (Gst.AllocationParams.AllocationParams) -> m ()), MonadIO m, Gst.Allocator.IsAllocator a) => O.MethodInfo QuerySetNthAllocationParamMethodInfo Query signature where
overloadedMethod = querySetNthAllocationParam
#endif
foreign import ccall "gst_query_set_nth_allocation_pool" gst_query_set_nth_allocation_pool ::
Ptr Query ->
Word32 ->
Ptr Gst.BufferPool.BufferPool ->
Word32 ->
Word32 ->
Word32 ->
IO ()
querySetNthAllocationPool ::
(B.CallStack.HasCallStack, MonadIO m, Gst.BufferPool.IsBufferPool a) =>
Query
-> Word32
-> Maybe (a)
-> Word32
-> Word32
-> Word32
-> m ()
querySetNthAllocationPool :: Query -> Word32 -> Maybe a -> Word32 -> Word32 -> Word32 -> m ()
querySetNthAllocationPool Query
query Word32
index Maybe a
pool Word32
size Word32
minBuffers Word32
maxBuffers = 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 Query
query' <- Query -> IO (Ptr Query)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Query
query
Ptr BufferPool
maybePool <- case Maybe a
pool of
Maybe a
Nothing -> Ptr BufferPool -> IO (Ptr BufferPool)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr BufferPool
forall a. Ptr a
nullPtr
Just a
jPool -> do
Ptr BufferPool
jPool' <- a -> IO (Ptr BufferPool)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
jPool
Ptr BufferPool -> IO (Ptr BufferPool)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr BufferPool
jPool'
Ptr Query
-> Word32 -> Ptr BufferPool -> Word32 -> Word32 -> Word32 -> IO ()
gst_query_set_nth_allocation_pool Ptr Query
query' Word32
index Ptr BufferPool
maybePool Word32
size Word32
minBuffers Word32
maxBuffers
Query -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Query
query
Maybe a -> (a -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe a
pool a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data QuerySetNthAllocationPoolMethodInfo
instance (signature ~ (Word32 -> Maybe (a) -> Word32 -> Word32 -> Word32 -> m ()), MonadIO m, Gst.BufferPool.IsBufferPool a) => O.MethodInfo QuerySetNthAllocationPoolMethodInfo Query signature where
overloadedMethod = querySetNthAllocationPool
#endif
foreign import ccall "gst_query_set_position" gst_query_set_position ::
Ptr Query ->
CUInt ->
Int64 ->
IO ()
querySetPosition ::
(B.CallStack.HasCallStack, MonadIO m) =>
Query
-> Gst.Enums.Format
-> Int64
-> m ()
querySetPosition :: Query -> Format -> Int64 -> m ()
querySetPosition Query
query Format
format Int64
cur = 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 Query
query' <- Query -> IO (Ptr Query)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Query
query
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
Ptr Query -> CUInt -> Int64 -> IO ()
gst_query_set_position Ptr Query
query' CUInt
format' Int64
cur
Query -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Query
query
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data QuerySetPositionMethodInfo
instance (signature ~ (Gst.Enums.Format -> Int64 -> m ()), MonadIO m) => O.MethodInfo QuerySetPositionMethodInfo Query signature where
overloadedMethod = querySetPosition
#endif
foreign import ccall "gst_query_set_scheduling" gst_query_set_scheduling ::
Ptr Query ->
CUInt ->
Int32 ->
Int32 ->
Int32 ->
IO ()
querySetScheduling ::
(B.CallStack.HasCallStack, MonadIO m) =>
Query
-> [Gst.Flags.SchedulingFlags]
-> Int32
-> Int32
-> Int32
-> m ()
querySetScheduling :: Query -> [SchedulingFlags] -> Int32 -> Int32 -> Int32 -> m ()
querySetScheduling Query
query [SchedulingFlags]
flags Int32
minsize Int32
maxsize Int32
align = 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 Query
query' <- Query -> IO (Ptr Query)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Query
query
let flags' :: CUInt
flags' = [SchedulingFlags] -> CUInt
forall b a. (Num b, IsGFlag a) => [a] -> b
gflagsToWord [SchedulingFlags]
flags
Ptr Query -> CUInt -> Int32 -> Int32 -> Int32 -> IO ()
gst_query_set_scheduling Ptr Query
query' CUInt
flags' Int32
minsize Int32
maxsize Int32
align
Query -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Query
query
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data QuerySetSchedulingMethodInfo
instance (signature ~ ([Gst.Flags.SchedulingFlags] -> Int32 -> Int32 -> Int32 -> m ()), MonadIO m) => O.MethodInfo QuerySetSchedulingMethodInfo Query signature where
overloadedMethod = querySetScheduling
#endif
foreign import ccall "gst_query_set_seeking" gst_query_set_seeking ::
Ptr Query ->
CUInt ->
CInt ->
Int64 ->
Int64 ->
IO ()
querySetSeeking ::
(B.CallStack.HasCallStack, MonadIO m) =>
Query
-> Gst.Enums.Format
-> Bool
-> Int64
-> Int64
-> m ()
querySetSeeking :: Query -> Format -> Bool -> Int64 -> Int64 -> m ()
querySetSeeking Query
query Format
format Bool
seekable Int64
segmentStart Int64
segmentEnd = 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 Query
query' <- Query -> IO (Ptr Query)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Query
query
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
let seekable' :: CInt
seekable' = (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
seekable
Ptr Query -> CUInt -> CInt -> Int64 -> Int64 -> IO ()
gst_query_set_seeking Ptr Query
query' CUInt
format' CInt
seekable' Int64
segmentStart Int64
segmentEnd
Query -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Query
query
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data QuerySetSeekingMethodInfo
instance (signature ~ (Gst.Enums.Format -> Bool -> Int64 -> Int64 -> m ()), MonadIO m) => O.MethodInfo QuerySetSeekingMethodInfo Query signature where
overloadedMethod = querySetSeeking
#endif
foreign import ccall "gst_query_set_segment" gst_query_set_segment ::
Ptr Query ->
CDouble ->
CUInt ->
Int64 ->
Int64 ->
IO ()
querySetSegment ::
(B.CallStack.HasCallStack, MonadIO m) =>
Query
-> Double
-> Gst.Enums.Format
-> Int64
-> Int64
-> m ()
querySetSegment :: Query -> Double -> Format -> Int64 -> Int64 -> m ()
querySetSegment Query
query Double
rate Format
format Int64
startValue Int64
stopValue = 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 Query
query' <- Query -> IO (Ptr Query)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Query
query
let rate' :: CDouble
rate' = Double -> CDouble
forall a b. (Real a, Fractional b) => a -> b
realToFrac Double
rate
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
Ptr Query -> CDouble -> CUInt -> Int64 -> Int64 -> IO ()
gst_query_set_segment Ptr Query
query' CDouble
rate' CUInt
format' Int64
startValue Int64
stopValue
Query -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Query
query
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data QuerySetSegmentMethodInfo
instance (signature ~ (Double -> Gst.Enums.Format -> Int64 -> Int64 -> m ()), MonadIO m) => O.MethodInfo QuerySetSegmentMethodInfo Query signature where
overloadedMethod = querySetSegment
#endif
foreign import ccall "gst_query_set_uri" gst_query_set_uri ::
Ptr Query ->
CString ->
IO ()
querySetUri ::
(B.CallStack.HasCallStack, MonadIO m) =>
Query
-> T.Text
-> m ()
querySetUri :: Query -> Text -> m ()
querySetUri Query
query Text
uri = 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 Query
query' <- Query -> IO (Ptr Query)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Query
query
CString
uri' <- Text -> IO CString
textToCString Text
uri
Ptr Query -> CString -> IO ()
gst_query_set_uri Ptr Query
query' CString
uri'
Query -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Query
query
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
uri'
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data QuerySetUriMethodInfo
instance (signature ~ (T.Text -> m ()), MonadIO m) => O.MethodInfo QuerySetUriMethodInfo Query signature where
overloadedMethod = querySetUri
#endif
foreign import ccall "gst_query_set_uri_redirection" gst_query_set_uri_redirection ::
Ptr Query ->
CString ->
IO ()
querySetUriRedirection ::
(B.CallStack.HasCallStack, MonadIO m) =>
Query
-> T.Text
-> m ()
querySetUriRedirection :: Query -> Text -> m ()
querySetUriRedirection Query
query Text
uri = 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 Query
query' <- Query -> IO (Ptr Query)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Query
query
CString
uri' <- Text -> IO CString
textToCString Text
uri
Ptr Query -> CString -> IO ()
gst_query_set_uri_redirection Ptr Query
query' CString
uri'
Query -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Query
query
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
uri'
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data QuerySetUriRedirectionMethodInfo
instance (signature ~ (T.Text -> m ()), MonadIO m) => O.MethodInfo QuerySetUriRedirectionMethodInfo Query signature where
overloadedMethod = querySetUriRedirection
#endif
foreign import ccall "gst_query_set_uri_redirection_permanent" gst_query_set_uri_redirection_permanent ::
Ptr Query ->
CInt ->
IO ()
querySetUriRedirectionPermanent ::
(B.CallStack.HasCallStack, MonadIO m) =>
Query
-> Bool
-> m ()
querySetUriRedirectionPermanent :: Query -> Bool -> m ()
querySetUriRedirectionPermanent Query
query Bool
permanent = 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 Query
query' <- Query -> IO (Ptr Query)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Query
query
let permanent' :: CInt
permanent' = (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
permanent
Ptr Query -> CInt -> IO ()
gst_query_set_uri_redirection_permanent Ptr Query
query' CInt
permanent'
Query -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Query
query
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data QuerySetUriRedirectionPermanentMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m) => O.MethodInfo QuerySetUriRedirectionPermanentMethodInfo Query signature where
overloadedMethod = querySetUriRedirectionPermanent
#endif
foreign import ccall "gst_query_writable_structure" gst_query_writable_structure ::
Ptr Query ->
IO (Ptr Gst.Structure.Structure)
queryWritableStructure ::
(B.CallStack.HasCallStack, MonadIO m) =>
Query
-> m Gst.Structure.Structure
queryWritableStructure :: Query -> m Structure
queryWritableStructure Query
query = 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 Query
query' <- Query -> IO (Ptr Query)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Query
query
Ptr Structure
result <- Ptr Query -> IO (Ptr Structure)
gst_query_writable_structure Ptr Query
query'
Text -> Ptr Structure -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"queryWritableStructure" 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
Query -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Query
query
Structure -> IO Structure
forall (m :: * -> *) a. Monad m => a -> m a
return Structure
result'
#if defined(ENABLE_OVERLOADING)
data QueryWritableStructureMethodInfo
instance (signature ~ (m Gst.Structure.Structure), MonadIO m) => O.MethodInfo QueryWritableStructureMethodInfo Query signature where
overloadedMethod = queryWritableStructure
#endif
#if defined(ENABLE_OVERLOADING)
type family ResolveQueryMethod (t :: Symbol) (o :: *) :: * where
ResolveQueryMethod "addAllocationMeta" o = QueryAddAllocationMetaMethodInfo
ResolveQueryMethod "addAllocationParam" o = QueryAddAllocationParamMethodInfo
ResolveQueryMethod "addAllocationPool" o = QueryAddAllocationPoolMethodInfo
ResolveQueryMethod "addBufferingRange" o = QueryAddBufferingRangeMethodInfo
ResolveQueryMethod "addSchedulingMode" o = QueryAddSchedulingModeMethodInfo
ResolveQueryMethod "findAllocationMeta" o = QueryFindAllocationMetaMethodInfo
ResolveQueryMethod "hasSchedulingMode" o = QueryHasSchedulingModeMethodInfo
ResolveQueryMethod "hasSchedulingModeWithFlags" o = QueryHasSchedulingModeWithFlagsMethodInfo
ResolveQueryMethod "parseAcceptCaps" o = QueryParseAcceptCapsMethodInfo
ResolveQueryMethod "parseAcceptCapsResult" o = QueryParseAcceptCapsResultMethodInfo
ResolveQueryMethod "parseAllocation" o = QueryParseAllocationMethodInfo
ResolveQueryMethod "parseBitrate" o = QueryParseBitrateMethodInfo
ResolveQueryMethod "parseBufferingPercent" o = QueryParseBufferingPercentMethodInfo
ResolveQueryMethod "parseBufferingRange" o = QueryParseBufferingRangeMethodInfo
ResolveQueryMethod "parseBufferingStats" o = QueryParseBufferingStatsMethodInfo
ResolveQueryMethod "parseCaps" o = QueryParseCapsMethodInfo
ResolveQueryMethod "parseCapsResult" o = QueryParseCapsResultMethodInfo
ResolveQueryMethod "parseContext" o = QueryParseContextMethodInfo
ResolveQueryMethod "parseContextType" o = QueryParseContextTypeMethodInfo
ResolveQueryMethod "parseConvert" o = QueryParseConvertMethodInfo
ResolveQueryMethod "parseDuration" o = QueryParseDurationMethodInfo
ResolveQueryMethod "parseLatency" o = QueryParseLatencyMethodInfo
ResolveQueryMethod "parseNFormats" o = QueryParseNFormatsMethodInfo
ResolveQueryMethod "parseNthAllocationMeta" o = QueryParseNthAllocationMetaMethodInfo
ResolveQueryMethod "parseNthAllocationParam" o = QueryParseNthAllocationParamMethodInfo
ResolveQueryMethod "parseNthAllocationPool" o = QueryParseNthAllocationPoolMethodInfo
ResolveQueryMethod "parseNthBufferingRange" o = QueryParseNthBufferingRangeMethodInfo
ResolveQueryMethod "parseNthFormat" o = QueryParseNthFormatMethodInfo
ResolveQueryMethod "parseNthSchedulingMode" o = QueryParseNthSchedulingModeMethodInfo
ResolveQueryMethod "parsePosition" o = QueryParsePositionMethodInfo
ResolveQueryMethod "parseScheduling" o = QueryParseSchedulingMethodInfo
ResolveQueryMethod "parseSeeking" o = QueryParseSeekingMethodInfo
ResolveQueryMethod "parseSegment" o = QueryParseSegmentMethodInfo
ResolveQueryMethod "parseUri" o = QueryParseUriMethodInfo
ResolveQueryMethod "parseUriRedirection" o = QueryParseUriRedirectionMethodInfo
ResolveQueryMethod "parseUriRedirectionPermanent" o = QueryParseUriRedirectionPermanentMethodInfo
ResolveQueryMethod "removeNthAllocationMeta" o = QueryRemoveNthAllocationMetaMethodInfo
ResolveQueryMethod "removeNthAllocationParam" o = QueryRemoveNthAllocationParamMethodInfo
ResolveQueryMethod "removeNthAllocationPool" o = QueryRemoveNthAllocationPoolMethodInfo
ResolveQueryMethod "writableStructure" o = QueryWritableStructureMethodInfo
ResolveQueryMethod "getNAllocationMetas" o = QueryGetNAllocationMetasMethodInfo
ResolveQueryMethod "getNAllocationParams" o = QueryGetNAllocationParamsMethodInfo
ResolveQueryMethod "getNAllocationPools" o = QueryGetNAllocationPoolsMethodInfo
ResolveQueryMethod "getNBufferingRanges" o = QueryGetNBufferingRangesMethodInfo
ResolveQueryMethod "getNSchedulingModes" o = QueryGetNSchedulingModesMethodInfo
ResolveQueryMethod "getStructure" o = QueryGetStructureMethodInfo
ResolveQueryMethod "setAcceptCapsResult" o = QuerySetAcceptCapsResultMethodInfo
ResolveQueryMethod "setBitrate" o = QuerySetBitrateMethodInfo
ResolveQueryMethod "setBufferingPercent" o = QuerySetBufferingPercentMethodInfo
ResolveQueryMethod "setBufferingRange" o = QuerySetBufferingRangeMethodInfo
ResolveQueryMethod "setBufferingStats" o = QuerySetBufferingStatsMethodInfo
ResolveQueryMethod "setCapsResult" o = QuerySetCapsResultMethodInfo
ResolveQueryMethod "setContext" o = QuerySetContextMethodInfo
ResolveQueryMethod "setConvert" o = QuerySetConvertMethodInfo
ResolveQueryMethod "setDuration" o = QuerySetDurationMethodInfo
ResolveQueryMethod "setFormatsv" o = QuerySetFormatsvMethodInfo
ResolveQueryMethod "setLatency" o = QuerySetLatencyMethodInfo
ResolveQueryMethod "setNthAllocationParam" o = QuerySetNthAllocationParamMethodInfo
ResolveQueryMethod "setNthAllocationPool" o = QuerySetNthAllocationPoolMethodInfo
ResolveQueryMethod "setPosition" o = QuerySetPositionMethodInfo
ResolveQueryMethod "setScheduling" o = QuerySetSchedulingMethodInfo
ResolveQueryMethod "setSeeking" o = QuerySetSeekingMethodInfo
ResolveQueryMethod "setSegment" o = QuerySetSegmentMethodInfo
ResolveQueryMethod "setUri" o = QuerySetUriMethodInfo
ResolveQueryMethod "setUriRedirection" o = QuerySetUriRedirectionMethodInfo
ResolveQueryMethod "setUriRedirectionPermanent" o = QuerySetUriRedirectionPermanentMethodInfo
ResolveQueryMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveQueryMethod t Query, O.MethodInfo info Query p) => OL.IsLabel t (Query -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod @info
#else
fromLabel _ = O.overloadedMethod @info
#endif
#endif