{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.GstVideo.Structs.VideoCodecState
(
VideoCodecState(..) ,
newZeroVideoCodecState ,
#if defined(ENABLE_OVERLOADING)
ResolveVideoCodecStateMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
VideoCodecStateRefMethodInfo ,
#endif
videoCodecStateRef ,
#if defined(ENABLE_OVERLOADING)
VideoCodecStateUnrefMethodInfo ,
#endif
videoCodecStateUnref ,
clearVideoCodecStateAllocationCaps ,
getVideoCodecStateAllocationCaps ,
setVideoCodecStateAllocationCaps ,
#if defined(ENABLE_OVERLOADING)
videoCodecState_allocationCaps ,
#endif
clearVideoCodecStateCaps ,
getVideoCodecStateCaps ,
setVideoCodecStateCaps ,
#if defined(ENABLE_OVERLOADING)
videoCodecState_caps ,
#endif
clearVideoCodecStateCodecData ,
getVideoCodecStateCodecData ,
setVideoCodecStateCodecData ,
#if defined(ENABLE_OVERLOADING)
videoCodecState_codecData ,
#endif
clearVideoCodecStateContentLightLevel ,
getVideoCodecStateContentLightLevel ,
setVideoCodecStateContentLightLevel ,
#if defined(ENABLE_OVERLOADING)
videoCodecState_contentLightLevel ,
#endif
getVideoCodecStateInfo ,
#if defined(ENABLE_OVERLOADING)
videoCodecState_info ,
#endif
clearVideoCodecStateMasteringDisplayInfo,
getVideoCodecStateMasteringDisplayInfo ,
setVideoCodecStateMasteringDisplayInfo ,
#if defined(ENABLE_OVERLOADING)
videoCodecState_masteringDisplayInfo ,
#endif
) where
import Data.GI.Base.ShortPrelude
import qualified Data.GI.Base.ShortPrelude as SP
import qualified Data.GI.Base.Overloading as O
import qualified Prelude as P
import qualified Data.GI.Base.Attributes as GI.Attributes
import qualified Data.GI.Base.BasicTypes as B.Types
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.GArray as B.GArray
import qualified Data.GI.Base.GClosure as B.GClosure
import qualified Data.GI.Base.GError as B.GError
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GValue as B.GValue
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
import qualified Data.GI.Base.Properties as B.Properties
import qualified Data.GI.Base.Signals as B.Signals
import qualified Control.Monad.IO.Class as MIO
import qualified Data.Coerce as Coerce
import qualified Data.Text as T
import qualified Data.ByteString.Char8 as B
import qualified Data.Map as Map
import qualified Foreign.Ptr as FP
import qualified GHC.OverloadedLabels as OL
import qualified GHC.Records as R
import qualified GI.Gst.Structs.Buffer as Gst.Buffer
import qualified GI.Gst.Structs.Caps as Gst.Caps
import {-# SOURCE #-} qualified GI.GstVideo.Structs.VideoContentLightLevel as GstVideo.VideoContentLightLevel
import {-# SOURCE #-} qualified GI.GstVideo.Structs.VideoInfo as GstVideo.VideoInfo
import {-# SOURCE #-} qualified GI.GstVideo.Structs.VideoMasteringDisplayInfo as GstVideo.VideoMasteringDisplayInfo
newtype VideoCodecState = VideoCodecState (SP.ManagedPtr VideoCodecState)
deriving (VideoCodecState -> VideoCodecState -> Bool
(VideoCodecState -> VideoCodecState -> Bool)
-> (VideoCodecState -> VideoCodecState -> Bool)
-> Eq VideoCodecState
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: VideoCodecState -> VideoCodecState -> Bool
$c/= :: VideoCodecState -> VideoCodecState -> Bool
== :: VideoCodecState -> VideoCodecState -> Bool
$c== :: VideoCodecState -> VideoCodecState -> Bool
Eq)
instance SP.ManagedPtrNewtype VideoCodecState where
toManagedPtr :: VideoCodecState -> ManagedPtr VideoCodecState
toManagedPtr (VideoCodecState ManagedPtr VideoCodecState
p) = ManagedPtr VideoCodecState
p
foreign import ccall "gst_video_codec_state_get_type" c_gst_video_codec_state_get_type ::
IO GType
type instance O.ParentTypes VideoCodecState = '[]
instance O.HasParentTypes VideoCodecState
instance B.Types.TypedObject VideoCodecState where
glibType :: IO GType
glibType = IO GType
c_gst_video_codec_state_get_type
instance B.Types.GBoxed VideoCodecState
instance B.GValue.IsGValue (Maybe VideoCodecState) where
gvalueGType_ :: IO GType
gvalueGType_ = IO GType
c_gst_video_codec_state_get_type
gvalueSet_ :: Ptr GValue -> Maybe VideoCodecState -> IO ()
gvalueSet_ Ptr GValue
gv Maybe VideoCodecState
P.Nothing = Ptr GValue -> Ptr VideoCodecState -> IO ()
forall a. Ptr GValue -> Ptr a -> IO ()
B.GValue.set_boxed Ptr GValue
gv (Ptr VideoCodecState
forall a. Ptr a
FP.nullPtr :: FP.Ptr VideoCodecState)
gvalueSet_ Ptr GValue
gv (P.Just VideoCodecState
obj) = VideoCodecState -> (Ptr VideoCodecState -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr VideoCodecState
obj (Ptr GValue -> Ptr VideoCodecState -> IO ()
forall a. Ptr GValue -> Ptr a -> IO ()
B.GValue.set_boxed Ptr GValue
gv)
gvalueGet_ :: Ptr GValue -> IO (Maybe VideoCodecState)
gvalueGet_ Ptr GValue
gv = do
Ptr VideoCodecState
ptr <- Ptr GValue -> IO (Ptr VideoCodecState)
forall b. Ptr GValue -> IO (Ptr b)
B.GValue.get_boxed Ptr GValue
gv :: IO (Ptr VideoCodecState)
if Ptr VideoCodecState
ptr Ptr VideoCodecState -> Ptr VideoCodecState -> Bool
forall a. Eq a => a -> a -> Bool
/= Ptr VideoCodecState
forall a. Ptr a
FP.nullPtr
then VideoCodecState -> Maybe VideoCodecState
forall a. a -> Maybe a
P.Just (VideoCodecState -> Maybe VideoCodecState)
-> IO VideoCodecState -> IO (Maybe VideoCodecState)
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
<$> (ManagedPtr VideoCodecState -> VideoCodecState)
-> Ptr VideoCodecState -> IO VideoCodecState
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
B.ManagedPtr.newBoxed ManagedPtr VideoCodecState -> VideoCodecState
VideoCodecState Ptr VideoCodecState
ptr
else Maybe VideoCodecState -> IO (Maybe VideoCodecState)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe VideoCodecState
forall a. Maybe a
P.Nothing
newZeroVideoCodecState :: MonadIO m => m VideoCodecState
newZeroVideoCodecState :: forall (m :: * -> *). MonadIO m => m VideoCodecState
newZeroVideoCodecState = IO VideoCodecState -> m VideoCodecState
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO VideoCodecState -> m VideoCodecState)
-> IO VideoCodecState -> m VideoCodecState
forall a b. (a -> b) -> a -> b
$ Int -> IO (Ptr VideoCodecState)
forall a. GBoxed a => Int -> IO (Ptr a)
callocBoxedBytes Int
304 IO (Ptr VideoCodecState)
-> (Ptr VideoCodecState -> IO VideoCodecState)
-> IO VideoCodecState
forall (m :: * -> *) a b. Monad m => m a -> (a -> m b) -> m b
>>= (ManagedPtr VideoCodecState -> VideoCodecState)
-> Ptr VideoCodecState -> IO VideoCodecState
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr VideoCodecState -> VideoCodecState
VideoCodecState
instance tag ~ 'AttrSet => Constructible VideoCodecState tag where
new :: forall (m :: * -> *).
MonadIO m =>
(ManagedPtr VideoCodecState -> VideoCodecState)
-> [AttrOp VideoCodecState tag] -> m VideoCodecState
new ManagedPtr VideoCodecState -> VideoCodecState
_ [AttrOp VideoCodecState tag]
attrs = do
VideoCodecState
o <- m VideoCodecState
forall (m :: * -> *). MonadIO m => m VideoCodecState
newZeroVideoCodecState
VideoCodecState -> [AttrOp VideoCodecState 'AttrSet] -> m ()
forall o (m :: * -> *).
MonadIO m =>
o -> [AttrOp o 'AttrSet] -> m ()
GI.Attributes.set VideoCodecState
o [AttrOp VideoCodecState tag]
[AttrOp VideoCodecState 'AttrSet]
attrs
VideoCodecState -> m VideoCodecState
forall (m :: * -> *) a. Monad m => a -> m a
return VideoCodecState
o
getVideoCodecStateInfo :: MonadIO m => VideoCodecState -> m GstVideo.VideoInfo.VideoInfo
getVideoCodecStateInfo :: forall (m :: * -> *). MonadIO m => VideoCodecState -> m VideoInfo
getVideoCodecStateInfo VideoCodecState
s = IO VideoInfo -> m VideoInfo
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO VideoInfo -> m VideoInfo) -> IO VideoInfo -> m VideoInfo
forall a b. (a -> b) -> a -> b
$ VideoCodecState
-> (Ptr VideoCodecState -> IO VideoInfo) -> IO VideoInfo
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr VideoCodecState
s ((Ptr VideoCodecState -> IO VideoInfo) -> IO VideoInfo)
-> (Ptr VideoCodecState -> IO VideoInfo) -> IO VideoInfo
forall a b. (a -> b) -> a -> b
$ \Ptr VideoCodecState
ptr -> do
let val :: Ptr VideoInfo
val = Ptr VideoCodecState
ptr Ptr VideoCodecState -> Int -> Ptr VideoInfo
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
8 :: (Ptr GstVideo.VideoInfo.VideoInfo)
VideoInfo
val' <- ((ManagedPtr VideoInfo -> VideoInfo)
-> Ptr VideoInfo -> IO VideoInfo
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newBoxed ManagedPtr VideoInfo -> VideoInfo
GstVideo.VideoInfo.VideoInfo) Ptr VideoInfo
val
VideoInfo -> IO VideoInfo
forall (m :: * -> *) a. Monad m => a -> m a
return VideoInfo
val'
#if defined(ENABLE_OVERLOADING)
data VideoCodecStateInfoFieldInfo
instance AttrInfo VideoCodecStateInfoFieldInfo where
type AttrBaseTypeConstraint VideoCodecStateInfoFieldInfo = (~) VideoCodecState
type AttrAllowedOps VideoCodecStateInfoFieldInfo = '[ 'AttrGet]
type AttrSetTypeConstraint VideoCodecStateInfoFieldInfo = (~) (Ptr GstVideo.VideoInfo.VideoInfo)
type AttrTransferTypeConstraint VideoCodecStateInfoFieldInfo = (~)(Ptr GstVideo.VideoInfo.VideoInfo)
type AttrTransferType VideoCodecStateInfoFieldInfo = (Ptr GstVideo.VideoInfo.VideoInfo)
type AttrGetType VideoCodecStateInfoFieldInfo = GstVideo.VideoInfo.VideoInfo
type AttrLabel VideoCodecStateInfoFieldInfo = "info"
type AttrOrigin VideoCodecStateInfoFieldInfo = VideoCodecState
attrGet = getVideoCodecStateInfo
attrSet = undefined
attrConstruct = undefined
attrClear = undefined
attrTransfer = undefined
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GstVideo.Structs.VideoCodecState.info"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gstvideo-1.0.25/docs/GI-GstVideo-Structs-VideoCodecState.html#g:attr:info"
})
videoCodecState_info :: AttrLabelProxy "info"
videoCodecState_info = AttrLabelProxy
#endif
getVideoCodecStateCaps :: MonadIO m => VideoCodecState -> m (Maybe Gst.Caps.Caps)
getVideoCodecStateCaps :: forall (m :: * -> *).
MonadIO m =>
VideoCodecState -> m (Maybe Caps)
getVideoCodecStateCaps VideoCodecState
s = IO (Maybe Caps) -> m (Maybe Caps)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Caps) -> m (Maybe Caps))
-> IO (Maybe Caps) -> m (Maybe Caps)
forall a b. (a -> b) -> a -> b
$ VideoCodecState
-> (Ptr VideoCodecState -> IO (Maybe Caps)) -> IO (Maybe Caps)
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr VideoCodecState
s ((Ptr VideoCodecState -> IO (Maybe Caps)) -> IO (Maybe Caps))
-> (Ptr VideoCodecState -> IO (Maybe Caps)) -> IO (Maybe Caps)
forall a b. (a -> b) -> a -> b
$ \Ptr VideoCodecState
ptr -> do
Ptr Caps
val <- Ptr (Ptr Caps) -> IO (Ptr Caps)
forall a. Storable a => Ptr a -> IO a
peek (Ptr VideoCodecState
ptr Ptr VideoCodecState -> Int -> Ptr (Ptr Caps)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
128) :: IO (Ptr Gst.Caps.Caps)
Maybe Caps
result <- Ptr Caps -> (Ptr Caps -> IO Caps) -> IO (Maybe Caps)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
SP.convertIfNonNull Ptr Caps
val ((Ptr Caps -> IO Caps) -> IO (Maybe Caps))
-> (Ptr Caps -> IO Caps) -> IO (Maybe Caps)
forall a b. (a -> b) -> a -> b
$ \Ptr Caps
val' -> do
Caps
val'' <- ((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
val'
Caps -> IO Caps
forall (m :: * -> *) a. Monad m => a -> m a
return Caps
val''
Maybe Caps -> IO (Maybe Caps)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Caps
result
setVideoCodecStateCaps :: MonadIO m => VideoCodecState -> Ptr Gst.Caps.Caps -> m ()
setVideoCodecStateCaps :: forall (m :: * -> *).
MonadIO m =>
VideoCodecState -> Ptr Caps -> m ()
setVideoCodecStateCaps VideoCodecState
s Ptr Caps
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ VideoCodecState -> (Ptr VideoCodecState -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr VideoCodecState
s ((Ptr VideoCodecState -> IO ()) -> IO ())
-> (Ptr VideoCodecState -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr VideoCodecState
ptr -> do
Ptr (Ptr Caps) -> Ptr Caps -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr VideoCodecState
ptr Ptr VideoCodecState -> Int -> Ptr (Ptr Caps)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
128) (Ptr Caps
val :: Ptr Gst.Caps.Caps)
clearVideoCodecStateCaps :: MonadIO m => VideoCodecState -> m ()
clearVideoCodecStateCaps :: forall (m :: * -> *). MonadIO m => VideoCodecState -> m ()
clearVideoCodecStateCaps VideoCodecState
s = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ VideoCodecState -> (Ptr VideoCodecState -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr VideoCodecState
s ((Ptr VideoCodecState -> IO ()) -> IO ())
-> (Ptr VideoCodecState -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr VideoCodecState
ptr -> do
Ptr (Ptr Caps) -> Ptr Caps -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr VideoCodecState
ptr Ptr VideoCodecState -> Int -> Ptr (Ptr Caps)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
128) (Ptr Caps
forall a. Ptr a
FP.nullPtr :: Ptr Gst.Caps.Caps)
#if defined(ENABLE_OVERLOADING)
data VideoCodecStateCapsFieldInfo
instance AttrInfo VideoCodecStateCapsFieldInfo where
type AttrBaseTypeConstraint VideoCodecStateCapsFieldInfo = (~) VideoCodecState
type AttrAllowedOps VideoCodecStateCapsFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint VideoCodecStateCapsFieldInfo = (~) (Ptr Gst.Caps.Caps)
type AttrTransferTypeConstraint VideoCodecStateCapsFieldInfo = (~)(Ptr Gst.Caps.Caps)
type AttrTransferType VideoCodecStateCapsFieldInfo = (Ptr Gst.Caps.Caps)
type AttrGetType VideoCodecStateCapsFieldInfo = Maybe Gst.Caps.Caps
type AttrLabel VideoCodecStateCapsFieldInfo = "caps"
type AttrOrigin VideoCodecStateCapsFieldInfo = VideoCodecState
attrGet = getVideoCodecStateCaps
attrSet = setVideoCodecStateCaps
attrConstruct = undefined
attrClear = clearVideoCodecStateCaps
attrTransfer _ v = do
return v
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GstVideo.Structs.VideoCodecState.caps"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gstvideo-1.0.25/docs/GI-GstVideo-Structs-VideoCodecState.html#g:attr:caps"
})
videoCodecState_caps :: AttrLabelProxy "caps"
videoCodecState_caps = AttrLabelProxy
#endif
getVideoCodecStateCodecData :: MonadIO m => VideoCodecState -> m (Maybe Gst.Buffer.Buffer)
getVideoCodecStateCodecData :: forall (m :: * -> *).
MonadIO m =>
VideoCodecState -> m (Maybe Buffer)
getVideoCodecStateCodecData VideoCodecState
s = IO (Maybe Buffer) -> m (Maybe Buffer)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Buffer) -> m (Maybe Buffer))
-> IO (Maybe Buffer) -> m (Maybe Buffer)
forall a b. (a -> b) -> a -> b
$ VideoCodecState
-> (Ptr VideoCodecState -> IO (Maybe Buffer)) -> IO (Maybe Buffer)
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr VideoCodecState
s ((Ptr VideoCodecState -> IO (Maybe Buffer)) -> IO (Maybe Buffer))
-> (Ptr VideoCodecState -> IO (Maybe Buffer)) -> IO (Maybe Buffer)
forall a b. (a -> b) -> a -> b
$ \Ptr VideoCodecState
ptr -> do
Ptr Buffer
val <- Ptr (Ptr Buffer) -> IO (Ptr Buffer)
forall a. Storable a => Ptr a -> IO a
peek (Ptr VideoCodecState
ptr Ptr VideoCodecState -> Int -> Ptr (Ptr Buffer)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
136) :: IO (Ptr Gst.Buffer.Buffer)
Maybe Buffer
result <- Ptr Buffer -> (Ptr Buffer -> IO Buffer) -> IO (Maybe Buffer)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
SP.convertIfNonNull Ptr Buffer
val ((Ptr Buffer -> IO Buffer) -> IO (Maybe Buffer))
-> (Ptr Buffer -> IO Buffer) -> IO (Maybe Buffer)
forall a b. (a -> b) -> a -> b
$ \Ptr Buffer
val' -> do
Buffer
val'' <- ((ManagedPtr Buffer -> Buffer) -> Ptr Buffer -> IO Buffer
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newBoxed ManagedPtr Buffer -> Buffer
Gst.Buffer.Buffer) Ptr Buffer
val'
Buffer -> IO Buffer
forall (m :: * -> *) a. Monad m => a -> m a
return Buffer
val''
Maybe Buffer -> IO (Maybe Buffer)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Buffer
result
setVideoCodecStateCodecData :: MonadIO m => VideoCodecState -> Ptr Gst.Buffer.Buffer -> m ()
setVideoCodecStateCodecData :: forall (m :: * -> *).
MonadIO m =>
VideoCodecState -> Ptr Buffer -> m ()
setVideoCodecStateCodecData VideoCodecState
s Ptr Buffer
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ VideoCodecState -> (Ptr VideoCodecState -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr VideoCodecState
s ((Ptr VideoCodecState -> IO ()) -> IO ())
-> (Ptr VideoCodecState -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr VideoCodecState
ptr -> do
Ptr (Ptr Buffer) -> Ptr Buffer -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr VideoCodecState
ptr Ptr VideoCodecState -> Int -> Ptr (Ptr Buffer)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
136) (Ptr Buffer
val :: Ptr Gst.Buffer.Buffer)
clearVideoCodecStateCodecData :: MonadIO m => VideoCodecState -> m ()
clearVideoCodecStateCodecData :: forall (m :: * -> *). MonadIO m => VideoCodecState -> m ()
clearVideoCodecStateCodecData VideoCodecState
s = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ VideoCodecState -> (Ptr VideoCodecState -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr VideoCodecState
s ((Ptr VideoCodecState -> IO ()) -> IO ())
-> (Ptr VideoCodecState -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr VideoCodecState
ptr -> do
Ptr (Ptr Buffer) -> Ptr Buffer -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr VideoCodecState
ptr Ptr VideoCodecState -> Int -> Ptr (Ptr Buffer)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
136) (Ptr Buffer
forall a. Ptr a
FP.nullPtr :: Ptr Gst.Buffer.Buffer)
#if defined(ENABLE_OVERLOADING)
data VideoCodecStateCodecDataFieldInfo
instance AttrInfo VideoCodecStateCodecDataFieldInfo where
type AttrBaseTypeConstraint VideoCodecStateCodecDataFieldInfo = (~) VideoCodecState
type AttrAllowedOps VideoCodecStateCodecDataFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint VideoCodecStateCodecDataFieldInfo = (~) (Ptr Gst.Buffer.Buffer)
type AttrTransferTypeConstraint VideoCodecStateCodecDataFieldInfo = (~)(Ptr Gst.Buffer.Buffer)
type AttrTransferType VideoCodecStateCodecDataFieldInfo = (Ptr Gst.Buffer.Buffer)
type AttrGetType VideoCodecStateCodecDataFieldInfo = Maybe Gst.Buffer.Buffer
type AttrLabel VideoCodecStateCodecDataFieldInfo = "codec_data"
type AttrOrigin VideoCodecStateCodecDataFieldInfo = VideoCodecState
attrGet = getVideoCodecStateCodecData
attrSet = setVideoCodecStateCodecData
attrConstruct = undefined
attrClear = clearVideoCodecStateCodecData
attrTransfer _ v = do
return v
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GstVideo.Structs.VideoCodecState.codecData"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gstvideo-1.0.25/docs/GI-GstVideo-Structs-VideoCodecState.html#g:attr:codecData"
})
videoCodecState_codecData :: AttrLabelProxy "codecData"
videoCodecState_codecData = AttrLabelProxy
#endif
getVideoCodecStateAllocationCaps :: MonadIO m => VideoCodecState -> m (Maybe Gst.Caps.Caps)
getVideoCodecStateAllocationCaps :: forall (m :: * -> *).
MonadIO m =>
VideoCodecState -> m (Maybe Caps)
getVideoCodecStateAllocationCaps VideoCodecState
s = IO (Maybe Caps) -> m (Maybe Caps)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe Caps) -> m (Maybe Caps))
-> IO (Maybe Caps) -> m (Maybe Caps)
forall a b. (a -> b) -> a -> b
$ VideoCodecState
-> (Ptr VideoCodecState -> IO (Maybe Caps)) -> IO (Maybe Caps)
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr VideoCodecState
s ((Ptr VideoCodecState -> IO (Maybe Caps)) -> IO (Maybe Caps))
-> (Ptr VideoCodecState -> IO (Maybe Caps)) -> IO (Maybe Caps)
forall a b. (a -> b) -> a -> b
$ \Ptr VideoCodecState
ptr -> do
Ptr Caps
val <- Ptr (Ptr Caps) -> IO (Ptr Caps)
forall a. Storable a => Ptr a -> IO a
peek (Ptr VideoCodecState
ptr Ptr VideoCodecState -> Int -> Ptr (Ptr Caps)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
144) :: IO (Ptr Gst.Caps.Caps)
Maybe Caps
result <- Ptr Caps -> (Ptr Caps -> IO Caps) -> IO (Maybe Caps)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
SP.convertIfNonNull Ptr Caps
val ((Ptr Caps -> IO Caps) -> IO (Maybe Caps))
-> (Ptr Caps -> IO Caps) -> IO (Maybe Caps)
forall a b. (a -> b) -> a -> b
$ \Ptr Caps
val' -> do
Caps
val'' <- ((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
val'
Caps -> IO Caps
forall (m :: * -> *) a. Monad m => a -> m a
return Caps
val''
Maybe Caps -> IO (Maybe Caps)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe Caps
result
setVideoCodecStateAllocationCaps :: MonadIO m => VideoCodecState -> Ptr Gst.Caps.Caps -> m ()
setVideoCodecStateAllocationCaps :: forall (m :: * -> *).
MonadIO m =>
VideoCodecState -> Ptr Caps -> m ()
setVideoCodecStateAllocationCaps VideoCodecState
s Ptr Caps
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ VideoCodecState -> (Ptr VideoCodecState -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr VideoCodecState
s ((Ptr VideoCodecState -> IO ()) -> IO ())
-> (Ptr VideoCodecState -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr VideoCodecState
ptr -> do
Ptr (Ptr Caps) -> Ptr Caps -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr VideoCodecState
ptr Ptr VideoCodecState -> Int -> Ptr (Ptr Caps)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
144) (Ptr Caps
val :: Ptr Gst.Caps.Caps)
clearVideoCodecStateAllocationCaps :: MonadIO m => VideoCodecState -> m ()
clearVideoCodecStateAllocationCaps :: forall (m :: * -> *). MonadIO m => VideoCodecState -> m ()
clearVideoCodecStateAllocationCaps VideoCodecState
s = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ VideoCodecState -> (Ptr VideoCodecState -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr VideoCodecState
s ((Ptr VideoCodecState -> IO ()) -> IO ())
-> (Ptr VideoCodecState -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr VideoCodecState
ptr -> do
Ptr (Ptr Caps) -> Ptr Caps -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr VideoCodecState
ptr Ptr VideoCodecState -> Int -> Ptr (Ptr Caps)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
144) (Ptr Caps
forall a. Ptr a
FP.nullPtr :: Ptr Gst.Caps.Caps)
#if defined(ENABLE_OVERLOADING)
data VideoCodecStateAllocationCapsFieldInfo
instance AttrInfo VideoCodecStateAllocationCapsFieldInfo where
type AttrBaseTypeConstraint VideoCodecStateAllocationCapsFieldInfo = (~) VideoCodecState
type AttrAllowedOps VideoCodecStateAllocationCapsFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint VideoCodecStateAllocationCapsFieldInfo = (~) (Ptr Gst.Caps.Caps)
type AttrTransferTypeConstraint VideoCodecStateAllocationCapsFieldInfo = (~)(Ptr Gst.Caps.Caps)
type AttrTransferType VideoCodecStateAllocationCapsFieldInfo = (Ptr Gst.Caps.Caps)
type AttrGetType VideoCodecStateAllocationCapsFieldInfo = Maybe Gst.Caps.Caps
type AttrLabel VideoCodecStateAllocationCapsFieldInfo = "allocation_caps"
type AttrOrigin VideoCodecStateAllocationCapsFieldInfo = VideoCodecState
attrGet = getVideoCodecStateAllocationCaps
attrSet = setVideoCodecStateAllocationCaps
attrConstruct = undefined
attrClear = clearVideoCodecStateAllocationCaps
attrTransfer _ v = do
return v
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GstVideo.Structs.VideoCodecState.allocationCaps"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gstvideo-1.0.25/docs/GI-GstVideo-Structs-VideoCodecState.html#g:attr:allocationCaps"
})
videoCodecState_allocationCaps :: AttrLabelProxy "allocationCaps"
videoCodecState_allocationCaps = AttrLabelProxy
#endif
getVideoCodecStateMasteringDisplayInfo :: MonadIO m => VideoCodecState -> m (Maybe GstVideo.VideoMasteringDisplayInfo.VideoMasteringDisplayInfo)
getVideoCodecStateMasteringDisplayInfo :: forall (m :: * -> *).
MonadIO m =>
VideoCodecState -> m (Maybe VideoMasteringDisplayInfo)
getVideoCodecStateMasteringDisplayInfo VideoCodecState
s = IO (Maybe VideoMasteringDisplayInfo)
-> m (Maybe VideoMasteringDisplayInfo)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe VideoMasteringDisplayInfo)
-> m (Maybe VideoMasteringDisplayInfo))
-> IO (Maybe VideoMasteringDisplayInfo)
-> m (Maybe VideoMasteringDisplayInfo)
forall a b. (a -> b) -> a -> b
$ VideoCodecState
-> (Ptr VideoCodecState -> IO (Maybe VideoMasteringDisplayInfo))
-> IO (Maybe VideoMasteringDisplayInfo)
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr VideoCodecState
s ((Ptr VideoCodecState -> IO (Maybe VideoMasteringDisplayInfo))
-> IO (Maybe VideoMasteringDisplayInfo))
-> (Ptr VideoCodecState -> IO (Maybe VideoMasteringDisplayInfo))
-> IO (Maybe VideoMasteringDisplayInfo)
forall a b. (a -> b) -> a -> b
$ \Ptr VideoCodecState
ptr -> do
Ptr VideoMasteringDisplayInfo
val <- Ptr (Ptr VideoMasteringDisplayInfo)
-> IO (Ptr VideoMasteringDisplayInfo)
forall a. Storable a => Ptr a -> IO a
peek (Ptr VideoCodecState
ptr Ptr VideoCodecState -> Int -> Ptr (Ptr VideoMasteringDisplayInfo)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
152) :: IO (Ptr GstVideo.VideoMasteringDisplayInfo.VideoMasteringDisplayInfo)
Maybe VideoMasteringDisplayInfo
result <- Ptr VideoMasteringDisplayInfo
-> (Ptr VideoMasteringDisplayInfo -> IO VideoMasteringDisplayInfo)
-> IO (Maybe VideoMasteringDisplayInfo)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
SP.convertIfNonNull Ptr VideoMasteringDisplayInfo
val ((Ptr VideoMasteringDisplayInfo -> IO VideoMasteringDisplayInfo)
-> IO (Maybe VideoMasteringDisplayInfo))
-> (Ptr VideoMasteringDisplayInfo -> IO VideoMasteringDisplayInfo)
-> IO (Maybe VideoMasteringDisplayInfo)
forall a b. (a -> b) -> a -> b
$ \Ptr VideoMasteringDisplayInfo
val' -> do
VideoMasteringDisplayInfo
val'' <- ((ManagedPtr VideoMasteringDisplayInfo -> VideoMasteringDisplayInfo)
-> Ptr VideoMasteringDisplayInfo -> IO VideoMasteringDisplayInfo
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newPtr ManagedPtr VideoMasteringDisplayInfo -> VideoMasteringDisplayInfo
GstVideo.VideoMasteringDisplayInfo.VideoMasteringDisplayInfo) Ptr VideoMasteringDisplayInfo
val'
VideoMasteringDisplayInfo -> IO VideoMasteringDisplayInfo
forall (m :: * -> *) a. Monad m => a -> m a
return VideoMasteringDisplayInfo
val''
Maybe VideoMasteringDisplayInfo
-> IO (Maybe VideoMasteringDisplayInfo)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe VideoMasteringDisplayInfo
result
setVideoCodecStateMasteringDisplayInfo :: MonadIO m => VideoCodecState -> Ptr GstVideo.VideoMasteringDisplayInfo.VideoMasteringDisplayInfo -> m ()
setVideoCodecStateMasteringDisplayInfo :: forall (m :: * -> *).
MonadIO m =>
VideoCodecState -> Ptr VideoMasteringDisplayInfo -> m ()
setVideoCodecStateMasteringDisplayInfo VideoCodecState
s Ptr VideoMasteringDisplayInfo
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ VideoCodecState -> (Ptr VideoCodecState -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr VideoCodecState
s ((Ptr VideoCodecState -> IO ()) -> IO ())
-> (Ptr VideoCodecState -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr VideoCodecState
ptr -> do
Ptr (Ptr VideoMasteringDisplayInfo)
-> Ptr VideoMasteringDisplayInfo -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr VideoCodecState
ptr Ptr VideoCodecState -> Int -> Ptr (Ptr VideoMasteringDisplayInfo)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
152) (Ptr VideoMasteringDisplayInfo
val :: Ptr GstVideo.VideoMasteringDisplayInfo.VideoMasteringDisplayInfo)
clearVideoCodecStateMasteringDisplayInfo :: MonadIO m => VideoCodecState -> m ()
clearVideoCodecStateMasteringDisplayInfo :: forall (m :: * -> *). MonadIO m => VideoCodecState -> m ()
clearVideoCodecStateMasteringDisplayInfo VideoCodecState
s = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ VideoCodecState -> (Ptr VideoCodecState -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr VideoCodecState
s ((Ptr VideoCodecState -> IO ()) -> IO ())
-> (Ptr VideoCodecState -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr VideoCodecState
ptr -> do
Ptr (Ptr VideoMasteringDisplayInfo)
-> Ptr VideoMasteringDisplayInfo -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr VideoCodecState
ptr Ptr VideoCodecState -> Int -> Ptr (Ptr VideoMasteringDisplayInfo)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
152) (Ptr VideoMasteringDisplayInfo
forall a. Ptr a
FP.nullPtr :: Ptr GstVideo.VideoMasteringDisplayInfo.VideoMasteringDisplayInfo)
#if defined(ENABLE_OVERLOADING)
data VideoCodecStateMasteringDisplayInfoFieldInfo
instance AttrInfo VideoCodecStateMasteringDisplayInfoFieldInfo where
type AttrBaseTypeConstraint VideoCodecStateMasteringDisplayInfoFieldInfo = (~) VideoCodecState
type AttrAllowedOps VideoCodecStateMasteringDisplayInfoFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint VideoCodecStateMasteringDisplayInfoFieldInfo = (~) (Ptr GstVideo.VideoMasteringDisplayInfo.VideoMasteringDisplayInfo)
type AttrTransferTypeConstraint VideoCodecStateMasteringDisplayInfoFieldInfo = (~)(Ptr GstVideo.VideoMasteringDisplayInfo.VideoMasteringDisplayInfo)
type AttrTransferType VideoCodecStateMasteringDisplayInfoFieldInfo = (Ptr GstVideo.VideoMasteringDisplayInfo.VideoMasteringDisplayInfo)
type AttrGetType VideoCodecStateMasteringDisplayInfoFieldInfo = Maybe GstVideo.VideoMasteringDisplayInfo.VideoMasteringDisplayInfo
type AttrLabel VideoCodecStateMasteringDisplayInfoFieldInfo = "mastering_display_info"
type AttrOrigin VideoCodecStateMasteringDisplayInfoFieldInfo = VideoCodecState
attrGet = getVideoCodecStateMasteringDisplayInfo
attrSet = setVideoCodecStateMasteringDisplayInfo
attrConstruct = undefined
attrClear = clearVideoCodecStateMasteringDisplayInfo
attrTransfer _ v = do
return v
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GstVideo.Structs.VideoCodecState.masteringDisplayInfo"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gstvideo-1.0.25/docs/GI-GstVideo-Structs-VideoCodecState.html#g:attr:masteringDisplayInfo"
})
videoCodecState_masteringDisplayInfo :: AttrLabelProxy "masteringDisplayInfo"
videoCodecState_masteringDisplayInfo = AttrLabelProxy
#endif
getVideoCodecStateContentLightLevel :: MonadIO m => VideoCodecState -> m (Maybe GstVideo.VideoContentLightLevel.VideoContentLightLevel)
getVideoCodecStateContentLightLevel :: forall (m :: * -> *).
MonadIO m =>
VideoCodecState -> m (Maybe VideoContentLightLevel)
getVideoCodecStateContentLightLevel VideoCodecState
s = IO (Maybe VideoContentLightLevel)
-> m (Maybe VideoContentLightLevel)
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO (Maybe VideoContentLightLevel)
-> m (Maybe VideoContentLightLevel))
-> IO (Maybe VideoContentLightLevel)
-> m (Maybe VideoContentLightLevel)
forall a b. (a -> b) -> a -> b
$ VideoCodecState
-> (Ptr VideoCodecState -> IO (Maybe VideoContentLightLevel))
-> IO (Maybe VideoContentLightLevel)
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr VideoCodecState
s ((Ptr VideoCodecState -> IO (Maybe VideoContentLightLevel))
-> IO (Maybe VideoContentLightLevel))
-> (Ptr VideoCodecState -> IO (Maybe VideoContentLightLevel))
-> IO (Maybe VideoContentLightLevel)
forall a b. (a -> b) -> a -> b
$ \Ptr VideoCodecState
ptr -> do
Ptr VideoContentLightLevel
val <- Ptr (Ptr VideoContentLightLevel) -> IO (Ptr VideoContentLightLevel)
forall a. Storable a => Ptr a -> IO a
peek (Ptr VideoCodecState
ptr Ptr VideoCodecState -> Int -> Ptr (Ptr VideoContentLightLevel)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
160) :: IO (Ptr GstVideo.VideoContentLightLevel.VideoContentLightLevel)
Maybe VideoContentLightLevel
result <- Ptr VideoContentLightLevel
-> (Ptr VideoContentLightLevel -> IO VideoContentLightLevel)
-> IO (Maybe VideoContentLightLevel)
forall a b. Ptr a -> (Ptr a -> IO b) -> IO (Maybe b)
SP.convertIfNonNull Ptr VideoContentLightLevel
val ((Ptr VideoContentLightLevel -> IO VideoContentLightLevel)
-> IO (Maybe VideoContentLightLevel))
-> (Ptr VideoContentLightLevel -> IO VideoContentLightLevel)
-> IO (Maybe VideoContentLightLevel)
forall a b. (a -> b) -> a -> b
$ \Ptr VideoContentLightLevel
val' -> do
VideoContentLightLevel
val'' <- ((ManagedPtr VideoContentLightLevel -> VideoContentLightLevel)
-> Ptr VideoContentLightLevel -> IO VideoContentLightLevel
forall a.
(HasCallStack, BoxedPtr a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
newPtr ManagedPtr VideoContentLightLevel -> VideoContentLightLevel
GstVideo.VideoContentLightLevel.VideoContentLightLevel) Ptr VideoContentLightLevel
val'
VideoContentLightLevel -> IO VideoContentLightLevel
forall (m :: * -> *) a. Monad m => a -> m a
return VideoContentLightLevel
val''
Maybe VideoContentLightLevel -> IO (Maybe VideoContentLightLevel)
forall (m :: * -> *) a. Monad m => a -> m a
return Maybe VideoContentLightLevel
result
setVideoCodecStateContentLightLevel :: MonadIO m => VideoCodecState -> Ptr GstVideo.VideoContentLightLevel.VideoContentLightLevel -> m ()
setVideoCodecStateContentLightLevel :: forall (m :: * -> *).
MonadIO m =>
VideoCodecState -> Ptr VideoContentLightLevel -> m ()
setVideoCodecStateContentLightLevel VideoCodecState
s Ptr VideoContentLightLevel
val = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ VideoCodecState -> (Ptr VideoCodecState -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr VideoCodecState
s ((Ptr VideoCodecState -> IO ()) -> IO ())
-> (Ptr VideoCodecState -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr VideoCodecState
ptr -> do
Ptr (Ptr VideoContentLightLevel)
-> Ptr VideoContentLightLevel -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr VideoCodecState
ptr Ptr VideoCodecState -> Int -> Ptr (Ptr VideoContentLightLevel)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
160) (Ptr VideoContentLightLevel
val :: Ptr GstVideo.VideoContentLightLevel.VideoContentLightLevel)
clearVideoCodecStateContentLightLevel :: MonadIO m => VideoCodecState -> m ()
clearVideoCodecStateContentLightLevel :: forall (m :: * -> *). MonadIO m => VideoCodecState -> m ()
clearVideoCodecStateContentLightLevel VideoCodecState
s = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ VideoCodecState -> (Ptr VideoCodecState -> IO ()) -> IO ()
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
withManagedPtr VideoCodecState
s ((Ptr VideoCodecState -> IO ()) -> IO ())
-> (Ptr VideoCodecState -> IO ()) -> IO ()
forall a b. (a -> b) -> a -> b
$ \Ptr VideoCodecState
ptr -> do
Ptr (Ptr VideoContentLightLevel)
-> Ptr VideoContentLightLevel -> IO ()
forall a. Storable a => Ptr a -> a -> IO ()
poke (Ptr VideoCodecState
ptr Ptr VideoCodecState -> Int -> Ptr (Ptr VideoContentLightLevel)
forall a b. Ptr a -> Int -> Ptr b
`plusPtr` Int
160) (Ptr VideoContentLightLevel
forall a. Ptr a
FP.nullPtr :: Ptr GstVideo.VideoContentLightLevel.VideoContentLightLevel)
#if defined(ENABLE_OVERLOADING)
data VideoCodecStateContentLightLevelFieldInfo
instance AttrInfo VideoCodecStateContentLightLevelFieldInfo where
type AttrBaseTypeConstraint VideoCodecStateContentLightLevelFieldInfo = (~) VideoCodecState
type AttrAllowedOps VideoCodecStateContentLightLevelFieldInfo = '[ 'AttrSet, 'AttrGet, 'AttrClear]
type AttrSetTypeConstraint VideoCodecStateContentLightLevelFieldInfo = (~) (Ptr GstVideo.VideoContentLightLevel.VideoContentLightLevel)
type AttrTransferTypeConstraint VideoCodecStateContentLightLevelFieldInfo = (~)(Ptr GstVideo.VideoContentLightLevel.VideoContentLightLevel)
type AttrTransferType VideoCodecStateContentLightLevelFieldInfo = (Ptr GstVideo.VideoContentLightLevel.VideoContentLightLevel)
type AttrGetType VideoCodecStateContentLightLevelFieldInfo = Maybe GstVideo.VideoContentLightLevel.VideoContentLightLevel
type AttrLabel VideoCodecStateContentLightLevelFieldInfo = "content_light_level"
type AttrOrigin VideoCodecStateContentLightLevelFieldInfo = VideoCodecState
attrGet = getVideoCodecStateContentLightLevel
attrSet = setVideoCodecStateContentLightLevel
attrConstruct = undefined
attrClear = clearVideoCodecStateContentLightLevel
attrTransfer _ v = do
return v
dbgAttrInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GstVideo.Structs.VideoCodecState.contentLightLevel"
, O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gstvideo-1.0.25/docs/GI-GstVideo-Structs-VideoCodecState.html#g:attr:contentLightLevel"
})
videoCodecState_contentLightLevel :: AttrLabelProxy "contentLightLevel"
videoCodecState_contentLightLevel = AttrLabelProxy
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList VideoCodecState
type instance O.AttributeList VideoCodecState = VideoCodecStateAttributeList
type VideoCodecStateAttributeList = ('[ '("info", VideoCodecStateInfoFieldInfo), '("caps", VideoCodecStateCapsFieldInfo), '("codecData", VideoCodecStateCodecDataFieldInfo), '("allocationCaps", VideoCodecStateAllocationCapsFieldInfo), '("masteringDisplayInfo", VideoCodecStateMasteringDisplayInfoFieldInfo), '("contentLightLevel", VideoCodecStateContentLightLevelFieldInfo)] :: [(Symbol, *)])
#endif
foreign import ccall "gst_video_codec_state_ref" gst_video_codec_state_ref ::
Ptr VideoCodecState ->
IO (Ptr VideoCodecState)
videoCodecStateRef ::
(B.CallStack.HasCallStack, MonadIO m) =>
VideoCodecState
-> m VideoCodecState
videoCodecStateRef :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
VideoCodecState -> m VideoCodecState
videoCodecStateRef VideoCodecState
state = IO VideoCodecState -> m VideoCodecState
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO VideoCodecState -> m VideoCodecState)
-> IO VideoCodecState -> m VideoCodecState
forall a b. (a -> b) -> a -> b
$ do
Ptr VideoCodecState
state' <- VideoCodecState -> IO (Ptr VideoCodecState)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr VideoCodecState
state
Ptr VideoCodecState
result <- Ptr VideoCodecState -> IO (Ptr VideoCodecState)
gst_video_codec_state_ref Ptr VideoCodecState
state'
Text -> Ptr VideoCodecState -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL Text
"videoCodecStateRef" Ptr VideoCodecState
result
VideoCodecState
result' <- ((ManagedPtr VideoCodecState -> VideoCodecState)
-> Ptr VideoCodecState -> IO VideoCodecState
forall a.
(HasCallStack, GBoxed a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr VideoCodecState -> VideoCodecState
VideoCodecState) Ptr VideoCodecState
result
VideoCodecState -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr VideoCodecState
state
VideoCodecState -> IO VideoCodecState
forall (m :: * -> *) a. Monad m => a -> m a
return VideoCodecState
result'
#if defined(ENABLE_OVERLOADING)
data VideoCodecStateRefMethodInfo
instance (signature ~ (m VideoCodecState), MonadIO m) => O.OverloadedMethod VideoCodecStateRefMethodInfo VideoCodecState signature where
overloadedMethod = videoCodecStateRef
instance O.OverloadedMethodInfo VideoCodecStateRefMethodInfo VideoCodecState where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GstVideo.Structs.VideoCodecState.videoCodecStateRef",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gstvideo-1.0.25/docs/GI-GstVideo-Structs-VideoCodecState.html#v:videoCodecStateRef"
})
#endif
foreign import ccall "gst_video_codec_state_unref" gst_video_codec_state_unref ::
Ptr VideoCodecState ->
IO ()
videoCodecStateUnref ::
(B.CallStack.HasCallStack, MonadIO m) =>
VideoCodecState
-> m ()
videoCodecStateUnref :: forall (m :: * -> *).
(HasCallStack, MonadIO m) =>
VideoCodecState -> m ()
videoCodecStateUnref VideoCodecState
state = 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 VideoCodecState
state' <- VideoCodecState -> IO (Ptr VideoCodecState)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr VideoCodecState
state
Ptr VideoCodecState -> IO ()
gst_video_codec_state_unref Ptr VideoCodecState
state'
VideoCodecState -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr VideoCodecState
state
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data VideoCodecStateUnrefMethodInfo
instance (signature ~ (m ()), MonadIO m) => O.OverloadedMethod VideoCodecStateUnrefMethodInfo VideoCodecState signature where
overloadedMethod = videoCodecStateUnref
instance O.OverloadedMethodInfo VideoCodecStateUnrefMethodInfo VideoCodecState where
overloadedMethodInfo = P.Just (O.ResolvedSymbolInfo {
O.resolvedSymbolName = "GI.GstVideo.Structs.VideoCodecState.videoCodecStateUnref",
O.resolvedSymbolURL = "https://hackage.haskell.org/package/gi-gstvideo-1.0.25/docs/GI-GstVideo-Structs-VideoCodecState.html#v:videoCodecStateUnref"
})
#endif
#if defined(ENABLE_OVERLOADING)
type family ResolveVideoCodecStateMethod (t :: Symbol) (o :: *) :: * where
ResolveVideoCodecStateMethod "ref" o = VideoCodecStateRefMethodInfo
ResolveVideoCodecStateMethod "unref" o = VideoCodecStateUnrefMethodInfo
ResolveVideoCodecStateMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveVideoCodecStateMethod t VideoCodecState, O.OverloadedMethod info VideoCodecState p) => OL.IsLabel t (VideoCodecState -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod @info
#else
fromLabel _ = O.overloadedMethod @info
#endif
#if MIN_VERSION_base(4,13,0)
instance (info ~ ResolveVideoCodecStateMethod t VideoCodecState, O.OverloadedMethod info VideoCodecState p, R.HasField t VideoCodecState p) => R.HasField t VideoCodecState p where
getField = O.overloadedMethod @info
#endif
instance (info ~ ResolveVideoCodecStateMethod t VideoCodecState, O.OverloadedMethodInfo info VideoCodecState) => OL.IsLabel t (O.MethodProxy info VideoCodecState) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.MethodProxy
#else
fromLabel _ = O.MethodProxy
#endif
#endif