Thanks a lot. I fixed the surface initialization part and got the code working. David
On Jun 17, 4:02 pm, Freepine <[email protected]> wrote: > Not clear about how you defined g_surface, but yes, the surface type should > be LayerBuffer for video playback, which can be specified by a flag > ePushBuffers > at creation time. > > On Wed, Jun 17, 2009 at 5:08 PM, dglushko <[email protected]> wrote: > > > 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 [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-framework?hl=en -~----------~----~----~----~------~----~------~--~---
