diff --git a/utils/uriplaylistbin/examples/playlist.rs b/utils/uriplaylistbin/examples/playlist.rs index 3c624ba1..707e0d92 100644 --- a/utils/uriplaylistbin/examples/playlist.rs +++ b/utils/uriplaylistbin/examples/playlist.rs @@ -78,6 +78,22 @@ fn create_pipeline(uris: Vec, iterations: u32) -> anyhow::Result>("uris"); + let uri_index = uriplaylistbin.property::("current-uri-index"); + let iteration = uriplaylistbin.property::("current-iteration"); + + println!("-> {} (iteration {})", uris[uri_index as usize], iteration); + } + + playlist.connect_notify(Some("current-iteration"), |uriplaylistbin, _param_spec| { + display_current(uriplaylistbin); + }); + + playlist.connect_notify(Some("current-uri-index"), |uriplaylistbin, _param_spec| { + display_current(uriplaylistbin); + }); + Ok(pipeline) }