I am wondering if someone who has handled NetStream.appendBytes
in Flash knows how to get the bitmapData
from a decoded video frame? I have already looked at this question but that is from 3 years ago and the more recent comment/answer seems to be gone. In 2014 has anyone managed to turn those bytes into a bitmap? I am working with Flash Player 11.8 and this is not a desktop/AIR app.
In the image below I can do steps 1) and 2) but there's a brick wall at step 3)
The problem is that simply using bitmapdata.draw(video_container);
does not work but instead it throws a Policy File error even though I am using a byteArray
(from local video file in the same directory as the SWF). No internet is even involved but Flash tells me that "No Policy File granted permission from the server"
or such nonsense. I think the error is just a bail-out insteading of straight up saying "You are not allowed to do this.."
I have tried: trying to appease this Crossdomain.xml
issue anyway and looking into all known security/domain settings. I came to the conclusion that the error is not the problem but a side effect of the issue.. The issue here being that: Flash Player
is aware of the SWF's location and of any files local to it. That's okay when you pass a String
as URL etc but when the Netstream
data is not local to the SWF domain then it becomes a Policy File issue. Problem is my data is in the Memory not in a folder like the SWF and therefore cannot alllow bitmapData.draw
since it cannot "police" an array of bytes, any known fixes for this?... (I can't even say the words I really wanted to use).
What I am trying to achieve: Is to essentially use Netstream as an H.263 or H.264 image decoder in the same way Loader
is a JPEG-to-Bitmap decoder or LoadCompressed..
is an MP3-to-PCM decoder. You know, access the raw material (here RGB pixels), apply some effects functions and then send to screen or save to disk.
NetStream.appendBytes
which do the inverse ( inject data into aNetStream
object ) ? – UnderbrushbitmapData
. It's really strange... – BromidicString
but instead I have aByte Array
(which is why the security error makes no sense, how can anyone "Policy File" a bytearray??). Anyway I think I found a possible solution just need time to double check it.. – Bromidic