Share via


VideoDeviceController.GetDevicePropertyById メソッド

定義

カスタム ヘッダー情報を含む ID を持つキャプチャ デバイス ドライバーから プロパティの値を取得します。 このメソッドを使用すると、特定のカメラに固有のプロパティに対してクエリを実行できます。

public:
 virtual VideoDeviceControllerGetDevicePropertyResult ^ GetDevicePropertyById(Platform::String ^ propertyId, IReference<unsigned int> ^ maxPropertyValueSize) = GetDevicePropertyById;
VideoDeviceControllerGetDevicePropertyResult GetDevicePropertyById(winrt::hstring const& propertyId, IReference<uint32_t> const& maxPropertyValueSize);
public VideoDeviceControllerGetDevicePropertyResult GetDevicePropertyById(string propertyId, System.Nullable<uint> maxPropertyValueSize);
function getDevicePropertyById(propertyId, maxPropertyValueSize)
Public Function GetDevicePropertyById (propertyId As String, maxPropertyValueSize As Nullable(Of UInteger)) As VideoDeviceControllerGetDevicePropertyResult

パラメーター

propertyId
String

Platform::String

winrt::hstring

値が取得されるプロパティの識別子。

maxPropertyValueSize

IReference<UInt32>

Nullable<UInt32>

Windows.Foundation.IReference

IReference<uint32_t>

操作の結果を格納するために割り当てる必要があるバッファーのサイズ。 ドライバーで、返されるプロパティのサイズを指定する必要がない場合は、この値を null に設定します。 サイズが必要で、値を指定しない場合、返される VideoDeviceControllerGetDevicePropertyResult オブジェクトの Status プロパティは MaxPropertyValueSizeRequired になります。 指定された値が小さすぎて操作の結果を格納できない場合、返される Status オブジェクトは MaxPropertyValueSizeTooSmall になります。つまり、より大きなバッファー サイズで呼び出しを再試行できます。

戻り値

操作の状態と、成功した場合に返されるプロパティ値を含む VideoDeviceControllerGetDevicePropertyResult オブジェクト。

Windows の要件

デバイス ファミリ
Windows 10 Creators Update (10.0.15063.0 で導入)
API contract
Windows.Foundation.UniversalApiContract (v4.0 で導入)

注釈

一般的なデバイス プロパティは、 VideoDeviceController クラスのプロパティとして公開されます。 追加のプロパティは、 KSPROPERTYSETID_ExtendedCameraControl プロパティ セットで定義されます。 レガシ プロパティは、 PROPSETID_VIDCAP_CAMERACONTROL プロパティ セットで定義されます。 ID でカメラのプロパティにアクセスする例については、 拡張コントロールとメタデータのサンプルを参照してください。

適用対象