mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-02-06 09:39:55 +00:00
cellPamf : add error log for CELL_PAMF_ERROR_INVALID_ARG
This commit is contained in:
parent
e55c8410b4
commit
d751e350c6
@ -92,8 +92,7 @@ u8 pamfGetStreamType(mem_ptr_t<CellPamfReader> pSelf, u8 stream)
|
|||||||
case 0x80: return CELL_PAMF_STREAM_TYPE_PAMF_LPCM;
|
case 0x80: return CELL_PAMF_STREAM_TYPE_PAMF_LPCM;
|
||||||
case 0xdd: return CELL_PAMF_STREAM_TYPE_USER_DATA;
|
case 0xdd: return CELL_PAMF_STREAM_TYPE_USER_DATA;
|
||||||
default:
|
default:
|
||||||
cellPamf->Error("pamfGetStreamType: (TODO) unsupported stream type found(0x%x)",
|
cellPamf->Error("*** TODO: pamfGetStreamType: unsupported stream type found(0x%x)", pAddr->stream_headers[stream].type);
|
||||||
pAddr->stream_headers[stream].type);
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -103,23 +102,43 @@ u8 pamfGetStreamChannel(mem_ptr_t<CellPamfReader> pSelf, u8 stream)
|
|||||||
//TODO: get stream channel correctly
|
//TODO: get stream channel correctly
|
||||||
const mem_ptr_t<PamfHeader> pAddr(pSelf->pAddr);
|
const mem_ptr_t<PamfHeader> pAddr(pSelf->pAddr);
|
||||||
|
|
||||||
if ((pAddr->stream_headers[stream].type == 0x1b) &&
|
switch (pAddr->stream_headers[stream].type)
|
||||||
(pAddr->stream_headers[stream].stream_id >= 0xe0) &&
|
|
||||||
(pAddr->stream_headers[stream].stream_id <= 0xef))
|
|
||||||
{
|
{
|
||||||
return pAddr->stream_headers[stream].stream_id - 0xe0;
|
case 0x1b:
|
||||||
|
if ((pAddr->stream_headers[stream].stream_id >= 0xe0) && (pAddr->stream_headers[stream].stream_id <= 0xef))
|
||||||
|
{
|
||||||
|
return pAddr->stream_headers[stream].stream_id - 0xe0;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
cellPamf->Error("pamfGetStreamChannel: stream type %x got invalid stream id=%x", pAddr->stream_headers[stream].type, pAddr->stream_headers[stream].stream_id);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
case 0xdc:
|
||||||
|
cellPamf->Error("*** TODO: pamfGetStreamChannel: CELL_PAMF_STREAM_TYPE_ATRAC3PLUS");
|
||||||
|
return 0;
|
||||||
|
case 0x80:
|
||||||
|
cellPamf->Error("*** TODO: pamfGetStreamChannel: CELL_PAMF_STREAM_TYPE_PAMF_LPCM");
|
||||||
|
return 0;
|
||||||
|
case 0xdd:
|
||||||
|
cellPamf->Error("*** TODO: pamfGetStreamChannel: CELL_PAMF_STREAM_TYPE_USER_DATA");
|
||||||
|
return 0;
|
||||||
|
default:
|
||||||
|
cellPamf->Error("*** TODO: pamfGetStreamType: unsupported stream type found(0x%x)", pAddr->stream_headers[stream].type);
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
cellPamf->Error("TODO: pamfGetStreamChannel (-> 0)");
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int cellPamfGetHeaderSize(mem_ptr_t<PamfHeader> pAddr, u64 fileSize, mem64_t pSize)
|
int cellPamfGetHeaderSize(mem_ptr_t<PamfHeader> pAddr, u64 fileSize, mem64_t pSize)
|
||||||
{
|
{
|
||||||
cellPamf->Warning("cellPamfGetHeaderSize(pAddr=0x%x, fileSize=%d, pSize_addr=0x%x)",
|
cellPamf->Warning("cellPamfGetHeaderSize(pAddr=0x%x, fileSize=%d, pSize_addr=0x%x)", pAddr.GetAddr(), fileSize, pSize.GetAddr());
|
||||||
pAddr.GetAddr(), fileSize, pSize.GetAddr());
|
|
||||||
|
|
||||||
if (!Memory.IsGoodAddr(pAddr.GetAddr(), 2048) || !pSize.IsGood())
|
if (!Memory.IsGoodAddr(pAddr.GetAddr(), 2048) || !pSize.IsGood())
|
||||||
|
{
|
||||||
|
cellPamf->Error("cellPamfGetHeaderSize: CELL_PAMF_ERROR_INVALID_ARG");
|
||||||
return CELL_PAMF_ERROR_INVALID_ARG;
|
return CELL_PAMF_ERROR_INVALID_ARG;
|
||||||
|
}
|
||||||
|
|
||||||
//if ((u32)pAddr->magic != 0x464d4150)
|
//if ((u32)pAddr->magic != 0x464d4150)
|
||||||
//return CELL_PAMF_ERROR_UNKNOWN_TYPE;
|
//return CELL_PAMF_ERROR_UNKNOWN_TYPE;
|
||||||
@ -131,11 +150,13 @@ int cellPamfGetHeaderSize(mem_ptr_t<PamfHeader> pAddr, u64 fileSize, mem64_t pSi
|
|||||||
|
|
||||||
int cellPamfGetHeaderSize2(mem_ptr_t<PamfHeader> pAddr, u64 fileSize, u32 attribute, mem64_t pSize)
|
int cellPamfGetHeaderSize2(mem_ptr_t<PamfHeader> pAddr, u64 fileSize, u32 attribute, mem64_t pSize)
|
||||||
{
|
{
|
||||||
cellPamf->Warning("cellPamfGetHeaderSize2(pAddr=0x%x, fileSize=%d, attribute=0x%x, pSize_addr=0x%x)",
|
cellPamf->Warning("cellPamfGetHeaderSize2(pAddr=0x%x, fileSize=%d, attribute=0x%x, pSize_addr=0x%x)", pAddr.GetAddr(), fileSize, attribute, pSize.GetAddr());
|
||||||
pAddr.GetAddr(), fileSize, attribute, pSize.GetAddr());
|
|
||||||
|
|
||||||
if (!Memory.IsGoodAddr(pAddr.GetAddr(), 2048) || !pSize.IsGood())
|
if (!Memory.IsGoodAddr(pAddr.GetAddr(), 2048) || !pSize.IsGood())
|
||||||
|
{
|
||||||
|
cellPamf->Error("cellPamfGetHeaderSize2: CELL_PAMF_ERROR_INVALID_ARG");
|
||||||
return CELL_PAMF_ERROR_INVALID_ARG;
|
return CELL_PAMF_ERROR_INVALID_ARG;
|
||||||
|
}
|
||||||
|
|
||||||
//if ((u32)pAddr->magic != 0x464d4150)
|
//if ((u32)pAddr->magic != 0x464d4150)
|
||||||
//return CELL_PAMF_ERROR_UNKNOWN_TYPE;
|
//return CELL_PAMF_ERROR_UNKNOWN_TYPE;
|
||||||
@ -147,11 +168,13 @@ int cellPamfGetHeaderSize2(mem_ptr_t<PamfHeader> pAddr, u64 fileSize, u32 attrib
|
|||||||
|
|
||||||
int cellPamfGetStreamOffsetAndSize(mem_ptr_t<PamfHeader> pAddr, u64 fileSize, mem64_t pOffset, mem64_t pSize)
|
int cellPamfGetStreamOffsetAndSize(mem_ptr_t<PamfHeader> pAddr, u64 fileSize, mem64_t pOffset, mem64_t pSize)
|
||||||
{
|
{
|
||||||
cellPamf->Warning("cellPamfGetStreamOffsetAndSize(pAddr=0x%x, fileSize=%d, pOffset_addr=0x%x, pSize_addr=0x%x)",
|
cellPamf->Warning("cellPamfGetStreamOffsetAndSize(pAddr=0x%x, fileSize=%d, pOffset_addr=0x%x, pSize_addr=0x%x)", pAddr.GetAddr(), fileSize, pOffset.GetAddr(), pSize.GetAddr());
|
||||||
pAddr.GetAddr(), fileSize, pOffset.GetAddr(), pSize.GetAddr());
|
|
||||||
|
|
||||||
if (!Memory.IsGoodAddr(pAddr.GetAddr(), 2048) || !pOffset.IsGood() || !pSize.IsGood())
|
if (!Memory.IsGoodAddr(pAddr.GetAddr(), 2048) || !pOffset.IsGood() || !pSize.IsGood())
|
||||||
|
{
|
||||||
|
cellPamf->Error("cellPamfGetStreamOffsetAndSize: CELL_PAMF_ERROR_INVALID_ARG");
|
||||||
return CELL_PAMF_ERROR_INVALID_ARG;
|
return CELL_PAMF_ERROR_INVALID_ARG;
|
||||||
|
}
|
||||||
|
|
||||||
//if ((u32)pAddr->magic != 0x464d4150)
|
//if ((u32)pAddr->magic != 0x464d4150)
|
||||||
//return CELL_PAMF_ERROR_UNKNOWN_TYPE;
|
//return CELL_PAMF_ERROR_UNKNOWN_TYPE;
|
||||||
@ -168,19 +191,25 @@ int cellPamfVerify(mem_ptr_t<PamfHeader> pAddr, u64 fileSize)
|
|||||||
cellPamf->Warning("cellPamfVerify(pAddr=0x%x, fileSize=%d)", pAddr.GetAddr(), fileSize);
|
cellPamf->Warning("cellPamfVerify(pAddr=0x%x, fileSize=%d)", pAddr.GetAddr(), fileSize);
|
||||||
|
|
||||||
if (!Memory.IsGoodAddr(pAddr.GetAddr(), 2048))
|
if (!Memory.IsGoodAddr(pAddr.GetAddr(), 2048))
|
||||||
|
{
|
||||||
|
cellPamf->Error("cellPamfVerify: CELL_PAMF_ERROR_INVALID_ARG");
|
||||||
return CELL_PAMF_ERROR_INVALID_ARG;
|
return CELL_PAMF_ERROR_INVALID_ARG;
|
||||||
|
}
|
||||||
|
|
||||||
return CELL_OK;
|
return CELL_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
int cellPamfReaderInitialize(mem_ptr_t<CellPamfReader> pSelf, mem_ptr_t<PamfHeader> pAddr, u64 fileSize, u32 attribute)
|
int cellPamfReaderInitialize(mem_ptr_t<CellPamfReader> pSelf, mem_ptr_t<PamfHeader> pAddr, u64 fileSize, u32 attribute)
|
||||||
{
|
{
|
||||||
cellPamf->Warning("cellPamfReaderInitialize(pSelf=0x%x, pAddr=0x%x, fileSize=%d, attribute=0x%x)",
|
cellPamf->Warning("cellPamfReaderInitialize(pSelf=0x%x, pAddr=0x%x, fileSize=%d, attribute=0x%x)", pSelf.GetAddr(), pAddr.GetAddr(), fileSize, attribute);
|
||||||
pSelf.GetAddr(), pAddr.GetAddr(), fileSize, attribute);
|
|
||||||
|
|
||||||
if (!pSelf.IsGood() || !Memory.IsGoodAddr(pAddr.GetAddr(), 2048))
|
if (!pSelf.IsGood() || !Memory.IsGoodAddr(pAddr.GetAddr(), 2048))
|
||||||
|
{
|
||||||
|
cellPamf->Error("cellPamfReaderInitialize: CELL_PAMF_ERROR_INVALID_ARG");
|
||||||
return CELL_PAMF_ERROR_INVALID_ARG;
|
return CELL_PAMF_ERROR_INVALID_ARG;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
if (fileSize)
|
if (fileSize)
|
||||||
{
|
{
|
||||||
pSelf->fileSize = fileSize;
|
pSelf->fileSize = fileSize;
|
||||||
@ -202,11 +231,13 @@ int cellPamfReaderInitialize(mem_ptr_t<CellPamfReader> pSelf, mem_ptr_t<PamfHead
|
|||||||
|
|
||||||
int cellPamfReaderGetPresentationStartTime(mem_ptr_t<CellPamfReader> pSelf, mem_ptr_t<CellCodecTimeStamp> pTimeStamp)
|
int cellPamfReaderGetPresentationStartTime(mem_ptr_t<CellPamfReader> pSelf, mem_ptr_t<CellCodecTimeStamp> pTimeStamp)
|
||||||
{
|
{
|
||||||
cellPamf->Warning("cellPamfReaderGetPresentationStartTime(pSelf=0x%x, pTimeStamp_addr=0x%x)",
|
cellPamf->Warning("cellPamfReaderGetPresentationStartTime(pSelf=0x%x, pTimeStamp_addr=0x%x)", pSelf.GetAddr(), pTimeStamp.GetAddr());
|
||||||
pSelf.GetAddr(), pTimeStamp.GetAddr());
|
|
||||||
|
|
||||||
if (!pSelf.IsGood() || !Memory.IsGoodAddr(pSelf->pAddr))
|
if (!pSelf.IsGood() || !Memory.IsGoodAddr(pSelf->pAddr))
|
||||||
|
{
|
||||||
|
cellPamf->Error("cellPamfReaderGetPresentationStartTime: CELL_PAMF_ERROR_INVALID_ARG");
|
||||||
return CELL_PAMF_ERROR_INVALID_ARG;
|
return CELL_PAMF_ERROR_INVALID_ARG;
|
||||||
|
}
|
||||||
|
|
||||||
const mem_ptr_t<PamfHeader> pAddr(pSelf->pAddr);
|
const mem_ptr_t<PamfHeader> pAddr(pSelf->pAddr);
|
||||||
const u32 upper = (u16)pAddr->start_pts_high;
|
const u32 upper = (u16)pAddr->start_pts_high;
|
||||||
@ -217,11 +248,13 @@ int cellPamfReaderGetPresentationStartTime(mem_ptr_t<CellPamfReader> pSelf, mem_
|
|||||||
|
|
||||||
int cellPamfReaderGetPresentationEndTime(mem_ptr_t<CellPamfReader> pSelf, mem_ptr_t<CellCodecTimeStamp> pTimeStamp)
|
int cellPamfReaderGetPresentationEndTime(mem_ptr_t<CellPamfReader> pSelf, mem_ptr_t<CellCodecTimeStamp> pTimeStamp)
|
||||||
{
|
{
|
||||||
cellPamf->Warning("cellPamfReaderGetPresentationEndTime(pSelf=0x%x, pTimeStamp_addr=0x%x)",
|
cellPamf->Warning("cellPamfReaderGetPresentationEndTime(pSelf=0x%x, pTimeStamp_addr=0x%x)", pSelf.GetAddr(), pTimeStamp.GetAddr());
|
||||||
pSelf.GetAddr(), pTimeStamp.GetAddr());
|
|
||||||
|
|
||||||
if (!pSelf.IsGood() || !Memory.IsGoodAddr(pSelf->pAddr))
|
if (!pSelf.IsGood() || !Memory.IsGoodAddr(pSelf->pAddr))
|
||||||
|
{
|
||||||
|
cellPamf->Error("cellPamfReaderGetPresentationEndTime: CELL_PAMF_ERROR_INVALID_ARG");
|
||||||
return CELL_PAMF_ERROR_INVALID_ARG;
|
return CELL_PAMF_ERROR_INVALID_ARG;
|
||||||
|
}
|
||||||
|
|
||||||
const mem_ptr_t<PamfHeader> pAddr(pSelf->pAddr);
|
const mem_ptr_t<PamfHeader> pAddr(pSelf->pAddr);
|
||||||
const u32 upper = (u16)pAddr->end_pts_high;
|
const u32 upper = (u16)pAddr->end_pts_high;
|
||||||
@ -235,7 +268,10 @@ int cellPamfReaderGetMuxRateBound(mem_ptr_t<CellPamfReader> pSelf)
|
|||||||
cellPamf->Warning("cellPamfReaderGetMuxRateBound(pSelf=0x%x)", pSelf.GetAddr());
|
cellPamf->Warning("cellPamfReaderGetMuxRateBound(pSelf=0x%x)", pSelf.GetAddr());
|
||||||
|
|
||||||
if (!pSelf.IsGood() || !Memory.IsGoodAddr(pSelf->pAddr))
|
if (!pSelf.IsGood() || !Memory.IsGoodAddr(pSelf->pAddr))
|
||||||
|
{
|
||||||
|
cellPamf->Error("cellPamfReaderGetMuxRateBound: CELL_PAMF_ERROR_INVALID_ARG");
|
||||||
return CELL_PAMF_ERROR_INVALID_ARG;
|
return CELL_PAMF_ERROR_INVALID_ARG;
|
||||||
|
}
|
||||||
|
|
||||||
const mem_ptr_t<PamfHeader> pAddr(pSelf->pAddr);
|
const mem_ptr_t<PamfHeader> pAddr(pSelf->pAddr);
|
||||||
return pAddr->mux_rate_max;
|
return pAddr->mux_rate_max;
|
||||||
@ -246,7 +282,10 @@ int cellPamfReaderGetNumberOfStreams(mem_ptr_t<CellPamfReader> pSelf)
|
|||||||
cellPamf->Warning("cellPamfReaderGetNumberOfStreams(pSelf=0x%x)", pSelf.GetAddr());
|
cellPamf->Warning("cellPamfReaderGetNumberOfStreams(pSelf=0x%x)", pSelf.GetAddr());
|
||||||
|
|
||||||
if (!pSelf.IsGood() || !Memory.IsGoodAddr(pSelf->pAddr))
|
if (!pSelf.IsGood() || !Memory.IsGoodAddr(pSelf->pAddr))
|
||||||
|
{
|
||||||
|
cellPamf->Error("cellPamfReaderGetNumberOfStreams: CELL_PAMF_ERROR_INVALID_ARG");
|
||||||
return CELL_PAMF_ERROR_INVALID_ARG;
|
return CELL_PAMF_ERROR_INVALID_ARG;
|
||||||
|
}
|
||||||
|
|
||||||
const mem_ptr_t<PamfHeader> pAddr(pSelf->pAddr);
|
const mem_ptr_t<PamfHeader> pAddr(pSelf->pAddr);
|
||||||
return pAddr->stream_count;
|
return pAddr->stream_count;
|
||||||
@ -254,11 +293,13 @@ int cellPamfReaderGetNumberOfStreams(mem_ptr_t<CellPamfReader> pSelf)
|
|||||||
|
|
||||||
int cellPamfReaderGetNumberOfSpecificStreams(mem_ptr_t<CellPamfReader> pSelf, u8 streamType)
|
int cellPamfReaderGetNumberOfSpecificStreams(mem_ptr_t<CellPamfReader> pSelf, u8 streamType)
|
||||||
{
|
{
|
||||||
cellPamf->Warning("cellPamfReaderGetNumberOfSpecificStreams(pSelf=0x%x, streamType=%d)",
|
cellPamf->Warning("cellPamfReaderGetNumberOfSpecificStreams(pSelf=0x%x, streamType=%d)", pSelf.GetAddr(), streamType);
|
||||||
pSelf.GetAddr(), streamType);
|
|
||||||
|
|
||||||
if (!pSelf.IsGood() || !Memory.IsGoodAddr(pSelf->pAddr))
|
if (!pSelf.IsGood() || !Memory.IsGoodAddr(pSelf->pAddr))
|
||||||
|
{
|
||||||
|
cellPamf->Error("cellPamfReaderGetNumberOfSpecificStreams: CELL_PAMF_ERROR_INVALID_ARG");
|
||||||
return CELL_PAMF_ERROR_INVALID_ARG;
|
return CELL_PAMF_ERROR_INVALID_ARG;
|
||||||
|
}
|
||||||
|
|
||||||
const mem_ptr_t<PamfHeader> pAddr(pSelf->pAddr);
|
const mem_ptr_t<PamfHeader> pAddr(pSelf->pAddr);
|
||||||
|
|
||||||
@ -281,8 +322,7 @@ int cellPamfReaderGetNumberOfSpecificStreams(mem_ptr_t<CellPamfReader> pSelf, u8
|
|||||||
case CELL_PAMF_STREAM_TYPE_VIDEO:
|
case CELL_PAMF_STREAM_TYPE_VIDEO:
|
||||||
return counts[CELL_PAMF_STREAM_TYPE_AVC] + counts[CELL_PAMF_STREAM_TYPE_M2V];
|
return counts[CELL_PAMF_STREAM_TYPE_AVC] + counts[CELL_PAMF_STREAM_TYPE_M2V];
|
||||||
case CELL_PAMF_STREAM_TYPE_AUDIO:
|
case CELL_PAMF_STREAM_TYPE_AUDIO:
|
||||||
return counts[CELL_PAMF_STREAM_TYPE_ATRAC3PLUS] +
|
return counts[CELL_PAMF_STREAM_TYPE_ATRAC3PLUS] + counts[CELL_PAMF_STREAM_TYPE_PAMF_LPCM] + counts[CELL_PAMF_STREAM_TYPE_AC3];
|
||||||
counts[CELL_PAMF_STREAM_TYPE_PAMF_LPCM] + counts[CELL_PAMF_STREAM_TYPE_AC3];
|
|
||||||
default:
|
default:
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -290,11 +330,13 @@ int cellPamfReaderGetNumberOfSpecificStreams(mem_ptr_t<CellPamfReader> pSelf, u8
|
|||||||
|
|
||||||
int cellPamfReaderSetStreamWithIndex(mem_ptr_t<CellPamfReader> pSelf, u8 streamIndex)
|
int cellPamfReaderSetStreamWithIndex(mem_ptr_t<CellPamfReader> pSelf, u8 streamIndex)
|
||||||
{
|
{
|
||||||
cellPamf->Warning("cellPamfReaderSetStreamWithIndex(pSelf=0x%x, streamIndex=%d)",
|
cellPamf->Warning("cellPamfReaderSetStreamWithIndex(pSelf=0x%x, streamIndex=%d)", pSelf.GetAddr(), streamIndex);
|
||||||
pSelf.GetAddr(), streamIndex);
|
|
||||||
|
|
||||||
if (!pSelf.IsGood() || !Memory.IsGoodAddr(pSelf->pAddr))
|
if (!pSelf.IsGood() || !Memory.IsGoodAddr(pSelf->pAddr))
|
||||||
|
{
|
||||||
|
cellPamf->Error("cellPamfReaderSetStreamWithIndex: CELL_PAMF_ERROR_INVALID_ARG");
|
||||||
return CELL_PAMF_ERROR_INVALID_ARG;
|
return CELL_PAMF_ERROR_INVALID_ARG;
|
||||||
|
}
|
||||||
|
|
||||||
const mem_ptr_t<PamfHeader> pAddr(pSelf->pAddr);
|
const mem_ptr_t<PamfHeader> pAddr(pSelf->pAddr);
|
||||||
|
|
||||||
@ -305,17 +347,20 @@ int cellPamfReaderSetStreamWithIndex(mem_ptr_t<CellPamfReader> pSelf, u8 streamI
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
cellPamf->Error("cellPamfReaderSetStreamWithIndex: CELL_PAMF_ERROR_INVALID_ARG");
|
||||||
return CELL_PAMF_ERROR_INVALID_ARG;
|
return CELL_PAMF_ERROR_INVALID_ARG;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int cellPamfReaderSetStreamWithTypeAndChannel(mem_ptr_t<CellPamfReader> pSelf, u8 streamType, u8 ch)
|
int cellPamfReaderSetStreamWithTypeAndChannel(mem_ptr_t<CellPamfReader> pSelf, u8 streamType, u8 ch)
|
||||||
{
|
{
|
||||||
cellPamf->Warning("cellPamfReaderSetStreamWithTypeAndChannel(pSelf=0x%x, streamType=%d, ch=%d)",
|
cellPamf->Warning("cellPamfReaderSetStreamWithTypeAndChannel(pSelf=0x%x, streamType=%d, ch=%d)", pSelf.GetAddr(), streamType, ch);
|
||||||
pSelf.GetAddr(), streamType, ch);
|
|
||||||
|
|
||||||
if (!pSelf.IsGood() || !Memory.IsGoodAddr(pSelf->pAddr))
|
if (!pSelf.IsGood() || !Memory.IsGoodAddr(pSelf->pAddr))
|
||||||
|
{
|
||||||
|
cellPamf->Error("cellPamfReaderSetStreamWithTypeAndChannel: CELL_PAMF_ERROR_INVALID_ARG");
|
||||||
return CELL_PAMF_ERROR_INVALID_ARG;
|
return CELL_PAMF_ERROR_INVALID_ARG;
|
||||||
|
}
|
||||||
|
|
||||||
const mem_ptr_t<PamfHeader> pAddr(pSelf->pAddr);
|
const mem_ptr_t<PamfHeader> pAddr(pSelf->pAddr);
|
||||||
|
|
||||||
@ -343,11 +388,13 @@ int cellPamfReaderSetStreamWithTypeAndChannel(mem_ptr_t<CellPamfReader> pSelf, u
|
|||||||
|
|
||||||
int cellPamfReaderSetStreamWithTypeAndIndex(mem_ptr_t<CellPamfReader> pSelf, u8 streamType, u8 streamIndex)
|
int cellPamfReaderSetStreamWithTypeAndIndex(mem_ptr_t<CellPamfReader> pSelf, u8 streamType, u8 streamIndex)
|
||||||
{
|
{
|
||||||
cellPamf->Warning("cellPamfReaderSetStreamWithTypeAndIndex(pSelf=0x%x, streamType=%d, streamIndex=%d)",
|
cellPamf->Warning("cellPamfReaderSetStreamWithTypeAndIndex(pSelf=0x%x, streamType=%d, streamIndex=%d)", pSelf.GetAddr(), streamType, streamIndex);
|
||||||
pSelf.GetAddr(), streamType, streamIndex);
|
|
||||||
|
|
||||||
if (!pSelf.IsGood() || !Memory.IsGoodAddr(pSelf->pAddr))
|
if (!pSelf.IsGood() || !Memory.IsGoodAddr(pSelf->pAddr))
|
||||||
|
{
|
||||||
|
cellPamf->Error("cellPamfReaderSetStreamWithTypeAndIndex: CELL_PAMF_ERROR_INVALID_ARG");
|
||||||
return CELL_PAMF_ERROR_INVALID_ARG;
|
return CELL_PAMF_ERROR_INVALID_ARG;
|
||||||
|
}
|
||||||
|
|
||||||
const mem_ptr_t<PamfHeader> pAddr(pSelf->pAddr);
|
const mem_ptr_t<PamfHeader> pAddr(pSelf->pAddr);
|
||||||
|
|
||||||
@ -394,11 +441,13 @@ int cellPamfReaderSetStreamWithTypeAndIndex(mem_ptr_t<CellPamfReader> pSelf, u8
|
|||||||
|
|
||||||
int cellPamfStreamTypeToEsFilterId(u8 type, u8 ch, mem_ptr_t<CellCodecEsFilterId> pEsFilterId)
|
int cellPamfStreamTypeToEsFilterId(u8 type, u8 ch, mem_ptr_t<CellCodecEsFilterId> pEsFilterId)
|
||||||
{
|
{
|
||||||
cellPamf->Warning("cellPamfStreamTypeToEsFilterId(type=%d, ch=%d, pEsFilterId_addr=0x%x)",
|
cellPamf->Warning("cellPamfStreamTypeToEsFilterId(type=%d, ch=%d, pEsFilterId_addr=0x%x)", type, ch, pEsFilterId.GetAddr());
|
||||||
type, ch, pEsFilterId.GetAddr());
|
|
||||||
|
|
||||||
if (!pEsFilterId.IsGood())
|
if (!pEsFilterId.IsGood())
|
||||||
|
{
|
||||||
|
cellPamf->Error("cellPamfStreamTypeToEsFilterId: CELL_PAMF_ERROR_INVALID_ARG");
|
||||||
return CELL_PAMF_ERROR_INVALID_ARG;
|
return CELL_PAMF_ERROR_INVALID_ARG;
|
||||||
|
}
|
||||||
|
|
||||||
return pamfStreamTypeToEsFilterId(type, ch, pEsFilterId);
|
return pamfStreamTypeToEsFilterId(type, ch, pEsFilterId);
|
||||||
}
|
}
|
||||||
@ -408,18 +457,23 @@ int cellPamfReaderGetStreamIndex(mem_ptr_t<CellPamfReader> pSelf)
|
|||||||
cellPamf->Log("cellPamfReaderGetStreamIndex(pSelf=0x%x)", pSelf.GetAddr());
|
cellPamf->Log("cellPamfReaderGetStreamIndex(pSelf=0x%x)", pSelf.GetAddr());
|
||||||
|
|
||||||
if (!pSelf.IsGood())
|
if (!pSelf.IsGood())
|
||||||
|
{
|
||||||
|
cellPamf->Error("cellPamfReaderGetStreamIndex: CELL_PAMF_ERROR_INVALID_ARG");
|
||||||
return CELL_PAMF_ERROR_INVALID_ARG;
|
return CELL_PAMF_ERROR_INVALID_ARG;
|
||||||
|
}
|
||||||
|
|
||||||
return pSelf->stream;
|
return pSelf->stream;
|
||||||
}
|
}
|
||||||
|
|
||||||
int cellPamfReaderGetStreamTypeAndChannel(mem_ptr_t<CellPamfReader> pSelf, mem8_t pType, mem8_t pCh)
|
int cellPamfReaderGetStreamTypeAndChannel(mem_ptr_t<CellPamfReader> pSelf, mem8_t pType, mem8_t pCh)
|
||||||
{
|
{
|
||||||
cellPamf->Warning("cellPamfReaderGetStreamTypeAndChannel(pSelf=0x%x (stream=%d), pType_addr=0x%x, pCh_addr=0x%x",
|
cellPamf->Warning("cellPamfReaderGetStreamTypeAndChannel(pSelf=0x%x (stream=%d), pType_addr=0x%x, pCh_addr=0x%x", pSelf.GetAddr(), pSelf->stream, pType.GetAddr(), pCh.GetAddr());
|
||||||
pSelf.GetAddr(), pSelf->stream, pType.GetAddr(), pCh.GetAddr());
|
|
||||||
|
|
||||||
if (!pSelf.IsGood() || !pCh.IsGood())
|
if (!pSelf.IsGood() || !pCh.IsGood())
|
||||||
|
{
|
||||||
|
cellPamf->Error("cellPamfReaderGetStreamTypeAndChannel: CELL_PAMF_ERROR_INVALID_ARG");
|
||||||
return CELL_PAMF_ERROR_INVALID_ARG;
|
return CELL_PAMF_ERROR_INVALID_ARG;
|
||||||
|
}
|
||||||
|
|
||||||
pType = pamfGetStreamType(pSelf, pSelf->stream);
|
pType = pamfGetStreamType(pSelf, pSelf->stream);
|
||||||
pCh = pamfGetStreamChannel(pSelf, pSelf->stream);
|
pCh = pamfGetStreamChannel(pSelf, pSelf->stream);
|
||||||
@ -428,11 +482,13 @@ int cellPamfReaderGetStreamTypeAndChannel(mem_ptr_t<CellPamfReader> pSelf, mem8_
|
|||||||
|
|
||||||
int cellPamfReaderGetEsFilterId(mem_ptr_t<CellPamfReader> pSelf, mem_ptr_t<CellCodecEsFilterId> pEsFilterId)
|
int cellPamfReaderGetEsFilterId(mem_ptr_t<CellPamfReader> pSelf, mem_ptr_t<CellCodecEsFilterId> pEsFilterId)
|
||||||
{
|
{
|
||||||
cellPamf->Warning("cellPamfReaderGetEsFilterId(pSelf=0x%x (stream=%d), pEsFilterId_addr=0x%x)",
|
cellPamf->Warning("cellPamfReaderGetEsFilterId(pSelf=0x%x (stream=%d), pEsFilterId_addr=0x%x)", pSelf.GetAddr(), pSelf->stream, pEsFilterId.GetAddr());
|
||||||
pSelf.GetAddr(), pSelf->stream, pEsFilterId.GetAddr());
|
|
||||||
|
|
||||||
if (!pSelf.IsGood() || !pEsFilterId.IsGood())
|
if (!pSelf.IsGood() || !pEsFilterId.IsGood())
|
||||||
|
{
|
||||||
|
cellPamf->Error("cellPamfReaderGetEsFilterId: CELL_PAMF_ERROR_INVALID_ARG");
|
||||||
return CELL_PAMF_ERROR_INVALID_ARG;
|
return CELL_PAMF_ERROR_INVALID_ARG;
|
||||||
|
}
|
||||||
|
|
||||||
return pamfStreamTypeToEsFilterId(pamfGetStreamType(pSelf, pSelf->stream),
|
return pamfStreamTypeToEsFilterId(pamfGetStreamType(pSelf, pSelf->stream),
|
||||||
pamfGetStreamChannel(pSelf, pSelf->stream), pEsFilterId);
|
pamfGetStreamChannel(pSelf, pSelf->stream), pEsFilterId);
|
||||||
@ -440,11 +496,13 @@ int cellPamfReaderGetEsFilterId(mem_ptr_t<CellPamfReader> pSelf, mem_ptr_t<CellC
|
|||||||
|
|
||||||
int cellPamfReaderGetStreamInfo(mem_ptr_t<CellPamfReader> pSelf, u32 pInfo_addr, u32 size)
|
int cellPamfReaderGetStreamInfo(mem_ptr_t<CellPamfReader> pSelf, u32 pInfo_addr, u32 size)
|
||||||
{
|
{
|
||||||
cellPamf->Warning("cellPamfReaderGetStreamInfo(pSelf=0x%x (stream=%d), pInfo_addr=0x%x, size=%d)",
|
cellPamf->Warning("cellPamfReaderGetStreamInfo(pSelf=0x%x, stream=%d, pInfo_addr=0x%x, size=%d)", pSelf.GetAddr(), pSelf->stream, pInfo_addr, size);
|
||||||
pSelf.GetAddr(), pSelf->stream, pInfo_addr, size);
|
|
||||||
|
|
||||||
if (!pSelf.IsGood() || !Memory.IsGoodAddr(pSelf->pAddr))
|
if (!pSelf.IsGood() || !Memory.IsGoodAddr(pSelf->pAddr))
|
||||||
|
{
|
||||||
|
cellPamf->Error("cellPamfReaderGetStreamInfo: CELL_PAMF_ERROR_INVALID_ARG");
|
||||||
return CELL_PAMF_ERROR_INVALID_ARG;
|
return CELL_PAMF_ERROR_INVALID_ARG;
|
||||||
|
}
|
||||||
|
|
||||||
const mem_ptr_t<PamfHeader> pAddr(pSelf->pAddr);
|
const mem_ptr_t<PamfHeader> pAddr(pSelf->pAddr);
|
||||||
|
|
||||||
@ -551,11 +609,13 @@ int cellPamfReaderGetStreamInfo(mem_ptr_t<CellPamfReader> pSelf, u32 pInfo_addr,
|
|||||||
|
|
||||||
int cellPamfReaderGetNumberOfEp(mem_ptr_t<CellPamfReader> pSelf)
|
int cellPamfReaderGetNumberOfEp(mem_ptr_t<CellPamfReader> pSelf)
|
||||||
{
|
{
|
||||||
cellPamf->Warning("cellPamfReaderGetNumberOfEp(pSelf=0x%x (stream=%d))",
|
cellPamf->Warning("cellPamfReaderGetNumberOfEp(pSelf=0x%x, stream=%d)", pSelf.GetAddr(), pSelf->stream);
|
||||||
pSelf.GetAddr(), pSelf->stream);
|
|
||||||
|
|
||||||
if (!pSelf.IsGood() || !Memory.IsGoodAddr(pSelf->pAddr))
|
if (!pSelf.IsGood() || !Memory.IsGoodAddr(pSelf->pAddr))
|
||||||
|
{
|
||||||
|
cellPamf->Error("cellPamfReaderGetNumberOfEp: CELL_PAMF_ERROR_INVALID_ARG");
|
||||||
return CELL_PAMF_ERROR_INVALID_ARG;
|
return CELL_PAMF_ERROR_INVALID_ARG;
|
||||||
|
}
|
||||||
|
|
||||||
const mem_ptr_t<PamfHeader> pAddr(pSelf->pAddr);
|
const mem_ptr_t<PamfHeader> pAddr(pSelf->pAddr);
|
||||||
return pAddr->stream_headers[pSelf->stream].ep_num;
|
return pAddr->stream_headers[pSelf->stream].ep_num;
|
||||||
@ -563,11 +623,13 @@ int cellPamfReaderGetNumberOfEp(mem_ptr_t<CellPamfReader> pSelf)
|
|||||||
|
|
||||||
int cellPamfReaderGetEpIteratorWithIndex(mem_ptr_t<CellPamfReader> pSelf, u32 epIndex, mem_ptr_t<CellPamfEpIterator> pIt)
|
int cellPamfReaderGetEpIteratorWithIndex(mem_ptr_t<CellPamfReader> pSelf, u32 epIndex, mem_ptr_t<CellPamfEpIterator> pIt)
|
||||||
{
|
{
|
||||||
cellPamf->Error("cellPamfReaderGetEpIteratorWithIndex(pSelf=0x%x (stream=%d), epIndex=%d, pIt_addr=0x%x)",
|
cellPamf->Error("cellPamfReaderGetEpIteratorWithIndex(pSelf=0x%x, stream=%d, epIndex=%d, pIt_addr=0x%x)", pSelf.GetAddr(), pSelf->stream, epIndex, pIt.GetAddr());
|
||||||
pSelf.GetAddr(), pSelf->stream, epIndex, pIt.GetAddr());
|
|
||||||
|
|
||||||
if (!pSelf.IsGood() || !Memory.IsGoodAddr(pSelf->pAddr))
|
if (!pSelf.IsGood() || !Memory.IsGoodAddr(pSelf->pAddr))
|
||||||
|
{
|
||||||
|
cellPamf->Error("cellPamfReaderGetEpIteratorWithIndex: CELL_PAMF_ERROR_INVALID_ARG");
|
||||||
return CELL_PAMF_ERROR_INVALID_ARG;
|
return CELL_PAMF_ERROR_INVALID_ARG;
|
||||||
|
}
|
||||||
|
|
||||||
const mem_ptr_t<PamfHeader> pAddr(pSelf->pAddr);
|
const mem_ptr_t<PamfHeader> pAddr(pSelf->pAddr);
|
||||||
//TODO:
|
//TODO:
|
||||||
@ -576,25 +638,30 @@ int cellPamfReaderGetEpIteratorWithIndex(mem_ptr_t<CellPamfReader> pSelf, u32 ep
|
|||||||
|
|
||||||
int cellPamfReaderGetEpIteratorWithTimeStamp(mem_ptr_t<CellPamfReader> pSelf, mem_ptr_t<CellCodecTimeStamp> pTimeStamp, mem_ptr_t<CellPamfEpIterator> pIt)
|
int cellPamfReaderGetEpIteratorWithTimeStamp(mem_ptr_t<CellPamfReader> pSelf, mem_ptr_t<CellCodecTimeStamp> pTimeStamp, mem_ptr_t<CellPamfEpIterator> pIt)
|
||||||
{
|
{
|
||||||
cellPamf->Error("cellPamfReaderGetEpIteratorWithTimeStamp(pSelf=0x%x, pTimeStamp_addr=0x%x, pIt_addr=0x%x)",
|
cellPamf->Error("cellPamfReaderGetEpIteratorWithTimeStamp(pSelf=0x%x, pTimeStamp_addr=0x%x, pIt_addr=0x%x)", pSelf.GetAddr(), pTimeStamp.GetAddr(), pIt.GetAddr());
|
||||||
pSelf.GetAddr(), pTimeStamp.GetAddr(), pIt.GetAddr());
|
|
||||||
|
|
||||||
const mem_ptr_t<PamfHeader> pAddr(pSelf->pAddr);
|
const mem_ptr_t<PamfHeader> pAddr(pSelf->pAddr);
|
||||||
|
|
||||||
//TODO:
|
//TODO:
|
||||||
|
|
||||||
return CELL_OK;
|
return CELL_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
int cellPamfEpIteratorGetEp(mem_ptr_t<CellPamfEpIterator> pIt, mem_ptr_t<CellPamfEp> pEp)
|
int cellPamfEpIteratorGetEp(mem_ptr_t<CellPamfEpIterator> pIt, mem_ptr_t<CellPamfEp> pEp)
|
||||||
{
|
{
|
||||||
cellPamf->Error("cellPamfEpIteratorGetEp(pIt_addr=0x%x, pEp_addr=0x%x)", pIt.GetAddr(), pEp.GetAddr());
|
cellPamf->Error("cellPamfEpIteratorGetEp(pIt_addr=0x%x, pEp_addr=0x%x)", pIt.GetAddr(), pEp.GetAddr());
|
||||||
|
|
||||||
//TODO:
|
//TODO:
|
||||||
|
|
||||||
return CELL_OK;
|
return CELL_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
int cellPamfEpIteratorMove(mem_ptr_t<CellPamfEpIterator> pIt, s32 steps, mem_ptr_t<CellPamfEp> pEp)
|
int cellPamfEpIteratorMove(mem_ptr_t<CellPamfEpIterator> pIt, s32 steps, mem_ptr_t<CellPamfEp> pEp)
|
||||||
{
|
{
|
||||||
cellPamf->Error("cellPamfEpIteratorMove(pIt_addr=0x%x, steps=%d, pEp_addr=0x%x)", pIt.GetAddr(), steps, pEp.GetAddr());
|
cellPamf->Error("cellPamfEpIteratorMove(pIt_addr=0x%x, steps=%d, pEp_addr=0x%x)", pIt.GetAddr(), steps, pEp.GetAddr());
|
||||||
|
|
||||||
//TODO:
|
//TODO:
|
||||||
|
|
||||||
return CELL_OK;
|
return CELL_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user