mirror of
https://gitlab.freedesktop.org/dabrain34/GstPipelineStudio.git
synced 2024-11-25 02:21:00 +00:00
gps: fix typos and format detected by pre-commit
This commit is contained in:
parent
3e15b7cecb
commit
9c8a578e05
9 changed files with 48 additions and 37 deletions
|
@ -7,26 +7,39 @@ import shutil
|
||||||
|
|
||||||
env = os.environ
|
env = os.environ
|
||||||
|
|
||||||
MESON_BUILD_ROOT=sys.argv[1]
|
MESON_BUILD_ROOT = sys.argv[1]
|
||||||
MESON_SOURCE_ROOT=sys.argv[2]
|
MESON_SOURCE_ROOT = sys.argv[2]
|
||||||
CARGO_TARGET_DIR = os.path.join (MESON_BUILD_ROOT, "target")
|
CARGO_TARGET_DIR = os.path.join(MESON_BUILD_ROOT, "target")
|
||||||
env["CARGO_TARGET_DIR"] = CARGO_TARGET_DIR
|
env["CARGO_TARGET_DIR"] = CARGO_TARGET_DIR
|
||||||
env["CARGO_HOME"] = os.path.join (CARGO_TARGET_DIR, "cargo-home")
|
env["CARGO_HOME"] = os.path.join(CARGO_TARGET_DIR, "cargo-home")
|
||||||
OUTPUT=sys.argv[3]
|
OUTPUT = sys.argv[3]
|
||||||
BUILDTYPE=sys.argv[4]
|
BUILDTYPE = sys.argv[4]
|
||||||
APP_BIN=sys.argv[5]
|
APP_BIN = sys.argv[5]
|
||||||
env["PKG_CONFIG_PATH"] = os.path.join(MESON_BUILD_ROOT, "meson-uninstalled") + os.pathsep + env.get("PKG_CONFIG_PATH",'')
|
env["PKG_CONFIG_PATH"] = (
|
||||||
|
os.path.join(MESON_BUILD_ROOT, "meson-uninstalled")
|
||||||
|
+ os.pathsep
|
||||||
|
+ env.get("PKG_CONFIG_PATH", "")
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
if BUILDTYPE == "release":
|
if BUILDTYPE == "release":
|
||||||
print("RELEASE MODE")
|
print("RELEASE MODE")
|
||||||
CMD = ['cargo', 'build', '--manifest-path', os.path.join(MESON_SOURCE_ROOT, 'Cargo.toml'), '--release']
|
CMD = [
|
||||||
|
"cargo",
|
||||||
|
"build",
|
||||||
|
"--manifest-path",
|
||||||
|
os.path.join(MESON_SOURCE_ROOT, "Cargo.toml"),
|
||||||
|
"--release",
|
||||||
|
]
|
||||||
subprocess.run(CMD, env=env)
|
subprocess.run(CMD, env=env)
|
||||||
shutil.copy2(os.path.join(CARGO_TARGET_DIR, "release", APP_BIN), OUTPUT)
|
shutil.copy2(os.path.join(CARGO_TARGET_DIR, "release", APP_BIN), OUTPUT)
|
||||||
else:
|
else:
|
||||||
print("DEBUG MODE")
|
print("DEBUG MODE")
|
||||||
CMD = ['cargo', 'build', '--manifest-path', os.path.join(MESON_SOURCE_ROOT, 'Cargo.toml')]
|
CMD = [
|
||||||
|
"cargo",
|
||||||
|
"build",
|
||||||
|
"--manifest-path",
|
||||||
|
os.path.join(MESON_SOURCE_ROOT, "Cargo.toml"),
|
||||||
|
]
|
||||||
subprocess.run(CMD, env=env)
|
subprocess.run(CMD, env=env)
|
||||||
shutil.copy2(os.path.join(CARGO_TARGET_DIR, "debug", APP_BIN), OUTPUT)
|
shutil.copy2(os.path.join(CARGO_TARGET_DIR, "debug", APP_BIN), OUTPUT)
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -3,19 +3,17 @@
|
||||||
from os import environ, path
|
from os import environ, path
|
||||||
from subprocess import call
|
from subprocess import call
|
||||||
|
|
||||||
prefix = environ.get('MESON_INSTALL_PREFIX', '/usr/local')
|
prefix = environ.get("MESON_INSTALL_PREFIX", "/usr/local")
|
||||||
datadir = path.join(prefix, 'share')
|
datadir = path.join(prefix, "share")
|
||||||
destdir = environ.get('DESTDIR', '')
|
destdir = environ.get("DESTDIR", "")
|
||||||
|
|
||||||
# Package managers set this so we don't need to run
|
# Package managers set this so we don't need to run
|
||||||
if not destdir:
|
if not destdir:
|
||||||
print('Updating icon cache...')
|
print("Updating icon cache...")
|
||||||
call(['gtk-update-icon-cache', '-qtf', path.join(datadir, 'icons', 'hicolor')])
|
call(["gtk-update-icon-cache", "-qtf", path.join(datadir, "icons", "hicolor")])
|
||||||
|
|
||||||
print('Updating desktop database...')
|
|
||||||
call(['update-desktop-database', '-q', path.join(datadir, 'applications')])
|
|
||||||
|
|
||||||
print('Compiling GSettings schemas...')
|
|
||||||
call(['glib-compile-schemas', path.join(datadir, 'glib-2.0', 'schemas')])
|
|
||||||
|
|
||||||
|
print("Updating desktop database...")
|
||||||
|
call(["update-desktop-database", "-q", path.join(datadir, "applications")])
|
||||||
|
|
||||||
|
print("Compiling GSettings schemas...")
|
||||||
|
call(["glib-compile-schemas", path.join(datadir, "glib-2.0", "schemas")])
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
GstPipelineStudio Website
|
GstPipelineStudio Website
|
||||||
====================
|
====================
|
||||||
|
|
||||||
shamelessy stolen CSS from Pipewire
|
shamelessly stolen CSS from Pipewire
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@ test_ok() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# depenency library:
|
# dependency library:
|
||||||
# Make a .app file: https://gist.github.com/oubiwann/453744744da1141ccc542ff75b47e0cf
|
# Make a .app file: https://gist.github.com/oubiwann/453744744da1141ccc542ff75b47e0cf
|
||||||
# Make a .dmg file: https://github.com/LinusU/node-appdmg
|
# Make a .dmg file: https://github.com/LinusU/node-appdmg
|
||||||
# Can't find library: https://www.jianshu.com/p/441a7553700f
|
# Can't find library: https://www.jianshu.com/p/441a7553700f
|
||||||
|
@ -65,7 +65,7 @@ function lib_dependency_copy
|
||||||
if [[ '@loader_path' == ${lib:0:12} ]]; then
|
if [[ '@loader_path' == ${lib:0:12} ]]; then
|
||||||
cp -n "${lib/@loader_path/$lib_dir}" $folder
|
cp -n "${lib/@loader_path/$lib_dir}" $folder
|
||||||
else
|
else
|
||||||
echo "Unsupport path: $lib"
|
echo "Unsupported path: $lib"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
if [[ $lib != $target ]]; then
|
if [[ $lib != $target ]]; then
|
||||||
|
|
|
@ -31,7 +31,7 @@ function lib_change_path
|
||||||
# This is a simple wrapper around install_name_tool to reduce the
|
# This is a simple wrapper around install_name_tool to reduce the
|
||||||
# number of arguments (like $source does not have to be provided
|
# number of arguments (like $source does not have to be provided
|
||||||
# here as it can be deducted from $target).
|
# here as it can be deducted from $target).
|
||||||
# Also, the requested change can be applied to multipe binaries
|
# Also, the requested change can be applied to multiple binaries
|
||||||
# at once since 2-n arguments can be supplied.
|
# at once since 2-n arguments can be supplied.
|
||||||
|
|
||||||
local target=$1 # new path to dynamically linked library
|
local target=$1 # new path to dynamically linked library
|
||||||
|
|
|
@ -78,7 +78,7 @@ This is a tricky question. We believe software patents should not exist, so that
|
||||||
\par \pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af7\langfe2052\dbch\af8\afs24\alang1081\loch\f3\fs24\lang1031\sl276\slmult1\sb0\sa200{\b0\rtlch \ltrch\loch\fs24\lang255\loch\f6
|
\par \pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af7\langfe2052\dbch\af8\afs24\alang1081\loch\f3\fs24\lang1031\sl276\slmult1\sb0\sa200{\b0\rtlch \ltrch\loch\fs24\lang255\loch\f6
|
||||||
Software patents are widely available in the USA. Despite they are formally prohibited in the European Union, they indeed are granted by the thousand by the European Patent Office, and also some national patent offices follow the same path. In other countries they are not available.}
|
Software patents are widely available in the USA. Despite they are formally prohibited in the European Union, they indeed are granted by the thousand by the European Patent Office, and also some national patent offices follow the same path. In other countries they are not available.}
|
||||||
\par \pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af7\langfe2052\dbch\af8\afs24\alang1081\loch\f3\fs24\lang1031\sl276\slmult1\sb0\sa200{\b0\rtlch \ltrch\loch\fs24\lang255\loch\f6
|
\par \pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af7\langfe2052\dbch\af8\afs24\alang1081\loch\f3\fs24\lang1031\sl276\slmult1\sb0\sa200{\b0\rtlch \ltrch\loch\fs24\lang255\loch\f6
|
||||||
Since patent protection is a national state-granted monopoly, distributing software that violates patents in a given country could be entirely safe if done in another country. Fair use exceptions also exist. So we cannot advice you whether the software we provide would be considered violating patents in your country or in any other country, but that can be said for virtually all kinds of sofware. Only, since we deal with audio-video standards, and these standards are by and large designed to use certain patented technologies, it is common wisdom that the pieces of software that implement these standards are sensitive in this respect.}
|
Since patent protection is a national state-granted monopoly, distributing software that violates patents in a given country could be entirely safe if done in another country. Fair use exceptions also exist. So we cannot advice you whether the software we provide would be considered violating patents in your country or in any other country, but that can be said for virtually all kinds of software. Only, since we deal with audio-video standards, and these standards are by and large designed to use certain patented technologies, it is common wisdom that the pieces of software that implement these standards are sensitive in this respect.}
|
||||||
\par \pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af7\langfe2052\dbch\af8\afs24\alang1081\loch\f3\fs24\lang1031\sl276\slmult1\sb0\sa200{\b0\rtlch \ltrch\loch\fs24\lang255\loch\f6
|
\par \pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af7\langfe2052\dbch\af8\afs24\alang1081\loch\f3\fs24\lang1031\sl276\slmult1\sb0\sa200{\b0\rtlch \ltrch\loch\fs24\lang255\loch\f6
|
||||||
This is why GStreamer has taken a modular approach, so that you can use a Free plugins or a proprietary, patent royalty bearing, plugin for a given standard.}
|
This is why GStreamer has taken a modular approach, so that you can use a Free plugins or a proprietary, patent royalty bearing, plugin for a given standard.}
|
||||||
\par \pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af7\langfe2052\dbch\af8\afs24\alang1081\loch\f3\fs24\lang1031\sl276\slmult1\sb0\sa200{\b\rtlch \ltrch\loch\fs36\lang255\loch\f6
|
\par \pard\plain \s0\nowidctlpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\cf0\kerning1\hich\af7\langfe2052\dbch\af8\afs24\alang1081\loch\f3\fs24\lang1031\sl276\slmult1\sb0\sa200{\b\rtlch \ltrch\loch\fs36\lang255\loch\f6
|
||||||
|
|
|
@ -276,7 +276,7 @@ impl ElementInfo {
|
||||||
None
|
None
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn search_fo_element(bin: &gst::Bin, element_name: &str) -> Vec<gst::Element> {
|
pub fn search_for_element(bin: &gst::Bin, element_name: &str) -> Vec<gst::Element> {
|
||||||
let mut iter = bin.iterate_elements();
|
let mut iter = bin.iterate_elements();
|
||||||
let mut elements: Vec<gst::Element> = Vec::new();
|
let mut elements: Vec<gst::Element> = Vec::new();
|
||||||
elements = loop {
|
elements = loop {
|
||||||
|
@ -284,7 +284,7 @@ impl ElementInfo {
|
||||||
Ok(Some(element)) => {
|
Ok(Some(element)) => {
|
||||||
if element.is::<gst::Bin>() {
|
if element.is::<gst::Bin>() {
|
||||||
let bin = element.dynamic_cast::<gst::Bin>().unwrap();
|
let bin = element.dynamic_cast::<gst::Bin>().unwrap();
|
||||||
let mut bin_elements = ElementInfo::search_fo_element(&bin, element_name);
|
let mut bin_elements = ElementInfo::search_for_element(&bin, element_name);
|
||||||
elements.append(&mut bin_elements);
|
elements.append(&mut bin_elements);
|
||||||
} else {
|
} else {
|
||||||
GPS_INFO!("Found factory: {}", element.factory().unwrap().name());
|
GPS_INFO!("Found factory: {}", element.factory().unwrap().name());
|
||||||
|
|
|
@ -173,7 +173,7 @@ impl Player {
|
||||||
|
|
||||||
pub fn check_for_gtk4sink(&self, pipeline: &gst::Pipeline) {
|
pub fn check_for_gtk4sink(&self, pipeline: &gst::Pipeline) {
|
||||||
let bin = pipeline.clone().dynamic_cast::<gst::Bin>().unwrap();
|
let bin = pipeline.clone().dynamic_cast::<gst::Bin>().unwrap();
|
||||||
let gtksinks = ElementInfo::search_fo_element(&bin, "gtk4paintablesink");
|
let gtksinks = ElementInfo::search_for_element(&bin, "gtk4paintablesink");
|
||||||
|
|
||||||
for (first_sink, gtksink) in gtksinks.into_iter().enumerate() {
|
for (first_sink, gtksink) in gtksinks.into_iter().enumerate() {
|
||||||
let paintable = gtksink.property::<gdk::Paintable>("paintable");
|
let paintable = gtksink.property::<gdk::Paintable>("paintable");
|
||||||
|
@ -345,7 +345,7 @@ impl Player {
|
||||||
.unwrap()
|
.unwrap()
|
||||||
.dynamic_cast::<gst::Bin>()
|
.dynamic_cast::<gst::Bin>()
|
||||||
.unwrap();
|
.unwrap();
|
||||||
let elements_name: Vec<String> = ElementInfo::search_fo_element(&bin, "")
|
let elements_name: Vec<String> = ElementInfo::search_for_element(&bin, "")
|
||||||
.iter()
|
.iter()
|
||||||
.map(|e| e.factory().unwrap().name().to_string())
|
.map(|e| e.factory().unwrap().name().to_string())
|
||||||
.collect();
|
.collect();
|
||||||
|
|
|
@ -95,7 +95,7 @@ macro_rules! GPS_DEBUG (
|
||||||
macro_rules! GPS_MSG_LOG (
|
macro_rules! GPS_MSG_LOG (
|
||||||
() => ($crate::print!("\n"));
|
() => ($crate::print!("\n"));
|
||||||
($($arg:tt)*) => ({
|
($($arg:tt)*) => ({
|
||||||
logger::pring_msg_logger(logger::LogType::Message, format_args!($($arg)*).to_string());
|
logger::print_msg_logger(logger::LogType::Message, format_args!($($arg)*).to_string());
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -103,7 +103,7 @@ macro_rules! GPS_MSG_LOG (
|
||||||
macro_rules! GPS_GST_LOG (
|
macro_rules! GPS_GST_LOG (
|
||||||
() => ($crate::print!("\n"));
|
() => ($crate::print!("\n"));
|
||||||
($($arg:tt)*) => ({
|
($($arg:tt)*) => ({
|
||||||
logger::pring_msg_logger(logger::LogType::Gst, format_args!($($arg)*).to_string());
|
logger::print_msg_logger(logger::LogType::Gst, format_args!($($arg)*).to_string());
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -226,7 +226,7 @@ pub fn init_msg_logger(sender: Sender<(LogType, String)>) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn pring_msg_logger(log_type: LogType, msg: String) {
|
pub fn print_msg_logger(log_type: LogType, msg: String) {
|
||||||
let msg_logger = MSG_LOGGER.lock().unwrap();
|
let msg_logger = MSG_LOGGER.lock().unwrap();
|
||||||
if let Some(logger) = msg_logger.as_ref() {
|
if let Some(logger) = msg_logger.as_ref() {
|
||||||
logger.print_log(log_type, msg);
|
logger.print_log(log_type, msg);
|
||||||
|
|
Loading…
Reference in a new issue