mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-10-23 17:13:13 -05:00
Replace the decoder-less AvPlayer with a player that demuxes MP4 sources with FFmpeg (opened by path or through the title's file replacement), decodes H.264 and AAC on their own threads, and hands out NV12 frames and interleaved 16-bit PCM in buffers from the title's allocators, presented on a media clock that audio drives when it is enabled. Both libSceAvPlayer and libSceAvPlayer.native are built from the same sources and link the shared ffmpeg target. The struct size checks stay, next to the types in SceTypes.hpp. ChangeStream and GetStreamInfoEx are implemented; Init without allocators, StartEx, SetAvailableBandwidth, SetLogCallback and negative trick speeds succeed as before and are listed in TechnicalDebt. HLS sources throw. guest_avplayer plays an embedded 6 KB MP4 (H.264 plus two AAC tracks).
16 lines
605 B
CMake
16 lines
605 B
CMake
function(add_sce_avplayer_library target)
|
|
set(avPlayerDir ${CMAKE_CURRENT_FUNCTION_LIST_DIR})
|
|
add_library(${target} SHARED EXCLUDE_FROM_ALL
|
|
${CMAKE_CURRENT_SOURCE_DIR}/Export.cpp
|
|
${avPlayerDir}/src/Player.cpp
|
|
${avPlayerDir}/src/Source.cpp
|
|
)
|
|
target_include_directories(${target} PRIVATE ${LIBS_INCLUDE_DIR})
|
|
target_link_libraries(${target} PRIVATE ffmpeg libc)
|
|
set_target_properties(${target} PROPERTIES
|
|
CXX_VISIBILITY_PRESET hidden
|
|
VISIBILITY_INLINES_HIDDEN ON
|
|
)
|
|
configure_windows_unwind(${target})
|
|
endfunction()
|