diff options
author | root <root@rshg054.dnsready.net> | 2013-03-01 00:05:33 -0800 |
---|---|---|
committer | root <root@rshg054.dnsready.net> | 2013-03-01 00:05:33 -0800 |
commit | 5ae40a63ab4c6838234db5a9da1e99d8bc27875d (patch) | |
tree | dea7d338ac603743f5a323dc8f82b76bdbf5ab2e /extra/mediastreamer | |
parent | b56d5949c9b0c3b40a942cd83f71e4420473435b (diff) |
Fri Mar 1 00:05:33 PST 2013
Diffstat (limited to 'extra/mediastreamer')
-rw-r--r-- | extra/mediastreamer/PKGBUILD | 6 | ||||
-rw-r--r-- | extra/mediastreamer/mediastreamer-ffmpeg.patch | 206 |
2 files changed, 32 insertions, 180 deletions
diff --git a/extra/mediastreamer/PKGBUILD b/extra/mediastreamer/PKGBUILD index 2e9fb6098..0fb057092 100644 --- a/extra/mediastreamer/PKGBUILD +++ b/extra/mediastreamer/PKGBUILD @@ -1,4 +1,4 @@ -# $Id: PKGBUILD 178134 2013-02-16 22:48:53Z ioni $ +# $Id: PKGBUILD 178928 2013-02-28 19:31:23Z eric $ # Maintainer: # Contributor: Andrea Scarpino <andrea@archlinux.org> # Contributor: Sergej Pupykin <pupykin.s+arch@gmail.com> @@ -6,7 +6,7 @@ pkgname=mediastreamer pkgver=2.8.2 -pkgrel=3 +pkgrel=4 pkgdesc="A library written in C that allows you to create and run audio and video streams" arch=('i686' 'x86_64') url="http://www.linphone.org/" @@ -18,7 +18,7 @@ source=("http://download-mirror.savannah.gnu.org/releases/linphone/${pkgname}/${ mediastreamer-ffmpeg.patch) md5sums=('e51ea9d5fce1396b374d10473dfbadec' '805da7def98f367e621363fa0c951fe8' - 'f147546489a973f148ce3dd2dba36834') + '553d5d47ea4a8c8dfeabdc0281849d5f') build() { cd "${srcdir}"/$pkgname-$pkgver diff --git a/extra/mediastreamer/mediastreamer-ffmpeg.patch b/extra/mediastreamer/mediastreamer-ffmpeg.patch index 944d4b833..3304e9f56 100644 --- a/extra/mediastreamer/mediastreamer-ffmpeg.patch +++ b/extra/mediastreamer/mediastreamer-ffmpeg.patch @@ -1,205 +1,57 @@ -diff --git a/include/mediastreamer2/msvideo.h b/include/mediastreamer2/msvideo.h -index 5ae8a63..86edf86 100644 ---- mediastreamer2/include/mediastreamer2/msvideo.h -+++ mediastreamer2/include/mediastreamer2/msvideo.h -@@ -21,6 +21,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - #define msvideo_h - - #include <mediastreamer2/msfilter.h> -+#ifndef INT64_C -+#define INT64_C(c) (c ## LL) -+#define UINT64_C(c) (c ## ULL) -+#endif -+#include <libavutil/avutil.h> -+#include <libavcodec/version.h> - - /* some global constants for video MSFilter(s) */ - #define MS_VIDEO_SIZE_SQCIF_W 128 -@@ -206,7 +212,9 @@ extern "C"{ - MS2_PUBLIC int ms_pix_fmt_to_ffmpeg(MSPixFmt fmt); - MS2_PUBLIC MSPixFmt ffmpeg_pix_fmt_to_ms(int fmt); - MS2_PUBLIC MSPixFmt ms_fourcc_to_pix_fmt(uint32_t fourcc); -+#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(54, 0, 100) - MS2_PUBLIC void ms_ffmpeg_check_init(void); -+#endif - MS2_PUBLIC int ms_yuv_buf_init_from_mblk(MSPicture *buf, mblk_t *m); - MS2_PUBLIC int ms_yuv_buf_init_from_mblk_with_size(MSPicture *buf, mblk_t *m, int w, int h); - MS2_PUBLIC int ms_picture_init_from_mblk_with_size(MSPicture *buf, mblk_t *m, MSPixFmt fmt, int w, int h); +commit f586917ea4d66f9ba8910f0967a8830e54d50784 +Author: Yann Diorcet <yann.diorcet@belledonne-communications.com> +Date: Tue Jun 5 11:07:48 2012 +0200 + + Fixes for new versions of ffmpeg + diff --git a/src/h264dec.c b/src/h264dec.c -index 223de3d..8c40a7c 100644 ---- mediastreamer2/src/h264dec.c -+++ mediastreamer2/src/h264dec.c -@@ -44,7 +44,9 @@ typedef struct _DecData{ +index c4a84ee..5229b5e 100644 +--- a/src/h264dec.c ++++ b/src/h264dec.c +@@ -45,7 +45,9 @@ typedef struct _DecData{ static void ffmpeg_init(){ static bool_t done=FALSE; if (!done){ -+#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(54, 0, 100) ++#ifdef FF_API_AVCODEC_INIT avcodec_init(); +#endif avcodec_register_all(); done=TRUE; } -diff --git a/src/mscommon.c b/src/mscommon.c -index 2cab005..bebb946 100644 ---- mediastreamer2/src/mscommon.c -+++ mediastreamer2/src/mscommon.c -@@ -33,9 +33,17 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - #include "mediastreamer2/mscodecutils.h" - #include "mediastreamer2/msfilter.h" - #include <ortp/ortp_srtp.h> -+#ifndef INT64_C -+#define INT64_C(c) (c ## LL) -+#define UINT64_C(c) (c ## ULL) -+#endif -+#include <libavutil/avutil.h> -+#include <libavcodec/version.h> - - extern void __register_ffmpeg_encoders_if_possible(void); -+#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(54, 0, 100) - extern void ms_ffmpeg_check_init(); -+#endif - extern bool_t libmsandroiddisplay_init(void); - extern void libmsandroiddisplaybad_init(void); - extern void libmsandroidopengldisplay_init(void); -@@ -645,7 +653,9 @@ void ms_init(){ - } - } - #if !defined(NO_FFMPEG) -+#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(54, 0, 100) - ms_ffmpeg_check_init(); -+#endif - __register_ffmpeg_encoders_if_possible(); - #endif - #endif -diff --git a/src/videodec.c b/src/videodec.c -index c04e1e9..a455075 100644 ---- mediastreamer2/src/videodec.c -+++ mediastreamer2/src/videodec.c -@@ -27,9 +27,16 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - #include "mediastreamer2/msvideo.h" - #include "mediastreamer2/msticker.h" - #include "rfc2429.h" -+#ifndef INT64_C -+#define INT64_C(c) (c ## LL) -+#define UINT64_C(c) (c ## ULL) -+#endif -+#include <libavutil/avutil.h> -+#include <libavcodec/version.h> - -- -+#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(54, 0, 100) - extern void ms_ffmpeg_check_init(); -+#endif - - - typedef struct DecState{ -@@ -50,7 +57,9 @@ typedef struct DecState{ - - static void dec_init(MSFilter *f, enum CodecID cid){ - DecState *s=(DecState *)ms_new0(DecState,1); -+#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(54, 0, 100) - ms_ffmpeg_check_init(); -+#endif - - avcodec_get_context_defaults(&s->av_context); - s->av_codec=NULL; diff --git a/src/videoenc.c b/src/videoenc.c -index 21d016f..520f06a 100644 ---- mediastreamer2/src/videoenc.c -+++ mediastreamer2/src/videoenc.c -@@ -37,7 +37,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - - #define RATE_CONTROL_MARGIN 15000 /*bits/second*/ +index 21d016f..fb35760 100644 +--- a/src/videoenc.c ++++ b/src/videoenc.c +@@ -39,6 +39,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -+#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(54, 0, 100) static bool_t avcodec_initialized=FALSE; -+#endif ++#ifndef FF_I_TYPE ++#define FF_I_TYPE AV_PICTURE_TYPE_I ++#endif ++ #ifdef ENABLE_LOG_FFMPEG -@@ -51,6 +53,7 @@ void ms_ffmpeg_log_callback(void* ptr, int level, const char* fmt, va_list vl) - - #endif + void ms_ffmpeg_log_callback(void* ptr, int level, const char* fmt, va_list vl) +@@ -53,7 +57,9 @@ void ms_ffmpeg_log_callback(void* ptr, int level, const char* fmt, va_list vl) -+#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(54, 0, 100) void ms_ffmpeg_check_init(){ if(!avcodec_initialized){ ++#ifdef FF_API_AVCODEC_INIT avcodec_init(); -@@ -62,6 +65,7 @@ void ms_ffmpeg_check_init(){ - #endif - } - } +#endif - - /* the goal of this small object is to tell when to send I frames at startup: - at 2 and 4 seconds*/ -@@ -201,7 +205,9 @@ static void enc_init(MSFilter *f, enum CodecID codec) - { - EncState *s=(EncState *)ms_new(EncState,1); - f->data=s; -+#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(54, 0, 100) - ms_ffmpeg_check_init(); -+#endif - s->profile=0;/*always default to profile 0*/ - s->comp_buf=NULL; - s->fps=15; -@@ -300,9 +306,13 @@ static void prepare_h263(EncState *s){ + avcodec_register_all(); + avcodec_initialized=TRUE; + #ifdef ENABLE_LOG_FFMPEG +@@ -300,10 +306,10 @@ static void prepare_h263(EncState *s){ if (s->profile==0){ s->codec=CODEC_ID_H263; }else{ -+#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(54, 0, 100) ++ /* c->flags|=CODEC_FLAG_H263P_UMV; -+#endif c->flags|=CODEC_FLAG_AC_PRED; -+#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(54, 0, 100) c->flags|=CODEC_FLAG_H263P_SLICE_STRUCT; -+#endif - /* +- /* c->flags|=CODEC_FLAG_OBMC; c->flags|=CODEC_FLAG_AC_PRED; -@@ -372,7 +382,11 @@ static void add_rfc2190_header(mblk_t **packet, AVCodecContext *context){ - // assume video size is CIF or QCIF - if (context->width == 352 && context->height == 288) header->b_wptr[1] = 0x60; - else header->b_wptr[1] = 0x40; -+#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(54, 0, 100) - if (context->coded_frame->pict_type != FF_I_TYPE) header->b_wptr[1] |= 0x10; -+#else -+ if (context->coded_frame->pict_type != AV_PICTURE_TYPE_I) header->b_wptr[1] |= 0x10; -+#endif - header->b_wptr += 4; - header->b_cont = *packet; - *packet = header; -@@ -779,7 +793,11 @@ static void process_frame(MSFilter *f, mblk_t *inm){ - s->req_vfu=TRUE; - } - if (s->req_vfu){ -+#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(54, 0, 100) - pict.pict_type=FF_I_TYPE; -+#else -+ pict.pict_type=AV_PICTURE_TYPE_I; -+#endif - s->req_vfu=FALSE; - } - comp_buf->b_rptr=comp_buf->b_wptr=comp_buf->b_datap->db_base; -@@ -799,7 +817,11 @@ static void process_frame(MSFilter *f, mblk_t *inm){ - if (s->framenum==1){ - video_starter_first_frame (&s->starter,f->ticker->time); - } -+#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(54, 0, 100) - if (c->coded_frame->pict_type==FF_I_TYPE){ -+#else -+ if (c->coded_frame->pict_type==AV_PICTURE_TYPE_I){ -+#endif - ms_message("Emitting I-frame"); - } - comp_buf->b_wptr+=error; -@@ -1067,7 +1089,9 @@ MSFilterDesc ms_mjpeg_enc_desc={ - #endif - - void __register_ffmpeg_encoders_if_possible(void){ -+#if LIBAVCODEC_VERSION_INT < AV_VERSION_INT(54, 0, 100) - ms_ffmpeg_check_init(); -+#endif - if (avcodec_find_encoder(CODEC_ID_MPEG4)) - ms_filter_register(&ms_mpeg4_enc_desc); - if (avcodec_find_encoder(CODEC_ID_H263)){ + */ |