13.08.2012 Views

ACTIONSCRIPT 3 Developer’s Guide en

ACTIONSCRIPT 3 Developer’s Guide en

ACTIONSCRIPT 3 Developer’s Guide en

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>ACTIONSCRIPT</strong> 3.0 DEVELOPER’S GUIDE<br />

Working with video<br />

var currColorSpace:String;<br />

//StageVideoEv<strong>en</strong>t.RENDER_STATE ev<strong>en</strong>t handler<br />

private function stageVideoR<strong>en</strong>derState(ev<strong>en</strong>t:Object):void<br />

{<br />

//...<br />

currColorSpace = (ev<strong>en</strong>t as StageVideoEv<strong>en</strong>t).colorSpace;<br />

//...<br />

}<br />

If Flash Player cannot find a substitute for an unsupported color space, stage video uses the default color space BT.601.<br />

For example, video streams with H.264 <strong>en</strong>coding typically use the BT.709 color space. If the device hardware does not<br />

support BT.709, the colorSpace property returns "BT601". A StageVideoEv<strong>en</strong>t.colorSpace value of "unknown"<br />

indicates that the hardware does not provide a means of querying the color space.<br />

Note: In AIR 2.5 for TV, StageVideo does not support color spaces. The StageVideoEv<strong>en</strong>t.colorSpace property on this<br />

platform returns “BT709” to indicate hardware r<strong>en</strong>dering or “BT601” to indicate software r<strong>en</strong>dering.<br />

If your application deems the curr<strong>en</strong>t color space unacceptable, you can choose to switch from a StageVideo object to<br />

a Video object. The Video class supports all color spaces through software compositing.<br />

Last updated 6/6/2012<br />

519

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!