Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

添加自动循环播放的功能测试循环播放HEVC 4K视频会报错的问题 #67

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

liquanguo
Copy link

使用testPlayer循环播放HEVC 4K视频会报错

@@ -508,6 +511,7 @@ BOOL CplayerDlg::PreTranslateMessage(MSG *pMsg)

void CplayerDlg::OnOpenFile()
{
memset(m_strUrl, '\0', MAX_PATH);
Copy link
Owner

@rockcarry rockcarry Oct 28, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

建议修改为 strcpy(m_strUrl, ""); 设置为空字符串,这样含义更加明确。
缩进也不对,请使用四个空格进行缩进

@@ -131,6 +131,8 @@ CplayerDlg::CplayerDlg(CWnd* pParent /*=NULL*/)
m_bYoloDetect = FALSE;
m_bMouseSelFlag = FALSE;
m_nCurMouseBtns = 0;

memset(m_strUrl, '\0', MAX_PATH);
Copy link
Owner

@rockcarry rockcarry Oct 28, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

建议修改为 strcpy(m_strUrl, ""); 设置为空字符串,这样含义更加明确。
缩进也不对,请使用四个空格进行缩进

}
WideCharToMultiByte(CP_UTF8, 0, str, -1, m_strUrl, MAX_PATH, NULL, NULL);

if( strlen(m_strUrl) <= 0 ){
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

你这代码只是修改了对 m_strURL 为空字符串的判断,并没有实现自动播放?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

第一次打开需要选择打开的文件,等文件播放完成后,会自动跳过再次选择文件的过程,直接播放上一次打开的文件

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

麻烦修改为命令行传参数,否则这个改动会对 testplayer 现有功能和使用逻辑造成影响

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

麻烦修改为命令行传参数,否则这个改动会对 testplayer 现有功能和使用逻辑造成影响

你能不能先帮忙debug一下代码,复现一下问题,后期我再修改一个版本吧

Copy link
Owner

@rockcarry rockcarry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

代码还需要修改下,主要是代码规范,和自动循环播放的功能并没有正确实现。
建议通过命令行传入参数来指定 url 和指定是否需要循环播放。

@liquanguo
Copy link
Author

liquanguo commented Oct 28, 2022 via email

@rockcarry
Copy link
Owner

命令行参数可以按照这个规范修改:
testplayer url --loop-play=n
n 为 -1 为永久循环, n > 0 为循环次数

@liquanguo
Copy link
Author

命令行参数可以按照这个规范修改: testplayer url --loop-play=n n 为 -1 为永久循环, n > 0 为循环次数

好,能先复现一下问题吗,那个测试的视频在百度云盘那里,连接我发在issue那里了,谢谢

@liquanguo liquanguo requested a review from rockcarry October 28, 2022 03:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants