Package | org.osmf.smpte.tt.timing |
Class | public class TimeCode |
Inheritance | TimeCode Object |
Property | Defined By | ||
---|---|---|---|
duration : Number [read-only]
Gets the absolute time in seconds of the current TimeCode object. | TimeCode | ||
frameRate : SmpteFrameRate
Gets or sets the current SMPTE framerate for this TimeCode instance. | TimeCode | ||
framesSegment : int [read-only]
Gets the number of whole frames represented by the current TimeCode structure. | TimeCode | ||
hoursSegment : int [read-only]
Gets the number of whole hours represented by the current TimeCode structure. | TimeCode | ||
minutesSegment : int [read-only]
Gets the number of whole minutes represented by the current TimeCode structure. | TimeCode | ||
secondsSegment : int [read-only]
Gets the number of whole seconds represented by the current TimeCode structure. | TimeCode | ||
totalDays : Number [read-only]
Gets the value of the current TimeCode structure expressed in whole and fractional days. | TimeCode | ||
totalFrames : Number [read-only]
Gets the value of the current TimeCode structure expressed in frames. | TimeCode | ||
totalHours : Number [read-only]
Gets the value of the current TimeCode structure expressed in whole
and fractional hours. | TimeCode | ||
totalMinutes : Number [read-only]
Gets the value of the current TimeCode structure expressed in whole
and fractional minutes. | TimeCode | ||
totalSeconds : Number [read-only]
Gets the value of the current TimeCode structure expressed in whole
and fractional seconds. | TimeCode | ||
totalSecondsPrecision : Number [read-only]
Gets the value of the current TimeCode structure expressed in whole
and fractional seconds. | TimeCode |
Method | Defined By | ||
---|---|---|---|
TimeCode(... args)
The TimeCode can be created from several different sets of parameters. | TimeCode | ||
absoluteTimeToTicks27Mhz(time:AbsoluteTimeHelper):Number [static]
Converts the specified absolute time to 27 mhz ticks. | TimeCode | ||
absoluteTimeToTicksPcrTb(time:AbsoluteTimeHelper):Number [static]
Converts the provided absolute time to PCRTb. | TimeCode | ||
Adds the specified TimeCode to this instance. | TimeCode | ||
[static]
Compares two TimeCode values and returns an integer that indicates their relationship. | TimeCode | ||
compareTo(value:Object):int
Compares this instance to a specified object and returns an indication of their relative values. | TimeCode | ||
equals(t2:Object):Boolean
Indicates whether this TimeCode equals another given TimeCode. | TimeCode | ||
[static]
Returns a value indicating whether two specified instances of TimeCode
are equal. | TimeCode | ||
Indicates whether this TimeCode is equal to another given TimeCode. | TimeCode | ||
[static]
Returns a TimeCode that represents a specified time, where the specification is in units of absolute time. | TimeCode | ||
[static]
Returns a TimeCode that represents a specified number of days, where the specification is accurate to the nearest millisecond. | TimeCode | ||
[static]
Returns a TimeCode that represents a specified number of frames. | TimeCode | ||
[static]
Returns a TimeCode that represents a specified number of hours, where the specification is accurate to the nearest millisecond. | TimeCode | ||
[static]
Returns a TimeCode that represents a specified number of minutes, where the specification is accurate to the nearest millisecond. | TimeCode | ||
[static]
Returns a TimeCode that represents a specified number of seconds, where the specification is accurate to the nearest millisecond. | TimeCode | ||
[static]
Returns a TimeCode that represents a specified time, where the specification is in units of ticks. | TimeCode | ||
[static]
Returns a TimeCode that represents a specified time, where the specification is in units of 27 Mhz clock ticks. | TimeCode | ||
[static]
Returns a TimeCode that represents a specified time, where the specification is in units of absolute time. | TimeCode | ||
greaterThan(t2:TimeCode):Boolean
Indicates whether this TimeCode is greater than another given TimeCode. | TimeCode | ||
greaterThanOrEqualTo(t2:TimeCode):Boolean
Indicates whether this TimeCode is greater than or equal to another given TimeCode. | TimeCode | ||
Indicates whether this TimeCode is less than another given TimeCode. | TimeCode | ||
lessThanOrEqualTo(t2:TimeCode):Boolean
Indicates whether this TimeCode is less than or equal to another given TimeCode. | TimeCode | ||
maxValue(frameRate:SmpteFrameRate):Number [static]
Gets the maximum TimeCode value of a known frame rate. | TimeCode | ||
Subtracts a specified TimeCode from this TimeCode. | TimeCode | ||
notEqualTo(t2:TimeCode):Boolean
Indicates whether this TimeCode is not equal to another given TimeCode. | TimeCode | ||
parseFramerate(rate:Number):SmpteFrameRate [static]
Parses a framerate value as double and converts it to a member of the SmpteFrameRate enumeration. | TimeCode | ||
Adds a specified TimeCode to this TimeCode. | TimeCode | ||
smpte12MToTicks27Mhz(timeCode:String, rate:SmpteFrameRate):Number [static]
Returns the value of the provided time code string and framerate in 27Mhz ticks. | TimeCode | ||
Subtracts the specified TimeCode from this instance. | TimeCode | ||
ticks27MhzToAbsoluteTime(ticks27Mhz:Number):Number [static]
Converts the specified absolute time to absolute time. | TimeCode | ||
ticks27MhzToPcrTb(ticks27Mhz:Number):Number [static]
Converts from 27Mhz ticks to PCRTb. | TimeCode | ||
ticks27MhzToSmpte12M(ticks27Mhz:Number, rate:SmpteFrameRate):String [static]
Returns a SMPTE 12M formatted time code string from a 27Mhz ticks value. | TimeCode | ||
ticksPcrTbToAbsoluteTime(ticksPcrTb:Number):Number [static]
Converts the specified absolute time to absolute time. | TimeCode | ||
toString():String
Returns the SMPTE 12M string representation of the value of this instance. | TimeCode | ||
toStringAtFramerate(rate:SmpteFrameRate = null):String
Returns the SMPTE 12M string representation of the value of this instance. | TimeCode | ||
toTicks27Mhz():Number
Returns the value of this instance in 27 Mhz ticks. | TimeCode | ||
toTicksPcrTb():Number
Returns the value of this instance in MPEG 2 PCR time base (PcrTb) format. | TimeCode | ||
validateSmpte12MTimecode(timeCode:String):Boolean [static]
Validates that the string provided is in the correct format for SMPTE 12M time code. | TimeCode |
Constant | Defined By | ||
---|---|---|---|
MILLISECONDS_PER_DAY : Number = 86400000 [static]
The number of milliseconds in one day
| TimeCode | ||
MILLISECONDS_PER_HOUR : Number = 3600000 [static]
The number of milliseconds in one hour
| TimeCode | ||
MILLISECONDS_PER_MINUTE : Number = 60000 [static]
The number of milliseconds in one minute
| TimeCode | ||
MILLISECONDS_PER_SECOND : Number = 1000 [static]
The number of milliseconds in one second
| TimeCode | ||
MIN_VALUE : Number = 0 [static]
The minimum TimeCode value. | TimeCode | ||
SMPTEREGEXP : RegExp [static]
Regular expression object used for validating timecode. | TimeCode | ||
TICKS_PER_DAY : Number = 864000000000 [static]
The number of ticks in one day
| TimeCode | ||
TICKS_PER_DAY_ABSOLUTE_TIME : Number = 86400 [static]
The number of absolute time ticks in 1 day. | TimeCode | ||
TICKS_PER_HOUR : Number = 36000000000 [static]
The number of ticks in one hour
| TimeCode | ||
TICKS_PER_HOUR_ABSOLUTE_TIME : Number = 3600 [static]
The number of absolute time ticks in 1 hour. | TimeCode | ||
TICKS_PER_MILLISECOND : Number = 10000 [static]
The number of ticks in one millisecond
| TimeCode | ||
TICKS_PER_MILLISECOND_ABSOLUTE_TIME : Number = 0.001 [static]
The number of absolute time ticks in 1 millisecond. | TimeCode | ||
TICKS_PER_MINUTE : Number = 600000000 [static]
The number of ticks in one minute
| TimeCode | ||
TICKS_PER_MINUTE_ABSOLUTE_TIME : Number = 60 [static]
The number of absolute time ticks in one minute
| TimeCode | ||
TICKS_PER_SECOND : Number = 10000000 [static]
The number of ticks in one second
| TimeCode | ||
TICKS_PER_SECOND_ABSOLUTE_TIME : Number = 1 [static]
The number of absolute time ticks in one second
| TimeCode |
duration | property |
duration:Number
[read-only] Gets the absolute time in seconds of the current TimeCode object.
public function get duration():Number
frameRate | property |
frameRate:SmpteFrameRate
Gets or sets the current SMPTE framerate for this TimeCode instance.
public function get frameRate():SmpteFrameRate
public function set frameRate(value:SmpteFrameRate):void
framesSegment | property |
framesSegment:int
[read-only] Gets the number of whole frames represented by the current TimeCode structure.
public function get framesSegment():int
hoursSegment | property |
hoursSegment:int
[read-only] Gets the number of whole hours represented by the current TimeCode structure.
public function get hoursSegment():int
minutesSegment | property |
minutesSegment:int
[read-only] Gets the number of whole minutes represented by the current TimeCode structure.
public function get minutesSegment():int
secondsSegment | property |
secondsSegment:int
[read-only] Gets the number of whole seconds represented by the current TimeCode structure.
public function get secondsSegment():int
totalDays | property |
totalDays:Number
[read-only] Gets the value of the current TimeCode structure expressed in whole and fractional days.
public function get totalDays():Number
totalFrames | property |
totalFrames:Number
[read-only] Gets the value of the current TimeCode structure expressed in frames.
public function get totalFrames():Number
totalHours | property |
totalHours:Number
[read-only] Gets the value of the current TimeCode structure expressed in whole and fractional hours.
public function get totalHours():Number
totalMinutes | property |
totalMinutes:Number
[read-only] Gets the value of the current TimeCode structure expressed in whole and fractional minutes.
public function get totalMinutes():Number
totalSeconds | property |
totalSeconds:Number
[read-only] Gets the value of the current TimeCode structure expressed in whole and fractional seconds. Not as Precise as the TotalSecondsPrecision.
public function get totalSeconds():Number
totalSecondsPrecision | property |
totalSecondsPrecision:Number
[read-only] Gets the value of the current TimeCode structure expressed in whole and fractional seconds. This is returned as a for greater precision.
public function get totalSecondsPrecision():Number
TimeCode | () | Constructor |
public function TimeCode(... args)
The TimeCode can be created from several different sets of parameters.
With 5 or 6 parameters, initializes a new instance of the TimeCode structure to a specified number of days, hours, minutes, and seconds.
Parameters... args — - Number of days. (optional)
|
absoluteTimeToTicks27Mhz | () | method |
public static function absoluteTimeToTicks27Mhz(time:AbsoluteTimeHelper):Number
Converts the specified absolute time to 27 mhz ticks.
Parameters
time:AbsoluteTimeHelper — Absolute time to be converted.
|
Number |
absoluteTimeToTicksPcrTb | () | method |
public static function absoluteTimeToTicksPcrTb(time:AbsoluteTimeHelper):Number
Converts the provided absolute time to PCRTb.
Parameters
time:AbsoluteTimeHelper — Absolute time to be converted.
|
Number |
add | () | method |
public function add(ts:TimeCode):TimeCode
Adds the specified TimeCode to this instance.
Parameters
ts:TimeCode — A TimeCode.
|
TimeCode |
Compare | () | method |
public static function Compare(t1:TimeCode, t2:TimeCode):int
Compares two TimeCode values and returns an integer that indicates their relationship.
Parameters
t1:TimeCode — The first TimeCode.
| |
t2:TimeCode — The second TimeCode.
|
int |
compareTo | () | method |
public function compareTo(value:Object):int
Compares this instance to a specified object and returns an indication of their relative values.
Parameters
value:Object — An object to compare, or null.
|
int |
equals | () | method |
public function equals(t2:Object):Boolean
Indicates whether this TimeCode equals another given TimeCode.
Parameters
t2:Object — The TimeCode to compare.
|
Boolean |
Equals | () | method |
public static function Equals(t1:TimeCode, t2:TimeCode):Boolean
Returns a value indicating whether two specified instances of TimeCode are equal.
Parameters
t1:TimeCode — The first TimeCode.
| |
t2:TimeCode — The second TimeCode.
|
Boolean |
equalTo | () | method |
public function equalTo(t2:TimeCode):Boolean
Indicates whether this TimeCode is equal to another given TimeCode.
Parameters
t2:TimeCode — The TimeCode to compare.
|
Boolean |
fromAbsoluteTime | () | method |
public static function fromAbsoluteTime(value:Number, rate:SmpteFrameRate):TimeCode
Returns a TimeCode that represents a specified time, where the specification is in units of absolute time.
Parameters
value:Number — The absolute time in 100 nanosecond units.
| |
rate:SmpteFrameRate — The SMPTE framerate.
|
TimeCode |
fromDays | () | method |
public static function fromDays(value:Number, rate:SmpteFrameRate):TimeCode
Returns a TimeCode that represents a specified number of days, where the specification is accurate to the nearest millisecond.
Parameters
value:Number — A number of days accurate to the nearest millisecond.
| |
rate:SmpteFrameRate — The desired SmpteFrameRate framerate for this instance.
|
TimeCode |
fromFrames | () | method |
public static function fromFrames(value:Number, rate:SmpteFrameRate):TimeCode
Returns a TimeCode that represents a specified number of frames.
Parameters
value:Number — A number of frames.
| |
rate:SmpteFrameRate — The framerate of the Timecode.
|
TimeCode |
fromHours | () | method |
public static function fromHours(value:Number, rate:SmpteFrameRate):TimeCode
Returns a TimeCode that represents a specified number of hours, where the specification is accurate to the nearest millisecond.
Parameters
value:Number — A number of hours accurate to the nearest millisecond.
| |
rate:SmpteFrameRate — The desired SmpteFrameRate framerate for this instance.
|
TimeCode |
fromMinutes | () | method |
public static function fromMinutes(value:Number, rate:SmpteFrameRate):TimeCode
Returns a TimeCode that represents a specified number of minutes, where the specification is accurate to the nearest millisecond.
Parameters
value:Number — A number of minutes accurate to the nearest millisecond.
| |
rate:SmpteFrameRate — The desired SmpteFrameRate framerate for this instance.
|
TimeCode |
fromSeconds | () | method |
public static function fromSeconds(value:Number, rate:SmpteFrameRate):TimeCode
Returns a TimeCode that represents a specified number of seconds, where the specification is accurate to the nearest millisecond.
Parameters
value:Number — A number of seconds accurate to the nearest millisecond.
| |
rate:SmpteFrameRate — The desired SmpteFrameRate framerate for this instance.
|
TimeCode |
fromTicks | () | method |
public static function fromTicks(ticks:Number, rate:SmpteFrameRate):TimeCode
Returns a TimeCode that represents a specified time, where the specification is in units of ticks.
Parameters
ticks:Number — A number of ticks that represent a time.
| |
rate:SmpteFrameRate — The Smpte framerate.
|
TimeCode |
fromTicks27Mhz | () | method |
public static function fromTicks27Mhz(value:Number, rate:SmpteFrameRate):TimeCode
Returns a TimeCode that represents a specified time, where the specification is in units of 27 Mhz clock ticks.
Parameters
value:Number — A number of ticks in 27 Mhz clock format.
| |
rate:SmpteFrameRate — A Smpte framerate.
|
TimeCode |
fromTimeSpan | () | method |
public static function fromTimeSpan(value:TimeSpan, rate:SmpteFrameRate):TimeCode
Returns a TimeCode that represents a specified time, where the specification is in units of absolute time.
Parameters
value:TimeSpan — The TimeSpan object.
| |
rate:SmpteFrameRate — The SMPTE framerate.
|
TimeCode |
greaterThan | () | method |
public function greaterThan(t2:TimeCode):Boolean
Indicates whether this TimeCode is greater than another given TimeCode.
Parameters
t2:TimeCode — The TimeCode to compare.
|
Boolean |
greaterThanOrEqualTo | () | method |
public function greaterThanOrEqualTo(t2:TimeCode):Boolean
Indicates whether this TimeCode is greater than or equal to another given TimeCode.
Parameters
t2:TimeCode — The TimeCode to compare.
|
Boolean |
lessThan | () | method |
public function lessThan(t2:TimeCode):Boolean
Indicates whether this TimeCode is less than another given TimeCode.
Parameters
t2:TimeCode — The TimeCode to compare.
|
Boolean |
lessThanOrEqualTo | () | method |
public function lessThanOrEqualTo(t2:TimeCode):Boolean
Indicates whether this TimeCode is less than or equal to another given TimeCode.
Parameters
t2:TimeCode — The TimeCode to compare.
|
Boolean |
maxValue | () | method |
public static function maxValue(frameRate:SmpteFrameRate):Number
Gets the maximum TimeCode value of a known frame rate. The Max value for Timecode.
Parameters
frameRate:SmpteFrameRate — The frame rate to get the max value.
|
Number — The maximum TimeCode value for the given frame rate.
|
minus | () | method |
public function minus(t2:TimeCode):TimeCode
Subtracts a specified TimeCode from this TimeCode.
Parameters
t2:TimeCode — The TimeCode to subtract.
|
TimeCode |
notEqualTo | () | method |
public function notEqualTo(t2:TimeCode):Boolean
Indicates whether this TimeCode is not equal to another given TimeCode.
Parameters
t2:TimeCode — The TimeCode to compare.
|
Boolean |
parseFramerate | () | method |
public static function parseFramerate(rate:Number):SmpteFrameRate
Parses a framerate value as double and converts it to a member of the SmpteFrameRate enumeration.
Parameters
rate:Number — Double value of the framerate.
|
SmpteFrameRate |
plus | () | method |
public function plus(t2:TimeCode):TimeCode
Adds a specified TimeCode to this TimeCode.
Parameters
t2:TimeCode — The TimeCode to add.
|
TimeCode |
smpte12MToTicks27Mhz | () | method |
public static function smpte12MToTicks27Mhz(timeCode:String, rate:SmpteFrameRate):Number
Returns the value of the provided time code string and framerate in 27Mhz ticks.
Parameters
timeCode:String — The SMPTE 12M formatted time code string.
| |
rate:SmpteFrameRate — The SMPTE framerate.
|
Number |
subtract | () | method |
public function subtract(ts:TimeCode):TimeCode
Subtracts the specified TimeCode from this instance.
Parameters
ts:TimeCode — A TimeCode.
|
TimeCode |
ticks27MhzToAbsoluteTime | () | method |
public static function ticks27MhzToAbsoluteTime(ticks27Mhz:Number):Number
Converts the specified absolute time to absolute time.
Parameters
ticks27Mhz:Number — Ticks 27Mhz to be converted.
|
Number |
ticks27MhzToPcrTb | () | method |
public static function ticks27MhzToPcrTb(ticks27Mhz:Number):Number
Converts from 27Mhz ticks to PCRTb.
Parameters
ticks27Mhz:Number — >The number of 27Mhz ticks to convert from.
|
Number |
ticks27MhzToSmpte12M | () | method |
public static function ticks27MhzToSmpte12M(ticks27Mhz:Number, rate:SmpteFrameRate):String
Returns a SMPTE 12M formatted time code string from a 27Mhz ticks value.
Parameters
ticks27Mhz:Number — 27Mhz ticks value.
| |
rate:SmpteFrameRate — The SMPTE time code framerate desired.
|
String |
ticksPcrTbToAbsoluteTime | () | method |
public static function ticksPcrTbToAbsoluteTime(ticksPcrTb:Number):Number
Converts the specified absolute time to absolute time.
Parameters
ticksPcrTb:Number — Ticks PCRTb to be converted.
|
Number |
toString | () | method |
public function toString():String
Returns the SMPTE 12M string representation of the value of this instance.
ReturnsString — A string that represents the value of this instance. The return value is
of the form: hh:mm:ss:ff for non-drop frame and hh:mm:ss;ff for drop frame code
with "hh" hours, ranging from 0 to 23, "mm" minutes
ranging from 0 to 59, "ss" seconds ranging from 0 to 59, and "ff" based on the
chosen framerate to be used by the time code instance.
|
toStringAtFramerate | () | method |
public function toStringAtFramerate(rate:SmpteFrameRate = null):String
Returns the SMPTE 12M string representation of the value of this instance.
Parameters
rate:SmpteFrameRate (default = null )
|
String |
toTicks27Mhz | () | method |
public function toTicks27Mhz():Number
Returns the value of this instance in 27 Mhz ticks.
ReturnsNumber |
toTicksPcrTb | () | method |
public function toTicksPcrTb():Number
Returns the value of this instance in MPEG 2 PCR time base (PcrTb) format.
ReturnsNumber |
validateSmpte12MTimecode | () | method |
public static function validateSmpte12MTimecode(timeCode:String):Boolean
Validates that the string provided is in the correct format for SMPTE 12M time code.
Parameters
timeCode:String — String that is the time code.
|
Boolean |
MILLISECONDS_PER_DAY | Constant |
public static const MILLISECONDS_PER_DAY:Number = 86400000
The number of milliseconds in one day
MILLISECONDS_PER_HOUR | Constant |
public static const MILLISECONDS_PER_HOUR:Number = 3600000
The number of milliseconds in one hour
MILLISECONDS_PER_MINUTE | Constant |
public static const MILLISECONDS_PER_MINUTE:Number = 60000
The number of milliseconds in one minute
MILLISECONDS_PER_SECOND | Constant |
public static const MILLISECONDS_PER_SECOND:Number = 1000
The number of milliseconds in one second
MIN_VALUE | Constant |
public static const MIN_VALUE:Number = 0
The minimum TimeCode value. This field is read-only.
SMPTEREGEXP | Constant |
public static const SMPTEREGEXP:RegExp
Regular expression object used for validating timecode.
TICKS_PER_DAY | Constant |
public static const TICKS_PER_DAY:Number = 864000000000
The number of ticks in one day
TICKS_PER_DAY_ABSOLUTE_TIME | Constant |
public static const TICKS_PER_DAY_ABSOLUTE_TIME:Number = 86400
The number of absolute time ticks in 1 day.
TICKS_PER_HOUR | Constant |
public static const TICKS_PER_HOUR:Number = 36000000000
The number of ticks in one hour
TICKS_PER_HOUR_ABSOLUTE_TIME | Constant |
public static const TICKS_PER_HOUR_ABSOLUTE_TIME:Number = 3600
The number of absolute time ticks in 1 hour.
TICKS_PER_MILLISECOND | Constant |
public static const TICKS_PER_MILLISECOND:Number = 10000
The number of ticks in one millisecond
TICKS_PER_MILLISECOND_ABSOLUTE_TIME | Constant |
public static const TICKS_PER_MILLISECOND_ABSOLUTE_TIME:Number = 0.001
The number of absolute time ticks in 1 millisecond. This field is constant.
TICKS_PER_MINUTE | Constant |
public static const TICKS_PER_MINUTE:Number = 600000000
The number of ticks in one minute
TICKS_PER_MINUTE_ABSOLUTE_TIME | Constant |
public static const TICKS_PER_MINUTE_ABSOLUTE_TIME:Number = 60
The number of absolute time ticks in one minute
TICKS_PER_SECOND | Constant |
public static const TICKS_PER_SECOND:Number = 10000000
The number of ticks in one second
TICKS_PER_SECOND_ABSOLUTE_TIME | Constant |
public static const TICKS_PER_SECOND_ABSOLUTE_TIME:Number = 1
The number of absolute time ticks in one second