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