Move all to deprecated folder.
This commit is contained in:
@@ -0,0 +1,156 @@
|
||||
Fix linphone compile with newer ffmpeg versions, downloaded from
|
||||
https://github.com/dankamongmen/mediastreamer2/commit/4f438eb8e132a3119284be771e0daad143597ebd
|
||||
|
||||
Fixes
|
||||
http://autobuild.buildroot.net/results/b72/b72b1f6287986af3d686cc3c8b9c1b3fd9419d29/
|
||||
|
||||
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
|
||||
|
||||
|
||||
From 4f438eb8e132a3119284be771e0daad143597ebd Mon Sep 17 00:00:00 2001
|
||||
From: nick black <nick.black@sprezzatech.com>
|
||||
Date: Mon, 28 Jan 2013 23:54:17 -0500
|
||||
Subject: [PATCH] adapt to new libav API
|
||||
|
||||
---
|
||||
src/utils/ffmpeg-priv.h | 1 +
|
||||
src/videofilters/h264dec.c | 6 +++---
|
||||
src/videofilters/jpegwriter.c | 6 +++---
|
||||
src/videofilters/nowebcam.c | 6 +++---
|
||||
src/videofilters/videodec.c | 8 ++++----
|
||||
src/videofilters/videoenc.c | 6 +++---
|
||||
6 files changed, 17 insertions(+), 16 deletions(-)
|
||||
|
||||
diff --git a/src/utils/ffmpeg-priv.h b/src/utils/ffmpeg-priv.h
|
||||
index 0eab098..a405c05 100644
|
||||
--- a/src/utils/ffmpeg-priv.h
|
||||
+++ b/src/utils/ffmpeg-priv.h
|
||||
@@ -35,6 +35,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
/* new layout */
|
||||
# include <libavcodec/avcodec.h>
|
||||
# include <libavutil/avutil.h>
|
||||
+# include <libavutil/mem.h>
|
||||
#else
|
||||
/* old layout */
|
||||
# include <ffmpeg/avcodec.h>
|
||||
diff --git a/src/videofilters/h264dec.c b/src/videofilters/h264dec.c
|
||||
index 5229b5e..7059634 100644
|
||||
--- a/src/videofilters/h264dec.c
|
||||
+++ b/src/videofilters/h264dec.c
|
||||
@@ -58,10 +58,10 @@ static void dec_open(DecData *d){
|
||||
int error;
|
||||
codec=avcodec_find_decoder(CODEC_ID_H264);
|
||||
if (codec==NULL) ms_fatal("Could not find H264 decoder in ffmpeg.");
|
||||
- avcodec_get_context_defaults(&d->av_context);
|
||||
- error=avcodec_open(&d->av_context,codec);
|
||||
+ avcodec_get_context_defaults3(&d->av_context, codec);
|
||||
+ error=avcodec_open2(&d->av_context,codec, NULL);
|
||||
if (error!=0){
|
||||
- ms_fatal("avcodec_open() failed.");
|
||||
+ ms_fatal("avcodec_open2() failed.");
|
||||
}
|
||||
}
|
||||
|
||||
diff --git a/src/videofilters/jpegwriter.c b/src/videofilters/jpegwriter.c
|
||||
index cca79c5..daf3cdb 100644
|
||||
--- a/src/videofilters/jpegwriter.c
|
||||
+++ b/src/videofilters/jpegwriter.c
|
||||
@@ -90,7 +90,7 @@ static void jpg_process(MSFilter *f){
|
||||
mblk_t *jpegm;
|
||||
struct SwsContext *sws_ctx;
|
||||
|
||||
- AVCodecContext *avctx=avcodec_alloc_context();
|
||||
+ AVCodecContext *avctx=avcodec_alloc_context3(NULL);
|
||||
|
||||
avctx->width=yuvbuf.w;
|
||||
avctx->height=yuvbuf.h;
|
||||
@@ -98,9 +98,9 @@ static void jpg_process(MSFilter *f){
|
||||
avctx->time_base.den =1;
|
||||
avctx->pix_fmt=PIX_FMT_YUVJ420P;
|
||||
|
||||
- error=avcodec_open(avctx,s->codec);
|
||||
+ error=avcodec_open2(avctx,s->codec,NULL);
|
||||
if (error!=0) {
|
||||
- ms_error("avcodec_open() failed: %i",error);
|
||||
+ ms_error("avcodec_open2() failed: %i",error);
|
||||
cleanup(s,NULL);
|
||||
av_free(avctx);
|
||||
return;
|
||||
diff --git a/src/videofilters/nowebcam.c b/src/videofilters/nowebcam.c
|
||||
index f1c10de..b45f89f 100644
|
||||
--- a/src/videofilters/nowebcam.c
|
||||
+++ b/src/videofilters/nowebcam.c
|
||||
@@ -68,9 +68,9 @@ static mblk_t *jpeg2yuv(uint8_t *jpgbuf, int bufsize, MSVideoSize *reqsize){
|
||||
return NULL;
|
||||
}
|
||||
|
||||
- avcodec_get_context_defaults(&av_context);
|
||||
- if (avcodec_open(&av_context,codec)<0){
|
||||
- ms_error("jpeg2yuv: avcodec_open failed");
|
||||
+ avcodec_get_context_defaults3(&av_context,NULL);
|
||||
+ if (avcodec_open2(&av_context,codec,NULL)<0){
|
||||
+ ms_error("jpeg2yuv: avcodec_open2 failed");
|
||||
return NULL;
|
||||
}
|
||||
av_init_packet(&pkt);
|
||||
diff --git a/src/videofilters/videodec.c b/src/videofilters/videodec.c
|
||||
index 9807214..2f1b452 100644
|
||||
--- a/src/videofilters/videodec.c
|
||||
+++ b/src/videofilters/videodec.c
|
||||
@@ -53,7 +53,7 @@ static void dec_init(MSFilter *f, enum CodecID cid){
|
||||
DecState *s=(DecState *)ms_new0(DecState,1);
|
||||
ms_ffmpeg_check_init();
|
||||
|
||||
- avcodec_get_context_defaults(&s->av_context);
|
||||
+ avcodec_get_context_defaults3(&s->av_context,NULL);
|
||||
s->av_codec=NULL;
|
||||
s->codec=cid;
|
||||
s->input=NULL;
|
||||
@@ -135,7 +135,7 @@ static void dec_preprocess(MSFilter *f){
|
||||
if (s->av_context.codec==NULL){
|
||||
/* we must know picture size before initializing snow decoder*/
|
||||
if (s->codec!=CODEC_ID_SNOW){
|
||||
- error=avcodec_open(&s->av_context, s->av_codec);
|
||||
+ error=avcodec_open2(&s->av_context, s->av_codec, NULL);
|
||||
if (error!=0) ms_error("avcodec_open() failed: %i",error);
|
||||
if (s->codec==CODEC_ID_MPEG4 && s->dci_size>0){
|
||||
s->av_context.extradata=s->dci;
|
||||
@@ -225,8 +225,8 @@ static mblk_t * parse_snow_header(DecState *s,mblk_t *inm){
|
||||
int error;
|
||||
s->av_context.width=h>>16;
|
||||
s->av_context.height=h&0xffff;
|
||||
- error=avcodec_open(&s->av_context, s->av_codec);
|
||||
- if (error!=0) ms_error("avcodec_open() failed for snow: %i",error);
|
||||
+ error=avcodec_open2(&s->av_context, s->av_codec, NULL);
|
||||
+ if (error!=0) ms_error("avcodec_open2() failed for snow: %i",error);
|
||||
else {
|
||||
s->snow_initialized=TRUE;
|
||||
ms_message("Snow decoder initialized,size=%ix%i",
|
||||
diff --git a/src/videofilters/videoenc.c b/src/videofilters/videoenc.c
|
||||
index da35592..4101772 100644
|
||||
--- a/src/videofilters/videoenc.c
|
||||
+++ b/src/videofilters/videoenc.c
|
||||
@@ -242,7 +242,7 @@ static void prepare(EncState *s){
|
||||
AVCodecContext *c=&s->av_context;
|
||||
const int max_br_vbv=128000;
|
||||
|
||||
- avcodec_get_context_defaults(c);
|
||||
+ avcodec_get_context_defaults3(c,NULL);
|
||||
if (s->codec==CODEC_ID_MJPEG)
|
||||
{
|
||||
ms_message("Codec bitrate set to %i",c->bit_rate);
|
||||
@@ -348,9 +348,9 @@ static void enc_preprocess(MSFilter *f){
|
||||
ms_error("could not find encoder for codec id %i",s->codec);
|
||||
return;
|
||||
}
|
||||
- error=avcodec_open(&s->av_context, s->av_codec);
|
||||
+ error=avcodec_open2(&s->av_context, s->av_codec, NULL);
|
||||
if (error!=0) {
|
||||
- ms_error("avcodec_open() failed: %i",error);
|
||||
+ ms_error("avcodec_open2() failed: %i",error);
|
||||
return;
|
||||
}
|
||||
video_starter_init(&s->starter);
|
||||
--
|
||||
2.0.3
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
config BR2_PACKAGE_MEDIASTREAMER
|
||||
bool "mediastreamer"
|
||||
select BR2_PACKAGE_ORTP
|
||||
depends on BR2_INSTALL_LIBSTDCPP # until fixed
|
||||
depends on BR2_TOOLCHAIN_HAS_THREADS # ortp
|
||||
help
|
||||
Mediastreamer is a powerful and lightweighted streaming
|
||||
engine specialized for voice/video telephony applications.
|
||||
|
||||
It is the library that is responsible for all the receiving
|
||||
and sending of multimedia streams in linphone, including
|
||||
voice/video capture, encoding and decoding, and rendering.
|
||||
|
||||
http://www.linphone.org/eng/documentation/dev/mediastreamer2.html
|
||||
|
||||
comment "mediastreamer needs a toolchain w/ threads, C++"
|
||||
depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_HAS_THREADS
|
||||
@@ -0,0 +1,2 @@
|
||||
# Locally calculated after checking pgp signature
|
||||
sha256 c245b9444c2abb4c84433606e01f0b3ce29ce78de0afe1e191f4f3c62656acd5 mediastreamer-2.9.0.tar.gz
|
||||
@@ -0,0 +1,109 @@
|
||||
################################################################################
|
||||
#
|
||||
# mediastreamer
|
||||
#
|
||||
################################################################################
|
||||
|
||||
MEDIASTREAMER_VERSION = 2.9.0
|
||||
MEDIASTREAMER_SITE = http://download.savannah.nongnu.org/releases/linphone/mediastreamer
|
||||
MEDIASTREAMER_INSTALL_STAGING = YES
|
||||
MEDIASTREAMER_DEPENDENCIES = host-intltool host-pkgconf ortp host-gettext
|
||||
# tests fail linking on some architectures, so disable them
|
||||
MEDIASTREAMER_CONF_OPTS = --disable-tests --disable-glx --disable-strict
|
||||
MEDIASTREAMER_LICENSE = GPLv2+
|
||||
MEDIASTREAMER_LICENSE_FILES = COPYING
|
||||
|
||||
ifeq ($(BR2_PACKAGE_ALSA_LIB_MIXER)$(BR2_PACKAGE_ALSA_LIB_PCM),yy)
|
||||
MEDIASTREAMER_CONF_OPTS += --enable-alsa
|
||||
MEDIASTREAMER_DEPENDENCIES += alsa-lib
|
||||
else
|
||||
MEDIASTREAMER_CONF_OPTS += --disable-alsa
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBUPNP),y)
|
||||
MEDIASTREAMER_CONF_OPTS += --enable-upnp
|
||||
MEDIASTREAMER_DEPENDENCIES += libupnp
|
||||
else
|
||||
MEDIASTREAMER_CONF_OPTS += --disable-upnp
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBVPX),y)
|
||||
MEDIASTREAMER_CONF_OPTS += --enable-vp8
|
||||
MEDIASTREAMER_DEPENDENCIES += libvpx
|
||||
else
|
||||
MEDIASTREAMER_CONF_OPTS += --disable-vp8
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_OPUS),y)
|
||||
MEDIASTREAMER_CONF_OPTS += --enable-opus
|
||||
MEDIASTREAMER_DEPENDENCIES += opus
|
||||
else
|
||||
MEDIASTREAMER_CONF_OPTS += --disable-opus
|
||||
endif
|
||||
|
||||
# portaudio backend needs speex as well
|
||||
ifeq ($(BR2_PACKAGE_PORTAUDIO)$(BR2_PACKAGE_SPEEX),yy)
|
||||
MEDIASTREAMER_CONF_OPTS += --enable-portaudio
|
||||
MEDIASTREAMER_DEPENDENCIES += portaudio speex
|
||||
else
|
||||
MEDIASTREAMER_CONF_OPTS += --disable-portaudio
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_PULSEAUDIO),y)
|
||||
MEDIASTREAMER_CONF_OPTS += --enable-pulseaudio
|
||||
MEDIASTREAMER_DEPENDENCIES += pulseaudio
|
||||
else
|
||||
MEDIASTREAMER_CONF_OPTS += --disable-pulseaudio
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_SPEEX),y)
|
||||
MEDIASTREAMER_CONF_OPTS += --enable-speex
|
||||
MEDIASTREAMER_DEPENDENCIES += speex
|
||||
else
|
||||
MEDIASTREAMER_CONF_OPTS += --disable-speex
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_FFMPEG_SWSCALE),y)
|
||||
MEDIASTREAMER_CONF_OPTS += --enable-ffmpeg
|
||||
MEDIASTREAMER_DEPENDENCIES += ffmpeg
|
||||
else
|
||||
MEDIASTREAMER_CONF_OPTS += --disable-ffmpeg
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_SDL),y)
|
||||
MEDIASTREAMER_CONF_OPTS += --enable-sdl
|
||||
MEDIASTREAMER_DEPENDENCIES += sdl
|
||||
else
|
||||
MEDIASTREAMER_CONF_OPTS += --disable-sdl
|
||||
endif
|
||||
|
||||
# mediastreamer assumes SDL has X11 support if --enable-x11 (and X11 support
|
||||
# is only used for SDL output)
|
||||
ifeq ($(BR2_PACKAGE_SDL_X11),y)
|
||||
MEDIASTREAMER_CONF_OPTS += --enable-x11
|
||||
else
|
||||
MEDIASTREAMER_CONF_OPTS += --disable-x11
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_XLIB_LIBXV),y)
|
||||
MEDIASTREAMER_CONF_OPTS += --enable-xv
|
||||
MEDIASTREAMER_DEPENDENCIES += xlib_libXv
|
||||
else
|
||||
MEDIASTREAMER_CONF_OPTS += --disable-xv
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBTHEORA),y)
|
||||
MEDIASTREAMER_CONF_OPTS += --enable-theora
|
||||
MEDIASTREAMER_DEPENDENCIES += libtheora
|
||||
else
|
||||
MEDIASTREAMER_CONF_OPTS += --disable-theora
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBV4L),y)
|
||||
MEDIASTREAMER_CONF_OPTS += --enable-libv4l1 --enable-libv4l2
|
||||
MEDIASTREAMER_DEPENDENCIES += libv4l
|
||||
else
|
||||
MEDIASTREAMER_CONF_OPTS += --disable-libv4l1 --disable-libv4l2
|
||||
endif
|
||||
|
||||
$(eval $(autotools-package))
|
||||
Reference in New Issue
Block a user