Hi all,
No matter if I build the surfaceView dynamically or through a layout.xml
because I have hardwareAccerlerated="true" in my manifest
I get a black window and hear the audio of the video when played
video_view = new SurfaceView(ctx);
screen.addView(video_view, new LayoutParams(1020, 600));
video_holder = video_view.getHolder();
try {
mp = new MediaPlayer();
mp.setDataSource(fName);
mp.setDisplay(video_holder);
mp.setOnBufferingUpdateListener(this);
mp.setOnCompletionListener(this);
mp.setOnPreparedListener(this);
mp.setOnVideoSizeChangedListener(this);
mp.setAudioStreamType(AudioManager.STREAM_MUSIC);
} catch (IOException e) {
e.printStackTrace();
}
screen is a FrameLayout, upon which the SurfaceView is placed
11-18 09:22:04.769: E/Video Media(24116): VIDEO Initalized
[/sdcard/DCIM/Videos/Lazy J_Crystal_20110813_102429.3gp]
11-18 09:22:04.799: D/dalvikvm(24116): GC_CONCURRENT freed 5K, 3% free
20082K/20679K, paused 2ms+3ms
11-18 09:22:04.839: E/Video Media(24116): VIDEO loaded
[/sdcard/DCIM/Videos/Lazy J_Crystal_20110813_102429.3gp]
11-18 09:22:04.919: E/Surface(24116): surface (identity=1297) is
invalid, err=-19 (No such device)
11-18 09:22:04.929: D/CallStack(24116): Surface#00 pc 00013b5e
/system/lib/libsurfaceflinger_client.so
11-18 09:22:04.929: D/CallStack(24116): Surface#01 pc 00013b9c
/system/lib/libsurfaceflinger_client.so
11-18 09:22:04.929: D/CallStack(24116): Surface#02 pc 00013c1a
/system/lib/libsurfaceflinger_client.so
11-18 09:22:04.929: D/CallStack(24116): Surface#03 pc 00004f38
/system/lib/libEGL.so
11-18 09:22:04.929: D/CallStack(24116): Surface#04 pc 00036dca
/system/lib/libandroid_runtime.so
The invalid, err=-19 only appears when the hardwareAccelerated="true"
is in the manifest
Thus How does one create a surfaceview when you must have
hardwareaccelerated ?
Thanks in advance
--
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