fix broken asserts
This commit is contained in:
@@ -376,7 +376,7 @@ xrt_result_t wivrn::wivrn_session::create_session(std::unique_ptr<wivrn_connecti
|
|||||||
|
|
||||||
void wivrn_session::start(ipc_server * server)
|
void wivrn_session::start(ipc_server * server)
|
||||||
{
|
{
|
||||||
assert(not thread);
|
assert(not thread.joinable());
|
||||||
mnd_ipc_server = server;
|
mnd_ipc_server = server;
|
||||||
thread = std::jthread([this](auto stop_token) { return run(stop_token); });
|
thread = std::jthread([this](auto stop_token) { return run(stop_token); });
|
||||||
}
|
}
|
||||||
@@ -721,7 +721,7 @@ void wivrn_session::operator()(from_headset::visibility_mask_changed && mask)
|
|||||||
|
|
||||||
void wivrn_session::operator()(from_headset::session_state_changed && event)
|
void wivrn_session::operator()(from_headset::session_state_changed && event)
|
||||||
{
|
{
|
||||||
assert(server);
|
assert(mnd_ipc_server);
|
||||||
U_LOG_I("Session state changed: %s", xr::to_string(event.state));
|
U_LOG_I("Session state changed: %s", xr::to_string(event.state));
|
||||||
bool visible, focused;
|
bool visible, focused;
|
||||||
switch (event.state)
|
switch (event.state)
|
||||||
@@ -836,7 +836,7 @@ void wivrn_session::operator()(const from_headset::start_app & request)
|
|||||||
|
|
||||||
void wivrn_session::operator()(const from_headset::get_running_applications &)
|
void wivrn_session::operator()(const from_headset::get_running_applications &)
|
||||||
{
|
{
|
||||||
assert(server);
|
assert(mnd_ipc_server);
|
||||||
scoped_lock lock(mnd_ipc_server->global_state.lock);
|
scoped_lock lock(mnd_ipc_server->global_state.lock);
|
||||||
to_headset::running_applications msg{};
|
to_headset::running_applications msg{};
|
||||||
for (auto & t: mnd_ipc_server->threads)
|
for (auto & t: mnd_ipc_server->threads)
|
||||||
@@ -861,7 +861,7 @@ void wivrn_session::operator()(const from_headset::get_running_applications &)
|
|||||||
|
|
||||||
void wivrn_session::operator()(const from_headset::set_active_application & req)
|
void wivrn_session::operator()(const from_headset::set_active_application & req)
|
||||||
{
|
{
|
||||||
assert(server);
|
assert(mnd_ipc_server);
|
||||||
ipc_server_set_active_client(mnd_ipc_server, req.id);
|
ipc_server_set_active_client(mnd_ipc_server, req.id);
|
||||||
ipc_server_update_state(mnd_ipc_server);
|
ipc_server_update_state(mnd_ipc_server);
|
||||||
// Send a refreshed application list
|
// Send a refreshed application list
|
||||||
@@ -870,7 +870,7 @@ void wivrn_session::operator()(const from_headset::set_active_application & req)
|
|||||||
|
|
||||||
void wivrn_session::operator()(const from_headset::stop_application & req)
|
void wivrn_session::operator()(const from_headset::stop_application & req)
|
||||||
{
|
{
|
||||||
assert(server);
|
assert(mnd_ipc_server);
|
||||||
scoped_lock lock(mnd_ipc_server->global_state.lock);
|
scoped_lock lock(mnd_ipc_server->global_state.lock);
|
||||||
for (auto & t: mnd_ipc_server->threads)
|
for (auto & t: mnd_ipc_server->threads)
|
||||||
{
|
{
|
||||||
@@ -1069,7 +1069,7 @@ void wivrn_session::reconnect()
|
|||||||
|
|
||||||
void wivrn_session::poll_session_loss()
|
void wivrn_session::poll_session_loss()
|
||||||
{
|
{
|
||||||
assert(server);
|
assert(mnd_ipc_server);
|
||||||
auto locked = session_loss.lock();
|
auto locked = session_loss.lock();
|
||||||
auto now = os_monotonic_get_ns();
|
auto now = os_monotonic_get_ns();
|
||||||
if (locked->empty())
|
if (locked->empty())
|
||||||
|
|||||||
@@ -197,7 +197,7 @@ video_encoder::video_encoder(uint8_t stream_idx, to_headset::video_stream_descri
|
|||||||
shared_sender(async_send ? sender::get() : nullptr),
|
shared_sender(async_send ? sender::get() : nullptr),
|
||||||
idr(std::move(idr))
|
idr(std::move(idr))
|
||||||
{
|
{
|
||||||
assert(idr);
|
assert(this->idr);
|
||||||
}
|
}
|
||||||
|
|
||||||
video_encoder::~video_encoder()
|
video_encoder::~video_encoder()
|
||||||
|
|||||||
Reference in New Issue
Block a user