Re: [android-developers] VideoView and MediaPlayer
Look at the source code... Thanks, Justin Anderson MagouyaWare Developer http://sites.google.com/site/magouyaware On Wed, Sep 19, 2012 at 12:16 PM, bob b...@coolfone.comze.com wrote: Can someone help me understand the relationship between VideoView and MediaPlayer? Does one use the other under the hood? I'm partly wondering this because MediaPlayer has setOnSeekCompleteListener, and I would like to do something like this with a VideoView. -- 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 -- 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] VideoView and MediaPlayer
Bingo. 51http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/4.1.1_r1/android/widget/VideoView.java#51 *public* *class* VideoView *extends* SurfaceViewhttp://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/4.1.1_r1/android/view/SurfaceView.java#SurfaceView *implements* MediaPlayerControlhttp://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/4.1.1_r1/android/widget/MediaController.java#MediaController.MediaPlayerControl { 52http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/4.1.1_r1/android/widget/VideoView.java#52 *private* Stringhttp://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/6-b14/java/lang/String.java#String TAG = VideoView; 53http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/4.1.1_r1/android/widget/VideoView.java#53 // settable by the client 54http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/4.1.1_r1/android/widget/VideoView.java#54 *private* Urihttp://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/4.1.1_r1/android/net/Uri.java#Uri mUri; 55http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/4.1.1_r1/android/widget/VideoView.java#55 *private* Maphttp://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/6-b14/java/util/Map.java#Map Stringhttp://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/6-b14/java/lang/String.java#String , Stringhttp://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/6-b14/java/lang/String.java#String mHeaders; 56http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/4.1.1_r1/android/widget/VideoView.java#56 *private* *int* mDuration; 57http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/4.1.1_r1/android/widget/VideoView.java#57 58http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/4.1.1_r1/android/widget/VideoView.java#58 // all possible internal states 59http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/4.1.1_r1/android/widget/VideoView.java#59 *private* *static* *final* *int* STATE_ERROR = -1; 60http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/4.1.1_r1/android/widget/VideoView.java#60 *private* *static* *final* *int* STATE_IDLE = 0; 61http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/4.1.1_r1/android/widget/VideoView.java#61 *private* *static* *final* *int* STATE_PREPARING = 1; 62http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/4.1.1_r1/android/widget/VideoView.java#62 *private* *static* *final* *int* STATE_PREPARED = 2; 63http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/4.1.1_r1/android/widget/VideoView.java#63 *private* *static* *final* *int* STATE_PLAYING= 3; 64http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/4.1.1_r1/android/widget/VideoView.java#64 *private* *static* *final* *int* STATE_PAUSED = 4; 65http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/4.1.1_r1/android/widget/VideoView.java#65 *private* *static* *final* *int* STATE_PLAYBACK_COMPLETED = 5; 66http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/4.1.1_r1/android/widget/VideoView.java#66 67http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/4.1.1_r1/android/widget/VideoView.java#67 // mCurrentState is a VideoView object's current state. 68http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/4.1.1_r1/android/widget/VideoView.java#68 // mTargetState is the state that a method caller intends to reach. 69http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/4.1.1_r1/android/widget/VideoView.java#69 // For instance, regardless the VideoView object's current state, 70http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/4.1.1_r1/android/widget/VideoView.java#70 // calling pause() intends to bring the object to a target state 71http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/4.1.1_r1/android/widget/VideoView.java#71 // of STATE_PAUSED. 72http://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/4.1.1_r1/android/widget/VideoView.java#72 *private* *int* mCurrentState = STATE_IDLEhttp://grepcode.com/file/repository.grepcode.com/java/ext/com.google.android/android/4.1.1_r1/android/widget/VideoView.java#VideoView.0STATE_IDLE
[android-developers] VideoView and MediaPlayer
Can someone help me understand the relationship between VideoView and MediaPlayer? Does one use the other under the hood? I'm partly wondering this because MediaPlayer has setOnSeekCompleteListener, and I would like to do something like this with a VideoView. -- 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] VideoView and MediaPlayer
Hello, I am trying to find out what's an equivalent to the release() method of MediaPlayer in VideoView? I am running out of memory coz I think I am not calling a release() method on all my Media Player resources. I have a number of instances of VideoView and I want to make sure I give up resources everytime a new instance is called. Any help? Thanks 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