mluTCToSeconds(3dm) mluTCToSeconds(3dm) NAME mluTCToSeconds, mluTCFromSeconds - digital media timecode mathematics SYNOPSIS #include <mlutimecode.h> MLstatus mluTCToSeconds ( const MLUtimecode *tc, double *seconds ) MLstatus mluTCFromSeconds ( MLUtimecode * result, const int tc_type, const double seconds ) TYPES MLUtimecode A structure containing a representation of SMPTE time code on which certain mathematical and utility functions can be performed. Can be used with: mluTCAddTC(3dm) , mluTCAddFrames(3dm) , mluTCToString(3dm) , mluTCFromSeconds(3dm) , mluTCToSeconds(3dm) , mluTCFromString(3dm) , mluTCFramesPerDay(3dm) , and mluTCFramesBetween(3dm) See also MLUtimecode(3dm) ARGUMENTS result The result of converting fractional seconds past midnight into a timecode value. tc The timecode value to convert into seconds. seconds The number of fractional seconds past midnight to convert, or the result of converting a MLUtimecode into fractional seconds past midnight. tc_type When converting from fractional seconds to a MLUtimecode, the timecode format into which the seconds should be converted. See tc_type(3dm) DESCRIPTION These functions provide a simple means of converting between fractional seconds past midnight and MLUtimecode timecodes. When converting from seconds to timecode, a valid tc_type must be supplied (see tc_type(3dm)). The tc_type of result will be the same as the tc_type that is passed to mluTCFromSeconds. Copyright SGI 2000 CONFIDENTIAL DRAFT Page 1 For mluTCFromSeconds, the seconds value given will be rounded to the nearest frame. In order to convert to and from seconds, these routines need to assume some timecode rate in frames per second. They will choose the rate given in the MLU_TC_RATE bits of the specified tc_type. For drop-frame timecode, this is not the rate of the underlying video signal, and over the long term there will be drift. See tc_type(3dm) for more information on this. RETURN VALUE If a MLUtimecode operand (tc) contains an illegal timecode value (e.g., a negative entry, invalid frame number, etc.), mluTCToSeconds will return ML_STATUS_INVALID_ARGUMENT, and the contents of seconds will be undefined. If the number of seconds passed to mluTCFromSeconds is negative, or greater than the number of seconds in a 24-hour day, mluTCFromSeconds will return ML_STATUS_INVALID_ARGUMENT, and the contents of result will be undefined. If an invalid tc_type value is passed in to mluTCFromSeconds, ML_STATUS_INVALID_ARGUMENT is returned. mluTCToSeconds and mluTCFromSeconds return ML_STATUS_NO_ERROR upon successful completion. SEE ALSO mluTCFramesBetween(3dm), mluTCFramesPerDay(3dm), mluTCFromSeconds(3dm), mluTCFromString(3dm), mluTCFromString(3dm), mluTCToSeconds(3dm). Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved. Copyright SGI 2000 CONFIDENTIAL DRAFT Page 2