Compartir a través de


Detección de perfiles (perfil de cámara V2)

En el esquema del perfil de cámara 1507, la detección de perfiles está centrada en el dispositivo. Lo que significa que la aplicación debe determinar primero en qué dispositivo desea consultar y enumerar los perfiles disponibles para ese dispositivo.

Las API de perfil de cámara existentes son compatibles con Camera Profile V2 y la API se amplía para proporcionar información adicional que admite el nuevo esquema:

[version(NTDDI_WINTHRESHOLD), uuid(ACEF81FF-99ED-4645-965E-1925CFC63834)]
[version(NTDDI_WINTHRESHOLD, Platform.WindowsPhone)]
[exclusiveto(MediaCapture)]
[contract(Windows.Foundation.UniversalApiContract, 1)]
interface IMediaCaptureStatics : IInspectable
{
    HRESULT IsVideoProfileSupported([in] HSTRING videoDeviceId, 
                                    [out, retval] boolean* value);
    HRESULT FindAllVideoProfiles([in] HSTRING videoDeviceId, 
                                 [out, retval] IVectorView<MediaCaptureVideoProfile*>** value);
    HRESULT FindConcurrentProfiles([in] HSTRING videoDeviceId, 
                                   [out, retval] IVectorView<MediaCaptureVideoProfile*>** value);
    HRESULT FindKnownVideoProfiles([in] HSTRING videoDeviceId, 
                                   [in] KnownVideoProfile name, 
                                   [out, retval] IVectorView<MediaCaptureVideoProfile*>** value);
}

Para proporcionar información adicional sobre el nuevo perfil de cámara V2, el objeto MediaCaptureVideoProfile se extiende:

        [version(NTDDI_WINTHRESHOLD), uuid(21A073BF-A3EE-4ECF-9EF6-50B0BC4E1305)]
        [version(NTDDI_WINTHRESHOLD, Platform.WindowsPhone)]
        [exclusiveto(MediaCaptureVideoProfile)]
        [contract(Windows.Foundation.UniversalApiContract, 1)]
        interface IMediaCaptureVideoProfile : IInspectable
        {
            [propget] HRESULT Id([out, retval] HSTRING* value);
            [propget] HRESULT VideoDeviceId([out, retval]HSTRING* value);
            [propget] HRESULT SupportedPreviewMediaDescription([out, retval] IVectorView<MediaCaptureVideoProfileMediaDescription*>** value);
            [propget] HRESULT SupportedRecordMediaDescription([out, retval] IVectorView<MediaCaptureVideoProfileMediaDescription*>** value);
            [propget] HRESULT SupportedPhotoMediaDescription([out, retval] IVectorView<MediaCaptureVideoProfileMediaDescription*>** value);
            HRESULT GetConcurrency([out, retval] IVectorView<MediaCaptureVideoProfile*>** value);
        }

        API_CONTRACT_WIN10_RS4 // TDB
        [uuid(5AE36D1E-211D-474E-A763-3EDE406C2663), exclusiveto(MediaCaptureVideoProfileMediaDescription)]
        interface IMediaCaptureVideoProfileMediaDescription2 : IInspectable
        {
            [propget] HRESULT EncodingProperties([out, retval] IMediaEncodingProperties** value);
        };
        
        API_CONTRACT_WIN10_RS4 // TDB
        [uuid(085344F6-09AE-49D3-8D9A-442DE692B0E5), exclusiveto(MediaCaptureProfileStream)]
        interface IMediaCaptureProfileStream : IInspectable
        {
            [propget] HRESULT SourceInfo([out, retval] MediaFrameSourceInfo** value);
            [propget] HRESULT SupportedMediaDescription([out, retval] IVectorView<MediaCaptureVideoProfileMediaDescription*>** value);
        };

        API_CONTRACT_WIN10_RS4 // TDB
        [uuid(4CDC8BB7-4789-418E-AF12-C0CEC7442F5D), exclusiveto(MediaCaptureVideoProfile)]
        interface IMediaCaptureVideoProfile2 : IInspectable
        {
            [propget] HRESULT ProfileStreams([out, retval] IVectorView<MediaCaptureProfileStream*>** value);
        };

        [version(NTDDI_WINTHRESHOLD)]
        [version(NTDDI_WINTHRESHOLD, Platform.WindowsPhone)]
        [dualapipartition(NTDDI_WINTHRESHOLD)]
        [threading(both), marshaling_behavior(agile)]
        [contract(Windows.Foundation.UniversalApiContract, 1)]
        runtimeclass MediaCaptureVideoProfile
        {
            [default] interface IMediaCaptureVideoProfile;

            API_CONTRACT_WIN10_RS4 // TDB
            interface IMediaCaptureVideoProfile2;
        };

Especificación del desarrollador camera Profile V2