Ok then perhaps I'm barking up the wrong tree looking at hardware
acceleration
LayoutInflater inflater = (LayoutInflater)
getApplicationContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
view = inflater.inflate(R.layout.image_viewer, screen);
FrameLayout parent = (FrameLayout)
view.findViewById(R.id.image);
Log.e("main", "view is " + view.isHardwareAccelerated() );
Media image = null;
Log.e("main", "parent is " + parent.isHardwareAccelerated() );
image = new Media_Video (getApplicationContext() ,
parent , fName);
Log.e("main", "=============================================");
Log.e("main", "view is " + view.isHardwareAccelerated() );
Log.e("main", "parent is " + parent.isHardwareAccelerated() );
Log.e("main", "image is " + image.isHardwareAccelerated() );
Log.e("main", "screen is " + screen.isHardwareAccelerated() );
Log.e("main", "=============================================");
image.ButtonSetup(view);
screen.setOnTouchListener(image);
Where Media_Video has the following
video = (VideoView) screen.findViewById(R.id.video);
video.setKeepScreenOn(true);
video.setClickable(true);
video.setVideoPath(fName);
Log.i("video", "screen is " + screen.isHardwareAccelerated() );
Log.i("video", "video is " + video.isHardwareAccelerated() );
Log.w("video" , "How has focus " +
video.findFocus() );
Log.w("video" , "video Buffer " +
video.getBufferPercentage() );
Log.w("video" , "video Layer Type " +
video.getLayerType() );
Log.w("video" , "video Visibility " +
video.getVisibility() );
Log.w("video" , "video Screen On " +
video.getKeepScreenOn() );
Log.w("video" , "video is Clickable " +
video.isClickable() );
Log.w("video" , "video is Focusable " +
video.isFocusable() );
Log.w("video" , "video is Visibility " +
video.getVisibility() );
Log.w("video" , "video has a Holder " + (video.getHolder() ==
null) );
Log.w("video" , "video root View " +
video.getRootView() );
Log.w("video" , "video is Opaque " +
video.isOpaque() );
Log.w("video" , "video is Shown " +
video.isShown() );
Thus resulting in the following LogCat:
11-26 17:21:53.000: E/main(21376): screen is true
11-26 17:21:53.000: I/CHECK(21376): Child 0 is of type
LinearLayout
11-26 17:21:53.250: E/main(21376): view is true
11-26 17:21:53.250: E/main(21376): parent is true
11-26 17:21:53.250: I/video(21376): Media constructor
started
11-26 17:21:53.550: I/video(21376): Media constructor
CALLED
11-26 17:21:53.550: I/video(21376): Media_video constructor started
11-26 17:21:53.550: E/Video Media(21376): VIDEO Initalized
[/sdcard/DCIM/Videos/Lazy J_Crystal_20110813_102429.3gp]
11-26 17:21:53.550: I/video(21376): screen is true
11-26 17:21:53.550: I/video(21376): video is true
11-26 17:21:53.550: W/video(21376): How has focus
android.widget.VideoView@40d50d70
11-26 17:21:53.550: W/video(21376): video Buffer 0
11-26 17:21:53.550: W/video(21376): video Layer Type 0
11-26 17:21:53.550: W/video(21376): video Visibility 0
11-26 17:21:53.550: W/video(21376): video Screen On true
11-26 17:21:53.550: W/video(21376): video is Clickable true
11-26 17:21:53.550: W/video(21376): video is Focusable true
11-26 17:21:53.550: W/video(21376): video is Visibility 0
11-26 17:21:53.550: W/video(21376): video has a Holder false
11-26 17:21:53.550: W/video(21376): video root View
com.android.internal.policy.impl.PhoneWindow$DecorView@4098eb98
11-26 17:21:53.550: W/video(21376): video is Opaque true
11-26 17:21:53.550: W/video(21376): video is Shown true
11-26 17:21:53.610: E/main(21376):
=============================================
11-26 17:21:53.760: E/Surface(21376): surface (identity=3592) is
invalid, err=-19 (No such device)
11-26 17:21:53.770: D/CallStack(21376): Surface#00 pc 00013b5e
/system/lib/libsurfaceflinger_client.so
11-26 17:21:53.770: D/CallStack(21376): Surface#01 pc 00013b9c
/system/lib/libsurfaceflinger_client.so
11-26 17:21:53.770: D/CallStack(21376): Surface#02 pc 00013c1a
/system/lib/libsurfaceflinger_client.so
11-26 17:21:53.770: D/CallStack(21376): Surface#03 pc 00004f38
/system/lib/libEGL.so
11-26 17:21:53.770: D/CallStack(21376): Surface#04 pc 00036dca
/system/lib/libandroid_runtime.so
11-26 17:21:54.120: D/MediaPlayer(21376): getMetadata
These all show isHardwareAcceleration as true
Which still produces the error and Video with NO picture ,
Video with only audio
What then produces the err=-19 error ?
--
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
<mailto:android-developers@googlegroups.com>
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
<mailto:android-developers+unsubscr...@googlegroups.com>
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en