2020-05-30 20:55:41 +02:00
|
|
|
|
#include "stdafx.h"
|
2016-03-21 20:43:03 +01:00
|
|
|
|
#include "Emu/Cell/PPUModule.h"
|
2020-05-30 20:55:41 +02:00
|
|
|
|
#include "cellPngEnc.h"
|
2013-09-28 04:36:57 +02:00
|
|
|
|
|
2018-08-25 14:39:00 +02:00
|
|
|
|
LOG_CHANNEL(cellPngEnc);
|
2013-09-28 04:36:57 +02:00
|
|
|
|
|
2020-05-30 20:55:41 +02:00
|
|
|
|
template <>
|
|
|
|
|
|
void fmt_class_string<CellPngEncError>::format(std::string& out, u64 arg)
|
2013-09-28 04:36:57 +02:00
|
|
|
|
{
|
2020-05-30 20:55:41 +02:00
|
|
|
|
format_enum(out, arg, [](CellPngEncError value)
|
|
|
|
|
|
{
|
|
|
|
|
|
switch (value)
|
|
|
|
|
|
{
|
|
|
|
|
|
STR_CASE(CELL_PNGENC_ERROR_ARG);
|
|
|
|
|
|
STR_CASE(CELL_PNGENC_ERROR_SEQ);
|
|
|
|
|
|
STR_CASE(CELL_PNGENC_ERROR_BUSY);
|
|
|
|
|
|
STR_CASE(CELL_PNGENC_ERROR_EMPTY);
|
|
|
|
|
|
STR_CASE(CELL_PNGENC_ERROR_RESET);
|
|
|
|
|
|
STR_CASE(CELL_PNGENC_ERROR_FATAL);
|
|
|
|
|
|
STR_CASE(CELL_PNGENC_ERROR_STREAM_ABORT);
|
|
|
|
|
|
STR_CASE(CELL_PNGENC_ERROR_STREAM_SKIP);
|
|
|
|
|
|
STR_CASE(CELL_PNGENC_ERROR_STREAM_OVERFLOW);
|
|
|
|
|
|
STR_CASE(CELL_PNGENC_ERROR_STREAM_FILE_OPEN);
|
|
|
|
|
|
}
|
2013-09-28 04:36:57 +02:00
|
|
|
|
|
2020-05-30 20:55:41 +02:00
|
|
|
|
return unknown;
|
|
|
|
|
|
});
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
error_code cellPngEncQueryAttr(vm::cptr<CellPngEncConfig> config, vm::ptr<CellPngEncAttr> attr)
|
2013-09-28 04:36:57 +02:00
|
|
|
|
{
|
2020-05-30 20:55:41 +02:00
|
|
|
|
cellPngEnc.todo("cellPngEncQueryAttr(config=*0x%x, attr=*0x%x)", config, attr);
|
2013-09-28 04:36:57 +02:00
|
|
|
|
return CELL_OK;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2020-05-30 20:55:41 +02:00
|
|
|
|
error_code cellPngEncOpen(vm::cptr<CellPngEncConfig> config, vm::cptr<CellPngEncResource> resource, vm::pptr<void> handle)
|
2013-09-28 04:36:57 +02:00
|
|
|
|
{
|
2020-05-30 20:55:41 +02:00
|
|
|
|
cellPngEnc.todo("cellPngEncOpen(config=*0x%x, resource=*0x%x, handle=*0x%x)", config, resource, handle);
|
2013-09-28 04:36:57 +02:00
|
|
|
|
return CELL_OK;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2020-05-30 20:55:41 +02:00
|
|
|
|
error_code cellPngEncOpenEx(vm::cptr<CellPngEncConfig> config, vm::cptr<CellPngEncResourceEx> resourceEx, vm::pptr<void> handle)
|
2013-09-28 04:36:57 +02:00
|
|
|
|
{
|
2020-05-30 20:55:41 +02:00
|
|
|
|
cellPngEnc.todo("cellPngEncOpenEx(config=*0x%x, resourceEx=*0x%x, handle=*0x%x)", config, resourceEx, handle);
|
2013-09-28 04:36:57 +02:00
|
|
|
|
return CELL_OK;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2020-05-30 20:55:41 +02:00
|
|
|
|
error_code cellPngEncClose(vm::ptr<void> handle)
|
2013-09-28 04:36:57 +02:00
|
|
|
|
{
|
2020-05-30 20:55:41 +02:00
|
|
|
|
cellPngEnc.todo("cellPngEncClose(handle=*0x%x)", handle);
|
2013-09-28 04:36:57 +02:00
|
|
|
|
return CELL_OK;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2020-05-30 20:55:41 +02:00
|
|
|
|
error_code cellPngEncWaitForInput(vm::ptr<void> handle, b8 block)
|
2013-09-28 04:36:57 +02:00
|
|
|
|
{
|
2020-05-30 20:55:41 +02:00
|
|
|
|
cellPngEnc.todo("cellPngEncWaitForInput(handle=*0x%x, block=%d)", handle, block);
|
2013-09-28 04:36:57 +02:00
|
|
|
|
return CELL_OK;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2020-05-30 20:55:41 +02:00
|
|
|
|
error_code cellPngEncEncodePicture(vm::ptr<void> handle, vm::cptr<CellPngEncPicture> picture, vm::cptr<CellPngEncEncodeParam> encodeParam, vm::cptr<CellPngEncOutputParam> outputParam)
|
2013-09-28 04:36:57 +02:00
|
|
|
|
{
|
2020-05-30 20:55:41 +02:00
|
|
|
|
cellPngEnc.todo("cellPngEncEncodePicture(handle=*0x%x, picture=*0x%x, encodeParam=*0x%x, outputParam=*0x%x)", handle, picture, encodeParam, outputParam);
|
2013-09-28 04:36:57 +02:00
|
|
|
|
return CELL_OK;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2020-05-30 20:55:41 +02:00
|
|
|
|
error_code cellPngEncWaitForOutput(vm::ptr<void> handle, vm::ptr<u32> streamInfoNum, b8 block)
|
2013-09-28 04:36:57 +02:00
|
|
|
|
{
|
2020-05-30 20:55:41 +02:00
|
|
|
|
cellPngEnc.todo("cellPngEncWaitForOutput(handle=*0x%x, streamInfoNum=*0x%x, block=%d)", handle, streamInfoNum, block);
|
2013-09-28 04:36:57 +02:00
|
|
|
|
return CELL_OK;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2020-05-30 20:55:41 +02:00
|
|
|
|
error_code cellPngEncGetStreamInfo(vm::ptr<void> handle, vm::ptr<CellPngEncStreamInfo> streamInfo)
|
2013-09-28 04:36:57 +02:00
|
|
|
|
{
|
2020-05-30 20:55:41 +02:00
|
|
|
|
cellPngEnc.todo("cellPngEncGetStreamInfo(handle=*0x%x, streamInfo=*0x%x)", handle, streamInfo);
|
2013-09-28 04:36:57 +02:00
|
|
|
|
return CELL_OK;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2020-05-30 20:55:41 +02:00
|
|
|
|
error_code cellPngEncReset(vm::ptr<void> handle)
|
2013-09-28 04:36:57 +02:00
|
|
|
|
{
|
2020-05-30 20:55:41 +02:00
|
|
|
|
cellPngEnc.todo("cellPngEncReset(handle=*0x%x)", handle);
|
2013-09-28 04:36:57 +02:00
|
|
|
|
return CELL_OK;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2016-03-21 20:43:03 +01:00
|
|
|
|
DECLARE(ppu_module_manager::cellPngEnc)("cellPngEnc", []()
|
2013-09-28 04:36:57 +02:00
|
|
|
|
{
|
2015-02-20 14:58:40 +01:00
|
|
|
|
REG_FUNC(cellPngEnc, cellPngEncQueryAttr);
|
|
|
|
|
|
REG_FUNC(cellPngEnc, cellPngEncOpen);
|
|
|
|
|
|
REG_FUNC(cellPngEnc, cellPngEncOpenEx);
|
|
|
|
|
|
REG_FUNC(cellPngEnc, cellPngEncClose);
|
|
|
|
|
|
REG_FUNC(cellPngEnc, cellPngEncWaitForInput);
|
|
|
|
|
|
REG_FUNC(cellPngEnc, cellPngEncEncodePicture);
|
|
|
|
|
|
REG_FUNC(cellPngEnc, cellPngEncWaitForOutput);
|
|
|
|
|
|
REG_FUNC(cellPngEnc, cellPngEncGetStreamInfo);
|
|
|
|
|
|
REG_FUNC(cellPngEnc, cellPngEncReset);
|
2015-07-29 18:08:10 +02:00
|
|
|
|
});
|