Use inheritance for decoder implementations

This commit is contained in:
Patrick Nicolas
2025-09-04 17:15:29 +02:00
parent cc5990a513
commit 6b99cf4cc3
9 changed files with 249 additions and 130 deletions
+4 -4
View File
@@ -299,7 +299,7 @@ std::shared_ptr<scenes::stream> scenes::stream::create(std::unique_ptr<wivrn_ses
if (not(config.check_feature(feature::microphone)))
info.microphone = {};
info.supported_codecs = decoder_impl::supported_codecs();
info.supported_codecs = decoder::supported_codecs();
return info;
}());
@@ -848,7 +848,7 @@ void scenes::stream::render(const XrFrameState & frame_state)
foveation = blit_handle->view_info.foveation;
use_alpha = blit_handle->view_info.alpha;
if (*blit_handle->current_layout == vk::ImageLayout::eUndefined)
if (blit_handle->current_layout == vk::ImageLayout::eUndefined)
{
vk::ImageMemoryBarrier barrier{
.srcAccessMask = vk::AccessFlagBits::eNone,
@@ -864,7 +864,7 @@ void scenes::stream::render(const XrFrameState & frame_state)
};
command_buffer.pipelineBarrier(vk::PipelineStageFlagBits::eAllCommands, vk::PipelineStageFlagBits::eAllCommands, {}, {}, {}, barrier);
*blit_handle->current_layout = vk::ImageLayout::eGeneral;
blit_handle->current_layout = vk::ImageLayout::eGeneral;
}
}
@@ -877,7 +877,7 @@ void scenes::stream::render(const XrFrameState & frame_state)
{
if (not blit_handle)
continue;
b.push_image(command_buffer, j, decoders[j].decoder->sampler(), *blit_handle->image_view, *blit_handle->current_layout);
b.push_image(command_buffer, j, decoders[j].decoder->sampler(), blit_handle->image_view, blit_handle->current_layout);
}
blitted[i] = b.end(command_buffer);
}