<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>That is surprising, this exact snippet of code should work, is it
      possible that you don't</p>
    <p>actually use the latest version of gstreamer-rs? This function
      was added in July 2017, so</p>
    <p>quite some time ago, but worth making sure.</p>
    <p><br>
    </p>
    <p>It would also make sense to share the entire source code if that
      is possible, to</p>
    <p>make it easier to reproduce and spot the problem :)<br>
    </p>
    <br>
    <div class="moz-cite-prefix">On 03/01/2018 07:04 PM, Russel Winder
      wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:%3C1519927484.19810.10.camel@winder.org.uk%3E">
      <pre wrap="">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?

</pre>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
gstreamer-devel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:gstreamer-devel@lists.freedesktop.org">gstreamer-devel@lists.freedesktop.org</a>
<a class="moz-txt-link-freetext" href="https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel">https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>