Commit Graph

56 Commits

Author SHA1 Message Date
Henrik Rydgård e9930c77fd Show more info in sysinfo build config, including the FFMPEG version PPSSPP was built with 2026-03-02 00:24:19 +01:00
Henrik Rydgård 2fde87b074 Revert some const changes
Fixes #20307
2025-05-01 22:57:04 +02:00
Henrik Rydgård 1805910fac More refactoring 2024-04-10 12:22:58 +02:00
Unknown W. Brackets 68cfaf90ad Mpeg: Move some fields to private. 2023-01-07 06:54:25 -08:00
Unknown W. Brackets 94bab4506f Mpeg: Close codecs from new streams.
These were actually leaking.
2023-01-07 06:44:02 -08:00
Unknown W. Brackets 9d031caa9d Mpeg: Assume 29.97 if bad frame rate returned.
FFmpeg 3.1+ reads the frame rate only into private data, and can only expose
it publicly when using the find stream info API that reads too far ahead.
2021-02-20 15:36:53 -08:00
shenweip 5e5f5d0164 Makes video streams amount meet the expectation of sceMpegRegistStream() not only the mpegheader. 2020-11-13 18:55:52 +08:00
shenweip 41a53d70bd Rename func. 2020-02-27 19:21:27 +08:00
shenweip 6eb1d1b742 Check whether the audio is actually played in psmf player
Fixes #11898, some audio contained in pmf videos seem not be actually played by the games. current code prevents video from moving forward for waiting auido and sync, similar issue will happen.
2020-02-27 17:35:16 +08:00
Unknown W. Brackets 558b4620e8 Mpeg: Parse video streams from PSMF header.
Without doing this, FFmpeg will try to probe the streams to detect them
instead.  When it does this, sometimes it tries to read beyond the data
that's available - and then gets confused by EOFs.

Parsing this way allows us to control the situation.

An example is Valkyrie Profile, corruption in the first frames of the
second video during the intro.  Thi doesn't fix it yet, but now it's just
a matter of buffering.
2016-07-24 15:58:06 -07:00
Unknown W. Brackets 57ae9a1181 Mpeg: Ensure garbage is not read from header.
In cases where we did not have a full 64k at first, we would potentially
send FFmpeg garbage if it asked for it.
2016-07-24 15:58:04 -07:00
Henrik Rydgård 5f8f3633a8 Merge pull request #6685 from unknownbrackets/kill-volume
Remove bgm and sfx volume settings
2014-08-19 07:56:01 +02:00
Unknown W. Brackets 3fbab33c91 Only loop at video end.
In case of a short video that runs out of data but isn't ready to loop
yet.
2014-08-17 15:46:04 -07:00
Unknown W. Brackets 5c470a1923 Remove bgm and sfx volume settings.
They don't actually work in all games, and this only confuses users.

Also, the default 7 lowers the volume of audio detected as bgm or sfx, but
not other volume.  This means that some audio may have played too loud in
some games by default, which will be fixed by this change.
2014-08-17 14:16:59 -07:00
Henrik Rydgard 1d0cc3417c Audio stuff: Cleanup, delete dead code 2014-06-22 14:01:23 +02:00
Unknown W. Brackets 13b735fd02 Validate more params in scePsmfPlayerGetVideoData. 2014-05-23 23:00:01 -07:00
Unknown W. Brackets e522eea2b4 Improve psmf seek perf and audio sync. 2014-05-15 00:28:54 -07:00
Unknown W. Brackets 2042672ec7 Correct the audio pts from the actual stream data.
Before, we would just increment it and hope we were right.  There's no
reason we'd be wrong, but with seeking we have to be more careful.
2014-05-15 00:05:40 -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 eae4c9cc49 Check for no audio more directly.
This fixes some cases where the flag was set wrong.
2014-04-26 09:38:13 -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
kaienfr b18252b2b5 Support audio playing (AT3, AT3+, Mp3, AAC) 2014-03-23 19:45:08 +01:00
Unknown W. Brackets d65af7353b Avoid some ChunkFile includes. 2014-03-15 11:32:57 -07:00
Unknown W. Brackets f19d8d2eae Handle alternating video streams a lot better. 2014-01-21 01:16:16 -08:00
Unknown W. Brackets 936f34a6b7 Check the audio buffer size just in case.
This way we definitely won't overfill it.
2014-01-04 01:25:42 -08:00
Unknown W. Brackets 4e929764c8 Set the audio/video streams per sceMpegGet*Au().
This fixes #2226, thanks to @raven02 for finding the issue.  Could also
help e.g. Xyanide: Resurrection and a few other games.

The video codec change path is not super well tested, because I couldn't
find a game that triggered it, but it should work.
2014-01-03 09:29:37 -08:00
Unknown W. Brackets 2c38805791 Retry opening the context if it fails at first.
This fixes #4550, the hang on the crash video in FF4.
2014-01-01 20:47:10 -08:00
Henrik Rydgård 00c32ddadb Mostly get rid of including "Globals.h" 2013-12-30 10:17:11 +01:00
Unknown W. Brackets ae0560a1db Ignore bad video decode addresses.
Instead of crashing, even if that's more fun.
2013-12-11 08:21:01 -08:00
Sacha efad755ccc Buildfix !USE_FFMPEG 2013-11-12 17:52:43 +10:00
Unknown W. Brackets ad8c4af936 Respect the bgm vol setting for at3, mp3, video. 2013-10-26 19:33:25 -07:00
Henrik Rydgård be40289d6c Use ffmpeg for Atrac3+ decoding during video playback as well. 2013-10-19 23:09:26 +02:00
Henrik Rydgård ac2334386a Move BufferQueue out of the at3 plugin header 2013-10-17 12:31:22 +02:00
shenweip a62e9f15e9 Implemented sceMpegAvcConvertToYuv420. 2013-09-18 14:05:09 +08:00
Unknown W. Brackets 0c6fbb461d Tweak ffmpeg logging in mp3/atrac as well. 2013-09-16 08:40:38 -07:00
oioitff 97c6b96408 Remove IsAudioEnd(), use IsNoAudioData() instead. 2013-07-02 17:20:46 +08:00
oioitff 7f7e7adfe2 Free loaded data in Ringbuffer only while
ffmpeg is requiring more data. Clean up some codes.
2013-06-25 00:16:59 +08:00
oioitff 7bde93d534 Fix corrupted frames and implement savestate
for mpeg.
2013-06-25 00:16:42 +08:00
oioitff c970a7e689 Use ringbuffer as a real PSP instead huge buffer. 2013-06-25 00:16:38 +08:00
oioitff 77a17cacc5 Add support for multiple video/audio stream. 2013-06-11 19:04:14 +08:00
oioitff 32fb534375 Improve mpeg timestamp.
Read 6 bytes timestamp instead.
2013-06-10 04:21:36 +08:00
Unknown W. Brackets 14034fd9c1 PSP can decode directly to vram, so detect that.
Not sure if any games do this but I did it in a test.
2013-06-08 04:52:37 -07:00
Unknown W. Brackets 4de27773d2 Detect audio end separately from video end.
Fixes Crisis Core, broken by Wipeout Pure fix.
2013-06-08 03:00:50 -07:00
Unknown W. Brackets be7fd47fc2 Calculate packets left based on decode, not read.
This seems to be more correct.  Fixes #2039.
2013-06-08 03:00:49 -07:00
Unknown W. Brackets 073282217c Cut down on void *'s for easier debugging.
Nice to be able to see inside structs with the debugger.
2013-06-08 03:00:49 -07:00
Unknown W. Brackets 17907b204b Return a more accurate mpeg ringbuffer decode pos. 2013-06-08 03:00:46 -07:00
oioitff c913f92427 More improvement for mpeg pts.
The mpeglastTimeStamp is probably wrong in some videos. So a video is
end only if there is no more data for decoding.
2013-06-04 23:03:09 +08:00
Unknown W. Brackets 777bcc36b2 Android/etc. buildfix.
I keep thinking enums can be forward declared... and MSVC allows it.
2013-06-02 02:46:16 -07:00
Unknown W. Brackets 8dfeeee4a1 Handle 16-bit video conversion correctly.
Still directly converting, turns out colors are swapped and linesize needs
adjustment.  Oops.
2013-06-02 01:37:16 -07:00
Unknown W. Brackets b32a52f35c Convert videos directly to the desired format.
This still converts at least in some cases, but less.  But these seem
backwards, why are the BGR formats converting to RGB?
2013-06-02 00:31:16 -07:00