Loading media/java/android/media/MediaRecorder.java +7 −1 Original line number Diff line number Diff line Loading @@ -124,9 +124,15 @@ public class MediaRecorder /** * Sets a Surface to show a preview of recorded media (video). Calls this * before prepare() to make sure that the desirable preview display is * set. * set. If {@link #setCamera(Camera)} is used and the surface has been * already set to the camera, application do not need to call this. If * this is called with non-null surface, the preview surface of the camera * will be replaced by the new surface. If this method is called with null * surface or not called at all, media recorder will not change the preview * surface of the camera. * * @param sv the Surface to use for the preview * @see android.hardware.Camera#setPreviewDisplay(android.view.SurfaceHolder) */ public void setPreviewDisplay(Surface sv) { mSurface = sv; Loading media/libstagefright/CameraSource.cpp +7 −3 Original line number Diff line number Diff line Loading @@ -515,9 +515,13 @@ status_t CameraSource::initWithCameraAccess( return err; } // Set the preview display. Skip this if mSurface is null because // applications may already set a surface to the camera. if (mSurface != NULL) { // This CHECK is good, since we just passed the lock/unlock // check earlier by calling mCamera->setParameters(). CHECK_EQ((status_t)OK, mCamera->setPreviewDisplay(mSurface)); } // By default, do not store metadata in video buffers mIsMetaDataStoredInVideoBuffers = false; Loading Loading
media/java/android/media/MediaRecorder.java +7 −1 Original line number Diff line number Diff line Loading @@ -124,9 +124,15 @@ public class MediaRecorder /** * Sets a Surface to show a preview of recorded media (video). Calls this * before prepare() to make sure that the desirable preview display is * set. * set. If {@link #setCamera(Camera)} is used and the surface has been * already set to the camera, application do not need to call this. If * this is called with non-null surface, the preview surface of the camera * will be replaced by the new surface. If this method is called with null * surface or not called at all, media recorder will not change the preview * surface of the camera. * * @param sv the Surface to use for the preview * @see android.hardware.Camera#setPreviewDisplay(android.view.SurfaceHolder) */ public void setPreviewDisplay(Surface sv) { mSurface = sv; Loading
media/libstagefright/CameraSource.cpp +7 −3 Original line number Diff line number Diff line Loading @@ -515,9 +515,13 @@ status_t CameraSource::initWithCameraAccess( return err; } // Set the preview display. Skip this if mSurface is null because // applications may already set a surface to the camera. if (mSurface != NULL) { // This CHECK is good, since we just passed the lock/unlock // check earlier by calling mCamera->setParameters(). CHECK_EQ((status_t)OK, mCamera->setPreviewDisplay(mSurface)); } // By default, do not store metadata in video buffers mIsMetaDataStoredInVideoBuffers = false; Loading