diff --git a/veejay-current/veejay-server/configure.ac b/veejay-current/veejay-server/configure.ac index 4be53dd7..3faff064 100644 --- a/veejay-current/veejay-server/configure.ac +++ b/veejay-current/veejay-server/configure.ac @@ -585,9 +585,9 @@ PKG_CHECK_MODULES( MJPEGTOOLS, [mjpegtools >= 1.6], AC_DEFINE_UNQUOTED(HAVE_FFMPEG_UNINSTALLED,, [Defined if building against uninstalled FFmpeg source]) -PKG_CHECK_MODULES(LIBAVUTIL, [libavutil >= 49.7.0 libavutil < 52.48],have_avutil=true,have_avutil=false) -PKG_CHECK_MODULES(LIBAVCODEC,[libavcodec >= 51.35.2 libavcodec < 55.39],have_avcodec=true,have_avcodec=false) -PKG_CHECK_MODULES(LIBAVFORMAT,[libavformat >= 52.14.0 libavformat < 55.19],have_avformat=true,have_avformat=false) +PKG_CHECK_MODULES(LIBAVUTIL, [libavutil >= 49.7.0],have_avutil=true,have_avutil=false) +PKG_CHECK_MODULES(LIBAVCODEC,[libavcodec >= 51.35.2],have_avcodec=true,have_avcodec=false) +PKG_CHECK_MODULES(LIBAVFORMAT,[libavformat >= 52.14.0],have_avformat=true,have_avformat=false) PKG_CHECK_MODULES(LIBSWSCALE,[libswscale >= 0.7.1],have_swscale=true,have_swscale=false) if test x$have_swscale = xfalse; then diff --git a/veejay-current/veejay-server/libel/av.h b/veejay-current/veejay-server/libel/av.h new file mode 100755 index 00000000..557424af --- /dev/null +++ b/veejay-current/veejay-server/libel/av.h @@ -0,0 +1,99 @@ +/* veejay - Linux VeeJay + * (C) 2002-2015 Niels Elburg + * + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + */ + +#ifndef AV_H +#define AV_H +#include +#if LIBAVCODEC_VERSION_MAJOR > 55 + +#ifndef CODEC_ID_MJPEGB +#define CODEC_ID_MJPEGB AV_CODEC_ID_MJPEGB +#endif + +#ifndef CODEC_ID_MPEG4 +#define CODEC_ID_MPEG4 AV_CODEC_ID_MPEG4 +#endif + +#ifndef CODEC_ID_MSMPEG4V3 +#define CODEC_ID_MSMPEG4V3 AV_CODEC_ID_MSMPEG4V3 +#endif + +#ifndef CODEC_ID_DVVIDEO +#define CODEC_ID_DVVIDEO AV_CODEC_ID_DVVIDEO +#endif + +#ifndef CODEC_ID_LJPEG +#define CODEC_ID_LJPEG AV_CODEC_ID_LJPEG +#endif + +#ifndef CODEC_ID_SP5X +#define CODEC_ID_SP5X AV_CODEC_ID_SP5X +#endif + +#ifndef CODEC_ID_THEORA +#define CODEC_ID_THEORA AV_CODEC_ID_THEORA +#endif + +#ifndef CODEC_ID_H264 +#define CODEC_ID_H264 AV_CODEC_ID_H264 +#endif + +#ifndef CODEC_ID_MJPEG +#define CODEC_ID_MJPEG AV_CODEC_ID_MJPEG +#endif + +#ifndef CODEC_ID_PNG +#define CODEC_ID_PNG AV_CODEC_ID_PNG +#endif + +#ifndef CODEC_ID_MSMPEG4V2 +#define CODEC_ID_MSMPEG4V2 AV_CODEC_ID_MSMPEG4V2 +#endif + +#ifndef CODEC_ID_MSMPEG4V1 +#define CODEC_ID_MSMPEG4V1 AV_CODEC_ID_MSMPEG4V1 +#endif + +#ifndef CODEC_ID_HUFFYUV +#define CODEC_ID_HUFFYUV AV_CODEC_ID_HUFFYUV +#endif + +#ifndef CODEC_ID_CYUV +#define CODEC_ID_CYUV AV_CODEC_ID_CYUV +#endif + +#ifndef CODEC_ID_SVQ1 +#define CODEC_ID_SVQ1 AV_CODEC_ID_SVQ1 +#endif + +#ifndef CODEC_ID_SVQ3 +#define CODEC_ID_SVQ3 AV_CODEC_ID_SVQ3 +#endif + +#ifndef CODEC_ID_RPZA +#define CODEC_ID_RPZA AV_CODEC_ID_RPZA +#endif + +#ifndef CODEC_ID_FIRST_AUDIO +#define CODEC_ID_FIRST_AUDIO AV_CODEC_ID_FIRST_AUDIO +#endif + +#endif + +#endif diff --git a/veejay-current/veejay-server/libel/vj-avcodec.c b/veejay-current/veejay-server/libel/vj-avcodec.c index ff599e9e..e9c4ac15 100644 --- a/veejay-current/veejay-server/libel/vj-avcodec.c +++ b/veejay-current/veejay-server/libel/vj-avcodec.c @@ -34,6 +34,7 @@ #include #include #include +#include #ifdef STRICT_CHECKING #include #endif @@ -585,7 +586,17 @@ static int vj_avcodec_copy_frame( vj_encoder *av, uint8_t *src[3], uint8_t *dst return 0; } - +#if LIBAVCODEC_VERSION_MAJOR > 55 +static int avcodec_encode_video( AVCodecContext *ctx, uint8_t *buf, int len, AVFrame *frame) +{ + AVPacket pkt; + veejay_memset(&pkt,0,sizeof(pkt)); + int got_packet_ptr = 0; + pkt.data = buf; + pkt.size = len; + return avcodec_encode_video2( ctx, &pkt, frame, &got_packet_ptr); +} +#endif int vj_avcodec_encode_frame(void *encoder, long nframe,int format, uint8_t *src[3], uint8_t *buf, int buf_len, int in_fmt) diff --git a/veejay-current/veejay-server/libel/vj-el.c b/veejay-current/veejay-server/libel/vj-el.c index 0eccea71..4f0dbe7e 100644 --- a/veejay-current/veejay-server/libel/vj-el.c +++ b/veejay-current/veejay-server/libel/vj-el.c @@ -43,6 +43,7 @@ #include #include #include +#include #include #include #include diff --git a/veejay-current/veejay-server/libstream/v4l2utils.c b/veejay-current/veejay-server/libstream/v4l2utils.c index 9170ec42..20edf18c 100644 --- a/veejay-current/veejay-server/libstream/v4l2utils.c +++ b/veejay-current/veejay-server/libstream/v4l2utils.c @@ -84,6 +84,7 @@ #include #include #include +#include //#include typedef struct { void *start;