pub fn link(&mut self, from: &str, to: &str) -> Result<(), Error> {
        unsafe {
            let from_s = CString::new(from).unwrap();
            let ff_ptr = sys::avfilter_graph_get_filter(self.as_mut_ptr(), from_s.as_ptr());

            let ff = if ff_ptr.is_null() {
                return Err(Error::FilterNotFound);
            } else {
                ff_ptr
            };
            let to_s = CString::new(to).unwrap();
            let tf_ptr = sys::avfilter_graph_get_filter(self.as_mut_ptr(), to_s.as_ptr());

            let tf = if tf_ptr.is_null() {
                return Err(Error::FilterNotFound);
            } else {
                tf_ptr
            };
            match sys::avfilter_link(ff, 0, tf, 0) {
                s if s >= 0 => Ok(()),
                e => Err(Error::from(e)),
            }
        }
    }
/// Links one filter in the graph with another. Filters are specified by name. If you want to
/// link two [Contexts] together, see the [`crate::filters::context::Context::link`] method.
///
/// [Contexts]: crate::filters::context::Context
Links one filter in the graph with another. Filters are specified by name.


Links one filter in the graph with another . Filters are specified by name .
pub fn link(&mut self, from: &str, to: &str) -> Result<(), Error> {
        unsafe {
            let from_s = CString::new(from).unwrap();
            let ff_ptr = sys::avfilter_graph_get_filter(self.as_mut_ptr(), from_s.as_ptr());
            let ff = if ff_ptr.is_null() {
                return Err(Error::FilterNotFound);
            } else {
                ff_ptr
            };
            let to_s = CString::new(to).unwrap();
            let tf_ptr = sys::avfilter_graph_get_filter(self.as_mut_ptr(), to_s.as_ptr());
            let tf = if tf_ptr.is_null() {
                return Err(Error::FilterNotFound);
            } else {
                tf_ptr
            };
            match sys::avfilter_link(ff, 0, tf, 0) {
                s if s >= 0 => Ok(()),
                e => Err(Error::from(e)),
            }
        }
    }
pub fn link ( & mut self , from : & str , to : & str ) -> Result < ( ) , Error > { unsafe { let from_s = CString :: new ( from ) . unwrap ( ) ; let ff_ptr = sys :: avfilter_graph_get_filter ( self . as_mut_ptr ( ) , from_s . as_ptr ( ) ) ; let ff = if ff_ptr . is_null ( ) { return Err ( Error :: FilterNotFound ) ; } else { ff_ptr } ; let to_s = CString :: new ( to ) . unwrap ( ) ; let tf_ptr = sys :: avfilter_graph_get_filter ( self . as_mut_ptr ( ) , to_s . as_ptr ( ) ) ; let tf = if tf_ptr . is_null ( ) { return Err ( Error :: FilterNotFound ) ; } else { tf_ptr } ; match sys :: avfilter_link ( ff , 0 , tf , 0 ) { s if s >= 0 => Ok ( ( ) ) , e => Err ( Error :: from ( e ) ) , } } }
Links one filter in the graph with another.
Links one filter in the graph with another .
&mut self
from
&str
to
&str
&mut self
from
&str
to
&str