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