| Copyright | Will Thompson and Iñaki García Etxebarria |
|---|---|
| License | LGPL-2.1 |
| Maintainer | Iñaki García Etxebarria |
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
GI.GstVideo.Structs.VideoTimeCode
Contents
Description
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
Synopsis
- newtype VideoTimeCode = VideoTimeCode (ManagedPtr VideoTimeCode)
- newZeroVideoTimeCode :: MonadIO m => m VideoTimeCode
- videoTimeCodeAddFrames :: (HasCallStack, MonadIO m) => VideoTimeCode -> Int64 -> m ()
- videoTimeCodeAddInterval :: (HasCallStack, MonadIO m) => VideoTimeCode -> VideoTimeCodeInterval -> m (Maybe VideoTimeCode)
- videoTimeCodeClear :: (HasCallStack, MonadIO m) => VideoTimeCode -> m ()
- videoTimeCodeCompare :: (HasCallStack, MonadIO m) => VideoTimeCode -> VideoTimeCode -> m Int32
- videoTimeCodeCopy :: (HasCallStack, MonadIO m) => VideoTimeCode -> m VideoTimeCode
- videoTimeCodeFramesSinceDailyJam :: (HasCallStack, MonadIO m) => VideoTimeCode -> m Word64
- videoTimeCodeFree :: (HasCallStack, MonadIO m) => VideoTimeCode -> m ()
- videoTimeCodeIncrementFrame :: (HasCallStack, MonadIO m) => VideoTimeCode -> m ()
- videoTimeCodeInit :: (HasCallStack, MonadIO m) => VideoTimeCode -> Word32 -> Word32 -> Maybe DateTime -> [VideoTimeCodeFlags] -> Word32 -> Word32 -> Word32 -> Word32 -> Word32 -> m ()
- videoTimeCodeInitFromDateTime :: (HasCallStack, MonadIO m) => VideoTimeCode -> Word32 -> Word32 -> DateTime -> [VideoTimeCodeFlags] -> Word32 -> m ()
- videoTimeCodeInitFromDateTimeFull :: (HasCallStack, MonadIO m) => VideoTimeCode -> Word32 -> Word32 -> DateTime -> [VideoTimeCodeFlags] -> Word32 -> m Bool
- videoTimeCodeIsValid :: (HasCallStack, MonadIO m) => VideoTimeCode -> m Bool
- videoTimeCodeNew :: (HasCallStack, MonadIO m) => Word32 -> Word32 -> DateTime -> [VideoTimeCodeFlags] -> Word32 -> Word32 -> Word32 -> Word32 -> Word32 -> m VideoTimeCode
- videoTimeCodeNewEmpty :: (HasCallStack, MonadIO m) => m VideoTimeCode
- videoTimeCodeNewFromDateTime :: (HasCallStack, MonadIO m) => Word32 -> Word32 -> DateTime -> [VideoTimeCodeFlags] -> Word32 -> m VideoTimeCode
- videoTimeCodeNewFromDateTimeFull :: (HasCallStack, MonadIO m) => Word32 -> Word32 -> DateTime -> [VideoTimeCodeFlags] -> Word32 -> m (Maybe VideoTimeCode)
- videoTimeCodeNewFromString :: (HasCallStack, MonadIO m) => Text -> m (Maybe VideoTimeCode)
- videoTimeCodeNsecSinceDailyJam :: (HasCallStack, MonadIO m) => VideoTimeCode -> m Word64
- videoTimeCodeToDateTime :: (HasCallStack, MonadIO m) => VideoTimeCode -> m (Maybe DateTime)
- videoTimeCodeToString :: (HasCallStack, MonadIO m) => VideoTimeCode -> m Text
- getVideoTimeCodeConfig :: MonadIO m => VideoTimeCode -> m VideoTimeCodeConfig
- getVideoTimeCodeFieldCount :: MonadIO m => VideoTimeCode -> m Word32
- setVideoTimeCodeFieldCount :: MonadIO m => VideoTimeCode -> Word32 -> m ()
- getVideoTimeCodeFrames :: MonadIO m => VideoTimeCode -> m Word32
- setVideoTimeCodeFrames :: MonadIO m => VideoTimeCode -> Word32 -> m ()
- getVideoTimeCodeHours :: MonadIO m => VideoTimeCode -> m Word32
- setVideoTimeCodeHours :: MonadIO m => VideoTimeCode -> Word32 -> m ()
- getVideoTimeCodeMinutes :: MonadIO m => VideoTimeCode -> m Word32
- setVideoTimeCodeMinutes :: MonadIO m => VideoTimeCode -> Word32 -> m ()
- getVideoTimeCodeSeconds :: MonadIO m => VideoTimeCode -> m Word32
- setVideoTimeCodeSeconds :: MonadIO m => VideoTimeCode -> Word32 -> m ()
Exported types
newtype VideoTimeCode Source #
Memory-managed wrapper type.
Constructors
| VideoTimeCode (ManagedPtr VideoTimeCode) |
Instances
newZeroVideoTimeCode :: MonadIO m => m VideoTimeCode Source #
Construct a VideoTimeCode struct initialized to zero.
Methods
Click to display all available methods, including inherited ones
Methods
addFrames, addInterval, clear, compare, copy, framesSinceDailyJam, free, incrementFrame, init, initFromDateTime, initFromDateTimeFull, isValid, nsecSinceDailyJam, toDateTime, toString.
Getters
None.
Setters
None.
addFrames
videoTimeCodeAddFrames Source #
Arguments
| :: (HasCallStack, MonadIO m) | |
| => VideoTimeCode |
|
| -> Int64 |
|
| -> m () |
Adds or subtracts frames amount of frames to tc. tc needs to
contain valid data, as verified by videoTimeCodeIsValid.
Since: 1.10
addInterval
videoTimeCodeAddInterval Source #
Arguments
| :: (HasCallStack, MonadIO m) | |
| => VideoTimeCode |
|
| -> VideoTimeCodeInterval |
|
| -> m (Maybe VideoTimeCode) | Returns: A new |
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
clear
Arguments
| :: (HasCallStack, MonadIO m) | |
| => VideoTimeCode |
|
| -> m () |
Initializes tc with empty/zero/NULL values and frees any memory
it might currently use.
Since: 1.10
compare
Arguments
| :: (HasCallStack, MonadIO m) | |
| => VideoTimeCode |
|
| -> VideoTimeCode |
|
| -> m Int32 | Returns: 1 if |
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
copy
Arguments
| :: (HasCallStack, MonadIO m) | |
| => VideoTimeCode |
|
| -> m VideoTimeCode | Returns: a new |
No description available in the introspection data.
Since: 1.10
framesSinceDailyJam
videoTimeCodeFramesSinceDailyJam Source #
Arguments
| :: (HasCallStack, MonadIO m) | |
| => VideoTimeCode |
|
| -> m Word64 | Returns: how many frames have passed since the daily jam of |
No description available in the introspection data.
Since: 1.10
free
Arguments
| :: (HasCallStack, MonadIO m) | |
| => VideoTimeCode |
|
| -> m () |
Frees tc.
Since: 1.10
incrementFrame
videoTimeCodeIncrementFrame Source #
Arguments
| :: (HasCallStack, MonadIO m) | |
| => VideoTimeCode |
|
| -> m () |
Adds one frame to tc.
Since: 1.10
init
Arguments
| :: (HasCallStack, MonadIO m) | |
| => VideoTimeCode |
|
| -> Word32 |
|
| -> Word32 |
|
| -> Maybe DateTime |
|
| -> [VideoTimeCodeFlags] |
|
| -> Word32 |
|
| -> Word32 |
|
| -> Word32 |
|
| -> Word32 |
|
| -> Word32 |
|
| -> m () |
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 videoTimeCodeIsValid.
Since: 1.10
initFromDateTime
videoTimeCodeInitFromDateTime Source #
Arguments
| :: (HasCallStack, MonadIO m) | |
| => VideoTimeCode |
|
| -> Word32 |
|
| -> Word32 |
|
| -> DateTime |
|
| -> [VideoTimeCodeFlags] |
|
| -> Word32 |
|
| -> m () |
The resulting config->latest_daily_jam is set to midnight, and timecode is set to the given time.
Will assert on invalid parameters, use videoTimeCodeInitFromDateTimeFull
for being able to handle invalid parameters.
Since: 1.12
initFromDateTimeFull
videoTimeCodeInitFromDateTimeFull Source #
Arguments
| :: (HasCallStack, MonadIO m) | |
| => VideoTimeCode |
|
| -> Word32 |
|
| -> Word32 |
|
| -> DateTime |
|
| -> [VideoTimeCodeFlags] |
|
| -> Word32 |
|
| -> m Bool | Returns: |
The resulting config->latest_daily_jam is set to midnight, and timecode is set to the given time.
Since: 1.16
isValid
Arguments
| :: (HasCallStack, MonadIO m) | |
| => VideoTimeCode |
|
| -> m Bool | Returns: whether |
No description available in the introspection data.
Since: 1.10
new
Arguments
| :: (HasCallStack, MonadIO m) | |
| => Word32 |
|
| -> Word32 |
|
| -> DateTime |
|
| -> [VideoTimeCodeFlags] |
|
| -> Word32 |
|
| -> Word32 |
|
| -> Word32 |
|
| -> Word32 |
|
| -> Word32 |
|
| -> m VideoTimeCode | Returns: a new |
fieldCount is 0 for progressive, 1 or 2 for interlaced.
latestDaiyJam reference is stolen from caller.
Since: 1.10
newEmpty
videoTimeCodeNewEmpty Source #
Arguments
| :: (HasCallStack, MonadIO m) | |
| => m VideoTimeCode | Returns: a new empty, invalid |
No description available in the introspection data.
Since: 1.10
newFromDateTime
videoTimeCodeNewFromDateTime Source #
Arguments
| :: (HasCallStack, MonadIO m) | |
| => Word32 |
|
| -> Word32 |
|
| -> DateTime |
|
| -> [VideoTimeCodeFlags] |
|
| -> Word32 |
|
| -> m VideoTimeCode | Returns: the |
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
videoTimeCodeNewFromDateTimeFull to ensure
that you would get Nothing instead in that case.
Since: 1.12
newFromDateTimeFull
videoTimeCodeNewFromDateTimeFull Source #
Arguments
| :: (HasCallStack, MonadIO m) | |
| => Word32 |
|
| -> Word32 |
|
| -> DateTime |
|
| -> [VideoTimeCodeFlags] |
|
| -> Word32 |
|
| -> m (Maybe VideoTimeCode) | Returns: the |
The resulting config->latest_daily_jam is set to midnight, and timecode is set to the given time.
Since: 1.16
newFromString
videoTimeCodeNewFromString Source #
Arguments
| :: (HasCallStack, MonadIO m) | |
| => Text |
|
| -> m (Maybe VideoTimeCode) | Returns: a new |
No description available in the introspection data.
Since: 1.12
nsecSinceDailyJam
videoTimeCodeNsecSinceDailyJam Source #
Arguments
| :: (HasCallStack, MonadIO m) | |
| => VideoTimeCode |
|
| -> m Word64 | Returns: how many nsec have passed since the daily jam of |
No description available in the introspection data.
Since: 1.10
toDateTime
videoTimeCodeToDateTime Source #
Arguments
| :: (HasCallStack, MonadIO m) | |
| => VideoTimeCode |
|
| -> m (Maybe DateTime) | Returns: the |
The tc.config->latest_daily_jam is required to be non-NULL.
Since: 1.10
toString
videoTimeCodeToString Source #
Arguments
| :: (HasCallStack, MonadIO m) | |
| => VideoTimeCode |
|
| -> m Text | Returns: the SMPTE ST 2059-1:2015 string representation of ';' 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 |
No description available in the introspection data.
Since: 1.10
Properties
config
the corresponding VideoTimeCodeConfig
getVideoTimeCodeConfig :: MonadIO m => VideoTimeCode -> m VideoTimeCodeConfig Source #
Get the value of the “config” field.
When overloading is enabled, this is equivalent to
get videoTimeCode #config
fieldCount
Interlaced video field count
getVideoTimeCodeFieldCount :: MonadIO m => VideoTimeCode -> m Word32 Source #
Get the value of the “field_count” field.
When overloading is enabled, this is equivalent to
get videoTimeCode #fieldCount
setVideoTimeCodeFieldCount :: MonadIO m => VideoTimeCode -> Word32 -> m () Source #
Set the value of the “field_count” field.
When overloading is enabled, this is equivalent to
setvideoTimeCode [ #fieldCount:=value ]
frames
the frames field of VideoTimeCode
getVideoTimeCodeFrames :: MonadIO m => VideoTimeCode -> m Word32 Source #
Get the value of the “frames” field.
When overloading is enabled, this is equivalent to
get videoTimeCode #frames
setVideoTimeCodeFrames :: MonadIO m => VideoTimeCode -> Word32 -> m () Source #
Set the value of the “frames” field.
When overloading is enabled, this is equivalent to
setvideoTimeCode [ #frames:=value ]
hours
the hours field of VideoTimeCode
getVideoTimeCodeHours :: MonadIO m => VideoTimeCode -> m Word32 Source #
Get the value of the “hours” field.
When overloading is enabled, this is equivalent to
get videoTimeCode #hours
setVideoTimeCodeHours :: MonadIO m => VideoTimeCode -> Word32 -> m () Source #
Set the value of the “hours” field.
When overloading is enabled, this is equivalent to
setvideoTimeCode [ #hours:=value ]
minutes
the minutes field of VideoTimeCode
getVideoTimeCodeMinutes :: MonadIO m => VideoTimeCode -> m Word32 Source #
Get the value of the “minutes” field.
When overloading is enabled, this is equivalent to
get videoTimeCode #minutes
setVideoTimeCodeMinutes :: MonadIO m => VideoTimeCode -> Word32 -> m () Source #
Set the value of the “minutes” field.
When overloading is enabled, this is equivalent to
setvideoTimeCode [ #minutes:=value ]
seconds
the seconds field of VideoTimeCode
getVideoTimeCodeSeconds :: MonadIO m => VideoTimeCode -> m Word32 Source #
Get the value of the “seconds” field.
When overloading is enabled, this is equivalent to
get videoTimeCode #seconds
setVideoTimeCodeSeconds :: MonadIO m => VideoTimeCode -> Word32 -> m () Source #
Set the value of the “seconds” field.
When overloading is enabled, this is equivalent to
setvideoTimeCode [ #seconds:=value ]