diff options
author | Alexis Ballier <aballier@gentoo.org> | 2012-11-07 11:40:32 +0000 |
---|---|---|
committer | Alexis Ballier <aballier@gentoo.org> | 2012-11-07 11:40:32 +0000 |
commit | 45ee3a5d0b4536b8bbd8d7456e1eb19b1a4b12fe (patch) | |
tree | 9932161ead54f469512e41dd82aa5365ab75a4a4 /media-libs | |
parent | version bump, should fix bugs #424952 and bug #433573 (diff) | |
download | historical-45ee3a5d0b4536b8bbd8d7456e1eb19b1a4b12fe.tar.gz historical-45ee3a5d0b4536b8bbd8d7456e1eb19b1a4b12fe.tar.bz2 historical-45ee3a5d0b4536b8bbd8d7456e1eb19b1a4b12fe.zip |
Fix build with recent ffmpeg versions, bug #419453
Package-Manager: portage-2.2.0_alpha142/cvs/Linux x86_64
Manifest-Sign-Key: 0x160F534A
Diffstat (limited to 'media-libs')
5 files changed, 246 insertions, 23 deletions
diff --git a/media-libs/mediastreamer/ChangeLog b/media-libs/mediastreamer/ChangeLog index 2e39b266ae62..c9f0fc0e7e0c 100644 --- a/media-libs/mediastreamer/ChangeLog +++ b/media-libs/mediastreamer/ChangeLog @@ -1,6 +1,11 @@ # ChangeLog for media-libs/mediastreamer # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/media-libs/mediastreamer/ChangeLog,v 1.54 2012/05/16 12:12:44 scarabeus Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-libs/mediastreamer/ChangeLog,v 1.55 2012/11/07 11:40:25 aballier Exp $ + + 07 Nov 2012; Alexis Ballier <aballier@gentoo.org> + mediastreamer-2.7.3-r3.ebuild, +files/mediastreamer-2.7.3-ffmpeg-0.11.patch, + +files/mediastreamer-2.7.3-videoenc_282.patch: + Fix build with recent ffmpeg versions, bug #419453 16 May 2012; Tomáš Chvátal <scarabeus@gentoo.org> -mediastreamer-2.3.0-r1.ebuild: diff --git a/media-libs/mediastreamer/Manifest b/media-libs/mediastreamer/Manifest index e1aa36724e6c..e6953da508ef 100644 --- a/media-libs/mediastreamer/Manifest +++ b/media-libs/mediastreamer/Manifest @@ -1,26 +1,18 @@ -----BEGIN PGP SIGNED MESSAGE----- -Hash: SHA1 +Hash: SHA256 -AUX mediastreamer-2.7.3-sdl-build.patch 8006 RMD160 30b4398a6b6488466ce47c27acf4d04028676b5f SHA1 cb620aab50915a20d012a4eaa4db71568364e186 SHA256 f143cf44b767e07ba7bff5572fe5f11950142ff0a36025a64db585aa048ab263 -AUX mediastreamer-2.7.3-v4l-automagic.patch 1083 RMD160 7525df8acec6073afc9d249e124a5a0abca38fa0 SHA1 96b8169fde8375b05aaa7d275089a99117398317 SHA256 697cc9697504e57bb5810b7844eac34bfbae9c909f299ca5bb056b352c26bcfe -DIST mediastreamer-2.7.3.tar.gz 758146 RMD160 ce37caec4b80012b3231929a9e337147ee730d1f SHA1 5d3c94b74131d2d333212de7315c39d230b91539 SHA256 c3cbea285f1e85259b2ac06d3f1730b4258e280011598b91f5b90b8432bf1dc0 -EBUILD mediastreamer-2.7.3-r3.ebuild 3938 RMD160 3c4bb3a61a93188af99c1e2378815a07c24f1817 SHA1 ce338a53184dce7be0077bba980a120fb8c28a0e SHA256 c2d20d8fc55f7abfa068ffb3c109559d2696ea898e69a3c74c90e3c7eb1cf891 -MISC ChangeLog 8411 RMD160 c9cbfa847977138e23e5776ad406065553478d1e SHA1 a532a68e70c84d10cc36a3be7b62e3c6202810d4 SHA256 223c1608faf156b08aa1de45642eef029cf56689704647459ac0453f48f7d88b -MISC metadata.xml 531 RMD160 2e288e1184b5846a8a1420fd68136fbc17a10899 SHA1 fcfc6280258ce7116d4a65d708b8e1d81efd95a2 SHA256 2111114806e8fd78f00032bce515e07f1030ca6eea7abec49483354aef50e9c8 +AUX mediastreamer-2.7.3-ffmpeg-0.11.patch 3113 SHA256 a9c973a4e769f411a851553f2f87bbe3e36d695f48418aec18628d6e7784b506 SHA512 31413f9f2502558c4d8fad83176727e339169400923406c127705717be0c248cf14269cd3edfc24684fe34ecdad77bfc3acc718bbe5dff17bc32d8b0699e80ba WHIRLPOOL 215ab930cc1bfc9a7cba881318804fdec7e13c587bf6f99afde22733377da696890164b4d0ff76c3ada55bbf022d3434bb2f70bfe1c440575b283045167b483c +AUX mediastreamer-2.7.3-sdl-build.patch 8006 SHA256 f143cf44b767e07ba7bff5572fe5f11950142ff0a36025a64db585aa048ab263 SHA512 eb828e1cac9c904b5401b1b68402b6fc02225968b4d95827442994a20c00b99c621679c52c08a14b31e6d647b39e479e1077097cea7207203eaf3673f592454c WHIRLPOOL 5549c8b19a438f34a4c10e7f31485c46ee4b94a2b71404027ba038fab08c81de0052107d5bfea25b49891d147abbe6a9d331378e59040fd1894c5c2f12447890 +AUX mediastreamer-2.7.3-v4l-automagic.patch 1083 SHA256 697cc9697504e57bb5810b7844eac34bfbae9c909f299ca5bb056b352c26bcfe SHA512 cb37f468fcf16d2cacc64b309cb58fb2b841f9962a01c6075079dfb55d8022ef245abb9f44e91a47e72081115603ffacd1020023d67a3f1dadc1fe411ebb2e67 WHIRLPOOL 833f1653e57c850583222b2b31de3e78a70b355b05d8b530864804bdeb1b888f3eb959f00dcaeb605047a4a460a5f13b777e2e6e7e8a2a9adda138e1493ca75f +AUX mediastreamer-2.7.3-videoenc_282.patch 3581 SHA256 15f4f79ec44c8d4256ff146199299c89d24fdaaa4e8c40e9ca7c9ab178ef4306 SHA512 750b9d212dad04729b5607c83b55afcb3fafb0f4b9ce7dd174a996d31421883747d1d1703293b8b3e2b458094470da7eed003a52b8951fff2e81da2326824f26 WHIRLPOOL 381a80008fdadf5e7e075797183bb9f3fb328261ea75963e15238ad89bda039210c2e11e061b82c7acb438c5dd458d1434aaddc41bdf16d46d9f242620cf05e1 +DIST mediastreamer-2.7.3.tar.gz 758146 SHA256 c3cbea285f1e85259b2ac06d3f1730b4258e280011598b91f5b90b8432bf1dc0 SHA512 f9ebfa12b1c760b5c24b5496466d92148a170ee2d522d9085db3fb72cc93f8e3e71ba1ae14f57d94a33b752450555c7d3ebf59267447203861247a8685e18259 WHIRLPOOL c1528bcca27c979ac29d6ccb6e32eac53ddd9e69d3f034056ad579d5ff6cd295c9224db6b841d6aa708e2c60251b192e85d6843342c14f8ead75d9f137c8d818 +EBUILD mediastreamer-2.7.3-r3.ebuild 4031 SHA256 4bb13d8d040c4f1fabb00ccdec94b603955645c7942593727e73acb2e3a10ab6 SHA512 ad830ecd2b894f1c85c9b1ebff016c9bd9ebdf0133c5feb61c1627497cfb85f7e788515f329161d5064b5a0633ee513c0c6a212090d54b3443f91d5252d7014f WHIRLPOOL fc53ba9141439e9b66ef3cd6bf21035de95269a13204e7c72cab34f8e96ac8272d7a277f443366c5186230607fdc5963406cf4dbdb9b4c5b3b14ebce2469fb88 +MISC ChangeLog 8644 SHA256 a37af9fba24f2f0b69655683694e7451216d58616943f1504da431c475de5d5f SHA512 7df777171fb8086c1fe7fa52494a04282357864ca6cca2d3ffce63febb46da2a1a50c5c5e376d34ae1714e0ac1978d91dd38b3cb65f5ed1a334fb87620cb1c68 WHIRLPOOL 7a0ea4b28a0692793137408dd13f099c4fad78f20b7651c60477be4ef054a9157e0eadd3cad9e41eee27c22667533019966b1cd01348285c75026ae4cd95c13e +MISC metadata.xml 531 SHA256 2111114806e8fd78f00032bce515e07f1030ca6eea7abec49483354aef50e9c8 SHA512 b5aa66d697c7cb58045287b70465cc2d7e81b06bd32b5944d6cf4efeb017bfa52078f0ecc96c2a392db94c4a0b8ef9df0104e2d4794959295efb903181e658c1 WHIRLPOOL aff8c3ab535da84cd3a1bc019b42ffaf1b7f0276baf16b35d740117481d1932c716874e89603e3cea99ca2f8680ebd664ce5629578ed5b78d7f8d2035bb4f2fd -----BEGIN PGP SIGNATURE----- -Version: GnuPG v2.0.17 (GNU/Linux) +Version: GnuPG v2.0.19 (GNU/Linux) -iQIcBAEBAgAGBQJPs5nzAAoJEOSiRoyO7jvo4gIQAKJx0oZE4Zt3C0pM8SRKr3kl -axaZYfuEBfWwSOYaMyMdRTZwTVihA/EI4yAn+gChr7F6aJDFfEXtXtNQyQbqqvL8 -7HuMlmbIyYlAAtoX5VzbvGVI9zOH2GzOHtL3yfv5ls/vXeWDLx2swJ8p0zMQG/AN -+2bIAtw50ITOxDxWpDHjKg0img5l/kNAsCFd8c6teKEo9/5o2Fh0wzLnb2HB/MJW -fa/MZryVuoh/RriFSxgv176y0tFFK1TllUfCMpI46cTZSZmm47XUdk9bXkUluzmY -22gluWKx2FfvVfQPuEjjNmPHof2dmq/4ywB1Q3CqUH0zWxvWrTXgh97gpSPO0lJP -GElaZiX1YvPuzEmcn+Hp/V5Cufkq5z1lBUuLU7wtGWMpaAwG+hfe+omacee/2kTc -KieBtwYML4i8Xl7AaGh1PPyKg3QAeyQmksgX8kqPaW2il51lt9p8DnT8RmqqZz5N -R02RV5RE11HXKnGTka1BjXaF2YbKCPJyEU+T1Ih6Wd7kAoZ7WgOm3h/QKmXgdlqX -DLSsjgS2rGYge0a6phDITDFVRtPmiGZLPpVV3ESBsIUzOjUZZNbu6IJ0Jo3SC0sy -c/THFS3RpmDXO+wlo6kM586Dnh1ofiwY+kxuZn/drdqxkfUBJHAat2uDyrdSG66n -dGF1t/M6191mbUkaC6g0 -=4pwf +iEYEAREIAAYFAlCaSKoACgkQvFcC4BYPU0o1XwCeIwXjngBWgNje36iuXlGwAo9A +XM8AnjmPIyzy69CzhUqyZDlQHl760ZlA +=5K4Z -----END PGP SIGNATURE----- diff --git a/media-libs/mediastreamer/files/mediastreamer-2.7.3-ffmpeg-0.11.patch b/media-libs/mediastreamer/files/mediastreamer-2.7.3-ffmpeg-0.11.patch new file mode 100644 index 000000000000..c242b5fe139c --- /dev/null +++ b/media-libs/mediastreamer/files/mediastreamer-2.7.3-ffmpeg-0.11.patch @@ -0,0 +1,94 @@ +Fix build with recent ffmpeg releases. +https://bugs.gentoo.org/show_bug.cgi?id=419453 + +Index: mediastreamer-2.7.3/src/videoenc.c +=================================================================== +--- mediastreamer-2.7.3.orig/src/videoenc.c ++++ mediastreamer-2.7.3/src/videoenc.c +@@ -53,7 +53,6 @@ void ms_ffmpeg_log_callback(void* ptr, i + + void ms_ffmpeg_check_init(){ + if(!avcodec_initialized){ +- avcodec_init(); + avcodec_register_all(); + avcodec_initialized=TRUE; + #ifdef ENABLE_LOG_FFMPEG +@@ -107,6 +106,7 @@ typedef struct EncState{ + uint32_t framenum; + VideoStarter starter; + bool_t req_vfu; ++ AVDictionary * ff_opts; + }EncState; + + static int enc_set_fps(MSFilter *f, void *arg){ +@@ -214,6 +214,7 @@ static void enc_init(MSFilter *f, enum C + s->req_vfu=FALSE; + s->framenum=0; + s->av_context.codec=NULL; ++ s->ff_opts = NULL; + } + + static void enc_h263_init(MSFilter *f){ +@@ -300,9 +301,9 @@ static void prepare_h263(EncState *s){ + if (s->profile==0){ + s->codec=CODEC_ID_H263; + }else{ +- c->flags|=CODEC_FLAG_H263P_UMV; ++ av_dict_set(&(s->ff_opts), "umv", "1", 0); + c->flags|=CODEC_FLAG_AC_PRED; +- c->flags|=CODEC_FLAG_H263P_SLICE_STRUCT; ++ av_dict_set(&(s->ff_opts), "structured_slices", "1", 0); + /* + c->flags|=CODEC_FLAG_OBMC; + c->flags|=CODEC_FLAG_AC_PRED; +@@ -342,9 +343,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, &(s->ff_opts)); + if (error!=0) { +- ms_error("avcodec_open() failed: %i",error); ++ ms_error("avcodec_open2() failed: %i",error); + return; + } + video_starter_init(&s->starter); +@@ -372,7 +373,7 @@ static void add_rfc2190_header(mblk_t ** + // 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 (context->coded_frame->pict_type != FF_I_TYPE) header->b_wptr[1] |= 0x10; ++ if (context->coded_frame->pict_type != AV_PICTURE_TYPE_I) header->b_wptr[1] |= 0x10; + header->b_wptr += 4; + header->b_cont = *packet; + *packet = header; +@@ -779,7 +780,7 @@ static void process_frame(MSFilter *f, m + s->req_vfu=TRUE; + } + if (s->req_vfu){ +- pict.pict_type=FF_I_TYPE; ++ pict.pict_type=AV_PICTURE_TYPE_I; + s->req_vfu=FALSE; + } + comp_buf->b_rptr=comp_buf->b_wptr=comp_buf->b_datap->db_base; +@@ -799,7 +800,7 @@ static void process_frame(MSFilter *f, m + if (s->framenum==1){ + video_starter_first_frame (&s->starter,f->ticker->time); + } +- if (c->coded_frame->pict_type==FF_I_TYPE){ ++ if (c->coded_frame->pict_type==AV_PICTURE_TYPE_I){ + ms_message("Emitting I-frame"); + } + comp_buf->b_wptr+=error; +Index: mediastreamer-2.7.3/src/h264dec.c +=================================================================== +--- mediastreamer-2.7.3.orig/src/h264dec.c ++++ mediastreamer-2.7.3/src/h264dec.c +@@ -46,7 +46,6 @@ typedef struct _DecData{ + static void ffmpeg_init(){ + static bool_t done=FALSE; + if (!done){ +- avcodec_init(); + avcodec_register_all(); + done=TRUE; + } diff --git a/media-libs/mediastreamer/files/mediastreamer-2.7.3-videoenc_282.patch b/media-libs/mediastreamer/files/mediastreamer-2.7.3-videoenc_282.patch new file mode 100644 index 000000000000..66d055ede084 --- /dev/null +++ b/media-libs/mediastreamer/files/mediastreamer-2.7.3-videoenc_282.patch @@ -0,0 +1,130 @@ +Update videoenc.c to the 2.8.2 version. Fixes some but not all problems with +ffmpeg. + + +--- mediastreamer-2.7.3/src/videoenc.c 2010-12-17 05:59:50.000000000 -0300 ++++ mediastreamer-2.8.2/src/videoenc.c 2012-02-17 06:16:20.000000000 -0300 +@@ -164,6 +164,7 @@ + }else{ + ms_warning("unsupported video size %s",tmp); + ret=FALSE; ++ goto end; + } + divider=atoi(equal+1); + if (divider!=0){ +@@ -174,6 +175,8 @@ + ret=FALSE; + } + }else ret=FALSE; ++ ++end: + ms_free(tmp); + return ret; + } +@@ -231,11 +234,7 @@ + + static void prepare(EncState *s){ + AVCodecContext *c=&s->av_context; +-#ifdef ANDROID + const int max_br_vbv=128000; +-#else +- const int max_br_vbv=256000; +-#endif + + avcodec_get_context_defaults(c); + if (s->codec==CODEC_ID_MJPEG) +@@ -315,13 +314,6 @@ + static void prepare_mpeg4(EncState *s){ + AVCodecContext *c=&s->av_context; + c->max_b_frames=0; /*don't use b frames*/ +- c->flags|=CODEC_FLAG_AC_PRED; +- c->flags|=CODEC_FLAG_H263P_UMV; +- /*c->flags|=CODEC_FLAG_QPEL;*/ /*don't enable this one: this forces profile_level to advanced simple profile */ +- c->flags|=CODEC_FLAG_4MV; +- c->flags|=CODEC_FLAG_GMC; +- c->flags|=CODEC_FLAG_LOOP_FILTER; +- c->flags|=CODEC_FLAG_H263P_SLICE_STRUCT; + } + + static void enc_uninit(MSFilter *f){ +@@ -681,7 +673,7 @@ + uint8_t *pbuf_ptr=full_frame->b_rptr; + uint8_t *buf_end=full_frame->b_wptr; + +- ms_message("image size: %i)", buf_end-pbuf_ptr); ++ ms_message("image size: %li)", (long)(buf_end-pbuf_ptr)); + + *lqt=NULL; + *cqt=NULL; +@@ -689,7 +681,7 @@ + err = find_marker(&pbuf_ptr, buf_end); + while (err!=-1) + { +- ms_message("marker found: %x (offset from beginning%i)", err, pbuf_ptr-full_frame->b_rptr); ++ ms_message("marker found: %x (offset from beginning %li)", err, (long)(pbuf_ptr-full_frame->b_rptr)); + if (err==0xdb) + { + /* copy DQT table */ +@@ -772,10 +764,12 @@ + int error; + mblk_t *comp_buf=s->comp_buf; + int comp_buf_sz=comp_buf->b_datap->db_lim-comp_buf->b_datap->db_base; ++ YuvBuf yuv; + ++ ms_yuv_buf_init_from_mblk(&yuv, inm); + /* convert image if necessary */ + avcodec_get_frame_defaults(&pict); +- avpicture_fill((AVPicture*)&pict,(uint8_t*)inm->b_rptr,c->pix_fmt,c->width,c->height); ++ avpicture_fill((AVPicture*)&pict,yuv.planes[0],c->pix_fmt,c->width,c->height); + + /* timestamp used by ffmpeg, unset here */ + pict.pts=AV_NOPTS_VALUE; +@@ -796,7 +790,9 @@ + comp_buf->b_wptr+=4; + comp_buf_sz-=4; + } ++ + error=avcodec_encode_video(c, (uint8_t*)comp_buf->b_wptr,comp_buf_sz, &pict); ++ + if (error<=0) ms_warning("ms_AVencoder_process: error %i.",error); + else{ + s->framenum++; +@@ -837,6 +833,14 @@ + EncState *s=(EncState*)f->data; + bool_t snow=s->codec==CODEC_ID_SNOW; + s->maxbr=*(int*)arg; ++ if (s->av_context.codec!=NULL){ ++ /*when we are processing, apply new settings immediately*/ ++ ms_filter_lock(f); ++ enc_postprocess(f); ++ enc_preprocess(f); ++ ms_filter_unlock(f); ++ return 0; ++ } + if (s->maxbr>=1024000 && s->codec!=CODEC_ID_H263P){ + s->vsize.width = MS_VIDEO_SIZE_SVGA_W; + s->vsize.height = MS_VIDEO_SIZE_SVGA_H; +@@ -854,7 +858,7 @@ + s->vsize.height=MS_VIDEO_SIZE_CIF_H; + s->fps=17; + s->qmin=3; +- }else if (s->maxbr>=170000){ ++ }else if (s->maxbr>=170000 && s->codec!=CODEC_ID_H263P && s->codec!=CODEC_ID_H263){ + s->vsize.width=MS_VIDEO_SIZE_QVGA_W; + s->vsize.height=MS_VIDEO_SIZE_QVGA_H; + s->fps=15; +@@ -875,14 +879,6 @@ + s->fps=5; + s->qmin=5; + } +- +- if (s->av_context.codec!=NULL){ +- /*apply new settings dynamically*/ +- ms_filter_lock(f); +- enc_postprocess(f); +- enc_preprocess(f); +- ms_filter_unlock(f); +- } + return 0; + } + diff --git a/media-libs/mediastreamer/mediastreamer-2.7.3-r3.ebuild b/media-libs/mediastreamer/mediastreamer-2.7.3-r3.ebuild index bb566d1f9d14..cd537c69e7f3 100644 --- a/media-libs/mediastreamer/mediastreamer-2.7.3-r3.ebuild +++ b/media-libs/mediastreamer/mediastreamer-2.7.3-r3.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/media-libs/mediastreamer/mediastreamer-2.7.3-r3.ebuild,v 1.13 2012/05/05 08:02:25 jdhore Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-libs/mediastreamer/mediastreamer-2.7.3-r3.ebuild,v 1.14 2012/11/07 11:40:25 aballier Exp $ EAPI="4" @@ -67,6 +67,8 @@ src_prepare() { epatch "${FILESDIR}/${PN}-2.7.3-v4l-automagic.patch" epatch "${FILESDIR}/${P}-sdl-build.patch" + epatch "${FILESDIR}/${P}-videoenc_282.patch" + epatch "${FILESDIR}/${P}-ffmpeg-0.11.patch" # linux/videodev.h dropped in 2.6.38 sed -i -e 's:msv4l.c::' src/Makefile.am || die |