Compartilhar via


Advanced capture properties for Windows Phone 8

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

This topic describes the camera, photo, audio, and video properties that you can use for advanced capture scenarios in Windows Phone apps. Because different phones may support different sets of properties, they are not explicitly defined as object properties. Instead, the PhotoCaptureDevice and AudioVideoCaptureDevice objects provide the SetProperty and GetProperty methods to assign properties to the capture device. For more info about setting properties, see Advanced photo capture for Windows Phone 8.

Important Note:

To determine which properties are supported on each phone, use the GetSupportedPropertyValues and GetSupportedPropertyRange methods. Each property will support one of these methods, but not both. A valid call to the GetProperty method will always return a value of type Object. Use the tables in this topic to determine the object types that correspond to each property, and whether GetSupportedPropertyValues or GetSupportedPropertyRange can be used with each property.

This topic contains the following sections.

Camera properties

Use the KnownCameraGeneralProperties class to assign general camera properties. Properties in this class can be assigned to both types of capture device objects, PhotoCaptureDevice and AudioVideoCaptureDevice. The KnownCameraGeneralProperties class returns GUID values that you can use with the capture device GetProperty and SetProperty methods. You can also assign these properties to the DesiredProperties property of a frame.

For each property, the following table lists the type of object that is returned by GetProperty, and whether GetSupportedPropertyValues (the “get values” column) or GetSupportedPropertyRange (the “get range” column) can be used.

Camera property

Object type

Get values

Get range

AutoFocusRange

AutoFocusRange

EncodeWithOrientation

System..::.Int32

IsShutterSoundEnabledByUser

System..::.Boolean

IsShutterSoundRequiredForRegion

System..::.Boolean

ManualFocusPosition

System..::.UInt32

PlayShutterSoundOnCapture

System..::.Boolean

SpecifiedCaptureOrientation

System..::.Int32

Photo properties

Photo properties are only applicable to the PhotoCaptureDevice object. The KnownCameraPhotoProperties class returns GUID values that you can use with the GetProperty and SetProperty methods. You can also assign these properties to the DesiredProperties property of a frame.

For each property, the following table lists the type of object that is returned by GetProperty, and whether GetSupportedPropertyValues (the “get values” column) or GetSupportedPropertyRange (the “get range” column) can be used.

Photo property

Object type

Get values

Get range

ExposureCompensation

System..::.Int32

ExposureTime

System..::.UInt32

FlashMode

FlashState

FlashPower

System..::.UInt32

FocusIlluminationMode

FocusIlluminationMode

Iso

System..::.UInt32

LockedAutoFocusParameters

AutoFocusParameters

ManualWhiteBalance

System..::.UInt32

SceneMode

CameraSceneMode

WhiteBalancePreset

WhiteBalancePreset

Audio and video properties

Audio and video properties are only applicable to the AudioVideoCaptureDevice object. The KnownCameraAudioVideoProperties class returns GUID values that you can use with the GetProperty and SetProperty methods.

For each property, the following table lists the type of object that is returned by GetProperty, and whether GetSupportedPropertyValues (the “get values” column) or GetSupportedPropertyRange (the “get range” column) can be used.

Audio/video property

Object type

Get values

Get range

H264EnableKeyframes

System..::.Boolean

H264EncodingLevel

H264EncoderLevel

H264EncodingProfile

H264EncoderProfile

H264QuantizationParameter

System..::.UInt32

H264RequestDropNextNFrames

System..::.UInt32

H264RequestIdrFrame

System..::.Boolean

UnmuteAudioWhileRecording

System..::.Boolean

VideoFrameRate

System..::.UInt32

VideoTorchMode

VideoTorchMode

VideoTorchPower

System..::.UInt32

See Also

Other Resources

Camera APIs for native code (Windows Phone 8)