Hi, I have the following native source code that is supposed to display video. It plays 3gp file ok and I can hear the audio, but the video is not shown.
Code: // Global surface initialized elsewhere extern sp<Surface> g_surface; void media_player_test(void) { MediaPlayer *mp; mp = new MediaPlayer(); if(mp == NULL) { return; } mp->setDataSource("/data/local/video.3gp"); mp->setVideoSurface(g_surface); mp->prepare(); mp->start(); } End of code In Java I manage to play video with almost the same implementation. The only difference I can see is that Java code calls setType() for the surface holder. I can't find a matching operation for setType() in native code. Is it important? One more thing, I tried with and without listeners/callbacks, but the video still doesn't play. Thank you. David --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "android-framework" group. To post to this group, send email to android-framework@googlegroups.com To unsubscribe from this group, send email to android-framework+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-framework?hl=en -~----------~----~----~----~------~----~------~--~---