Re: [android-developers] video player

2013-01-06 Thread Jim Graham
On Sat, Jan 05, 2013 at 09:50:42AM -0800, laxman k wrote:
 how to play the video from url  with land scape and handling the buffer 
 loading

Start here:  http://developer.android.com/guide/index.html

Later,
   --jim

-- 
THE SCORE:  ME:  2  CANCER:  0
73 DE N5IAL (/4)  | Peter da Silva:  No, try rm -rf /
spooky1...@gmail.com  | Dave Aronson:As your life flashes before
 Running Mac OS X Lion  |  your eyes, in the unit of time known as an
ICBM / Hurricane: |  ohnosecond (alt.sysadmin.recovery)
   30.44406N 86.  59909W  |

-- 
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


[android-developers] video player

2013-01-05 Thread laxman k
how to play the video from url  with land scape and handling the buffer 
loading

-- 
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

[android-developers] Video Player for MP4 and MOV

2012-11-14 Thread CL
Dear Experts, 
 
I am thinking of developing my own Video Player for MP4 and MOV files.
Wonder where are the good resources to perform this task.
 
Are there any alternatives other than VLC?
 
Thanks!
 
CL

-- 
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

[android-developers] Video Player

2011-12-27 Thread Harshal Patel
Hi All,

I want to create a video player that plays video from remote location
that called my own web server. After playing video for first time it
stored in device memory automatically and then next time it check on
server for any changes for video i.e. length with same name, other
video then previous then and then it sync with server and load video
on device and replace with old one else it will play older video.

How to do I stuck in logic. I had seen how to store image but not
found for video. Video play online properly but can't store in device.

Please any guideline tutorial or sample program available??? then
please help me.

-- 
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


[android-developers] [Video Player] Question on Audio Timestamps

2011-10-06 Thread Ganesh
Dear Experts,

I have a question on the Audio-Video synchronization in an audio-
visual file playback on Gingerbread. From the sources, we can observe
that the video sub-system reads the timestamp from the audio sub-
system to take decisions on whether to delay/render/drop a frame. I am
referring to the AwesomePlayer::onVideoEvent method, in which the
TimeSource ts is set to mTimeSource which is nothing but mAudioPlayer
object.

The method used to retrieve the time is getRealTimeUs which basically
returns the timestamp based on the last known packet read from the
Audio Decoder as part of fillBuffer. From a practical perspective,
though this packet might have been read, it may not have been rendered
due to the buffering in the system. Hence, the time returned as part
of this call may not exactly match with the actual audio sample being
rendered.

Hence, my questions are:

1) Why did Android choose to use this as the Audio time reference and
not the underlying HAL or Audio driver time reference?

2) If the rationale is to have an uniform reference across multiple
HAL or low lying implementations, what are the design assumptions made
as part of this design?

3) AudioPlayer::fillBuffer is more of a pull model concept, where it
is scheduled as part of a callback implementation. If this is the
case, what should be the intervals (minimum and maximum allowed) at
which this callback/fillBuffer should be invoked?

Your answers would be helpful for understanding and analyzing the
system better. I look forward to your expert views and comments.

Many thanks in advance.

Best Regards,
Ganesh

-- 
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


[android-developers] VIDEO PLAYER Problem

2011-04-15 Thread Ansh
  Other recipients:   
  hey i m new to android and when i m trying to play a video file using the 
below code i m having the proble m tht its  not forwading (buffering is not 
being done)the video.and it is displying the first 
scene only.

HERE IS THE CODE:

package com.examples;

import java.io.InputStream;

import android.app.Activity;
import android.graphics.PixelFormat;
import android.net.Uri;
import android.os.Bundle;
import android.util.Log;
import android.widget.MediaController;
import android.widget.VideoView;

public class MediaVedio extends Activity {
/** Called when the activity is first created. */
private MediaController mc;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);

setContentView(R.layout.main);
   
  VideoView video = (VideoView) findViewById(R.id.videoView1);
  Uri uri = Uri.parse(android.resource:// +getPackageName()+ 
/+R.raw.ansh1);
  mc = new MediaController(MediaVedio.this);
  video.setMediaController(mc);  
  video.setVideoURI(uri);

  video.requestFocus();
  video.isPlaying();
  video.start();
  
}
}

-- 
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

[android-developers] video player

2010-10-02 Thread Ahmed Shoeib
hi,
i want to play video on android
can anyone help me to play video ?

thanks,

-- 
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


[android-developers] Video Player

2010-08-12 Thread Abhi
Hi

I am makiin a video player app and want to use my own progress bar
which when moved forward or backward moves the video with it at every
instant. The default progress bar that pops up in today's players only
plays back audio as the slider is moved and plays video from where the
slider is left off. I want to be able to see through my long video for
particular instances that I want to seek directly to. Is it possible
using available mediaplayer apis?

Abhi

-- 
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


[android-developers] video player using hardware to encode/decode

2010-06-08 Thread Android dev
I know that the mediaplayer api uses hardware acceleration to encode/
decode video.
Now I want to develop my own video player application without using
the mediaplayer api, but still using the hardware to encode/decode
video.
Any tips on how can I do this?

-- 
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


[android-developers] Video Player - Progress Bar

2010-03-28 Thread OrdinaryIndian
I am a newbie to Android and am in the process of writing a simple
**video player** app.

An activity that shows **a video**. And at the bottom a **progress
bar**.

I was reading about threads - Main (UI) Thread  Background (Worker)
Thread.

My **question** is which part should go into the Main Thread and which
one into the Background Thread? Any code snippets would be very
helpful.

Thanks.

-- 
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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] Video player

2010-03-25 Thread Abhi
Hi,

I want to create a better video picker for my player. What I am doing
today is

startActivityForResult( new Intent(Intent.ACTION_PICK,
android.provider.MediaStore.Video.Media.INTERNAL_CONTENT_URI),PICK_VIDEO);

but this brings up a basic list view. What I am trying to get is
something with thumbnails to make it easier to surf through the list
and pick the one he needs.

Any suggestions?

Abi

-- 
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

To unsubscribe from this group, send email to 
android-developers+unsubscribegooglegroups.com or reply to this email with the 
words REMOVE ME as the subject.


[android-developers] Video Player from xml list

2009-11-30 Thread WrVishnu
Hi

Does anyone has sample code for Video player with playlist as a xml
(all video is from URL)

If u have any code sample please share the same

I am new to the android development , any lead would be of gr8 help

-- 
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


[android-developers] Video Player Sample pls

2009-11-30 Thread WrVishnu
CAn someone give me sample video player prgramme to play the file from
a URL

Its urgent pls

Thanks
Vishnu

-- 
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


Re: [android-developers] Video Player Sample pls

2009-11-30 Thread Mark Murphy

 CAn someone give me sample video player prgramme to play the file from
 a URL

 Its urgent pls

http://github.com/commonsguy/vidtry

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
Android App Developer Books: http://commonsware.com/books.html


-- 
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


Re: [android-developers] Video Player Sample pls

2009-11-30 Thread vishnu prasad
Thanks for the reply

Will try and let u know
btw does is it work in emulator?

On Tue, Dec 1, 2009 at 1:10 PM, Mark Murphy mmur...@commonsware.com wrote:


  CAn someone give me sample video player prgramme to play the file from
  a URL
 
  Its urgent pls

 http://github.com/commonsguy/vidtry

 --
 Mark Murphy (a Commons Guy)
 http://commonsware.com
 Android App Developer Books: http://commonsware.com/books.html


 --
 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.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en




-- 
Thks and Regards
W.R.Vishnu Prasad
Mobile :+65-83060528

-- 
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

Re: [android-developers] Video Player Sample pls

2009-11-30 Thread Mark Murphy
 btw does is it work in emulator?

Not usually, no. The emulator is not very good at playing back video in
general, unless you have an extremely fast PC.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
Android App Developer Books: http://commonsware.com/books.html


-- 
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


Re: [android-developers] Video Player Sample pls

2009-11-30 Thread Suchand Ghosh
Please try as below. Use setDataSource(http:// your url) and
prepareAsync(), as it's a streaming playback from server;

private void openVideo() {
if (mUri == null || mSurfaceHolder == null) {
// not ready for playback just yet, will try again later
return;
}
// Tell the music playback service to pause
Intent i = new Intent(com.android.music.musicservicecommand);
i.putExtra(command, pause);
mContext.sendBroadcast(i);
// we shouldn't clear the target state, because somebody might have
// called start() previously
release(false);
try {
mMediaPlayer = new MediaPlayer();
mMediaPlayer.setOnPreparedListener(mPreparedListener);

mMediaPlayer.setOnVideoSizeChangedListener(mSizeChangedListener);
mDuration = -1;
mMediaPlayer.setOnCompletionListener(mCompletionListener);
mMediaPlayer.setOnErrorListener(mErrorListener);

mMediaPlayer.setOnBufferingUpdateListener(mBufferingUpdateListener);
mCurrentBufferPercentage = 0;
mMediaPlayer.setDataSource(mContext, mUri);
mMediaPlayer.setDisplay(mSurfaceHolder);
mMediaPlayer.setAudioStreamType(AudioManager.STREAM_MUSIC);
mMediaPlayer.setScreenOnWhilePlaying(true);
mMediaPlayer.prepareAsync();
// we don't set the target state here either, but preserve the
// target state that was there before.
mCurrentState = STATE_PREPARING;
attachMediaController();
} catch (IOException ex) {
Log.w(TAG, Unable to open content:  + mUri, ex);
mCurrentState = STATE_ERROR;
mTargetState = STATE_ERROR;
return;
} catch (IllegalArgumentException ex) {
Log.w(TAG, Unable to open content:  + mUri, ex);
mCurrentState = STATE_ERROR;
mTargetState = STATE_ERROR;
return;
}
}

Cheers...
Br,
Chand


On Tue, Dec 1, 2009 at 10:38 AM, WrVishnu wrvis...@gmail.com wrote:

 CAn someone give me sample video player prgramme to play the file from
 a URL

 Its urgent pls

 Thanks
 Vishnu

 --
 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.comandroid-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

Re: [android-developers] Video Player Sample pls

2009-11-30 Thread Desu Vinod Kumar
How to Open video on this player ...
can u please telll me

On Tue, Dec 1, 2009 at 10:54 AM, Mark Murphy mmur...@commonsware.comwrote:

  btw does is it work in emulator?

 Not usually, no. The emulator is not very good at playing back video in
 general, unless you have an extremely fast PC.

 --
  Mark Murphy (a Commons Guy)
 http://commonsware.com
 Android App Developer Books: http://commonsware.com/books.html


 --
 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.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en




-- 
Regards
---
Desu Vinod Kumar
vinny.s...@gmail.com
09176147148

-- 
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

Re: [android-developers] Video Player Sample pls

2009-11-30 Thread vishnu prasad
i tried the run the application when u keyin the URL and pressed the DONE .
but video is not palyed seems no action is happening when pressing the done
button.

btw i am running the emulator on 2.0 sdk

Thanks
Vishnu

On Tue, Dec 1, 2009 at 1:32 PM, Desu Vinod Kumar vinny.s...@gmail.comwrote:

 How to Open video on this player ...
 can u please telll me

 On Tue, Dec 1, 2009 at 10:54 AM, Mark Murphy mmur...@commonsware.comwrote:

  btw does is it work in emulator?

 Not usually, no. The emulator is not very good at playing back video in
 general, unless you have an extremely fast PC.

 --
   Mark Murphy (a Commons Guy)
 http://commonsware.com
 Android App Developer Books: http://commonsware.com/books.html


 --
 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.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en




 --
 Regards
 ---
 Desu Vinod Kumar
 vinny.s...@gmail.com
 09176147148

  --
 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.comandroid-developers%2bunsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/android-developers?hl=en




-- 
Thks and Regards
W.R.Vishnu Prasad
Mobile :+65-83060528

-- 
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

Re: [android-developers] Video Player Sample pls

2009-11-30 Thread Mark Murphy

 i tried the run the application when u keyin the URL and pressed the DONE
 .
 but video is not palyed seems no action is happening when pressing the
 done
 button.

 btw i am running the emulator on 2.0 sdk

Again, playing back video on an emulator, let alone streaming video, may
or may not work. IMHO, you definitely need to test video playback on
hardware.

-- 
Mark Murphy (a Commons Guy)
http://commonsware.com
Android App Developer Books: http://commonsware.com/books.html


-- 
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


[android-developers] Video player

2009-05-31 Thread Priya

Hi,

I have coded a vodeoplayer app both via sd card  stream.It plays
correctly.
But i have a problem, sometimes the .wmv file runs perfectly but
sometime i can only listen to the sound with blank screen.

can anybody help in resolving this.

Thanks in advance...

Priya

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



[android-developers] Video player resize

2009-03-26 Thread buway

Hello all:
 if any one knows how to change video size at run time. If
using holder.setFixedSize(mVideoWidth, mVideoHeight) method, the frame
actually became larger, but it always fill videoview no matter what
mVideoWidth mVideoHeight settings.

many thanks!
buway

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



[android-developers] Video player resize

2009-03-26 Thread buway

Hello all:
 if any one knows how to change video size or full screen at
run time. If using holder.setFixedSize(videoWidth, videoHeight)
method, the video actually become larger, but it always fit the
VideoView no matter what videoWidth videoHeight settings.

many thanks!
buway

--~--~-~--~~~---~--~~
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
-~--~~~~--~~--~--~---



[android-developers] video player problem

2009-03-05 Thread manoj

Hi,

I have written a small app which plays video files. Some files are
playing nicely.

but some files's view is not visible, but I am able to listen the
audio.

I dont know why?

Can any one please suggest me where I am doing the wrong?

here is my code:

package bluemediaLab.vodcast1;



import android.app.Activity;
import android.media.MediaPlayer;
import android.os.Bundle;
import android.util.Log;
import android.view.SurfaceHolder;
import android.view.SurfaceView;
import android.widget.Toast;


public class MediaPlayerDemo_Video extends Activity implements
MediaPlayer.OnBufferingUpdateListener,
MediaPlayer.OnCompletionListener,
MediaPlayer.OnPreparedListener, SurfaceHolder.Callback {

private static final String TAG = MediaPlayerDemo;
private int mVideoWidth;
private int mVideoHeight;
private MediaPlayer mMediaPlayer;
private SurfaceView mPreview;
private SurfaceHolder holder;
private String path;
private Bundle extras;
private static final String MEDIA = media;
private static final int LOCAL_AUDIO = 1;
private static final int STREAM_AUDIO = 2;
private static final int RESOURCES_AUDIO = 3;
private static final int LOCAL_VIDEO = 4;
private static final int STREAM_VIDEO = 5;

/**
 *
 * Called when the activity is first created.
 */
public void onCreate(Bundle icicle) {
super.onCreate(icicle);
setContentView(R.layout.mediaplayer_2);
mPreview = (SurfaceView) findViewById(R.id.surface);
holder = mPreview.getHolder();
holder.addCallback(this);
holder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS);
extras = getIntent().getExtras();

}

private void playVideo(Integer Media) {
try {

switch (Media) {
case LOCAL_VIDEO:
/*
 * TODO: Set the path variable to a local media
file path.
 */
path = ;
if (path == ) {
// Tell the user to provide a media file URL.
Toast
.makeText(
MediaPlayerDemo_Video.this,
Please edit
MediaPlayerDemo_Video Activity, 
+ and set the path
variable to your media file path.
+  Your media file
must be stored on sdcard.,
Toast.LENGTH_LONG).show();

}
break;
case STREAM_VIDEO:
/*
 * TODO: Set path variable to progressive
streamable mp4 or
 * 3gpp format URL. Http protocol should be used.
 * Mediaplayer can only play progressive
streamable
 * contents which basically means: 1. the movie
atom has to
 * precede all the media data atoms. 2. The clip
has to be
 * reasonably interleaved.
 *
 */
   // path = http://feeds.nos.nl/~r/journaal/
~5/531307337/NOS_Journaal_VODcast_std_4-2-2009_7_00_53.mp4;
path = extras.getString(MediaFileName);
if (path == ) {
// Tell the user to provide a media file URL.
Toast
.makeText(
MediaPlayerDemo_Video.this,
Please edit
MediaPlayerDemo_Video Activity,
+  and set the path
variable to your media file URL.,
Toast.LENGTH_LONG).show();

}

break;


}

// Create a new media player and set the listeners
mMediaPlayer = new MediaPlayer();
mMediaPlayer.setDataSource(path);
mMediaPlayer.setDisplay(holder);
//mMediaPlayer.prepare();
mMediaPlayer.prepareAsync();// added by manoj on 28-2-9,
its suggestion from the media api, for streams.
mMediaPlayer.setOnBufferingUpdateListener(this);
//mMediaPlayer.setOnCompletionListener(this);//commented
by manoj.
mMediaPlayer.setOnPreparedListener(this);
//mMediaPlayer.setAudioStreamType
(AudioManager.STREAM_MUSIC);


} catch (Exception e) {
Log.e(TAG, error:  + e.getMessage(), e);
}
}

public void onBufferingUpdate(MediaPlayer arg0, int percent) {
Log.d(TAG, onBufferingUpdate percent: + percent);

if(arg0.isPlaying())
{
Log.i(isPlaying() is ,true);
}
else
{
Log.i(isPlaying() is ,false);


}

if(percent == 100)
{