private ILocator MasterPublish(OutPutFormat currentOutPutFormat, IAsset currentAsset, EncodeJob currentWorkerEncoder) { ILocator currentLocator = null; //b. Publish switch ((MediaContentType)currentOutPutFormat.OutTypesId) { case MediaContentType.SmoothStreaming: //b. Publish H264 currentLocator = currentWorkerEncoder.GetDynamicStreamingUrl(currentAsset.Id, LocatorType.OnDemandOrigin, MediaContentType.SmoothStreaming); break; case MediaContentType.HLS: currentLocator = currentWorkerEncoder.GetDynamicStreamingUrl(currentAsset.Id, LocatorType.OnDemandOrigin, MediaContentType.HLS); break; case MediaContentType.H264Broadband720p: //b. Publish H264 currentLocator = currentWorkerEncoder.GetDynamicStreamingUrl(currentAsset.Id, LocatorType.Sas, MediaContentType.H264Broadband720p); break; case MediaContentType.HDS: currentLocator = currentWorkerEncoder.GetDynamicStreamingUrl(currentAsset.Id, LocatorType.OnDemandOrigin, MediaContentType.HDS); break; default: //b. otherssss currentLocator = currentWorkerEncoder.GetDynamicStreamingUrl(currentAsset.Id, LocatorType.Sas, MediaContentType.OtherSingleFile); break; } return(currentLocator); }
public IJob ExecuteJob(OutPutFormat format, IAsset myAsset, string OutPutAssetName) { IJob jobX = null; if (format.EncodeDescription == "N/A") { //only Publish Trace.TraceInformation("ExecuteJob: Not encoding only publish " + myAsset.Name); } else { if (format.EncodeDescription.Contains(".xml")) { format.EncodeDescription = myProfileFileDirectory + format.EncodeDescription; } Trace.TraceInformation("Create " + format.JobEncodeDescription); jobX = ExecuteMasterJob(format.JobEncodeDescription, format.TaskEncodeDescription + "_" + myAsset.Name, myAsset, OutPutAssetName, format.EncodeDescription, (MediaContentType)format.OutTypesId, format.MediaProcessorByName); } return(jobX); }