Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/alphabetic-order' into alphabeti…
Browse files Browse the repository at this point in the history
…c-order
  • Loading branch information
damian-tworek committed Dec 18, 2023
2 parents 53adbc2 + a06430b commit b592751
Show file tree
Hide file tree
Showing 19 changed files with 634 additions and 173 deletions.
48 changes: 48 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ tokio = { version = "1", features = [ "full" ] }
tokio-stream = "0.1"
warp = "0.3"
futures-util = "0.3"
pcap = "1.0.0"
pcap = { version = "1.0.0", features = ["capture-stream"]}
etherparse = "0.13.0"
clap = { version = "4", features = ["derive"] }

Expand Down
11 changes: 11 additions & 0 deletions client/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 10 additions & 4 deletions client/src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ use eframe::egui;
use egui::{ComboBox, Ui};
use ewebsock::{WsEvent, WsMessage, WsReceiver, WsSender};
use log::{error, warn};
use rtpeeker_common::{Request, Response, Source};
use rtpeeker_common::{Request, Response, Source, StreamKey};

use packets_table::PacketsTable;
use rtcp_packets_table::RtcpPacketsTable;
use rtp_packets_table::RtpPacketsTable;
use rtp_streams_table::RtpStreamsTable;
use tab::Tab;

use crate::streams::{RefStreams, StreamKey};
use crate::streams::RefStreams;
use rtp_streams_plot::RtpStreamsPlot;

mod packets_table;
Expand Down Expand Up @@ -79,7 +79,7 @@ impl App {
let packets_table = PacketsTable::new(streams.clone(), ws_sender.clone());
let rtp_packets_table = RtpPacketsTable::new(streams.clone());
let rtcp_packets_table = RtcpPacketsTable::new(streams.clone());
let rtp_streams_table = RtpStreamsTable::new(streams.clone());
let rtp_streams_table = RtpStreamsTable::new(streams.clone(), ws_sender.clone());
let rtp_streams_plot = RtpStreamsPlot::new(streams.clone());

let (tab, selected_source) = get_initial_state(cc);
Expand Down Expand Up @@ -244,7 +244,7 @@ impl App {
};

let Ok(response) = Response::decode(&msg) else {
error!("Failed to decode request message");
error!("Failed to decode response message");
continue;
};

Expand All @@ -263,6 +263,12 @@ impl App {
}
self.sources = sources;
}
Response::Sdp(stream_key, sdp) => {
let mut streams = self.streams.borrow_mut();
if let Some(stream) = streams.streams.get_mut(&stream_key) {
stream.add_sdp(sdp);
}
}
}
}
}
Expand Down
13 changes: 2 additions & 11 deletions client/src/app/rtp_packets_table.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
use super::is_stream_visible;
use crate::streams::{RefStreams, StreamKey};
use crate::streams::RefStreams;
use eframe::epaint::Color32;
use egui::RichText;
use egui_extras::{Column, TableBody, TableBuilder};
use rtpeeker_common::packet::SessionPacket;
use rtpeeker_common::StreamKey;
use std::collections::HashMap;

pub struct RtpPacketsTable {
Expand Down Expand Up @@ -166,17 +167,7 @@ impl RtpPacketsTable {
resp.on_hover_text(rtp_packet.payload_type.to_string());

row.col(|ui| {
// if rtp_packet.previous_packet_is_lost {
// let resp = ui.label(
// RichText::from(format!("{} ⚠", rtp_packet.sequence_number))
// .color(Color32::GOLD),
// );
// resp.on_hover_text(
// RichText::from("Previous packet is lost!").color(Color32::GOLD),
// );
// } else {
ui.label(rtp_packet.sequence_number.to_string());
// }
});

row.col(|ui| {
Expand Down
Loading

0 comments on commit b592751

Please sign in to comment.