int cellPamfReaderGetEsFilterId(vm::ptr<CellPamfReader> pSelf, vm::ptr<CellCodecEsFilterId> pEsFilterId) { cellPamf->Warning("cellPamfReaderGetEsFilterId(pSelf=0x%x (stream=%d), pEsFilterId_addr=0x%x)", pSelf.addr(), pSelf->stream, pEsFilterId.addr()); return pamfStreamTypeToEsFilterId(pamfGetStreamType(pSelf, pSelf->stream), pamfGetStreamChannel(pSelf, pSelf->stream), pEsFilterId); }
int cellPamfReaderSetStreamWithTypeAndChannel(vm::ptr<CellPamfReader> pSelf, u8 streamType, u8 ch) { cellPamf->Warning("cellPamfReaderSetStreamWithTypeAndChannel(pSelf=0x%x, streamType=%d, ch=%d)", pSelf.addr(), streamType, ch); vm::ptr<const PamfHeader> pAddr(pSelf->pAddr); if (streamType > 5) { cellPamf->Error("cellPamfReaderSetStreamWithTypeAndChannel: invalid stream type(%d)", streamType); //it probably doesn't support "any audio" or "any video" argument return CELL_PAMF_ERROR_INVALID_ARG; } for (u8 i = 0; i < pAddr->stream_count; i++) { if (pamfGetStreamType(pSelf, i) == streamType) { if (pamfGetStreamChannel(pSelf, i) == ch) { pSelf->stream = i; return i; } } } return CELL_PAMF_ERROR_STREAM_NOT_FOUND; }
int cellPamfReaderGetStreamTypeAndChannel(vm::ptr<CellPamfReader> pSelf, vm::ptr<u8> pType, vm::ptr<u8> pCh) { cellPamf->Warning("cellPamfReaderGetStreamTypeAndChannel(pSelf=0x%x (stream=%d), pType_addr=0x%x, pCh_addr=0x%x", pSelf.addr(), pSelf->stream, pType.addr(), pCh.addr()); *pType = pamfGetStreamType(pSelf, pSelf->stream); *pCh = pamfGetStreamChannel(pSelf, pSelf->stream); return CELL_OK; }
int cellPamfReaderGetEsFilterId(mem_ptr_t<CellPamfReader> pSelf, mem_ptr_t<CellCodecEsFilterId> pEsFilterId) { cellPamf.Warning("cellPamfReaderGetEsFilterId(pSelf=0x%x (stream=%d), pEsFilterId_addr=0x%x)", pSelf.GetAddr(), pSelf->stream, pEsFilterId.GetAddr()); if (!pSelf.IsGood() || !pEsFilterId.IsGood()) return CELL_PAMF_ERROR_INVALID_ARG; return pamfStreamTypeToEsFilterId(pamfGetStreamType(pSelf, pSelf->stream), pamfGetStreamChannel(pSelf, pSelf->stream), pEsFilterId); }
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", pSelf.GetAddr(), pSelf->stream, pType.GetAddr(), pCh.GetAddr()); if (!pSelf.IsGood() || !pCh.IsGood()) return CELL_PAMF_ERROR_INVALID_ARG; pType = pamfGetStreamType(pSelf, pSelf->stream); pCh = pamfGetStreamChannel(pSelf, pSelf->stream); return CELL_OK; }