diff options
-rw-r--r-- | docs/README | 8 | ||||
-rw-r--r-- | mk/modules.mk | 45 | ||||
-rw-r--r-- | modules/avcodec/avcodec.c | 4 | ||||
-rw-r--r-- | modules/avcodec/avcodec.h | 2 | ||||
-rw-r--r-- | modules/avcodec/decode.c | 2 | ||||
-rw-r--r-- | modules/avcodec/encode.c | 4 | ||||
-rw-r--r-- | modules/avcodec/module.mk | 2 | ||||
-rw-r--r-- | modules/avformat/avf.c | 6 | ||||
-rw-r--r-- | modules/avformat/module.mk | 1 | ||||
-rw-r--r-- | modules/quicktime/quicktime.c | 3 | ||||
-rw-r--r-- | src/config.c | 4 |
11 files changed, 34 insertions, 47 deletions
diff --git a/docs/README b/docs/README index 1534957..f7667b3 100644 --- a/docs/README +++ b/docs/README @@ -93,7 +93,7 @@ Features: * Video-drivers: - iOS avcapture video-source - - FFmpeg libavformat/avdevice input + - FFmpeg/libav libavformat/avdevice input - Cairo video-source test module - Direct Show video-source - MacOSX QTcapture/quicktime video-source @@ -141,8 +141,8 @@ aubridge Audio bridge module audiounit AudioUnit audio driver for MacOSX/iOS auloop Audio-loop test module avcapture Video source using iOS AVFoundation video capture -avcodec Video codec using FFmpeg -avformat Video source using FFmpeg libavformat +avcodec Video codec using FFmpeg/libav libavcodec +avformat Video source using FFmpeg/libav libavformat bv32 BroadVoice32 audio codec cairo Cairo video source celt CELT audio codec (obsolete, use opus instead) @@ -179,7 +179,7 @@ plc Packet Loss Concealment (PLC) using spandsp portaudio Portaudio driver presence Presence module qtcapture Apple QTCapture video source driver -quicktime Apple Quicktime video source driver +quicktime Apple Quicktime video source driver (deprecated) rst Radio streamer using mpg123 sdl Simple DirectMedia Layer (SDL) video output driver sdl2 Simple DirectMedia Layer v2 (SDL2) video output driver diff --git a/mk/modules.mk b/mk/modules.mk index aad0690..96f364d 100644 --- a/mk/modules.mk +++ b/mk/modules.mk @@ -8,12 +8,13 @@ # USE_ALSA ALSA audio driver # USE_AMR Adaptive Multi-Rate (AMR) audio codec # USE_AVCAPTURE AVFoundation video capture for OSX/iOS +# USE_AVCODEC avcodec video codec module +# USE_AVFORMAT avformat video source module # USE_BV32 BroadVoice32 Wideband Audio codec # USE_CAIRO Cairo module # USE_CONS Console input driver # USE_COREAUDIO MacOSX Coreaudio audio driver # USE_EVDEV Event Device module -# USE_FFMPEG FFmpeg video codec libraries # USE_G711 G.711 audio codec # USE_G722 G.722 audio codec # USE_G722_1 G.722.1 audio codec @@ -62,6 +63,12 @@ USE_AMR := $(shell [ -d $(SYSROOT)/include/opencore-amrnb ] || \ [ -d $(SYSROOT_ALT)/include/opencore-amrnb ] || \ [ -d $(SYSROOT)/local/include/amrnb ] || \ [ -d $(SYSROOT)/include/amrnb ] && echo "yes") +USE_AVCODEC := $(shell [ -f $(SYSROOT)/include/libavcodec/avcodec.h ] || \ + [ -f $(SYSROOT)/local/include/libavcodec/avcodec.h ] || \ + [ -f $(SYSROOT_ALT)/include/libavcodec/avcodec.h ] && echo "yes") +USE_AVFORMAT := $(shell [ -f $(SYSROOT)/include/libavformat/avformat.h ] || \ + [ -f $(SYSROOT)/local/include/libavformat/avformat.h ] || \ + [ -f $(SYSROOT_ALT)/include/libavformat/avformat.h ] && echo "yes") USE_BV32 := $(shell [ -f $(SYSROOT)/include/bv32/bv32.h ] || \ [ -f $(SYSROOT)/local/include/bv32/bv32.h ] && echo "yes") USE_CAIRO := $(shell [ -f $(SYSROOT)/include/cairo/cairo.h ] || \ @@ -73,12 +80,6 @@ USE_DTLS := $(shell [ -f $(SYSROOT)/include/openssl/dtls1.h ] || \ USE_DTLS_SRTP := $(shell [ -f $(SYSROOT)/include/openssl/srtp.h ] || \ [ -f $(SYSROOT)/local/include/openssl/srtp.h ] || \ [ -f $(SYSROOT_ALT)/include/openssl/srtp.h ] && echo "yes") -USE_FFMPEG := $(shell [ -f $(SYSROOT)/include/libavcodec/avcodec.h ] || \ - [ -f $(SYSROOT)/local/include/libavcodec/avcodec.h ] || \ - [ -f $(SYSROOT)/include/ffmpeg/libavcodec/avcodec.h ] || \ - [ -f $(SYSROOT)/include/ffmpeg/avcodec.h ] || \ - [ -f $(SYSROOT)/local/ffmpeg/avcodec.h ] || \ - [ -f $(SYSROOT_ALT)/include/libavcodec/avcodec.h ] && echo "yes") USE_G722 := $(shell [ -f $(SYSROOT)/include/spandsp/g722.h ] || \ [ -f $(SYSROOT_ALT)/include/spandsp/g722.h ] || \ [ -f $(SYSROOT)/local/include/spandsp/g722.h ] && echo "yes") @@ -177,18 +178,6 @@ ifeq ($(OS),darwin) USE_COREAUDIO := yes USE_OPENGL := yes -ifneq ($(USE_FFMPEG),) -ifneq ($(shell echo | $(CC) -E -dM - | grep '__LP64__'), ) -LP64 := 1 -endif - -ifndef LP64 -USE_QUICKTIME := yes -endif - -endif - - USE_AVFOUNDATION := \ $(shell [ -d /System/Library/Frameworks/AVFoundation.framework ] \ && echo "yes") @@ -241,6 +230,12 @@ endif ifneq ($(USE_AVCAPTURE),) MODULES += avcapture endif +ifneq ($(USE_AVCODEC),) +MODULES += avcodec +ifneq ($(USE_AVFORMAT),) +MODULES += avformat +endif +endif ifneq ($(USE_BV32),) MODULES += bv32 endif @@ -259,9 +254,6 @@ endif ifneq ($(USE_DTLS_SRTP),) MODULES += dtls_srtp endif -ifneq ($(USE_QUICKTIME),) -MODULES += quicktime -endif ifneq ($(USE_QTCAPTURE),) MODULES += qtcapture CFLAGS += -DQTCAPTURE_RUNLOOP @@ -269,15 +261,6 @@ endif ifneq ($(USE_EVDEV),) MODULES += evdev endif -ifneq ($(USE_FFMPEG),) -USE_FFMPEG_AVFORMAT := 1 -CFLAGS += -I/usr/include/ffmpeg -CFLAGS += -DUSE_FFMPEG -MODULES += avcodec -ifneq ($(USE_FFMPEG_AVFORMAT),) -MODULES += avformat -endif -endif ifneq ($(USE_G711),) MODULES += g711 endif diff --git a/modules/avcodec/avcodec.c b/modules/avcodec/avcodec.c index 1fb1415..2b634df 100644 --- a/modules/avcodec/avcodec.c +++ b/modules/avcodec/avcodec.c @@ -1,5 +1,5 @@ /** - * @file avcodec.c Video codecs using FFmpeg libavcodec + * @file avcodec.c Video codecs using libavcodec * * Copyright (C) 2010 Creytiv.com */ @@ -136,7 +136,7 @@ static int module_init(void) #ifdef USE_X264 debug("avcodec: x264 build %d\n", X264_BUILD); #else - debug("avcodec: using FFmpeg H.264 encoder\n"); + debug("avcodec: using libavcodec H.264 encoder\n"); #endif #if LIBAVCODEC_VERSION_INT < ((53<<16)+(10<<8)+0) diff --git a/modules/avcodec/avcodec.h b/modules/avcodec/avcodec.h index 1d91b27..0b275f3 100644 --- a/modules/avcodec/avcodec.h +++ b/modules/avcodec/avcodec.h @@ -1,5 +1,5 @@ /** - * @file avcodec.h Video codecs using FFmpeg libavcodec -- internal API + * @file avcodec.h Video codecs using libavcodec -- internal API * * Copyright (C) 2010 Creytiv.com */ diff --git a/modules/avcodec/decode.c b/modules/avcodec/decode.c index 289d5a8..06d43b0 100644 --- a/modules/avcodec/decode.c +++ b/modules/avcodec/decode.c @@ -1,5 +1,5 @@ /** - * @file avcodec/decode.c Video codecs using FFmpeg libavcodec -- decoder + * @file avcodec/decode.c Video codecs using libavcodec -- decoder * * Copyright (C) 2010 - 2013 Creytiv.com */ diff --git a/modules/avcodec/encode.c b/modules/avcodec/encode.c index 4742686..db4ae3b 100644 --- a/modules/avcodec/encode.c +++ b/modules/avcodec/encode.c @@ -1,5 +1,5 @@ /** - * @file avcodec/encode.c Video codecs using FFmpeg libavcodec -- encoder + * @file avcodec/encode.c Video codecs using libavcodec -- encoder * * Copyright (C) 2010 - 2013 Creytiv.com */ @@ -173,7 +173,7 @@ static int open_encoder(struct videnc_state *st, st->ctx->time_base.num = 1; st->ctx->time_base.den = prm->fps; - /* params to avoid ffmpeg/x264 default preset error */ + /* params to avoid libavcodec/x264 default preset error */ if (st->codec_id == AV_CODEC_ID_H264) { st->ctx->me_method = ME_UMH; st->ctx->me_range = 16; diff --git a/modules/avcodec/module.mk b/modules/avcodec/module.mk index b209a57..acff21b 100644 --- a/modules/avcodec/module.mk +++ b/modules/avcodec/module.mk @@ -11,7 +11,7 @@ USE_X264 := $(shell [ -f $(SYSROOT)/include/x264.h ] || \ MOD := avcodec $(MOD)_SRCS += avcodec.c h263.c h264.c encode.c decode.c $(MOD)_LFLAGS += -lavcodec -lavutil -CFLAGS += -I/usr/include/ffmpeg +CFLAGS += -DUSE_AVCODEC ifneq ($(USE_X264),) CFLAGS += -DUSE_X264 $(MOD)_LFLAGS += -lx264 diff --git a/modules/avformat/avf.c b/modules/avformat/avf.c index a4724da..71b9557 100644 --- a/modules/avformat/avf.c +++ b/modules/avformat/avf.c @@ -1,5 +1,5 @@ /** - * @file avf.c FFmpeg avformat video-source + * @file avf.c libavformat video-source * * Copyright (C) 2010 Creytiv.com */ @@ -29,9 +29,9 @@ /* backward compat */ #if LIBAVCODEC_VERSION_MAJOR>52 || LIBAVCODEC_VERSION_INT>=((52<<16)+(64<<8)) -#define FFMPEG_HAVE_AVMEDIA_TYPES 1 +#define LIBAVCODEC_HAVE_AVMEDIA_TYPES 1 #endif -#ifndef FFMPEG_HAVE_AVMEDIA_TYPES +#ifndef LIBAVCODEC_HAVE_AVMEDIA_TYPES #define AVMEDIA_TYPE_VIDEO CODEC_TYPE_VIDEO #endif diff --git a/modules/avformat/module.mk b/modules/avformat/module.mk index de37229..efccb72 100644 --- a/modules/avformat/module.mk +++ b/modules/avformat/module.mk @@ -7,5 +7,6 @@ MOD := avformat $(MOD)_SRCS += avf.c $(MOD)_LFLAGS += -lavdevice -lavformat -lavcodec -lavutil -lswscale +CFLAGS += -DUSE_AVFORMAT include mk/mod.mk diff --git a/modules/quicktime/quicktime.c b/modules/quicktime/quicktime.c index 85d47eb..5aa6bd9 100644 --- a/modules/quicktime/quicktime.c +++ b/modules/quicktime/quicktime.c @@ -11,6 +11,9 @@ #include <baresip.h> +/* this module is deprecated, in favour of qtcapture or avcapture */ + + struct vidsrc_st { struct vidsrc *vs; /* inheritance */ pthread_t thread; diff --git a/src/config.c b/src/config.c index 9cee3c6..f7ca5bb 100644 --- a/src/config.c +++ b/src/config.c @@ -592,7 +592,7 @@ int config_write_template(const char *file, const struct config *cfg) #ifdef USE_VIDEO (void)re_fprintf(f, "\n# Video codec Modules (in order)\n"); -#ifdef USE_FFMPEG +#ifdef USE_AVCODEC (void)re_fprintf(f, "module\t\t\t" MOD_PRE "avcodec" MOD_EXT "\n"); #else (void)re_fprintf(f, "#module\t\t\t" MOD_PRE "avcodec" MOD_EXT "\n"); @@ -615,7 +615,7 @@ int config_write_template(const char *file, const struct config *cfg) (void)re_fprintf(f, "#module\t\t\t" MOD_PRE "v4l" MOD_EXT "\n"); (void)re_fprintf(f, "#module\t\t\t" MOD_PRE "v4l2" MOD_EXT "\n"); #endif -#ifdef USE_FFMPEG +#ifdef USE_AVFORMAT (void)re_fprintf(f, "#module\t\t\t" MOD_PRE "avformat" MOD_EXT "\n"); #endif (void)re_fprintf(f, "#module\t\t\t" MOD_PRE "x11grab" MOD_EXT "\n"); |