示例#1
0
        public void MoveSegmentData(int streamerID)
        {
            string rpPath               = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData), "RemotePotato");
            string WorkingDirectory     = Path.Combine(rpPath, "static\\mediastreams\\" + streamerID.ToString());
            string destinationDirectory = Path.Combine(rpPath, "static\\BackgroundTranscodedMediastreams\\");

            if (!Directory.Exists(destinationDirectory))
            {
                Directory.CreateDirectory(destinationDirectory);
            }
            destinationDirectory = Path.Combine(destinationDirectory, streamerID.ToString());
            if (Directory.Exists(destinationDirectory))
            {
                Directory.Delete(destinationDirectory, true);
            }
            while (true)
            {
                try
                {
                    Directory.Move(WorkingDirectory, destinationDirectory);
                    Functions.WriteLineToLogFile2("StreamingManager: moved streaminfo to " + destinationDirectory);
                    break;
                }
                catch (Exception e)
                {
                    Thread.Sleep(100);
                    Functions.WriteLineToLogFile(e.ToString() + "\n trying to move again");
                }
            }
        }
示例#2
0
 void mediaStreamer_DebugMessage2(object sender, WasFatAttitude.GenericEventArgs <string> e)
 {
     if (Settings.Default.DebugStreaming)
     {
         Functions.WriteLineToLogFile2("MediaStreamer: " + e.Value);
     }
 }