VideoTimeCode

@field_count 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.

class VideoTimeCode : Boxed {}

Constructors

this
this(uint fpsN, uint fpsD, glib.date_time.DateTime latestDailyJam, gstvideo.types.VideoTimeCodeFlags flags, uint hours, uint minutes, uint seconds, uint frames, uint fieldCount)

field_count is 0 for progressive, 1 or 2 for interlaced. latest_daiy_jam reference is stolen from caller.

Members

Functions

addFrames
void addFrames(long frames)

Adds or subtracts frames amount of frames to tc. tc needs to contain valid data, as verified by gstvideo.video_time_code.VideoTimeCode.isValid.

addInterval
gstvideo.video_time_code.VideoTimeCode addInterval(gstvideo.video_time_code_interval.VideoTimeCodeInterval tcInter)

This makes a component-wise addition of tc_inter 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.

clear
void clear()

Initializes tc with empty/zero/NULL values and frees any memory it might currently use.

compare
int compare(gstvideo.video_time_code.VideoTimeCode tc2)

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.

copy
gstvideo.video_time_code.VideoTimeCode copy()
framesSinceDailyJam
ulong framesSinceDailyJam()
incrementFrame
void incrementFrame()

Adds one frame to tc.

initFromDateTime
void initFromDateTime(uint fpsN, uint fpsD, glib.date_time.DateTime dt, gstvideo.types.VideoTimeCodeFlags flags, uint fieldCount)

The resulting config->latest_daily_jam is set to midnight, and timecode is set to the given time.

initFromDateTimeFull
bool initFromDateTimeFull(uint fpsN, uint fpsD, glib.date_time.DateTime dt, gstvideo.types.VideoTimeCodeFlags flags, uint fieldCount)

The resulting config->latest_daily_jam is set to midnight, and timecode is set to the given time.

init_
void init_(uint fpsN, uint fpsD, glib.date_time.DateTime latestDailyJam, gstvideo.types.VideoTimeCodeFlags flags, uint hours, uint minutes, uint seconds, uint frames, uint fieldCount)

field_count is 0 for progressive, 1 or 2 for interlaced. latest_daiy_jam reference is stolen from caller.

isValid
bool isValid()
nsecSinceDailyJam
ulong nsecSinceDailyJam()
toDateTime
glib.date_time.DateTime toDateTime()

The tc.config->latest_daily_jam is required to be non-NULL.

toString_
string toString_()

Static functions

newEmpty
gstvideo.video_time_code.VideoTimeCode newEmpty()
newFromDateTime
gstvideo.video_time_code.VideoTimeCode newFromDateTime(uint fpsN, uint fpsD, glib.date_time.DateTime dt, gstvideo.types.VideoTimeCodeFlags flags, uint fieldCount)

The resulting config->latest_daily_jam is set to midnight, and timecode is set to the given time.

newFromDateTimeFull
gstvideo.video_time_code.VideoTimeCode newFromDateTimeFull(uint fpsN, uint fpsD, glib.date_time.DateTime dt, gstvideo.types.VideoTimeCodeFlags flags, uint fieldCount)

The resulting config->latest_daily_jam is set to midnight, and timecode is set to the given time.

newFromString
gstvideo.video_time_code.VideoTimeCode newFromString(string tcStr)

Inherited Members

From Boxed

cInstancePtr
void* cInstancePtr;

Pointer to the C boxed value

getType
GType getType()

Get the GType of this boxed type.

gType
GType gType [@property getter]

Boxed GType property.

self
Boxed self()

Convenience method to return this cast to a type. For use in D with statements.

copy_
void* copy_()

Make a copy of the wrapped C boxed data.

boxedCopy
void* boxedCopy(void* cBoxed)

Copy a C boxed value using g_boxed_copy.

boxedFree
void boxedFree(void* cBoxed)

Free a C boxed value using g_boxed_free.