Beispiel #1
0
        private void InitializeEncoder()
        {
            SrcGrpColl = Encoder.SourceGroupCollection;
            SrcGrp = SrcGrpColl.Add("SG_1");
            SrcAud = SrcGrp.AddSource(WMENC_SOURCE_TYPE.WMENC_AUDIO);
            SrcVid = (IWMEncVideoSource2)SrcGrp.AddSource(WMENC_SOURCE_TYPE.WMENC_VIDEO);
            SrcAud.SetInput("Default_Audio_Device", "Device", "");
            SrcVid.SetInput("Default_Video_Device", "Device", "");

            ProColl = Encoder.ProfileCollection;

            for (int i = 0; i < ProColl.Count; i++)
            {
                Pro = ProColl.Item(i);
                data.Add(Pro.Name);

                if (Pro.Name == Codec)
                {
                    SrcGrp.set_Profile(Pro);
                    break;
                }
            }
            BrdCst = Encoder.Broadcast;
            BrdCst.set_PortNumber(WMENC_BROADCAST_PROTOCOL.WMENC_PROTOCOL_HTTP, Port);
        }
Beispiel #2
0
        public void InitializeEncoder()
        {
            try
            {
                frm_Rec=new WebMeeting.Client.Screen_Capture.frm_Rec();
                config=new Config();
                config.cfgFile = "WebMeeting.exe.config";

                // create encoder object
                m_encoder = new WMEncoder();
                m_encoder.DisplayInfo.Author="Zaeem";
                m_encoder.DisplayInfo.Copyright="Uraan Software Solutions";
                m_encoder.DisplayInfo.Description="Uraan Generated Media File for Screen Recording";
                m_encoder.DisplayInfo.Title="Recorded Screen";
                m_encoder.DisplayInfo.Title="Recorded Screen";
                m_encoder.DisplayInfo.Rating="1";
                m_encoder.DisplayInfo.Description="This file is Generated through CampusNav developed by Uraan Software Solution";

                // retrive source group collection
                m_sourceGroupCollection = m_encoder.SourceGroupCollection;

                // add a source group to collection
                m_srcGrp = m_sourceGroupCollection.Add("SG_1");

                m_sourceEnumDlg= new SourceEnum();

                // add a screen source
                if(EnumerateAudioSources())
                {
                    m_audSource = m_srcGrp.AddSource(WMENC_SOURCE_TYPE.WMENC_AUDIO);
                    m_audSource.SetInput(m_szAudioSource, "Device", "");
                }

                // set screen as source
                m_screenSource = (IWMEncVideoSource2)m_srcGrp.AddSource(WMENC_SOURCE_TYPE.WMENC_VIDEO);
                m_screenSource.SetInput("ScreenCapture1", "ScreenCap", "");

            }
            catch(Exception  exp)
            {

                WebMeeting.Client.ClientUI.getInstance().ShowExceptionMessage("Video Recordong Module ===>Screen Capture.cs line==> 99",exp,"Error Loading Encoder: " + exp.Message.ToString(),false);
                if( MessageBox.Show("Either You do not have required components of Windows Media Encoder or they are corrupted on your Machine: "+ /*+exp.Message.ToString() + */". Do you want to download now?","WebMeeting",MessageBoxButtons.YesNo,MessageBoxIcon.Information) == DialogResult.Yes)
                {
                    Win32.Shell32.ShellExecute(0,"Open",WebMeeting.Client.Info.getInstance().WebsiteName + "/wmencoder.exe","","",1);
                }

                //WebMeeting.Client.ClientUI.getInstance().ShowExceptionMessage("Error Stoping encoder: " + exp.Message.ToString());
                //Trace.WriteLine(exp.ToString()+"---"+exp.Message+"---"+exp.Source+exp.StackTrace+"---"+exp.TargetSite+"---"+exp.InnerException);

            }
        }
        /// <summary>
        /// �f�o�C�X�̏����ݒ��s��
        /// </summary>
        private void InitDevice()
        {
            this.groupList = this.enc.SourceGroupCollection;

            this.group = this.groupList.Add("sg1");
            this.source = this.group.AddSource(WMENC_SOURCE_TYPE.WMENC_VIDEO);
            this.source.SetInput("Default_Video_Device", "Device", "");
        }