Пример #1
0
        private void m_btnRecordStart4_2_Click(object sender, EventArgs e)
        {
            m_hCapDev[3] = m_pMainForm.m_hCapDev4;

            m_btnRecordStart4_2.Enabled = false;

            m_btnRecordStop4_2.Enabled = true;

            m_bSupportGPU4_2 = m_checkGPU4_2.Checked;

            if (m_hCapDev[3] != 0)
            {
                if (m_bCheckedAVI4_2 == true)
                {
                    EXPORTS.QCAP_SET_AUDIO_RECORD_PROPERTY(m_hCapDev[3], 1, (uint)EXPORTS.EncoderTypeEnum.QCAP_ENCODER_TYPE_SOFTWARE, (uint)EXPORTS.AudioEncoderFormatEnum.QCAP_ENCODER_FORMAT_PCM);
                }

                if (m_bCheckedMP44_2 == true)
                {
                    EXPORTS.QCAP_SET_AUDIO_RECORD_PROPERTY(m_hCapDev[3], 1, (uint)EXPORTS.EncoderTypeEnum.QCAP_ENCODER_TYPE_SOFTWARE, (uint)EXPORTS.AudioEncoderFormatEnum.QCAP_ENCODER_FORMAT_AAC);
                }

                EXPORTS.QCAP_SET_VIDEO_RECORD_PROPERTY(m_hCapDev[3], 1, (uint)EXPORTS.EncoderTypeEnum.QCAP_ENCODER_TYPE_HARDWARE, (uint)EXPORTS.VideoEncoderFormatEnum.QCAP_ENCODER_FORMAT_H264, (uint)EXPORTS.RecordModeEnum.QCAP_RECORD_MODE_CBR, 8000, 6 * 1024 * 1024, 30, 0, 0, (uint)EXPORTS.DownScaleModeEnum.QCAP_DOWNSCALE_MODE_1_2);

                string str_avi_name4_2 = m_strAviName4_2;

                string pszNULL = null;

                EXPORTS.QCAP_START_RECORD(m_hCapDev[3], 1, ref str_avi_name4_2, (uint)EXPORTS.RecordFlagEnum.QCAP_RECORD_FLAG_FULL, 0.0, 0.0, 0.0, 0, ref pszNULL);

                m_bIsRecord4_2 = true;
            }
        }
Пример #2
0
        private void m_btnRecordStart3_2_Click(object sender, EventArgs e)
        {
            m_hCapDev[2] = m_pMainForm.m_hCapDev3;

            m_btnRecordStart3_2.Enabled = false;

            m_btnRecordStop3_2.Enabled = true;

            m_bSupportGPU3_2 = m_checkGPU3_2.Checked;

            if (m_hCapDev[2] != 0)
            {
                if (m_bCheckedAVI3_2 == true)
                {
                    EXPORTS.QCAP_SET_AUDIO_RECORD_PROPERTY(m_hCapDev[2], 1, (uint)EXPORTS.EncoderTypeEnum.QCAP_ENCODER_TYPE_SOFTWARE, (uint)EXPORTS.AudioEncoderFormatEnum.QCAP_ENCODER_FORMAT_PCM);
                }

                if (m_bCheckedMP43_2 == true)
                {
                    EXPORTS.QCAP_SET_AUDIO_RECORD_PROPERTY(m_hCapDev[2], 1, (uint)EXPORTS.EncoderTypeEnum.QCAP_ENCODER_TYPE_SOFTWARE, (uint)EXPORTS.AudioEncoderFormatEnum.QCAP_ENCODER_FORMAT_AAC);
                }

                if (m_bCheckedFLV3_2 == true)
                {
                    EXPORTS.QCAP_SET_AUDIO_RECORD_PROPERTY(m_hCapDev[2], 1, (uint)EXPORTS.EncoderTypeEnum.QCAP_ENCODER_TYPE_SOFTWARE, (uint)EXPORTS.AudioEncoderFormatEnum.QCAP_ENCODER_FORMAT_AAC);
                }

                if (m_bSupportGPU3_2)
                {
                    EXPORTS.QCAP_SET_VIDEO_RECORD_PROPERTY(m_hCapDev[2], 1, (uint)EXPORTS.EncoderTypeEnum.QCAP_ENCODER_TYPE_INTEL_MEDIA_SDK, (uint)EXPORTS.VideoEncoderFormatEnum.QCAP_ENCODER_FORMAT_H264, (uint)EXPORTS.RecordModeEnum.QCAP_RECORD_MODE_CBR, 8000, 12582912, 30, 0, 0, (uint)EXPORTS.DownScaleModeEnum.QCAP_DOWNSCALE_MODE_1_4);

                    string str_avi_name3_2 = m_strAviName3_2;

                    string pszNULL = null;

                    EXPORTS.QCAP_START_RECORD(m_hCapDev[2], 1, ref str_avi_name3_2, (uint)EXPORTS.RecordFlagEnum.QCAP_RECORD_FLAG_FULL, 0.0, 0.0, 0.0, 0, ref pszNULL);
                }
                else
                {
                    EXPORTS.QCAP_SET_VIDEO_RECORD_PROPERTY(m_hCapDev[2], 1, (uint)EXPORTS.EncoderTypeEnum.QCAP_ENCODER_TYPE_SOFTWARE, (uint)EXPORTS.VideoEncoderFormatEnum.QCAP_ENCODER_FORMAT_H264, (uint)EXPORTS.RecordModeEnum.QCAP_RECORD_MODE_CBR, 8000, 12582912, 30, 0, 0, (uint)EXPORTS.DownScaleModeEnum.QCAP_DOWNSCALE_MODE_1_4);

                    string str_avi_name3_2 = m_strAviName3_2;

                    string pszNULL = null;

                    EXPORTS.QCAP_START_RECORD(m_hCapDev[2], 1, ref str_avi_name3_2, (uint)EXPORTS.RecordFlagEnum.QCAP_RECORD_FLAG_FULL, 0.0, 0.0, 0.0, 0, ref pszNULL);
                }

                m_bIsRecord3_2 = true;
            }
        }