teltek / gst-plugin-ndi

GStreamer NDI Plugin for Linux
GNU Lesser General Public License v2.1
155 stars 27 forks source link

fix element register due to gstreamer rs update #24

Closed o-reo closed 5 years ago

o-reo commented 5 years ago

gst::Element::register changed it's prototype in the latest gstreamer-rs update.

This commit solves the following error:

error[E0308]: mismatched types
   --> src/ndiaudiosrc.rs:547:28
    |
547 |     gst::Element::register(plugin, "ndiaudiosrc", 0, NdiAudioSrc::get_type())
    |                            ^^^^^^
    |                            |
    |                            expected enum `std::option::Option`, found reference
    |                            help: try using a variant of the expected type: `Some(plugin)`
    |
    = note: expected type `std::option::Option<&gst::Plugin>`
               found type `&gst::Plugin`

error[E0308]: mismatched types
   --> src/ndivideosrc.rs:536:28
    |
536 |     gst::Element::register(plugin, "ndivideosrc", 0, NdiVideoSrc::get_type())
    |                            ^^^^^^
    |                            |
    |                            expected enum `std::option::Option`, found reference
    |                            help: try using a variant of the expected type: `Some(plugin)`
    |
    = note: expected type `std::option::Option<&gst::Plugin>`
               found type `&gst::Plugin`

error: aborting due to 2 previous errors
rubenrua commented 5 years ago

Thank you