This repository has been archived on 2024-11-07. You can view files and clone it, but cannot push or open issues or pull requests.
qutecom/qutecom-3.0.20141007hg-ffmpeg-2.3.3.patch

143 lines
6.1 KiB
Diff

diff -Nru qutecom-3.0.20141007hg/engine.orig/verona/mediastreamer2/src/videodec.c qutecom-3.0.20141007hg/engine/verona/mediastreamer2/src/videodec.c
--- qutecom-3.0.20141007hg/engine.orig/verona/mediastreamer2/src/videodec.c 2014-10-07 21:08:35.619678212 +0200
+++ qutecom-3.0.20141007hg/engine/verona/mediastreamer2/src/videodec.c 2014-10-07 21:06:55.308693406 +0200
@@ -35,7 +35,7 @@
typedef struct DecState{
AVCodecContext av_context;
AVCodec *av_codec;
- enum CodecID codec;
+ enum AVCodecID codec;
mblk_t *input;
YuvBuf outbuf;
mblk_t *yuv_msg;
@@ -49,7 +49,7 @@
}DecState;
-static void dec_init(MSFilter *f, enum CodecID cid){
+static void dec_init(MSFilter *f, enum AVCodecID cid){
DecState *s=(DecState *)ms_new0(DecState,1);
ms_ffmpeg_check_init();
diff -Nru qutecom-3.0.20141007hg/engine.orig/verona/mediastreamer2/src/videoenc.c qutecom-3.0.20141007hg/engine/verona/mediastreamer2/src/videoenc.c
--- qutecom-3.0.20141007hg/engine.orig/verona/mediastreamer2/src/videoenc.c 2014-10-07 21:08:45.957676613 +0200
+++ qutecom-3.0.20141007hg/engine/verona/mediastreamer2/src/videoenc.c 2014-10-07 21:05:38.668685534 +0200
@@ -102,7 +102,7 @@
typedef struct EncState{
AVCodecContext av_context;
AVCodec *av_codec;
- enum CodecID codec;
+ enum AVCodecID codec;
mblk_t *comp_buf;
MSVideoSize vsize;
int mtu; /* network maximum transmission unit in bytes */
@@ -203,7 +203,7 @@
return 0;
}
-static void enc_init(MSFilter *f, enum CodecID codec)
+static void enc_init(MSFilter *f, enum AVCodecID codec)
{
EncState *s=(EncState *)ms_new(EncState,1);
f->data=s;
diff -Nru qutecom-3.0.20141007hg/engine/verona/mediastreamer2/src.orig/h264dec.c qutecom-3.0.20141007hg/engine/verona/mediastreamer2/src/h264dec.c
--- qutecom-3.0.20141007hg/engine/verona/mediastreamer2/src.orig/h264dec.c 2014-10-07 13:51:50.000000000 +0200
+++ qutecom-3.0.20141007hg/engine/verona/mediastreamer2/src/h264dec.c 2014-10-07 22:20:26.653280014 +0200
@@ -58,8 +58,8 @@
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.");
}
diff -Nru qutecom-3.0.20141007hg/engine/verona/mediastreamer2/src.orig/jpegwriter.c qutecom-3.0.20141007hg/engine/verona/mediastreamer2/src/jpegwriter.c
--- qutecom-3.0.20141007hg/engine/verona/mediastreamer2/src.orig/jpegwriter.c 2014-10-07 13:51:50.000000000 +0200
+++ qutecom-3.0.20141007hg/engine/verona/mediastreamer2/src/jpegwriter.c 2014-10-07 22:23:08.862893951 +0200
@@ -90,7 +90,7 @@
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,7 +98,7 @@
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);
cleanup(s,NULL);
diff -Nru qutecom-3.0.20141007hg/engine/verona/mediastreamer2/src.orig/nowebcam.c qutecom-3.0.20141007hg/engine/verona/mediastreamer2/src/nowebcam.c
--- qutecom-3.0.20141007hg/engine/verona/mediastreamer2/src.orig/nowebcam.c 2014-10-07 13:51:50.000000000 +0200
+++ qutecom-3.0.20141007hg/engine/verona/mediastreamer2/src/nowebcam.c 2014-10-07 22:20:43.030241037 +0200
@@ -68,8 +68,8 @@
return NULL;
}
- avcodec_get_context_defaults(&av_context);
- if (avcodec_open(&av_context,codec)<0){
+ avcodec_get_context_defaults3(&av_context, &codec);
+ if (avcodec_open2(&av_context,codec,NULL)<0){
ms_error("jpeg2yuv: avcodec_open failed");
return NULL;
}
diff -Nru qutecom-3.0.20141007hg/engine/verona/mediastreamer2/src.orig/videodec.c qutecom-3.0.20141007hg/engine/verona/mediastreamer2/src/videodec.c
--- qutecom-3.0.20141007hg/engine/verona/mediastreamer2/src.orig/videodec.c 2014-10-07 21:47:09.706146320 +0200
+++ qutecom-3.0.20141007hg/engine/verona/mediastreamer2/src/videodec.c 2014-10-07 22:21:03.112193241 +0200
@@ -53,7 +53,7 @@
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, &s->codec);
s->av_codec=NULL;
s->codec=cid;
s->input=NULL;
@@ -135,7 +135,7 @@
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,7 +225,7 @@
int error;
s->av_context.width=h>>16;
s->av_context.height=h&0xffff;
- 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 for snow: %i",error);
else {
s->snow_initialized=TRUE;
diff -Nru qutecom-3.0.20141007hg/engine/verona/mediastreamer2/src.orig/videoenc.c qutecom-3.0.20141007hg/engine/verona/mediastreamer2/src/videoenc.c
--- qutecom-3.0.20141007hg/engine/verona/mediastreamer2/src.orig/videoenc.c 2014-10-07 21:47:09.706146320 +0200
+++ qutecom-3.0.20141007hg/engine/verona/mediastreamer2/src/videoenc.c 2014-10-07 22:22:33.325978530 +0200
@@ -242,7 +242,7 @@
AVCodecContext *c=&s->av_context;
const int max_br_vbv=128000;
- avcodec_get_context_defaults(c);
+ avcodec_get_context_defaults3(c, &s->codec);
if (s->codec==CODEC_ID_MJPEG)
{
ms_message("Codec bitrate set to %i",c->bit_rate);
@@ -348,7 +348,7 @@
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);
return;