pcwalton / rust-media

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

WIP: Upgrade to latest nightly #14

Closed Gankra closed 9 years ago

Gankra commented 9 years ago

So I know this library is supposed to be pegged to the version of Rust that Servo uses, but I thought maybe it would be worth having a branch that is updated separately?

Changes are broken up into a few logical commits. The last two are just trivial fixups, but the first two are important.

The first adds PhantomData to bind the variance of the otherwise unused lifetimes. I don't believe master is actually valid without this change (s/PhantomData/ContravariantLifetime should be the equivalent servo-version-friendly change), as the lifetimes are otherwise bivariant, as I understand it.

This actually revealed a lifetime bug in the code that the second patch attempts to resolve. I say attempts because I'm not 100% sure what semantics you were going for. I went for the one that seemed to match up with usage.

TBD: updating the example code. This requires updating the sdl2 dependencies, which are currently hardcoded to some commit. Need to look into what the appropriate version to update to is. Any insight on this matter would be appreciated.

Gankra commented 9 years ago

Ah, sdl2 master has undergone a major API refactor. Gonna take me a bit to learn the new API and migrate things (also found another lifetime issue in libavcodec).

Gankra commented 9 years ago

Alright everything works on the nightly now :)

pcwalton commented 9 years ago

I'll be happy to merge this into a new branch if you squash everything into one commit. Thanks!

Gankra commented 9 years ago

squashed

pcwalton commented 9 years ago

This is now in the nightly branch.