Add support for initPts in scePsmfPlayerStart().

It won't be super speedy though, could more ideally do it on the calls to
Update()...
This commit is contained in:
Unknown W. Brackets
2014-05-05 01:24:31 -07:00
parent 5a04fc23a3
commit 9c0bc32f52
4 changed files with 46 additions and 9 deletions

View File

@@ -1232,6 +1232,13 @@ int scePsmfPlayerStart(u32 psmfPlayer, u32 psmfPlayerData, int initPts)
psmfplayer->status = PSMF_PLAYER_STATUS_PLAYING;
psmfplayer->mediaengine->openContext();
// TODO: It would be better to spread this out into the Update() calls.
while (!psmfplayer->mediaengine->seekTo(initPts, videoPixelMode)) {
_PsmfPlayerFillRingbuffer(psmfplayer);
if (psmfplayer->mediaengine->IsVideoEnd()) {
break;
}
}
return 0;
}
@@ -1555,7 +1562,7 @@ u32 scePsmfPlayerGetCurrentAudioStream(u32 psmfPlayer, u32 audioCodecAddr, u32 a
PsmfPlayer *psmfplayer = getPsmfPlayer(psmfPlayer);
if (!psmfplayer) {
ERROR_LOG(ME, "scePsmfPlayerGetCurrentAudioStream(%08x, %08x, %08x): invalid psmf player", psmfPlayer, audioCodecAddr, audioStreamNumAddr);
return ERROR_PSMF_NOT_FOUND;
return ERROR_PSMFPLAYER_INVALID_STATUS;
}
if (psmfplayer->status == PSMF_PLAYER_STATUS_INIT) {
ERROR_LOG(ME, "scePsmfPlayerGetCurrentVideoStream(%08x): psmf not yet set", psmfPlayer);