wheybags / freeablo

[ARCHIVED] Modern reimplementation of the Diablo 1 game engine
GNU General Public License v3.0
2.16k stars 195 forks source link

Add video playback (libmpv) #410

Closed grantramsay closed 5 years ago

grantramsay commented 5 years ago

Fix for #27

Working video playback, only tested on a mac so far. Just install mpv Also has a stub video implementation that just skips videos if cmake can't find mpv. Click esc to skip videos

wheybags commented 5 years ago

This looks ok to me, but I get a link error (probably related to distrto packages)

/usr/bin/ld: //usr/lib/x86_64-linux-gnu/libopenmpt.so.0: undefined reference to `std::random_device::_M_getentropy() const@GLIBCXX_3.4.25'

Before something like this is merged, I'd prefer to switch to using a hunter package

It seems at the moment, there is no package for libmpv, so one would need to be added. Is this something you're interested in doing?

grantramsay commented 5 years ago

That's annoying the build didn't work, mpv mention linux users are better off to use 3rd party packages, not sure if that'd help.

I had a quick look at hunter, looks like quite a bit of effort to add libmpv... i.e:

Edit: That last commit is a bit rough and includes the (rather large) prebuilt libraries to get it working for MSVC. Works on my windows VM, but it's more just to show the gist of what might be needed (in hunter or freeablo) rather than to merge

wheybags commented 5 years ago

would that involve also adding all libmpv dependancies to hunter? e.g. ffmpeg and it's many dependancies etc etc

Unfortunately, yes :(

libmpv can't be built with MSVC

From what I can see, they don't actually say it can't be, they just don't provide instructions for doing so. In any case, we may be able to at some point. I'm not sure what the best coiurse is here. Doing it properly is obviously a massive amount of work, but it would have a great benefit not only to this project, but also to hunter. Maybe we could prepackage static libs for each platform for now (I would really like to stick to static libs, so we don't need any weird stuff when shipping, just one executable).

grantramsay commented 5 years ago

"Maybe we could prepackage static libs for each platform for now" Would that require a package for each linux distribution (i.e. lots)? Be good if package managers were just kept up to date..

I might park this for a while until I have a better understanding of hunter and maybe look into that. Anyone else feel free to carry this on etc

grantramsay commented 5 years ago

Closing this for now