gi-gstvideo-1.0.18: GI/GstVideo/Structs/VideoTimeCode.hs
{- |
Copyright : Will Thompson, Iñaki García Etxebarria and Jonas Platte
License : LGPL-2.1
Maintainer : Iñaki García Etxebarria (inaki@blueleaf.cc)
/@fieldCount@/ must be 0 for progressive video and 1 or 2 for interlaced.
A representation of a SMPTE time code.
/@hours@/ must be positive and less than 24. Will wrap around otherwise.
/@minutes@/ and /@seconds@/ must be positive and less than 60.
/@frames@/ must be less than or equal to /@config@/.fps_n \/ /@config@/.fps_d
These values are *NOT* automatically normalized.
/Since: 1.10/
-}
#define ENABLE_OVERLOADING (MIN_VERSION_haskell_gi_overloading(1,0,0) \
&& !defined(__HADDOCK_VERSION__))
module GI.GstVideo.Structs.VideoTimeCode
(
-- * Exported types
VideoTimeCode(..) ,
newZeroVideoTimeCode ,
noVideoTimeCode ,
-- * Methods
-- ** addFrames #method:addFrames#
#if ENABLE_OVERLOADING
VideoTimeCodeAddFramesMethodInfo ,
#endif
videoTimeCodeAddFrames ,
-- ** addInterval #method:addInterval#
#if ENABLE_OVERLOADING
VideoTimeCodeAddIntervalMethodInfo ,
#endif
videoTimeCodeAddInterval ,
-- ** clear #method:clear#
#if ENABLE_OVERLOADING
VideoTimeCodeClearMethodInfo ,
#endif
videoTimeCodeClear ,
-- ** compare #method:compare#
#if ENABLE_OVERLOADING
VideoTimeCodeCompareMethodInfo ,
#endif
videoTimeCodeCompare ,
-- ** copy #method:copy#
#if ENABLE_OVERLOADING
VideoTimeCodeCopyMethodInfo ,
#endif
videoTimeCodeCopy ,
-- ** framesSinceDailyJam #method:framesSinceDailyJam#
#if ENABLE_OVERLOADING
VideoTimeCodeFramesSinceDailyJamMethodInfo,
#endif
videoTimeCodeFramesSinceDailyJam ,
-- ** free #method:free#
#if ENABLE_OVERLOADING
VideoTimeCodeFreeMethodInfo ,
#endif
videoTimeCodeFree ,
-- ** incrementFrame #method:incrementFrame#
#if ENABLE_OVERLOADING
VideoTimeCodeIncrementFrameMethodInfo ,
#endif
videoTimeCodeIncrementFrame ,
-- ** init #method:init#
#if ENABLE_OVERLOADING
VideoTimeCodeInitMethodInfo ,
#endif
videoTimeCodeInit ,
-- ** initFromDateTime #method:initFromDateTime#
#if ENABLE_OVERLOADING
VideoTimeCodeInitFromDateTimeMethodInfo ,
#endif
videoTimeCodeInitFromDateTime ,
-- ** initFromDateTimeFull #method:initFromDateTimeFull#
#if ENABLE_OVERLOADING
VideoTimeCodeInitFromDateTimeFullMethodInfo,
#endif
videoTimeCodeInitFromDateTimeFull ,
-- ** isValid #method:isValid#
#if ENABLE_OVERLOADING
VideoTimeCodeIsValidMethodInfo ,
#endif
videoTimeCodeIsValid ,
-- ** new #method:new#
videoTimeCodeNew ,
-- ** newEmpty #method:newEmpty#
videoTimeCodeNewEmpty ,
-- ** newFromDateTime #method:newFromDateTime#
videoTimeCodeNewFromDateTime ,
-- ** newFromDateTimeFull #method:newFromDateTimeFull#
videoTimeCodeNewFromDateTimeFull ,
-- ** newFromString #method:newFromString#
videoTimeCodeNewFromString ,
-- ** nsecSinceDailyJam #method:nsecSinceDailyJam#
#if ENABLE_OVERLOADING
VideoTimeCodeNsecSinceDailyJamMethodInfo,
#endif
videoTimeCodeNsecSinceDailyJam ,
-- ** toDateTime #method:toDateTime#
#if ENABLE_OVERLOADING
VideoTimeCodeToDateTimeMethodInfo ,
#endif
videoTimeCodeToDateTime ,
-- ** toString #method:toString#
#if ENABLE_OVERLOADING
VideoTimeCodeToStringMethodInfo ,
#endif
videoTimeCodeToString ,
-- * Properties
-- ** config #attr:config#
{- | the corresponding 'GI.GstVideo.Structs.VideoTimeCodeConfig.VideoTimeCodeConfig'
-}
getVideoTimeCodeConfig ,
#if ENABLE_OVERLOADING
videoTimeCode_config ,
#endif
-- ** fieldCount #attr:fieldCount#
{- | Interlaced video field count
-}
getVideoTimeCodeFieldCount ,
setVideoTimeCodeFieldCount ,
#if ENABLE_OVERLOADING
videoTimeCode_fieldCount ,
#endif
-- ** frames #attr:frames#
{- | the frames field of 'GI.GstVideo.Structs.VideoTimeCode.VideoTimeCode'
-}
getVideoTimeCodeFrames ,
setVideoTimeCodeFrames ,
#if ENABLE_OVERLOADING
videoTimeCode_frames ,
#endif
-- ** hours #attr:hours#
{- | the hours field of 'GI.GstVideo.Structs.VideoTimeCode.VideoTimeCode'
-}
getVideoTimeCodeHours ,
setVideoTimeCodeHours ,
#if ENABLE_OVERLOADING
videoTimeCode_hours ,
#endif
-- ** minutes #attr:minutes#
{- | the minutes field of 'GI.GstVideo.Structs.VideoTimeCode.VideoTimeCode'
-}
getVideoTimeCodeMinutes ,
setVideoTimeCodeMinutes ,
#if ENABLE_OVERLOADING
videoTimeCode_minutes ,
#endif
-- ** seconds #attr:seconds#
{- | the seconds field of 'GI.GstVideo.Structs.VideoTimeCode.VideoTimeCode'
-}
getVideoTimeCodeSeconds ,
setVideoTimeCodeSeconds ,
#if ENABLE_OVERLOADING
videoTimeCode_seconds ,
#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.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.GLib.Structs.DateTime as GLib.DateTime
import {-# SOURCE #-} qualified GI.GstVideo.Flags as GstVideo.Flags
import {-# SOURCE #-} qualified GI.GstVideo.Structs.VideoTimeCodeConfig as GstVideo.VideoTimeCodeConfig
import {-# SOURCE #-} qualified GI.GstVideo.Structs.VideoTimeCodeInterval as GstVideo.VideoTimeCodeInterval
-- | Memory-managed wrapper type.
newtype VideoTimeCode = VideoTimeCode (ManagedPtr VideoTimeCode)
foreign import ccall "gst_video_time_code_get_type" c_gst_video_time_code_get_type ::
IO GType
instance BoxedObject VideoTimeCode where
boxedType _ = c_gst_video_time_code_get_type
-- | Construct a `VideoTimeCode` struct initialized to zero.
newZeroVideoTimeCode :: MonadIO m => m VideoTimeCode
newZeroVideoTimeCode = liftIO $ callocBoxedBytes 48 >>= wrapBoxed VideoTimeCode
instance tag ~ 'AttrSet => Constructible VideoTimeCode tag where
new _ attrs = do
o <- newZeroVideoTimeCode
GI.Attributes.set o attrs
return o
-- | A convenience alias for `Nothing` :: `Maybe` `VideoTimeCode`.
noVideoTimeCode :: Maybe VideoTimeCode
noVideoTimeCode = Nothing
{- |
Get the value of the “@config@” field.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
@
'Data.GI.Base.Attributes.get' videoTimeCode #config
@
-}
getVideoTimeCodeConfig :: MonadIO m => VideoTimeCode -> m GstVideo.VideoTimeCodeConfig.VideoTimeCodeConfig
getVideoTimeCodeConfig s = liftIO $ withManagedPtr s $ \ptr -> do
let val = ptr `plusPtr` 0 :: (Ptr GstVideo.VideoTimeCodeConfig.VideoTimeCodeConfig)
val' <- (newPtr GstVideo.VideoTimeCodeConfig.VideoTimeCodeConfig) val
return val'
#if ENABLE_OVERLOADING
data VideoTimeCodeConfigFieldInfo
instance AttrInfo VideoTimeCodeConfigFieldInfo where
type AttrAllowedOps VideoTimeCodeConfigFieldInfo = '[ 'AttrGet]
type AttrSetTypeConstraint VideoTimeCodeConfigFieldInfo = (~) (Ptr GstVideo.VideoTimeCodeConfig.VideoTimeCodeConfig)
type AttrBaseTypeConstraint VideoTimeCodeConfigFieldInfo = (~) VideoTimeCode
type AttrGetType VideoTimeCodeConfigFieldInfo = GstVideo.VideoTimeCodeConfig.VideoTimeCodeConfig
type AttrLabel VideoTimeCodeConfigFieldInfo = "config"
type AttrOrigin VideoTimeCodeConfigFieldInfo = VideoTimeCode
attrGet _ = getVideoTimeCodeConfig
attrSet _ = undefined
attrConstruct = undefined
attrClear _ = undefined
videoTimeCode_config :: AttrLabelProxy "config"
videoTimeCode_config = AttrLabelProxy
#endif
{- |
Get the value of the “@hours@” field.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
@
'Data.GI.Base.Attributes.get' videoTimeCode #hours
@
-}
getVideoTimeCodeHours :: MonadIO m => VideoTimeCode -> m Word32
getVideoTimeCodeHours s = liftIO $ withManagedPtr s $ \ptr -> do
val <- peek (ptr `plusPtr` 24) :: IO Word32
return val
{- |
Set the value of the “@hours@” field.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
@
'Data.GI.Base.Attributes.set' videoTimeCode [ #hours 'Data.GI.Base.Attributes.:=' value ]
@
-}
setVideoTimeCodeHours :: MonadIO m => VideoTimeCode -> Word32 -> m ()
setVideoTimeCodeHours s val = liftIO $ withManagedPtr s $ \ptr -> do
poke (ptr `plusPtr` 24) (val :: Word32)
#if ENABLE_OVERLOADING
data VideoTimeCodeHoursFieldInfo
instance AttrInfo VideoTimeCodeHoursFieldInfo where
type AttrAllowedOps VideoTimeCodeHoursFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint VideoTimeCodeHoursFieldInfo = (~) Word32
type AttrBaseTypeConstraint VideoTimeCodeHoursFieldInfo = (~) VideoTimeCode
type AttrGetType VideoTimeCodeHoursFieldInfo = Word32
type AttrLabel VideoTimeCodeHoursFieldInfo = "hours"
type AttrOrigin VideoTimeCodeHoursFieldInfo = VideoTimeCode
attrGet _ = getVideoTimeCodeHours
attrSet _ = setVideoTimeCodeHours
attrConstruct = undefined
attrClear _ = undefined
videoTimeCode_hours :: AttrLabelProxy "hours"
videoTimeCode_hours = AttrLabelProxy
#endif
{- |
Get the value of the “@minutes@” field.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
@
'Data.GI.Base.Attributes.get' videoTimeCode #minutes
@
-}
getVideoTimeCodeMinutes :: MonadIO m => VideoTimeCode -> m Word32
getVideoTimeCodeMinutes s = liftIO $ withManagedPtr s $ \ptr -> do
val <- peek (ptr `plusPtr` 28) :: IO Word32
return val
{- |
Set the value of the “@minutes@” field.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
@
'Data.GI.Base.Attributes.set' videoTimeCode [ #minutes 'Data.GI.Base.Attributes.:=' value ]
@
-}
setVideoTimeCodeMinutes :: MonadIO m => VideoTimeCode -> Word32 -> m ()
setVideoTimeCodeMinutes s val = liftIO $ withManagedPtr s $ \ptr -> do
poke (ptr `plusPtr` 28) (val :: Word32)
#if ENABLE_OVERLOADING
data VideoTimeCodeMinutesFieldInfo
instance AttrInfo VideoTimeCodeMinutesFieldInfo where
type AttrAllowedOps VideoTimeCodeMinutesFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint VideoTimeCodeMinutesFieldInfo = (~) Word32
type AttrBaseTypeConstraint VideoTimeCodeMinutesFieldInfo = (~) VideoTimeCode
type AttrGetType VideoTimeCodeMinutesFieldInfo = Word32
type AttrLabel VideoTimeCodeMinutesFieldInfo = "minutes"
type AttrOrigin VideoTimeCodeMinutesFieldInfo = VideoTimeCode
attrGet _ = getVideoTimeCodeMinutes
attrSet _ = setVideoTimeCodeMinutes
attrConstruct = undefined
attrClear _ = undefined
videoTimeCode_minutes :: AttrLabelProxy "minutes"
videoTimeCode_minutes = AttrLabelProxy
#endif
{- |
Get the value of the “@seconds@” field.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
@
'Data.GI.Base.Attributes.get' videoTimeCode #seconds
@
-}
getVideoTimeCodeSeconds :: MonadIO m => VideoTimeCode -> m Word32
getVideoTimeCodeSeconds s = liftIO $ withManagedPtr s $ \ptr -> do
val <- peek (ptr `plusPtr` 32) :: IO Word32
return val
{- |
Set the value of the “@seconds@” field.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
@
'Data.GI.Base.Attributes.set' videoTimeCode [ #seconds 'Data.GI.Base.Attributes.:=' value ]
@
-}
setVideoTimeCodeSeconds :: MonadIO m => VideoTimeCode -> Word32 -> m ()
setVideoTimeCodeSeconds s val = liftIO $ withManagedPtr s $ \ptr -> do
poke (ptr `plusPtr` 32) (val :: Word32)
#if ENABLE_OVERLOADING
data VideoTimeCodeSecondsFieldInfo
instance AttrInfo VideoTimeCodeSecondsFieldInfo where
type AttrAllowedOps VideoTimeCodeSecondsFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint VideoTimeCodeSecondsFieldInfo = (~) Word32
type AttrBaseTypeConstraint VideoTimeCodeSecondsFieldInfo = (~) VideoTimeCode
type AttrGetType VideoTimeCodeSecondsFieldInfo = Word32
type AttrLabel VideoTimeCodeSecondsFieldInfo = "seconds"
type AttrOrigin VideoTimeCodeSecondsFieldInfo = VideoTimeCode
attrGet _ = getVideoTimeCodeSeconds
attrSet _ = setVideoTimeCodeSeconds
attrConstruct = undefined
attrClear _ = undefined
videoTimeCode_seconds :: AttrLabelProxy "seconds"
videoTimeCode_seconds = AttrLabelProxy
#endif
{- |
Get the value of the “@frames@” field.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
@
'Data.GI.Base.Attributes.get' videoTimeCode #frames
@
-}
getVideoTimeCodeFrames :: MonadIO m => VideoTimeCode -> m Word32
getVideoTimeCodeFrames s = liftIO $ withManagedPtr s $ \ptr -> do
val <- peek (ptr `plusPtr` 36) :: IO Word32
return val
{- |
Set the value of the “@frames@” field.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
@
'Data.GI.Base.Attributes.set' videoTimeCode [ #frames 'Data.GI.Base.Attributes.:=' value ]
@
-}
setVideoTimeCodeFrames :: MonadIO m => VideoTimeCode -> Word32 -> m ()
setVideoTimeCodeFrames s val = liftIO $ withManagedPtr s $ \ptr -> do
poke (ptr `plusPtr` 36) (val :: Word32)
#if ENABLE_OVERLOADING
data VideoTimeCodeFramesFieldInfo
instance AttrInfo VideoTimeCodeFramesFieldInfo where
type AttrAllowedOps VideoTimeCodeFramesFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint VideoTimeCodeFramesFieldInfo = (~) Word32
type AttrBaseTypeConstraint VideoTimeCodeFramesFieldInfo = (~) VideoTimeCode
type AttrGetType VideoTimeCodeFramesFieldInfo = Word32
type AttrLabel VideoTimeCodeFramesFieldInfo = "frames"
type AttrOrigin VideoTimeCodeFramesFieldInfo = VideoTimeCode
attrGet _ = getVideoTimeCodeFrames
attrSet _ = setVideoTimeCodeFrames
attrConstruct = undefined
attrClear _ = undefined
videoTimeCode_frames :: AttrLabelProxy "frames"
videoTimeCode_frames = AttrLabelProxy
#endif
{- |
Get the value of the “@field_count@” field.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
@
'Data.GI.Base.Attributes.get' videoTimeCode #fieldCount
@
-}
getVideoTimeCodeFieldCount :: MonadIO m => VideoTimeCode -> m Word32
getVideoTimeCodeFieldCount s = liftIO $ withManagedPtr s $ \ptr -> do
val <- peek (ptr `plusPtr` 40) :: IO Word32
return val
{- |
Set the value of the “@field_count@” field.
When <https://github.com/haskell-gi/haskell-gi/wiki/Overloading overloading> is enabled, this is equivalent to
@
'Data.GI.Base.Attributes.set' videoTimeCode [ #fieldCount 'Data.GI.Base.Attributes.:=' value ]
@
-}
setVideoTimeCodeFieldCount :: MonadIO m => VideoTimeCode -> Word32 -> m ()
setVideoTimeCodeFieldCount s val = liftIO $ withManagedPtr s $ \ptr -> do
poke (ptr `plusPtr` 40) (val :: Word32)
#if ENABLE_OVERLOADING
data VideoTimeCodeFieldCountFieldInfo
instance AttrInfo VideoTimeCodeFieldCountFieldInfo where
type AttrAllowedOps VideoTimeCodeFieldCountFieldInfo = '[ 'AttrSet, 'AttrGet]
type AttrSetTypeConstraint VideoTimeCodeFieldCountFieldInfo = (~) Word32
type AttrBaseTypeConstraint VideoTimeCodeFieldCountFieldInfo = (~) VideoTimeCode
type AttrGetType VideoTimeCodeFieldCountFieldInfo = Word32
type AttrLabel VideoTimeCodeFieldCountFieldInfo = "field_count"
type AttrOrigin VideoTimeCodeFieldCountFieldInfo = VideoTimeCode
attrGet _ = getVideoTimeCodeFieldCount
attrSet _ = setVideoTimeCodeFieldCount
attrConstruct = undefined
attrClear _ = undefined
videoTimeCode_fieldCount :: AttrLabelProxy "fieldCount"
videoTimeCode_fieldCount = AttrLabelProxy
#endif
#if ENABLE_OVERLOADING
instance O.HasAttributeList VideoTimeCode
type instance O.AttributeList VideoTimeCode = VideoTimeCodeAttributeList
type VideoTimeCodeAttributeList = ('[ '("config", VideoTimeCodeConfigFieldInfo), '("hours", VideoTimeCodeHoursFieldInfo), '("minutes", VideoTimeCodeMinutesFieldInfo), '("seconds", VideoTimeCodeSecondsFieldInfo), '("frames", VideoTimeCodeFramesFieldInfo), '("fieldCount", VideoTimeCodeFieldCountFieldInfo)] :: [(Symbol, *)])
#endif
-- method VideoTimeCode::new
-- method type : Constructor
-- Args : [Arg {argCName = "fps_n", argType = TBasicType TUInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "Numerator of the frame rate", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "fps_d", argType = TBasicType TUInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "Denominator of the frame rate", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "latest_daily_jam", argType = TInterface (Name {namespace = "GLib", name = "DateTime"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The latest daily jam of the #GstVideoTimeCode", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "flags", argType = TInterface (Name {namespace = "GstVideo", name = "VideoTimeCodeFlags"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "#GstVideoTimeCodeFlags", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "hours", argType = TBasicType TUInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the hours field of #GstVideoTimeCode", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "minutes", argType = TBasicType TUInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the minutes field of #GstVideoTimeCode", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "seconds", argType = TBasicType TUInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the seconds field of #GstVideoTimeCode", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "frames", argType = TBasicType TUInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the frames field of #GstVideoTimeCode", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "field_count", argType = TBasicType TUInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "Interlaced video field count", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TInterface (Name {namespace = "GstVideo", name = "VideoTimeCode"}))
-- throws : False
-- Skip return : False
foreign import ccall "gst_video_time_code_new" gst_video_time_code_new ::
Word32 -> -- fps_n : TBasicType TUInt
Word32 -> -- fps_d : TBasicType TUInt
Ptr GLib.DateTime.DateTime -> -- latest_daily_jam : TInterface (Name {namespace = "GLib", name = "DateTime"})
CUInt -> -- flags : TInterface (Name {namespace = "GstVideo", name = "VideoTimeCodeFlags"})
Word32 -> -- hours : TBasicType TUInt
Word32 -> -- minutes : TBasicType TUInt
Word32 -> -- seconds : TBasicType TUInt
Word32 -> -- frames : TBasicType TUInt
Word32 -> -- field_count : TBasicType TUInt
IO (Ptr VideoTimeCode)
{- |
/@fieldCount@/ is 0 for progressive, 1 or 2 for interlaced.
/@latestDaiyJam@/ reference is stolen from caller.
/Since: 1.10/
-}
videoTimeCodeNew ::
(B.CallStack.HasCallStack, MonadIO m) =>
Word32
{- ^ /@fpsN@/: Numerator of the frame rate -}
-> Word32
{- ^ /@fpsD@/: Denominator of the frame rate -}
-> GLib.DateTime.DateTime
{- ^ /@latestDailyJam@/: The latest daily jam of the 'GI.GstVideo.Structs.VideoTimeCode.VideoTimeCode' -}
-> [GstVideo.Flags.VideoTimeCodeFlags]
{- ^ /@flags@/: 'GI.GstVideo.Flags.VideoTimeCodeFlags' -}
-> Word32
{- ^ /@hours@/: the hours field of 'GI.GstVideo.Structs.VideoTimeCode.VideoTimeCode' -}
-> Word32
{- ^ /@minutes@/: the minutes field of 'GI.GstVideo.Structs.VideoTimeCode.VideoTimeCode' -}
-> Word32
{- ^ /@seconds@/: the seconds field of 'GI.GstVideo.Structs.VideoTimeCode.VideoTimeCode' -}
-> Word32
{- ^ /@frames@/: the frames field of 'GI.GstVideo.Structs.VideoTimeCode.VideoTimeCode' -}
-> Word32
{- ^ /@fieldCount@/: Interlaced video field count -}
-> m VideoTimeCode
{- ^ __Returns:__ a new 'GI.GstVideo.Structs.VideoTimeCode.VideoTimeCode' with the given values.
The values are not checked for being in a valid range. To see if your
timecode actually has valid content, use 'GI.GstVideo.Structs.VideoTimeCode.videoTimeCodeIsValid'. -}
videoTimeCodeNew fpsN fpsD latestDailyJam flags hours minutes seconds frames fieldCount = liftIO $ do
latestDailyJam' <- unsafeManagedPtrGetPtr latestDailyJam
let flags' = gflagsToWord flags
result <- gst_video_time_code_new fpsN fpsD latestDailyJam' flags' hours minutes seconds frames fieldCount
checkUnexpectedReturnNULL "videoTimeCodeNew" result
result' <- (wrapBoxed VideoTimeCode) result
touchManagedPtr latestDailyJam
return result'
#if ENABLE_OVERLOADING
#endif
-- method VideoTimeCode::new_empty
-- method type : Constructor
-- Args : []
-- Lengths : []
-- returnType : Just (TInterface (Name {namespace = "GstVideo", name = "VideoTimeCode"}))
-- throws : False
-- Skip return : False
foreign import ccall "gst_video_time_code_new_empty" gst_video_time_code_new_empty ::
IO (Ptr VideoTimeCode)
{- |
/No description available in the introspection data./
/Since: 1.10/
-}
videoTimeCodeNewEmpty ::
(B.CallStack.HasCallStack, MonadIO m) =>
m VideoTimeCode
{- ^ __Returns:__ a new empty, invalid 'GI.GstVideo.Structs.VideoTimeCode.VideoTimeCode' -}
videoTimeCodeNewEmpty = liftIO $ do
result <- gst_video_time_code_new_empty
checkUnexpectedReturnNULL "videoTimeCodeNewEmpty" result
result' <- (wrapBoxed VideoTimeCode) result
return result'
#if ENABLE_OVERLOADING
#endif
-- method VideoTimeCode::new_from_date_time
-- method type : Constructor
-- Args : [Arg {argCName = "fps_n", argType = TBasicType TUInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "Numerator of the frame rate", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "fps_d", argType = TBasicType TUInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "Denominator of the frame rate", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "dt", argType = TInterface (Name {namespace = "GLib", name = "DateTime"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "#GDateTime to convert", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "flags", argType = TInterface (Name {namespace = "GstVideo", name = "VideoTimeCodeFlags"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "#GstVideoTimeCodeFlags", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "field_count", argType = TBasicType TUInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "Interlaced video field count", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TInterface (Name {namespace = "GstVideo", name = "VideoTimeCode"}))
-- throws : False
-- Skip return : False
foreign import ccall "gst_video_time_code_new_from_date_time" gst_video_time_code_new_from_date_time ::
Word32 -> -- fps_n : TBasicType TUInt
Word32 -> -- fps_d : TBasicType TUInt
Ptr GLib.DateTime.DateTime -> -- dt : TInterface (Name {namespace = "GLib", name = "DateTime"})
CUInt -> -- flags : TInterface (Name {namespace = "GstVideo", name = "VideoTimeCodeFlags"})
Word32 -> -- field_count : TBasicType TUInt
IO (Ptr VideoTimeCode)
{- |
The resulting config->latest_daily_jam is set to
midnight, and timecode is set to the given time.
This might return a completely invalid timecode, use
'GI.GstVideo.Structs.VideoTimeCode.videoTimeCodeNewFromDateTimeFull' to ensure
that you would get 'Nothing' instead in that case.
/Since: 1.12/
-}
videoTimeCodeNewFromDateTime ::
(B.CallStack.HasCallStack, MonadIO m) =>
Word32
{- ^ /@fpsN@/: Numerator of the frame rate -}
-> Word32
{- ^ /@fpsD@/: Denominator of the frame rate -}
-> GLib.DateTime.DateTime
{- ^ /@dt@/: 'GI.GLib.Structs.DateTime.DateTime' to convert -}
-> [GstVideo.Flags.VideoTimeCodeFlags]
{- ^ /@flags@/: 'GI.GstVideo.Flags.VideoTimeCodeFlags' -}
-> Word32
{- ^ /@fieldCount@/: Interlaced video field count -}
-> m VideoTimeCode
{- ^ __Returns:__ the 'GI.GstVideo.Structs.VideoTimeCode.VideoTimeCode' representation of /@dt@/. -}
videoTimeCodeNewFromDateTime fpsN fpsD dt flags fieldCount = liftIO $ do
dt' <- unsafeManagedPtrGetPtr dt
let flags' = gflagsToWord flags
result <- gst_video_time_code_new_from_date_time fpsN fpsD dt' flags' fieldCount
checkUnexpectedReturnNULL "videoTimeCodeNewFromDateTime" result
result' <- (wrapBoxed VideoTimeCode) result
touchManagedPtr dt
return result'
#if ENABLE_OVERLOADING
#endif
-- method VideoTimeCode::new_from_date_time_full
-- method type : Constructor
-- Args : [Arg {argCName = "fps_n", argType = TBasicType TUInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "Numerator of the frame rate", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "fps_d", argType = TBasicType TUInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "Denominator of the frame rate", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "dt", argType = TInterface (Name {namespace = "GLib", name = "DateTime"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "#GDateTime to convert", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "flags", argType = TInterface (Name {namespace = "GstVideo", name = "VideoTimeCodeFlags"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "#GstVideoTimeCodeFlags", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "field_count", argType = TBasicType TUInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "Interlaced video field count", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TInterface (Name {namespace = "GstVideo", name = "VideoTimeCode"}))
-- throws : False
-- Skip return : False
foreign import ccall "gst_video_time_code_new_from_date_time_full" gst_video_time_code_new_from_date_time_full ::
Word32 -> -- fps_n : TBasicType TUInt
Word32 -> -- fps_d : TBasicType TUInt
Ptr GLib.DateTime.DateTime -> -- dt : TInterface (Name {namespace = "GLib", name = "DateTime"})
CUInt -> -- flags : TInterface (Name {namespace = "GstVideo", name = "VideoTimeCodeFlags"})
Word32 -> -- field_count : TBasicType TUInt
IO (Ptr VideoTimeCode)
{- |
The resulting config->latest_daily_jam is set to
midnight, and timecode is set to the given time.
/Since: 1.16/
-}
videoTimeCodeNewFromDateTimeFull ::
(B.CallStack.HasCallStack, MonadIO m) =>
Word32
{- ^ /@fpsN@/: Numerator of the frame rate -}
-> Word32
{- ^ /@fpsD@/: Denominator of the frame rate -}
-> GLib.DateTime.DateTime
{- ^ /@dt@/: 'GI.GLib.Structs.DateTime.DateTime' to convert -}
-> [GstVideo.Flags.VideoTimeCodeFlags]
{- ^ /@flags@/: 'GI.GstVideo.Flags.VideoTimeCodeFlags' -}
-> Word32
{- ^ /@fieldCount@/: Interlaced video field count -}
-> m VideoTimeCode
{- ^ __Returns:__ the 'GI.GstVideo.Structs.VideoTimeCode.VideoTimeCode' representation of /@dt@/, or 'Nothing' if
no valid timecode could be created. -}
videoTimeCodeNewFromDateTimeFull fpsN fpsD dt flags fieldCount = liftIO $ do
dt' <- unsafeManagedPtrGetPtr dt
let flags' = gflagsToWord flags
result <- gst_video_time_code_new_from_date_time_full fpsN fpsD dt' flags' fieldCount
checkUnexpectedReturnNULL "videoTimeCodeNewFromDateTimeFull" result
result' <- (wrapBoxed VideoTimeCode) result
touchManagedPtr dt
return result'
#if ENABLE_OVERLOADING
#endif
-- method VideoTimeCode::new_from_string
-- method type : Constructor
-- Args : [Arg {argCName = "tc_str", argType = TBasicType TUTF8, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The string that represents the #GstVideoTimeCode", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TInterface (Name {namespace = "GstVideo", name = "VideoTimeCode"}))
-- throws : False
-- Skip return : False
foreign import ccall "gst_video_time_code_new_from_string" gst_video_time_code_new_from_string ::
CString -> -- tc_str : TBasicType TUTF8
IO (Ptr VideoTimeCode)
{- |
/No description available in the introspection data./
/Since: 1.12/
-}
videoTimeCodeNewFromString ::
(B.CallStack.HasCallStack, MonadIO m) =>
T.Text
{- ^ /@tcStr@/: The string that represents the 'GI.GstVideo.Structs.VideoTimeCode.VideoTimeCode' -}
-> m (Maybe VideoTimeCode)
{- ^ __Returns:__ a new 'GI.GstVideo.Structs.VideoTimeCode.VideoTimeCode' from the given string or 'Nothing'
if the string could not be passed. -}
videoTimeCodeNewFromString tcStr = liftIO $ do
tcStr' <- textToCString tcStr
result <- gst_video_time_code_new_from_string tcStr'
maybeResult <- convertIfNonNull result $ \result' -> do
result'' <- (wrapBoxed VideoTimeCode) result'
return result''
freeMem tcStr'
return maybeResult
#if ENABLE_OVERLOADING
#endif
-- method VideoTimeCode::add_frames
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "tc", argType = TInterface (Name {namespace = "GstVideo", name = "VideoTimeCode"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a valid #GstVideoTimeCode", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "frames", argType = TBasicType TInt64, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "How many frames to add or subtract", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False
foreign import ccall "gst_video_time_code_add_frames" gst_video_time_code_add_frames ::
Ptr VideoTimeCode -> -- tc : TInterface (Name {namespace = "GstVideo", name = "VideoTimeCode"})
Int64 -> -- frames : TBasicType TInt64
IO ()
{- |
Adds or subtracts /@frames@/ amount of frames to /@tc@/. tc needs to
contain valid data, as verified by 'GI.GstVideo.Structs.VideoTimeCode.videoTimeCodeIsValid'.
/Since: 1.10/
-}
videoTimeCodeAddFrames ::
(B.CallStack.HasCallStack, MonadIO m) =>
VideoTimeCode
{- ^ /@tc@/: a valid 'GI.GstVideo.Structs.VideoTimeCode.VideoTimeCode' -}
-> Int64
{- ^ /@frames@/: How many frames to add or subtract -}
-> m ()
videoTimeCodeAddFrames tc frames = liftIO $ do
tc' <- unsafeManagedPtrGetPtr tc
gst_video_time_code_add_frames tc' frames
touchManagedPtr tc
return ()
#if ENABLE_OVERLOADING
data VideoTimeCodeAddFramesMethodInfo
instance (signature ~ (Int64 -> m ()), MonadIO m) => O.MethodInfo VideoTimeCodeAddFramesMethodInfo VideoTimeCode signature where
overloadedMethod _ = videoTimeCodeAddFrames
#endif
-- method VideoTimeCode::add_interval
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "tc", argType = TInterface (Name {namespace = "GstVideo", name = "VideoTimeCode"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The #GstVideoTimeCode where the diff should be added. This\nmust contain valid timecode values.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "tc_inter", argType = TInterface (Name {namespace = "GstVideo", name = "VideoTimeCodeInterval"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The #GstVideoTimeCodeInterval to add to @tc.\nThe interval must contain valid values, except that for drop-frame\ntimecode, it may also contain timecodes which would normally\nbe dropped. These are then corrected to the next reasonable timecode.", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TInterface (Name {namespace = "GstVideo", name = "VideoTimeCode"}))
-- throws : False
-- Skip return : False
foreign import ccall "gst_video_time_code_add_interval" gst_video_time_code_add_interval ::
Ptr VideoTimeCode -> -- tc : TInterface (Name {namespace = "GstVideo", name = "VideoTimeCode"})
Ptr GstVideo.VideoTimeCodeInterval.VideoTimeCodeInterval -> -- tc_inter : TInterface (Name {namespace = "GstVideo", name = "VideoTimeCodeInterval"})
IO (Ptr VideoTimeCode)
{- |
This makes a component-wise addition of /@tcInter@/ to /@tc@/. For example,
adding (\"01:02:03:04\", \"00:01:00:00\") will return \"01:03:03:04\".
When it comes to drop-frame timecodes,
adding (\"00:00:00;00\", \"00:01:00:00\") will return \"00:01:00;02\"
because of drop-frame oddities. However,
adding (\"00:09:00;02\", \"00:01:00:00\") will return \"00:10:00;00\"
because this time we can have an exact minute.
/Since: 1.12/
-}
videoTimeCodeAddInterval ::
(B.CallStack.HasCallStack, MonadIO m) =>
VideoTimeCode
{- ^ /@tc@/: The 'GI.GstVideo.Structs.VideoTimeCode.VideoTimeCode' where the diff should be added. This
must contain valid timecode values. -}
-> GstVideo.VideoTimeCodeInterval.VideoTimeCodeInterval
{- ^ /@tcInter@/: The 'GI.GstVideo.Structs.VideoTimeCodeInterval.VideoTimeCodeInterval' to add to /@tc@/.
The interval must contain valid values, except that for drop-frame
timecode, it may also contain timecodes which would normally
be dropped. These are then corrected to the next reasonable timecode. -}
-> m (Maybe VideoTimeCode)
{- ^ __Returns:__ A new 'GI.GstVideo.Structs.VideoTimeCode.VideoTimeCode' with /@tcInter@/ added or 'Nothing'
if the interval can\'t be added. -}
videoTimeCodeAddInterval tc tcInter = liftIO $ do
tc' <- unsafeManagedPtrGetPtr tc
tcInter' <- unsafeManagedPtrGetPtr tcInter
result <- gst_video_time_code_add_interval tc' tcInter'
maybeResult <- convertIfNonNull result $ \result' -> do
result'' <- (wrapBoxed VideoTimeCode) result'
return result''
touchManagedPtr tc
touchManagedPtr tcInter
return maybeResult
#if ENABLE_OVERLOADING
data VideoTimeCodeAddIntervalMethodInfo
instance (signature ~ (GstVideo.VideoTimeCodeInterval.VideoTimeCodeInterval -> m (Maybe VideoTimeCode)), MonadIO m) => O.MethodInfo VideoTimeCodeAddIntervalMethodInfo VideoTimeCode signature where
overloadedMethod _ = videoTimeCodeAddInterval
#endif
-- method VideoTimeCode::clear
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "tc", argType = TInterface (Name {namespace = "GstVideo", name = "VideoTimeCode"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GstVideoTimeCode", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False
foreign import ccall "gst_video_time_code_clear" gst_video_time_code_clear ::
Ptr VideoTimeCode -> -- tc : TInterface (Name {namespace = "GstVideo", name = "VideoTimeCode"})
IO ()
{- |
Initializes /@tc@/ with empty\/zero\/NULL values and frees any memory
it might currently use.
/Since: 1.10/
-}
videoTimeCodeClear ::
(B.CallStack.HasCallStack, MonadIO m) =>
VideoTimeCode
{- ^ /@tc@/: a 'GI.GstVideo.Structs.VideoTimeCode.VideoTimeCode' -}
-> m ()
videoTimeCodeClear tc = liftIO $ do
tc' <- unsafeManagedPtrGetPtr tc
gst_video_time_code_clear tc'
touchManagedPtr tc
return ()
#if ENABLE_OVERLOADING
data VideoTimeCodeClearMethodInfo
instance (signature ~ (m ()), MonadIO m) => O.MethodInfo VideoTimeCodeClearMethodInfo VideoTimeCode signature where
overloadedMethod _ = videoTimeCodeClear
#endif
-- method VideoTimeCode::compare
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "tc1", argType = TInterface (Name {namespace = "GstVideo", name = "VideoTimeCode"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a valid #GstVideoTimeCode", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "tc2", argType = TInterface (Name {namespace = "GstVideo", name = "VideoTimeCode"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "another valid #GstVideoTimeCode", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TBasicType TInt)
-- throws : False
-- Skip return : False
foreign import ccall "gst_video_time_code_compare" gst_video_time_code_compare ::
Ptr VideoTimeCode -> -- tc1 : TInterface (Name {namespace = "GstVideo", name = "VideoTimeCode"})
Ptr VideoTimeCode -> -- tc2 : TInterface (Name {namespace = "GstVideo", name = "VideoTimeCode"})
IO Int32
{- |
Compares /@tc1@/ and /@tc2@/. If both have latest daily jam information, it is
taken into account. Otherwise, it is assumed that the daily jam of both
/@tc1@/ and /@tc2@/ was at the same time. Both time codes must be valid.
/Since: 1.10/
-}
videoTimeCodeCompare ::
(B.CallStack.HasCallStack, MonadIO m) =>
VideoTimeCode
{- ^ /@tc1@/: a valid 'GI.GstVideo.Structs.VideoTimeCode.VideoTimeCode' -}
-> VideoTimeCode
{- ^ /@tc2@/: another valid 'GI.GstVideo.Structs.VideoTimeCode.VideoTimeCode' -}
-> m Int32
{- ^ __Returns:__ 1 if /@tc1@/ is after /@tc2@/, -1 if /@tc1@/ is before /@tc2@/, 0 otherwise. -}
videoTimeCodeCompare tc1 tc2 = liftIO $ do
tc1' <- unsafeManagedPtrGetPtr tc1
tc2' <- unsafeManagedPtrGetPtr tc2
result <- gst_video_time_code_compare tc1' tc2'
touchManagedPtr tc1
touchManagedPtr tc2
return result
#if ENABLE_OVERLOADING
data VideoTimeCodeCompareMethodInfo
instance (signature ~ (VideoTimeCode -> m Int32), MonadIO m) => O.MethodInfo VideoTimeCodeCompareMethodInfo VideoTimeCode signature where
overloadedMethod _ = videoTimeCodeCompare
#endif
-- method VideoTimeCode::copy
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "tc", argType = TInterface (Name {namespace = "GstVideo", name = "VideoTimeCode"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GstVideoTimeCode", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TInterface (Name {namespace = "GstVideo", name = "VideoTimeCode"}))
-- throws : False
-- Skip return : False
foreign import ccall "gst_video_time_code_copy" gst_video_time_code_copy ::
Ptr VideoTimeCode -> -- tc : TInterface (Name {namespace = "GstVideo", name = "VideoTimeCode"})
IO (Ptr VideoTimeCode)
{- |
/No description available in the introspection data./
/Since: 1.10/
-}
videoTimeCodeCopy ::
(B.CallStack.HasCallStack, MonadIO m) =>
VideoTimeCode
{- ^ /@tc@/: a 'GI.GstVideo.Structs.VideoTimeCode.VideoTimeCode' -}
-> m VideoTimeCode
{- ^ __Returns:__ a new 'GI.GstVideo.Structs.VideoTimeCode.VideoTimeCode' with the same values as /@tc@/. -}
videoTimeCodeCopy tc = liftIO $ do
tc' <- unsafeManagedPtrGetPtr tc
result <- gst_video_time_code_copy tc'
checkUnexpectedReturnNULL "videoTimeCodeCopy" result
result' <- (wrapBoxed VideoTimeCode) result
touchManagedPtr tc
return result'
#if ENABLE_OVERLOADING
data VideoTimeCodeCopyMethodInfo
instance (signature ~ (m VideoTimeCode), MonadIO m) => O.MethodInfo VideoTimeCodeCopyMethodInfo VideoTimeCode signature where
overloadedMethod _ = videoTimeCodeCopy
#endif
-- method VideoTimeCode::frames_since_daily_jam
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "tc", argType = TInterface (Name {namespace = "GstVideo", name = "VideoTimeCode"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a valid #GstVideoTimeCode", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TBasicType TUInt64)
-- throws : False
-- Skip return : False
foreign import ccall "gst_video_time_code_frames_since_daily_jam" gst_video_time_code_frames_since_daily_jam ::
Ptr VideoTimeCode -> -- tc : TInterface (Name {namespace = "GstVideo", name = "VideoTimeCode"})
IO Word64
{- |
/No description available in the introspection data./
/Since: 1.10/
-}
videoTimeCodeFramesSinceDailyJam ::
(B.CallStack.HasCallStack, MonadIO m) =>
VideoTimeCode
{- ^ /@tc@/: a valid 'GI.GstVideo.Structs.VideoTimeCode.VideoTimeCode' -}
-> m Word64
{- ^ __Returns:__ how many frames have passed since the daily jam of /@tc@/. -}
videoTimeCodeFramesSinceDailyJam tc = liftIO $ do
tc' <- unsafeManagedPtrGetPtr tc
result <- gst_video_time_code_frames_since_daily_jam tc'
touchManagedPtr tc
return result
#if ENABLE_OVERLOADING
data VideoTimeCodeFramesSinceDailyJamMethodInfo
instance (signature ~ (m Word64), MonadIO m) => O.MethodInfo VideoTimeCodeFramesSinceDailyJamMethodInfo VideoTimeCode signature where
overloadedMethod _ = videoTimeCodeFramesSinceDailyJam
#endif
-- method VideoTimeCode::free
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "tc", argType = TInterface (Name {namespace = "GstVideo", name = "VideoTimeCode"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GstVideoTimeCode", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False
foreign import ccall "gst_video_time_code_free" gst_video_time_code_free ::
Ptr VideoTimeCode -> -- tc : TInterface (Name {namespace = "GstVideo", name = "VideoTimeCode"})
IO ()
{- |
Frees /@tc@/.
/Since: 1.10/
-}
videoTimeCodeFree ::
(B.CallStack.HasCallStack, MonadIO m) =>
VideoTimeCode
{- ^ /@tc@/: a 'GI.GstVideo.Structs.VideoTimeCode.VideoTimeCode' -}
-> m ()
videoTimeCodeFree tc = liftIO $ do
tc' <- unsafeManagedPtrGetPtr tc
gst_video_time_code_free tc'
touchManagedPtr tc
return ()
#if ENABLE_OVERLOADING
data VideoTimeCodeFreeMethodInfo
instance (signature ~ (m ()), MonadIO m) => O.MethodInfo VideoTimeCodeFreeMethodInfo VideoTimeCode signature where
overloadedMethod _ = videoTimeCodeFree
#endif
-- method VideoTimeCode::increment_frame
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "tc", argType = TInterface (Name {namespace = "GstVideo", name = "VideoTimeCode"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a valid #GstVideoTimeCode", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False
foreign import ccall "gst_video_time_code_increment_frame" gst_video_time_code_increment_frame ::
Ptr VideoTimeCode -> -- tc : TInterface (Name {namespace = "GstVideo", name = "VideoTimeCode"})
IO ()
{- |
Adds one frame to /@tc@/.
/Since: 1.10/
-}
videoTimeCodeIncrementFrame ::
(B.CallStack.HasCallStack, MonadIO m) =>
VideoTimeCode
{- ^ /@tc@/: a valid 'GI.GstVideo.Structs.VideoTimeCode.VideoTimeCode' -}
-> m ()
videoTimeCodeIncrementFrame tc = liftIO $ do
tc' <- unsafeManagedPtrGetPtr tc
gst_video_time_code_increment_frame tc'
touchManagedPtr tc
return ()
#if ENABLE_OVERLOADING
data VideoTimeCodeIncrementFrameMethodInfo
instance (signature ~ (m ()), MonadIO m) => O.MethodInfo VideoTimeCodeIncrementFrameMethodInfo VideoTimeCode signature where
overloadedMethod _ = videoTimeCodeIncrementFrame
#endif
-- method VideoTimeCode::init
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "tc", argType = TInterface (Name {namespace = "GstVideo", name = "VideoTimeCode"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GstVideoTimeCode", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "fps_n", argType = TBasicType TUInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "Numerator of the frame rate", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "fps_d", argType = TBasicType TUInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "Denominator of the frame rate", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "latest_daily_jam", argType = TInterface (Name {namespace = "GLib", name = "DateTime"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "The latest daily jam of the #GstVideoTimeCode", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "flags", argType = TInterface (Name {namespace = "GstVideo", name = "VideoTimeCodeFlags"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "#GstVideoTimeCodeFlags", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "hours", argType = TBasicType TUInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the hours field of #GstVideoTimeCode", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "minutes", argType = TBasicType TUInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the minutes field of #GstVideoTimeCode", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "seconds", argType = TBasicType TUInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the seconds field of #GstVideoTimeCode", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "frames", argType = TBasicType TUInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "the frames field of #GstVideoTimeCode", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "field_count", argType = TBasicType TUInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "Interlaced video field count", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False
foreign import ccall "gst_video_time_code_init" gst_video_time_code_init ::
Ptr VideoTimeCode -> -- tc : TInterface (Name {namespace = "GstVideo", name = "VideoTimeCode"})
Word32 -> -- fps_n : TBasicType TUInt
Word32 -> -- fps_d : TBasicType TUInt
Ptr GLib.DateTime.DateTime -> -- latest_daily_jam : TInterface (Name {namespace = "GLib", name = "DateTime"})
CUInt -> -- flags : TInterface (Name {namespace = "GstVideo", name = "VideoTimeCodeFlags"})
Word32 -> -- hours : TBasicType TUInt
Word32 -> -- minutes : TBasicType TUInt
Word32 -> -- seconds : TBasicType TUInt
Word32 -> -- frames : TBasicType TUInt
Word32 -> -- field_count : TBasicType TUInt
IO ()
{- |
/@fieldCount@/ is 0 for progressive, 1 or 2 for interlaced.
/@latestDaiyJam@/ reference is stolen from caller.
Initializes /@tc@/ with the given values.
The values are not checked for being in a valid range. To see if your
timecode actually has valid content, use 'GI.GstVideo.Structs.VideoTimeCode.videoTimeCodeIsValid'.
/Since: 1.10/
-}
videoTimeCodeInit ::
(B.CallStack.HasCallStack, MonadIO m) =>
VideoTimeCode
{- ^ /@tc@/: a 'GI.GstVideo.Structs.VideoTimeCode.VideoTimeCode' -}
-> Word32
{- ^ /@fpsN@/: Numerator of the frame rate -}
-> Word32
{- ^ /@fpsD@/: Denominator of the frame rate -}
-> GLib.DateTime.DateTime
{- ^ /@latestDailyJam@/: The latest daily jam of the 'GI.GstVideo.Structs.VideoTimeCode.VideoTimeCode' -}
-> [GstVideo.Flags.VideoTimeCodeFlags]
{- ^ /@flags@/: 'GI.GstVideo.Flags.VideoTimeCodeFlags' -}
-> Word32
{- ^ /@hours@/: the hours field of 'GI.GstVideo.Structs.VideoTimeCode.VideoTimeCode' -}
-> Word32
{- ^ /@minutes@/: the minutes field of 'GI.GstVideo.Structs.VideoTimeCode.VideoTimeCode' -}
-> Word32
{- ^ /@seconds@/: the seconds field of 'GI.GstVideo.Structs.VideoTimeCode.VideoTimeCode' -}
-> Word32
{- ^ /@frames@/: the frames field of 'GI.GstVideo.Structs.VideoTimeCode.VideoTimeCode' -}
-> Word32
{- ^ /@fieldCount@/: Interlaced video field count -}
-> m ()
videoTimeCodeInit tc fpsN fpsD latestDailyJam flags hours minutes seconds frames fieldCount = liftIO $ do
tc' <- unsafeManagedPtrGetPtr tc
latestDailyJam' <- unsafeManagedPtrGetPtr latestDailyJam
let flags' = gflagsToWord flags
gst_video_time_code_init tc' fpsN fpsD latestDailyJam' flags' hours minutes seconds frames fieldCount
touchManagedPtr tc
touchManagedPtr latestDailyJam
return ()
#if ENABLE_OVERLOADING
data VideoTimeCodeInitMethodInfo
instance (signature ~ (Word32 -> Word32 -> GLib.DateTime.DateTime -> [GstVideo.Flags.VideoTimeCodeFlags] -> Word32 -> Word32 -> Word32 -> Word32 -> Word32 -> m ()), MonadIO m) => O.MethodInfo VideoTimeCodeInitMethodInfo VideoTimeCode signature where
overloadedMethod _ = videoTimeCodeInit
#endif
-- method VideoTimeCode::init_from_date_time
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "tc", argType = TInterface (Name {namespace = "GstVideo", name = "VideoTimeCode"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "an uninitialized #GstVideoTimeCode", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "fps_n", argType = TBasicType TUInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "Numerator of the frame rate", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "fps_d", argType = TBasicType TUInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "Denominator of the frame rate", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "dt", argType = TInterface (Name {namespace = "GLib", name = "DateTime"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "#GDateTime to convert", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "flags", argType = TInterface (Name {namespace = "GstVideo", name = "VideoTimeCodeFlags"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "#GstVideoTimeCodeFlags", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "field_count", argType = TBasicType TUInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "Interlaced video field count", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Nothing
-- throws : False
-- Skip return : False
foreign import ccall "gst_video_time_code_init_from_date_time" gst_video_time_code_init_from_date_time ::
Ptr VideoTimeCode -> -- tc : TInterface (Name {namespace = "GstVideo", name = "VideoTimeCode"})
Word32 -> -- fps_n : TBasicType TUInt
Word32 -> -- fps_d : TBasicType TUInt
Ptr GLib.DateTime.DateTime -> -- dt : TInterface (Name {namespace = "GLib", name = "DateTime"})
CUInt -> -- flags : TInterface (Name {namespace = "GstVideo", name = "VideoTimeCodeFlags"})
Word32 -> -- field_count : TBasicType TUInt
IO ()
{- |
The resulting config->latest_daily_jam is set to midnight, and timecode is
set to the given time.
Will assert on invalid parameters, use 'GI.GstVideo.Structs.VideoTimeCode.videoTimeCodeInitFromDateTimeFull'
for being able to handle invalid parameters.
/Since: 1.12/
-}
videoTimeCodeInitFromDateTime ::
(B.CallStack.HasCallStack, MonadIO m) =>
VideoTimeCode
{- ^ /@tc@/: an uninitialized 'GI.GstVideo.Structs.VideoTimeCode.VideoTimeCode' -}
-> Word32
{- ^ /@fpsN@/: Numerator of the frame rate -}
-> Word32
{- ^ /@fpsD@/: Denominator of the frame rate -}
-> GLib.DateTime.DateTime
{- ^ /@dt@/: 'GI.GLib.Structs.DateTime.DateTime' to convert -}
-> [GstVideo.Flags.VideoTimeCodeFlags]
{- ^ /@flags@/: 'GI.GstVideo.Flags.VideoTimeCodeFlags' -}
-> Word32
{- ^ /@fieldCount@/: Interlaced video field count -}
-> m ()
videoTimeCodeInitFromDateTime tc fpsN fpsD dt flags fieldCount = liftIO $ do
tc' <- unsafeManagedPtrGetPtr tc
dt' <- unsafeManagedPtrGetPtr dt
let flags' = gflagsToWord flags
gst_video_time_code_init_from_date_time tc' fpsN fpsD dt' flags' fieldCount
touchManagedPtr tc
touchManagedPtr dt
return ()
#if ENABLE_OVERLOADING
data VideoTimeCodeInitFromDateTimeMethodInfo
instance (signature ~ (Word32 -> Word32 -> GLib.DateTime.DateTime -> [GstVideo.Flags.VideoTimeCodeFlags] -> Word32 -> m ()), MonadIO m) => O.MethodInfo VideoTimeCodeInitFromDateTimeMethodInfo VideoTimeCode signature where
overloadedMethod _ = videoTimeCodeInitFromDateTime
#endif
-- method VideoTimeCode::init_from_date_time_full
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "tc", argType = TInterface (Name {namespace = "GstVideo", name = "VideoTimeCode"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a #GstVideoTimeCode", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "fps_n", argType = TBasicType TUInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "Numerator of the frame rate", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "fps_d", argType = TBasicType TUInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "Denominator of the frame rate", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "dt", argType = TInterface (Name {namespace = "GLib", name = "DateTime"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "#GDateTime to convert", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "flags", argType = TInterface (Name {namespace = "GstVideo", name = "VideoTimeCodeFlags"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "#GstVideoTimeCodeFlags", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing},Arg {argCName = "field_count", argType = TBasicType TUInt, direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "Interlaced video field count", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False
foreign import ccall "gst_video_time_code_init_from_date_time_full" gst_video_time_code_init_from_date_time_full ::
Ptr VideoTimeCode -> -- tc : TInterface (Name {namespace = "GstVideo", name = "VideoTimeCode"})
Word32 -> -- fps_n : TBasicType TUInt
Word32 -> -- fps_d : TBasicType TUInt
Ptr GLib.DateTime.DateTime -> -- dt : TInterface (Name {namespace = "GLib", name = "DateTime"})
CUInt -> -- flags : TInterface (Name {namespace = "GstVideo", name = "VideoTimeCodeFlags"})
Word32 -> -- field_count : TBasicType TUInt
IO CInt
{- |
The resulting config->latest_daily_jam is set to
midnight, and timecode is set to the given time.
/Since: 1.16/
-}
videoTimeCodeInitFromDateTimeFull ::
(B.CallStack.HasCallStack, MonadIO m) =>
VideoTimeCode
{- ^ /@tc@/: a 'GI.GstVideo.Structs.VideoTimeCode.VideoTimeCode' -}
-> Word32
{- ^ /@fpsN@/: Numerator of the frame rate -}
-> Word32
{- ^ /@fpsD@/: Denominator of the frame rate -}
-> GLib.DateTime.DateTime
{- ^ /@dt@/: 'GI.GLib.Structs.DateTime.DateTime' to convert -}
-> [GstVideo.Flags.VideoTimeCodeFlags]
{- ^ /@flags@/: 'GI.GstVideo.Flags.VideoTimeCodeFlags' -}
-> Word32
{- ^ /@fieldCount@/: Interlaced video field count -}
-> m Bool
{- ^ __Returns:__ 'True' if /@tc@/ could be correctly initialized to a valid timecode -}
videoTimeCodeInitFromDateTimeFull tc fpsN fpsD dt flags fieldCount = liftIO $ do
tc' <- unsafeManagedPtrGetPtr tc
dt' <- unsafeManagedPtrGetPtr dt
let flags' = gflagsToWord flags
result <- gst_video_time_code_init_from_date_time_full tc' fpsN fpsD dt' flags' fieldCount
let result' = (/= 0) result
touchManagedPtr tc
touchManagedPtr dt
return result'
#if ENABLE_OVERLOADING
data VideoTimeCodeInitFromDateTimeFullMethodInfo
instance (signature ~ (Word32 -> Word32 -> GLib.DateTime.DateTime -> [GstVideo.Flags.VideoTimeCodeFlags] -> Word32 -> m Bool), MonadIO m) => O.MethodInfo VideoTimeCodeInitFromDateTimeFullMethodInfo VideoTimeCode signature where
overloadedMethod _ = videoTimeCodeInitFromDateTimeFull
#endif
-- method VideoTimeCode::is_valid
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "tc", argType = TInterface (Name {namespace = "GstVideo", name = "VideoTimeCode"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "#GstVideoTimeCode to check", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TBasicType TBoolean)
-- throws : False
-- Skip return : False
foreign import ccall "gst_video_time_code_is_valid" gst_video_time_code_is_valid ::
Ptr VideoTimeCode -> -- tc : TInterface (Name {namespace = "GstVideo", name = "VideoTimeCode"})
IO CInt
{- |
/No description available in the introspection data./
/Since: 1.10/
-}
videoTimeCodeIsValid ::
(B.CallStack.HasCallStack, MonadIO m) =>
VideoTimeCode
{- ^ /@tc@/: 'GI.GstVideo.Structs.VideoTimeCode.VideoTimeCode' to check -}
-> m Bool
{- ^ __Returns:__ whether /@tc@/ is a valid timecode (supported frame rate,
hours\/minutes\/seconds\/frames not overflowing) -}
videoTimeCodeIsValid tc = liftIO $ do
tc' <- unsafeManagedPtrGetPtr tc
result <- gst_video_time_code_is_valid tc'
let result' = (/= 0) result
touchManagedPtr tc
return result'
#if ENABLE_OVERLOADING
data VideoTimeCodeIsValidMethodInfo
instance (signature ~ (m Bool), MonadIO m) => O.MethodInfo VideoTimeCodeIsValidMethodInfo VideoTimeCode signature where
overloadedMethod _ = videoTimeCodeIsValid
#endif
-- method VideoTimeCode::nsec_since_daily_jam
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "tc", argType = TInterface (Name {namespace = "GstVideo", name = "VideoTimeCode"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "a valid #GstVideoTimeCode", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TBasicType TUInt64)
-- throws : False
-- Skip return : False
foreign import ccall "gst_video_time_code_nsec_since_daily_jam" gst_video_time_code_nsec_since_daily_jam ::
Ptr VideoTimeCode -> -- tc : TInterface (Name {namespace = "GstVideo", name = "VideoTimeCode"})
IO Word64
{- |
/No description available in the introspection data./
/Since: 1.10/
-}
videoTimeCodeNsecSinceDailyJam ::
(B.CallStack.HasCallStack, MonadIO m) =>
VideoTimeCode
{- ^ /@tc@/: a valid 'GI.GstVideo.Structs.VideoTimeCode.VideoTimeCode' -}
-> m Word64
{- ^ __Returns:__ how many nsec have passed since the daily jam of /@tc@/. -}
videoTimeCodeNsecSinceDailyJam tc = liftIO $ do
tc' <- unsafeManagedPtrGetPtr tc
result <- gst_video_time_code_nsec_since_daily_jam tc'
touchManagedPtr tc
return result
#if ENABLE_OVERLOADING
data VideoTimeCodeNsecSinceDailyJamMethodInfo
instance (signature ~ (m Word64), MonadIO m) => O.MethodInfo VideoTimeCodeNsecSinceDailyJamMethodInfo VideoTimeCode signature where
overloadedMethod _ = videoTimeCodeNsecSinceDailyJam
#endif
-- method VideoTimeCode::to_date_time
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "tc", argType = TInterface (Name {namespace = "GstVideo", name = "VideoTimeCode"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "A valid #GstVideoTimeCode to convert", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TInterface (Name {namespace = "GLib", name = "DateTime"}))
-- throws : False
-- Skip return : False
foreign import ccall "gst_video_time_code_to_date_time" gst_video_time_code_to_date_time ::
Ptr VideoTimeCode -> -- tc : TInterface (Name {namespace = "GstVideo", name = "VideoTimeCode"})
IO (Ptr GLib.DateTime.DateTime)
{- |
The /@tc@/.config->latest_daily_jam is required to be non-NULL.
/Since: 1.10/
-}
videoTimeCodeToDateTime ::
(B.CallStack.HasCallStack, MonadIO m) =>
VideoTimeCode
{- ^ /@tc@/: A valid 'GI.GstVideo.Structs.VideoTimeCode.VideoTimeCode' to convert -}
-> m (Maybe GLib.DateTime.DateTime)
{- ^ __Returns:__ the 'GI.GLib.Structs.DateTime.DateTime' representation of /@tc@/ or 'Nothing' if /@tc@/
has no daily jam. -}
videoTimeCodeToDateTime tc = liftIO $ do
tc' <- unsafeManagedPtrGetPtr tc
result <- gst_video_time_code_to_date_time tc'
maybeResult <- convertIfNonNull result $ \result' -> do
result'' <- (wrapBoxed GLib.DateTime.DateTime) result'
return result''
touchManagedPtr tc
return maybeResult
#if ENABLE_OVERLOADING
data VideoTimeCodeToDateTimeMethodInfo
instance (signature ~ (m (Maybe GLib.DateTime.DateTime)), MonadIO m) => O.MethodInfo VideoTimeCodeToDateTimeMethodInfo VideoTimeCode signature where
overloadedMethod _ = videoTimeCodeToDateTime
#endif
-- method VideoTimeCode::to_string
-- method type : OrdinaryMethod
-- Args : [Arg {argCName = "tc", argType = TInterface (Name {namespace = "GstVideo", name = "VideoTimeCode"}), direction = DirectionIn, mayBeNull = False, argDoc = Documentation {rawDocText = Just "A #GstVideoTimeCode to convert", sinceVersion = Nothing}, argScope = ScopeTypeInvalid, argClosure = -1, argDestroy = -1, argCallerAllocates = False, transfer = TransferNothing}]
-- Lengths : []
-- returnType : Just (TBasicType TUTF8)
-- throws : False
-- Skip return : False
foreign import ccall "gst_video_time_code_to_string" gst_video_time_code_to_string ::
Ptr VideoTimeCode -> -- tc : TInterface (Name {namespace = "GstVideo", name = "VideoTimeCode"})
IO CString
{- |
/No description available in the introspection data./
/Since: 1.10/
-}
videoTimeCodeToString ::
(B.CallStack.HasCallStack, MonadIO m) =>
VideoTimeCode
{- ^ /@tc@/: A 'GI.GstVideo.Structs.VideoTimeCode.VideoTimeCode' to convert -}
-> m T.Text
{- ^ __Returns:__ the SMPTE ST 2059-1:2015 string representation of /@tc@/. That will
take the form hh:mm:ss:ff. The last separator (between seconds and frames)
may vary:
\';\' for drop-frame, non-interlaced content and for drop-frame interlaced
field 2
\',\' for drop-frame interlaced field 1
\':\' for non-drop-frame, non-interlaced content and for non-drop-frame
interlaced field 2
\'.\' for non-drop-frame interlaced field 1 -}
videoTimeCodeToString tc = liftIO $ do
tc' <- unsafeManagedPtrGetPtr tc
result <- gst_video_time_code_to_string tc'
checkUnexpectedReturnNULL "videoTimeCodeToString" result
result' <- cstringToText result
freeMem result
touchManagedPtr tc
return result'
#if ENABLE_OVERLOADING
data VideoTimeCodeToStringMethodInfo
instance (signature ~ (m T.Text), MonadIO m) => O.MethodInfo VideoTimeCodeToStringMethodInfo VideoTimeCode signature where
overloadedMethod _ = videoTimeCodeToString
#endif
#if ENABLE_OVERLOADING
type family ResolveVideoTimeCodeMethod (t :: Symbol) (o :: *) :: * where
ResolveVideoTimeCodeMethod "addFrames" o = VideoTimeCodeAddFramesMethodInfo
ResolveVideoTimeCodeMethod "addInterval" o = VideoTimeCodeAddIntervalMethodInfo
ResolveVideoTimeCodeMethod "clear" o = VideoTimeCodeClearMethodInfo
ResolveVideoTimeCodeMethod "compare" o = VideoTimeCodeCompareMethodInfo
ResolveVideoTimeCodeMethod "copy" o = VideoTimeCodeCopyMethodInfo
ResolveVideoTimeCodeMethod "framesSinceDailyJam" o = VideoTimeCodeFramesSinceDailyJamMethodInfo
ResolveVideoTimeCodeMethod "free" o = VideoTimeCodeFreeMethodInfo
ResolveVideoTimeCodeMethod "incrementFrame" o = VideoTimeCodeIncrementFrameMethodInfo
ResolveVideoTimeCodeMethod "init" o = VideoTimeCodeInitMethodInfo
ResolveVideoTimeCodeMethod "initFromDateTime" o = VideoTimeCodeInitFromDateTimeMethodInfo
ResolveVideoTimeCodeMethod "initFromDateTimeFull" o = VideoTimeCodeInitFromDateTimeFullMethodInfo
ResolveVideoTimeCodeMethod "isValid" o = VideoTimeCodeIsValidMethodInfo
ResolveVideoTimeCodeMethod "nsecSinceDailyJam" o = VideoTimeCodeNsecSinceDailyJamMethodInfo
ResolveVideoTimeCodeMethod "toDateTime" o = VideoTimeCodeToDateTimeMethodInfo
ResolveVideoTimeCodeMethod "toString" o = VideoTimeCodeToStringMethodInfo
ResolveVideoTimeCodeMethod l o = O.MethodResolutionFailed l o
instance (info ~ ResolveVideoTimeCodeMethod t VideoTimeCode, O.MethodInfo info VideoTimeCode p) => OL.IsLabel t (VideoTimeCode -> 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