Sending a custom bytearray trough a netstream not working
Hi guys, first of all, (guys of Adobe) your doing a great job! Keep up the good work. However I do have a problem.
For a client, I want to build peer to peer video calling on tablets. Now this works like a charm, until you hit the huge echo.
Because we still don't have AEC for mobile, I want to fix it myself. So my plan is this:
- create a native extention that captures the mic sound (IOS).
- trow this sound trough the noise reduction and echo cancellation filter of IOS (which has a special chip for it).
- pass this filtered sound to air
- let air send it to the other peers.
Now the first part is not so hard, I have it almost all setup, but for some reason, I cant get my sound byte stream to the other peers. Because normally you would do something like netStream.attachMic() and netStream.attachCamera(). But because we have a custom bytestream, you cant use those api's (because we want to use netStream.appendBytes()). So, I need to construct a custom byte stream with filtered audio + video.
Now I have done that, but air keeps giving me the error "invalid param" when I do this:
_outgoingStream.appendBytes(pStream);
So I gues my stream is not valid, but valid for what? I just want to send these bytes accross.
My bytearray is constructed like this:
- nr of audio bytes
- audio bytes
- nr of video bytes (can be 0 when no new bitmapdata is constructed because of inactivity)
- video bytes
Anyone here who can help? If we can fix this, we have AEC for IOS (and soon for Android).
Cheers,
Marc Abbink from Holland
@Adobe: if you could give me an estimate of when AEC is implemented for mobile, than that would Really help.
