Look in the ApiDemos sample in the SDK at the MediaPlayerDemo_Video example to see how to set things up for Android.
- Brian dglushko wrote: > Ok, I understand. > What will be better place to post this question? > Thank you, > David > > On Jun 16, 11:02 pm, Marco Nelissen <marc...@android.com> wrote: > >> This group is about developing using the Android SDK, which is Java only. >> >> On Tue, Jun 16, 2009 at 9:01 AM, dglushko <dglus...@gmail.com> 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 Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---