Show server error on GUI (encoders currently)
This commit is contained in:
@@ -326,6 +326,10 @@ static bool comp_wivrn_init_post_vulkan(struct comp_target * ct, uint32_t prefer
|
||||
}
|
||||
catch (const std::exception & e)
|
||||
{
|
||||
wivrn_ipc_socket_monado->send(from_monado::server_error{
|
||||
.where = "Error creating encoder",
|
||||
.message = e.what(),
|
||||
});
|
||||
U_LOG_E("Failed to create video encoder: %s", e.what());
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -534,6 +534,9 @@ gboolean control_received(gint fd, GIOCondition condition, gpointer user_data)
|
||||
[&](const from_monado::bitrate_changed & value) {
|
||||
wivrn_server_set_bitrate(dbus_server, value.bitrate_bps);
|
||||
},
|
||||
[&](const from_monado::server_error & e) {
|
||||
wivrn_server_emit_server_error(dbus_server, e.where.c_str(), e.message.c_str());
|
||||
},
|
||||
},
|
||||
*packet);
|
||||
}
|
||||
|
||||
+8
-1
@@ -47,12 +47,19 @@ struct bitrate_changed
|
||||
uint32_t bitrate_bps;
|
||||
};
|
||||
|
||||
struct server_error
|
||||
{
|
||||
std::string where;
|
||||
std::string message;
|
||||
};
|
||||
|
||||
using packets = std::variant<
|
||||
wivrn::from_headset::headset_info_packet,
|
||||
wivrn::from_headset::start_app,
|
||||
headset_connected,
|
||||
headset_disconnected,
|
||||
bitrate_changed>;
|
||||
bitrate_changed,
|
||||
server_error>;
|
||||
} // namespace from_monado
|
||||
|
||||
namespace to_monado
|
||||
|
||||
Reference in New Issue
Block a user