Hi Sandeep, even I am thinking to make a similar mediaplayer.
Please tell how you achieved it? cygwin is needed for using JNI? and how to proceed. Thanks kavitha On Fri, Mar 12, 2010 at 11:07 AM, Sandeep Prakash <123sa...@gmail.com>wrote: > Hi All, > > I was trying to mimic the MediaPlayer Java interface provided by the > Android Framework by writing a similar Java-JNI layers. I have found > one observation regarding this. > > case 1: The Java layer is very similar to the MediaPlayer.java code. > But on the JNI side, I am creating a thread ("pthread" to be > specific). This thread I will be using to send "start", "stop", > "pause" etc commands to the mediaplayer class in cpp. In this case I > am able to play the video file but Video is not visible. Audio is > playing fine!!! > > case 2: Tha Java layer again is very similar to the MediaPlayer.java > code. But now I will not create a thread, but I will be using the UI > thread itself (JNI Layer) to send "start", "stop", "pause" etc > commands to the mediaplayer class in cpp. Now both Audio-Video is > playing fine. > > Why there is a difference in behaviour in these 2 cases? Is it because > there is an extra thread in between the Java and the MediaPlayer > service? Even if there is thread why the difference in behaviour? > > Kindly provide the reasons and the architecture used for rendering > frames. > > Thanks in advance.... > Sandeep > > -- > 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<android-developers%2bunsubscr...@googlegroups.com> > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en -- 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