Exemplo n.º 1
0
 private void RefreshCameraDeviceList()
 {
     if (mTRTCCloud == null)
     {
         return;
     }
     this.cameraDeviceComboBox.Items.Clear();
     mCameraDeviceList = mTRTCCloud.getCameraDevicesList();
     if (mCameraDeviceList.getCount() <= 0)
     {
         return;
     }
     mCameraDevice = mTRTCCloud.getCurrentCameraDevice();
     for (uint i = 0; i < mCameraDeviceList.getCount(); i++)
     {
         this.cameraDeviceComboBox.Items.Add(mCameraDeviceList.getDeviceName(i));
         if (mCameraDevice.getDeviceName().Equals(mCameraDeviceList.getDeviceName(i)))
         {
             this.cameraDeviceComboBox.SelectedIndex = (int)i;
         }
     }
     if (string.IsNullOrEmpty(mCameraDevice.getDeviceName()) && mCameraDeviceList.getCount() > 0)
     {
         this.cameraDeviceComboBox.SelectedIndex = 0;
     }
 }
Exemplo n.º 2
0
 private void RefreshCameraDeviceList()
 {
     if (mDeviceManager == null)
     {
         return;
     }
     this.cameraDeviceComboBox.Items.Clear();
     mCameraDeviceList = mDeviceManager.getDevicesList(TRTCDeviceType.TXMediaDeviceTypeCamera);
     if (mCameraDeviceList.getCount() <= 0)
     {
         this.cameraDeviceComboBox.Items.Add("");
         this.cameraDeviceComboBox.SelectionStart = this.cameraDeviceComboBox.Text.Length;
         return;
     }
     mCameraDevice = mDeviceManager.getCurrentDevice(TRTCDeviceType.TXMediaDeviceTypeCamera);
     for (uint i = 0; i < mCameraDeviceList.getCount(); i++)
     {
         this.cameraDeviceComboBox.Items.Add(mCameraDeviceList.getDeviceName(i));
         if (mCameraDevice.getDeviceName().Equals(mCameraDeviceList.getDeviceName(i)))
         {
             this.cameraDeviceComboBox.SelectedIndex = (int)i;
         }
     }
     if (string.IsNullOrEmpty(mCameraDevice.getDeviceName()) && mCameraDeviceList.getCount() > 0)
     {
         this.cameraDeviceComboBox.SelectedIndex = 0;
     }
 }
Exemplo n.º 3
0
 private void RefreshCameraDeviceList()
 {
     if (mTRTCCloud == null)
     {
         return;
     }
     this.cameraDeviceComboBox.Items.Clear();
     mCameraDevice = mTRTCCloud.getCurrentCameraDevice();
     Log.I(String.Format("CurrentCameraDevice: pid = {0}, name = {1}", mCameraDevice.getDevicePID(), mCameraDevice.getDeviceName()));
     mCameraDeviceList = mTRTCCloud.getCameraDevicesList();
     for (uint i = 0; i < mCameraDeviceList.getCount(); i++)
     {
         this.cameraDeviceComboBox.Items.Add(mCameraDeviceList.getDeviceName(i));
         if (mCameraDevice.getDeviceName().Equals(mCameraDeviceList.getDeviceName(i)))
         {
             this.cameraDeviceComboBox.SelectedIndex = (int)i;
         }
         Log.I(String.Format("CameraDevice{0} : name = {1}, pid = {2}", i + 1, mCameraDeviceList.getDeviceName(i), mCameraDeviceList.getDevicePID(i)));
     }
     if (string.IsNullOrEmpty(mCameraDevice.getDeviceName()) && mCameraDeviceList.getCount() > 0)
     {
         this.cameraDeviceComboBox.SelectedIndex = 0;
     }
 }
Exemplo n.º 4
0
        private void RefreshSpeakerList()
        {
            if (mTRTCCloud == null)
            {
                return;
            }
            this.speakerDeviceComboBox.Items.Clear();
            mSpeakerDevice = mTRTCCloud.getCurrentSpeakerDevice();

            Log.I(String.Format("CurrentSpeakerDevice: pid = {0}, name = {1}", mSpeakerDevice.getDevicePID(), mSpeakerDevice.getDeviceName()));
            mSpeakerDeviceList = mTRTCCloud.getSpeakerDevicesList();
            for (uint i = 0; i < mSpeakerDeviceList.getCount(); i++)
            {
                this.speakerDeviceComboBox.Items.Add(mSpeakerDeviceList.getDeviceName(i));
                if (mSpeakerDevice.getDeviceName().Equals(mSpeakerDeviceList.getDeviceName(i)))
                {
                    this.speakerDeviceComboBox.SelectedIndex = (int)i;
                }
                Log.I(String.Format("SpeakerDevice{0} : name = {1}, pid = {2}", i + 1, mSpeakerDeviceList.getDeviceName(i), mSpeakerDeviceList.getDevicePID(i)));
            }
        }
Exemplo n.º 5
0
 private void RefreshSpeakerList()
 {
     if (mTRTCCloud == null)
     {
         return;
     }
     this.speakerDeviceComboBox.Items.Clear();
     mSpeakerDeviceList = mTRTCCloud.getSpeakerDevicesList();
     if (mSpeakerDeviceList.getCount() <= 0)
     {
         return;
     }
     mSpeakerDevice = mTRTCCloud.getCurrentSpeakerDevice();
     for (uint i = 0; i < mSpeakerDeviceList.getCount(); i++)
     {
         this.speakerDeviceComboBox.Items.Add(mSpeakerDeviceList.getDeviceName(i));
         if (mSpeakerDevice.getDeviceName().Equals(mSpeakerDeviceList.getDeviceName(i)))
         {
             this.speakerDeviceComboBox.SelectedIndex = (int)i;
         }
     }
 }
 private void RefreshSpeakerList()
 {
     if (mDeviceManager == null)
     {
         return;
     }
     this.speakerDeviceComboBox.Items.Clear();
     mSpeakerDeviceList = mDeviceManager.getDevicesList(TRTCDeviceType.TXMediaDeviceTypeSpeaker);
     if (mSpeakerDeviceList.getCount() <= 0)
     {
         this.speakerDeviceComboBox.Items.Add("");
         this.speakerDeviceComboBox.SelectionStart = this.speakerDeviceComboBox.Text.Length;
         return;
     }
     mSpeakerDevice = mDeviceManager.getCurrentDevice(TRTCDeviceType.TXMediaDeviceTypeSpeaker);
     for (uint i = 0; i < mSpeakerDeviceList.getCount(); i++)
     {
         this.speakerDeviceComboBox.Items.Add(mSpeakerDeviceList.getDeviceName(i));
         if (mSpeakerDevice.getDeviceName().Equals(mSpeakerDeviceList.getDeviceName(i)))
         {
             this.speakerDeviceComboBox.SelectedIndex = (int)i;
         }
     }
 }
Exemplo n.º 7
0
 private void RefreshMicDeviceList()
 {
     if (mTRTCCloud == null)
     {
         return;
     }
     this.micDeviceComboBox.Items.Clear();
     mMicDeviceList = mTRTCCloud.getMicDevicesList();
     if (mMicDeviceList.getCount() <= 0)
     {
         this.micDeviceComboBox.Items.Add("");
         this.micDeviceComboBox.SelectionStart = this.micDeviceComboBox.Text.Length;
         return;
     }
     mMicDevice = mTRTCCloud.getCurrentMicDevice();
     for (uint i = 0; i < mMicDeviceList.getCount(); i++)
     {
         this.micDeviceComboBox.Items.Add(mMicDeviceList.getDeviceName(i));
         if (mMicDevice.getDeviceName().Equals(mMicDeviceList.getDeviceName(i)))
         {
             this.micDeviceComboBox.SelectedIndex = (int)i;
         }
     }
 }