pcwalton / rust-media Goto Github PK
View Code? Open in Web Editor NEWA free, comprehensive, and portable video/audio streaming library for Rust
License: Apache License 2.0
A free, comprehensive, and portable video/audio streaming library for Rust
License: Apache License 2.0
Hey fellas, new rustacean here trying to use rust-media for an example project.
Running with:
$ rustc --version
rustc 1.6.0 (c30b771ad 2016-01-19)
$ cargo --version
cargo 0.8.0-nightly (8edc460 2016-01-21)
on OS X El Capitan.
Building the example fails due to:
$ cargo build
Updating git repository `https://github.com/AngryLawyer/rust-sdl2`
Unable to update https://github.com/AngryLawyer/rust-sdl2?rev=a36627dff1069e5ca6098dd3a39fbd6039794097
Caused by:
failed to parse manifest at `/Users/beshr/.cargo/git/checkouts/rust-sdl2-aeff1349bd28b2cf/a36627dff1069e5ca6098dd3a39fbd6039794097/sdl2-sys/Cargo.toml`
Caused by:
library target names cannot contain hyphens: sdl2-sys
The linker complains with non found symbols avcodec_alloc_frame
, avcodec_free_frame
and avcodec_default_get_buffer
when compiling with a modern libavcodec (I tried with 7:3.0.2
).
When adding compat, care should be taken to not destroy backwards compat.
We'll want to support Opus in a similar manner to libvorbis
.
Just wanted to ask, what is the license of this project?
What is the current status of this project?
Also, any thoughts on integrating gstreamer into this project? Modules/Plugins could still be written in rust like what is done here: https://github.com/sdroege/gst-plugin-rs
Any feedback would be appreciated.
At a minimum, all public types and methods in audiodecoder
, container
, playback
, and videodecoder
should have documentation.
Reproducing steps:
youtube-dl -k -f 'bestvideo[ext=mp4]+bestaudio[ext=m4a]/mp4' https://www.youtube.com/watch?v=5QyBGvZ0pHM&list=PL7odT97B5pLa-D40qMJNaLP4jvZ-HeDLO&index=19
RUST_BACKTRACE=1 ./example "Caravan Palace - Lay Down-5QyBGvZ0pHM.mp4" video/mp4
Result:
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: ()', libcore/result.rs:916:5
stack backtrace:
0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace
at libstd/sys/unix/backtrace/tracing/gcc_s.rs:49
1: std::sys_common::backtrace::print
at libstd/sys_common/backtrace.rs:68
at libstd/sys_common/backtrace.rs:57
2: std::panicking::default_hook::{{closure}}
at libstd/panicking.rs:381
3: std::panicking::default_hook
at libstd/panicking.rs:397
4: std::panicking::rust_panic_with_hook
at libstd/panicking.rs:577
5: std::panicking::begin_panic
at libstd/panicking.rs:538
6: std::panicking::begin_panic_fmt
at libstd/panicking.rs:522
7: rust_begin_unwind
at libstd/panicking.rs:498
8: core::panicking::panic_fmt
at libcore/panicking.rs:71
9: core::result::unwrap_failed
at /checkout/src/libcore/macros.rs:23
10: rust_media::playback::Player::new
at /checkout/src/libcore/result.rs:782
at /home/felix/Development/rust-media/playback.rs:326
at /home/felix/Development/rust-media/playback.rs:62
11: example::main
at /home/felix/Development/rust-media/example/example.rs:302
12: std::rt::lang_start::{{closure}}
at /checkout/src/libstd/rt.rs:74
13: std::panicking::try::do_call
at libstd/rt.rs:59
at libstd/panicking.rs:480
14: __rust_maybe_catch_panic
at libpanic_unwind/lib.rs:102
15: std::rt::lang_start_internal
at libstd/panicking.rs:459
at libstd/panic.rs:365
at libstd/rt.rs:58
16: main
17: __libc_start_main
18: _start
rustc:
rustc 1.25.0-nightly (61452e506 2018-01-09)
binary: rustc
commit-hash: 61452e506f0c88861cccaeea4ced3419bdb3cbe0
commit-date: 2018-01-09
host: x86_64-unknown-linux-gnu
release: 1.25.0-nightly
LLVM version: 4.0
yasm:
yasm 1.3.0
Compiled on May 3 2015.
Copyright (c) 2001-2014 Peter Johnson and other Yasm developers.
Run yasm --license for licensing overview and summary.
libvpx-dev:
Source: libvpx
Version: 1.6.1-3
Depends: libvpx4 (= 1.6.1-3)
Description: VP8 and VP9 video codec (development files)
VP8 and VP9 are open video codecs, originally developed by On2 and released
as open source by Google Inc. They are the successor of the VP3 codec,
on which the Theora codec was based.
.
This package contains the development libraries, header files needed by
programs that want to compile with libvpx.
mp4v2
is not ideal. It would be great to have a pure-Rust MP4 demuxer.
Is it possible to split a video into a 10 second chunk with this library?
I need something faster and simpler than ffmpeg.
Thanks!
Currently, only the low-level Ogg API is supported. We should provide an implementation of ContainerReader
for Ogg so that Ogg files can be played via the playback
module.
Currently, your only option to play H.264 and AAC on Android is FFmpeg. But essentially all Android devices support H.264 via libstagefright
. We should bind to it. This would also let us use the hardware decoders where available.
On a raspberry pi 2:
error: failed to run custom build command for `libvpx-sys v0.1.0 (https://github.com/pcwalton/libvpx?branch=servo#3765856c)`
process didn't exit successfully: `/home/pi/rust-media/example/target/debug/build/libvpx-sys-dc1decce5e61498c/build-script-build` (exit code: 101)
--- stdout
echo "#ifndef VPX_CONFIG_H" > /home/pi/rust-media/example/target/debug/build/libvpx-sys-21070317f7674d2a/out/vpx_config.h
echo "%ifndef VPX_CONFIG_ASM" > /home/pi/rust-media/example/target/debug/build/libvpx-sys-21070317f7674d2a/out/vpx_config.asm
echo "ARCH_X86_64=yes" >> /home/pi/rust-media/example/target/debug/build/libvpx-sys-21070317f7674d2a/out/vpx_config
build/make/version.sh . /home/pi/rust-media/example/target/debug/build/libvpx-sys-21070317f7674d2a/out/vpx_version.h
echo "#define VPX_CONFIG_H" >> /home/pi/rust-media/example/target/debug/build/libvpx-sys-21070317f7674d2a/out/vpx_config.h
echo "%define VPX_CONFIG_ASM 1" >> /home/pi/rust-media/example/target/debug/build/libvpx-sys-21070317f7674d2a/out/vpx_config.asm
echo "CONFIG_POSTPROC=yes" >> /home/pi/rust-media/example/target/debug/build/libvpx-sys-21070317f7674d2a/out/vpx_config
echo "#define ARCH_X86_64 1" >> /home/pi/rust-media/example/target/debug/build/libvpx-sys-21070317f7674d2a/out/vpx_config.h
echo "CONFIG_VP9_POSTPROC=no" >> /home/pi/rust-media/example/target/debug/build/libvpx-sys-21070317f7674d2a/out/vpx_config
echo "#define CONFIG_POSTPROC 1" >> /home/pi/rust-media/example/target/debug/build/libvpx-sys-21070317f7674d2a/out/vpx_config.h
echo "%define ARCH_ARM 1" >> /home/pi/rust-media/example/target/debug/build/libvpx-sys-21070317f7674d2a/out/vpx_config.asm
echo "CONFIG_ERROR_CONCEALMENT=no" >> /home/pi/rust-media/example/target/debug/build/libvpx-sys-21070317f7674d2a/out/vpx_config
echo "%define CONFIG_POSTPROC 1" >> /home/pi/rust-media/example/target/debug/build/libvpx-sys-21070317f7674d2a/out/vpx_config.asm
echo "%define CONFIG_VP9_POSTPROC 0" >> /home/pi/rust-media/example/target/debug/build/libvpx-sys-21070317f7674d2a/out/vpx_config.asm
echo "#define CONFIG_VP9_POSTPROC 0" >> /home/pi/rust-media/example/target/debug/build/libvpx-sys-21070317f7674d2a/out/vpx_config.h
echo "#define CONFIG_ERROR_CONCEALMENT 0" >> /home/pi/rust-media/example/target/debug/build/libvpx-sys-21070317f7674d2a/out/vpx_config.h
echo "%define CONFIG_ERROR_CONCEALMENT 0" >> /home/pi/rust-media/example/target/debug/build/libvpx-sys-21070317f7674d2a/out/vpx_config.asm
echo "CONFIG_PIC=yes" >> /home/pi/rust-media/example/target/debug/build/libvpx-sys-21070317f7674d2a/out/vpx_config
echo "#define CONFIG_PIC 1" >> /home/pi/rust-media/example/target/debug/build/libvpx-sys-21070317f7674d2a/out/vpx_config.h
echo "%define CONFIG_PIC 1" >> /home/pi/rust-media/example/target/debug/build/libvpx-sys-21070317f7674d2a/out/vpx_config.asm
echo "#define CONFIG_SPATIAL_RESAMPLING yes" >> /home/pi/rust-media/example/target/debug/build/libvpx-sys-21070317f7674d2a/out/vpx_config.h
echo "CONFIG_SPATIAL_RESAMPLING=yes" >> /home/pi/rust-media/example/target/debug/build/libvpx-sys-21070317f7674d2a/out/vpx_config
echo "%define CONFIG_SPATIAL_RESAMPLING yes" >> /home/pi/rust-media/example/target/debug/build/libvpx-sys-21070317f7674d2a/out/vpx_config.asm
echo "CONFIG_VP8_DECODER=yes" >> /home/pi/rust-media/example/target/debug/build/libvpx-sys-21070317f7674d2a/out/vpx_config
echo "#define CONFIG_VP8_DECODER 1" >> /home/pi/rust-media/example/target/debug/build/libvpx-sys-21070317f7674d2a/out/vpx_config.h
echo "HAVE_MMX=yes" >> /home/pi/rust-media/example/target/debug/build/libvpx-sys-21070317f7674d2a/out/vpx_config
echo "%define CONFIG_VP8_DECODER 1" >> /home/pi/rust-media/example/target/debug/build/libvpx-sys-21070317f7674d2a/out/vpx_config.asm
echo "#define HAVE_MMX 1" >> /home/pi/rust-media/example/target/debug/build/libvpx-sys-21070317f7674d2a/out/vpx_config.h
echo "%endif" >> /home/pi/rust-media/example/target/debug/build/libvpx-sys-21070317f7674d2a/out/vpx_config.asm
echo "HAVE_PTHREAD_H=yes" >> /home/pi/rust-media/example/target/debug/build/libvpx-sys-21070317f7674d2a/out/vpx_config
echo "#define HAVE_PTHREAD_H 1" >> /home/pi/rust-media/example/target/debug/build/libvpx-sys-21070317f7674d2a/out/vpx_config.h
echo "#define HAVE_SSE2 1" >> /home/pi/rust-media/example/target/debug/build/libvpx-sys-21070317f7674d2a/out/vpx_config.h
echo "HAVE_SSE2=yes" >> /home/pi/rust-media/example/target/debug/build/libvpx-sys-21070317f7674d2a/out/vpx_config
echo "#define HAVE_SSSE3 1" >> /home/pi/rust-media/example/target/debug/build/libvpx-sys-21070317f7674d2a/out/vpx_config.h
echo "HAVE_SSSE3=yes" >> /home/pi/rust-media/example/target/debug/build/libvpx-sys-21070317f7674d2a/out/vpx_config
echo "#endif" >> /home/pi/rust-media/example/target/debug/build/libvpx-sys-21070317f7674d2a/out/vpx_config.h
build/make/rtcd.pl --arch=x86 --sym=vp8_rtcd --config=/home/pi/rust-media/example/target/debug/build/libvpx-sys-21070317f7674d2a/out/vpx_config vp8/common/rtcd_defs.pl > /home/pi/rust-media/example/target/debug/build/libvpx-s
ys-21070317f7674d2a/out/vp8_rtcd.h
build/make/rtcd.pl --arch=x86 --sym=vp8_scale_rtcd --config=/home/pi/rust-media/example/target/debug/build/libvpx-sys-21070317f7674d2a/out/vpx_config vpx_scale/vpx_scale_rtcd.pl > /home/pi/rust-media/example/target/debug/buil
d/libvpx-sys-21070317f7674d2a/out/vpx_scale_rtcd.h
mkdir -p `dirname /home/pi/rust-media/example/target/debug/build/libvpx-sys-21070317f7674d2a/out/vp8/common/generic/systemdependent.o` && cc -c -iquote /home/pi/rust-media/example/target/debug/build/libvpx-sys-21070317f7674d2
a/out -iquote . -DINLINE=inline -O2 -fPIC -o /home/pi/rust-media/example/target/debug/build/libvpx-sys-21070317f7674d2a/out/vp8/common/generic/systemdependent.o vp8/common/generic/systemdependent.c
mkdir -p `dirname /home/pi/rust-media/example/target/debug/build/libvpx-sys-21070317f7674d2a/out/vp8/common/alloccommon.o` && cc -c -iquote /home/pi/rust-media/example/target/debug/build/libvpx-sys-21070317f7674d2a/out -iquot
e . -DINLINE=inline -O2 -fPIC -o /home/pi/rust-media/example/target/debug/build/libvpx-sys-21070317f7674d2a/out/vp8/common/alloccommon.o vp8/common/alloccommon.c
mkdir -p `dirname /home/pi/rust-media/example/target/debug/build/libvpx-sys-21070317f7674d2a/out/vp8/common/blockd.o` && cc -c -iquote /home/pi/rust-media/example/target/debug/build/libvpx-sys-21070317f7674d2a/out -iquote . -
DINLINE=inline -O2 -fPIC -o /home/pi/rust-media/example/target/debug/build/libvpx-sys-21070317f7674d2a/out/vp8/common/blockd.o vp8/common/blockd.c
mkdir -p `dirname /home/pi/rust-media/example/target/debug/build/libvpx-sys-21070317f7674d2a/out/vp8/common/debugmodes.o` && cc -c -iquote /home/pi/rust-media/example/target/debug/build/libvpx-sys-21070317f7674d2a/out -iquote
. -DINLINE=inline -O2 -fPIC -o /home/pi/rust-media/example/target/debug/build/libvpx-sys-21070317f7674d2a/out/vp8/common/debugmodes.o vp8/common/debugmodes.c
mkdir -p `dirname /home/pi/rust-media/example/target/debug/build/libvpx-sys-21070317f7674d2a/out/vp8/common/dequantize.o` && cc -c -iquote /home/pi/rust-media/example/target/debug/build/libvpx-sys-21070317f7674d2a/out -iquote
. -DINLINE=inline -O2 -fPIC -o /home/pi/rust-media/example/target/debug/build/libvpx-sys-21070317f7674d2a/out/vp8/common/dequantize.o vp8/common/dequantize.c
mkdir -p `dirname /home/pi/rust-media/example/target/debug/build/libvpx-sys-21070317f7674d2a/out/vp8/common/entropy.o` && cc -c -iquote /home/pi/rust-media/example/target/debug/build/libvpx-sys-21070317f7674d2a/out -iquote .
-DINLINE=inline -O2 -fPIC -o /home/pi/rust-media/example/target/debug/build/libvpx-sys-21070317f7674d2a/out/vp8/common/entropy.o vp8/common/entropy.c
/home/pi/.cargo/git/checkouts/libvpx-914eb21fbf3a6389/3765856/makefile.cargo:295: recipe for target '/home/pi/rust-media/example/target/debug/build/libvpx-sys-21070317f7674d2a/out/vp8/common/generic/systemdependent.o' failed
--- stderr
/home/pi/.cargo/git/checkouts/libvpx-914eb21fbf3a6389/3765856/makefile.cargo:286: warning: overriding recipe for target '/home/pi/rust-media/example/target/debug/build/libvpx-sys-21070317f7674d2a/out/vp8_rtcd.h'
/home/pi/.cargo/git/checkouts/libvpx-914eb21fbf3a6389/3765856/makefile.cargo:280: warning: ignoring old recipe for target '/home/pi/rust-media/example/target/debug/build/libvpx-sys-21070317f7674d2a/out/vp8_rtcd.h'
/home/pi/.cargo/git/checkouts/libvpx-914eb21fbf3a6389/3765856/makefile.cargo:289: warning: overriding recipe for target '/home/pi/rust-media/example/target/debug/build/libvpx-sys-21070317f7674d2a/out/vpx_scale_rtcd.h'
/home/pi/.cargo/git/checkouts/libvpx-914eb21fbf3a6389/3765856/makefile.cargo:283: warning: ignoring old recipe for target '/home/pi/rust-media/example/target/debug/build/libvpx-sys-21070317f7674d2a/out/vpx_scale_rtcd.h'
In file included from vp8/common/generic/systemdependent.c:17:0:
vp8/common/generic/systemdependent.c: In function ‘vp8_machine_specific_config’:
./vpx_ports/x86.h:44:3: error: impossible constraint in ‘asm’
__asm__ __volatile__ (\
^
./vpx_ports/x86.h:171:3: note: in expansion of macro ‘cpuid’
cpuid(0, 0, reg_eax, reg_ebx, reg_ecx, reg_edx);
^
./vpx_ports/x86.h:44:3: error: impossible constraint in ‘asm’
__asm__ __volatile__ (\
^
./vpx_ports/x86.h:177:3: note: in expansion of macro ‘cpuid’
cpuid(1, 0, reg_eax, reg_ebx, reg_ecx, reg_edx);
^
make: *** [/home/pi/rust-media/example/target/debug/build/libvpx-sys-21070317f7674d2a/out/vp8/common/generic/systemdependent.o] Error 1
make: *** Waiting for unfinished jobs....
thread 'main' panicked at 'assertion failed: make_result.success()', /home/pi/.cargo/git/checkouts/libvpx-914eb21fbf3a6389/3765856/build.rs:20:5
It would be interesting to have support for VA-API using libva to make use of the GPU hardware decoding for H.264 on linux.
There is a rust project on github with an incomplete implementation https://github.com/zzoon/libva-rust
I asked about the license on this project, and if it's possible to release it under Apache 2.0 and MIT.
We should add MP3 support via FFmpeg and AudioUnit.framework
on Mac. It may also be desirable to add ID3 support.
If you have a packed BGRA, is there a way to convert it to another format e.g. WebM?
when trying to run "cargo build" on the example folder,
I am getting this error 6 times:
error: use of unstable library feature 'float_bits_conv': recently added (see issue #40470)
any help will be appreciated
To scale up to many simultaneous videos, we want to use async I/O. So we need to set the sockets to nonblocking and propagate up EWOULDBLOCK
so that the codec will be able to resume when there's not enough data read.
Looks like we aren't properly decoding gifs with partially diff'd frames. This is pretty important since most gifs on the internet -- particularly gif'd videos -- are like this.
Uses unsafe_no_drop_flag
and heap::allocate
which no longer exist.
rust-media
should not panic, but I am almost certain there are ways to make it panic. We should audit to make sure it does not panic under normal use.
Libvorbis and libogg could be dropped as native dependencies, being replaced by lewton and the ogg crate:
https://github.com/est31/lewton
https://github.com/est31/ogg
This will be important for WebRTC.
Currently your only option to play H.264 and AAC on Windows is to use FFmpeg, but this is not ideal. Most Windows versions come with Media Foundation nowadays, so we should be able to use that where available.
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
Subtitles are currently not supported, but they should be.
There should be a convenient API on Player
to stop playback and resume from the start.
We should be able to seek in the media. Get this working. This will involve, at minimum, adding a seek
method to ContainerReader
and a corresponding method in Player
.
We could drop a native dependency here:
https://github.com/PistonDevelopers/image-gif
Servo itself right now uses it directly atm, as far as I know.
But it would be still good for non servo users to support gifs.
When I try to build the library I get
g++: error: /home/zethra/rust-media/target/debug/build/rust-media-4f16ffe1a06b74e6/out/../../libwebm-sys-8601c49ada690de1/out: No such file or directory
Following the instructions to try the examples, cargo build failed for me.
I am using Manjaro Linux, which has version 11.1.0 of g++... maybe one has to specify the standard of C++ to which to compile?
Log follows:
[jvanriper@jvanriper-pc example]$ cargo build
Compiling mp4v2-sys v0.1.0 (https://github.com/pcwalton/mp4v2?branch=servo#a6d29cd6)
error: failed to run custom build command for `mp4v2-sys v0.1.0 (https://github.com/pcwalton/mp4v2?branch=servo#a6d29cd6)`
Caused by:
process didn't exit successfully: `/home/jvanriper/Documents/rust/rust-media/example/target/debug/build/mp4v2-sys-7e5fe25939b2bfd6/build-script-build` (exit status: 101)
--- stdout
mkdir -p `dirname /home/jvanriper/Documents/rust/rust-media/example/target/debug/build/mp4v2-sys-13ad75970c243e76/out/src/rtphint.o` && g++ -c -iquote . -Iinclude -I/home/jvanriper/Documents/rust/rust-media/example/target/debug/build/mp4v2-sys-13ad75970c243e76/out -I/home/jvanriper/Documents/rust/rust-media/example/target/debug/build/mp4v2-sys-13ad75970c243e76/out/include -O2 -fPIC -o /home/jvanriper/Documents/rust/rust-media/example/target/debug/build/mp4v2-sys-13ad75970c243e76/out/src/rtphint.o src/rtphint.cpp
mkdir -p `dirname /home/jvanriper/Documents/rust/rust-media/example/target/debug/build/mp4v2-sys-13ad75970c243e76/out/libplatform/number/random_posix.o` && g++ -c -iquote . -Iinclude -I/home/jvanriper/Documents/rust/rust-media/example/target/debug/build/mp4v2-sys-13ad75970c243e76/out -I/home/jvanriper/Documents/rust/rust-media/example/target/debug/build/mp4v2-sys-13ad75970c243e76/out/include -O2 -fPIC -o /home/jvanriper/Documents/rust/rust-media/example/target/debug/build/mp4v2-sys-13ad75970c243e76/out/libplatform/number/random_posix.o libplatform/number/random_posix.cpp
mkdir -p `dirname /home/jvanriper/Documents/rust/rust-media/example/target/debug/build/mp4v2-sys-13ad75970c243e76/out/libplatform/process/process_posix.o` && g++ -c -iquote . -Iinclude -I/home/jvanriper/Documents/rust/rust-media/example/target/debug/build/mp4v2-sys-13ad75970c243e76/out -I/home/jvanriper/Documents/rust/rust-media/example/target/debug/build/mp4v2-sys-13ad75970c243e76/out/include -O2 -fPIC -o /home/jvanriper/Documents/rust/rust-media/example/target/debug/build/mp4v2-sys-13ad75970c243e76/out/libplatform/process/process_posix.o libplatform/process/process_posix.cpp
mkdir -p `dirname /home/jvanriper/Documents/rust/rust-media/example/target/debug/build/mp4v2-sys-13ad75970c243e76/out/libplatform/time/time_posix.o` && g++ -c -iquote . -Iinclude -I/home/jvanriper/Documents/rust/rust-media/example/target/debug/build/mp4v2-sys-13ad75970c243e76/out -I/home/jvanriper/Documents/rust/rust-media/example/target/debug/build/mp4v2-sys-13ad75970c243e76/out/include -O2 -fPIC -o /home/jvanriper/Documents/rust/rust-media/example/target/debug/build/mp4v2-sys-13ad75970c243e76/out/libplatform/time/time_posix.o libplatform/time/time_posix.cpp
--- 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:32: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
342 | if (pSlash != '\0') {
| ~~~~~~~^~~~~~~
make: *** [makefile.cargo:155: /home/jvanriper/Documents/rust/rust-media/example/target/debug/build/mp4v2-sys-13ad75970c243e76/out/src/rtphint.o] Error 1
thread 'main' panicked at 'assertion failed: result.success()', /home/jvanriper/.cargo/git/checkouts/mp4v2-631e8f3a85428d68/a6d29cd/build.rs:17:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
`[jvanriper@jvanriper-pc example]$ cargo build
Compiling mp4v2-sys v0.1.0 (https://github.com/pcwalton/mp4v2?branch=servo#a6d29cd6)
error: failed to run custom build command for `mp4v2-sys v0.1.0 (https://github.com/pcwalton/mp4v2?branch=servo#a6d29cd6)`
Caused by:
process didn't exit successfully: `/home/jvanriper/Documents/rust/rust-media/example/target/debug/build/mp4v2-sys-7e5fe25939b2bfd6/build-script-build` (exit status: 101)
--- stdout
mkdir -p `dirname /home/jvanriper/Documents/rust/rust-media/example/target/debug/build/mp4v2-sys-13ad75970c243e76/out/src/rtphint.o` && g++ -c -iquote . -Iinclude -I/home/jvanriper/Documents/rust/rust-media/example/target/debug/build/mp4v2-sys-13ad75970c243e76/out -I/home/jvanriper/Documents/rust/rust-media/example/target/debug/build/mp4v2-sys-13ad75970c243e76/out/include -O2 -fPIC -o /home/jvanriper/Documents/rust/rust-media/example/target/debug/build/mp4v2-sys-13ad75970c243e76/out/src/rtphint.o src/rtphint.cpp
mkdir -p `dirname /home/jvanriper/Documents/rust/rust-media/example/target/debug/build/mp4v2-sys-13ad75970c243e76/out/libplatform/number/random_posix.o` && g++ -c -iquote . -Iinclude -I/home/jvanriper/Documents/rust/rust-media/example/target/debug/build/mp4v2-sys-13ad75970c243e76/out -I/home/jvanriper/Documents/rust/rust-media/example/target/debug/build/mp4v2-sys-13ad75970c243e76/out/include -O2 -fPIC -o /home/jvanriper/Documents/rust/rust-media/example/target/debug/build/mp4v2-sys-13ad75970c243e76/out/libplatform/number/random_posix.o libplatform/number/random_posix.cpp
mkdir -p `dirname /home/jvanriper/Documents/rust/rust-media/example/target/debug/build/mp4v2-sys-13ad75970c243e76/out/libplatform/process/process_posix.o` && g++ -c -iquote . -Iinclude -I/home/jvanriper/Documents/rust/rust-media/example/target/debug/build/mp4v2-sys-13ad75970c243e76/out -I/home/jvanriper/Documents/rust/rust-media/example/target/debug/build/mp4v2-sys-13ad75970c243e76/out/include -O2 -fPIC -o /home/jvanriper/Documents/rust/rust-media/example/target/debug/build/mp4v2-sys-13ad75970c243e76/out/libplatform/process/process_posix.o libplatform/process/process_posix.cpp
mkdir -p `dirname /home/jvanriper/Documents/rust/rust-media/example/target/debug/build/mp4v2-sys-13ad75970c243e76/out/libplatform/time/time_posix.o` && g++ -c -iquote . -Iinclude -I/home/jvanriper/Documents/rust/rust-media/example/target/debug/build/mp4v2-sys-13ad75970c243e76/out -I/home/jvanriper/Documents/rust/rust-media/example/target/debug/build/mp4v2-sys-13ad75970c243e76/out/include -O2 -fPIC -o /home/jvanriper/Documents/rust/rust-media/example/target/debug/build/mp4v2-sys-13ad75970c243e76/out/libplatform/time/time_posix.o libplatform/time/time_posix.cpp
--- 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:32: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
342 | if (pSlash != '\0') {
| ~~~~~~~^~~~~~~
make: *** [makefile.cargo:155: /home/jvanriper/Documents/rust/rust-media/example/target/debug/build/mp4v2-sys-13ad75970c243e76/out/src/rtphint.o] Error 1
thread 'main' panicked at 'assertion failed: result.success()', /home/jvanriper/.cargo/git/checkouts/mp4v2-631e8f3a85428d68/a6d29cd/build.rs:17:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.