{-# LANGUAGE TypeApplications #-}
#if (MIN_VERSION_haskell_gi_overloading(1,0,0) && !defined(__HADDOCK_VERSION__))
#define ENABLE_OVERLOADING
#endif
module GI.GstPbutils.Objects.EncodingProfile
(
EncodingProfile(..) ,
IsEncodingProfile ,
toEncodingProfile ,
noEncodingProfile ,
#if defined(ENABLE_OVERLOADING)
ResolveEncodingProfileMethod ,
#endif
#if defined(ENABLE_OVERLOADING)
EncodingProfileCopyMethodInfo ,
#endif
encodingProfileCopy ,
encodingProfileFind ,
encodingProfileFromDiscoverer ,
#if defined(ENABLE_OVERLOADING)
EncodingProfileGetAllowDynamicOutputMethodInfo,
#endif
encodingProfileGetAllowDynamicOutput ,
#if defined(ENABLE_OVERLOADING)
EncodingProfileGetDescriptionMethodInfo ,
#endif
encodingProfileGetDescription ,
#if defined(ENABLE_OVERLOADING)
EncodingProfileGetFileExtensionMethodInfo,
#endif
encodingProfileGetFileExtension ,
#if defined(ENABLE_OVERLOADING)
EncodingProfileGetFormatMethodInfo ,
#endif
encodingProfileGetFormat ,
#if defined(ENABLE_OVERLOADING)
EncodingProfileGetInputCapsMethodInfo ,
#endif
encodingProfileGetInputCaps ,
#if defined(ENABLE_OVERLOADING)
EncodingProfileGetNameMethodInfo ,
#endif
encodingProfileGetName ,
#if defined(ENABLE_OVERLOADING)
EncodingProfileGetPresenceMethodInfo ,
#endif
encodingProfileGetPresence ,
#if defined(ENABLE_OVERLOADING)
EncodingProfileGetPresetMethodInfo ,
#endif
encodingProfileGetPreset ,
#if defined(ENABLE_OVERLOADING)
EncodingProfileGetPresetNameMethodInfo ,
#endif
encodingProfileGetPresetName ,
#if defined(ENABLE_OVERLOADING)
EncodingProfileGetRestrictionMethodInfo ,
#endif
encodingProfileGetRestriction ,
#if defined(ENABLE_OVERLOADING)
EncodingProfileGetTypeNickMethodInfo ,
#endif
encodingProfileGetTypeNick ,
#if defined(ENABLE_OVERLOADING)
EncodingProfileIsEnabledMethodInfo ,
#endif
encodingProfileIsEnabled ,
#if defined(ENABLE_OVERLOADING)
EncodingProfileIsEqualMethodInfo ,
#endif
encodingProfileIsEqual ,
#if defined(ENABLE_OVERLOADING)
EncodingProfileSetAllowDynamicOutputMethodInfo,
#endif
encodingProfileSetAllowDynamicOutput ,
#if defined(ENABLE_OVERLOADING)
EncodingProfileSetDescriptionMethodInfo ,
#endif
encodingProfileSetDescription ,
#if defined(ENABLE_OVERLOADING)
EncodingProfileSetEnabledMethodInfo ,
#endif
encodingProfileSetEnabled ,
#if defined(ENABLE_OVERLOADING)
EncodingProfileSetFormatMethodInfo ,
#endif
encodingProfileSetFormat ,
#if defined(ENABLE_OVERLOADING)
EncodingProfileSetNameMethodInfo ,
#endif
encodingProfileSetName ,
#if defined(ENABLE_OVERLOADING)
EncodingProfileSetPresenceMethodInfo ,
#endif
encodingProfileSetPresence ,
#if defined(ENABLE_OVERLOADING)
EncodingProfileSetPresetMethodInfo ,
#endif
encodingProfileSetPreset ,
#if defined(ENABLE_OVERLOADING)
EncodingProfileSetPresetNameMethodInfo ,
#endif
encodingProfileSetPresetName ,
#if defined(ENABLE_OVERLOADING)
EncodingProfileSetRestrictionMethodInfo ,
#endif
encodingProfileSetRestriction ,
#if defined(ENABLE_OVERLOADING)
EncodingProfileRestrictionCapsPropertyInfo,
#endif
clearEncodingProfileRestrictionCaps ,
constructEncodingProfileRestrictionCaps ,
#if defined(ENABLE_OVERLOADING)
encodingProfileRestrictionCaps ,
#endif
getEncodingProfileRestrictionCaps ,
setEncodingProfileRestrictionCaps ,
) where
import Data.GI.Base.ShortPrelude
import qualified Data.GI.Base.ShortPrelude as SP
import qualified Data.GI.Base.Overloading as O
import qualified Prelude as P
import qualified Data.GI.Base.Attributes as GI.Attributes
import qualified Data.GI.Base.ManagedPtr as B.ManagedPtr
import qualified Data.GI.Base.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 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 GI.GObject.Objects.Object as GObject.Object
import qualified GI.Gst.Structs.Caps as Gst.Caps
import {-# SOURCE #-} qualified GI.GstPbutils.Objects.DiscovererInfo as GstPbutils.DiscovererInfo
newtype EncodingProfile = EncodingProfile (ManagedPtr EncodingProfile)
deriving (EncodingProfile -> EncodingProfile -> Bool
(EncodingProfile -> EncodingProfile -> Bool)
-> (EncodingProfile -> EncodingProfile -> Bool)
-> Eq EncodingProfile
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: EncodingProfile -> EncodingProfile -> Bool
$c/= :: EncodingProfile -> EncodingProfile -> Bool
== :: EncodingProfile -> EncodingProfile -> Bool
$c== :: EncodingProfile -> EncodingProfile -> Bool
Eq)
foreign import ccall "gst_encoding_profile_get_type"
c_gst_encoding_profile_get_type :: IO GType
instance GObject EncodingProfile where
gobjectType :: IO GType
gobjectType = IO GType
c_gst_encoding_profile_get_type
instance B.GValue.IsGValue EncodingProfile where
toGValue :: EncodingProfile -> IO GValue
toGValue o :: EncodingProfile
o = do
GType
gtype <- IO GType
c_gst_encoding_profile_get_type
EncodingProfile -> (Ptr EncodingProfile -> IO GValue) -> IO GValue
forall a c.
(HasCallStack, ManagedPtrNewtype a) =>
a -> (Ptr a -> IO c) -> IO c
B.ManagedPtr.withManagedPtr EncodingProfile
o (GType
-> (GValue -> Ptr EncodingProfile -> IO ())
-> Ptr EncodingProfile
-> IO GValue
forall a. GType -> (GValue -> a -> IO ()) -> a -> IO GValue
B.GValue.buildGValue GType
gtype GValue -> Ptr EncodingProfile -> IO ()
forall a. GObject a => GValue -> Ptr a -> IO ()
B.GValue.set_object)
fromGValue :: GValue -> IO EncodingProfile
fromGValue gv :: GValue
gv = do
Ptr EncodingProfile
ptr <- GValue -> IO (Ptr EncodingProfile)
forall b. GObject b => GValue -> IO (Ptr b)
B.GValue.get_object GValue
gv :: IO (Ptr EncodingProfile)
(ManagedPtr EncodingProfile -> EncodingProfile)
-> Ptr EncodingProfile -> IO EncodingProfile
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
B.ManagedPtr.newObject ManagedPtr EncodingProfile -> EncodingProfile
EncodingProfile Ptr EncodingProfile
ptr
class (GObject o, O.IsDescendantOf EncodingProfile o) => IsEncodingProfile o
instance (GObject o, O.IsDescendantOf EncodingProfile o) => IsEncodingProfile o
instance O.HasParentTypes EncodingProfile
type instance O.ParentTypes EncodingProfile = '[GObject.Object.Object]
toEncodingProfile :: (MonadIO m, IsEncodingProfile o) => o -> m EncodingProfile
toEncodingProfile :: o -> m EncodingProfile
toEncodingProfile = IO EncodingProfile -> m EncodingProfile
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO EncodingProfile -> m EncodingProfile)
-> (o -> IO EncodingProfile) -> o -> m EncodingProfile
forall b c a. (b -> c) -> (a -> b) -> a -> c
. (ManagedPtr EncodingProfile -> EncodingProfile)
-> o -> IO EncodingProfile
forall o o'.
(HasCallStack, GObject o, GObject o') =>
(ManagedPtr o' -> o') -> o -> IO o'
unsafeCastTo ManagedPtr EncodingProfile -> EncodingProfile
EncodingProfile
noEncodingProfile :: Maybe EncodingProfile
noEncodingProfile :: Maybe EncodingProfile
noEncodingProfile = Maybe EncodingProfile
forall a. Maybe a
Nothing
#if defined(ENABLE_OVERLOADING)
type family ResolveEncodingProfileMethod (t :: Symbol) (o :: *) :: * where
ResolveEncodingProfileMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveEncodingProfileMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveEncodingProfileMethod "copy" o = EncodingProfileCopyMethodInfo
ResolveEncodingProfileMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveEncodingProfileMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveEncodingProfileMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveEncodingProfileMethod "isEnabled" o = EncodingProfileIsEnabledMethodInfo
ResolveEncodingProfileMethod "isEqual" o = EncodingProfileIsEqualMethodInfo
ResolveEncodingProfileMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveEncodingProfileMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveEncodingProfileMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveEncodingProfileMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveEncodingProfileMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveEncodingProfileMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveEncodingProfileMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveEncodingProfileMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveEncodingProfileMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveEncodingProfileMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveEncodingProfileMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveEncodingProfileMethod "getAllowDynamicOutput" o = EncodingProfileGetAllowDynamicOutputMethodInfo
ResolveEncodingProfileMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveEncodingProfileMethod "getDescription" o = EncodingProfileGetDescriptionMethodInfo
ResolveEncodingProfileMethod "getFileExtension" o = EncodingProfileGetFileExtensionMethodInfo
ResolveEncodingProfileMethod "getFormat" o = EncodingProfileGetFormatMethodInfo
ResolveEncodingProfileMethod "getInputCaps" o = EncodingProfileGetInputCapsMethodInfo
ResolveEncodingProfileMethod "getName" o = EncodingProfileGetNameMethodInfo
ResolveEncodingProfileMethod "getPresence" o = EncodingProfileGetPresenceMethodInfo
ResolveEncodingProfileMethod "getPreset" o = EncodingProfileGetPresetMethodInfo
ResolveEncodingProfileMethod "getPresetName" o = EncodingProfileGetPresetNameMethodInfo
ResolveEncodingProfileMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveEncodingProfileMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveEncodingProfileMethod "getRestriction" o = EncodingProfileGetRestrictionMethodInfo
ResolveEncodingProfileMethod "getTypeNick" o = EncodingProfileGetTypeNickMethodInfo
ResolveEncodingProfileMethod "setAllowDynamicOutput" o = EncodingProfileSetAllowDynamicOutputMethodInfo
ResolveEncodingProfileMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveEncodingProfileMethod "setDataFull" o = GObject.Object.ObjectSetDataFullMethodInfo
ResolveEncodingProfileMethod "setDescription" o = EncodingProfileSetDescriptionMethodInfo
ResolveEncodingProfileMethod "setEnabled" o = EncodingProfileSetEnabledMethodInfo
ResolveEncodingProfileMethod "setFormat" o = EncodingProfileSetFormatMethodInfo
ResolveEncodingProfileMethod "setName" o = EncodingProfileSetNameMethodInfo
ResolveEncodingProfileMethod "setPresence" o = EncodingProfileSetPresenceMethodInfo
ResolveEncodingProfileMethod "setPreset" o = EncodingProfileSetPresetMethodInfo
ResolveEncodingProfileMethod "setPresetName" o = EncodingProfileSetPresetNameMethodInfo
ResolveEncodingProfileMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveEncodingProfileMethod "setRestriction" o = EncodingProfileSetRestrictionMethodInfo
ResolveEncodingProfileMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveEncodingProfileMethod t EncodingProfile, O.MethodInfo info EncodingProfile p) => OL.IsLabel t (EncodingProfile -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod @info
#else
fromLabel _ = O.overloadedMethod @info
#endif
#endif
getEncodingProfileRestrictionCaps :: (MonadIO m, IsEncodingProfile o) => o -> m (Maybe Gst.Caps.Caps)
getEncodingProfileRestrictionCaps :: o -> m (Maybe Caps)
getEncodingProfileRestrictionCaps obj :: o
obj = 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
$ o -> String -> (ManagedPtr Caps -> Caps) -> IO (Maybe Caps)
forall a b.
(GObject a, BoxedObject b) =>
a -> String -> (ManagedPtr b -> b) -> IO (Maybe b)
B.Properties.getObjectPropertyBoxed o
obj "restriction-caps" ManagedPtr Caps -> Caps
Gst.Caps.Caps
setEncodingProfileRestrictionCaps :: (MonadIO m, IsEncodingProfile o) => o -> Gst.Caps.Caps -> m ()
setEncodingProfileRestrictionCaps :: o -> Caps -> m ()
setEncodingProfileRestrictionCaps obj :: o
obj val :: 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
$ o -> String -> Maybe Caps -> IO ()
forall a b.
(GObject a, BoxedObject b) =>
a -> String -> Maybe b -> IO ()
B.Properties.setObjectPropertyBoxed o
obj "restriction-caps" (Caps -> Maybe Caps
forall a. a -> Maybe a
Just Caps
val)
constructEncodingProfileRestrictionCaps :: (IsEncodingProfile o) => Gst.Caps.Caps -> IO (GValueConstruct o)
constructEncodingProfileRestrictionCaps :: Caps -> IO (GValueConstruct o)
constructEncodingProfileRestrictionCaps val :: Caps
val = String -> Maybe Caps -> IO (GValueConstruct o)
forall a o.
BoxedObject a =>
String -> Maybe a -> IO (GValueConstruct o)
B.Properties.constructObjectPropertyBoxed "restriction-caps" (Caps -> Maybe Caps
forall a. a -> Maybe a
Just Caps
val)
clearEncodingProfileRestrictionCaps :: (MonadIO m, IsEncodingProfile o) => o -> m ()
clearEncodingProfileRestrictionCaps :: o -> m ()
clearEncodingProfileRestrictionCaps obj :: o
obj = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ o -> String -> Maybe Caps -> IO ()
forall a b.
(GObject a, BoxedObject b) =>
a -> String -> Maybe b -> IO ()
B.Properties.setObjectPropertyBoxed o
obj "restriction-caps" (Maybe Caps
forall a. Maybe a
Nothing :: Maybe Gst.Caps.Caps)
#if defined(ENABLE_OVERLOADING)
data EncodingProfileRestrictionCapsPropertyInfo
instance AttrInfo EncodingProfileRestrictionCapsPropertyInfo where
type AttrAllowedOps EncodingProfileRestrictionCapsPropertyInfo = '[ 'AttrSet, 'AttrConstruct, 'AttrGet, 'AttrClear]
type AttrBaseTypeConstraint EncodingProfileRestrictionCapsPropertyInfo = IsEncodingProfile
type AttrSetTypeConstraint EncodingProfileRestrictionCapsPropertyInfo = (~) Gst.Caps.Caps
type AttrTransferTypeConstraint EncodingProfileRestrictionCapsPropertyInfo = (~) Gst.Caps.Caps
type AttrTransferType EncodingProfileRestrictionCapsPropertyInfo = Gst.Caps.Caps
type AttrGetType EncodingProfileRestrictionCapsPropertyInfo = (Maybe Gst.Caps.Caps)
type AttrLabel EncodingProfileRestrictionCapsPropertyInfo = "restriction-caps"
type AttrOrigin EncodingProfileRestrictionCapsPropertyInfo = EncodingProfile
attrGet = getEncodingProfileRestrictionCaps
attrSet = setEncodingProfileRestrictionCaps
attrTransfer _ v = do
return v
attrConstruct = constructEncodingProfileRestrictionCaps
attrClear = clearEncodingProfileRestrictionCaps
#endif
#if defined(ENABLE_OVERLOADING)
instance O.HasAttributeList EncodingProfile
type instance O.AttributeList EncodingProfile = EncodingProfileAttributeList
type EncodingProfileAttributeList = ('[ '("restrictionCaps", EncodingProfileRestrictionCapsPropertyInfo)] :: [(Symbol, *)])
#endif
#if defined(ENABLE_OVERLOADING)
encodingProfileRestrictionCaps :: AttrLabelProxy "restrictionCaps"
encodingProfileRestrictionCaps = AttrLabelProxy
#endif
#if defined(ENABLE_OVERLOADING)
type instance O.SignalList EncodingProfile = EncodingProfileSignalList
type EncodingProfileSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])
#endif
foreign import ccall "gst_encoding_profile_copy" gst_encoding_profile_copy ::
Ptr EncodingProfile ->
IO (Ptr EncodingProfile)
encodingProfileCopy ::
(B.CallStack.HasCallStack, MonadIO m, IsEncodingProfile a) =>
a
-> m EncodingProfile
encodingProfileCopy :: a -> m EncodingProfile
encodingProfileCopy self :: a
self = IO EncodingProfile -> m EncodingProfile
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO EncodingProfile -> m EncodingProfile)
-> IO EncodingProfile -> m EncodingProfile
forall a b. (a -> b) -> a -> b
$ do
Ptr EncodingProfile
self' <- a -> IO (Ptr EncodingProfile)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
self
Ptr EncodingProfile
result <- Ptr EncodingProfile -> IO (Ptr EncodingProfile)
gst_encoding_profile_copy Ptr EncodingProfile
self'
Text -> Ptr EncodingProfile -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "encodingProfileCopy" Ptr EncodingProfile
result
EncodingProfile
result' <- ((ManagedPtr EncodingProfile -> EncodingProfile)
-> Ptr EncodingProfile -> IO EncodingProfile
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr EncodingProfile -> EncodingProfile
EncodingProfile) Ptr EncodingProfile
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
self
EncodingProfile -> IO EncodingProfile
forall (m :: * -> *) a. Monad m => a -> m a
return EncodingProfile
result'
#if defined(ENABLE_OVERLOADING)
data EncodingProfileCopyMethodInfo
instance (signature ~ (m EncodingProfile), MonadIO m, IsEncodingProfile a) => O.MethodInfo EncodingProfileCopyMethodInfo a signature where
overloadedMethod = encodingProfileCopy
#endif
foreign import ccall "gst_encoding_profile_get_allow_dynamic_output" gst_encoding_profile_get_allow_dynamic_output ::
Ptr EncodingProfile ->
IO CInt
encodingProfileGetAllowDynamicOutput ::
(B.CallStack.HasCallStack, MonadIO m, IsEncodingProfile a) =>
a
-> m Bool
encodingProfileGetAllowDynamicOutput :: a -> m Bool
encodingProfileGetAllowDynamicOutput profile :: a
profile = 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 EncodingProfile
profile' <- a -> IO (Ptr EncodingProfile)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
profile
CInt
result <- Ptr EncodingProfile -> IO CInt
gst_encoding_profile_get_allow_dynamic_output Ptr EncodingProfile
profile'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
profile
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data EncodingProfileGetAllowDynamicOutputMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsEncodingProfile a) => O.MethodInfo EncodingProfileGetAllowDynamicOutputMethodInfo a signature where
overloadedMethod = encodingProfileGetAllowDynamicOutput
#endif
foreign import ccall "gst_encoding_profile_get_description" gst_encoding_profile_get_description ::
Ptr EncodingProfile ->
IO CString
encodingProfileGetDescription ::
(B.CallStack.HasCallStack, MonadIO m, IsEncodingProfile a) =>
a
-> m T.Text
encodingProfileGetDescription :: a -> m Text
encodingProfileGetDescription profile :: a
profile = 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 EncodingProfile
profile' <- a -> IO (Ptr EncodingProfile)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
profile
CString
result <- Ptr EncodingProfile -> IO CString
gst_encoding_profile_get_description Ptr EncodingProfile
profile'
Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "encodingProfileGetDescription" CString
result
Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
profile
Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'
#if defined(ENABLE_OVERLOADING)
data EncodingProfileGetDescriptionMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsEncodingProfile a) => O.MethodInfo EncodingProfileGetDescriptionMethodInfo a signature where
overloadedMethod = encodingProfileGetDescription
#endif
foreign import ccall "gst_encoding_profile_get_file_extension" gst_encoding_profile_get_file_extension ::
Ptr EncodingProfile ->
IO CString
encodingProfileGetFileExtension ::
(B.CallStack.HasCallStack, MonadIO m, IsEncodingProfile a) =>
a
-> m T.Text
encodingProfileGetFileExtension :: a -> m Text
encodingProfileGetFileExtension profile :: a
profile = 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 EncodingProfile
profile' <- a -> IO (Ptr EncodingProfile)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
profile
CString
result <- Ptr EncodingProfile -> IO CString
gst_encoding_profile_get_file_extension Ptr EncodingProfile
profile'
Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "encodingProfileGetFileExtension" CString
result
Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
profile
Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'
#if defined(ENABLE_OVERLOADING)
data EncodingProfileGetFileExtensionMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsEncodingProfile a) => O.MethodInfo EncodingProfileGetFileExtensionMethodInfo a signature where
overloadedMethod = encodingProfileGetFileExtension
#endif
foreign import ccall "gst_encoding_profile_get_format" gst_encoding_profile_get_format ::
Ptr EncodingProfile ->
IO (Ptr Gst.Caps.Caps)
encodingProfileGetFormat ::
(B.CallStack.HasCallStack, MonadIO m, IsEncodingProfile a) =>
a
-> m Gst.Caps.Caps
encodingProfileGetFormat :: a -> m Caps
encodingProfileGetFormat profile :: a
profile = 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 EncodingProfile
profile' <- a -> IO (Ptr EncodingProfile)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
profile
Ptr Caps
result <- Ptr EncodingProfile -> IO (Ptr Caps)
gst_encoding_profile_get_format Ptr EncodingProfile
profile'
Text -> Ptr Caps -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "encodingProfileGetFormat" Ptr Caps
result
Caps
result' <- ((ManagedPtr Caps -> Caps) -> Ptr Caps -> IO Caps
forall a.
(HasCallStack, BoxedObject a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Caps -> Caps
Gst.Caps.Caps) Ptr Caps
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
profile
Caps -> IO Caps
forall (m :: * -> *) a. Monad m => a -> m a
return Caps
result'
#if defined(ENABLE_OVERLOADING)
data EncodingProfileGetFormatMethodInfo
instance (signature ~ (m Gst.Caps.Caps), MonadIO m, IsEncodingProfile a) => O.MethodInfo EncodingProfileGetFormatMethodInfo a signature where
overloadedMethod = encodingProfileGetFormat
#endif
foreign import ccall "gst_encoding_profile_get_input_caps" gst_encoding_profile_get_input_caps ::
Ptr EncodingProfile ->
IO (Ptr Gst.Caps.Caps)
encodingProfileGetInputCaps ::
(B.CallStack.HasCallStack, MonadIO m, IsEncodingProfile a) =>
a
-> m Gst.Caps.Caps
encodingProfileGetInputCaps :: a -> m Caps
encodingProfileGetInputCaps profile :: a
profile = 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 EncodingProfile
profile' <- a -> IO (Ptr EncodingProfile)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
profile
Ptr Caps
result <- Ptr EncodingProfile -> IO (Ptr Caps)
gst_encoding_profile_get_input_caps Ptr EncodingProfile
profile'
Text -> Ptr Caps -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "encodingProfileGetInputCaps" Ptr Caps
result
Caps
result' <- ((ManagedPtr Caps -> Caps) -> Ptr Caps -> IO Caps
forall a.
(HasCallStack, BoxedObject a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Caps -> Caps
Gst.Caps.Caps) Ptr Caps
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
profile
Caps -> IO Caps
forall (m :: * -> *) a. Monad m => a -> m a
return Caps
result'
#if defined(ENABLE_OVERLOADING)
data EncodingProfileGetInputCapsMethodInfo
instance (signature ~ (m Gst.Caps.Caps), MonadIO m, IsEncodingProfile a) => O.MethodInfo EncodingProfileGetInputCapsMethodInfo a signature where
overloadedMethod = encodingProfileGetInputCaps
#endif
foreign import ccall "gst_encoding_profile_get_name" gst_encoding_profile_get_name ::
Ptr EncodingProfile ->
IO CString
encodingProfileGetName ::
(B.CallStack.HasCallStack, MonadIO m, IsEncodingProfile a) =>
a
-> m T.Text
encodingProfileGetName :: a -> m Text
encodingProfileGetName profile :: a
profile = 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 EncodingProfile
profile' <- a -> IO (Ptr EncodingProfile)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
profile
CString
result <- Ptr EncodingProfile -> IO CString
gst_encoding_profile_get_name Ptr EncodingProfile
profile'
Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "encodingProfileGetName" CString
result
Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
profile
Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'
#if defined(ENABLE_OVERLOADING)
data EncodingProfileGetNameMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsEncodingProfile a) => O.MethodInfo EncodingProfileGetNameMethodInfo a signature where
overloadedMethod = encodingProfileGetName
#endif
foreign import ccall "gst_encoding_profile_get_presence" gst_encoding_profile_get_presence ::
Ptr EncodingProfile ->
IO Word32
encodingProfileGetPresence ::
(B.CallStack.HasCallStack, MonadIO m, IsEncodingProfile a) =>
a
-> m Word32
encodingProfileGetPresence :: a -> m Word32
encodingProfileGetPresence profile :: a
profile = 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 EncodingProfile
profile' <- a -> IO (Ptr EncodingProfile)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
profile
Word32
result <- Ptr EncodingProfile -> IO Word32
gst_encoding_profile_get_presence Ptr EncodingProfile
profile'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
profile
Word32 -> IO Word32
forall (m :: * -> *) a. Monad m => a -> m a
return Word32
result
#if defined(ENABLE_OVERLOADING)
data EncodingProfileGetPresenceMethodInfo
instance (signature ~ (m Word32), MonadIO m, IsEncodingProfile a) => O.MethodInfo EncodingProfileGetPresenceMethodInfo a signature where
overloadedMethod = encodingProfileGetPresence
#endif
foreign import ccall "gst_encoding_profile_get_preset" gst_encoding_profile_get_preset ::
Ptr EncodingProfile ->
IO CString
encodingProfileGetPreset ::
(B.CallStack.HasCallStack, MonadIO m, IsEncodingProfile a) =>
a
-> m T.Text
encodingProfileGetPreset :: a -> m Text
encodingProfileGetPreset profile :: a
profile = 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 EncodingProfile
profile' <- a -> IO (Ptr EncodingProfile)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
profile
CString
result <- Ptr EncodingProfile -> IO CString
gst_encoding_profile_get_preset Ptr EncodingProfile
profile'
Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "encodingProfileGetPreset" CString
result
Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
profile
Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'
#if defined(ENABLE_OVERLOADING)
data EncodingProfileGetPresetMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsEncodingProfile a) => O.MethodInfo EncodingProfileGetPresetMethodInfo a signature where
overloadedMethod = encodingProfileGetPreset
#endif
foreign import ccall "gst_encoding_profile_get_preset_name" gst_encoding_profile_get_preset_name ::
Ptr EncodingProfile ->
IO CString
encodingProfileGetPresetName ::
(B.CallStack.HasCallStack, MonadIO m, IsEncodingProfile a) =>
a
-> m T.Text
encodingProfileGetPresetName :: a -> m Text
encodingProfileGetPresetName profile :: a
profile = 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 EncodingProfile
profile' <- a -> IO (Ptr EncodingProfile)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
profile
CString
result <- Ptr EncodingProfile -> IO CString
gst_encoding_profile_get_preset_name Ptr EncodingProfile
profile'
Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "encodingProfileGetPresetName" CString
result
Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
profile
Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'
#if defined(ENABLE_OVERLOADING)
data EncodingProfileGetPresetNameMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsEncodingProfile a) => O.MethodInfo EncodingProfileGetPresetNameMethodInfo a signature where
overloadedMethod = encodingProfileGetPresetName
#endif
foreign import ccall "gst_encoding_profile_get_restriction" gst_encoding_profile_get_restriction ::
Ptr EncodingProfile ->
IO (Ptr Gst.Caps.Caps)
encodingProfileGetRestriction ::
(B.CallStack.HasCallStack, MonadIO m, IsEncodingProfile a) =>
a
-> m Gst.Caps.Caps
encodingProfileGetRestriction :: a -> m Caps
encodingProfileGetRestriction profile :: a
profile = 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 EncodingProfile
profile' <- a -> IO (Ptr EncodingProfile)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
profile
Ptr Caps
result <- Ptr EncodingProfile -> IO (Ptr Caps)
gst_encoding_profile_get_restriction Ptr EncodingProfile
profile'
Text -> Ptr Caps -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "encodingProfileGetRestriction" Ptr Caps
result
Caps
result' <- ((ManagedPtr Caps -> Caps) -> Ptr Caps -> IO Caps
forall a.
(HasCallStack, BoxedObject a) =>
(ManagedPtr a -> a) -> Ptr a -> IO a
wrapBoxed ManagedPtr Caps -> Caps
Gst.Caps.Caps) Ptr Caps
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
profile
Caps -> IO Caps
forall (m :: * -> *) a. Monad m => a -> m a
return Caps
result'
#if defined(ENABLE_OVERLOADING)
data EncodingProfileGetRestrictionMethodInfo
instance (signature ~ (m Gst.Caps.Caps), MonadIO m, IsEncodingProfile a) => O.MethodInfo EncodingProfileGetRestrictionMethodInfo a signature where
overloadedMethod = encodingProfileGetRestriction
#endif
foreign import ccall "gst_encoding_profile_get_type_nick" gst_encoding_profile_get_type_nick ::
Ptr EncodingProfile ->
IO CString
encodingProfileGetTypeNick ::
(B.CallStack.HasCallStack, MonadIO m, IsEncodingProfile a) =>
a
-> m T.Text
encodingProfileGetTypeNick :: a -> m Text
encodingProfileGetTypeNick profile :: a
profile = 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 EncodingProfile
profile' <- a -> IO (Ptr EncodingProfile)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
profile
CString
result <- Ptr EncodingProfile -> IO CString
gst_encoding_profile_get_type_nick Ptr EncodingProfile
profile'
Text -> CString -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "encodingProfileGetTypeNick" CString
result
Text
result' <- HasCallStack => CString -> IO Text
CString -> IO Text
cstringToText CString
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
profile
Text -> IO Text
forall (m :: * -> *) a. Monad m => a -> m a
return Text
result'
#if defined(ENABLE_OVERLOADING)
data EncodingProfileGetTypeNickMethodInfo
instance (signature ~ (m T.Text), MonadIO m, IsEncodingProfile a) => O.MethodInfo EncodingProfileGetTypeNickMethodInfo a signature where
overloadedMethod = encodingProfileGetTypeNick
#endif
foreign import ccall "gst_encoding_profile_is_enabled" gst_encoding_profile_is_enabled ::
Ptr EncodingProfile ->
IO CInt
encodingProfileIsEnabled ::
(B.CallStack.HasCallStack, MonadIO m, IsEncodingProfile a) =>
a
-> m Bool
encodingProfileIsEnabled :: a -> m Bool
encodingProfileIsEnabled profile :: a
profile = 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 EncodingProfile
profile' <- a -> IO (Ptr EncodingProfile)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
profile
CInt
result <- Ptr EncodingProfile -> IO CInt
gst_encoding_profile_is_enabled Ptr EncodingProfile
profile'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
profile
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data EncodingProfileIsEnabledMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsEncodingProfile a) => O.MethodInfo EncodingProfileIsEnabledMethodInfo a signature where
overloadedMethod = encodingProfileIsEnabled
#endif
foreign import ccall "gst_encoding_profile_is_equal" gst_encoding_profile_is_equal ::
Ptr EncodingProfile ->
Ptr EncodingProfile ->
IO CInt
encodingProfileIsEqual ::
(B.CallStack.HasCallStack, MonadIO m, IsEncodingProfile a, IsEncodingProfile b) =>
a
-> b
-> m Bool
encodingProfileIsEqual :: a -> b -> m Bool
encodingProfileIsEqual a :: a
a b :: b
b = 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 EncodingProfile
a' <- a -> IO (Ptr EncodingProfile)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
a
Ptr EncodingProfile
b' <- b -> IO (Ptr EncodingProfile)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr b
b
CInt
result <- Ptr EncodingProfile -> Ptr EncodingProfile -> IO CInt
gst_encoding_profile_is_equal Ptr EncodingProfile
a' Ptr EncodingProfile
b'
let result' :: Bool
result' = (CInt -> CInt -> Bool
forall a. Eq a => a -> a -> Bool
/= 0) CInt
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
a
b -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr b
b
Bool -> IO Bool
forall (m :: * -> *) a. Monad m => a -> m a
return Bool
result'
#if defined(ENABLE_OVERLOADING)
data EncodingProfileIsEqualMethodInfo
instance (signature ~ (b -> m Bool), MonadIO m, IsEncodingProfile a, IsEncodingProfile b) => O.MethodInfo EncodingProfileIsEqualMethodInfo a signature where
overloadedMethod = encodingProfileIsEqual
#endif
foreign import ccall "gst_encoding_profile_set_allow_dynamic_output" gst_encoding_profile_set_allow_dynamic_output ::
Ptr EncodingProfile ->
CInt ->
IO ()
encodingProfileSetAllowDynamicOutput ::
(B.CallStack.HasCallStack, MonadIO m, IsEncodingProfile a) =>
a
-> Bool
-> m ()
encodingProfileSetAllowDynamicOutput :: a -> Bool -> m ()
encodingProfileSetAllowDynamicOutput profile :: a
profile allowDynamicOutput :: Bool
allowDynamicOutput = 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 EncodingProfile
profile' <- a -> IO (Ptr EncodingProfile)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
profile
let allowDynamicOutput' :: CInt
allowDynamicOutput' = (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
allowDynamicOutput
Ptr EncodingProfile -> CInt -> IO ()
gst_encoding_profile_set_allow_dynamic_output Ptr EncodingProfile
profile' CInt
allowDynamicOutput'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
profile
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data EncodingProfileSetAllowDynamicOutputMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsEncodingProfile a) => O.MethodInfo EncodingProfileSetAllowDynamicOutputMethodInfo a signature where
overloadedMethod = encodingProfileSetAllowDynamicOutput
#endif
foreign import ccall "gst_encoding_profile_set_description" gst_encoding_profile_set_description ::
Ptr EncodingProfile ->
CString ->
IO ()
encodingProfileSetDescription ::
(B.CallStack.HasCallStack, MonadIO m, IsEncodingProfile a) =>
a
-> Maybe (T.Text)
-> m ()
encodingProfileSetDescription :: a -> Maybe Text -> m ()
encodingProfileSetDescription profile :: a
profile description :: Maybe Text
description = 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 EncodingProfile
profile' <- a -> IO (Ptr EncodingProfile)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
profile
CString
maybeDescription <- case Maybe Text
description of
Nothing -> CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
forall a. Ptr a
nullPtr
Just jDescription :: Text
jDescription -> do
CString
jDescription' <- Text -> IO CString
textToCString Text
jDescription
CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jDescription'
Ptr EncodingProfile -> CString -> IO ()
gst_encoding_profile_set_description Ptr EncodingProfile
profile' CString
maybeDescription
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
profile
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeDescription
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data EncodingProfileSetDescriptionMethodInfo
instance (signature ~ (Maybe (T.Text) -> m ()), MonadIO m, IsEncodingProfile a) => O.MethodInfo EncodingProfileSetDescriptionMethodInfo a signature where
overloadedMethod = encodingProfileSetDescription
#endif
foreign import ccall "gst_encoding_profile_set_enabled" gst_encoding_profile_set_enabled ::
Ptr EncodingProfile ->
CInt ->
IO ()
encodingProfileSetEnabled ::
(B.CallStack.HasCallStack, MonadIO m, IsEncodingProfile a) =>
a
-> Bool
-> m ()
encodingProfileSetEnabled :: a -> Bool -> m ()
encodingProfileSetEnabled profile :: a
profile enabled :: Bool
enabled = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr EncodingProfile
profile' <- a -> IO (Ptr EncodingProfile)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
profile
let enabled' :: CInt
enabled' = (Int -> CInt
forall a b. (Integral a, Num b) => a -> b
fromIntegral (Int -> CInt) -> (Bool -> Int) -> Bool -> CInt
forall b c a. (b -> c) -> (a -> b) -> a -> c
. Bool -> Int
forall a. Enum a => a -> Int
fromEnum) Bool
enabled
Ptr EncodingProfile -> CInt -> IO ()
gst_encoding_profile_set_enabled Ptr EncodingProfile
profile' CInt
enabled'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
profile
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data EncodingProfileSetEnabledMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsEncodingProfile a) => O.MethodInfo EncodingProfileSetEnabledMethodInfo a signature where
overloadedMethod = encodingProfileSetEnabled
#endif
foreign import ccall "gst_encoding_profile_set_format" gst_encoding_profile_set_format ::
Ptr EncodingProfile ->
Ptr Gst.Caps.Caps ->
IO ()
encodingProfileSetFormat ::
(B.CallStack.HasCallStack, MonadIO m, IsEncodingProfile a) =>
a
-> Gst.Caps.Caps
-> m ()
encodingProfileSetFormat :: a -> Caps -> m ()
encodingProfileSetFormat profile :: a
profile format :: Caps
format = 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 EncodingProfile
profile' <- a -> IO (Ptr EncodingProfile)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
profile
Ptr Caps
format' <- Caps -> IO (Ptr Caps)
forall a. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr a)
unsafeManagedPtrGetPtr Caps
format
Ptr EncodingProfile -> Ptr Caps -> IO ()
gst_encoding_profile_set_format Ptr EncodingProfile
profile' Ptr Caps
format'
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
profile
Caps -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr Caps
format
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data EncodingProfileSetFormatMethodInfo
instance (signature ~ (Gst.Caps.Caps -> m ()), MonadIO m, IsEncodingProfile a) => O.MethodInfo EncodingProfileSetFormatMethodInfo a signature where
overloadedMethod = encodingProfileSetFormat
#endif
foreign import ccall "gst_encoding_profile_set_name" gst_encoding_profile_set_name ::
Ptr EncodingProfile ->
CString ->
IO ()
encodingProfileSetName ::
(B.CallStack.HasCallStack, MonadIO m, IsEncodingProfile a) =>
a
-> Maybe (T.Text)
-> m ()
encodingProfileSetName :: a -> Maybe Text -> m ()
encodingProfileSetName profile :: a
profile name :: Maybe Text
name = IO () -> m ()
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO () -> m ()) -> IO () -> m ()
forall a b. (a -> b) -> a -> b
$ do
Ptr EncodingProfile
profile' <- a -> IO (Ptr EncodingProfile)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
profile
CString
maybeName <- case Maybe Text
name of
Nothing -> CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
forall a. Ptr a
nullPtr
Just jName :: Text
jName -> do
CString
jName' <- Text -> IO CString
textToCString Text
jName
CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jName'
Ptr EncodingProfile -> CString -> IO ()
gst_encoding_profile_set_name Ptr EncodingProfile
profile' CString
maybeName
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
profile
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeName
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data EncodingProfileSetNameMethodInfo
instance (signature ~ (Maybe (T.Text) -> m ()), MonadIO m, IsEncodingProfile a) => O.MethodInfo EncodingProfileSetNameMethodInfo a signature where
overloadedMethod = encodingProfileSetName
#endif
foreign import ccall "gst_encoding_profile_set_presence" gst_encoding_profile_set_presence ::
Ptr EncodingProfile ->
Word32 ->
IO ()
encodingProfileSetPresence ::
(B.CallStack.HasCallStack, MonadIO m, IsEncodingProfile a) =>
a
-> Word32
-> m ()
encodingProfileSetPresence :: a -> Word32 -> m ()
encodingProfileSetPresence profile :: a
profile presence :: Word32
presence = 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 EncodingProfile
profile' <- a -> IO (Ptr EncodingProfile)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
profile
Ptr EncodingProfile -> Word32 -> IO ()
gst_encoding_profile_set_presence Ptr EncodingProfile
profile' Word32
presence
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
profile
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data EncodingProfileSetPresenceMethodInfo
instance (signature ~ (Word32 -> m ()), MonadIO m, IsEncodingProfile a) => O.MethodInfo EncodingProfileSetPresenceMethodInfo a signature where
overloadedMethod = encodingProfileSetPresence
#endif
foreign import ccall "gst_encoding_profile_set_preset" gst_encoding_profile_set_preset ::
Ptr EncodingProfile ->
CString ->
IO ()
encodingProfileSetPreset ::
(B.CallStack.HasCallStack, MonadIO m, IsEncodingProfile a) =>
a
-> Maybe (T.Text)
-> m ()
encodingProfileSetPreset :: a -> Maybe Text -> m ()
encodingProfileSetPreset profile :: a
profile preset :: Maybe Text
preset = 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 EncodingProfile
profile' <- a -> IO (Ptr EncodingProfile)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
profile
CString
maybePreset <- case Maybe Text
preset of
Nothing -> CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
forall a. Ptr a
nullPtr
Just jPreset :: Text
jPreset -> do
CString
jPreset' <- Text -> IO CString
textToCString Text
jPreset
CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jPreset'
Ptr EncodingProfile -> CString -> IO ()
gst_encoding_profile_set_preset Ptr EncodingProfile
profile' CString
maybePreset
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
profile
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybePreset
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data EncodingProfileSetPresetMethodInfo
instance (signature ~ (Maybe (T.Text) -> m ()), MonadIO m, IsEncodingProfile a) => O.MethodInfo EncodingProfileSetPresetMethodInfo a signature where
overloadedMethod = encodingProfileSetPreset
#endif
foreign import ccall "gst_encoding_profile_set_preset_name" gst_encoding_profile_set_preset_name ::
Ptr EncodingProfile ->
CString ->
IO ()
encodingProfileSetPresetName ::
(B.CallStack.HasCallStack, MonadIO m, IsEncodingProfile a) =>
a
-> Maybe (T.Text)
-> m ()
encodingProfileSetPresetName :: a -> Maybe Text -> m ()
encodingProfileSetPresetName profile :: a
profile presetName :: Maybe Text
presetName = 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 EncodingProfile
profile' <- a -> IO (Ptr EncodingProfile)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
profile
CString
maybePresetName <- case Maybe Text
presetName of
Nothing -> CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
forall a. Ptr a
nullPtr
Just jPresetName :: Text
jPresetName -> do
CString
jPresetName' <- Text -> IO CString
textToCString Text
jPresetName
CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jPresetName'
Ptr EncodingProfile -> CString -> IO ()
gst_encoding_profile_set_preset_name Ptr EncodingProfile
profile' CString
maybePresetName
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
profile
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybePresetName
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data EncodingProfileSetPresetNameMethodInfo
instance (signature ~ (Maybe (T.Text) -> m ()), MonadIO m, IsEncodingProfile a) => O.MethodInfo EncodingProfileSetPresetNameMethodInfo a signature where
overloadedMethod = encodingProfileSetPresetName
#endif
foreign import ccall "gst_encoding_profile_set_restriction" gst_encoding_profile_set_restriction ::
Ptr EncodingProfile ->
Ptr Gst.Caps.Caps ->
IO ()
encodingProfileSetRestriction ::
(B.CallStack.HasCallStack, MonadIO m, IsEncodingProfile a) =>
a
-> Maybe (Gst.Caps.Caps)
-> m ()
encodingProfileSetRestriction :: a -> Maybe Caps -> m ()
encodingProfileSetRestriction profile :: a
profile restriction :: Maybe Caps
restriction = 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 EncodingProfile
profile' <- a -> IO (Ptr EncodingProfile)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
profile
Ptr Caps
maybeRestriction <- case Maybe Caps
restriction of
Nothing -> Ptr Caps -> IO (Ptr Caps)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Caps
forall a. Ptr a
nullPtr
Just jRestriction :: Caps
jRestriction -> do
Ptr Caps
jRestriction' <- Caps -> IO (Ptr Caps)
forall a. (HasCallStack, BoxedObject a) => a -> IO (Ptr a)
B.ManagedPtr.disownBoxed Caps
jRestriction
Ptr Caps -> IO (Ptr Caps)
forall (m :: * -> *) a. Monad m => a -> m a
return Ptr Caps
jRestriction'
Ptr EncodingProfile -> Ptr Caps -> IO ()
gst_encoding_profile_set_restriction Ptr EncodingProfile
profile' Ptr Caps
maybeRestriction
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
profile
Maybe Caps -> (Caps -> IO ()) -> IO ()
forall (m :: * -> *) a. Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust Maybe Caps
restriction Caps -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr
() -> IO ()
forall (m :: * -> *) a. Monad m => a -> m a
return ()
#if defined(ENABLE_OVERLOADING)
data EncodingProfileSetRestrictionMethodInfo
instance (signature ~ (Maybe (Gst.Caps.Caps) -> m ()), MonadIO m, IsEncodingProfile a) => O.MethodInfo EncodingProfileSetRestrictionMethodInfo a signature where
overloadedMethod = encodingProfileSetRestriction
#endif
foreign import ccall "gst_encoding_profile_find" gst_encoding_profile_find ::
CString ->
CString ->
CString ->
IO (Ptr EncodingProfile)
encodingProfileFind ::
(B.CallStack.HasCallStack, MonadIO m) =>
T.Text
-> Maybe (T.Text)
-> Maybe (T.Text)
-> m EncodingProfile
encodingProfileFind :: Text -> Maybe Text -> Maybe Text -> m EncodingProfile
encodingProfileFind targetname :: Text
targetname profilename :: Maybe Text
profilename category :: Maybe Text
category = IO EncodingProfile -> m EncodingProfile
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO EncodingProfile -> m EncodingProfile)
-> IO EncodingProfile -> m EncodingProfile
forall a b. (a -> b) -> a -> b
$ do
CString
targetname' <- Text -> IO CString
textToCString Text
targetname
CString
maybeProfilename <- case Maybe Text
profilename of
Nothing -> CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
forall a. Ptr a
nullPtr
Just jProfilename :: Text
jProfilename -> do
CString
jProfilename' <- Text -> IO CString
textToCString Text
jProfilename
CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jProfilename'
CString
maybeCategory <- case Maybe Text
category of
Nothing -> CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
forall a. Ptr a
nullPtr
Just jCategory :: Text
jCategory -> do
CString
jCategory' <- Text -> IO CString
textToCString Text
jCategory
CString -> IO CString
forall (m :: * -> *) a. Monad m => a -> m a
return CString
jCategory'
Ptr EncodingProfile
result <- CString -> CString -> CString -> IO (Ptr EncodingProfile)
gst_encoding_profile_find CString
targetname' CString
maybeProfilename CString
maybeCategory
Text -> Ptr EncodingProfile -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "encodingProfileFind" Ptr EncodingProfile
result
EncodingProfile
result' <- ((ManagedPtr EncodingProfile -> EncodingProfile)
-> Ptr EncodingProfile -> IO EncodingProfile
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr EncodingProfile -> EncodingProfile
EncodingProfile) Ptr EncodingProfile
result
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
targetname'
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeProfilename
CString -> IO ()
forall a. Ptr a -> IO ()
freeMem CString
maybeCategory
EncodingProfile -> IO EncodingProfile
forall (m :: * -> *) a. Monad m => a -> m a
return EncodingProfile
result'
#if defined(ENABLE_OVERLOADING)
#endif
foreign import ccall "gst_encoding_profile_from_discoverer" gst_encoding_profile_from_discoverer ::
Ptr GstPbutils.DiscovererInfo.DiscovererInfo ->
IO (Ptr EncodingProfile)
encodingProfileFromDiscoverer ::
(B.CallStack.HasCallStack, MonadIO m, GstPbutils.DiscovererInfo.IsDiscovererInfo a) =>
a
-> m EncodingProfile
encodingProfileFromDiscoverer :: a -> m EncodingProfile
encodingProfileFromDiscoverer info :: a
info = IO EncodingProfile -> m EncodingProfile
forall (m :: * -> *) a. MonadIO m => IO a -> m a
liftIO (IO EncodingProfile -> m EncodingProfile)
-> IO EncodingProfile -> m EncodingProfile
forall a b. (a -> b) -> a -> b
$ do
Ptr DiscovererInfo
info' <- a -> IO (Ptr DiscovererInfo)
forall a b. (HasCallStack, ManagedPtrNewtype a) => a -> IO (Ptr b)
unsafeManagedPtrCastPtr a
info
Ptr EncodingProfile
result <- Ptr DiscovererInfo -> IO (Ptr EncodingProfile)
gst_encoding_profile_from_discoverer Ptr DiscovererInfo
info'
Text -> Ptr EncodingProfile -> IO ()
forall a. HasCallStack => Text -> Ptr a -> IO ()
checkUnexpectedReturnNULL "encodingProfileFromDiscoverer" Ptr EncodingProfile
result
EncodingProfile
result' <- ((ManagedPtr EncodingProfile -> EncodingProfile)
-> Ptr EncodingProfile -> IO EncodingProfile
forall a b.
(HasCallStack, GObject a, GObject b) =>
(ManagedPtr a -> a) -> Ptr b -> IO a
wrapObject ManagedPtr EncodingProfile -> EncodingProfile
EncodingProfile) Ptr EncodingProfile
result
a -> IO ()
forall a. ManagedPtrNewtype a => a -> IO ()
touchManagedPtr a
info
EncodingProfile -> IO EncodingProfile
forall (m :: * -> *) a. Monad m => a -> m a
return EncodingProfile
result'
#if defined(ENABLE_OVERLOADING)
#endif