-
Notifications
You must be signed in to change notification settings - Fork 162
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -131,6 +131,8 @@ CplayerDlg::CplayerDlg(CWnd* pParent /*=NULL*/) | |
m_bYoloDetect = FALSE; | ||
m_bMouseSelFlag = FALSE; | ||
m_nCurMouseBtns = 0; | ||
|
||
memset(m_strUrl, '\0', MAX_PATH); | ||
} | ||
|
||
void CplayerDlg::DoDataExchange(CDataExchange* pDX) | ||
|
@@ -152,19 +154,20 @@ void CplayerDlg::PlayerOpenFile(TCHAR *file) | |
// kill player progress timer | ||
KillTimer(TIMER_ID_PROGRESS); | ||
|
||
// open file dialog | ||
if (!file) { | ||
if (dlg.DoModal() == IDOK) { | ||
_tcscpy(str, dlg.GetPathName()); | ||
} else { | ||
OnOK(); | ||
return; | ||
} | ||
} else { | ||
_tcscpy(str, file); | ||
} | ||
WideCharToMultiByte(CP_UTF8, 0, str, -1, m_strUrl, MAX_PATH, NULL, NULL); | ||
|
||
if( strlen(m_strUrl) <= 0 ){ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 你这代码只是修改了对 m_strURL 为空字符串的判断,并没有实现自动播放? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 第一次打开需要选择打开的文件,等文件播放完成后,会自动跳过再次选择文件的过程,直接播放上一次打开的文件 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 麻烦修改为命令行传参数,否则这个改动会对 testplayer 现有功能和使用逻辑造成影响 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
你能不能先帮忙debug一下代码,复现一下问题,后期我再修改一个版本吧 |
||
// open file dialog | ||
if (!file) { | ||
if (dlg.DoModal() == IDOK) { | ||
_tcscpy(str, dlg.GetPathName()); | ||
} else { | ||
OnOK(); | ||
return; | ||
} | ||
} else { | ||
_tcscpy(str, file); | ||
} | ||
WideCharToMultiByte(CP_UTF8, 0, str, -1, m_strUrl, MAX_PATH, NULL, NULL); | ||
} | ||
// set window title | ||
SetWindowText(TEXT("testplayer - loading")); | ||
|
||
|
@@ -508,6 +511,7 @@ BOOL CplayerDlg::PreTranslateMessage(MSG *pMsg) | |
|
||
void CplayerDlg::OnOpenFile() | ||
{ | ||
memset(m_strUrl, '\0', MAX_PATH); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 建议修改为 strcpy(m_strUrl, ""); 设置为空字符串,这样含义更加明确。 |
||
PlayerOpenFile(NULL); | ||
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
建议修改为 strcpy(m_strUrl, ""); 设置为空字符串,这样含义更加明确。
缩进也不对,请使用四个空格进行缩进