mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-04-05 06:26:49 +00:00
Rename cond_one to unique_cond
Remove redundant in_cv in cellVdec
This commit is contained in:
parent
0333942795
commit
31994dd3b2
3 changed files with 8 additions and 15 deletions
|
|
@ -90,7 +90,6 @@ struct vdec_context final
|
|||
|
||||
atomic_t<u32> au_count{0};
|
||||
|
||||
cond_one in_cv;
|
||||
lf_queue<std::variant<vdec_start_seq_t, vdec_close_t, vdec_cmd, CellVdecFrameRate>> in_cmd;
|
||||
|
||||
vdec_context(s32 type, u32 profile, u32 addr, u32 size, vm::ptr<CellVdecCbMsg> func, u32 arg)
|
||||
|
|
@ -161,13 +160,11 @@ struct vdec_context final
|
|||
{
|
||||
ppu_tid = ppu.id;
|
||||
|
||||
std::unique_lock cv_lock(in_cv);
|
||||
|
||||
for (auto cmds = in_cmd.pop_all(); !Emu.IsStopped(); cmds ? cmds.pop_front() : cmds = in_cmd.pop_all())
|
||||
{
|
||||
if (!cmds)
|
||||
{
|
||||
in_cv.wait(cv_lock, 1000);
|
||||
in_cmd.wait(1000);
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
@ -498,7 +495,6 @@ s32 cellVdecClose(ppu_thread& ppu, u32 handle)
|
|||
lv2_obj::sleep(ppu);
|
||||
vdec->out_max = 0;
|
||||
vdec->in_cmd.push(vdec_close);
|
||||
vdec->in_cv.notify();
|
||||
|
||||
while (!atomic_storage<u64>::load(vdec->ppu_tid))
|
||||
{
|
||||
|
|
@ -522,7 +518,6 @@ s32 cellVdecStartSeq(u32 handle)
|
|||
}
|
||||
|
||||
vdec->in_cmd.push(vdec_start_seq);
|
||||
vdec->in_cv.notify();
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
|
|
@ -538,7 +533,6 @@ s32 cellVdecEndSeq(u32 handle)
|
|||
}
|
||||
|
||||
vdec->in_cmd.push(vdec_cmd{-1});
|
||||
vdec->in_cv.notify();
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
|
|
@ -560,7 +554,6 @@ s32 cellVdecDecodeAu(u32 handle, CellVdecDecodeMode mode, vm::cptr<CellVdecAuInf
|
|||
|
||||
// TODO: check info
|
||||
vdec->in_cmd.push(vdec_cmd{mode, *auInfo});
|
||||
vdec->in_cv.notify();
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
|
|
@ -911,7 +904,6 @@ s32 cellVdecSetFrameRate(u32 handle, CellVdecFrameRate frc)
|
|||
|
||||
// TODO: check frc value
|
||||
vdec->in_cmd.push(frc);
|
||||
vdec->in_cv.notify();
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue