CameraManager.IsConcurrentSessionConfigurationSupported 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
檢查所提供的攝影機裝置及其對應 SessionConfiguration 裝置是否能同時設定。
[Android.Runtime.Register("isConcurrentSessionConfigurationSupported", "(Ljava/util/Map;)Z", "", ApiSince=30)]
[Android.Runtime.RequiresPermission("android.permission.CAMERA")]
public bool IsConcurrentSessionConfigurationSupported(System.Collections.Generic.IDictionary<string,Android.Hardware.Camera2.Params.SessionConfiguration> cameraIdAndSessionConfig);
[<Android.Runtime.Register("isConcurrentSessionConfigurationSupported", "(Ljava/util/Map;)Z", "", ApiSince=30)>]
[<Android.Runtime.RequiresPermission("android.permission.CAMERA")>]
member this.IsConcurrentSessionConfigurationSupported : System.Collections.Generic.IDictionary<string, Android.Hardware.Camera2.Params.SessionConfiguration> -> bool
參數
- cameraIdAndSessionConfig
- IDictionary<String,SessionConfiguration>
字典會將每個相機 ID 映射到會話設定,以檢查是否同時使用。
傳回
true 若相機子系統同時支援給定的會話組態組合及對應相機 ID, false 否則 若提供的相機裝置集合不是 所 #getConcurrentCameraIds回傳的子集,則為 。
- 屬性
備註
檢查所提供的攝影機裝置及其對應 SessionConfiguration 裝置是否能同時設定。
此方法會在執行時檢查給定 SessionConfiguration 的 ID 與相機 ID 組合。 結果確認了傳遞的會話設定是否能成功用於在給定的攝影機裝置 CameraDevice#createCaptureSession(SessionConfiguration)上同時建立攝影機擷取會話。
此方法可在主動擷取會話前、中、後的任何時刻呼叫。 它不會以任何方式影響正常的相機行為,且必須比建立一般或受限的拍攝過程更快完成。
雖然此方法比建立新的擷取會話更快,但並非用來探索所有支援的並行串流組合空間。 可用的強制並行串流組合可透過查詢 #getCameraCharacteristics 鍵 android.hardware.camera2.CameraCharacteristics#SCALER_MANDATORY_CONCURRENT_STREAM_COMBINATIONS值 來取得。
請注意,會話參數將被忽略,且不需要呼叫 。SessionConfiguration#setSessionParameters
本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。