This group is about developing using the Android SDK, which is Java only.

On Tue, Jun 16, 2009 at 9:01 AM, 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 Developers" 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-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to