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