mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-11-05 13:20:11 +00:00
Replace the stub AvPlayer export set with a general-purpose player state machine covering the full API surface: sceAvPlayerInit/InitEx/PostInit, AddSource/AddSourceEx, Start/StartEx, Pause/Resume/Stop/Close, IsActive, CurrentTime, JumpToTime, SetLooping, SetAvSyncMode, SetTrickSpeed, SetAvailableBandwidth, StreamCount/EnableStream/DisableStream/ChangeStream/ GetStreamInfo(Ex), and GetVideoData(Ex)/GetAudioData. No real decoder is wired up: the player tracks lifecycle and timing state and serves a fixed-length blank clip on a wall-clock media clock, firing the READY/PLAY/PAUSE/STOP event callbacks a title expects from a real playback session. This is enough for titles that gate progression on AvPlayer's polling/event surface rather than on decoded frame content. The non-native libSceAvPlayer/Export.cpp now forwards to the native implementation via #include rather than carrying its own duplicate stub definitions, consistent with how other libSceX/libSceX.native pairs in this tree share one implementation.
19 lines
539 B
C++
19 lines
539 B
C++
#ifndef CORE_LIBS_HITLOG_HPP
|
|
#define CORE_LIBS_HITLOG_HPP
|
|
|
|
#include <atomic>
|
|
#include <cstdio>
|
|
|
|
// Logs the first three calls of the surrounding call site, then stays silent (keeps guest logs usable).
|
|
#define APS5_HIT(tag, ...) \
|
|
do { \
|
|
static std::atomic<int> aps5HitCount{0}; \
|
|
if (aps5HitCount.fetch_add(1, std::memory_order_relaxed) < 3) { \
|
|
std::fprintf(stderr, "[" tag "] " __VA_ARGS__); \
|
|
std::fputc('\n', stderr); \
|
|
std::fflush(stderr); \
|
|
} \
|
|
} while (0)
|
|
|
|
#endif
|