Exemple #1
0
        private void 获取播放速度ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            int ret = -1;

            ret = PlayerSDK.LibEasyPlayerPro_GetPlaySpeed(palyerHandle, channelID);
            PlayerSDK.LibEasyPlayerPro_SetOverlayText(palyerHandle, channelID, string.Format("播放倍率:{0}", ((PLAY_SPEED_ENUM)ret).ToString()));
            Thread.Sleep(1000);
            PlayerSDK.LibEasyPlayerPro_ClearOverlayText(palyerHandle, channelID);
        }
Exemple #2
0
        private void 获取媒体信息ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            int ret = -1;
            EASY_MEDIA_INFO_T _struct = new EASY_MEDIA_INFO_T();

            ret = PlayerSDK.LibEasyPlayerPro_GetStreamInfo(palyerHandle, channelID, ref _struct);
            PlayerSDK.LibEasyPlayerPro_SetOverlayText(palyerHandle, channelID, string.Format("videoWidth:{0},videoHeight:{1}", _struct.videoWidth, _struct.videoHeight));
            Thread.Sleep(1000);
            PlayerSDK.LibEasyPlayerPro_ClearOverlayText(palyerHandle, channelID);
        }
Exemple #3
0
        private void 设置音量ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            int ret = -1;

            ret = PlayerSDK.LibEasyPlayerPro_SetAudioVolume(palyerHandle, DateTime.Now.Minute + 20);
            var volume = PlayerSDK.LibEasyPlayerPro_GetAudioVolume(palyerHandle);

            PlayerSDK.LibEasyPlayerPro_SetOverlayText(palyerHandle, channelID, string.Format("设置音量为:{0}", volume));
            Thread.Sleep(2000);
            PlayerSDK.LibEasyPlayerPro_ClearOverlayText(palyerHandle, channelID);
        }
Exemple #4
0
        private void 音频设备列表ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            MIXER_DEVICE_INFO_T deviceInfo = new MIXER_DEVICE_INFO_T();
            int deviceCount = -1;
            int ret         = -1;

            ret = PlayerSDK.LibEasyPlayerPro_GetAudioOutputDeviceList(palyerHandle, ref deviceInfo, ref deviceCount);

            PlayerSDK.LibEasyPlayerPro_SetOverlayText(palyerHandle, channelID, string.Format("声音设备个数:{0}", deviceCount));
            Thread.Sleep(2000);
            PlayerSDK.LibEasyPlayerPro_ClearOverlayText(palyerHandle, channelID);
        }
Exemple #5
0
        private void 叠加文字ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (channelID <= 0)
            {
                return;
            }

            int ret        = -1;
            var checkState = (sender as ToolStripMenuItem).CheckState;

            if (checkState == CheckState.Unchecked)
            {
                ret = PlayerSDK.LibEasyPlayerPro_SetOverlayText(palyerHandle, channelID, DateTime.Now.ToString());
                (sender as ToolStripMenuItem).CheckState = CheckState.Checked;
            }
            else
            {
                ret = PlayerSDK.LibEasyPlayerPro_ClearOverlayText(palyerHandle, channelID);
                (sender as ToolStripMenuItem).CheckState = CheckState.Unchecked;
            }
        }