I set a path in the VideoViewDemo. code public void onCreate(Bundle icicle) { super.onCreate(icicle); setContentView(R.layout.videoview); mVideoView = (VideoView) findViewById(R.id.surface_view); path="rtsp://125.76.233.38/h263.3gp"; mVideoView.setVideoPath(path); mVideoView.setMediaController(new MediaController(this)); mVideoView.requestFocus();
} log I/ActivityManager( 582): Starting activity: Intent { comp= {com.example.android.apis/ com.example.android.apis.media.VideoViewDemo} } V/VideoView( 801): reset duration to -1 in openVideo I/ActivityManager( 582): Displayed activity com.example.android.apis/.media.VideoViewDemo: 1462 ms E/PlayerDriver( 554): Command PLAYER_INIT completed with an error or info PVMFFailure E/MediaPlayer( 801): error (1, -1) E/MediaPlayer( 801): Error (1,-1) D/VideoView( 801): Error: 1,-1 D/dalvikvm( 625): GC freed 249 objects / 11504 bytes in 406ms W/InputManagerService( 582): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub $pr...@43730bf8 D/dalvikvm( 622): GC freed 5462 objects / 295464 bytes in 155ms D/dalvikvm( 675): GC freed 862 objects / 45728 bytes in 123ms I don't konw why these could happen. I find that if the emulator or mobile could not connect to the internet,these errors also could be happened. ____________________________________________________________________________________________ On Aug 27, 12:35 am, "Balwinder Kaur (T-Mobile USA)" <balwinder.k...@t- mobile.com> wrote: > It may not be a good idea to use Classes from the com.android.camera > package since that is not part of the SDK. The MovieView is an > internal class are classes used by the Camera app. > > Did you try using the VideoView class, with the setVideoURI > ("rtsp://... ") method? > > http://developer.android.com/reference/android/widget/VideoView.html#...) > > You can check out sample code for the VideoView > athttp://developer.android.com/guide/samples/ApiDemos/src/com/example/a.... > > If problems still persist, please post your code here. > > Balwinder Kaur > > Open Source Development Center > ·T· · ·Mobile· stick together > The views, opinions and statements in this email are those of the > author solely in their individual capacity, and do not necessarily > represent those of T-Mobile USA, Inc. > > On Aug 25, 8:05 pm, yjshi <shiyaju...@gmail.com> wrote: > > > The code is in the following. > > Uri uri=Uri.parse(url); > > Intent intent =new Intent(); > > intent.setDataAndType(uri, "video/*"); > > intent.setClassName("com.android.camera", > > "com.android.camera.MovieView"); > > intent.setAction(Intent.ACTION_VIEW); > > startActivity(intent); > > url is a internet address begin with "http://" or"rtsp://". > > _________________________________________________________________________________________ > > > On Aug 25, 11:26 pm, "Balwinder Kaur (T-Mobile USA)" <balwinder.k...@t- > > > mobile.com> wrote: > > > You have not setup the MediaPlayer properly that is why you have an > > > error. Could you please post your code ? > > > Also, I guess you mean VideoView not MovieView (although I do some > > > references to a MovieView in the documentation for MediaStore) > > > > Balwinder Kaur > > > Open Source Development Center > > > ·T· · ·Mobile· stick together > > > > The views, opinions and statements in this email are those of the > > > author solely in their individual capacity, and do not necessarily > > > represent those of T-Mobile USA, Inc. > > > > On Aug 25, 3:57 am, yjshi <shiyaju...@gmail.com> wrote: > > > > > I use the movieview.java to playback the movie comes from the > > > > internet.In a activity ,I wrote a Intent that jump to the movieview > > > > and pass the movieview a url.But after several seconds,It is closed > > > > because something is wrong. > > > > > ________________________________________________________________________ > > > > W/InputManagerService( 1075): Starting input on non-focused client > > > > com.android.internal.view.iinputmethodclient$stub$pr...@437bc7f0 > > > > (uid=10003 pid=1305) > > > > W/IInputConnectionWrapper( 1305): showStatusIcon on inactive > > > > InputConnection > > > > I/ActivityManager( 1075): Displayed activity > > > > com.android.stk/.StkDialogActivity: 439 ms (total 439 ms) > > > > V/VideoView( 1305): reset duration to -1 in openVideo > > > > W/IInputConnectionWrapper( 1119): showStatusIcon on inactive > > > > InputConnection > > > > E/PlayerDriver( 1030): Command PLAYER_PREPARE completed with an error > > > > or info PVMFFailure > > > > W/PlayerDriver( 1030): PVMFInfoErrorHandlingComplete > > > > E/MediaPlayer( 1305): error (1, -1) > > > > E/MediaPlayer( 1305): Error (1,-1) > > > > D/VideoView( 1305): Error: 1,-1 > > > > E/MediaPlayer( 1305): stop called in state 0 > > > > E/MediaPlayer( 1305): error (-38, 0) > > > > W/MediaPlayer( 1305): mediaplayer went away with unhandled events > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Beginners" group. To post to this group, send email to android-beginners@googlegroups.com To unsubscribe from this group, send email to android-beginners-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-beginners?hl=en -~----------~----~----~----~------~----~------~--~---