// This file was generated by gir (https://github.com/gtk-rs/gir)
// from gir-files (https://github.com/gtk-rs/gir-files)
// from gst-gir-files (https://gitlab.freedesktop.org/gstreamer/gir-files-rs.git)
// DO NOT EDIT

use crate::{Extractable, MetaContainer, Source, TimelineElement, TrackElement, VideoSource};
use glib::{prelude::*, translate::*};

glib::wrapper! {
    #[doc(alias = "GESMultiFileSource")]
    pub struct MultiFileSource(Object<ffi::GESMultiFileSource, ffi::GESMultiFileSourceClass>) @extends VideoSource, Source, TrackElement, TimelineElement, @implements Extractable, MetaContainer;

    match fn {
        type_ => || ffi::ges_multi_file_source_get_type(),
    }
}

impl MultiFileSource {
    pub const NONE: Option<&'static MultiFileSource> = None;

    #[doc(alias = "ges_multi_file_source_new")]
    pub fn new(uri: &str) -> MultiFileSource {
        assert_initialized_main_thread!();
        unsafe { from_glib_none(ffi::ges_multi_file_source_new(uri.to_glib_none().0)) }
    }
}

mod sealed {
    pub trait Sealed {}
    impl<T: super::IsA<super::MultiFileSource>> Sealed for T {}
}

pub trait MultiFileSourceExt: IsA<MultiFileSource> + sealed::Sealed + 'static {
    fn uri(&self) -> Option<glib::GString> {
        ObjectExt::property(self.as_ref(), "uri")
    }
}

impl<O: IsA<MultiFileSource>> MultiFileSourceExt for O {}
