C# 视频监控系列(13):H264播放器——控制播放和截图
2009-04-08 08:23:29 来源:WEB开发网C# Code:
//是否暂停
private bool isPause;
/// <summary>
/// 播放
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void btnPlay_Click(object sender, EventArgs e)
{
if (!string.IsNullOrEmpty(m_strPlayFileName))
{
//是否暂停->播放
if (isPause)
{
HikPlayer.Hik_PlayM4_Pause(PORT, false);
isPause = false;
}
else
OpenFile();
}
}
/// <summary>
/// 暂停
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void btnPause_Click(object sender, EventArgs e)
{
HikPlayer.Hik_PlayM4_Pause(PORT, true);
isPause = true;
}
/// <summary>
/// 停止
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void btnStop_Click(object sender, EventArgs e)
{
HikPlayer.Hik_PlayM4_Stop(PORT);
HikPlayer.Hik_PlayM4_CloseFile(PORT);
HikPlayer.Hik_PlayM4_RealeseDDraw();
pVideo.Invalidate(true);
}
更多精彩
赞助商链接