public AudioSettingForm(TRTCMainForm mainform)
        {
            InitializeComponent();
            this.Disposed += new EventHandler(OnDisposed);

            mTRTCCloud     = DataManager.GetInstance().trtcCloud;
            mDeviceManager = mTRTCCloud.getDeviceManager();

            mMainForm = mainform;
        }
        private void OnDisposed(object sender, EventArgs e)
        {
            //清理资源
            if (mTRTCCloud == null || mDeviceManager == null)
            {
                return;
            }
            if (this.micTestBtn.Text.Equals("停止"))
            {
                mDeviceManager.stopMicDeviceTest();
            }
            if (this.speakerTestBtn.Text.Equals("停止"))
            {
                mDeviceManager.stopSpeakerDeviceTest();
            }

            if (this.systemAudioCheckBox.Checked)
            {
                mTRTCCloud.stopSystemAudioLoopback();
            }

            if (mMicDevice != null)
            {
                mMicDevice.release();
            }
            if (mSpeakerDevice != null)
            {
                mSpeakerDevice.release();
            }

            if (mMicDeviceList != null)
            {
                mMicDeviceList.release();
            }
            if (mSpeakerDeviceList != null)
            {
                mSpeakerDeviceList.release();
            }

            mMicDevice         = null;
            mSpeakerDevice     = null;
            mMicDeviceList     = null;
            mSpeakerDeviceList = null;
            mTRTCCloud         = null;
            mDeviceManager     = null;
        }
Exemplo n.º 3
0
        private void OnDisposed(object sender, EventArgs e)
        {
            //清理资源
            if (mTRTCCloud == null)
            {
                return;
            }

            if (mCameraDeviceList != null)
            {
                mCameraDeviceList.release();
            }
            mCameraDeviceList = null;

            mTRTCCloud     = null;
            mDeviceManager = null;
        }
Exemplo n.º 4
0
        public VedioSettingForm(TRTCMainForm mainform)
        {
            InitializeComponent();
            this.Disposed += new EventHandler(OnDisposed);

            this.mTRTCCloud     = DataManager.GetInstance().trtcCloud;
            this.mDeviceManager = mTRTCCloud.getDeviceManager();

            this.resolutionComboBox.Items.Add("120 x 120");
            this.resolutionComboBox.Items.Add("160 x 160");
            this.resolutionComboBox.Items.Add("270 x 270");
            this.resolutionComboBox.Items.Add("480 x 480");
            this.resolutionComboBox.Items.Add("160 x 120");
            this.resolutionComboBox.Items.Add("240 x 180");
            this.resolutionComboBox.Items.Add("280 x 210");
            this.resolutionComboBox.Items.Add("320 x 240");
            this.resolutionComboBox.Items.Add("400 x 300");
            this.resolutionComboBox.Items.Add("480 x 360");
            this.resolutionComboBox.Items.Add("640 x 480");
            this.resolutionComboBox.Items.Add("960 x 720");
            this.resolutionComboBox.Items.Add("160 x 90");
            this.resolutionComboBox.Items.Add("256 x 144");
            this.resolutionComboBox.Items.Add("320 x 180");
            this.resolutionComboBox.Items.Add("480 x 270");
            this.resolutionComboBox.Items.Add("640 x 360");
            this.resolutionComboBox.Items.Add("960 x 540");
            this.resolutionComboBox.Items.Add("1280 x 720");

            this.fpsComboBox.Items.Add("15 fps");
            this.fpsComboBox.Items.Add("20 fps");
            this.fpsComboBox.Items.Add("24 fps");

            this.resolutionModeComboBox.Items.Add("横屏模式");
            this.resolutionModeComboBox.Items.Add("竖屏模式");

            mMainForm = mainform;
        }