Commit Graph

63 Commits (move)

Author SHA1 Message Date
Bret Curtis 3ea3d07d44 really purge libav 9 years ago
scrawl c53a56ed6e clear stream errors before attempting the read 10 years ago
scrawl 8c7c89a4aa Port SoundManager 10 years ago
dteviot 1d7f3474fa Fixed more MSVC 2013 warnings. 10 years ago
scrawl fec8cf91f5 Add exception handling to various uses of DataStream::read 10 years ago
Marc Zinnschlag 29c9b6bd01 Merge remote-tracking branch 'scrawl/master' 10 years ago
scrawl 17cb181f88 Use av_get_default_channel_layout for unknown channel layouts 10 years ago
scrawl efa4d09c48 Fix crash when avcodec_decode_audio4 doesn't return a full frame (Fixes #2088) 10 years ago
Marc Zinnschlag 8b3d876534 Merge remote-tracking branch 'lgro/ffmpeg_decoder' 10 years ago
scrawl ac067564ea Don't include al.h in decoder classes, format support check will need to be redone later. For now, resample all formats that might not be supported on any hardware. 10 years ago
scrawl 55c9c0a266 Audio resampling fixes
- 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
10 years ago
scrawl b39d69e98c Videoplayer fixes, play/pause & seeking
- 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
10 years ago
scrawl eb1c24ffe6 Refactor video player engine to get rid of MWSound dependencies
- 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.
10 years ago
scrawl 7252cb63a6 Fix cppcheck issues 10 years ago
Lukasz Gromanowski c72369fafe Simplified casting when comparing to AV_NOPTS_VALUE.
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>
10 years ago
Lukasz Gromanowski 7ad6a94523 Removed a warning about comparision between signed and unsigned variable in ffmpeg_decoder.
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>
10 years ago
Lukasz Gromanowski 6987dd768a Removed a warning about comparision between signed and unsigned variable in ffmpeg_decoder.
Signed-off-by: Lukasz Gromanowski <lgromanowski@gmail.com>
10 years ago
cc9cii 1107156334 Workaround incorrectly reported channel_layout 10 years ago
cc9cii 0121fdca2c Don't use C99 in printf. 10 years ago
cc9cii be74db8b24 Don't use to_string() 10 years ago
cc9cii ecd9dd81ea Moved debug statements before exception.. 10 years ago
cc9cii ce3077c970 Test version with debug statements. Also moved some common code out to a separate file. 10 years ago
cc9cii 48a36442c6 Add libswresample and libavresample support for sounds. 10 years ago
bogglez b56cb7e5ee Remove defunct option for building without FFmpeg
- 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
11 years ago
scrawl 80f66e2157 Fix crash when avformat_open_input fails (Fixes #1522) 11 years ago
slothlife f33559fead Fixes for MSVC warnings, less overall changes
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.
11 years ago
slothlife c160a04ede Revert "Fixes for warnings when building with MSVC"
This reverts commit 46eb20b98c.
11 years ago
slothlife 46eb20b98c Fixes for warnings when building with MSVC
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.
11 years ago
scrawl c8c0e5de38 Fixed code issues found with unity build. Missing include guards, duplicated functions, ... 11 years ago
Lukasz Gromanowski 2d4e06cd50 Updated comments about freeing format_ctx->pb->buffer.
Signed-off-by: Lukasz Gromanowski <lgromanowski@gmail.com>
11 years ago
Lukasz Gromanowski 6107d5bad2 Updated ffmpeg decoder fix
Signed-off-by: Lukasz Gromanowski <lgromanowski@gmail.com>
11 years ago
Lukasz Gromanowski 5c5f87445b Fixes for "Conditional jump or move depends on uninitialised value(s)"
and memleaks reported by valgrind.

Signed-off-by: Lukasz Gromanowski <lgromanowski@gmail.com>
11 years ago
Chris Robinson 35e2b6942a Merge remote-tracking branch 'zini/master' into misc-cleanup 12 years ago
Chris Robinson ceafcc2ebb Support float samples with ffmpeg
Requires the AL_EXT_FLOAT32 extension in OpenAL
12 years ago
Nathan Jeffords 21f502e3dd properly handle potentially non 16 bit planar audio formats 12 years ago
Nathan Jeffords 7ea1f6a02a fixes for using FFMPEG on windows 12 years ago
Nikolay Kasyanov 0d4b0bfd93 Trying to resolve sound issues on OS X with ffmpeg backend 12 years ago
Chris Robinson e9d833be03 Use the packet pts to calculate the decoder sample offset 12 years ago
Chris Robinson 1a771ae671 Merge the stream struct into the parent decoder 12 years ago
Chris Robinson 5fff1c4e47 Update the ffmpeg decoder to use avcodec_decode_audio4 12 years ago
Chris Robinson 5f4c33f896 Only store one packet at a time 12 years ago
Chris Robinson 9d86890d9d Only use one stream for the ffmpeg decoder 12 years ago
Chris Robinson 0a5ab977b7 Use the decoder's sample offset for calculating the stream offset 12 years ago
Chris Robinson 1ea1407707 Support quad, 5.1, and 7.1 with OpenAL and ffmpeg
The other decoders don't guarantee any channel ordering, which makes them
useless.
12 years ago
Chris Robinson 9c831d3039 Add a decoder method to get the "file" name 12 years ago
scrawl 18d8c767bd fix a bunch of warnings, improved error handling, initialize texture to black 12 years ago
scrawl e3dd3d565c fix 2 leaks 12 years ago
scrawl 5f7d349126 several missing includes 12 years ago
Chris Robinson bac6df5563 Avoid leaking an ffmpeg stream 13 years ago
Chris Robinson 15317796bf Handle the wav -> mp3 extension conversion in the sound output backend 13 years ago