Show encoding time in plots
This commit is contained in:
+55
-51
@@ -2,7 +2,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: WiVRn 0.15\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2024-07-25 11:44+0200\n"
|
||||
"POT-Creation-Date: 2024-08-30 08:12+0200\n"
|
||||
"PO-Revision-Date: 2024-05-20 13:00+0200\n"
|
||||
"Last-Translator: Guillaume Meunier <guillaume.meunier@centraliens.net>\n"
|
||||
"Language: French\n"
|
||||
@@ -10,39 +10,39 @@ msgstr ""
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
|
||||
#: client/scenes/lobby.cpp:143
|
||||
#: client/scenes/lobby.cpp:144
|
||||
msgid "No supported swapchain format"
|
||||
msgstr "Aucun format de swapchain supporté"
|
||||
|
||||
#: client/scenes/lobby.cpp:178
|
||||
#: client/scenes/lobby.cpp:179
|
||||
msgid "Incompatible WiVRn server: no protocol field in TXT"
|
||||
msgstr "Serveur WiVRn incompatible : pas de champ protocol dans le TXT"
|
||||
|
||||
#: client/scenes/lobby.cpp:181
|
||||
#: client/scenes/lobby.cpp:182
|
||||
#, c++-format
|
||||
msgid "Incompatible WiVRn server protocol (client: {}, server: {})"
|
||||
msgstr ""
|
||||
"Version du protocole WiVRn du serveur incompatible (client: {}, serveur: {})"
|
||||
|
||||
#: client/scenes/lobby.cpp:196
|
||||
#: client/scenes/lobby.cpp:197
|
||||
#, c++-format
|
||||
msgid "Cannot resolve hostname: {}"
|
||||
msgstr "Impossible de résoudre le nom: {}"
|
||||
|
||||
#: client/scenes/lobby.cpp:235
|
||||
#: client/scenes/lobby.cpp:236
|
||||
#, c++-format
|
||||
msgid "Cannot connect to {} ({}): {}"
|
||||
msgstr "Impossible de se connecter à {} ({}): {}"
|
||||
|
||||
#: client/scenes/lobby.cpp:347
|
||||
#: client/scenes/lobby.cpp:348
|
||||
msgid "Waiting for connection"
|
||||
msgstr "Attente de connexion"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:84
|
||||
#: client/scenes/lobby_gui.cpp:80
|
||||
msgid "Video stream interrupted"
|
||||
msgstr "Flux vidéo interrompu"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:86
|
||||
#: client/scenes/lobby_gui.cpp:82
|
||||
#, c++-format
|
||||
msgid ""
|
||||
"Connection ready\n"
|
||||
@@ -51,32 +51,32 @@ msgstr ""
|
||||
"Connexion prête\n"
|
||||
"Démarrez une application VR sur {}"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:101
|
||||
#: client/scenes/lobby_gui.cpp:97
|
||||
msgid "Close"
|
||||
msgstr "Fermer"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:103
|
||||
#: client/scenes/lobby_gui.cpp:99
|
||||
msgid "Cancel"
|
||||
msgstr "Annuler"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:108
|
||||
#: client/scenes/lobby_gui.cpp:104
|
||||
#, c++-format
|
||||
msgid "Connection to {}"
|
||||
msgstr "Connexion à {}"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:136
|
||||
#: client/scenes/lobby_gui.cpp:132
|
||||
msgid "Displayed name"
|
||||
msgstr "Nom affiché"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:145
|
||||
#: client/scenes/lobby_gui.cpp:141
|
||||
msgid "Host name"
|
||||
msgstr "Nom d'hôte"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:154
|
||||
#: client/scenes/lobby_gui.cpp:150
|
||||
msgid "Port"
|
||||
msgstr "Port"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:218
|
||||
#: client/scenes/lobby_gui.cpp:214
|
||||
msgid ""
|
||||
"Start a WiVRn server on your\n"
|
||||
"local network"
|
||||
@@ -84,139 +84,143 @@ msgstr ""
|
||||
"Démarrez un serveur WiVRn sur\n"
|
||||
"le réseau local"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:247
|
||||
#: client/scenes/lobby_gui.cpp:243
|
||||
msgid "Autoconnect"
|
||||
msgstr "Autoconnexion"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:279
|
||||
#: client/scenes/lobby_gui.cpp:275
|
||||
msgid "Connect"
|
||||
msgstr "Connexion"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:289
|
||||
#: client/scenes/lobby_gui.cpp:285
|
||||
msgid "Incompatible server version"
|
||||
msgstr "Version du serveur incompatible"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:291
|
||||
#: client/scenes/lobby_gui.cpp:287
|
||||
msgid "Server not available"
|
||||
msgstr "Serveur non disponible"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:305
|
||||
#: client/scenes/lobby_gui.cpp:301
|
||||
msgid "Remove"
|
||||
msgstr "Enlever"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:349
|
||||
#: client/scenes/lobby_gui.cpp:346
|
||||
msgid "Refresh rate"
|
||||
msgstr "Taux de rafraichissement"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:371
|
||||
#: client/scenes/lobby_gui.cpp:368
|
||||
msgid "Resolution scale"
|
||||
msgstr "Échelle"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:371 client/scenes/lobby_gui.cpp:375
|
||||
#: client/scenes/lobby_gui.cpp:368 client/scenes/lobby_gui.cpp:372
|
||||
#, c++-format
|
||||
msgid "{} - {}x{} per eye"
|
||||
msgstr "{} - {}x{} par œil"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:386
|
||||
#: client/scenes/lobby_gui.cpp:383
|
||||
msgid "Enable microphone"
|
||||
msgstr "Activer le micro"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:414
|
||||
#: client/scenes/lobby_gui.cpp:392
|
||||
msgid "Enable video passthrough in lobby"
|
||||
msgstr "Activer la vue réelle dans l'accueil"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:422
|
||||
#: client/scenes/lobby_gui.cpp:400
|
||||
msgid "Show performance metrics"
|
||||
msgstr "Afficher les métriques de performances"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:426
|
||||
#: client/scenes/lobby_gui.cpp:404
|
||||
msgid "Overlay can be toggled by pressing both thumbsticks"
|
||||
msgstr "L'affichage peut être basculé en appuyant sur les deux joysticks"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:456 client/scenes/lobby_gui.cpp:464
|
||||
#: client/scenes/stream_stats.cpp:141
|
||||
#: client/scenes/lobby_gui.cpp:434 client/scenes/lobby_gui.cpp:442
|
||||
#: client/scenes/stream_stats.cpp:143
|
||||
msgid "CPU time"
|
||||
msgstr "Temps CPU"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:460
|
||||
#: client/scenes/lobby_gui.cpp:438
|
||||
msgid "CPU time [ms]"
|
||||
msgstr "Temps CPU [ms]"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:470 client/scenes/lobby_gui.cpp:478
|
||||
#: client/scenes/stream_stats.cpp:143
|
||||
#: client/scenes/lobby_gui.cpp:448 client/scenes/lobby_gui.cpp:456
|
||||
#: client/scenes/stream_stats.cpp:145
|
||||
msgid "GPU time"
|
||||
msgstr "Temps GPU"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:474
|
||||
#: client/scenes/lobby_gui.cpp:452
|
||||
msgid "GPU time [ms]"
|
||||
msgstr "Temps GPU [ms]"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:502 client/scenes/lobby_gui.cpp:700
|
||||
#: client/scenes/lobby_gui.cpp:480 client/scenes/lobby_gui.cpp:702
|
||||
msgid "Licenses"
|
||||
msgstr "Licences"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:690
|
||||
#: client/scenes/lobby_gui.cpp:692
|
||||
msgid "Server list"
|
||||
msgstr "Serveurs"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:693
|
||||
#: client/scenes/lobby_gui.cpp:695
|
||||
msgid "Settings"
|
||||
msgstr "Paramètres"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:697
|
||||
#: client/scenes/lobby_gui.cpp:699
|
||||
msgid "About"
|
||||
msgstr "À propos"
|
||||
|
||||
#: client/scenes/lobby_gui.cpp:703
|
||||
#: client/scenes/lobby_gui.cpp:705
|
||||
msgid "Exit"
|
||||
msgstr "Quitter"
|
||||
|
||||
#: client/scenes/stream_stats.cpp:143
|
||||
#: client/scenes/stream_stats.cpp:145
|
||||
msgid "Reproject"
|
||||
msgstr "Reprojection"
|
||||
|
||||
#: client/scenes/stream_stats.cpp:144
|
||||
#: client/scenes/stream_stats.cpp:146
|
||||
msgid "Blit"
|
||||
msgstr "Copie"
|
||||
|
||||
#: client/scenes/stream_stats.cpp:146
|
||||
#: client/scenes/stream_stats.cpp:148
|
||||
msgid "Download"
|
||||
msgstr "Téléchargement"
|
||||
|
||||
#: client/scenes/stream_stats.cpp:147
|
||||
#: client/scenes/stream_stats.cpp:149
|
||||
msgid "Upload"
|
||||
msgstr "Téléversement"
|
||||
|
||||
#: client/scenes/stream_stats.cpp:216
|
||||
#: client/scenes/stream_stats.cpp:218
|
||||
#, c++-format
|
||||
msgid "Decoder {}"
|
||||
msgstr "Décodeur {}"
|
||||
|
||||
#: client/scenes/stream_stats.cpp:228
|
||||
#: client/scenes/stream_stats.cpp:230
|
||||
msgid "Timings [ms]"
|
||||
msgstr "Durées [ms]"
|
||||
|
||||
#: client/scenes/stream_stats.cpp:273
|
||||
#: client/scenes/stream_stats.cpp:285
|
||||
msgid "Encode"
|
||||
msgstr "Encodage"
|
||||
|
||||
#: client/scenes/stream_stats.cpp:286
|
||||
msgid "Send"
|
||||
msgstr "Envoi"
|
||||
|
||||
#: client/scenes/stream_stats.cpp:274
|
||||
#: client/scenes/stream_stats.cpp:287
|
||||
msgid "Receive"
|
||||
msgstr "Réception"
|
||||
|
||||
#: client/scenes/stream_stats.cpp:275
|
||||
#: client/scenes/stream_stats.cpp:288
|
||||
msgid "Decode"
|
||||
msgstr "Décodage"
|
||||
|
||||
#: client/scenes/stream_stats.cpp:276
|
||||
#: client/scenes/stream_stats.cpp:289
|
||||
msgid "Blitted"
|
||||
msgstr "Copie"
|
||||
|
||||
#: client/scenes/stream_stats.cpp:277
|
||||
#: client/scenes/stream_stats.cpp:290
|
||||
msgid "Displayed"
|
||||
msgstr "Affichage"
|
||||
|
||||
#: client/scenes/stream_stats.cpp:293
|
||||
#: client/scenes/stream_stats.cpp:306
|
||||
#, c++-format
|
||||
msgid "Estimated motion to photons latency: {}ms"
|
||||
msgstr "Latence mouvement à photons estimée: {}ms"
|
||||
|
||||
@@ -206,6 +206,8 @@ private:
|
||||
struct decoder_metric
|
||||
{
|
||||
// All times are in seconds relative to encode_begin
|
||||
float encode_begin;
|
||||
float encode_end;
|
||||
float send_begin;
|
||||
float send_end;
|
||||
float received_first_packet;
|
||||
|
||||
@@ -110,6 +110,8 @@ void scenes::stream::accumulate_metrics(XrTime predicted_display_time, const std
|
||||
|
||||
metrics[metrics_offset] = decoder_metric{
|
||||
// clang-format off
|
||||
.encode_begin = (bh->timing_info.encode_begin - min_encode_begin) * 1e-9f,
|
||||
.encode_end = (bh->timing_info.encode_end - min_encode_begin) * 1e-9f,
|
||||
.send_begin = (bh->timing_info.send_begin - min_encode_begin) * 1e-9f,
|
||||
.send_end = (bh->timing_info.send_end - min_encode_begin) * 1e-9f,
|
||||
.received_first_packet = (bh->feedback.received_first_packet - min_encode_begin) * 1e-9f,
|
||||
@@ -229,6 +231,16 @@ XrCompositionLayerQuad scenes::stream::plot_performance_metrics(XrTime predicted
|
||||
ImPlot::SetupAxes(nullptr, title_with_units.c_str(), ImPlotAxisFlags_NoDecorations, 0);
|
||||
ImPlot::SetupAxesLimits(0, metrics.size() - 1, min_v * 1e3f, axis_scale[n] * 1e3f, ImGuiCond_Always);
|
||||
|
||||
getter_data getter_encode_begin{
|
||||
.data = (uintptr_t) & (metrics.data()->encode_begin),
|
||||
.stride = sizeof(decoder_metric),
|
||||
.multiplier = 1e3f};
|
||||
|
||||
getter_data getter_encode_end{
|
||||
.data = (uintptr_t) & (metrics.data()->encode_end),
|
||||
.stride = sizeof(decoder_metric),
|
||||
.multiplier = 1e3f};
|
||||
|
||||
getter_data getter_send_begin{
|
||||
.data = (uintptr_t) & (metrics.data()->send_begin),
|
||||
.stride = sizeof(decoder_metric),
|
||||
@@ -270,6 +282,7 @@ XrCompositionLayerQuad scenes::stream::plot_performance_metrics(XrTime predicted
|
||||
.multiplier = 1e3f};
|
||||
|
||||
// clang-format off
|
||||
ImPlot::PlotShadedG(_S("Encode"), getter, &getter_encode_begin, getter, &getter_encode_end, metrics.size());
|
||||
ImPlot::PlotShadedG(_S("Send"), getter, &getter_send_begin, getter, &getter_send_end, metrics.size());
|
||||
ImPlot::PlotShadedG(_S("Receive"), getter, &getter_received_first_packet, getter, &getter_received_last_packet, metrics.size());
|
||||
ImPlot::PlotShadedG(_S("Decode"), getter, &getter_sent_to_decoder, getter, &getter_received_from_decoder, metrics.size());
|
||||
|
||||
@@ -327,6 +327,7 @@ public:
|
||||
struct timing_info_t
|
||||
{
|
||||
XrTime encode_begin;
|
||||
XrTime encode_end;
|
||||
XrTime send_begin;
|
||||
XrTime send_end;
|
||||
};
|
||||
|
||||
@@ -187,7 +187,9 @@ void VideoEncoder::Encode(wivrn_session & cnx,
|
||||
const char * extra = idr ? ",idr" : ",p";
|
||||
clock = cnx.get_offset();
|
||||
|
||||
timing_info.encode_begin = clock.to_headset(os_monotonic_get_ns());
|
||||
timing_info = {
|
||||
.encode_begin = clock.to_headset(os_monotonic_get_ns()),
|
||||
};
|
||||
cnx.dump_time("encode_begin", frame_index, os_monotonic_get_ns(), stream_idx, extra);
|
||||
|
||||
// Prepare the video shard template
|
||||
@@ -198,19 +200,24 @@ void VideoEncoder::Encode(wivrn_session & cnx,
|
||||
shard.timing_info.reset();
|
||||
|
||||
auto data = encode(idr, target_timestamp);
|
||||
cnx.dump_time("encode_end", frame_index, os_monotonic_get_ns(), stream_idx, extra);
|
||||
if (data)
|
||||
{
|
||||
timing_info.encode_end = clock.to_headset(os_monotonic_get_ns());
|
||||
assert(shared_sender);
|
||||
shared_sender->push(std::move(*data));
|
||||
}
|
||||
cnx.dump_time("encode_end", frame_index, os_monotonic_get_ns(), stream_idx, extra);
|
||||
}
|
||||
|
||||
void VideoEncoder::SendData(std::span<uint8_t> data, bool end_of_frame)
|
||||
{
|
||||
std::lock_guard lock(mutex);
|
||||
if (end_of_frame)
|
||||
{
|
||||
timing_info.send_end = clock.to_headset(os_monotonic_get_ns());
|
||||
if (not timing_info.encode_end)
|
||||
timing_info.encode_end = timing_info.send_end;
|
||||
}
|
||||
if (video_dump)
|
||||
video_dump.write((char *)data.data(), data.size());
|
||||
if (shard.shard_idx == 0)
|
||||
|
||||
Reference in New Issue
Block a user