/// <summary> /// Create a new upload manager to transport HCS fragments and write a playlist in the configured location. /// The playlist will be re-written every time a fragment is successfully uploaded. /// </summary> /// <param name="Config">Job configuration.</param> public UploadManager(EncoderConfiguration.Configuration Config) { // Setup some some common strings and the upload queue pre = Config.EncoderSettings.LocalSystemFilePrefix; src = "file://" + Path.Combine(Config.EncoderSettings.LocalSystemOutputFolder, Config.EncoderSettings.LocalSystemFilePrefix); dest = Config.Upload.VideoDestinationRoot; if (String.IsNullOrEmpty(pre)) { throw new Exception("Configuration is invalid. Check 'LocalSystemPrefix'"); } if (String.IsNullOrEmpty(src)) { throw new Exception("Configuration is invalid. Check output paths"); } if (String.IsNullOrEmpty(dest)) { throw new Exception("Configuration is invalid. Check 'VideoDestinationRoot'"); } waitingChunks = new Queue <ChunkDetail>(); // Setup and connect the playlist writer plw = new PlaylistWriter(); plw.ServerRoot = Config.Upload.ServerLookupRoot; plw.PlaylistDestination = Config.Upload.IndexFtpRoot + Config.Upload.IndexName; plw.PlaylistFilename = Config.Upload.IndexName; plw.BaseDirectory = Config.EncoderSettings.LocalSystemOutputFolder; plw.IsClosed = false; SyncRoot = new object(); }
/// <summary> /// Create a new upload manager to transport HCS fragments and write a playlist in the configured location. /// The playlist will be re-written every time a fragment is successfully uploaded. /// </summary> /// <param name="Config">Job configuration.</param> public UploadManager(EncoderConfiguration.Configuration Config) { // Setup some some common strings and the upload queue pre = Config.EncoderSettings.LocalSystemFilePrefix; src = "file://" + Path.Combine(Config.EncoderSettings.LocalSystemOutputFolder, Config.EncoderSettings.LocalSystemFilePrefix); dest = Config.Upload.VideoDestinationRoot; if (String.IsNullOrEmpty(pre)) throw new Exception("Configuration is invalid. Check 'LocalSystemPrefix'"); if (String.IsNullOrEmpty(src)) throw new Exception("Configuration is invalid. Check output paths"); if (String.IsNullOrEmpty(dest)) throw new Exception("Configuration is invalid. Check 'VideoDestinationRoot'"); waitingChunks = new Queue<ChunkDetail>(); // Setup and connect the playlist writer plw = new PlaylistWriter(); plw.ServerRoot = Config.Upload.ServerLookupRoot; plw.PlaylistDestination = Config.Upload.IndexFtpRoot + Config.Upload.IndexName; plw.PlaylistFilename = Config.Upload.IndexName; plw.BaseDirectory = Config.EncoderSettings.LocalSystemOutputFolder; plw.IsClosed = false; SyncRoot = new object(); }