ios - iOS4: how do I use video file as an OpenGL texture? -
i'm trying display contents of video file (let's without audio now) onto uv mapped 3d object in opengl. i've done fair bit in opengl have no idea begin in video file handling, , of examples out there seems getting video frames cameras, not i'm after. at moment feel if can individual frames of video cgimageref i'd set, i'm wondering how this? perhaps there better ways this? should start , what's straight forward file format video playback on ios? .mov? apologies; typing on iphone i'll little brief. create avurlasset url of video - can local file url if like. quicktime can fine, mov or m4v in h.264 best source. query asset tracks of type avmediatypevideo. should 1 unless source video has multiple camera angles of that, taking objectatindex:0 should give avassettrack want. use create avassetreadertrackoutput. want specify kcvpixelformattype_32bgra. create avassetreader using asset; attach asset reader track output output. , call start...