2

我正在制作视频录制应用程序。该视频被记录并存储在隔离存储器中,但我希望使用户能够将他的视频从手机中转移出去...也许将视频传输到手机的“音乐+视频”部分或通过其他方式。将视频从隔离存储转移到手机上

独立存储视频代码:

// File details for storing the recording.   
    private IsolatedStorageFileStream isoVideoFile; 


private void StartVideoRecording() 
    { 
     try 
     { 
     videos = null; 
     isoVideoFileName = string.Format(dateTime.Day.ToString() + dateTime.Month.ToString() + dateTime.Year.ToString() + "_" + dateTime.Hour.ToString() + dateTime.Minute.ToString() + dateTime.Second.ToString()+".mp4"); 

      //SAVE TO LOCAL MEMORY............ 

     videos.Add(isoVideoFileName.ToString()); 
     IsolatedStorageSettings settings = IsolatedStorageSettings.ApplicationSettings; 
     if (settings.Contains("Storage")) 
     { 
      List<string> vids = new List<string>(); 
      List<string> vids1 = new List<string>(); 
      vids.AddRange(IsolatedStorageSettings.ApplicationSettings["Storage"] as List<string>); 
      videos.AddRange(vids); 
      settings["Storage"] = videos; 
      settings.Save(); 
     } 
     else 
     { 
      settings["Storage"] = videos; 
      settings.Save(); 
     } 
     //....................................... 

      if (captureSource.VideoCaptureDevice != null 
       && captureSource.State == CaptureState.Started) 
      { 
       captureSource.Stop(); 


       fileSink.CaptureSource = captureSource; 
       fileSink.IsolatedStorageFileName = isoVideoFileName; 
      } 

      // Begin recording. 
      if (captureSource.VideoCaptureDevice != null 
       && captureSource.State == CaptureState.Stopped) 
      { 
       captureSource.Start(); 
      } 


      disp.Text = "DashCam - Recording..."; 
      status = "recording"; 

     } 


     catch (Exception e) 
     { 
      //this.Dispatcher.BeginInvoke(delegate() 
      //{ 
      // MessageBox.Show(e.ToString()); 
      //  
      //}); 
     } 
    } 

UPDATE 1

正如我是通过这个问题工作,我发现,使我们能够将视频传送到相机辊上的文档中提供的ID_CAP_MEDIALIB_VIDEO。然而,清单不见了,那么还有其他方法可以做到这一点吗?

+0

你尝试过什么?得到任何结果或尝试分享失败?任何具体问题?实际上你根本没有问过任何问题 - 而且StackOverflow通常需要一个特定的问题,表明对问题的理解和努力。 –

+0

对不起,这里有一些新东西,下次会更具体一些...我已经尝试了很多工作来将文件从孤立的存储中取出。问题:“是否有任何方法可以将孤立存储的数据从电话中拿走?” –

回答