pcwalton / rust-media

A free, comprehensive, and portable video/audio streaming library for Rust
Apache License 2.0
787 stars 57 forks source link

cargo build throws error - error: ISO C++ forbids comparison between pointer and integer [-fpermissive] in mp4v2-sys v0.1.0 #46

Open davnav opened 2 years ago

davnav commented 2 years ago

I am getting below error when try to build the library using 'cargo build' . Please advise

System: Ubuntu 20.04.3 LTS

--- stderr
  In file included from ./src/src.h:28,
                   from ./src/impl.h:6,
                   from src/rtphint.cpp:22:
  ./src/mp4util.h:36:33: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]
     36 |             throw new Exception("assert failure: "LIBMPV42_STRINGIFY((expr)), __FILE__, __LINE__, __FUNCTION__ ); \
        |                                 ^
  src/rtphint.cpp: In member function ‘void mp4v2::impl::MP4RtpHintTrack::GetPayload(char**, uint8_t*, uint16_t*, char**)’:
  src/rtphint.cpp:342:35: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
    342 |                     if (pSlash != '\0') {
        |                                   ^~~~
  make: *** [makefile.cargo:155: /home/naveen/Documents/Rustprojects/rust-media/target/debug/build/mp4v2-sys-13ad75970c243e76/out/src/rtphint.o] Error 1
  thread 'main' panicked at 'assertion failed: result.success()', /home/naveen/.cargo/git/checkouts/mp4v2-631e8f3a85428d68/a6d29cd/build.rs:17:5
  note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

rust-media

jdm commented 2 years ago

That's an error in the mp4v2 crate.

jdm commented 2 years ago

https://github.com/pcwalton/mp4v2/blob/master/src/rtphint.cpp#L342

Probably should be *pSlash instead. However, rust-media and everything it depends upon is totally unmaintained.

dbsxdbsx commented 1 year ago

https://github.com/pcwalton/mp4v2/blob/master/src/rtphint.cpp#L342

Probably should be *pSlash instead. However, rust-media and everything it depends upon is totally unmaintained.

I think this project is a wonderful crate for rust in the field of media play, so I wonder why this project is out of maintained, just because the dependencies are out of maintenance?

jdm commented 1 year ago

The intended consumer (servo) chose to rely on gstreamer instead.

dbsxdbsx commented 1 year ago

The intended consumer (servo) chose to rely on gstreamer instead.

So... is this one the final choice?

jdm commented 1 year ago

No idea. Servo relied on https://github.com/servo/media for its needs.