rpcsx/rpcs3/Emu/SysCalls/Modules/cellSail.cpp

1011 lines
22 KiB
C++
Raw Normal View History

2014-07-12 09:46:14 +02:00
#include "stdafx.h"
2014-08-02 10:20:48 +02:00
#include "Emu/Memory/Memory.h"
#include "Emu/SysCalls/Modules.h"
#include "Emu/FS/vfsFile.h"
2014-08-24 00:34:04 +02:00
2014-08-02 10:20:48 +02:00
#include "cellSail.h"
#include "cellPamf.h"
2014-08-02 10:20:48 +02:00
extern Module cellSail;
// TODO: Create an internal cellSail thread
2015-07-09 17:30:37 +02:00
s32 cellSailMemAllocatorInitialize(vm::ptr<CellSailMemAllocator> pSelf, vm::ptr<CellSailMemAllocatorFuncs> pCallbacks)
{
2015-07-27 16:59:21 +02:00
cellSail.Warning("cellSailMemAllocatorInitialize(pSelf=*0x%x, pCallbacks=*0x%x)", pSelf, pCallbacks);
pSelf->callbacks = pCallbacks;
return CELL_OK;
}
2015-07-09 17:30:37 +02:00
s32 cellSailFutureInitialize()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
2015-07-09 17:30:37 +02:00
s32 cellSailFutureFinalize()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
2015-07-09 17:30:37 +02:00
s32 cellSailFutureReset()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
2015-07-09 17:30:37 +02:00
s32 cellSailFutureSet()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
2015-07-09 17:30:37 +02:00
s32 cellSailFutureGet()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
2015-07-09 17:30:37 +02:00
s32 cellSailFutureIsDone()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
2015-07-09 17:30:37 +02:00
s32 cellSailDescriptorGetStreamType()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
2015-07-09 17:30:37 +02:00
s32 cellSailDescriptorGetUri()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
2015-07-09 17:30:37 +02:00
s32 cellSailDescriptorGetMediaInfo()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
2015-07-26 02:53:26 +02:00
s32 cellSailDescriptorSetAutoSelection(vm::ptr<CellSailDescriptor> pSelf, b8 autoSelection)
{
2015-07-27 16:59:21 +02:00
cellSail.Warning("cellSailDescriptorSetAutoSelection(pSelf=*0x%x, autoSelection=%d)", pSelf, autoSelection);
if (pSelf) {
pSelf->autoSelection = autoSelection;
return autoSelection;
}
return CELL_OK;
}
2015-07-09 17:30:37 +02:00
s32 cellSailDescriptorIsAutoSelection(vm::ptr<CellSailDescriptor> pSelf)
{
2015-07-27 16:59:21 +02:00
cellSail.Warning("cellSailDescriptorIsAutoSelection(pSelf=*0x%x)", pSelf);
2014-12-14 08:59:04 +01:00
if (pSelf)
return pSelf->autoSelection;
return CELL_OK;
}
2015-07-09 17:30:37 +02:00
s32 cellSailDescriptorCreateDatabase(vm::ptr<CellSailDescriptor> pSelf, vm::ptr<void> pDatabase, u32 size, u64 arg)
{
2015-07-27 16:59:21 +02:00
cellSail.Warning("cellSailDescriptorCreateDatabase(pSelf=*0x%x, pDatabase=*0x%x, size=0x%x, arg=0x%x", pSelf, pDatabase, size, arg);
2014-12-24 20:03:52 +01:00
switch ((s32)pSelf->streamType) {
case CELL_SAIL_STREAM_PAMF:
{
u32 addr = pSelf->internalData[1];
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);
}
return CELL_OK;
}
2015-07-09 17:30:37 +02:00
s32 cellSailDescriptorDestroyDatabase()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
2015-07-09 17:30:37 +02:00
s32 cellSailDescriptorOpen()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
2015-07-09 17:30:37 +02:00
s32 cellSailDescriptorClose()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
2015-07-09 17:30:37 +02:00
s32 cellSailDescriptorSetEs()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
2015-07-09 17:30:37 +02:00
s32 cellSailDescriptorClearEs()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
2015-07-09 17:30:37 +02:00
s32 cellSailDescriptorGetCapabilities()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
2015-07-09 17:30:37 +02:00
s32 cellSailDescriptorInquireCapability()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
2015-07-09 17:30:37 +02:00
s32 cellSailDescriptorSetParameter()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
2015-07-09 17:30:37 +02:00
s32 cellSailSoundAdapterInitialize()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
2015-07-09 17:30:37 +02:00
s32 cellSailSoundAdapterFinalize()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
2015-07-09 17:30:37 +02:00
s32 cellSailSoundAdapterSetPreferredFormat()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
2015-07-09 17:30:37 +02:00
s32 cellSailSoundAdapterGetFrame()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
2015-07-09 17:30:37 +02:00
s32 cellSailSoundAdapterGetFormat()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
2015-07-09 17:30:37 +02:00
s32 cellSailSoundAdapterUpdateAvSync()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
2015-07-09 17:30:37 +02:00
s32 cellSailSoundAdapterPtsToTimePosition()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
2015-07-09 17:30:37 +02:00
s32 cellSailGraphicsAdapterInitialize()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
2015-07-09 17:30:37 +02:00
s32 cellSailGraphicsAdapterFinalize()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
2015-07-09 17:30:37 +02:00
s32 cellSailGraphicsAdapterSetPreferredFormat()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
2015-07-09 17:30:37 +02:00
s32 cellSailGraphicsAdapterGetFrame()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
2015-07-09 17:30:37 +02:00
s32 cellSailGraphicsAdapterGetFrame2()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
2015-07-09 17:30:37 +02:00
s32 cellSailGraphicsAdapterGetFormat()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
2015-07-09 17:30:37 +02:00
s32 cellSailGraphicsAdapterUpdateAvSync()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
2015-07-09 17:30:37 +02:00
s32 cellSailGraphicsAdapterPtsToTimePosition()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
2015-07-09 17:30:37 +02:00
s32 cellSailAuReceiverInitialize()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
2015-07-09 17:30:37 +02:00
s32 cellSailAuReceiverFinalize()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
2015-07-09 17:30:37 +02:00
s32 cellSailAuReceiverGet()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
2015-07-09 17:30:37 +02:00
s32 cellSailRendererAudioInitialize()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
2015-07-09 17:30:37 +02:00
s32 cellSailRendererAudioFinalize()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
2015-07-09 17:30:37 +02:00
s32 cellSailRendererAudioNotifyCallCompleted()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
2015-07-09 17:30:37 +02:00
s32 cellSailRendererAudioNotifyFrameDone()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
2015-07-09 17:30:37 +02:00
s32 cellSailRendererAudioNotifyOutputEos()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
2015-07-09 17:30:37 +02:00
s32 cellSailRendererVideoInitialize()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
2015-07-09 17:30:37 +02:00
s32 cellSailRendererVideoFinalize()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
2015-07-09 17:30:37 +02:00
s32 cellSailRendererVideoNotifyCallCompleted()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
2015-07-09 17:30:37 +02:00
s32 cellSailRendererVideoNotifyFrameDone()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
2015-07-09 17:30:37 +02:00
s32 cellSailRendererVideoNotifyOutputEos()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
2015-07-09 17:30:37 +02:00
s32 cellSailSourceInitialize()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
2015-07-09 17:30:37 +02:00
s32 cellSailSourceFinalize()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
2015-07-09 17:30:37 +02:00
s32 cellSailSourceNotifyCallCompleted()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
2015-07-09 17:30:37 +02:00
s32 cellSailSourceNotifyInputEos()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
2015-07-09 17:30:37 +02:00
s32 cellSailSourceNotifyStreamOut()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
2015-07-09 17:30:37 +02:00
s32 cellSailSourceNotifySessionError()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
2015-07-09 17:30:37 +02:00
s32 cellSailSourceNotifyMediaStateChanged()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
2015-07-09 17:30:37 +02:00
s32 cellSailSourceNotifyOpenCompleted()
{
2015-08-01 00:48:38 +02:00
throw EXCEPTION("Unexpected function");
}
2015-07-09 17:30:37 +02:00
s32 cellSailSourceNotifyStartCompleted()
{
2015-08-01 00:48:38 +02:00
throw EXCEPTION("Unexpected function");
}
2015-07-09 17:30:37 +02:00
s32 cellSailSourceNotifyStopCompleted()
{
2015-08-01 00:48:38 +02:00
throw EXCEPTION("Unexpected function");
}
2015-07-09 17:30:37 +02:00
s32 cellSailSourceNotifyReadCompleted()
{
2015-08-01 00:48:38 +02:00
throw EXCEPTION("Unexpected function");
}
2015-07-09 17:30:37 +02:00
s32 cellSailSourceSetDiagHandler()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
2015-07-09 17:30:37 +02:00
s32 cellSailSourceNotifyCloseCompleted()
{
2015-08-01 00:48:38 +02:00
throw EXCEPTION("Unexpected function");
}
2015-07-09 17:30:37 +02:00
s32 cellSailMp4MovieGetBrand()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
2015-07-09 17:30:37 +02:00
s32 cellSailMp4MovieIsCompatibleBrand()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
2015-07-09 17:30:37 +02:00
s32 cellSailMp4MovieGetMovieInfo()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
2015-07-09 17:30:37 +02:00
s32 cellSailMp4MovieGetTrackByIndex()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
2015-07-09 17:30:37 +02:00
s32 cellSailMp4MovieGetTrackById()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
2015-07-09 17:30:37 +02:00
s32 cellSailMp4MovieGetTrackByTypeAndIndex()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
2015-07-09 17:30:37 +02:00
s32 cellSailMp4TrackGetTrackInfo()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
2015-07-09 17:30:37 +02:00
s32 cellSailMp4TrackGetTrackReferenceCount()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
2015-07-09 17:30:37 +02:00
s32 cellSailMp4TrackGetTrackReference()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
2015-07-09 17:30:37 +02:00
s32 cellSailAviMovieGetMovieInfo()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
2015-07-09 17:30:37 +02:00
s32 cellSailAviMovieGetStreamByIndex()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
2015-07-09 17:30:37 +02:00
s32 cellSailAviMovieGetStreamByTypeAndIndex()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
2015-07-09 17:30:37 +02:00
s32 cellSailAviMovieGetHeader()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
2015-07-09 17:30:37 +02:00
s32 cellSailAviStreamGetMediaType()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
2015-07-09 17:30:37 +02:00
s32 cellSailAviStreamGetHeader()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
2015-07-09 17:30:37 +02:00
s32 cellSailPlayerInitialize()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
2015-07-27 16:59:21 +02:00
s32 cellSailPlayerInitialize2(
vm::ptr<CellSailPlayer> pSelf,
vm::ptr<CellSailMemAllocator> pAllocator,
vm::ptr<CellSailPlayerFuncNotified> pCallback,
vm::ptr<void> callbackArg,
vm::ptr<CellSailPlayerAttribute> pAttribute,
vm::ptr<CellSailPlayerResource> pResource)
{
2015-07-27 16:59:21 +02:00
cellSail.Warning("cellSailPlayerInitialize2(pSelf=*0x%x, pAllocator=*0x%x, pCallback=*0x%x, callbackArg=*0x%x, pAttribute=*0x%x, pResource=*0x%x)",
pSelf, pAllocator, pCallback, callbackArg, pAttribute, pResource);
2015-07-27 16:59:21 +02:00
pSelf->allocator = *pAllocator;
pSelf->callback = pCallback;
2015-07-27 16:59:21 +02:00
pSelf->callbackArg = callbackArg;
pSelf->attribute = *pAttribute;
pSelf->resource = *pResource;
pSelf->paused = true;
return CELL_OK;
}
2015-07-09 17:30:37 +02:00
s32 cellSailPlayerFinalize()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
2015-07-09 17:30:37 +02:00
s32 cellSailPlayerRegisterSource()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
2015-07-09 17:30:37 +02:00
s32 cellSailPlayerGetRegisteredProtocols()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
2015-07-09 17:30:37 +02:00
s32 cellSailPlayerSetSoundAdapter()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
2015-07-09 17:30:37 +02:00
s32 cellSailPlayerSetGraphicsAdapter()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
2015-07-09 17:30:37 +02:00
s32 cellSailPlayerSetAuReceiver()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
2015-07-09 17:30:37 +02:00
s32 cellSailPlayerSetRendererAudio()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
2015-07-09 17:30:37 +02:00
s32 cellSailPlayerSetRendererVideo()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
2015-07-09 17:30:37 +02:00
s32 cellSailPlayerSetParameter()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
2015-07-09 17:30:37 +02:00
s32 cellSailPlayerGetParameter()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
2015-07-09 17:30:37 +02:00
s32 cellSailPlayerSubscribeEvent()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
2015-07-09 17:30:37 +02:00
s32 cellSailPlayerUnsubscribeEvent()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
2015-07-09 17:30:37 +02:00
s32 cellSailPlayerReplaceEventHandler()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
2015-07-09 17:30:37 +02:00
s32 cellSailPlayerBoot()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
2015-07-09 17:30:37 +02:00
s32 cellSailPlayerAddDescriptor(vm::ptr<CellSailPlayer> pSelf, vm::ptr<CellSailDescriptor> pDesc)
{
2015-07-27 16:59:21 +02:00
cellSail.Warning("cellSailPlayerAddDescriptor(pSelf=*0x%x, pDesc=*0x%x)", pSelf, pDesc);
if (pSelf && pSelf->descriptors < 3 && pDesc)
{
pSelf->descriptors++;
pSelf->registeredDescriptors[pSelf->descriptors] = pDesc;
pDesc->registered = true;
}
else
{
cellSail.Error("Descriptor limit reached or the descriptor is unspecified! This should never happen, report this to a developer.");
}
return CELL_OK;
}
2015-07-27 16:59:21 +02:00
s32 cellSailPlayerCreateDescriptor(vm::ptr<CellSailPlayer> pSelf, s32 streamType, vm::ptr<u32> pMediaInfo, vm::cptr<char> pUri, vm::pptr<CellSailDescriptor> ppDesc)
{
2015-07-27 16:59:21 +02:00
cellSail.Warning("cellSailPlayerCreateDescriptor(pSelf=*0x%x, streamType=%d, pMediaInfo=*0x%x, pUri=*0x%x, ppDesc=**0x%x)", pSelf, streamType, pMediaInfo, pUri, ppDesc);
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;
//pSelf->descriptors = 0;
pSelf->repeatMode = 0;
switch (streamType)
{
case CELL_SAIL_STREAM_PAMF:
{
std::string uri = pUri.get_ptr();
if (uri.substr(0, 12) == "x-cell-fs://") {
std::string path = uri.substr(12);
vfsFile f;
if (f.Open(path)) {
u64 size = f.GetSize();
2015-07-11 22:44:53 +02:00
u32 buf_ = vm::alloc(size, vm::main);
auto bufPtr = vm::cptr<PamfHeader>::make(buf_);
PamfHeader *buf = const_cast<PamfHeader*>(bufPtr.get_ptr());
assert(f.Read(buf, size) == size);
2015-07-11 22:44:53 +02:00
u32 sp_ = vm::alloc(sizeof(CellPamfReader), vm::main);
auto sp = vm::ptr<CellPamfReader>::make(sp_);
u32 r = cellPamfReaderInitialize(sp, bufPtr, size, 0);
descriptor->internalData[0] = buf_;
descriptor->internalData[1] = sp_;
}
else
cellSail.Warning("Couldn't open PAMF: %s", uri.c_str());
}
else
cellSail.Warning("Unhandled uri: %s", uri.c_str());
break;
}
default:
cellSail.Error("Unhandled stream type: %d", streamType);
}
//cellSailPlayerAddDescriptor(pSelf, ppDesc);
return CELL_OK;
}
2015-07-09 17:30:37 +02:00
s32 cellSailPlayerDestroyDescriptor(vm::ptr<CellSailPlayer> pSelf, vm::ptr<CellSailDescriptor> pDesc)
{
2015-07-27 16:59:21 +02:00
cellSail.Todo("cellSailPlayerAddDescriptor(pSelf=*0x%x, pDesc=*0x%x)", pSelf, pDesc);
if (pDesc->registered)
return CELL_SAIL_ERROR_INVALID_STATE;
return CELL_OK;
}
2015-07-09 17:30:37 +02:00
s32 cellSailPlayerRemoveDescriptor(vm::ptr<CellSailPlayer> pSelf, vm::ptr<CellSailDescriptor> ppDesc)
{
2015-07-27 16:59:21 +02:00
cellSail.Warning("cellSailPlayerAddDescriptor(pSelf=*0x%x, pDesc=*0x%x)", pSelf, ppDesc);
if (pSelf->descriptors > 0)
{
ppDesc = pSelf->registeredDescriptors[pSelf->descriptors];
delete &pSelf->registeredDescriptors[pSelf->descriptors];
pSelf->descriptors--;
}
return pSelf->descriptors;
}
2015-07-09 17:30:37 +02:00
s32 cellSailPlayerGetDescriptorCount(vm::ptr<CellSailPlayer> pSelf)
{
2015-07-27 16:59:21 +02:00
cellSail.Warning("cellSailPlayerGetDescriptorCount(pSelf=*0x%x)", pSelf);
return pSelf->descriptors;
}
2015-07-09 17:30:37 +02:00
s32 cellSailPlayerGetCurrentDescriptor()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
2015-07-09 17:30:37 +02:00
s32 cellSailPlayerOpenStream()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
2015-07-09 17:30:37 +02:00
s32 cellSailPlayerCloseStream()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
2015-07-09 17:30:37 +02:00
s32 cellSailPlayerOpenEsAudio()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
2015-07-09 17:30:37 +02:00
s32 cellSailPlayerOpenEsVideo()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
2015-07-09 17:30:37 +02:00
s32 cellSailPlayerOpenEsUser()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
2015-07-09 17:30:37 +02:00
s32 cellSailPlayerReopenEsAudio()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
2015-07-09 17:30:37 +02:00
s32 cellSailPlayerReopenEsVideo()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
2015-07-09 17:30:37 +02:00
s32 cellSailPlayerReopenEsUser()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
2015-07-09 17:30:37 +02:00
s32 cellSailPlayerCloseEsAudio()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
2015-07-09 17:30:37 +02:00
s32 cellSailPlayerCloseEsVideo()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
2015-07-09 17:30:37 +02:00
s32 cellSailPlayerCloseEsUser()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
2015-07-09 17:30:37 +02:00
s32 cellSailPlayerStart()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
2015-07-09 17:30:37 +02:00
s32 cellSailPlayerStop()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
2015-07-09 17:30:37 +02:00
s32 cellSailPlayerNext()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
2015-07-09 17:30:37 +02:00
s32 cellSailPlayerCancel()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
2015-07-26 02:53:26 +02:00
s32 cellSailPlayerSetPaused(vm::ptr<CellSailPlayer> pSelf, b8 paused)
{
2015-07-27 16:59:21 +02:00
cellSail.Todo("cellSailPlayerSetPaused(pSelf=*0x%x, paused=%d)", pSelf, paused);
return CELL_OK;
}
2015-07-09 17:30:37 +02:00
s32 cellSailPlayerIsPaused(vm::ptr<CellSailPlayer> pSelf)
{
2015-07-27 16:59:21 +02:00
cellSail.Warning("cellSailPlayerIsPaused(pSelf=*0x%x)", pSelf);
2014-12-14 08:59:04 +01:00
return pSelf->paused;
}
2015-07-09 17:30:37 +02:00
s32 cellSailPlayerSetRepeatMode(vm::ptr<CellSailPlayer> pSelf, s32 repeatMode, vm::ptr<CellSailStartCommand> pCommand)
{
2015-07-27 16:59:21 +02:00
cellSail.Warning("cellSailPlayerSetRepeatMode(pSelf=*0x%x, repeatMode=%d, pCommand=*0x%x)", pSelf, repeatMode, pCommand);
pSelf->repeatMode = repeatMode;
pSelf->playbackCommand = pCommand;
return pSelf->repeatMode;
}
2015-07-09 17:30:37 +02:00
s32 cellSailPlayerGetRepeatMode(vm::ptr<CellSailPlayer> pSelf, vm::ptr<CellSailStartCommand> pCommand)
{
2015-07-27 16:59:21 +02:00
cellSail.Warning("cellSailPlayerGetRepeatMode(pSelf=*0x%x, pCommand=*0x%x)", pSelf, pCommand);
pCommand = pSelf->playbackCommand;
return pSelf->repeatMode;
}
2015-07-09 17:30:37 +02:00
s32 cellSailPlayerSetEsAudioMuted()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
2015-07-09 17:30:37 +02:00
s32 cellSailPlayerSetEsVideoMuted()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
2015-07-09 17:30:37 +02:00
s32 cellSailPlayerIsEsAudioMuted()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
2015-07-09 17:30:37 +02:00
s32 cellSailPlayerIsEsVideoMuted()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
2015-07-09 17:30:37 +02:00
s32 cellSailPlayerDumpImage()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
2015-07-09 17:30:37 +02:00
s32 cellSailPlayerUnregisterSource()
{
UNIMPLEMENTED_FUNC(cellSail);
return CELL_OK;
}
Module cellSail("cellSail", []()
{
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-08-01 00:48:38 +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);
});