{- |
Copyright  : Will Thompson, Iñaki García Etxebarria and Jonas Platte
License    : LGPL-2.1
Maintainer : Iñaki García Etxebarria (garetxe@gmail.com)

/@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.
-}

module GI.GstVideo.Structs.VideoTimeCode
    ( 

-- * Exported types
    VideoTimeCode(..)                       ,
    newZeroVideoTimeCode                    ,
    noVideoTimeCode                         ,


 -- * Methods
-- ** addFrames #method:addFrames#
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
    VideoTimeCodeAddFramesMethodInfo        ,
#endif
    videoTimeCodeAddFrames                  ,


-- ** addInterval #method:addInterval#
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
    VideoTimeCodeAddIntervalMethodInfo      ,
#endif
    videoTimeCodeAddInterval                ,


-- ** clear #method:clear#
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
    VideoTimeCodeClearMethodInfo            ,
#endif
    videoTimeCodeClear                      ,


-- ** compare #method:compare#
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
    VideoTimeCodeCompareMethodInfo          ,
#endif
    videoTimeCodeCompare                    ,


-- ** copy #method:copy#
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
    VideoTimeCodeCopyMethodInfo             ,
#endif
    videoTimeCodeCopy                       ,


-- ** framesSinceDailyJam #method:framesSinceDailyJam#
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
    VideoTimeCodeFramesSinceDailyJamMethodInfo,
#endif
    videoTimeCodeFramesSinceDailyJam        ,


-- ** free #method:free#
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
    VideoTimeCodeFreeMethodInfo             ,
#endif
    videoTimeCodeFree                       ,


-- ** incrementFrame #method:incrementFrame#
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
    VideoTimeCodeIncrementFrameMethodInfo   ,
#endif
    videoTimeCodeIncrementFrame             ,


-- ** init #method:init#
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
    VideoTimeCodeInitMethodInfo             ,
#endif
    videoTimeCodeInit                       ,


-- ** initFromDateTime #method:initFromDateTime#
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
    VideoTimeCodeInitFromDateTimeMethodInfo ,
#endif
    videoTimeCodeInitFromDateTime           ,


-- ** isValid #method:isValid#
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
    VideoTimeCodeIsValidMethodInfo          ,
#endif
    videoTimeCodeIsValid                    ,


-- ** new #method:new#
    videoTimeCodeNew                        ,


-- ** newEmpty #method:newEmpty#
    videoTimeCodeNewEmpty                   ,


-- ** newFromDateTime #method:newFromDateTime#
    videoTimeCodeNewFromDateTime            ,


-- ** newFromString #method:newFromString#
    videoTimeCodeNewFromString              ,


-- ** nsecSinceDailyJam #method:nsecSinceDailyJam#
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
    VideoTimeCodeNsecSinceDailyJamMethodInfo,
#endif
    videoTimeCodeNsecSinceDailyJam          ,


-- ** toDateTime #method:toDateTime#
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
    VideoTimeCodeToDateTimeMethodInfo       ,
#endif
    videoTimeCodeToDateTime                 ,


-- ** toString #method:toString#
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
    VideoTimeCodeToStringMethodInfo         ,
#endif
    videoTimeCodeToString                   ,




 -- * Properties
-- ** config #attr:config#
    getVideoTimeCodeConfig                  ,
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
    videoTimeCode_config                    ,
#endif


-- ** fieldCount #attr:fieldCount#
    getVideoTimeCodeFieldCount              ,
    setVideoTimeCodeFieldCount              ,
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
    videoTimeCode_fieldCount                ,
#endif


-- ** frames #attr:frames#
    getVideoTimeCodeFrames                  ,
    setVideoTimeCodeFrames                  ,
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
    videoTimeCode_frames                    ,
#endif


-- ** hours #attr:hours#
    getVideoTimeCodeHours                   ,
    setVideoTimeCodeHours                   ,
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
    videoTimeCode_hours                     ,
#endif


-- ** minutes #attr:minutes#
    getVideoTimeCodeMinutes                 ,
    setVideoTimeCodeMinutes                 ,
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
    videoTimeCode_minutes                   ,
#endif


-- ** seconds #attr:seconds#
    getVideoTimeCodeSeconds                 ,
    setVideoTimeCodeSeconds                 ,
#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
    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.GError as B.GError
import qualified Data.GI.Base.GVariant as B.GVariant
import qualified Data.GI.Base.GParamSpec as B.GParamSpec
import qualified Data.GI.Base.CallStack as B.CallStack
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 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

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


noVideoTimeCode :: Maybe VideoTimeCode
noVideoTimeCode = Nothing

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 defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
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


getVideoTimeCodeHours :: MonadIO m => VideoTimeCode -> m Word32
getVideoTimeCodeHours s = liftIO $ withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 24) :: IO Word32
    return val

setVideoTimeCodeHours :: MonadIO m => VideoTimeCode -> Word32 -> m ()
setVideoTimeCodeHours s val = liftIO $ withManagedPtr s $ \ptr -> do
    poke (ptr `plusPtr` 24) (val :: Word32)

#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
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


getVideoTimeCodeMinutes :: MonadIO m => VideoTimeCode -> m Word32
getVideoTimeCodeMinutes s = liftIO $ withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 28) :: IO Word32
    return val

setVideoTimeCodeMinutes :: MonadIO m => VideoTimeCode -> Word32 -> m ()
setVideoTimeCodeMinutes s val = liftIO $ withManagedPtr s $ \ptr -> do
    poke (ptr `plusPtr` 28) (val :: Word32)

#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
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


getVideoTimeCodeSeconds :: MonadIO m => VideoTimeCode -> m Word32
getVideoTimeCodeSeconds s = liftIO $ withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 32) :: IO Word32
    return val

setVideoTimeCodeSeconds :: MonadIO m => VideoTimeCode -> Word32 -> m ()
setVideoTimeCodeSeconds s val = liftIO $ withManagedPtr s $ \ptr -> do
    poke (ptr `plusPtr` 32) (val :: Word32)

#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
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


getVideoTimeCodeFrames :: MonadIO m => VideoTimeCode -> m Word32
getVideoTimeCodeFrames s = liftIO $ withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 36) :: IO Word32
    return val

setVideoTimeCodeFrames :: MonadIO m => VideoTimeCode -> Word32 -> m ()
setVideoTimeCodeFrames s val = liftIO $ withManagedPtr s $ \ptr -> do
    poke (ptr `plusPtr` 36) (val :: Word32)

#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
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


getVideoTimeCodeFieldCount :: MonadIO m => VideoTimeCode -> m Word32
getVideoTimeCodeFieldCount s = liftIO $ withManagedPtr s $ \ptr -> do
    val <- peek (ptr `plusPtr` 40) :: IO Word32
    return val

setVideoTimeCodeFieldCount :: MonadIO m => VideoTimeCode -> Word32 -> m ()
setVideoTimeCodeFieldCount s val = liftIO $ withManagedPtr s $ \ptr -> do
    poke (ptr `plusPtr` 40) (val :: Word32)

#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
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 defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
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 @/gst_video_time_code_is_valid/@. -}
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 defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
#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 '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 defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
#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.

@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 @/GVideoTimeCode/@ 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 defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
#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 VideoTimeCode
    {- ^ __Returns:__ a new 'GI.GstVideo.Structs.VideoTimeCode.VideoTimeCode' from the given string -}
videoTimeCodeNewFromString tcStr = liftIO $ do
    tcStr' <- textToCString tcStr
    result <- gst_video_time_code_new_from_string tcStr'
    checkUnexpectedReturnNULL "videoTimeCodeNewFromString" result
    result' <- (wrapBoxed VideoTimeCode) result
    freeMem tcStr'
    return result'

#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
#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 @/gst_video_time_code_is_valid/@.

@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 defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
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 VideoTimeCode
    {- ^ __Returns:__ A new 'GI.GstVideo.Structs.VideoTimeCode.VideoTimeCode' with /@tcInter@/ added. -}
videoTimeCodeAddInterval tc tcInter = liftIO $ do
    tc' <- unsafeManagedPtrGetPtr tc
    tcInter' <- unsafeManagedPtrGetPtr tcInter
    result <- gst_video_time_code_add_interval tc' tcInter'
    checkUnexpectedReturnNULL "videoTimeCodeAddInterval" result
    result' <- (wrapBoxed VideoTimeCode) result
    touchManagedPtr tc
    touchManagedPtr tcInter
    return result'

#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
data VideoTimeCodeAddIntervalMethodInfo
instance (signature ~ (GstVideo.VideoTimeCodeInterval.VideoTimeCodeInterval -> m 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.

@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 defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
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 #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 #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 'GI.GstVideo.Structs.VideoTimeCode.VideoTimeCode' -}
    -> VideoTimeCode
    {- ^ /@tc2@/: another '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 defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
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 defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
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 defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
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 defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
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 defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
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 @/gst_video_time_code_is_valid/@.

@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 defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
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 "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 : 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.

@since 1.12
-}
videoTimeCodeInitFromDateTime ::
    (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 ()
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 defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
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::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 defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
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 defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
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 GLib.DateTime.DateTime
    {- ^ __Returns:__ the 'GI.GLib.Structs.DateTime.DateTime' representation of /@tc@/. -}
videoTimeCodeToDateTime tc = liftIO $ do
    tc' <- unsafeManagedPtrGetPtr tc
    result <- gst_video_time_code_to_date_time tc'
    checkUnexpectedReturnNULL "videoTimeCodeToDateTime" result
    result' <- (wrapBoxed GLib.DateTime.DateTime) result
    touchManagedPtr tc
    return result'

#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
data VideoTimeCodeToDateTimeMethodInfo
instance (signature ~ (m 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 "#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@/: '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 defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
data VideoTimeCodeToStringMethodInfo
instance (signature ~ (m T.Text), MonadIO m) => O.MethodInfo VideoTimeCodeToStringMethodInfo VideoTimeCode signature where
    overloadedMethod _ = videoTimeCodeToString

#endif

#if defined(ENABLE_OVERLOADING) && !defined(__HADDOCK_VERSION__)
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 "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) => O.IsLabelProxy t (VideoTimeCode -> p) where
    fromLabelProxy _ = O.overloadedMethod (O.MethodProxy :: O.MethodProxy info)

#if MIN_VERSION_base(4,9,0)
instance (info ~ ResolveVideoTimeCodeMethod t VideoTimeCode, O.MethodInfo info VideoTimeCode p) => O.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

#endif