Skip to content

Commit

Permalink
really purge libav
Browse files Browse the repository at this point in the history
  • Loading branch information
psi29a committed Nov 12, 2015
1 parent 39f89f9 commit 3ea3d07
Show file tree
Hide file tree
Showing 8 changed files with 3 additions and 261 deletions.
15 changes: 2 additions & 13 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -107,22 +107,11 @@ unset(FFMPEG_LIBRARIES CACHE)

find_package(FFmpeg REQUIRED)

set (FFMPEG_LIBRARIES ${FFMPEG_LIBRARIES} ${SWSCALE_LIBRARY})
set (FFMPEG_LIBRARIES ${FFMPEG_LIBRARIES} ${SWSCALE_LIBRARY} ${SWRESAMPLE_LIBRARIES})

if ( NOT AVCODEC_FOUND OR NOT AVFORMAT_FOUND OR NOT AVUTIL_FOUND OR NOT SWSCALE_FOUND )
if ( NOT AVCODEC_FOUND OR NOT AVFORMAT_FOUND OR NOT AVUTIL_FOUND OR NOT SWSCALE_FOUND OR NOT SWRESAMPLE_FOUND)
message(FATAL_ERROR "FFmpeg component required, but not found!")
endif()
set(SOUND_INPUT_INCLUDES ${FFMPEG_INCLUDE_DIRS})
if( SWRESAMPLE_FOUND )
add_definitions(-DHAVE_LIBSWRESAMPLE)
set (FFMPEG_LIBRARIES ${FFMPEG_LIBRARIES} ${SWRESAMPLE_LIBRARIES})
else()
if( AVRESAMPLE_FOUND )
set (FFMPEG_LIBRARIES ${FFMPEG_LIBRARIES} ${AVRESAMPLE_LIBRARIES})
else()
message(FATAL_ERROR "Install either libswresample (FFmpeg) or libavresample (Libav).")
endif()
endif()
# Required for building the FFmpeg headers
add_definitions(-D__STDC_CONSTANT_MACROS)

Expand Down
2 changes: 1 addition & 1 deletion apps/openmw/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ add_openmw_dir (mwscript
)

add_openmw_dir (mwsound
soundmanagerimp openal_output ffmpeg_decoder sound sound_decoder sound_output loudness libavwrapper movieaudiofactory
soundmanagerimp openal_output ffmpeg_decoder sound sound_decoder sound_output loudness movieaudiofactory
)

add_openmw_dir (mwworld
Expand Down
10 changes: 0 additions & 10 deletions apps/openmw/mwsound/ffmpeg_decoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,6 @@
#include <stdexcept>
#include <sstream>

extern "C" {
#ifndef HAVE_LIBSWRESAMPLE
// FIXME: remove this section once libswresample is packaged for Debian
int swr_init(AVAudioResampleContext *avr);
void swr_free(AVAudioResampleContext **avr);
int swr_convert( AVAudioResampleContext *avr, uint8_t** output, int out_samples, const uint8_t** input, int in_samples);
AVAudioResampleContext * swr_alloc_set_opts( AVAudioResampleContext *avr, int64_t out_ch_layout, AVSampleFormat out_fmt, int out_rate, int64_t in_ch_layout, AVSampleFormat in_fmt, int in_rate, int o, void* l);
#endif
}

#include <components/vfs/manager.hpp>

namespace MWSound
Expand Down
6 changes: 0 additions & 6 deletions apps/openmw/mwsound/ffmpeg_decoder.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,7 @@ extern "C"
// From version 54.56 binkaudio encoding format changed from S16 to FLTP. See:
// https://gitorious.org/ffmpeg/ffmpeg/commit/7bfd1766d1c18f07b0a2dd042418a874d49ea60d
// http://ffmpeg.zeranoe.com/forum/viewtopic.php?f=15&t=872
#ifdef HAVE_LIBSWRESAMPLE
#include <libswresample/swresample.h>
#else
#include <libavresample/avresample.h>
#include <libavutil/opt.h>
#define SwrContext AVAudioResampleContext
#endif
}

#include <components/files/constrainedfilestream.hpp>
Expand Down
108 changes: 0 additions & 108 deletions apps/openmw/mwsound/libavwrapper.cpp

This file was deleted.

1 change: 0 additions & 1 deletion extern/osg-ffmpeg-videoplayer/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ set(OSG_FFMPEG_VIDEOPLAYER_SOURCE_FILES
videoplayer.cpp
videostate.cpp
videodefs.hpp
libavwrapper.cpp
audiodecoder.cpp
audiofactory.hpp
)
Expand Down
12 changes: 0 additions & 12 deletions extern/osg-ffmpeg-videoplayer/audiodecoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,12 @@ extern "C"

#include <libavcodec/avcodec.h>

#ifdef HAVE_LIBSWRESAMPLE
#include <libswresample/swresample.h>
#else
// FIXME: remove this section once libswresample is packaged for Debian
#include <libavresample/avresample.h>
#include <libavutil/opt.h>
#define SwrContext AVAudioResampleContext
int swr_init(AVAudioResampleContext *avr);
void swr_free(AVAudioResampleContext **avr);
int swr_convert( AVAudioResampleContext *avr, uint8_t** output, int out_samples, const uint8_t** input, int in_samples);
AVAudioResampleContext * swr_alloc_set_opts( AVAudioResampleContext *avr, int64_t out_ch_layout, AVSampleFormat out_fmt, int out_rate, int64_t in_ch_layout, AVSampleFormat in_fmt, int in_rate, int o, void* l);
#endif

#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(55,28,1)
#define av_frame_alloc avcodec_alloc_frame
#endif


}

#include "videostate.hpp"
Expand Down
110 changes: 0 additions & 110 deletions extern/osg-ffmpeg-videoplayer/libavwrapper.cpp

This file was deleted.

0 comments on commit 3ea3d07

Please sign in to comment.