Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


MediaTime

Time representation for use with media containers.
Read time 1 minuteLast updated 10 days ago

Definition

public struct MediaTime

Remarks

A MediaTime can be thought of as "sample #
count
at
rate
Hz".
This representation is precise, even for large values, because the sample count and rate are stored separately and do not make use of floating point storage.

Static Fields

Value

Description

InvalidInvalid time value.

Constructors

Constructor

Description

MediaTime(System.Int64)Creates a time value with an integer number of seconds, using 1Hz for the rate.
MediaTime(System.Int64,System.UInt32,System.UInt32)Creates a time value for a specified sample count and rate.

Properties

Property

Description

countThe sample count for the time value.
rateThe rate used for converting the count into seconds.

Operators

Operator

Description

doubleReturns the time value expressed as a floating point number of seconds.