2020-12-05 13:08:24 +01:00
# include "stdafx.h"
2020-02-15 23:36:20 +01:00
# include "Emu/VFS.h"
2016-03-21 20:43:03 +01:00
# include "Emu/Cell/PPUModule.h"
2014-08-24 00:34:04 +02:00
2014-08-02 10:20:48 +02:00
# include "cellSail.h"
2014-12-24 19:47:56 +01:00
# include "cellPamf.h"
2014-08-02 10:20:48 +02:00
2018-08-25 14:39:00 +02:00
LOG_CHANNEL ( cellSail ) ;
2013-09-28 04:36:57 +02:00
2020-07-16 12:14:57 +02:00
template < >
void fmt_class_string < CellSailError > : : format ( std : : string & out , u64 arg )
{
format_enum ( out , arg , [ ] ( auto error )
{
2025-04-05 21:50:45 +02:00
switch ( error )
{
STR_CASE ( CELL_SAIL_ERROR_INVALID_ARG ) ;
STR_CASE ( CELL_SAIL_ERROR_INVALID_STATE ) ;
STR_CASE ( CELL_SAIL_ERROR_UNSUPPORTED_STREAM ) ;
STR_CASE ( CELL_SAIL_ERROR_INDEX_OUT_OF_RANGE ) ;
STR_CASE ( CELL_SAIL_ERROR_EMPTY ) ;
STR_CASE ( CELL_SAIL_ERROR_FULLED ) ;
STR_CASE ( CELL_SAIL_ERROR_USING ) ;
STR_CASE ( CELL_SAIL_ERROR_NOT_AVAILABLE ) ;
STR_CASE ( CELL_SAIL_ERROR_CANCEL ) ;
STR_CASE ( CELL_SAIL_ERROR_MEMORY ) ;
STR_CASE ( CELL_SAIL_ERROR_INVALID_FD ) ;
STR_CASE ( CELL_SAIL_ERROR_FATAL ) ;
}
2020-07-16 12:14:57 +02:00
2025-04-05 21:50:45 +02:00
return unknown ;
} ) ;
2020-07-16 12:14:57 +02:00
}
error_code cellSailMemAllocatorInitialize ( vm : : ptr < CellSailMemAllocator > pSelf , vm : : ptr < CellSailMemAllocatorFuncs > pCallbacks )
2013-09-28 04:36:57 +02:00
{
2016-01-12 22:57:16 +01:00
cellSail . warning ( " cellSailMemAllocatorInitialize(pSelf=*0x%x, pCallbacks=*0x%x) " , pSelf , pCallbacks ) ;
2014-10-17 15:20:40 +02:00
pSelf - > callbacks = pCallbacks ;
2013-09-28 04:36:57 +02:00
return CELL_OK ;
}
2020-07-16 12:14:57 +02:00
error_code cellSailFutureInitialize ( vm : : ptr < CellSailFuture > pSelf )
2013-09-28 04:36:57 +02:00
{
2016-01-12 22:57:16 +01:00
cellSail . todo ( " cellSailFutureInitialize(pSelf=*0x%x) " , pSelf ) ;
2013-09-28 04:36:57 +02:00
return CELL_OK ;
}
2020-07-16 12:14:57 +02:00
error_code cellSailFutureFinalize ( vm : : ptr < CellSailFuture > pSelf )
2013-09-28 04:36:57 +02:00
{
2016-01-12 22:57:16 +01:00
cellSail . todo ( " cellSailFutureFinalize(pSelf=*0x%x) " , pSelf ) ;
2013-09-28 04:36:57 +02:00
return CELL_OK ;
}
2020-07-16 12:14:57 +02:00
error_code cellSailFutureReset ( vm : : ptr < CellSailFuture > pSelf , b8 wait )
2013-09-28 04:36:57 +02:00
{
2016-01-12 22:57:16 +01:00
cellSail . todo ( " cellSailFutureReset(pSelf=*0x%x, wait=%d) " , pSelf , wait ) ;
2013-09-28 04:36:57 +02:00
return CELL_OK ;
}
2020-07-16 12:14:57 +02:00
error_code cellSailFutureSet ( vm : : ptr < CellSailFuture > pSelf , s32 result )
2013-09-28 04:36:57 +02:00
{
2016-01-12 22:57:16 +01:00
cellSail . todo ( " cellSailFutureSet(pSelf=*0x%x, result=%d) " , pSelf , result ) ;
2013-09-28 04:36:57 +02:00
return CELL_OK ;
}
2020-07-16 12:14:57 +02:00
error_code cellSailFutureGet ( vm : : ptr < CellSailFuture > pSelf , u64 timeout , vm : : ptr < s32 > pResult )
2013-09-28 04:36:57 +02:00
{
2016-01-12 22:57:16 +01:00
cellSail . todo ( " cellSailFutureGet(pSelf=*0x%x, timeout=%lld, result=*0x%x) " , pSelf , timeout , pResult ) ;
2013-09-28 04:36:57 +02:00
return CELL_OK ;
}
2020-07-16 12:14:57 +02:00
error_code cellSailFutureIsDone ( vm : : ptr < CellSailFuture > pSelf , vm : : ptr < s32 > pResult )
2013-09-28 04:36:57 +02:00
{
2016-01-12 22:57:16 +01:00
cellSail . todo ( " cellSailFutureIsDone(pSelf=*0x%x, result=*0x%x) " , pSelf , pResult ) ;
2013-09-28 04:36:57 +02:00
return CELL_OK ;
}
2020-07-16 12:14:57 +02:00
error_code cellSailDescriptorGetStreamType ( )
2013-09-28 04:36:57 +02:00
{
UNIMPLEMENTED_FUNC ( cellSail ) ;
return CELL_OK ;
}
2020-07-16 12:14:57 +02:00
error_code cellSailDescriptorGetUri ( )
2013-09-28 04:36:57 +02:00
{
UNIMPLEMENTED_FUNC ( cellSail ) ;
return CELL_OK ;
}
2020-07-16 12:14:57 +02:00
error_code cellSailDescriptorGetMediaInfo ( )
2013-09-28 04:36:57 +02:00
{
UNIMPLEMENTED_FUNC ( cellSail ) ;
return CELL_OK ;
}
2020-07-16 12:14:57 +02:00
error_code cellSailDescriptorSetAutoSelection ( vm : : ptr < CellSailDescriptor > pSelf , b8 autoSelection )
2013-09-28 04:36:57 +02:00
{
2016-01-12 22:57:16 +01:00
cellSail . warning ( " cellSailDescriptorSetAutoSelection(pSelf=*0x%x, autoSelection=%d) " , pSelf , autoSelection ) ;
2014-10-17 15:20:40 +02:00
2015-08-10 14:10:16 +02:00
if ( pSelf )
{
2014-11-15 15:45:02 +01:00
pSelf - > autoSelection = autoSelection ;
return autoSelection ;
}
2014-10-17 15:20:40 +02:00
2014-11-15 15:45:02 +01:00
return CELL_OK ;
2013-09-28 04:36:57 +02:00
}
2020-07-16 12:14:57 +02:00
error_code cellSailDescriptorIsAutoSelection ( vm : : ptr < CellSailDescriptor > pSelf )
2013-09-28 04:36:57 +02:00
{
2016-01-12 22:57:16 +01:00
cellSail . warning ( " cellSailDescriptorIsAutoSelection(pSelf=*0x%x) " , pSelf ) ;
2018-08-25 14:39:00 +02:00
2014-11-15 15:45:02 +01:00
if ( pSelf )
2015-08-10 14:10:16 +02:00
{
2014-11-15 15:45:02 +01:00
return pSelf - > autoSelection ;
2015-08-10 14:10:16 +02:00
}
2014-11-15 15:45:02 +01:00
return CELL_OK ;
2013-09-28 04:36:57 +02:00
}
2020-07-16 12:14:57 +02:00
error_code cellSailDescriptorCreateDatabase ( vm : : ptr < CellSailDescriptor > pSelf , vm : : ptr < void > pDatabase , u32 size , u64 arg )
2013-09-28 04:36:57 +02:00
{
2016-01-12 22:57:16 +01:00
cellSail . warning ( " cellSailDescriptorCreateDatabase(pSelf=*0x%x, pDatabase=*0x%x, size=0x%x, arg=0x%llx) " , pSelf , pDatabase , size , arg ) ;
2014-12-24 19:47:56 +01:00
2019-12-02 22:31:34 +01:00
switch ( pSelf - > streamType )
2015-08-10 14:10:16 +02:00
{
2025-04-05 21:50:45 +02:00
case CELL_SAIL_STREAM_PAMF :
{
u32 addr = pSelf - > sp_ ;
auto ptr = vm : : ptr < CellPamfReader > : : make ( addr ) ;
memcpy ( pDatabase . get_ptr ( ) , ptr . get_ptr ( ) , sizeof ( CellPamfReader ) ) ;
break ;
}
default :
cellSail . error ( " Unhandled stream type: %d " , pSelf - > streamType ) ;
2014-12-24 19:47:56 +01:00
}
2013-09-28 04:36:57 +02:00
return CELL_OK ;
}
2020-07-16 12:14:57 +02:00
error_code cellSailDescriptorDestroyDatabase ( )
2013-09-28 04:36:57 +02:00
{
UNIMPLEMENTED_FUNC ( cellSail ) ;
return CELL_OK ;
}
2020-07-16 12:14:57 +02:00
error_code cellSailDescriptorOpen ( )
2013-09-28 04:36:57 +02:00
{
UNIMPLEMENTED_FUNC ( cellSail ) ;
return CELL_OK ;
}
2020-07-16 12:14:57 +02:00
error_code cellSailDescriptorClose ( )
2013-09-28 04:36:57 +02:00
{
UNIMPLEMENTED_FUNC ( cellSail ) ;
return CELL_OK ;
}
2020-07-16 12:14:57 +02:00
error_code cellSailDescriptorSetEs ( )
2013-09-28 04:36:57 +02:00
{
UNIMPLEMENTED_FUNC ( cellSail ) ;
return CELL_OK ;
}
2020-07-16 12:14:57 +02:00
error_code cellSailDescriptorClearEs ( )
2013-09-28 04:36:57 +02:00
{
UNIMPLEMENTED_FUNC ( cellSail ) ;
return CELL_OK ;
}
2020-07-16 12:14:57 +02:00
error_code cellSailDescriptorGetCapabilities ( )
2013-09-28 04:36:57 +02:00
{
UNIMPLEMENTED_FUNC ( cellSail ) ;
return CELL_OK ;
}
2020-07-16 12:14:57 +02:00
error_code cellSailDescriptorInquireCapability ( )
2013-09-28 04:36:57 +02:00
{
UNIMPLEMENTED_FUNC ( cellSail ) ;
return CELL_OK ;
}
2020-07-16 12:14:57 +02:00
error_code cellSailDescriptorSetParameter ( )
2013-09-28 04:36:57 +02:00
{
UNIMPLEMENTED_FUNC ( cellSail ) ;
return CELL_OK ;
}
2020-07-16 12:14:57 +02:00
error_code cellSailSoundAdapterInitialize ( vm : : ptr < CellSailSoundAdapter > pSelf , vm : : cptr < CellSailSoundAdapterFuncs > pCallbacks , vm : : ptr < void > pArg )
2013-09-28 04:36:57 +02:00
{
2016-01-12 22:57:16 +01:00
cellSail . warning ( " cellSailSoundAdapterInitialize(pSelf=*0x%x, pCallbacks=*0x%x, pArg=*0x%x) " , pSelf , pCallbacks , pArg ) ;
2015-08-10 14:10:16 +02:00
if ( pSelf - > initialized )
{
return CELL_SAIL_ERROR_INVALID_STATE ;
}
if ( pSelf - > registered )
{
return CELL_SAIL_ERROR_INVALID_STATE ;
}
pSelf - > pMakeup = pCallbacks - > pMakeup ;
pSelf - > pCleanup = pCallbacks - > pCleanup ;
pSelf - > pFormatChanged = pCallbacks - > pFormatChanged ;
pSelf - > arg = pArg ;
pSelf - > initialized = true ;
pSelf - > registered = false ;
2013-09-28 04:36:57 +02:00
return CELL_OK ;
}
2020-07-16 12:14:57 +02:00
error_code cellSailSoundAdapterFinalize ( vm : : ptr < CellSailSoundAdapter > pSelf )
2013-09-28 04:36:57 +02:00
{
2016-01-12 22:57:16 +01:00
cellSail . warning ( " cellSailSoundAdapterFinalize(pSelf=*0x%x) " , pSelf ) ;
2015-08-10 14:10:16 +02:00
if ( ! pSelf - > initialized )
{
return CELL_SAIL_ERROR_INVALID_STATE ;
}
if ( pSelf - > registered )
{
return CELL_SAIL_ERROR_INVALID_STATE ;
}
2013-09-28 04:36:57 +02:00
return CELL_OK ;
}
2020-07-16 12:14:57 +02:00
error_code cellSailSoundAdapterSetPreferredFormat ( vm : : ptr < CellSailSoundAdapter > pSelf , vm : : cptr < CellSailAudioFormat > pFormat )
2013-09-28 04:36:57 +02:00
{
2016-01-12 22:57:16 +01:00
cellSail . warning ( " cellSailSoundAdapterSetPreferredFormat(pSelf=*0x%x, pFormat=*0x%x) " , pSelf , pFormat ) ;
2015-08-10 14:10:16 +02:00
pSelf - > format = * pFormat ;
2013-09-28 04:36:57 +02:00
return CELL_OK ;
}
2020-07-16 12:14:57 +02:00
error_code cellSailSoundAdapterGetFrame ( vm : : ptr < CellSailSoundAdapter > pSelf , u32 samples , vm : : ptr < CellSailSoundFrameInfo > pInfo )
2013-09-28 04:36:57 +02:00
{
2016-01-12 22:57:16 +01:00
cellSail . todo ( " cellSailSoundAdapterGetFrame(pSelf=*0x%x, samples=%d, pInfo=*0x%x) " , pSelf , samples , pInfo ) ;
2015-08-10 14:10:16 +02:00
if ( ! pSelf - > initialized )
{
return CELL_SAIL_ERROR_INVALID_STATE ;
}
if ( pSelf - > registered )
{
return CELL_SAIL_ERROR_INVALID_STATE ;
}
if ( samples > 2048 )
{
return CELL_SAIL_ERROR_INVALID_ARG ;
}
2013-09-28 04:36:57 +02:00
return CELL_OK ;
}
2020-07-16 12:14:57 +02:00
error_code cellSailSoundAdapterGetFormat ( vm : : ptr < CellSailSoundAdapter > pSelf , vm : : ptr < CellSailAudioFormat > pFormat )
2013-09-28 04:36:57 +02:00
{
2016-01-12 22:57:16 +01:00
cellSail . warning ( " cellSailSoundAdapterGetFormat(pSelf=*0x%x, pFormat=*0x%x) " , pSelf , pFormat ) ;
2015-08-10 14:10:16 +02:00
* pFormat = pSelf - > format ;
2013-09-28 04:36:57 +02:00
return CELL_OK ;
}
2020-07-16 12:14:57 +02:00
error_code cellSailSoundAdapterUpdateAvSync ( )
2013-09-28 04:36:57 +02:00
{
UNIMPLEMENTED_FUNC ( cellSail ) ;
return CELL_OK ;
}
2020-07-16 12:14:57 +02:00
error_code cellSailSoundAdapterPtsToTimePosition ( )
2013-09-28 04:36:57 +02:00
{
UNIMPLEMENTED_FUNC ( cellSail ) ;
return CELL_OK ;
}
2020-07-16 12:14:57 +02:00
error_code cellSailGraphicsAdapterInitialize ( vm : : ptr < CellSailGraphicsAdapter > pSelf , vm : : cptr < CellSailGraphicsAdapterFuncs > pCallbacks , vm : : ptr < void > pArg )
2013-09-28 04:36:57 +02:00
{
2016-01-12 22:57:16 +01:00
cellSail . warning ( " cellSailGraphicsAdapterInitialize(pSelf=*0x%x, pCallbacks=*0x%x, pArg=*0x%x) " , pSelf , pCallbacks , pArg ) ;
2015-08-10 14:10:16 +02:00
if ( pSelf - > initialized )
{
return CELL_SAIL_ERROR_INVALID_STATE ;
}
if ( pSelf - > registered )
{
return CELL_SAIL_ERROR_INVALID_STATE ;
}
pSelf - > pMakeup = pCallbacks - > pMakeup ;
pSelf - > pCleanup = pCallbacks - > pCleanup ;
pSelf - > pFormatChanged = pCallbacks - > pFormatChanged ;
pSelf - > pAlloc = pCallbacks - > pAlloc ;
pSelf - > pFree = pCallbacks - > pFree ;
pSelf - > arg = pArg ;
pSelf - > initialized = true ;
pSelf - > registered = true ;
2013-09-28 04:36:57 +02:00
return CELL_OK ;
}
2020-07-16 12:14:57 +02:00
error_code cellSailGraphicsAdapterFinalize ( vm : : ptr < CellSailGraphicsAdapter > pSelf )
2013-09-28 04:36:57 +02:00
{
2016-01-12 22:57:16 +01:00
cellSail . todo ( " cellSailGraphicsAdapterFinalize(pSelf=*0x%x) " , pSelf ) ;
2015-08-10 14:10:16 +02:00
if ( ! pSelf - > initialized )
{
return CELL_SAIL_ERROR_INVALID_STATE ;
}
if ( pSelf - > registered )
{
return CELL_SAIL_ERROR_INVALID_STATE ;
}
2013-09-28 04:36:57 +02:00
return CELL_OK ;
}
2020-07-16 12:14:57 +02:00
error_code cellSailGraphicsAdapterSetPreferredFormat ( vm : : ptr < CellSailGraphicsAdapter > pSelf , vm : : cptr < CellSailVideoFormat > pFormat )
2013-09-28 04:36:57 +02:00
{
2016-01-12 22:57:16 +01:00
cellSail . warning ( " cellSailGraphicsAdapterSetPreferredFormat(pSelf=*0x%x, pFormat=*0x%x) " , pSelf , pFormat ) ;
2015-08-10 14:10:16 +02:00
pSelf - > format = * pFormat ;
2013-09-28 04:36:57 +02:00
return CELL_OK ;
}
2020-07-16 12:14:57 +02:00
error_code cellSailGraphicsAdapterGetFrame ( vm : : ptr < CellSailGraphicsAdapter > pSelf , vm : : ptr < CellSailGraphicsFrameInfo > pInfo )
2013-09-28 04:36:57 +02:00
{
2016-01-12 22:57:16 +01:00
cellSail . todo ( " cellSailGraphicsAdapterGetFrame(pSelf=*0x%x, pInfo=*0x%x) " , pSelf , pInfo ) ;
2013-09-28 04:36:57 +02:00
return CELL_OK ;
}
2020-07-16 12:14:57 +02:00
error_code cellSailGraphicsAdapterGetFrame2 ( vm : : ptr < CellSailGraphicsAdapter > pSelf , vm : : ptr < CellSailGraphicsFrameInfo > pInfo , vm : : ptr < CellSailGraphicsFrameInfo > pPrevInfo , vm : : ptr < u64 > pFlipTime , u64 flags )
2013-09-28 04:36:57 +02:00
{
2016-01-12 22:57:16 +01:00
cellSail . todo ( " cellSailGraphicsAdapterGetFrame2(pSelf=*0x%x, pInfo=*0x%x, pPrevInfo=*0x%x, flipTime=*0x%x, flags=0x%llx) " , pSelf , pInfo , pPrevInfo , pFlipTime , flags ) ;
2015-08-11 18:48:02 +02:00
2013-09-28 04:36:57 +02:00
return CELL_OK ;
}
2020-07-16 12:14:57 +02:00
error_code cellSailGraphicsAdapterGetFormat ( vm : : ptr < CellSailGraphicsAdapter > pSelf , vm : : ptr < CellSailVideoFormat > pFormat )
2013-09-28 04:36:57 +02:00
{
2016-01-12 22:57:16 +01:00
cellSail . warning ( " cellSailGraphicsAdapterGetFormat(pSelf=*0x%x, pFormat=*0x%x) " , pSelf , pFormat ) ;
2015-08-10 14:10:16 +02:00
* pFormat = pSelf - > format ;
2013-09-28 04:36:57 +02:00
return CELL_OK ;
}
2020-07-16 12:14:57 +02:00
error_code cellSailGraphicsAdapterUpdateAvSync ( )
2013-09-28 04:36:57 +02:00
{
UNIMPLEMENTED_FUNC ( cellSail ) ;
return CELL_OK ;
}
2020-07-16 12:14:57 +02:00
error_code cellSailGraphicsAdapterPtsToTimePosition ( )
2013-09-28 04:36:57 +02:00
{
UNIMPLEMENTED_FUNC ( cellSail ) ;
return CELL_OK ;
}
2020-07-16 12:14:57 +02:00
error_code cellSailAuReceiverInitialize ( )
2013-09-28 04:36:57 +02:00
{
UNIMPLEMENTED_FUNC ( cellSail ) ;
return CELL_OK ;
}
2020-07-16 12:14:57 +02:00
error_code cellSailAuReceiverFinalize ( )
2013-09-28 04:36:57 +02:00
{
UNIMPLEMENTED_FUNC ( cellSail ) ;
return CELL_OK ;
}
2020-07-16 12:14:57 +02:00
error_code cellSailAuReceiverGet ( )
2013-09-28 04:36:57 +02:00
{
UNIMPLEMENTED_FUNC ( cellSail ) ;
return CELL_OK ;
}
2020-07-16 12:14:57 +02:00
error_code cellSailRendererAudioInitialize ( )
2013-09-28 04:36:57 +02:00
{
UNIMPLEMENTED_FUNC ( cellSail ) ;
return CELL_OK ;
}
2020-07-16 12:14:57 +02:00
error_code cellSailRendererAudioFinalize ( )
2013-09-28 04:36:57 +02:00
{
UNIMPLEMENTED_FUNC ( cellSail ) ;
return CELL_OK ;
}
2020-07-16 12:14:57 +02:00
error_code cellSailRendererAudioNotifyCallCompleted ( )
2013-09-28 04:36:57 +02:00
{
UNIMPLEMENTED_FUNC ( cellSail ) ;
return CELL_OK ;
}
2020-07-16 12:14:57 +02:00
error_code cellSailRendererAudioNotifyFrameDone ( )
2013-09-28 04:36:57 +02:00
{
UNIMPLEMENTED_FUNC ( cellSail ) ;
return CELL_OK ;
}
2020-07-16 12:14:57 +02:00
error_code cellSailRendererAudioNotifyOutputEos ( )
2013-09-28 04:36:57 +02:00
{
UNIMPLEMENTED_FUNC ( cellSail ) ;
return CELL_OK ;
}
2020-07-16 12:14:57 +02:00
error_code cellSailRendererVideoInitialize ( )
2013-09-28 04:36:57 +02:00
{
UNIMPLEMENTED_FUNC ( cellSail ) ;
return CELL_OK ;
}
2020-07-16 12:14:57 +02:00
error_code cellSailRendererVideoFinalize ( )
2013-09-28 04:36:57 +02:00
{
UNIMPLEMENTED_FUNC ( cellSail ) ;
return CELL_OK ;
}
2020-07-16 12:14:57 +02:00
error_code cellSailRendererVideoNotifyCallCompleted ( )
2013-09-28 04:36:57 +02:00
{
UNIMPLEMENTED_FUNC ( cellSail ) ;
return CELL_OK ;
}
2020-07-16 12:14:57 +02:00
error_code cellSailRendererVideoNotifyFrameDone ( )
2013-09-28 04:36:57 +02:00
{
UNIMPLEMENTED_FUNC ( cellSail ) ;
return CELL_OK ;
}
2020-07-16 12:14:57 +02:00
error_code cellSailRendererVideoNotifyOutputEos ( )
2013-09-28 04:36:57 +02:00
{
UNIMPLEMENTED_FUNC ( cellSail ) ;
return CELL_OK ;
}
2020-07-16 12:14:57 +02:00
error_code cellSailSourceInitialize ( )
2013-09-28 04:36:57 +02:00
{
UNIMPLEMENTED_FUNC ( cellSail ) ;
return CELL_OK ;
}
2020-07-16 12:14:57 +02:00
error_code cellSailSourceFinalize ( )
2013-09-28 04:36:57 +02:00
{
UNIMPLEMENTED_FUNC ( cellSail ) ;
return CELL_OK ;
}
2020-07-16 12:14:57 +02:00
error_code cellSailSourceNotifyCallCompleted ( )
2013-09-28 04:36:57 +02:00
{
UNIMPLEMENTED_FUNC ( cellSail ) ;
return CELL_OK ;
}
2020-07-16 12:14:57 +02:00
error_code cellSailSourceNotifyInputEos ( )
2013-09-28 04:36:57 +02:00
{
UNIMPLEMENTED_FUNC ( cellSail ) ;
return CELL_OK ;
}
2020-07-16 12:14:57 +02:00
error_code cellSailSourceNotifyStreamOut ( )
2013-09-28 04:36:57 +02:00
{
UNIMPLEMENTED_FUNC ( cellSail ) ;
return CELL_OK ;
}
2020-07-16 12:14:57 +02:00
error_code cellSailSourceNotifySessionError ( )
2013-09-28 04:36:57 +02:00
{
UNIMPLEMENTED_FUNC ( cellSail ) ;
return CELL_OK ;
}
2020-07-16 12:14:57 +02:00
error_code cellSailSourceNotifyMediaStateChanged ( )
2013-09-28 04:36:57 +02:00
{
UNIMPLEMENTED_FUNC ( cellSail ) ;
return CELL_OK ;
}
2020-07-16 12:14:57 +02:00
error_code cellSailSourceNotifyOpenCompleted ( )
2013-09-28 04:36:57 +02:00
{
2021-04-07 23:52:18 +02:00
cellSail . fatal ( " cellSailSourceNotifyOpenCompleted: unexpected function " ) ;
return CELL_OK ;
2013-09-28 04:36:57 +02:00
}
2020-07-16 12:14:57 +02:00
error_code cellSailSourceNotifyStartCompleted ( )
2013-09-28 04:36:57 +02:00
{
2021-04-07 23:52:18 +02:00
cellSail . fatal ( " cellSailSourceNotifyStartCompleted: unexpected function " ) ;
return CELL_OK ;
2013-09-28 04:36:57 +02:00
}
2020-07-16 12:14:57 +02:00
error_code cellSailSourceNotifyStopCompleted ( )
2013-09-28 04:36:57 +02:00
{
2021-04-07 23:52:18 +02:00
cellSail . fatal ( " cellSailSourceNotifyStopCompleted: unexpected function " ) ;
return CELL_OK ;
2013-09-28 04:36:57 +02:00
}
2020-07-16 12:14:57 +02:00
error_code cellSailSourceNotifyReadCompleted ( )
2013-09-28 04:36:57 +02:00
{
2021-04-07 23:52:18 +02:00
cellSail . fatal ( " cellSailSourceNotifyReadCompleted: unexpected function " ) ;
return CELL_OK ;
2013-09-28 04:36:57 +02:00
}
2020-07-16 12:14:57 +02:00
error_code cellSailSourceSetDiagHandler ( )
2013-09-28 04:36:57 +02:00
{
UNIMPLEMENTED_FUNC ( cellSail ) ;
return CELL_OK ;
}
2020-07-16 12:14:57 +02:00
error_code cellSailSourceNotifyCloseCompleted ( )
2013-09-28 04:36:57 +02:00
{
2021-04-07 23:52:18 +02:00
cellSail . fatal ( " cellSailSourceNotifyCloseCompleted: unexpected function " ) ;
return CELL_OK ;
2013-09-28 04:36:57 +02:00
}
2020-07-16 12:14:57 +02:00
error_code cellSailMp4MovieGetBrand ( )
2013-09-28 04:36:57 +02:00
{
UNIMPLEMENTED_FUNC ( cellSail ) ;
return CELL_OK ;
}
2020-07-16 12:14:57 +02:00
error_code cellSailMp4MovieIsCompatibleBrand ( )
2013-09-28 04:36:57 +02:00
{
UNIMPLEMENTED_FUNC ( cellSail ) ;
return CELL_OK ;
}
2020-07-16 12:14:57 +02:00
error_code cellSailMp4MovieGetMovieInfo ( )
2013-09-28 04:36:57 +02:00
{
UNIMPLEMENTED_FUNC ( cellSail ) ;
return CELL_OK ;
}
2020-07-16 12:14:57 +02:00
error_code cellSailMp4MovieGetTrackByIndex ( )
2013-09-28 04:36:57 +02:00
{
UNIMPLEMENTED_FUNC ( cellSail ) ;
return CELL_OK ;
}
2020-07-16 12:14:57 +02:00
error_code cellSailMp4MovieGetTrackById ( )
2013-09-28 04:36:57 +02:00
{
UNIMPLEMENTED_FUNC ( cellSail ) ;
return CELL_OK ;
}
2020-07-16 12:14:57 +02:00
error_code cellSailMp4MovieGetTrackByTypeAndIndex ( )
2013-09-28 04:36:57 +02:00
{
UNIMPLEMENTED_FUNC ( cellSail ) ;
return CELL_OK ;
}
2020-07-16 12:14:57 +02:00
error_code cellSailMp4TrackGetTrackInfo ( )
2013-09-28 04:36:57 +02:00
{
UNIMPLEMENTED_FUNC ( cellSail ) ;
return CELL_OK ;
}
2020-07-16 12:14:57 +02:00
error_code cellSailMp4TrackGetTrackReferenceCount ( )
2013-09-28 04:36:57 +02:00
{
UNIMPLEMENTED_FUNC ( cellSail ) ;
return CELL_OK ;
}
2020-07-16 12:14:57 +02:00
error_code cellSailMp4TrackGetTrackReference ( )
2013-09-28 04:36:57 +02:00
{
UNIMPLEMENTED_FUNC ( cellSail ) ;
return CELL_OK ;
}
2020-07-16 12:14:57 +02:00
error_code cellSailAviMovieGetMovieInfo ( )
2013-09-28 04:36:57 +02:00
{
UNIMPLEMENTED_FUNC ( cellSail ) ;
return CELL_OK ;
}
2020-07-16 12:14:57 +02:00
error_code cellSailAviMovieGetStreamByIndex ( )
2013-09-28 04:36:57 +02:00
{
UNIMPLEMENTED_FUNC ( cellSail ) ;
return CELL_OK ;
}
2020-07-16 12:14:57 +02:00
error_code cellSailAviMovieGetStreamByTypeAndIndex ( )
2013-09-28 04:36:57 +02:00
{
UNIMPLEMENTED_FUNC ( cellSail ) ;
return CELL_OK ;
}
2020-07-16 12:14:57 +02:00
error_code cellSailAviMovieGetHeader ( )
2013-09-28 04:36:57 +02:00
{
UNIMPLEMENTED_FUNC ( cellSail ) ;
return CELL_OK ;
}
2020-07-16 12:14:57 +02:00
error_code cellSailAviStreamGetMediaType ( )
2013-09-28 04:36:57 +02:00
{
UNIMPLEMENTED_FUNC ( cellSail ) ;
return CELL_OK ;
}
2020-07-16 12:14:57 +02:00
error_code cellSailAviStreamGetHeader ( )
2013-09-28 04:36:57 +02:00
{
UNIMPLEMENTED_FUNC ( cellSail ) ;
return CELL_OK ;
}
2020-07-16 12:14:57 +02:00
error_code cellSailPlayerInitialize ( )
2013-09-28 04:36:57 +02:00
{
UNIMPLEMENTED_FUNC ( cellSail ) ;
return CELL_OK ;
}
2020-07-16 12:14:57 +02:00
error_code cellSailPlayerInitialize2 ( ppu_thread & ppu ,
2015-07-27 16:59:21 +02:00
vm : : ptr < CellSailPlayer > pSelf ,
vm : : ptr < CellSailMemAllocator > pAllocator ,
vm : : ptr < CellSailPlayerFuncNotified > pCallback ,
vm : : ptr < void > callbackArg ,
vm : : ptr < CellSailPlayerAttribute > pAttribute ,
vm : : ptr < CellSailPlayerResource > pResource )
2013-09-28 04:36:57 +02:00
{
2016-01-12 22:57:16 +01:00
cellSail . warning ( " cellSailPlayerInitialize2(pSelf=*0x%x, pAllocator=*0x%x, pCallback=*0x%x, callbackArg=*0x%x, pAttribute=*0x%x, pResource=*0x%x) " ,
2015-07-27 16:59:21 +02:00
pSelf , pAllocator , pCallback , callbackArg , pAttribute , pResource ) ;
2014-10-17 15:20:40 +02:00
2015-07-27 16:59:21 +02:00
pSelf - > allocator = * pAllocator ;
2014-10-17 15:20:40 +02:00
pSelf - > callback = pCallback ;
2015-07-27 16:59:21 +02:00
pSelf - > callbackArg = callbackArg ;
pSelf - > attribute = * pAttribute ;
pSelf - > resource = * pResource ;
2015-08-10 17:58:10 +02:00
pSelf - > booted = false ;
2015-07-27 16:59:21 +02:00
pSelf - > paused = true ;
2014-10-17 15:20:40 +02:00
2015-08-11 18:48:02 +02:00
{
2023-11-16 00:18:35 +01:00
CellSailEvent event { } ;
2015-09-13 09:26:01 +02:00
event . u32x2 . major = CELL_SAIL_EVENT_PLAYER_STATE_CHANGED ;
event . u32x2 . minor = 0 ;
2015-09-26 22:46:04 +02:00
pSelf - > callback ( ppu , pSelf - > callbackArg , event , CELL_SAIL_PLAYER_STATE_INITIALIZED , 0 ) ;
2021-04-09 21:12:47 +02:00
}
2015-08-11 18:48:02 +02:00
2013-09-28 04:36:57 +02:00
return CELL_OK ;
}
2020-07-16 12:14:57 +02:00
error_code cellSailPlayerFinalize ( vm : : ptr < CellSailPlayer > pSelf )
2013-09-28 04:36:57 +02:00
{
2016-01-12 22:57:16 +01:00
cellSail . todo ( " cellSailPlayerFinalize(pSelf=*0x%x) " , pSelf ) ;
2015-08-10 14:10:16 +02:00
if ( pSelf - > sAdapter )
{
pSelf - > sAdapter - > registered = false ;
}
if ( pSelf - > gAdapter )
{
pSelf - > gAdapter - > registered = false ;
}
2013-09-28 04:36:57 +02:00
return CELL_OK ;
}
2020-07-16 12:14:57 +02:00
error_code cellSailPlayerRegisterSource ( )
2013-09-28 04:36:57 +02:00
{
UNIMPLEMENTED_FUNC ( cellSail ) ;
return CELL_OK ;
}
2020-07-16 12:14:57 +02:00
error_code cellSailPlayerGetRegisteredProtocols ( )
2013-09-28 04:36:57 +02:00
{
UNIMPLEMENTED_FUNC ( cellSail ) ;
return CELL_OK ;
}
2020-07-16 12:14:57 +02:00
error_code cellSailPlayerSetSoundAdapter ( vm : : ptr < CellSailPlayer > pSelf , u32 index , vm : : ptr < CellSailSoundAdapter > pAdapter )
2013-09-28 04:36:57 +02:00
{
2016-01-12 22:57:16 +01:00
cellSail . warning ( " cellSailPlayerSetSoundAdapter(pSelf=*0x%x, index=%d, pAdapter=*0x%x) " , pSelf , index , pAdapter ) ;
2015-08-10 14:10:16 +02:00
if ( index > pSelf - > attribute . maxAudioStreamNum )
{
return CELL_SAIL_ERROR_INVALID_ARG ;
}
pSelf - > sAdapter = pAdapter ;
pAdapter - > index = index ;
pAdapter - > registered = true ;
2013-09-28 04:36:57 +02:00
return CELL_OK ;
}
2020-07-16 12:14:57 +02:00
error_code cellSailPlayerSetGraphicsAdapter ( vm : : ptr < CellSailPlayer > pSelf , u32 index , vm : : ptr < CellSailGraphicsAdapter > pAdapter )
2013-09-28 04:36:57 +02:00
{
2016-01-12 22:57:16 +01:00
cellSail . warning ( " cellSailPlayerSetGraphicsAdapter(pSelf=*0x%x, index=%d, pAdapter=*0x%x) " , pSelf , index , pAdapter ) ;
2015-08-10 14:10:16 +02:00
if ( index > pSelf - > attribute . maxVideoStreamNum )
{
return CELL_SAIL_ERROR_INVALID_ARG ;
}
pSelf - > gAdapter = pAdapter ;
pAdapter - > index = index ;
pAdapter - > registered = true ;
2013-09-28 04:36:57 +02:00
return CELL_OK ;
}
2020-07-16 12:14:57 +02:00
error_code cellSailPlayerSetAuReceiver ( )
2013-09-28 04:36:57 +02:00
{
UNIMPLEMENTED_FUNC ( cellSail ) ;
return CELL_OK ;
}
2020-07-16 12:14:57 +02:00
error_code cellSailPlayerSetRendererAudio ( )
2013-09-28 04:36:57 +02:00
{
UNIMPLEMENTED_FUNC ( cellSail ) ;
return CELL_OK ;
}
2020-07-16 12:14:57 +02:00
error_code cellSailPlayerSetRendererVideo ( )
2013-09-28 04:36:57 +02:00
{
UNIMPLEMENTED_FUNC ( cellSail ) ;
return CELL_OK ;
}
2020-07-16 12:14:57 +02:00
error_code cellSailPlayerSetParameter ( vm : : ptr < CellSailPlayer > pSelf , s32 parameterType , u64 param0 , u64 param1 )
2013-09-28 04:36:57 +02:00
{
2016-01-12 22:57:16 +01:00
cellSail . warning ( " cellSailPlayerSetParameter(pSelf=*0x%x, parameterType=0x%x, param0=0x%llx, param1=0x%llx) " , pSelf , parameterType , param0 , param1 ) ;
2015-08-10 17:58:10 +02:00
switch ( parameterType )
{
2020-03-04 15:08:40 +01:00
case CELL_SAIL_PARAMETER_GRAPHICS_ADAPTER_BUFFER_RELEASE_DELAY : pSelf - > graphics_adapter_buffer_release_delay = static_cast < u32 > ( param1 ) ; break ; // TODO: Stream index
2025-04-05 21:50:45 +02:00
case CELL_SAIL_PARAMETER_CONTROL_PPU_THREAD_STACK_SIZE : pSelf - > control_ppu_thread_stack_size = static_cast < u32 > ( param0 ) ; break ;
case CELL_SAIL_PARAMETER_ENABLE_APOST_SRC : pSelf - > enable_apost_src = static_cast < u32 > ( param1 ) ; break ; // TODO: Stream index
2016-01-12 22:57:16 +01:00
default : cellSail . todo ( " cellSailPlayerSetParameter(): unimplemented parameter %s " , ParameterCodeToName ( parameterType ) ) ;
2015-08-10 17:58:10 +02:00
}
2013-09-28 04:36:57 +02:00
return CELL_OK ;
}
2020-07-16 12:14:57 +02:00
error_code cellSailPlayerGetParameter ( vm : : ptr < CellSailPlayer > pSelf , s32 parameterType , vm : : ptr < u64 > pParam0 , vm : : ptr < u64 > pParam1 )
2013-09-28 04:36:57 +02:00
{
2016-01-12 22:57:16 +01:00
cellSail . todo ( " cellSailPlayerGetParameter(pSelf=*0x%x, parameterType=0x%x, param0=*0x%x, param1=*0x%x) " , pSelf , parameterType , pParam0 , pParam1 ) ;
2015-08-10 17:58:10 +02:00
switch ( parameterType )
{
2020-03-04 15:08:40 +01:00
case 0 :
2016-01-12 22:57:16 +01:00
default : cellSail . error ( " cellSailPlayerGetParameter(): unimplemented parameter %s " , ParameterCodeToName ( parameterType ) ) ;
2015-08-10 17:58:10 +02:00
}
2013-09-28 04:36:57 +02:00
return CELL_OK ;
}
2020-07-16 12:14:57 +02:00
error_code cellSailPlayerSubscribeEvent ( )
2013-09-28 04:36:57 +02:00
{
UNIMPLEMENTED_FUNC ( cellSail ) ;
return CELL_OK ;
}
2020-07-16 12:14:57 +02:00
error_code cellSailPlayerUnsubscribeEvent ( )
2013-09-28 04:36:57 +02:00
{
UNIMPLEMENTED_FUNC ( cellSail ) ;
return CELL_OK ;
}
2020-07-16 12:14:57 +02:00
error_code cellSailPlayerReplaceEventHandler ( )
2013-09-28 04:36:57 +02:00
{
UNIMPLEMENTED_FUNC ( cellSail ) ;
return CELL_OK ;
}
2020-07-16 12:14:57 +02:00
error_code cellSailPlayerBoot ( ppu_thread & ppu , vm : : ptr < CellSailPlayer > pSelf , u64 userParam )
2013-09-28 04:36:57 +02:00
{
2016-01-12 22:57:16 +01:00
cellSail . warning ( " cellSailPlayerBoot(pSelf=*0x%x, userParam=%d) " , pSelf , userParam ) ;
2015-08-10 17:58:10 +02:00
2016-07-27 23:43:22 +02:00
{
2023-11-16 00:18:35 +01:00
CellSailEvent event { } ;
2016-07-27 23:43:22 +02:00
event . u32x2 . major = CELL_SAIL_EVENT_PLAYER_STATE_CHANGED ;
event . u32x2 . minor = 0 ;
pSelf - > callback ( ppu , pSelf - > callbackArg , event , CELL_SAIL_PLAYER_STATE_BOOT_TRANSITION , 0 ) ;
2021-04-09 21:12:47 +02:00
}
2016-07-27 23:43:22 +02:00
// TODO: Do stuff here
pSelf - > booted = true ;
{
2023-11-16 00:18:35 +01:00
CellSailEvent event { } ;
2016-07-27 23:43:22 +02:00
event . u32x2 . major = CELL_SAIL_EVENT_PLAYER_CALL_COMPLETED ;
event . u32x2 . minor = CELL_SAIL_PLAYER_CALL_BOOT ;
pSelf - > callback ( ppu , pSelf - > callbackArg , event , 0 , 0 ) ;
2021-04-09 21:12:47 +02:00
}
2015-08-10 17:58:10 +02:00
2013-09-28 04:36:57 +02:00
return CELL_OK ;
}
2020-07-16 12:14:57 +02:00
error_code cellSailPlayerAddDescriptor ( vm : : ptr < CellSailPlayer > pSelf , vm : : ptr < CellSailDescriptor > pDesc )
2013-09-28 04:36:57 +02:00
{
2016-01-12 22:57:16 +01:00
cellSail . warning ( " cellSailPlayerAddDescriptor(pSelf=*0x%x, pDesc=*0x%x) " , pSelf , pDesc ) ;
2014-10-17 15:20:40 +02:00
2014-11-15 15:45:02 +01:00
if ( pSelf & & pSelf - > descriptors < 3 & & pDesc )
2014-10-17 15:20:40 +02:00
{
pSelf - > descriptors + + ;
pSelf - > registeredDescriptors [ pSelf - > descriptors ] = pDesc ;
pDesc - > registered = true ;
}
else
{
2016-01-12 22:57:16 +01:00
cellSail . error ( " Descriptor limit reached or the descriptor is unspecified! This should never happen, report this to a developer. " ) ;
2014-10-17 15:20:40 +02:00
}
2013-09-28 04:36:57 +02:00
return CELL_OK ;
}
2020-07-16 12:14:57 +02:00
error_code cellSailPlayerCreateDescriptor ( vm : : ptr < CellSailPlayer > pSelf , s32 streamType , vm : : ptr < void > pMediaInfo , vm : : cptr < char > pUri , vm : : pptr < CellSailDescriptor > ppDesc )
2013-09-28 04:36:57 +02:00
{
2016-08-11 01:29:59 +02:00
cellSail . todo ( " cellSailPlayerCreateDescriptor(pSelf=*0x%x, streamType=%d, pMediaInfo=*0x%x, pUri=%s, ppDesc=**0x%x) " , pSelf , streamType , pMediaInfo , pUri , ppDesc ) ;
2018-08-25 14:39:00 +02:00
2015-07-11 22:44:53 +02:00
u32 descriptorAddress = vm : : alloc ( sizeof ( CellSailDescriptor ) , vm : : main ) ;
2014-12-20 08:05:42 +01:00
auto descriptor = vm : : ptr < CellSailDescriptor > : : make ( descriptorAddress ) ;
2015-07-27 16:59:21 +02:00
* ppDesc = descriptor ;
2014-12-20 08:05:42 +01:00
descriptor - > streamType = streamType ;
descriptor - > registered = false ;
2014-10-17 15:20:40 +02:00
2025-04-05 21:50:45 +02:00
// pSelf->descriptors = 0;
2014-10-17 15:20:40 +02:00
pSelf - > repeatMode = 0 ;
2014-12-24 19:47:56 +01:00
switch ( streamType )
{
2025-04-05 21:50:45 +02:00
case CELL_SAIL_STREAM_PAMF :
{
std : : string uri = pUri . get_ptr ( ) ;
if ( uri . starts_with ( " x-cell-fs:// " ) )
2014-12-24 19:47:56 +01:00
{
2025-04-05 21:50:45 +02:00
if ( fs : : file f { vfs : : get ( uri . substr ( 12 ) ) } )
2015-08-10 14:10:16 +02:00
{
2025-04-05 21:50:45 +02:00
u32 size = : : size32 ( f ) ;
u32 buffer = vm : : alloc ( size , vm : : main ) ;
auto bufPtr = vm : : cptr < PamfHeader > : : make ( buffer ) ;
PamfHeader * buf = const_cast < PamfHeader * > ( bufPtr . get_ptr ( ) ) ;
ensure ( f . read ( buf , size ) = = size ) ;
u32 sp_ = vm : : alloc ( sizeof ( CellPamfReader ) , vm : : main ) ;
auto sp = vm : : ptr < CellPamfReader > : : make ( sp_ ) ;
[[maybe_unused]] u32 err = cellPamfReaderInitialize ( sp , bufPtr , size , 0 ) ;
descriptor - > buffer = buffer ;
descriptor - > sp_ = sp_ ;
2014-12-24 19:47:56 +01:00
}
else
2015-08-10 14:10:16 +02:00
{
2025-04-05 21:50:45 +02:00
cellSail . warning ( " Couldn't open PAMF: %s " , uri . c_str ( ) ) ;
2015-08-10 14:10:16 +02:00
}
2014-12-24 19:47:56 +01:00
}
2025-04-05 21:50:45 +02:00
else
{
cellSail . warning ( " Unhandled uri: %s " , uri . c_str ( ) ) ;
}
break ;
}
default :
cellSail . error ( " Unhandled stream type: %d " , streamType ) ;
2014-12-24 19:47:56 +01:00
}
2013-09-28 04:36:57 +02:00
return CELL_OK ;
}
2020-07-16 12:14:57 +02:00
error_code cellSailPlayerDestroyDescriptor ( vm : : ptr < CellSailPlayer > pSelf , vm : : ptr < CellSailDescriptor > pDesc )
2013-09-28 04:36:57 +02:00
{
2016-01-12 22:57:16 +01:00
cellSail . todo ( " cellSailPlayerAddDescriptor(pSelf=*0x%x, pDesc=*0x%x) " , pSelf , pDesc ) ;
2014-10-17 15:20:40 +02:00
if ( pDesc - > registered )
return CELL_SAIL_ERROR_INVALID_STATE ;
2013-09-28 04:36:57 +02:00
return CELL_OK ;
}
2020-07-16 12:14:57 +02:00
error_code cellSailPlayerRemoveDescriptor ( vm : : ptr < CellSailPlayer > pSelf , vm : : ptr < CellSailDescriptor > ppDesc )
2013-09-28 04:36:57 +02:00
{
2016-01-12 22:57:16 +01:00
cellSail . warning ( " cellSailPlayerAddDescriptor(pSelf=*0x%x, pDesc=*0x%x) " , pSelf , ppDesc ) ;
2014-10-17 15:20:40 +02:00
if ( pSelf - > descriptors > 0 )
{
ppDesc = pSelf - > registeredDescriptors [ pSelf - > descriptors ] ;
2015-10-17 19:47:18 +02:00
// TODO: Figure out how properly free a descriptor. Use game specified memory dealloc function?
2025-04-05 21:50:45 +02:00
// delete &pSelf->registeredDescriptors[pSelf->descriptors];
2014-10-17 15:20:40 +02:00
pSelf - > descriptors - - ;
}
return pSelf - > descriptors ;
2013-09-28 04:36:57 +02:00
}
2020-07-16 12:14:57 +02:00
error_code cellSailPlayerGetDescriptorCount ( vm : : ptr < CellSailPlayer > pSelf )
2013-09-28 04:36:57 +02:00
{
2016-01-12 22:57:16 +01:00
cellSail . warning ( " cellSailPlayerGetDescriptorCount(pSelf=*0x%x) " , pSelf ) ;
2020-07-16 12:14:57 +02:00
return not_an_error ( pSelf - > descriptors ) ;
2013-09-28 04:36:57 +02:00
}
2020-07-16 12:14:57 +02:00
error_code cellSailPlayerGetCurrentDescriptor ( )
2013-09-28 04:36:57 +02:00
{
UNIMPLEMENTED_FUNC ( cellSail ) ;
return CELL_OK ;
}
2020-07-16 12:14:57 +02:00
error_code cellSailPlayerOpenStream ( )
2013-09-28 04:36:57 +02:00
{
UNIMPLEMENTED_FUNC ( cellSail ) ;
return CELL_OK ;
}
2020-07-16 12:14:57 +02:00
error_code cellSailPlayerCloseStream ( )
2013-09-28 04:36:57 +02:00
{
UNIMPLEMENTED_FUNC ( cellSail ) ;
return CELL_OK ;
}
2020-07-16 12:14:57 +02:00
error_code cellSailPlayerOpenEsAudio ( )
2013-09-28 04:36:57 +02:00
{
UNIMPLEMENTED_FUNC ( cellSail ) ;
return CELL_OK ;
}
2020-07-16 12:14:57 +02:00
error_code cellSailPlayerOpenEsVideo ( )
2013-09-28 04:36:57 +02:00
{
UNIMPLEMENTED_FUNC ( cellSail ) ;
return CELL_OK ;
}
2020-07-16 12:14:57 +02:00
error_code cellSailPlayerOpenEsUser ( )
2013-09-28 04:36:57 +02:00
{
UNIMPLEMENTED_FUNC ( cellSail ) ;
return CELL_OK ;
}
2020-07-16 12:14:57 +02:00
error_code cellSailPlayerReopenEsAudio ( )
2013-09-28 04:36:57 +02:00
{
UNIMPLEMENTED_FUNC ( cellSail ) ;
return CELL_OK ;
}
2020-07-16 12:14:57 +02:00
error_code cellSailPlayerReopenEsVideo ( )
2013-09-28 04:36:57 +02:00
{
UNIMPLEMENTED_FUNC ( cellSail ) ;
return CELL_OK ;
}
2020-07-16 12:14:57 +02:00
error_code cellSailPlayerReopenEsUser ( )
2013-09-28 04:36:57 +02:00
{
UNIMPLEMENTED_FUNC ( cellSail ) ;
return CELL_OK ;
}
2020-07-16 12:14:57 +02:00
error_code cellSailPlayerCloseEsAudio ( )
2013-09-28 04:36:57 +02:00
{
UNIMPLEMENTED_FUNC ( cellSail ) ;
return CELL_OK ;
}
2020-07-16 12:14:57 +02:00
error_code cellSailPlayerCloseEsVideo ( )
2013-09-28 04:36:57 +02:00
{
UNIMPLEMENTED_FUNC ( cellSail ) ;
return CELL_OK ;
}
2020-07-16 12:14:57 +02:00
error_code cellSailPlayerCloseEsUser ( )
2013-09-28 04:36:57 +02:00
{
UNIMPLEMENTED_FUNC ( cellSail ) ;
return CELL_OK ;
}
2020-07-16 12:14:57 +02:00
error_code cellSailPlayerStart ( )
2013-09-28 04:36:57 +02:00
{
UNIMPLEMENTED_FUNC ( cellSail ) ;
return CELL_OK ;
}
2020-07-16 12:14:57 +02:00
error_code cellSailPlayerStop ( )
2013-09-28 04:36:57 +02:00
{
UNIMPLEMENTED_FUNC ( cellSail ) ;
return CELL_OK ;
}
2020-07-16 12:14:57 +02:00
error_code cellSailPlayerNext ( )
2013-09-28 04:36:57 +02:00
{
UNIMPLEMENTED_FUNC ( cellSail ) ;
return CELL_OK ;
}
2020-07-16 12:14:57 +02:00
error_code cellSailPlayerCancel ( )
2013-09-28 04:36:57 +02:00
{
UNIMPLEMENTED_FUNC ( cellSail ) ;
return CELL_OK ;
}
2020-07-16 12:14:57 +02:00
error_code cellSailPlayerSetPaused ( vm : : ptr < CellSailPlayer > pSelf , b8 paused )
2013-09-28 04:36:57 +02:00
{
2016-01-12 22:57:16 +01:00
cellSail . todo ( " cellSailPlayerSetPaused(pSelf=*0x%x, paused=%d) " , pSelf , paused ) ;
2013-09-28 04:36:57 +02:00
return CELL_OK ;
}
2015-07-09 17:30:37 +02:00
s32 cellSailPlayerIsPaused ( vm : : ptr < CellSailPlayer > pSelf )
2013-09-28 04:36:57 +02:00
{
2016-01-12 22:57:16 +01:00
cellSail . warning ( " cellSailPlayerIsPaused(pSelf=*0x%x) " , pSelf ) ;
2014-12-14 08:59:04 +01:00
return pSelf - > paused ;
2013-09-28 04:36:57 +02:00
}
2015-07-09 17:30:37 +02:00
s32 cellSailPlayerSetRepeatMode ( vm : : ptr < CellSailPlayer > pSelf , s32 repeatMode , vm : : ptr < CellSailStartCommand > pCommand )
2013-09-28 04:36:57 +02:00
{
2016-01-12 22:57:16 +01:00
cellSail . warning ( " cellSailPlayerSetRepeatMode(pSelf=*0x%x, repeatMode=%d, pCommand=*0x%x) " , pSelf , repeatMode , pCommand ) ;
2014-10-17 15:20:40 +02:00
pSelf - > repeatMode = repeatMode ;
pSelf - > playbackCommand = pCommand ;
return pSelf - > repeatMode ;
2013-09-28 04:36:57 +02:00
}
2015-07-09 17:30:37 +02:00
s32 cellSailPlayerGetRepeatMode ( vm : : ptr < CellSailPlayer > pSelf , vm : : ptr < CellSailStartCommand > pCommand )
2013-09-28 04:36:57 +02:00
{
2016-01-12 22:57:16 +01:00
cellSail . warning ( " cellSailPlayerGetRepeatMode(pSelf=*0x%x, pCommand=*0x%x) " , pSelf , pCommand ) ;
2014-10-17 15:20:40 +02:00
pCommand = pSelf - > playbackCommand ;
return pSelf - > repeatMode ;
2013-09-28 04:36:57 +02:00
}
2020-07-16 12:14:57 +02:00
error_code cellSailPlayerSetEsAudioMuted ( )
2013-09-28 04:36:57 +02:00
{
UNIMPLEMENTED_FUNC ( cellSail ) ;
return CELL_OK ;
}
2020-07-16 12:14:57 +02:00
error_code cellSailPlayerSetEsVideoMuted ( )
2013-09-28 04:36:57 +02:00
{
UNIMPLEMENTED_FUNC ( cellSail ) ;
return CELL_OK ;
}
2020-07-16 12:14:57 +02:00
error_code cellSailPlayerIsEsAudioMuted ( )
2013-09-28 04:36:57 +02:00
{
UNIMPLEMENTED_FUNC ( cellSail ) ;
return CELL_OK ;
}
2020-07-16 12:14:57 +02:00
error_code cellSailPlayerIsEsVideoMuted ( )
2013-09-28 04:36:57 +02:00
{
UNIMPLEMENTED_FUNC ( cellSail ) ;
return CELL_OK ;
}
2020-07-16 12:14:57 +02:00
error_code cellSailPlayerDumpImage ( )
2013-09-28 04:36:57 +02:00
{
UNIMPLEMENTED_FUNC ( cellSail ) ;
return CELL_OK ;
}
2020-07-16 12:14:57 +02:00
error_code cellSailPlayerUnregisterSource ( )
2013-09-28 04:36:57 +02:00
{
UNIMPLEMENTED_FUNC ( cellSail ) ;
return CELL_OK ;
}
2016-03-21 20:43:03 +01:00
DECLARE ( ppu_module_manager : : cellSail ) ( " cellSail " , [ ] ( )
2015-08-01 00:48:38 +02:00
{
2025-04-05 21:50:45 +02:00
static ppu_static_module cellSailAvi ( " cellSailAvi " ) ;
[[maybe_unused]] vm : : ptr < CellSailMp4MovieInfo < > > test ;
REG_FUNC ( cellSail , cellSailMemAllocatorInitialize ) ;
REG_FUNC ( cellSail , cellSailFutureInitialize ) ;
REG_FUNC ( cellSail , cellSailFutureFinalize ) ;
REG_FUNC ( cellSail , cellSailFutureReset ) ;
REG_FUNC ( cellSail , cellSailFutureSet ) ;
REG_FUNC ( cellSail , cellSailFutureGet ) ;
REG_FUNC ( cellSail , cellSailFutureIsDone ) ;
REG_FUNC ( cellSail , cellSailDescriptorGetStreamType ) ;
REG_FUNC ( cellSail , cellSailDescriptorGetUri ) ;
REG_FUNC ( cellSail , cellSailDescriptorGetMediaInfo ) ;
REG_FUNC ( cellSail , cellSailDescriptorSetAutoSelection ) ;
REG_FUNC ( cellSail , cellSailDescriptorIsAutoSelection ) ;
REG_FUNC ( cellSail , cellSailDescriptorCreateDatabase ) ;
REG_FUNC ( cellSail , cellSailDescriptorDestroyDatabase ) ;
REG_FUNC ( cellSail , cellSailDescriptorOpen ) ;
REG_FUNC ( cellSail , cellSailDescriptorClose ) ;
REG_FUNC ( cellSail , cellSailDescriptorSetEs ) ;
REG_FUNC ( cellSail , cellSailDescriptorClearEs ) ;
REG_FUNC ( cellSail , cellSailDescriptorGetCapabilities ) ;
REG_FUNC ( cellSail , cellSailDescriptorInquireCapability ) ;
REG_FUNC ( cellSail , cellSailDescriptorSetParameter ) ;
REG_FUNC ( cellSail , cellSailSoundAdapterInitialize ) ;
REG_FUNC ( cellSail , cellSailSoundAdapterFinalize ) ;
REG_FUNC ( cellSail , cellSailSoundAdapterSetPreferredFormat ) ;
REG_FUNC ( cellSail , cellSailSoundAdapterGetFrame ) ;
REG_FUNC ( cellSail , cellSailSoundAdapterGetFormat ) ;
REG_FUNC ( cellSail , cellSailSoundAdapterUpdateAvSync ) ;
REG_FUNC ( cellSail , cellSailSoundAdapterPtsToTimePosition ) ;
REG_FUNC ( cellSail , cellSailGraphicsAdapterInitialize ) ;
REG_FUNC ( cellSail , cellSailGraphicsAdapterFinalize ) ;
REG_FUNC ( cellSail , cellSailGraphicsAdapterSetPreferredFormat ) ;
REG_FUNC ( cellSail , cellSailGraphicsAdapterGetFrame ) ;
REG_FUNC ( cellSail , cellSailGraphicsAdapterGetFrame2 ) ;
REG_FUNC ( cellSail , cellSailGraphicsAdapterGetFormat ) ;
REG_FUNC ( cellSail , cellSailGraphicsAdapterUpdateAvSync ) ;
REG_FUNC ( cellSail , cellSailGraphicsAdapterPtsToTimePosition ) ;
REG_FUNC ( cellSail , cellSailAuReceiverInitialize ) ;
REG_FUNC ( cellSail , cellSailAuReceiverFinalize ) ;
REG_FUNC ( cellSail , cellSailAuReceiverGet ) ;
REG_FUNC ( cellSail , cellSailRendererAudioInitialize ) ;
REG_FUNC ( cellSail , cellSailRendererAudioFinalize ) ;
REG_FUNC ( cellSail , cellSailRendererAudioNotifyCallCompleted ) ;
REG_FUNC ( cellSail , cellSailRendererAudioNotifyFrameDone ) ;
REG_FUNC ( cellSail , cellSailRendererAudioNotifyOutputEos ) ;
REG_FUNC ( cellSail , cellSailRendererVideoInitialize ) ;
REG_FUNC ( cellSail , cellSailRendererVideoFinalize ) ;
REG_FUNC ( cellSail , cellSailRendererVideoNotifyCallCompleted ) ;
REG_FUNC ( cellSail , cellSailRendererVideoNotifyFrameDone ) ;
REG_FUNC ( cellSail , cellSailRendererVideoNotifyOutputEos ) ;
REG_FUNC ( cellSail , cellSailSourceInitialize ) ;
REG_FUNC ( cellSail , cellSailSourceFinalize ) ;
REG_FUNC ( cellSail , cellSailSourceNotifyCallCompleted ) ;
REG_FUNC ( cellSail , cellSailSourceNotifyInputEos ) ;
REG_FUNC ( cellSail , cellSailSourceNotifyStreamOut ) ;
REG_FUNC ( cellSail , cellSailSourceNotifySessionError ) ;
REG_FUNC ( cellSail , cellSailSourceNotifyMediaStateChanged ) ;
REG_FUNC ( cellSail , cellSailSourceSetDiagHandler ) ;
2015-02-20 14:58:40 +01:00
2025-04-05 21:50:45 +02:00
{
// these functions shouldn't exist
REG_FUNC ( cellSail , cellSailSourceNotifyOpenCompleted ) ;
REG_FUNC ( cellSail , cellSailSourceNotifyStartCompleted ) ;
REG_FUNC ( cellSail , cellSailSourceNotifyStopCompleted ) ;
REG_FUNC ( cellSail , cellSailSourceNotifyReadCompleted ) ;
REG_FUNC ( cellSail , cellSailSourceNotifyCloseCompleted ) ;
}
REG_FUNC ( cellSail , cellSailMp4MovieGetBrand ) ;
REG_FUNC ( cellSail , cellSailMp4MovieIsCompatibleBrand ) ;
REG_FUNC ( cellSail , cellSailMp4MovieGetMovieInfo ) ;
REG_FUNC ( cellSail , cellSailMp4MovieGetTrackByIndex ) ;
REG_FUNC ( cellSail , cellSailMp4MovieGetTrackById ) ;
REG_FUNC ( cellSail , cellSailMp4MovieGetTrackByTypeAndIndex ) ;
REG_FUNC ( cellSail , cellSailMp4TrackGetTrackInfo ) ;
REG_FUNC ( cellSail , cellSailMp4TrackGetTrackReferenceCount ) ;
REG_FUNC ( cellSail , cellSailMp4TrackGetTrackReference ) ;
REG_FUNC ( cellSail , cellSailAviMovieGetMovieInfo ) ;
REG_FUNC ( cellSail , cellSailAviMovieGetStreamByIndex ) ;
REG_FUNC ( cellSail , cellSailAviMovieGetStreamByTypeAndIndex ) ;
REG_FUNC ( cellSail , cellSailAviMovieGetHeader ) ;
REG_FUNC ( cellSail , cellSailAviStreamGetMediaType ) ;
REG_FUNC ( cellSail , cellSailAviStreamGetHeader ) ;
REG_FUNC ( cellSail , cellSailPlayerInitialize ) ;
REG_FUNC ( cellSail , cellSailPlayerInitialize2 ) ;
REG_FUNC ( cellSail , cellSailPlayerFinalize ) ;
REG_FUNC ( cellSail , cellSailPlayerRegisterSource ) ;
REG_FUNC ( cellSail , cellSailPlayerGetRegisteredProtocols ) ;
REG_FUNC ( cellSail , cellSailPlayerSetSoundAdapter ) ;
REG_FUNC ( cellSail , cellSailPlayerSetGraphicsAdapter ) ;
REG_FUNC ( cellSail , cellSailPlayerSetAuReceiver ) ;
REG_FUNC ( cellSail , cellSailPlayerSetRendererAudio ) ;
REG_FUNC ( cellSail , cellSailPlayerSetRendererVideo ) ;
REG_FUNC ( cellSail , cellSailPlayerSetParameter ) ;
REG_FUNC ( cellSail , cellSailPlayerGetParameter ) ;
REG_FUNC ( cellSail , cellSailPlayerSubscribeEvent ) ;
REG_FUNC ( cellSail , cellSailPlayerUnsubscribeEvent ) ;
REG_FUNC ( cellSail , cellSailPlayerReplaceEventHandler ) ;
REG_FUNC ( cellSail , cellSailPlayerBoot ) ;
REG_FUNC ( cellSail , cellSailPlayerCreateDescriptor ) ;
REG_FUNC ( cellSail , cellSailPlayerDestroyDescriptor ) ;
REG_FUNC ( cellSail , cellSailPlayerAddDescriptor ) ;
REG_FUNC ( cellSail , cellSailPlayerRemoveDescriptor ) ;
REG_FUNC ( cellSail , cellSailPlayerGetDescriptorCount ) ;
REG_FUNC ( cellSail , cellSailPlayerGetCurrentDescriptor ) ;
REG_FUNC ( cellSail , cellSailPlayerOpenStream ) ;
REG_FUNC ( cellSail , cellSailPlayerCloseStream ) ;
REG_FUNC ( cellSail , cellSailPlayerOpenEsAudio ) ;
REG_FUNC ( cellSail , cellSailPlayerOpenEsVideo ) ;
REG_FUNC ( cellSail , cellSailPlayerOpenEsUser ) ;
REG_FUNC ( cellSail , cellSailPlayerReopenEsAudio ) ;
REG_FUNC ( cellSail , cellSailPlayerReopenEsVideo ) ;
REG_FUNC ( cellSail , cellSailPlayerReopenEsUser ) ;
REG_FUNC ( cellSail , cellSailPlayerCloseEsAudio ) ;
REG_FUNC ( cellSail , cellSailPlayerCloseEsVideo ) ;
REG_FUNC ( cellSail , cellSailPlayerCloseEsUser ) ;
REG_FUNC ( cellSail , cellSailPlayerStart ) ;
REG_FUNC ( cellSail , cellSailPlayerStop ) ;
REG_FUNC ( cellSail , cellSailPlayerNext ) ;
REG_FUNC ( cellSail , cellSailPlayerCancel ) ;
REG_FUNC ( cellSail , cellSailPlayerSetPaused ) ;
REG_FUNC ( cellSail , cellSailPlayerIsPaused ) ;
REG_FUNC ( cellSail , cellSailPlayerSetRepeatMode ) ;
REG_FUNC ( cellSail , cellSailPlayerGetRepeatMode ) ;
REG_FUNC ( cellSail , cellSailPlayerSetEsAudioMuted ) ;
REG_FUNC ( cellSail , cellSailPlayerSetEsVideoMuted ) ;
REG_FUNC ( cellSail , cellSailPlayerIsEsAudioMuted ) ;
REG_FUNC ( cellSail , cellSailPlayerIsEsVideoMuted ) ;
REG_FUNC ( cellSail , cellSailPlayerDumpImage ) ;
REG_FUNC ( cellSail , cellSailPlayerUnregisterSource ) ;
} ) ;