久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

Windows Phone 8.1 相機初始化 - 訪問被拒絕異常

Windows Phone 8.1 Camera Initialisation - Access Denied Exception(Windows Phone 8.1 相機初始化 - 訪問被拒絕異常)
本文介紹了Windows Phone 8.1 相機初始化 - 訪問被拒絕異常的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

問題描述

限時送ChatGPT賬號..

使用適用于 Windows Phone 的 8.1 MediaCapture 類.

Using the 8.1 MediaCapture classes for Windows Phone.

已聲明音頻"和網(wǎng)絡(luò)攝像頭"的功能,其中 90% 是導(dǎo)致異常的原因.

Have declared the capabilities for "Audio" and "Webcam", which 90% is what would be the cause of the exception.

Kicker 是,它在 WP 模擬器中完美運行,但在實際設(shè)備上中斷.

Kicker is, it works perfectly in the WP emulator, but breaks on an actual device.

確切的例外是這里:

我添加了大量檢查,以確保我們沒有重新初始化已經(jīng)初始化的相機或嘗試在初始化之前讀取..等等(因為我認(rèn)為問題是由以下原因引起的)所以這不太可能就是這樣.

I have added a mountain of checks to make sure we aren't re-initializing the already initialized camera or trying to read before the initializations.. etc (as I assumed the issue was being caused by) So it is very unlikely to be that.

    private async Task InitializeCameraAsync()
    {
        if (_isInitialized)
        {
            Debug.WriteLine("Skipping unnecessary initialization");
            return;
        }

        Debug.WriteLine("Initializing camera media capture...");
        _deviceCapture = new MediaCapture();
        await _deviceCapture.InitializeAsync(new MediaCaptureInitializationSettings
        {
            VideoDeviceId = _cameraInfoCollection[_currentVideoDevice].Id,
            PhotoCaptureSource = PhotoCaptureSource.VideoPreview,
            AudioDeviceId = _microphoneInfoCollection[_currentAudioDevice].Id
            StreamingCaptureMode = StreamingCaptureMode.Video
        });
        Debug.WriteLine("Initialized camera media capture!");

        // For code completion only, unlikely to be relevant

        // Set up low-lag photo capture
        if (IsNotUsingInstantCapture)
        {
            Debug.WriteLine("Preparing low-lag photo capture");
            var imageEncoding = ImageEncodingProperties.CreateJpeg();
            imageEncoding.Width = PhotoCaptureWidth;
            imageEncoding.Height = PhotoCaptureHeight;
            _lowLagPhotoCapture = await _deviceCapture.PrepareLowLagPhotoCaptureAsync(imageEncoding);
        }

        _isInitialized = true;
        Debug.WriteLine("Initialized camera!");
    }

_mediacapture 隨后被綁定到 xaml CaptureElement 的 .source 以顯示預(yù)覽.

_mediacapture is then being bound to the .source of a xaml CaptureElement to show a preview.

推薦答案

這是 Windows api 的臨時錯誤.它已在 2014 年 9 月 24 日發(fā)布的 Windows Phone 8.1 更新中得到修復(fù).

It was a temporary bug with the Windows api. It was fixed with the Windows Phone 8.1 update that was released the 24th of september 2014.

這篇關(guān)于Windows Phone 8.1 相機初始化 - 訪問被拒絕異常的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請聯(lián)系我們刪除處理,感謝您的支持!

相關(guān)文檔推薦

ASP.NET Core authenticating with Azure Active Directory and persisting custom Claims across requests(ASP.NET Core 使用 Azure Active Directory 進(jìn)行身份驗證并跨請求保留自定義聲明)
ASP.NET Core 2.0 Web API Azure Ad v2 Token Authorization not working(ASP.NET Core 2.0 Web API Azure Ad v2 令牌授權(quán)不起作用)
ASP Core Azure Active Directory Login use roles(ASP Core Azure Active Directory 登錄使用角色)
How do I get Azure AD OAuth2 Access Token and Refresh token for Daemon or Server to C# ASP.NET Web API(如何獲取守護(hù)進(jìn)程或服務(wù)器到 C# ASP.NET Web API 的 Azure AD OAuth2 訪問令牌和刷新令牌) - IT屋-程序員軟件開發(fā)技
.Net Core 2.0 - Get AAD access token to use with Microsoft Graph(.Net Core 2.0 - 獲取 AAD 訪問令牌以與 Microsoft Graph 一起使用)
Azure KeyVault Active Directory AcquireTokenAsync timeout when called asynchronously(異步調(diào)用時 Azure KeyVault Active Directory AcquireTokenAsync 超時)
主站蜘蛛池模板: 国际精品鲁一鲁一区二区小说 | 久久国产区 | 日本三级全黄三级三级三级口周 | 久久精品视频在线播放 | 精品福利在线 | 欧美精品乱码久久久久久按摩 | 韩日在线| 91精品久久 | 中文字幕视频在线 | 日韩一区二区三区av | 伊人网伊人 | 91人人视频在线观看 | 一级无毛片| 91免费观看在线 | 91久操视频 | 国内毛片毛片毛片毛片 | 欧美精品一区二区三 | 国产h在线 | 久久精品日产第一区二区三区 | 国产剧情一区 | 天天射色综合 | 日韩成人精品在线观看 | 国产福利在线 | 国产一区二区三区四区三区四 | 中文字幕加勒比 | 91国产精品| 99精品欧美一区二区三区 | 99pao成人国产永久免费视频 | 国产在线播放一区二区三区 | 日韩不卡一区二区三区 | 色婷婷一区二区三区四区 | 九九热视频这里只有精品 | 欧美成人一区二区三区片免费 | 综合婷婷 | 激情一区二区三区 | 99re热精品视频国产免费 | av日韩一区| 波波电影院一区二区三区 | 亚洲区一区二区 | 欧美视频免费在线 | 亚洲一区二区精品视频 |