java - SurfaceView without camera : preview after start rotated on 90 degree -
my problem. create app preview camera on android. preview while im not press on button - used camera , camera.open. when app started - orientation of screen normal.. when try record video - closed camera preview , used surfaceview recorder.setvideosource(mediarecorder.videosource.default); it's showing me preview camera without class camera. becouse it's fixed me bug greenish screen after recorded. so... preview(which without camera) after start rotated on 90 degree ( in mode landscape) im try use
setrequestedorientation(activityinfo.screen_orientation_landscape );
and
setrequestedorientation(activityinfo.screen_orientation_portrait );
but not fixed problem. so, can 1 tell me how rotate preview(without camera) in mode screen_orientation_portrait ??
pls tell me how fix problem.. can't fix 2-3 days :(
regards, peter p.s. sorry bad english, hope u understand me.
it's code used preview when recorded video/audio
preview = new surfaceview(withpreview.this); preview.getholder(); holder.addcallback(this); holder.settype(surfaceholder.surface_type_push_buffers );
get picture camera
recorder.setvideosource(mediarecorder.videosource.default);
now screen rotated on 90 degree. if set
recorder.setvideosource(mediarecorder.videosource.camera);
than image rotated on 180 degree О_О
and set preview
recorder.setpreviewdisplay(holder.getsurface());
that's need camera preview how u can see im not using camera.. can't camera.parameters.setorientation(90) //example :]
is right, fix screen orientation landscape or portrait? or should dynamic? if understand you, fix orientation of screen, prefer add android manifest:
android:screenorientation="landscape"
this must inside activity-block.
hope help, otherwise tell me when should dynmaic or on.
Comments
Post a Comment