camera core add
This commit is contained in:
parent
cd56d6f1be
commit
394b842e49
@ -26,17 +26,24 @@ impl CameraCapture {
|
||||
// (NVIDIA → VA-API → software x264).
|
||||
let (enc, kf_prop, kf_val) = Self::choose_encoder();
|
||||
tracing::info!("📸 using encoder element: {enc}");
|
||||
let have_nvvidconv = gst::ElementFactory::find("nvvidconv").is_some();
|
||||
let (src_caps, preenc) = match enc {
|
||||
"nvh264enc" => (
|
||||
"video/x-raw(memory:NVMM),format=NV12,width=1280,height=720",
|
||||
"nvvidconv !"
|
||||
),
|
||||
"vaapih264enc" => (
|
||||
"video/x-raw,format=NV12,width=1280,height=720",
|
||||
"videoconvert !"
|
||||
),
|
||||
_ => ("video/x-raw,width=1280,height=720", "videoconvert !"),
|
||||
};
|
||||
// ───────────────────────────────────────────────────────────────────
|
||||
// Jetson (has nvvidconv) Desktop (falls back to videoconvert)
|
||||
// ───────────────────────────────────────────────────────────────────
|
||||
"nvh264enc" if have_nvvidconv =>
|
||||
("video/x-raw(memory:NVMM),format=NV12,width=1280,height=720",
|
||||
"nvvidconv !"),
|
||||
"nvh264enc" /* else */ =>
|
||||
("video/x-raw,format=NV12,width=1280,height=720",
|
||||
"videoconvert !"),
|
||||
"vaapih264enc" =>
|
||||
("video/x-raw,format=NV12,width=1280,height=720",
|
||||
"videoconvert !"),
|
||||
_ =>
|
||||
("video/x-raw,width=1280,height=720",
|
||||
"videoconvert !"),
|
||||
};
|
||||
|
||||
// let desc = format!(
|
||||
// "v4l2src device={dev} do-timestamp=true ! {raw_caps},width=1280,height=720 ! \
|
||||
|
||||
@ -122,7 +122,7 @@ After=network.target lesavka-core.service
|
||||
[Service]
|
||||
ExecStart=/usr/local/bin/lesavka-server
|
||||
Restart=always
|
||||
Environment=RUST_LOG=lesavka_server=info,lesavka_server::audio=trace,lesavka_server::video=trace,lesavka_server::gadget=info
|
||||
Environment=RUST_LOG=lesavka_server=info,lesavka_server::audio=info,lesavka_server::video=debug,lesavka_server::gadget=info
|
||||
Environment=RUST_BACKTRACE=1
|
||||
Environment=GST_DEBUG="*:2,alsasink:6,alsasrc:6"
|
||||
Restart=always
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user