public bool Start(string aChannelName, string aChannelInputName, string aChannelPreviewName, string aAssetlName, string aProgramlName, string aStreamingEndpointName, TimeSpan aDVRWindowsArchiveLength)
        {
            var configParamStartAms = new StartAMSConfigParams(aChannelName, aChannelName,
              aChannelName, aAssetlName, aProgramlName, aStreamingEndpointName, aDVRWindowsArchiveLength);

            return VooAzureStreamFacade.Start(configParamStartAms);
        }
Beispiel #2
0
        private void btnStartInfrastructure_Click(object sender, EventArgs e)
        {
            var configParamStartAms = new StartAMSConfigParams(tbChannelName.Text, tbChannelName.Text,
             tbChannelName.Text, tbAssetlName.Text, tbProgramName.Text, tbStreamingEndpointName.Text,
             TimeSpan.FromHours(6));

            VooAzureStreamFacade.VooAzureStreamFacade.Start(configParamStartAms);
        }
Beispiel #3
0
        private void btnCreateLiveInfrastructure_Click(object sender, EventArgs e)
        {
            var configParamStartAms = new StartAMSConfigParams(tbChannelName.Text, tbChannelName.Text,
                tbChannelName.Text, tbAssetlName.Text, tbProgramName.Text, tbStreamingEndpointName.Text,
                TimeSpan.FromHours(6));

            var tempresult = VooAzureStreamFacade.VooAzureStreamFacade.CreateLiveStreamingInfrastructure(configParamStartAms);

            //MessageBox.Show(tempresult.ToString(),"Create Live Streaming infrastructure",MessageBoxButtons.OK, MessageBoxIcon.Information);

            tbIngestURL.Text = VooAzureStreamFacade.VooAzureStreamFacade.ReturnIngestURL(tbChannelName.Text);
            tbPreviewURL.Text = VooAzureStreamFacade.VooAzureStreamFacade.ReturnPreviewURL(tbChannelName.Text);
        }
        /// <summary>
        /// Creates Live Streaming infrastructure and starts everything
        /// </summary>
        /// <returns></returns>
        public static bool Start(StartAMSConfigParams configParams)
        {
            bool tempresult = true;

            try
            {
                //Create Live Streaming infrastructure
                CreateLiveStreamingInfrastructure(configParams);
                //Starts the aChannelName to allow incoming streams
                StartChannel(configParams.AChannelName);


                //Publishes the streaming
                var StartLSConfigParams = new StartLSAMSConfigParams(configParams.AProgramlName,
                    configParams.AStreamingEndpointName);
                StartLiveStreaming(StartLSConfigParams);
            }

            catch (Exception ex)
            {
                tempresult = false;
            }
            return tempresult;
        }
       public static bool CreateLiveStreamingInfrastructure(StartAMSConfigParams configParams)
        {
            bool tempresult = true;

            try
            {
                //Set Azure credentials
                if (_context== null)
                SetMediaServicesCredentials();

                IChannel channel = CreateChannel(configParams.AChannelName, configParams.AChannelInputName, configParams.AChannelPreviewName);

                // Set the Live Encoder to point to the aChannelName's input endpoint:
                string ingestUrl = channel.Input.Endpoints.FirstOrDefault().Url.ToString();

                // Use the previewEndpoint to preview and verify 
                // that the input from the encoder is actually reaching the Channel. 
                string previewEndpoint = channel.Preview.Endpoints.FirstOrDefault().Url.ToString();

                // Once you previewed your stream and verified that it is flowing into your Channel, 
                // you can create an event by creating an Asset, Program, and Streaming Locator. 

                IProgram program = CreateProgram(new CreateProgramAMSConfigParams(channel, configParams.AAssetlName, configParams.AProgramlName, configParams.ADvrWindowsArchiveLength));
                ILocator locator = CreateLocatorForAsset(program.Asset, program.ArchiveWindowLength);
           //     IStreamingEndpoint streamingEndpoint = CreateStreamingEndpoint(configParams.AStreamingEndpointName);

                //Start the whole infrastructure (from this point I get billed for the time they are in running state)
               
      //          StartChannel(aChannelName);
      //          StartLiveStreaming(program,streamingEndpoint);

           //     GetLocatorsInAllStreamingEndpoints(program.Asset);
                
            }
            catch (Exception ex)
            {
                tempresult = false;
            }
            return tempresult;
        }