#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \
&& !defined(__HADDOCK_VERSION__))
module GI.GstPbutils.Objects.EncodingVideoProfile
(
EncodingVideoProfile(..) ,
IsEncodingVideoProfile ,
toEncodingVideoProfile ,
noEncodingVideoProfile ,
#if ENABLE_OVERLOADING
EncodingVideoProfileGetPassMethodInfo ,
#endif
encodingVideoProfileGetPass ,
#if ENABLE_OVERLOADING
EncodingVideoProfileGetVariableframerateMethodInfo,
#endif
encodingVideoProfileGetVariableframerate,
encodingVideoProfileNew ,
#if ENABLE_OVERLOADING
EncodingVideoProfileSetPassMethodInfo ,
#endif
encodingVideoProfileSetPass ,
#if ENABLE_OVERLOADING
EncodingVideoProfileSetVariableframerateMethodInfo,
#endif
encodingVideoProfileSetVariableframerate,
) 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.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.EncodingProfile as GstPbutils.EncodingProfile
newtype EncodingVideoProfile = EncodingVideoProfile (ManagedPtr EncodingVideoProfile)
foreign import ccall "gst_encoding_video_profile_get_type"
c_gst_encoding_video_profile_get_type :: IO GType
instance GObject EncodingVideoProfile where
gobjectType = c_gst_encoding_video_profile_get_type
class (GObject o, O.IsDescendantOf EncodingVideoProfile o) => IsEncodingVideoProfile o
instance (GObject o, O.IsDescendantOf EncodingVideoProfile o) => IsEncodingVideoProfile o
instance O.HasParentTypes EncodingVideoProfile
type instance O.ParentTypes EncodingVideoProfile = '[GstPbutils.EncodingProfile.EncodingProfile, GObject.Object.Object]
toEncodingVideoProfile :: (MonadIO m, IsEncodingVideoProfile o) => o -> m EncodingVideoProfile
toEncodingVideoProfile = liftIO . unsafeCastTo EncodingVideoProfile
noEncodingVideoProfile :: Maybe EncodingVideoProfile
noEncodingVideoProfile = Nothing
#if ENABLE_OVERLOADING
type family ResolveEncodingVideoProfileMethod (t :: Symbol) (o :: *) :: * where
ResolveEncodingVideoProfileMethod "bindProperty" o = GObject.Object.ObjectBindPropertyMethodInfo
ResolveEncodingVideoProfileMethod "bindPropertyFull" o = GObject.Object.ObjectBindPropertyFullMethodInfo
ResolveEncodingVideoProfileMethod "copy" o = GstPbutils.EncodingProfile.EncodingProfileCopyMethodInfo
ResolveEncodingVideoProfileMethod "forceFloating" o = GObject.Object.ObjectForceFloatingMethodInfo
ResolveEncodingVideoProfileMethod "freezeNotify" o = GObject.Object.ObjectFreezeNotifyMethodInfo
ResolveEncodingVideoProfileMethod "getv" o = GObject.Object.ObjectGetvMethodInfo
ResolveEncodingVideoProfileMethod "isEnabled" o = GstPbutils.EncodingProfile.EncodingProfileIsEnabledMethodInfo
ResolveEncodingVideoProfileMethod "isEqual" o = GstPbutils.EncodingProfile.EncodingProfileIsEqualMethodInfo
ResolveEncodingVideoProfileMethod "isFloating" o = GObject.Object.ObjectIsFloatingMethodInfo
ResolveEncodingVideoProfileMethod "notify" o = GObject.Object.ObjectNotifyMethodInfo
ResolveEncodingVideoProfileMethod "notifyByPspec" o = GObject.Object.ObjectNotifyByPspecMethodInfo
ResolveEncodingVideoProfileMethod "ref" o = GObject.Object.ObjectRefMethodInfo
ResolveEncodingVideoProfileMethod "refSink" o = GObject.Object.ObjectRefSinkMethodInfo
ResolveEncodingVideoProfileMethod "runDispose" o = GObject.Object.ObjectRunDisposeMethodInfo
ResolveEncodingVideoProfileMethod "stealData" o = GObject.Object.ObjectStealDataMethodInfo
ResolveEncodingVideoProfileMethod "stealQdata" o = GObject.Object.ObjectStealQdataMethodInfo
ResolveEncodingVideoProfileMethod "thawNotify" o = GObject.Object.ObjectThawNotifyMethodInfo
ResolveEncodingVideoProfileMethod "unref" o = GObject.Object.ObjectUnrefMethodInfo
ResolveEncodingVideoProfileMethod "watchClosure" o = GObject.Object.ObjectWatchClosureMethodInfo
ResolveEncodingVideoProfileMethod "getAllowDynamicOutput" o = GstPbutils.EncodingProfile.EncodingProfileGetAllowDynamicOutputMethodInfo
ResolveEncodingVideoProfileMethod "getData" o = GObject.Object.ObjectGetDataMethodInfo
ResolveEncodingVideoProfileMethod "getDescription" o = GstPbutils.EncodingProfile.EncodingProfileGetDescriptionMethodInfo
ResolveEncodingVideoProfileMethod "getFileExtension" o = GstPbutils.EncodingProfile.EncodingProfileGetFileExtensionMethodInfo
ResolveEncodingVideoProfileMethod "getFormat" o = GstPbutils.EncodingProfile.EncodingProfileGetFormatMethodInfo
ResolveEncodingVideoProfileMethod "getInputCaps" o = GstPbutils.EncodingProfile.EncodingProfileGetInputCapsMethodInfo
ResolveEncodingVideoProfileMethod "getName" o = GstPbutils.EncodingProfile.EncodingProfileGetNameMethodInfo
ResolveEncodingVideoProfileMethod "getPass" o = EncodingVideoProfileGetPassMethodInfo
ResolveEncodingVideoProfileMethod "getPresence" o = GstPbutils.EncodingProfile.EncodingProfileGetPresenceMethodInfo
ResolveEncodingVideoProfileMethod "getPreset" o = GstPbutils.EncodingProfile.EncodingProfileGetPresetMethodInfo
ResolveEncodingVideoProfileMethod "getPresetName" o = GstPbutils.EncodingProfile.EncodingProfileGetPresetNameMethodInfo
ResolveEncodingVideoProfileMethod "getProperty" o = GObject.Object.ObjectGetPropertyMethodInfo
ResolveEncodingVideoProfileMethod "getQdata" o = GObject.Object.ObjectGetQdataMethodInfo
ResolveEncodingVideoProfileMethod "getRestriction" o = GstPbutils.EncodingProfile.EncodingProfileGetRestrictionMethodInfo
ResolveEncodingVideoProfileMethod "getTypeNick" o = GstPbutils.EncodingProfile.EncodingProfileGetTypeNickMethodInfo
ResolveEncodingVideoProfileMethod "getVariableframerate" o = EncodingVideoProfileGetVariableframerateMethodInfo
ResolveEncodingVideoProfileMethod "setAllowDynamicOutput" o = GstPbutils.EncodingProfile.EncodingProfileSetAllowDynamicOutputMethodInfo
ResolveEncodingVideoProfileMethod "setData" o = GObject.Object.ObjectSetDataMethodInfo
ResolveEncodingVideoProfileMethod "setDescription" o = GstPbutils.EncodingProfile.EncodingProfileSetDescriptionMethodInfo
ResolveEncodingVideoProfileMethod "setEnabled" o = GstPbutils.EncodingProfile.EncodingProfileSetEnabledMethodInfo
ResolveEncodingVideoProfileMethod "setFormat" o = GstPbutils.EncodingProfile.EncodingProfileSetFormatMethodInfo
ResolveEncodingVideoProfileMethod "setName" o = GstPbutils.EncodingProfile.EncodingProfileSetNameMethodInfo
ResolveEncodingVideoProfileMethod "setPass" o = EncodingVideoProfileSetPassMethodInfo
ResolveEncodingVideoProfileMethod "setPresence" o = GstPbutils.EncodingProfile.EncodingProfileSetPresenceMethodInfo
ResolveEncodingVideoProfileMethod "setPreset" o = GstPbutils.EncodingProfile.EncodingProfileSetPresetMethodInfo
ResolveEncodingVideoProfileMethod "setPresetName" o = GstPbutils.EncodingProfile.EncodingProfileSetPresetNameMethodInfo
ResolveEncodingVideoProfileMethod "setProperty" o = GObject.Object.ObjectSetPropertyMethodInfo
ResolveEncodingVideoProfileMethod "setRestriction" o = GstPbutils.EncodingProfile.EncodingProfileSetRestrictionMethodInfo
ResolveEncodingVideoProfileMethod "setVariableframerate" o = EncodingVideoProfileSetVariableframerateMethodInfo
ResolveEncodingVideoProfileMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveEncodingVideoProfileMethod t EncodingVideoProfile, O.MethodInfo info EncodingVideoProfile p) => OL.IsLabel t (EncodingVideoProfile -> p) where
#if MIN_VERSION_base(4,10,0)
fromLabel = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#else
fromLabel _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)
#endif
#endif
#if ENABLE_OVERLOADING
instance O.HasAttributeList EncodingVideoProfile
type instance O.AttributeList EncodingVideoProfile = EncodingVideoProfileAttributeList
type EncodingVideoProfileAttributeList = ('[ '("restrictionCaps", GstPbutils.EncodingProfile.EncodingProfileRestrictionCapsPropertyInfo)] :: [(Symbol, *)])
#endif
#if ENABLE_OVERLOADING
#endif
#if ENABLE_OVERLOADING
type instance O.SignalList EncodingVideoProfile = EncodingVideoProfileSignalList
type EncodingVideoProfileSignalList = ('[ '("notify", GObject.Object.ObjectNotifySignalInfo)] :: [(Symbol, *)])
#endif
foreign import ccall "gst_encoding_video_profile_new" gst_encoding_video_profile_new ::
Ptr Gst.Caps.Caps ->
CString ->
Ptr Gst.Caps.Caps ->
Word32 ->
IO (Ptr EncodingVideoProfile)
encodingVideoProfileNew ::
(B.CallStack.HasCallStack, MonadIO m) =>
Gst.Caps.Caps
-> Maybe (T.Text)
-> Maybe (Gst.Caps.Caps)
-> Word32
-> m EncodingVideoProfile
encodingVideoProfileNew format preset restriction presence = liftIO $ do
format' <- unsafeManagedPtrGetPtr format
maybePreset <- case preset of
Nothing -> return nullPtr
Just jPreset -> do
jPreset' <- textToCString jPreset
return jPreset'
maybeRestriction <- case restriction of
Nothing -> return nullPtr
Just jRestriction -> do
jRestriction' <- unsafeManagedPtrGetPtr jRestriction
return jRestriction'
result <- gst_encoding_video_profile_new format' maybePreset maybeRestriction presence
checkUnexpectedReturnNULL "encodingVideoProfileNew" result
result' <- (wrapObject EncodingVideoProfile) result
touchManagedPtr format
whenJust restriction touchManagedPtr
freeMem maybePreset
return result'
#if ENABLE_OVERLOADING
#endif
foreign import ccall "gst_encoding_video_profile_get_pass" gst_encoding_video_profile_get_pass ::
Ptr EncodingVideoProfile ->
IO Word32
encodingVideoProfileGetPass ::
(B.CallStack.HasCallStack, MonadIO m, IsEncodingVideoProfile a) =>
a
-> m Word32
encodingVideoProfileGetPass prof = liftIO $ do
prof' <- unsafeManagedPtrCastPtr prof
result <- gst_encoding_video_profile_get_pass prof'
touchManagedPtr prof
return result
#if ENABLE_OVERLOADING
data EncodingVideoProfileGetPassMethodInfo
instance (signature ~ (m Word32), MonadIO m, IsEncodingVideoProfile a) => O.MethodInfo EncodingVideoProfileGetPassMethodInfo a signature where
overloadedMethod _ = encodingVideoProfileGetPass
#endif
foreign import ccall "gst_encoding_video_profile_get_variableframerate" gst_encoding_video_profile_get_variableframerate ::
Ptr EncodingVideoProfile ->
IO CInt
encodingVideoProfileGetVariableframerate ::
(B.CallStack.HasCallStack, MonadIO m, IsEncodingVideoProfile a) =>
a
-> m Bool
encodingVideoProfileGetVariableframerate prof = liftIO $ do
prof' <- unsafeManagedPtrCastPtr prof
result <- gst_encoding_video_profile_get_variableframerate prof'
let result' = (/= 0) result
touchManagedPtr prof
return result'
#if ENABLE_OVERLOADING
data EncodingVideoProfileGetVariableframerateMethodInfo
instance (signature ~ (m Bool), MonadIO m, IsEncodingVideoProfile a) => O.MethodInfo EncodingVideoProfileGetVariableframerateMethodInfo a signature where
overloadedMethod _ = encodingVideoProfileGetVariableframerate
#endif
foreign import ccall "gst_encoding_video_profile_set_pass" gst_encoding_video_profile_set_pass ::
Ptr EncodingVideoProfile ->
Word32 ->
IO ()
encodingVideoProfileSetPass ::
(B.CallStack.HasCallStack, MonadIO m, IsEncodingVideoProfile a) =>
a
-> Word32
-> m ()
encodingVideoProfileSetPass prof pass = liftIO $ do
prof' <- unsafeManagedPtrCastPtr prof
gst_encoding_video_profile_set_pass prof' pass
touchManagedPtr prof
return ()
#if ENABLE_OVERLOADING
data EncodingVideoProfileSetPassMethodInfo
instance (signature ~ (Word32 -> m ()), MonadIO m, IsEncodingVideoProfile a) => O.MethodInfo EncodingVideoProfileSetPassMethodInfo a signature where
overloadedMethod _ = encodingVideoProfileSetPass
#endif
foreign import ccall "gst_encoding_video_profile_set_variableframerate" gst_encoding_video_profile_set_variableframerate ::
Ptr EncodingVideoProfile ->
CInt ->
IO ()
encodingVideoProfileSetVariableframerate ::
(B.CallStack.HasCallStack, MonadIO m, IsEncodingVideoProfile a) =>
a
-> Bool
-> m ()
encodingVideoProfileSetVariableframerate prof variableframerate = liftIO $ do
prof' <- unsafeManagedPtrCastPtr prof
let variableframerate' = (fromIntegral . fromEnum) variableframerate
gst_encoding_video_profile_set_variableframerate prof' variableframerate'
touchManagedPtr prof
return ()
#if ENABLE_OVERLOADING
data EncodingVideoProfileSetVariableframerateMethodInfo
instance (signature ~ (Bool -> m ()), MonadIO m, IsEncodingVideoProfile a) => O.MethodInfo EncodingVideoProfileSetVariableframerateMethodInfo a signature where
overloadedMethod _ = encodingVideoProfileSetVariableframerate
#endif