【问题标题】:Transferring video off the phone from isolated storage从独立存储中传输手机视频
【发布时间】:2014-01-01 07:29:51
【问题描述】:

我正在制作一个视频录制应用程序。视频被录制并存储在隔离存储中,但我想让用户将他的视频从手机上传输出来……也许将视频传输到手机的“音乐+视频”部分或通过其他方式。

隔离存储视频代码:

// 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());
            //    
            //});
        }
    }

更新 1

在解决此问题时,我发现文档中提供的 ID_CAP_MEDIALIB_VIDEO 使我们能够将视频传输到相机胶卷。但是清单丢失了,那么还有其他方法可以使这成为可能吗?

【问题讨论】:

  • 你有没有尝试过?有任何结果或尝试分享失败?有什么具体问题吗?您实际上根本没有问过任何问题 - StackOverflow 通常期望一个特定的问题,表明对问题的理解和努力。
  • 很抱歉,这里有点新,下次会更具体...我已经尝试了很多来将文件从隔离存储中取出。问题“有什么方法可以从手机中取出隔离存储中的数据?”

标签: c# video windows-phone-8 isolatedstorage isolatedstoragefile


【解决方案1】:
猜你喜欢
  • 1970-01-01
  • 2012-08-19
  • 1970-01-01
  • 2013-07-14
  • 1970-01-01
  • 2013-11-08
  • 1970-01-01
  • 1970-01-01
  • 2019-11-04
相关资源
最近更新 更多