コード例 #1
0
ファイル: Form1.cs プロジェクト: villalongacu/VooPpointMgr
        private void button2_Click(object sender, EventArgs e)
        {
            var config = new StopAMSConfigParams(tbChannelName.Text, tbStreamingEndpointName.Text);
            bool tempresult =
                VooAzureStreamFacade.VooAzureStreamFacade.ReleaseLiveStreamingInfrastructure(config);

            //  MessageBox.Show(tempresult.ToString(), "Destroy Live Streaming infrastructure", MessageBoxButtons.OK, MessageBoxIcon.Information);
        }
コード例 #2
0
        /// <summary>
        /// Stop the aChannelName and clean up the resources
        /// </summary>
        /// <returns></returns>
        public static bool Stop(StopAMSConfigParams configParams)
        {
            bool tempresult = true;

            try
            {
                ReleaseLiveStreamingInfrastructure(configParams);
            }

            catch (Exception ex)
            {
                tempresult = false;
            }
            return tempresult;
        }
コード例 #3
0
        public bool Stop(string aChannelName, string anEndPointName)
        {
            var config = new StopAMSConfigParams(aChannelName, anEndPointName);

            return VooAzureStreamFacade.Stop(config);
        }
コード例 #4
0
        public static bool ReleaseLiveStreamingInfrastructure(StopAMSConfigParams configParams)
        {
            bool tempresult = true;
            try
            {
                //Set Azure credentials
                if (_context == null)
                    SetMediaServicesCredentials();

                 IChannel channel = _context.Channels.Where(c => c.Name == configParams.AChannelName).FirstOrDefault();
                 IStreamingEndpoint streamingEndpoint = _context.StreamingEndpoints.Where(s => s.Name == configParams.AStreamingEndpointName).FirstOrDefault();;
               
                // Once you are done streaming, clean up your resources.
                Cleanup(streamingEndpoint, channel.Name);
            }
            catch (Exception ex)
            {
                tempresult = false;
            }
            return tempresult;
        }
コード例 #5
0
 public bool ReleaseLiveStreamingInfrastructure(string aChannelName, string anEndPointName)
 {
     var config = new StopAMSConfigParams(aChannelName, anEndPointName);
     return VooAzureStreamFacade.ReleaseLiveStreamingInfrastructure(config);
 }