- Don't try to use float audio or extended channel layouts if the hardware does not support them
- Add channel layout resampling support to ffmpeg_decoder
- Fix rindex overflow
- Fix audio sample size bugs (was using sample_fmt and channel count of the decoder, instead of the resampled settings). We didn't notice this bug before, because the OpenAL MovieAudioFactory tries to resample to a format of the same byte size.
- Add support for play/pause and seeking controls (not used by cutscenes in OpenMW)
- Closing the video when arriving at the stream end is now handled by the user (we may also want to keep the video open and seek back)
The video player now has a standalone demo, at https://github.com/scrawl/ogre-ffmpeg-videoplayer
- Split video player to separate source files.
- Move video player engine sources to extern/ (repository will be set up on github soon).
- Audio is handled in a MovieAudioFactory, implemented by the user (here in MWSound subsystem).
- Handle conversion of unsupported channel layouts via ffmpeg's swresample.
AV_NOPTS_VALUE is casted to int64_t when compared with pts,
so with libavc >= 56.1 it should be no-op because in that version
it's already signed int.
Signed-off-by: Lukasz Gromanowski <lgromanowski@gmail.com>
Added ifdefs because changes in API were introduced in libavc 56.1
and this code doesn't compile with older versions (ie. on Ubuntu, or Debian)
Signed-off-by: Lukasz Gromanowski <lgromanowski@gmail.com>
- Added REQUIRED to find_package(FFmpeg)
- Removed USE_FFMPEG option from CMakeLists.txt
- Always use FFmpeg for sound input
- Removed SOUND_DEFINE from CMakeLists.txt
- Removed #else branch from videoplayer.cpp with dummy VideoState code
(FFmpeg is now guaranteed to exist and the code was incomplete)
- Remove #ifdef OPENMW_USE_FFMPEG in ffmpeg_decoder.cpp, it is guaranteed to be used
- Remove #ifdef OPENMW_USE_FFMPEG from soundmanagerimp.cpp, it is guaranteed to be used
Kept some fixes from the first round of review. Found out that several
targets weren't being built with the same basic warnings disabled.
Disabled a few warnings for external libraries specifically, rather than
applying them to all targets.
Most warnings are innocuous (wrong type-specifier for forward
declarations, conversion of literals into unsigned integers, warnings
about methods optimized out), but I believe actual bugs were revealed in
vartypedelegate.cpp and combat.cpp.