mirror of
https://github.com/owntone/owntone-server.git
synced 2025-11-23 19:17:46 -05:00
Added support for libav/ffmpeg dual installs (#346)
* [config] Added support for libav/ffmpeg dual installs Reordered CPPFLAGS/LIBS so that library flags (includes etc) appear ahead of prefix/global directives and the correct headers/libraries are checked (if symbols are defined in alternative libraries). Updated libav checks to use header declaration checks rather than link checks (so differences between libav/ffmpeg can be correctly found), and updated code references to use new defines. Added support the alternate pkg-config package names for libav. Updated ffmpeg vs libav check to check MICRO version number (>=100 for ffmpeg). Simplified resulting configure script by using a function to merge CPPFLAGS variables. * [config] Use FORKED_OPTS prefix for libevent_pthreads option * [config] Add --with-libav option to select libav even if ffmpeg present
This commit is contained in:
@@ -33,14 +33,7 @@
|
||||
#include <libavutil/time.h>
|
||||
#include <libavutil/pixdesc.h>
|
||||
|
||||
#ifdef HAVE_LIBAVFILTER
|
||||
# ifdef HAVE_LIBAVUTIL_CHANNEL_LAYOUT_H
|
||||
# include <libavutil/channel_layout.h>
|
||||
# endif
|
||||
# include <libavfilter/avcodec.h>
|
||||
#else
|
||||
# include "ffmpeg-compat.h"
|
||||
#endif
|
||||
#include "ffmpeg-compat.h"
|
||||
|
||||
#include "logger.h"
|
||||
#include "conffile.h"
|
||||
@@ -408,7 +401,7 @@ encode_write_frame(struct encode_ctx *ctx, AVFrame *filt_frame, unsigned int str
|
||||
return ret;
|
||||
}
|
||||
|
||||
#if defined(HAVE_AV_BUFFERSRC_ADD_FRAME_FLAGS) && defined(HAVE_AV_BUFFERSINK_GET_FRAME)
|
||||
#if HAVE_DECL_AV_BUFFERSRC_ADD_FRAME_FLAGS && HAVE_DECL_AV_BUFFERSINK_GET_FRAME
|
||||
static int
|
||||
filter_encode_write_frame(struct encode_ctx *ctx, AVFrame *frame, unsigned int stream_index)
|
||||
{
|
||||
@@ -863,7 +856,7 @@ close_output(struct encode_ctx *ctx)
|
||||
avformat_free_context(ctx->ofmt_ctx);
|
||||
}
|
||||
|
||||
#ifdef HAVE_AVFILTER_GRAPH_PARSE_PTR
|
||||
#if HAVE_DECL_AVFILTER_GRAPH_PARSE_PTR
|
||||
static int
|
||||
open_filter(struct filter_ctx *filter_ctx, AVCodecContext *dec_ctx, AVCodecContext *enc_ctx, const char *filter_spec)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user