AV fix
This commit is contained in:
parent
6e107bb136
commit
e62f588cf5
@ -45,9 +45,7 @@ pub async fn eye_ball(
|
||||
gst::init().context("gst init")?;
|
||||
|
||||
let desc = format!(
|
||||
// Elementary H‑264 stream coming straight from the UVC device –‑
|
||||
// no MPEG‑TS container, so no tsdemux.
|
||||
"v4l2src device=\"{dev}\" io-mode=mmap do-timestamp=true ! \
|
||||
"v4l2src name=cam_{eye} device=\"{dev}\" io-mode=mmap do-timestamp=true ! \
|
||||
queue ! \
|
||||
h264parse disable-passthrough=true config-interval=-1 ! \
|
||||
video/x-h264,stream-format=byte-stream,alignment=au ! \
|
||||
@ -80,21 +78,22 @@ pub async fn eye_ball(
|
||||
|
||||
/* ----- BUS WATCH: show errors & warnings immediately --------------- */
|
||||
let bus = pipeline.bus().expect("bus");
|
||||
let src_pad = pipeline
|
||||
.by_name("v4l2src1") // adapt: eye‑specific element name
|
||||
.unwrap()
|
||||
.static_pad("src")
|
||||
.unwrap();
|
||||
|
||||
src_pad.add_probe(gst::PadProbeType::EVENT_DOWNSTREAM, |pad, info| {
|
||||
if let Some(gst::PadProbeData::Event(ref ev)) = info.data {
|
||||
if let gst::EventView::Caps(c) = ev.view() {
|
||||
trace!(target:"lesavka_server::video",
|
||||
?c, "🔍 new caps on {}", pad.name());
|
||||
if let Some(src_pad) = pipeline.by_name(&format!("cam_{eye}"))
|
||||
.and_then(|e| e.static_pad("src")) {
|
||||
src_pad.add_probe(gst::PadProbeType::EVENT_DOWNSTREAM, |pad, info| {
|
||||
if let Some(gst::PadProbeData::Event(ref ev)) = info.data {
|
||||
if let gst::EventView::Caps(c) = ev.view() {
|
||||
trace!(target:"lesavka_server::video",
|
||||
?c, "🔍 new caps on {}", pad.name());
|
||||
}
|
||||
}
|
||||
}
|
||||
gst::PadProbeReturn::Ok
|
||||
});
|
||||
gst::PadProbeReturn::Ok
|
||||
});
|
||||
} else {
|
||||
warn!(target:"lesavka_server::video",
|
||||
eye = %eye,
|
||||
"🍪 cam_{eye} not found – skipping pad‑probe");
|
||||
}
|
||||
|
||||
let eye_clone = eye.to_owned();
|
||||
std::thread::spawn(move || {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user