Commit graph

191 commits

Author SHA1 Message Date
Unknown W. Brackets
64df42d613 Don't change status in scePsmfPlayerBreak().
It was changed to INIT in d37100b30a, but I
think that only fixed the game because STANDBY was wrong.  Not changing
the status is the correct behavior.
2014-05-24 12:41:40 -07:00
Unknown W. Brackets
d4e548013e Don't zero paused, but do zero end in psmfplayer.
To make sure the video/audio sync up.

If an audio frame was already decoded, it should technically be returned,
but after that it will return an error.
2014-05-24 01:31:50 -07:00
Unknown W. Brackets
222be04b38 Cleanup err codes in scePsmfPlayerGetAudioData().
Even if there's no *more* audio, if the current audio is valid return 0.
2014-05-24 01:10:26 -07:00
Unknown W. Brackets
bc661f4f10 Clean up a duplicate if branch. 2014-05-23 23:02:23 -07:00
Unknown W. Brackets
28a9f7155a Handle a default video with of 0 in psmfplayer. 2014-05-23 23:01:26 -07:00
Unknown W. Brackets
c03aa31240 Write video frames even while paused.
This function just writes the video data to the buffer if at all possible.
2014-05-23 23:00:48 -07:00
Unknown W. Brackets
13b735fd02 Validate more params in scePsmfPlayerGetVideoData. 2014-05-23 23:00:01 -07:00
Unknown W. Brackets
ab57bcd4b3 Fix errors and scheduling in psmfplayer stop. 2014-05-22 23:41:38 -07:00
Unknown W. Brackets
75e4575ffe Properly schedule psmfplayer video finish.
Fixes #2251, hurray.
2014-05-22 23:40:44 -07:00
Unknown W. Brackets
a2031cdc62 scePsmfPlayerGetVideoData() keeps going at end.
Even if the video has ended, this happily returns the last frame (with the
same pts value) over and over.  Audio or no audio.

It only returns no data when it's called too early.
2014-05-22 22:19:10 -07:00
Unknown W. Brackets
e79d700bf0 Fix error codes in scePsmfPlayerGetVideoData(). 2014-05-22 22:17:42 -07:00
Unknown W. Brackets
da03308bfa Small correction to psmfplayer seeking.
Should be the specific position after the fileoffset, and should be offset
by the start pts thing...
2014-05-22 00:34:47 -07:00
Unknown W. Brackets
1c4053f3c6 Correct scePsmfPlayerUpdate() finished timing.
With or without audio, it always sets the end on the second call after the
last frame.  Makes sense.
2014-05-22 00:08:18 -07:00
Unknown W. Brackets
346f725334 Don't allow seeking without an EPmap. 2014-05-18 21:58:43 -07:00
Unknown W. Brackets
aafc8f1cec Validate and report initial psmfplayer playMode.
We only support play and pause, but they're the only ones I've seen.
2014-05-18 21:41:15 -07:00
Unknown W. Brackets
0c77d3c2ea Delay scePsmfPlayerStart() when seeking.
It seems to only delay when it was already playing.
2014-05-18 20:59:18 -07:00
Unknown W. Brackets
ceebdca2fb Check scePsmfPlayerStart() params like the PSP.
It doesn't care if there's actually audio data here.
2014-05-18 20:48:02 -07:00
Unknown W. Brackets
cd9d85caff Add a delay when setting the psmfplayer file.
This roughly matches the delay that occurs on a real PSP, during which
other threads can run.
2014-05-18 20:43:10 -07:00
Unknown W. Brackets
923189ab47 Prevent a crash on bogus data in psmfplayer. 2014-05-18 20:30:58 -07:00
Unknown W. Brackets
242fe2f3a9 scePsmfPlayerGetVideoData() writes every frame.
Thought it didn't due to dcache not being invalidated.  Fixes #6085.
2014-05-18 19:26:05 -07:00
Unknown W. Brackets
55fd30b520 Skip a bit of work when syncing video/audio. 2014-05-18 19:20:34 -07:00
Unknown W. Brackets
f7424c6671 Validate the psmf address in scePsmfSetPsmf().
Just to prevent crashes, don't think it's happening anyway.
2014-05-15 01:11:50 -07:00
Unknown W. Brackets
a5e374fc57 Only warn when getting pts without any frame yet. 2014-05-15 00:30:06 -07:00
Unknown W. Brackets
a429e5f8d6 Defer psmf seeking to Update() calls, use epmap.
This improves performance significantly.
2014-05-15 00:14:27 -07:00
Unknown W. Brackets
b0ebcfd087 Allow creating a Psmf from non-PSP RAM.
This way we can reuse the epmap reading code, etc.
2014-05-15 00:10:01 -07:00
Unknown W. Brackets
8404a52ab9 Fix typo in scePsmfPlayerStart() rewind. 2014-05-12 07:33:00 -07:00
Unknown W. Brackets
578e4e049b When psmfplayer video is behind audio, skip frames.
This is what the PSP does.  Basically the audio pts drives sync.
2014-05-11 21:51:28 -07:00
Unknown W. Brackets
3205964204 Validate and support stream params in psmfplayer. 2014-05-11 14:23:14 -07:00
Unknown W. Brackets
66a480ba95 scePsmfPlayerStart() can also rewind. 2014-05-11 14:23:13 -07:00
Unknown W. Brackets
9c0bc32f52 Add support for initPts in scePsmfPlayerStart().
It won't be super speedy though, could more ideally do it on the calls to
Update()...
2014-05-11 14:23:13 -07:00
Unknown W. Brackets
5a04fc23a3 Improve error handling in scePsmfPlayerStart(). 2014-05-11 14:23:12 -07:00
Unknown W. Brackets
27fbf4c90e Don't return video/audio the first couple frames.
Fixes issues where games don't expect audio to be written to the display
buffer for the first couple games.  Reported to fix #5416.
2014-04-27 13:02:03 -07:00
Unknown W. Brackets
f9a81c8691 Allow smaller psmfplayer buffer sizes.
Some libpsmfplayer.prx libraries allow smaller.
2014-04-27 10:25:51 -07:00
Unknown W. Brackets
647d6c0960 Invalidate when writing video image.
It is required to update the framebuffer, of course.  Fixes Dead or Alive
video flicker.
2014-04-27 08:23:42 -07:00
Unknown W. Brackets
d92650ee42 Improve scePsmfPlayer*Data() timing.
Instead of blocking, video should just return old data if called too
often.  Fixes #5910.
2014-04-25 23:48:13 -07:00
Unknown W. Brackets
a5b2adfff5 Add errors for getting and changing the playmode.
And reporting.  Also, correct the default playMode for unset psmfplayers.
2014-04-25 21:00:24 -07:00
Unknown W. Brackets
9b4f8b1a99 Attempt scePsmfPlayerSelectSpecific*().
These functions seem buggy on a real PSP... and they return a weird
variety of error codes.
2014-04-22 08:07:49 -07:00
Unknown W. Brackets
891764d8ee Make scePsmfPlayerSelect*() actually switch.
Don't have any games actually using this, so let's report too.  Audio is
falsely working when the stream isn't playable, not exactly sure the best
way to detect that.
2014-04-22 08:07:49 -07:00
Unknown W. Brackets
56673d3737 Fix overflow in scePsmfPlayerGetCurrent*Stream().
And clean up the returned error codes.
2014-04-22 08:07:48 -07:00
Unknown W. Brackets
818d8cb894 Validate psmfplayer config params, reset on create.
Could fix issues if a game uses different pixel modes or more likely
different loop modes.
2014-04-22 08:07:48 -07:00
Unknown W. Brackets
9d5fb217b9 Correct errors in scePsmfPlayerGetPsmfInfo(). 2014-04-20 13:48:45 -07:00
Unknown W. Brackets
65ec567ac6 Correct the results of scePsmfPlayerGetPsmfInfo().
Not sure of the other field yet, probably PCM?
2014-04-20 12:19:08 -07:00
Unknown W. Brackets
fc2b105406 Detect bad data in scePsmfPlayerSetPsmf*(), report.
Not returning an error code here for now to be safe.
2014-04-20 09:22:53 -07:00
Unknown W. Brackets
414b846508 Validate params in scePsmfPlayerSetPsmf*().
Also, properly swap offset/size on BE.
2014-04-20 08:46:45 -07:00
Unknown W. Brackets
049938202c Allow using a copy of a psmfplayer handle.
Since this works on the PSP.  Games do it with mpeg for sure, maybe with
psmfplayer as well?
2014-04-20 08:22:51 -07:00
Unknown W. Brackets
b9711db99a Correct scePsmfPlayerSetTempBuf() error codes.
And rename error code, since it's more about invalid status than being not
initialized yet (it's returned even if it the status has advanced.)
2014-04-20 08:20:58 -07:00
Unknown W. Brackets
fb82310c9a Correct scePsmfPlayerCreate() based on tests.
Mostly error codes.  Report duplicates which don't work on the PSP.
2014-04-20 00:25:48 -07:00
Unknown W. Brackets
c6f52db194 Fix some scePsmf leaks. 2014-03-30 13:14:17 -07:00
Unknown W. Brackets
05ab192c9c Reduce includes in Core/HLE/.
Especially templates.
2014-03-15 11:22:19 -07:00
lioncash
b9886942a7 Fix some vertical alignments in misc Core source files. 2014-03-03 11:16:53 -05:00