Git Product home page Git Product logo

Comments (11)

microcai avatar microcai commented on June 14, 2024

说清楚点,怎么重现。你的报告语法都存在错误, 实在费解。

from avplayer.

lihaoyxj avatar lihaoyxj commented on June 14, 2024

bool CVideoParseDlg::StartVideoPlay( string Filename,int nStartTime )
{
if (!win.open(Filename.c_str(), MEDIA_TYPE_FILE))
return false;

threadid = AfxBeginThread((AFX_THREADPROC)play_thread,(void*)&win);
double dCurrtime =nStartTime;
double dAlltime = win.duration();
double nProcess = (dCurrtime-10)/dAlltime;
char szTmp[200];
sprintf(szTmp,"%f,c:%f,a:%f",nProcess,dCurrtime,dAlltime);
LOGEX(__FILE__,__LINE__,szTmp);
///Sleep(200);我是在这里加了延时后则可以正常的达到获取进度到预期的位置,如果没有这句,则播放是到了seek_to,但是获取当前播放进度是从0开始
win.seek_to(nProcess);
bPlaying = true;
SetTimer(7,1000,NULL);
return true;

}

from avplayer.

microcai avatar microcai commented on June 14, 2024

seek to 是有延时的。 seek 了立即获得时间是不行的。得等一下。

from avplayer.

lihaoyxj avatar lihaoyxj commented on June 14, 2024

seek后,我是在定时器里,每隔一秒获得一次,相当于播放器的进度条,当不sleep直接seek后,获得的播放进度是从0开始,但实际的播放进度是seek的位置

from avplayer.

microcai avatar microcai commented on June 14, 2024

不sleep直接seek是什么意思?从0开始又是什么意思? 麻烦学一下表达。

另外,不要在已经关闭的 issue 上继续回复

from avplayer.

Jackarain avatar Jackarain commented on June 14, 2024

这个问题好像之前确实存在, 但我已经有过修改, 我将再进一步跟踪这个问题. 3Q

from avplayer.

microcai avatar microcai commented on June 14, 2024

jack,我建议你重新开一个 issue ,然后写上详细的错误描述。

from avplayer.

microcai avatar microcai commented on June 14, 2024

这样有助于追踪 bug

from avplayer.

Jackarain avatar Jackarain commented on June 14, 2024

CAI, 你说的有道理, 不过这个就算了

from avplayer.

lihaoyxj avatar lihaoyxj commented on June 14, 2024

threadid = AfxBeginThread((AFX_THREADPROC)play_thread,(void*)&win);
win.seek_to(nProcess);
这个问题的根源我觉得应是线程在创建时相对较慢,而seek_to是调用创建线程时就调用了,从而在win这个对象中变成了类似 pos = nProcess;然后线程又调用了pos = 0;吧

from avplayer.

Jackarain avatar Jackarain commented on June 14, 2024

此问题应该已修复.

from avplayer.

Related Issues (17)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.