SOURCES: mpeg4ip-ffmpeg.patch - updated to work with ffmpeg >= 080930

duddits duddits at pld-linux.org
Fri Oct 10 23:11:11 CEST 2008


Author: duddits                      Date: Fri Oct 10 21:11:10 2008 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- updated to work with ffmpeg >= 080930

---- Files affected:
SOURCES:
   mpeg4ip-ffmpeg.patch (1.2 -> 1.3) 

---- Diffs:

================================================================
Index: SOURCES/mpeg4ip-ffmpeg.patch
diff -u SOURCES/mpeg4ip-ffmpeg.patch:1.2 SOURCES/mpeg4ip-ffmpeg.patch:1.3
--- SOURCES/mpeg4ip-ffmpeg.patch:1.2	Tue Aug 26 19:54:33 2008
+++ SOURCES/mpeg4ip-ffmpeg.patch	Fri Oct 10 23:11:04 2008
@@ -9,17 +9,6 @@
  #else
  #include <avcodec.h>
  #endif
---- mpeg4ip-1.6.1/player/plugin/video/ffmpeg/ffmpeg.h~	2007-07-02 22:26:03.000000000 +0200
-+++ mpeg4ip-1.6.1/player/plugin/video/ffmpeg/ffmpeg.h	2008-08-26 17:09:38.000000000 +0200
-@@ -27,7 +27,7 @@
- #include "codec_plugin.h"
- extern "C" {
- #ifdef HAVE_FFMPEG_INSTALLED
--#include <ffmpeg/avcodec.h>
-+#include <libavcodec/avcodec.h>
- #else
- #include <avcodec.h>
- #endif
 --- mpeg4ip-1.6.1/server/mp4live/audio_ffmpeg.h~	2007-07-02 22:26:04.000000000 +0200
 +++ mpeg4ip-1.6.1/server/mp4live/audio_ffmpeg.h	2008-08-26 17:15:49.000000000 +0200
 @@ -25,7 +25,7 @@
@@ -53,3 +42,50 @@
       saveCFLAGS="$CFLAGS"
       CFLAGS="$CFLAGS $FFMPEG_INC"
       AC_CHECK_TYPES([AVRational], , , [#include <avcodec.h>])
+diff -burNp mpeg4ip-1.6.1/configure.in mpeg4ip-1.6.1-new/configure.in
+--- mpeg4ip-1.6.1/configure.in	2007-09-28 22:45:08.000000000 +0200
++++ mpeg4ip-1.6.1-new/configure.in	2008-10-10 22:09:56.469368599 +0200
+@@ -512,7 +512,7 @@ if test x$disable_ffmpeg = xfalse; then
+      if test x$have_ffmpeg = xtrue; then
+         AC_DEFINE(HAVE_FFMPEG_INSTALLED, 1, [defined if ffmpeg is installed])
+         FFMPEG_INC=
+-        FFMPEG_LIB="-lavcodec -lz $ffmpeg_add_libs"
++        FFMPEG_LIB="-lavcodec -lz $ffmpeg_add_libs $(pkg-config libswscale --libs --silence-errors)"
+         AC_CHECK_TYPES([AVRational], , , [#include <ffmpeg/avcodec.h>])
+ 	AC_CHECK_MEMBERS(AVCodecContext.time_base, , , [#include <ffmpeg/avcodec.h>])
+ 	AC_CHECK_DECLS([avcodec_decode_audio2], , ,[#include <ffmpeg/avcodec.h>])
+--- mpeg4ip-1.6.1/player/plugin/video/ffmpeg/ffmpeg.h	2007-07-02 22:26:03.000000000 +0200
++++ mpeg4ip-1.6.1-new/player/plugin/video/ffmpeg/ffmpeg.h	2008-10-10 22:16:05.176622742 +0200
+@@ -27,7 +27,8 @@
+ #include "codec_plugin.h"
+ extern "C" {
+ #ifdef HAVE_FFMPEG_INSTALLED
+-#include <ffmpeg/avcodec.h>
++#include <libavcodec/avcodec.h>
++#include <libswscale/swscale.h>
+ #else
+ #include <avcodec.h>
+ #endif
+--- mpeg4ip-1.6.1/player/plugin/video/ffmpeg/ffmpeg.cpp	2007-07-02 22:26:03.000000000 +0200
++++ mpeg4ip-1.6.1-new/player/plugin/video/ffmpeg/ffmpeg.cpp	2008-10-10 23:01:19.519476374 +0200
+@@ -585,10 +585,16 @@ static int ffmpeg_decode (codec_data_t *
+ 	from.data[ix] = ffmpeg->m_picture->data[ix];
+ 	from.linesize[ix] = ffmpeg->m_picture->linesize[ix];
+       }
+-      
+-      img_convert(&to, PIX_FMT_YUV420P,
+-		  &from, ffmpeg->m_c->pix_fmt,
+-		  ffmpeg->m_c->width, ffmpeg->m_c->height);
++#ifdef HAVE_FFMPEG_INSTALLED
++      SwsContext *pSWSCtx;
++      pSWSCtx = sws_getContext(ffmpeg->m_c->width, ffmpeg->m_c->height,
++			       ffmpeg->m_c->pix_fmt,
++			       ffmpeg->m_c->width, ffmpeg->m_c->height,
++			       PIX_FMT_YUV420P, SWS_BICUBIC, 0, 0, 0);
++      sws_scale(pSWSCtx, from.data, from.linesize, 0, ffmpeg->m_c->height,
++		to.data, to.linesize);
++      sws_freeContext(pSWSCtx);
++#endif
+       ffmpeg->m_vft->video_filled_buffer(ffmpeg->m_ifptr,
+ 					 ffmpeg->have_cached_ts ?
+ 					 ffmpeg->cached_ts : ts);
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/mpeg4ip-ffmpeg.patch?r1=1.2&r2=1.3&f=u



More information about the pld-cvs-commit mailing list