Minor Rusty blockage

Mathieu Duponchelle mathieu at centricular.com
Thu Mar 1 21:48:10 UTC 2018


That is surprising, this exact snippet of code should work, is it 
possible that you don't

actually use the latest version of gstreamer-rs? This function was added 
in July 2017, so

quite some time ago, but worth making sure.


It would also make sense to share the entire source code if that is 
possible, to

make it easier to reproduce and spot the problem :)


On 03/01/2018 07:04 PM, Russel Winder wrote:
> Following the examples from GStreamer_Rs/examples, I added the
> following in my playbin creation code:
>
>         bus.add_watch(move |_, msg| {
>                  match msg.view() {
>                      gst::MessageView::Eos(..) => {
>                          println!("Got an EOS signal in GStreamer engine.");
>                          application.quit();
>                      },
>                      gst::MessageView::Error(err) => {
>                          println!(
>                              "Error from {:?}: {} ({:?})",
>                              err.get_src().map(|s| s.get_path_string()),
>                              err.get_error(),
>                              err.get_debug()
>                          );
>                          application.quit();
>                      },
>                      _ => (),
>                  };
>                  glib::Continue(true)
>              }
>          );
>
> Sadly though this fails to compile, there seems to be some problem with
> the gst::MessageView::Error(err) bit – CLion/Rust doesn't recognise the
> Error, it does the Eos, and the compiler reports:
>
>
> error[E0599]: no method named `get_src` found for type `gst::message::Error<'_>` in the current scope
>    --> src/gstreamer_engine.rs:52:33
>     |
> 52 |                             err.get_src().map(|s| s.get_path_string()),
>     |                                 ^^^^^^^
>
>
> I'll wager I am just missing something obvious. Can anyone spot it?
>
>
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20180301/1c3f5748/attachment.html>


More information about the gstreamer-devel mailing list