Hello everyone, I am having a strange issue when attempting to play movie(s) (various sizes, H264 encoded) on HTC Thunderbolt (Android 2.3). I create a surface view, which is to be placed on top of a NativeWindow, with SurfaceView.setZOrderOnTop(true). Then I pass this surface to the media player. This works successfully on several devices but fails on the Thunderbolt.
I was hoping that someone here could help me make some sense out of the logcat messages that are generated during this process. Specifically, I was wondering what I can do to find out why "Create Overlay Failed".
----- BEGIN LOGCAT ------
I/AwesomePlayer(1519): format=00000015, surface:00041A88, decoded W/H = 1024/768, video W/H=1024/768
D/StagefrightSurfaceOutput7630(1519): StagefrightSurfaceOutput7x30::createRenderer color format:21 overlayswitch 0
D/StagefrightSurfaceOutput7630(1519): StagefrightSurfaceOutput7x30::createRenderer componentName:OMX.qcom.video.decoder.avc
D/StagefrightSurfaceOutput7630(1519): StagefrightSurfaceOutput7x30::createRenderer QComHardwareOverlayRenderer
D/QComHardwareOverlayRenderer(1519): VideoMode 0
E/QComHardwareOverlayRenderer(1519): Create Overlay Failed - Overlay ref is NULL
E/StagefrightSurfaceOutput7630(1519): Create Overlay Renderer failed
E/StagefrightSurfaceOutput7630(1519): error: StagefrightSurfaceOutput7x30::createRenderer returning NULL!
W/OMX(1519): Using software renderer.
W/SoftwareRenderer(1519): ISurface failed to register buffers (0xffffffda)
E/MediaPlayer(5865): error (1, -19)
E/MediaPlayer(5865): Error (1,-19)
---- END LOGCAT ----
here is the solution:
for Androids with os less than 3.0, the following call is necessary during the SurfaceView creation: