Video lag at start and stability problems in Android 4 (ICS) when using Video and StageVideo
I'm experiencing some problems with video playback in a Samsung Galaxy Tab 2 tablet, which comes with Android 4 (Ice Cream Sandwich).
In Android 3 (Honeycomb) and 2 (Gingerbread and Froyo) video playback worked perfectly and started with no lag, but in Android 4 video takes like a couple of seconds to start, showing nothing during that time.
This problem happens when using either Video and StageVideo objects, but when using StageVideo, there's also another problem: When playing back a second video after having closed the first, even after some minutes, when starting the next video I can see during those couple of seconds a still image of the previous video, in the part where it was stopped. Why?
None of this happened in Android 3 and 2, so I don't think it's something related to my code (and I've reviewed it several times to try and find a solution). This seems to be an Android 4 specific issue with AIR, since I've tried several Android 4 tablets of different brands and all of them show this behaviour. I've tried with AIR 3.1, 3.2 and 3.3 beta, and this problem happens in all three.
Also, there are some random stability problems if the app goes to sleep while playing a video. Sometimes, it doesn't wake up properly and freezes, giving you a "force close" Android message. Sometimes it wakes up properly but the video doesn't show or it's paused. All of this in "CPU" mode. In "Direct" mode it seems to work a little better.
BTW, can someone explain what's exactly the new "Direct" mode. I know it's needed for Stage3D, but I don't know why there's that specific mode, when there's GPU mode. Isn't Stage3D supposed to use the device's GPU? Well, Direct mode seems to be "better" than GPU in that filter effects work, whereas GPU mode doesn't support filters, so if you can use Stage3D while using filter effects, that's great.
