zou_12345的ChinaUnix博客
zou_12345
全部博文(107)
2014年(2)
2013年(13)
2012年(16)
2011年(76)
yuansy
dodba
flw
prolj
梦洋love
华仔desi
yinliudo
清爽之梦
vanjun20
cynthia
qqqno1
yn_xysnz
MEYEGG
丿奔跑的
ydfivy
mjw88122
zhagnzon
noy0623
分类: Java
2011-04-13 18:00:37
size_t AudioPlayer::fillBuffer(data, size){ ... mSource->read(&mInputBuffer, ...); mInputBuffer->meta_data()->findInt64(kKeyTime, &mPositionTimeMediaUs); mPositionTimeRealUs = ((mNumFramesPlayed + size_done / mFrameSize) * 1000000) / mSampleRate; ...}
void AwesomePlayer::onVideoEvent(){ ... mVideoSource->read(&mVideoBuffer, ...); mVideoBuffer->meta_data()->findInt64(kKeyTime, &timeUs); mAudioPlayer->getMediaTimeMapping(&realTimeUs, &mediaTimeUs); mTimeSourceDeltaUs = realTimeUs - mediaTimeUs; nowUs = ts->getRealTimeUs() - mTimeSourceDeltaUs; latenessUs = nowUs - timeUs; ...}
void AwesomePlayer::onVideoEvent(){ ... if (latenessUs > 40000) { mVideoBuffer->release(); mVideoBuffer = NULL; postVideoEvent_l(); return; } if (latenessUs < -10000) { postVideoEvent_l(10000); return; } mVideoRenderer->render(mVideoBuffer); ...}
上一篇:stagefright框架(六)-Audio Playback的流程
下一篇:sqlite3查看android数据库
登录 注册