共用方式為


OutputConfiguration.MirrorMode Property

Definition

Get the current mirroring mode -or- Set the mirroring mode for this output target

public int MirrorMode { [Android.Runtime.Register("getMirrorMode", "()I", "", ApiSince=33)] get; [Android.Runtime.Register("setMirrorMode", "(I)V", "", ApiSince=33)] set; }
[<get: Android.Runtime.Register("getMirrorMode", "()I", "", ApiSince=33)>]
[<set: Android.Runtime.Register("setMirrorMode", "(I)V", "", ApiSince=33)>]
member this.MirrorMode : int with get, set

Property Value

The currently set mirroring mode

Attributes

Remarks

Property getter documentation:

Get the current mirroring mode

If no #setMirrorMode is called first, this function returns #MIRROR_MODE_AUTO.

Java documentation for android.hardware.camera2.params.OutputConfiguration.getMirrorMode().

Property setter documentation:

Set the mirroring mode for this output target

If this function is not called, the mirroring mode for this output is #MIRROR_MODE_AUTO, with which the camera API will mirror the output images horizontally for front facing camera.

For efficiency, the mirror effect is applied as a transform flag, so it is only effective in some outputs. It works automatically for SurfaceView and TextureView outputs. For manual use of SurfaceTexture, it is reflected in the value of android.graphics.SurfaceTexture#getTransformMatrix. For other end points, such as ImageReader, MediaRecorder, or MediaCodec, the mirror mode has no effect. If mirroring is needed for such outputs, the application needs to mirror the image buffers itself before passing them onward.

Java documentation for android.hardware.camera2.params.OutputConfiguration.setMirrorMode(int).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to