added tracking message type
This commit is contained in:
parent
ffe25b54d2
commit
c5050c8e99
2 changed files with 15 additions and 1 deletions
|
@ -15,10 +15,14 @@ use webrtc::peer_connection::sdp::session_description::RTCSessionDescription;
|
||||||
use webrtc::ice_transport::ice_candidate::{RTCIceCandidate, RTCIceCandidateInit};
|
use webrtc::ice_transport::ice_candidate::{RTCIceCandidate, RTCIceCandidateInit};
|
||||||
|
|
||||||
mod boxes;
|
mod boxes;
|
||||||
|
mod tracking_events;
|
||||||
|
|
||||||
use boxes::NormalizedBoxCoords;
|
use boxes::NormalizedBoxCoords;
|
||||||
|
use tracking_events::TrackingUpdate;
|
||||||
|
|
||||||
pub mod types {
|
pub mod types {
|
||||||
pub use crate::boxes::NormalizedBoxCoords;
|
pub use crate::boxes::NormalizedBoxCoords;
|
||||||
|
pub use crate::tracking_events::TrackingUpdate;
|
||||||
}
|
}
|
||||||
|
|
||||||
static MAX_MESSAGE: usize = 50;
|
static MAX_MESSAGE: usize = 50;
|
||||||
|
@ -32,7 +36,7 @@ pub enum ApplicationMessage {
|
||||||
NameRequest(Option<String>),
|
NameRequest(Option<String>),
|
||||||
|
|
||||||
ChangeTrackingID(u16),
|
ChangeTrackingID(u16),
|
||||||
TrackingBoxes(Vec<NormalizedBoxCoords>),
|
TrackingBoxes(TrackingUpdate),
|
||||||
ManualMovementOverride((i32, i32)),
|
ManualMovementOverride((i32, i32)),
|
||||||
|
|
||||||
WebRTCPacket(RTCSessionDescription),
|
WebRTCPacket(RTCSessionDescription),
|
||||||
|
|
10
src/tracking_events.rs
Normal file
10
src/tracking_events.rs
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
use serde::{Serialize, Deserialize};
|
||||||
|
|
||||||
|
use crate::NormalizedBoxCoords;
|
||||||
|
|
||||||
|
|
||||||
|
#[derive(Serialize, Deserialize, Debug, Clone)]
|
||||||
|
pub struct TrackingUpdate {
|
||||||
|
target_id: Option<u16>,
|
||||||
|
boxes: Vec<NormalizedBoxCoords>
|
||||||
|
}
|
Loading…
Reference in a new issue