gstvideo.video_time_code
Module for [VideoTimeCode] class
class VideoTimeCode
Types 1
classVideoTimeCode : gobject.boxed.Boxed
@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.
Methods
VideoTimeCode self()Returns `this`, for use in `with` statements.gstvideo.video_time_code_config.VideoTimeCodeConfig config() @propertyGet `config` field. Returns: the corresponding #GstVideoTimeCodeConfigvoid hours(uint propval) @propertySet `hours` field. Params: propval = the hours field of #GstVideoTimeCodevoid minutes(uint propval) @propertySet `minutes` field. Params: propval = the minutes field of #GstVideoTimeCodevoid seconds(uint propval) @propertySet `seconds` field. Params: propval = the seconds field of #GstVideoTimeCodevoid frames(uint propval) @propertySet `frames` field. Params: propval = the frames field of #GstVideoTimeCodevoid fieldCount(uint propval) @propertySet `fieldCount` field. Params: propval = Interlaced video field countgstvideo.video_time_code.VideoTimeCode newFromDateTime(uint fpsN, uint fpsD, glib.date_time.DateTime dt, gstvideo.types.VideoTimeCodeFlags flags, uint fieldCount)The resulting config->latestdailyjam is set to midnight, and timecode is set to the given time.gstvideo.video_time_code.VideoTimeCode newFromDateTimeFull(uint fpsN, uint fpsD, glib.date_time.DateTime dt, gstvideo.types.VideoTimeCodeFlags flags, uint fieldCount)The resulting config->latestdailyjam is set to midnight, and timecode is set to the given time.gstvideo.video_time_code.VideoTimeCode newFromString(string tcStr)void addFrames(long frames)Adds or subtracts frames amount of frames to tc. tc needs to contain valid data, as verified by [gstvideo.videotimecode.VideoTimeCode.isValid].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", "...void clear()Initializes tc with empty/zero/NULL values and frees any memory it might currently use.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...ulong framesSinceDailyJam()void incrementFrame()Adds one frame to tc.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)fieldcount is 0 for progressive, 1 or 2 for interlaced. latestdaiy_jam reference is stolen from caller.void initFromDateTime(uint fpsN, uint fpsD, glib.date_time.DateTime dt, gstvideo.types.VideoTimeCodeFlags flags, uint fieldCount)The resulting config->latestdailyjam is set to midnight, and timecode is set to the given time.bool initFromDateTimeFull(uint fpsN, uint fpsD, glib.date_time.DateTime dt, gstvideo.types.VideoTimeCodeFlags flags, uint fieldCount)The resulting config->latestdailyjam is set to midnight, and timecode is set to the given time.bool isValid()ulong nsecSinceDailyJam()glib.date_time.DateTime toDateTime()The tc.config->latestdailyjam is required to be non-NULL. Returns: the #GDateTime representation of tc or null if tc has no daily jam.string toString_()Constructors
this(uint fpsN, uint fpsD, glib.date_time.DateTime latestDailyJam, gstvideo.types.VideoTimeCodeFlags flags, uint hours, uint minutes, uint seconds, uint frames, uint fieldCount)fieldcount is 0 for progressive, 1 or 2 for interlaced. latestdaiy_jam reference is stolen from caller.