我被告知,當我允許用戶從我的應用內創建視頻時,應該自動生成.jpg縮略圖圖像。但是,使用Windows Phone電動工具,我可以看到只有視頻生成,沒有圖像。下面的代碼如下:創建WP8應用內視頻不會生成.jpg縮略圖
編輯:這裏的問題是如何從保存在獨立存儲中的給定視頻獲取縮略圖圖像?
' Set recording state: start recording.
Private Async Sub StartVideoRecording()
Try
App.ViewModel.IsDataLoaded = False
'isoStore = Await ApplicationData.Current.LocalFolder.GetFolderAsync("IsolatedStore")
strVideoName = GenerateVideoName()
isoFile = Await isoVideoFolder.CreateFileAsync(strVideoName, CreationCollisionOption.ReplaceExisting)
thisAccessStream = Await isoFile.OpenAsync(FileAccessMode.ReadWrite)
Await avDevice.StartRecordingToStreamAsync(thisAccessStream)
'save the name of the video file into the list of video files in isolated storage settings
Dim videoList As New List(Of InfoViewModel)
isoSettings = IsolatedStorageSettings.ApplicationSettings
If isoSettings.Contains("ListOfVideos") Then
videoList = isoSettings("ListOfVideos")
Else
isoSettings.Add("ListOfVideos", videoList)
End If
videoList.Add(New InfoViewModel With {.Name = strVideoName, .DateRecorded = Date.Now})
isoSettings("ListOfVideos") = videoList
isoSettings.Save()
isoSettings = Nothing
' Set the button states and the message.
UpdateUI(ButtonState.Recording, "Recording...")
Catch e As Exception
' If recording fails, display an error.
Me.Dispatcher.BeginInvoke(Sub() txtDebug.Text = "ERROR: " & e.Message.ToString())
End Try
End Sub
也許你應該堅持的官方文檔中提供的信息,不是來自互聯網的謠言? – 2013-03-24 00:28:51
這是超級建設性和有益的,謝謝。我在這個網站上被多個人告知。如果這個網站上的信息是無關緊要的並且無用 - 正如你的嘲諷語氣所暗示的 - 那你爲什麼在這裏? – Jarrette 2013-03-24 05:15:51
所以,我想windows phone沒有辦法從保存的視頻流製作縮略圖?因此,當列出一組視頻時,無法直觀地呈現每個視頻... – Jarrette 2013-03-24 05:19:50