Udostępnij za pośrednictwem


ICameraCaptureDeviceNative::SetPreviewFormat method for Windows Phone 8

July 21, 2014

Applies to: Windows Phone 8 and Windows Phone Silverlight 8.1 only

Sets the format of the frame data that will be sent to the preview sink.

HRESULT SetPreviewFormat(
   [in]    DXGI_FORMAT format
);

Parameters

  • format [in]
    Type: DXGI_FORMAT

    The memory layout for the pixels in each frame.

Return value

Type: HRESULT

Returns S_OK if successful, or an error value otherwise.

Remarks

To access the ICameraCaptureDeviceNative interface, invoke the IUnknown::QueryInterface method on the instance of the PhotoCaptureDevice or AudioVideoCaptureDevice class, using the UUID of ICameraCaptureDeviceNative. This method is not directly available from a managed projection, but you can write your own Windows Runtime object that wraps it.

Supported DXGI_FORMAT values include:

  • DXGI_FORMAT_B8G8R8A8_UNORM

  • DXGI_FORMAT_B8G8R8X8_UNORM

  • DXGI_FORMAT_NV12

  • DXGI_FORMAT_420_OPAQUE

Requirements

Minimum supported phone

Windows Phone 8

Header

Windows.Phone.Media.Capture.Native.h

Namespace

Windows::Phone::Media::Capture

See Also

Other Resources

Advanced photo capture for Windows Phone 8

Advanced capture properties for Windows Phone 8