teltek / gst-plugin-ndi

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

Cargo Build doesn't work #20

Closed billylindeman closed 5 years ago

billylindeman commented 5 years ago

Trying to compile this plugin using cargo build and it errors out

   Compiling gst-plugin-ndi v1.0.0 (/home/billy/Development/libraries/gst/gst-plugin-ndi)
error[E0593]: closure is expected to take 1 argument, but it takes 0 arguments
  --> src/ndiaudiosrc.rs:49:35
   |
49 | subclass::Property("stream-name", || {
   |                                   ^^
   |                                   |
   |                                   expected closure that takes 1 argument
   |                                   takes 0 arguments
help: consider changing the closure to take and ignore the expected argument
   |
49 | subclass::Property("stream-name", |_| {
   |                                   ^^^

error[E0593]: closure is expected to take 1 argument, but it takes 0 arguments
  --> src/ndiaudiosrc.rs:58:26
   |
58 | subclass::Property("ip", || {
   |                          ^^
   |                          |
   |                          expected closure that takes 1 argument
   |                          takes 0 arguments
help: consider changing the closure to take and ignore the expected argument
   |
58 | subclass::Property("ip", |_| {
   |                          ^^^

error[E0593]: closure is expected to take 1 argument, but it takes 0 arguments
  --> src/ndiaudiosrc.rs:67:38
   |
67 | subclass::Property("loss-threshold", || {
   |                                      ^^
   |                                      |
   |                                      expected closure that takes 1 argument
   |                                      takes 0 arguments
help: consider changing the closure to take and ignore the expected argument
   |
67 | subclass::Property("loss-threshold", |_| {
   |                                      ^^^

error[E0053]: method `change_state` has an incompatible type for trait
   --> src/ndiaudiosrc.rs:245:9
    |
245 | /         fn change_state(
246 | |             &self,
247 | |             element: &gst::Element,
248 | |             transition: gst::StateChange,
...   |
281 | |             self.parent_change_state(element, transition)
282 | |         }
    | |_________^ expected enum `std::result::Result`, found enum `gst::StateChangeReturn`
    |
    = note: expected type `fn(&ndiaudiosrc::NdiAudioSrc, &gst::Element, gst::StateChange) -> std::result::Result<gst::StateChangeSuccess, gst::StateChangeError>`
               found type `fn(&ndiaudiosrc::NdiAudioSrc, &gst::Element, gst::StateChange) -> gst::StateChangeReturn`

error[E0053]: method `set_caps` has an incompatible type for trait
   --> src/ndiaudiosrc.rs:286:9
    |
286 |         fn set_caps(&self, element: &gst_base::BaseSrc, caps: &gst::CapsRef) -> bool {
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected enum `std::result::Result`, found bool
    |
    = note: expected type `fn(&ndiaudiosrc::NdiAudioSrc, &gst_base::BaseSrc, &gst::CapsRef) -> std::result::Result<(), gst::LoggableError>`
               found type `fn(&ndiaudiosrc::NdiAudioSrc, &gst_base::BaseSrc, &gst::CapsRef) -> bool`

error[E0053]: method `start` has an incompatible type for trait
   --> src/ndiaudiosrc.rs:300:9
    |
300 |         fn start(&self, element: &gst_base::BaseSrc) -> bool {
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected enum `std::result::Result`, found bool
    |
    = note: expected type `fn(&ndiaudiosrc::NdiAudioSrc, &gst_base::BaseSrc) -> std::result::Result<(), gst::ErrorMessage>`
               found type `fn(&ndiaudiosrc::NdiAudioSrc, &gst_base::BaseSrc) -> bool`

error[E0053]: method `stop` has an incompatible type for trait
   --> src/ndiaudiosrc.rs:314:9
    |
314 |         fn stop(&self, element: &gst_base::BaseSrc) -> bool {
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected enum `std::result::Result`, found bool
    |
    = note: expected type `fn(&ndiaudiosrc::NdiAudioSrc, &gst_base::BaseSrc) -> std::result::Result<(), gst::ErrorMessage>`
               found type `fn(&ndiaudiosrc::NdiAudioSrc, &gst_base::BaseSrc) -> bool`

error[E0593]: closure is expected to take 1 argument, but it takes 0 arguments
  --> src/ndivideosrc.rs:50:35
   |
50 | subclass::Property("stream-name", || {
   |                                   ^^
   |                                   |
   |                                   expected closure that takes 1 argument
   |                                   takes 0 arguments
help: consider changing the closure to take and ignore the expected argument
   |
50 | subclass::Property("stream-name", |_| {
   |                                   ^^^

error[E0593]: closure is expected to take 1 argument, but it takes 0 arguments
  --> src/ndivideosrc.rs:59:26
   |
59 | subclass::Property("ip", || {
   |                          ^^
   |                          |
   |                          expected closure that takes 1 argument
   |                          takes 0 arguments
help: consider changing the closure to take and ignore the expected argument
   |
59 | subclass::Property("ip", |_| {
   |                          ^^^

error[E0593]: closure is expected to take 1 argument, but it takes 0 arguments
  --> src/ndivideosrc.rs:68:38
   |
68 | subclass::Property("loss-threshold", || {
   |                                      ^^
   |                                      |
   |                                      expected closure that takes 1 argument
   |                                      takes 0 arguments
help: consider changing the closure to take and ignore the expected argument
   |
68 | subclass::Property("loss-threshold", |_| {
   |                                      ^^^

error[E0053]: method `change_state` has an incompatible type for trait
   --> src/ndivideosrc.rs:255:9
    |
255 | /         fn change_state(
256 | |             &self,
257 | |             element: &gst::Element,
258 | |             transition: gst::StateChange,
...   |
291 | |             self.parent_change_state(element, transition)
292 | |         }
    | |_________^ expected enum `std::result::Result`, found enum `gst::StateChangeReturn`
    |
    = note: expected type `fn(&ndivideosrc::NdiVideoSrc, &gst::Element, gst::StateChange) -> std::result::Result<gst::StateChangeSuccess, gst::StateChangeError>`
               found type `fn(&ndivideosrc::NdiVideoSrc, &gst::Element, gst::StateChange) -> gst::StateChangeReturn`

error[E0053]: method `set_caps` has an incompatible type for trait
   --> src/ndivideosrc.rs:296:9
    |
296 |         fn set_caps(&self, element: &gst_base::BaseSrc, caps: &gst::CapsRef) -> bool {
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected enum `std::result::Result`, found bool
    |
    = note: expected type `fn(&ndivideosrc::NdiVideoSrc, &gst_base::BaseSrc, &gst::CapsRef) -> std::result::Result<(), gst::LoggableError>`
               found type `fn(&ndivideosrc::NdiVideoSrc, &gst_base::BaseSrc, &gst::CapsRef) -> bool`

error[E0053]: method `start` has an incompatible type for trait
   --> src/ndivideosrc.rs:309:9
    |
309 |         fn start(&self, element: &gst_base::BaseSrc) -> bool {
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected enum `std::result::Result`, found bool
    |
    = note: expected type `fn(&ndivideosrc::NdiVideoSrc, &gst_base::BaseSrc) -> std::result::Result<(), gst::ErrorMessage>`
               found type `fn(&ndivideosrc::NdiVideoSrc, &gst_base::BaseSrc) -> bool`

error[E0053]: method `stop` has an incompatible type for trait
   --> src/ndivideosrc.rs:322:9
    |
322 |         fn stop(&self, element: &gst_base::BaseSrc) -> bool {
    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected enum `std::result::Result`, found bool
    |
    = note: expected type `fn(&ndivideosrc::NdiVideoSrc, &gst_base::BaseSrc) -> std::result::Result<(), gst::ErrorMessage>`
               found type `fn(&ndivideosrc::NdiVideoSrc, &gst_base::BaseSrc) -> bool`

error: aborting due to 14 previous errors

Some errors occurred: E0053, E0593.
For more information about an error, try `rustc --explain E0053`.
error: Could not compile `gst-plugin-ndi`.

To learn more, run the command again with --verbose.
o-reo commented 5 years ago

Hi, you can check out my fork that should correct this issue.

rubenrua commented 5 years ago

@o-reo Looking forward to your pull-request.

o-reo commented 5 years ago

Sure, will do it in a few days when I feel it's stable.