gstreamer_editing_services/auto/
command_line_formatter.rs1use crate::{ffi, Extractable, Formatter, Timeline};
7use glib::{prelude::*, translate::*};
8
9glib::wrapper! {
10 #[doc(alias = "GESCommandLineFormatter")]
11 pub struct CommandLineFormatter(Object<ffi::GESCommandLineFormatter, ffi::GESCommandLineFormatterClass>) @extends Formatter, @implements Extractable;
12
13 match fn {
14 type_ => || ffi::ges_command_line_formatter_get_type(),
15 }
16}
17
18impl CommandLineFormatter {
19 pub const NONE: Option<&'static CommandLineFormatter> = None;
20
21 #[doc(alias = "ges_command_line_formatter_get_help")]
22 #[doc(alias = "get_help")]
23 pub fn help(commands: &[&str]) -> glib::GString {
24 assert_initialized_main_thread!();
25 let nargs = commands.len() as _;
26 unsafe {
27 from_glib_full(ffi::ges_command_line_formatter_get_help(
28 nargs,
29 commands.to_glib_none().0,
30 ))
31 }
32 }
33
34 #[doc(alias = "ges_command_line_formatter_get_timeline_uri")]
35 #[doc(alias = "get_timeline_uri")]
36 pub fn timeline_uri(timeline: &impl IsA<Timeline>) -> glib::GString {
37 skip_assert_initialized!();
38 unsafe {
39 from_glib_full(ffi::ges_command_line_formatter_get_timeline_uri(
40 timeline.as_ref().to_glib_none().0,
41 ))
42 }
43 }
44}