skip encoding when session paused
this is already done by `offset_est.reset()` as a side-effect but it's implemented formally in case that breaks by future changes.
This commit is contained in:
@@ -523,7 +523,7 @@ static VkResult comp_wivrn_present(struct comp_target * ct,
|
||||
.pWaitDstStageMask = &wait_stage,
|
||||
};
|
||||
|
||||
if (cn->c->base.layer_accum.layer_count == 0 or not cn->cnx.get_offset())
|
||||
if (cn->c->base.layer_accum.layer_count == 0 or not cn->cnx.get_offset() or cn->skip_encoding)
|
||||
{
|
||||
scoped_lock lock(vk->main_queue->mutex);
|
||||
cn->wivrn_bundle->queue.submit(submit_info);
|
||||
@@ -827,6 +827,17 @@ void wivrn_comp_target::reset_encoders()
|
||||
cnx.send_control(to_headset::video_stream_description{desc});
|
||||
}
|
||||
|
||||
void wivrn_comp_target::pause()
|
||||
{
|
||||
skip_encoding = true;
|
||||
}
|
||||
|
||||
void wivrn_comp_target::resume()
|
||||
{
|
||||
reset_encoders();
|
||||
skip_encoding = false;
|
||||
}
|
||||
|
||||
void wivrn_comp_target::set_bitrate(uint32_t bitrate_bps)
|
||||
{
|
||||
for (auto & encoder: encoders)
|
||||
|
||||
Reference in New Issue
Block a user