Hi, all I have 2 suggestions for android's framework. 1. Add a new attribute about rotation in Surface class, user can control each surface's rotation according to it. I suggest google add a new attribute NO_ROTATION in frameworks/base/core/java/android/view/Surface.java, then check it in LayerBase.cpp::validateVisibility(...) function to decide if re-calculate the orientation and position for this layer(surface). So it will provide a capability for user to control each surface's rotation. For example: Camera application's controller surface need rotate according to the phone status(landscape or portrait), but its viewfinder surface needn't rotate. In current android platform, we can correct it in LayerBuffer::OverlaySource::onVisibilityResolved(), but it will prevent all surfaces that use overlay to rotate, it isn't good method.
2. Add new interface function to set camera's parameters in MediaRecorder class. MediaRecorder class hasn't interface function to set the camera's parameters. For setting camera's parameters, we need use Camera class to show preview screen and camera controller. When press capture key to record the video, we need use MediaRecorder class, there are two method to do it: a. call Camera.release(), then call MediaRecorder class to record the video. The method will cause black screen when press the start key, it can't be accpected. b, MediaRecorder call setCamera(xxx), then record video. The method will call CameraService::Client::startPreview(), and it will return by the following sentence: // do nothing if preview is already started if (mHardware->previewEnabled()) return NO_ERROR; If call stopPreview here, it will cause black screen. In addition, we set callback function NULL when use camera to preview, if we want to set new callback when press capture key, we need stopPreview again, it also causes black screen. if ( mFrameCallbackFlag == FRAME_CALLBACK_FLAG_NOOP ) { ret = mHardware->startPreview(NULL, mCameraService.get()); } else*/ { ret = mHardware->startPreview(previewCallback, mCameraService.get()); } So if add interface function in MediaRecorder class, we will fix all problem. These are my suggestion, please give me your comments, thanks in advance. Best regards Feike --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "android-framework" group. To post to this group, send email to android-framework@googlegroups.com To unsubscribe from this group, send email to android-framework+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-framework?hl=en -~----------~----~----~----~------~----~------~--~---