cocoa touch - What is the time scale portion of a CMTime? -


i've been looking @ documentation associated creating cmtimes. functions (cmtimemake(), cmtimemakewithseconds(), etc.) take second parameter called preferredtimesale.

can explain me is, , why specified in way?

according opening paragraphs of apple's cmtime documentation:

a cmtime represented rational number, numerator (an int64_t value), , denominator (an int32_t timescale). conceptually, timescale specifies fraction of second each unit in numerator occupies. if timescale 4, each unit represents quarter of second; if timescale 10, each unit represents tenth of second, , on. in addition simple time value, cmtime can represent non-numeric values: +infinity, -infinity, , indefinite. using flag cmtime indicates whether time been rounded @ point.

so, if timescale 4, each single unit of time measurement 1 quarter second.

if timescale 1, each single unit of time measurement 1 second (but quite slow animation user).

many video formats use timescale of 600:

you use timescale of 600, since common multiple of several commonly-used frame-rates: 24 frames per second (fps) film, 30 fps ntsc (used tv in north america , japan), , 25 fps pal (used tv in europe). using timescale of 600, can represent number of frames in these systems.


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -