idk attempt to add ffmpeg?
This commit is contained in:
parent
469837ca8e
commit
609d2af90b
4 changed files with 210 additions and 31 deletions
158
Cargo.lock
generated
158
Cargo.lock
generated
|
@ -8,6 +8,26 @@ version = "1.1.0"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa"
|
||||
|
||||
[[package]]
|
||||
name = "bindgen"
|
||||
version = "0.64.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c4243e6031260db77ede97ad86c27e501d646a27ab57b59a574f725d98ab1fb4"
|
||||
dependencies = [
|
||||
"bitflags",
|
||||
"cexpr",
|
||||
"clang-sys",
|
||||
"lazy_static",
|
||||
"lazycell",
|
||||
"peeking_take_while",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"regex",
|
||||
"rustc-hash",
|
||||
"shlex",
|
||||
"syn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "bitflags"
|
||||
version = "1.3.2"
|
||||
|
@ -23,6 +43,15 @@ dependencies = [
|
|||
"jobserver",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "cexpr"
|
||||
version = "0.6.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766"
|
||||
dependencies = [
|
||||
"nom",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "cfg-if"
|
||||
version = "1.0.0"
|
||||
|
@ -38,6 +67,17 @@ dependencies = [
|
|||
"once_cell",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "clang-sys"
|
||||
version = "1.6.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c688fc74432808e3eb684cae8830a86be1d66a2bd58e1f248ed0960a590baf6f"
|
||||
dependencies = [
|
||||
"glob",
|
||||
"libc",
|
||||
"libloading",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "codespan-reporting"
|
||||
version = "0.11.1"
|
||||
|
@ -236,6 +276,31 @@ version = "1.8.0"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "90e5c1c8368803113bf0c9584fc495a58b86dc8a29edbf8fe877d21d9507e797"
|
||||
|
||||
[[package]]
|
||||
name = "ffmpeg-sys-the-third"
|
||||
version = "1.1.1+ffmpeg-6.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "94a4b2e9c02074c0ee85661b23b3ac849bad6afc554b503c183975f5e2e0d3de"
|
||||
dependencies = [
|
||||
"bindgen",
|
||||
"cc",
|
||||
"libc",
|
||||
"num_cpus",
|
||||
"pkg-config",
|
||||
"vcpkg",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "ffmpeg-the-third"
|
||||
version = "1.2.2+ffmpeg-6.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "301c55f432cce71d0cc5266e8e70e69cc7a865f8aa8785c44cb56c3935a13715"
|
||||
dependencies = [
|
||||
"bitflags",
|
||||
"ffmpeg-sys-the-third",
|
||||
"libc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "getrandom"
|
||||
version = "0.2.8"
|
||||
|
@ -247,12 +312,27 @@ dependencies = [
|
|||
"wasi",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "glob"
|
||||
version = "0.3.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b"
|
||||
|
||||
[[package]]
|
||||
name = "hashbrown"
|
||||
version = "0.12.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888"
|
||||
|
||||
[[package]]
|
||||
name = "hermit-abi"
|
||||
version = "0.2.6"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ee512640fe35acbfb4bb779db6f0d80704c2cacfa2e39b601ef3e3f47d1ae4c7"
|
||||
dependencies = [
|
||||
"libc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "indexmap"
|
||||
version = "1.9.2"
|
||||
|
@ -287,12 +367,34 @@ dependencies = [
|
|||
"libc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "lazy_static"
|
||||
version = "1.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
|
||||
|
||||
[[package]]
|
||||
name = "lazycell"
|
||||
version = "1.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55"
|
||||
|
||||
[[package]]
|
||||
name = "libc"
|
||||
version = "0.2.138"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "db6d7e329c562c5dfab7a46a2afabc8b987ab9a4834c9d1ca04dc54c1546cef8"
|
||||
|
||||
[[package]]
|
||||
name = "libloading"
|
||||
version = "0.7.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b67380fd3b2fbe7527a606e18729d21c6f3951633d0500574c4dc22d2d638b9f"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"winapi",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "libre-presenter"
|
||||
version = "0.1.0"
|
||||
|
@ -304,6 +406,7 @@ dependencies = [
|
|||
"cxx-qt-build",
|
||||
"cxx-qt-lib",
|
||||
"dirs",
|
||||
"ffmpeg-the-third",
|
||||
"serde",
|
||||
"serde_derive",
|
||||
]
|
||||
|
@ -345,12 +448,34 @@ dependencies = [
|
|||
"minimal-lexical",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "num_cpus"
|
||||
version = "1.15.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0fac9e2da13b5eb447a6ce3d392f23a29d8694bff781bf03a16cd9ac8697593b"
|
||||
dependencies = [
|
||||
"hermit-abi",
|
||||
"libc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "once_cell"
|
||||
version = "1.16.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "86f0b0d4bf799edbc74508c1e8bf170ff5f41238e5f8225603ca7caaae2b7860"
|
||||
|
||||
[[package]]
|
||||
name = "peeking_take_while"
|
||||
version = "0.1.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099"
|
||||
|
||||
[[package]]
|
||||
name = "pkg-config"
|
||||
version = "0.3.26"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6ac9a59f73473f1b8d852421e59e64809f025994837ef743615c6d0c5b305160"
|
||||
|
||||
[[package]]
|
||||
name = "proc-macro2"
|
||||
version = "1.0.47"
|
||||
|
@ -399,6 +524,27 @@ dependencies = [
|
|||
"thiserror",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "regex"
|
||||
version = "1.7.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8b1f693b24f6ac912f4893ef08244d70b6067480d2f1a46e950c9691e6749d1d"
|
||||
dependencies = [
|
||||
"regex-syntax",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "regex-syntax"
|
||||
version = "0.6.29"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1"
|
||||
|
||||
[[package]]
|
||||
name = "rustc-hash"
|
||||
version = "1.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2"
|
||||
|
||||
[[package]]
|
||||
name = "ryu"
|
||||
version = "1.0.12"
|
||||
|
@ -440,6 +586,12 @@ dependencies = [
|
|||
"yaml-rust",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "shlex"
|
||||
version = "1.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "43b2853a4d09f215c24cc5489c992ce46052d359b5109343cbafbf26bc62f8a3"
|
||||
|
||||
[[package]]
|
||||
name = "syn"
|
||||
version = "1.0.105"
|
||||
|
@ -498,6 +650,12 @@ version = "0.1.10"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b"
|
||||
|
||||
[[package]]
|
||||
name = "vcpkg"
|
||||
version = "0.2.15"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426"
|
||||
|
||||
[[package]]
|
||||
name = "versions"
|
||||
version = "4.1.0"
|
||||
|
|
|
@ -22,6 +22,7 @@ cxx-qt = "0.5.0"
|
|||
cxx-qt-lib = "0.5.0"
|
||||
# home = "0.5.4"
|
||||
dirs = "5.0.0"
|
||||
ffmpeg-the-third = "1.2.2"
|
||||
|
||||
# cxx-qt-build generates C++ code from the `#[cxx_qt::bridge]` module
|
||||
# and compiles it together with the Rust static library
|
||||
|
|
|
@ -266,7 +266,7 @@ FocusScope {
|
|||
cacheBuffer: 800
|
||||
reuseItems: true
|
||||
clip: true
|
||||
model: SlideModel
|
||||
model: SlideMod
|
||||
delegate: Presenter.PreviewSlideListDelegate { showVidBG: false }
|
||||
|
||||
Kirigami.WheelHandler {
|
||||
|
|
|
@ -105,6 +105,16 @@ mod slide_model {
|
|||
// }
|
||||
// }
|
||||
|
||||
#[qinvokable]
|
||||
pub fn video_thumbnail(
|
||||
mut self: Pin<&mut Self>,
|
||||
video: QString,
|
||||
service_item_id: i32,
|
||||
index: i32,
|
||||
) -> QString {
|
||||
QString::default()
|
||||
}
|
||||
|
||||
#[qinvokable]
|
||||
pub fn clear(mut self: Pin<&mut Self>) {
|
||||
unsafe {
|
||||
|
@ -396,46 +406,56 @@ mod slide_model {
|
|||
if !idx.is_valid() {
|
||||
return qvariantmap;
|
||||
}
|
||||
let rn = self.as_ref().role_names();
|
||||
let rn_iter = rn.iter();
|
||||
if let Some(slide) = self.rust().slides.get(index as usize) {
|
||||
qvariantmap.insert(QString::from("text"), QVariant::from(&slide.text));
|
||||
qvariantmap.insert(QString::from("type"), QVariant::from(&slide.ty));
|
||||
qvariantmap.insert(QString::from("audio"), QVariant::from(&slide.audio));
|
||||
for i in rn_iter {
|
||||
qvariantmap.insert(
|
||||
QString::from("imageBackground"),
|
||||
QVariant::from(&slide.image_background),
|
||||
QString::from(&i.1.to_string()),
|
||||
self.as_ref().data(&idx, *i.0),
|
||||
);
|
||||
qvariantmap.insert(
|
||||
QString::from("videoBackground"),
|
||||
QVariant::from(&slide.video_background),
|
||||
);
|
||||
qvariantmap.insert(QString::from("font"), QVariant::from(&slide.font));
|
||||
qvariantmap.insert(QString::from("fontSize"), QVariant::from(&slide.font_size));
|
||||
qvariantmap.insert(
|
||||
QString::from("horizontalTextAlignment"),
|
||||
QVariant::from(&slide.htext_alignment),
|
||||
);
|
||||
qvariantmap.insert(
|
||||
QString::from("verticalTextAlignment"),
|
||||
QVariant::from(&slide.vtext_alignment),
|
||||
);
|
||||
qvariantmap.insert(
|
||||
QString::from("serviceItemId"),
|
||||
QVariant::from(&slide.service_item_id),
|
||||
);
|
||||
qvariantmap.insert(QString::from("loop"), QVariant::from(&slide.looping));
|
||||
qvariantmap.insert(QString::from("active"), QVariant::from(&slide.active));
|
||||
qvariantmap.insert(QString::from("selected"), QVariant::from(&slide.selected));
|
||||
}
|
||||
// qvariantmap.insert(QString::from("text"), QVariant::from(&slide.text));
|
||||
// qvariantmap.insert(QString::from("type"), QVariant::from(&slide.ty));
|
||||
// qvariantmap.insert(QString::from("audio"), QVariant::from(&slide.audio));
|
||||
// qvariantmap.insert(
|
||||
// QString::from("imageBackground"),
|
||||
// QVariant::from(&slide.image_background),
|
||||
// );
|
||||
// qvariantmap.insert(
|
||||
// QString::from("videoBackground"),
|
||||
// QVariant::from(&slide.video_background),
|
||||
// );
|
||||
// qvariantmap.insert(QString::from("font"), QVariant::from(&slide.font));
|
||||
// qvariantmap.insert(QString::from("fontSize"), QVariant::from(&slide.font_size));
|
||||
// qvariantmap.insert(
|
||||
// QString::from("horizontalTextAlignment"),
|
||||
// QVariant::from(&slide.htext_alignment),
|
||||
// );
|
||||
// qvariantmap.insert(
|
||||
// QString::from("verticalTextAlignment"),
|
||||
// QVariant::from(&slide.vtext_alignment),
|
||||
// );
|
||||
// qvariantmap.insert(
|
||||
// QString::from("serviceItemId"),
|
||||
// QVariant::from(&slide.service_item_id),
|
||||
// );
|
||||
// qvariantmap.insert(QString::from("loop"), QVariant::from(&slide.looping));
|
||||
// qvariantmap.insert(QString::from("active"), QVariant::from(&slide.active));
|
||||
// qvariantmap.insert(QString::from("selected"), QVariant::from(&slide.selected));
|
||||
};
|
||||
qvariantmap
|
||||
}
|
||||
|
||||
#[qinvokable]
|
||||
pub fn activate(mut self: Pin<&mut Self>, index: i32) -> bool {
|
||||
for i in self.as_ref().rust().slides.iter() {
|
||||
println!("idk");
|
||||
for i in self.as_mut().slides_mut().iter_mut() {
|
||||
println!("slide is deactivating {:?}", i);
|
||||
i.active = false;
|
||||
}
|
||||
if let Some(slide) = self.as_mut().slides_mut().get_mut(index as usize) {
|
||||
slide.active = true;
|
||||
println!("slide is activating {:?}", slide);
|
||||
true
|
||||
} else {
|
||||
false
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue