Re: Transcode and FC9

Fabio Bizzi <[email protected]> Tue, 17 Jun 2008 09:02:52 +0200
Newsgroups gmane.linux.freshrpms.user
Organization bizzi.org
Message-ID <[email protected]>
This is a multi-part message in MIME format.
--------------030406080405050500040808
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

David Timms ha scritto:
> Fabio Bizzi wrote:
>> 1) I have corrected the include ffmpeg paths in the file 
>> transcode-1.0.5-ffmpeg.patch (attached)
> did it have lib64 as part of the path ?

No, I have only add the prefix "ffmpeg" to all the include files ".h"
The problem is that the ffmpeg includes have changed again the path eg:

from libavcodec/avcodec.h

to ffmpeg/libavcodec/avcodec.h

and also for libpostproc/postprocess.h that became 
ffmpeg/libpostproc/postprocess.h

No "lib64" in any path of the original patch file.

> 
>> 2) modified the file /usr/include/ffmpeg/libavcodec/avcodec.h
> I think that it'll stop other packages that link against ffmpeg from 
> working {i think}.
> 

Maybe, I think so.

> Being a livna user as well, I noticed that there is some changes to 
> ffmpeg layout, I haven't found a solution yet myself {for a different 
> package}.
> 
> diff -u orig to new, and post so we can get wider feedback.

I have attached the diff of the modified spec and ffmpeg patch for the 
transcode rpm.
I have also attached the diff for the avcodec.h file from ffmpeg.

Thank you.

Cheers.

	Fabio.



--------------030406080405050500040808
Content-Type: text/plain;
 name="diff-transcode-1.0.5-ffmpeg.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="diff-transcode-1.0.5-ffmpeg.patch"

--- transcode-1.0.5-ffmpeg.patch.org    2008-06-16 15:15:07.000000000 +0200
+++ transcode-1.0.5-ffmpeg.patch        2008-06-16 15:19:22.000000000 +0200
@@ -6,7 +6,7 @@
    [enable_libavcodec_static=no])
  LIBAVCODEC_EXTRA_LIBS="$LIBAVCODEC_EXTRA_LIBS $($PKG_CONFIG --libs libavcodec)"
 -TC_PKG_CHECK(libavcodec, required, LIBAVCODEC, no, [ffmpeg/avcodec.h],
-+TC_PKG_CHECK(libavcodec, required, LIBAVCODEC, no, [libavcodec/avcodec.h],
++TC_PKG_CHECK(libavcodec, required, LIBAVCODEC, no, [ffmpeg/libavcodec/avcodec.h],
   avcodec, avcodec_thread_init, FFMpeg, [http://www.ffmpeg.org/])
  if test x"$have_libavcodec" = x"yes" ; then
    save_CPPFLAGS="$CPPFLAGS"
@@ -14,7 +14,7 @@
    AC_TRY_RUN([
  #include <stdio.h>
 -#include <ffmpeg/avcodec.h>
-+#include <libavcodec/avcodec.h>
++#include <ffmpeg/libavcodec/avcodec.h>
  int
  main()
  {
@@ -24,8 +24,8 @@
        LIBAVCODEC_BUILD="`./conftest$ac_exeext | sed -ne 's,BUILD=\(.*\),\1,p'`"],
 -    [TC_PKG_ERROR(libavcodec, ffmpeg/avcodec.h, required, libavcodec, [http://www.ffmpeg.org],
 -      [cannot compile ffmpeg/avcodec.h])],
-+    [TC_PKG_ERROR(libavcodec, libavcodec/avcodec.h, required, libavcodec, [http://www.ffmpeg.org],
-+      [cannot compile libavcodec/avcodec.h])],
++    [TC_PKG_ERROR(libavcodec, ffmpeg/libavcodec/avcodec.h, required, libavcodec, [http://www.ffmpeg.org],
++      [cannot compile ffmpeg/libavcodec/avcodec.h])],
      [echo $ac_n "cross compiling; assumed OK... $ac_c"
        LIBAVCODEC_VERSION=""
        LIBAVCODEC_BUILD=""])
@@ -34,7 +34,7 @@
      LIBS="$LIBS $w_libavcodec_l${deflib}/libavcodec.a $LIBAVCODEC_EXTRA_LIBS"
      AC_TRY_LINK([
 -#include <ffmpeg/avcodec.h>
-+#include <libavcodec/avcodec.h>
++#include <ffmpeg/libavcodec/avcodec.h>
  ],[
  AVCodecContext *ctx = (void *)0;
  avcodec_thread_init(ctx, 0);
@@ -43,7 +43,7 @@
  dnl libpostproc
  dnl
 -TC_PKG_CHECK(libpostproc, no, LIBPOSTPROC, no, postprocess.h,
-+TC_PKG_CHECK(libpostproc, no, LIBPOSTPROC, no, libpostproc/postprocess.h,
++TC_PKG_CHECK(libpostproc, no, LIBPOSTPROC, no, ffmpeg/libpostproc/postprocess.h,
    postproc, pp_postprocess, libpostproc, [http://www.ffmpeg.org/])
  TC_PKG_HAVE(libpostproc, LIBPOSTPROC)
  
@@ -55,7 +55,7 @@
  #include <assert.h>
  
 -#include <ffmpeg/avcodec.h>
-+#include <libavcodec/avcodec.h>
++#include <ffmpeg/libavcodec/avcodec.h>
  
  #include "aud_aux.h"
  #include "ac3.h"
@@ -67,7 +67,7 @@
  // FIXME
  #undef EMULATE_FAST_INT
 -#include <ffmpeg/avcodec.h>
-+#include <libavcodec/avcodec.h>
++#include <ffmpeg/libavcodec/avcodec.h>
  
  #if !defined(INFINITY) && defined(HUGE_VAL)
  #define INFINITY HUGE_VAL
@@ -79,7 +79,7 @@
  
  #include "libioaux/configs.h"
 -#include <ffmpeg/avcodec.h>
-+#include <libavcodec/avcodec.h>
++#include <ffmpeg/libavcodec/avcodec.h>
  
  //char *lavc_param_vcodec = "mpeg4";
  //extern int lavc_param_vbitrate;
@@ -91,7 +91,7 @@
  #include "optstr.h"
  
 -#include <ffmpeg/avcodec.h>
-+#include <libavcodec/avcodec.h>
++#include <ffmpeg/libavcodec/avcodec.h>
  
  static char * resample_buffer = NULL;
  static int bytes_per_sample;
@@ -103,7 +103,7 @@
  #include <inttypes.h>
  
 -#include "postprocess.h"
-+#include "libpostproc/postprocess.h"
++#include "ffmpeg/libpostproc/postprocess.h"
  
  static pp_mode_t *mode[MAX_FILTER];
  static pp_context_t *context[MAX_FILTER];
@@ -115,7 +115,7 @@
  #undef EMULATE_FAST_INT
  #endif
 -#include <ffmpeg/avcodec.h>
-+#include <libavcodec/avcodec.h>
++#include <ffmpeg/libavcodec/avcodec.h>
  #include "yuv2rgb.h"
  
  #define READ_BUFFER_SIZE (10*1024*1024)
@@ -127,7 +127,7 @@
  // FIXME
  #undef EMULATE_FAST_INT
 -#include <ffmpeg/avcodec.h>
-+#include <libavcodec/avcodec.h>
++#include <ffmpeg/libavcodec/avcodec.h>
  
  #include "libvo/yuv2rgb.h"
  #include "avilib/avilib.h"
@@ -139,7 +139,7 @@
  
  #if 0
 -#include <ffmpeg/avcodec.h>
-+#include <libavcodec/avcodec.h>
++#include <ffmpeg/libavcodec/avcodec.h>
  
  void dummy_avcodec(void) {
    AVCodecContext *ctx = NULL;
[root@bizzi /usr/src/redhat/SOURCES]# less transcode-1.0.5-ffmpeg.patch[root@bizzi /usr/src/redhat/SOURCES]# diff -u transcode-1.0.5-ffmpeg.patch.org transcode-1.0.5-ffmpeg.patch
--- transcode-1.0.5-ffmpeg.patch.org	2008-06-16 15:15:07.000000000 +0200
+++ transcode-1.0.5-ffmpeg.patch	2008-06-16 15:19:22.000000000 +0200
@@ -6,7 +6,7 @@
    [enable_libavcodec_static=no])
  LIBAVCODEC_EXTRA_LIBS="$LIBAVCODEC_EXTRA_LIBS $($PKG_CONFIG --libs libavcodec)"
 -TC_PKG_CHECK(libavcodec, required, LIBAVCODEC, no, [ffmpeg/avcodec.h],
-+TC_PKG_CHECK(libavcodec, required, LIBAVCODEC, no, [libavcodec/avcodec.h],
++TC_PKG_CHECK(libavcodec, required, LIBAVCODEC, no, [ffmpeg/libavcodec/avcodec.h],
   avcodec, avcodec_thread_init, FFMpeg, [http://www.ffmpeg.org/])
  if test x"$have_libavcodec" = x"yes" ; then
    save_CPPFLAGS="$CPPFLAGS"
@@ -14,7 +14,7 @@
    AC_TRY_RUN([
  #include <stdio.h>
 -#include <ffmpeg/avcodec.h>
-+#include <libavcodec/avcodec.h>
++#include <ffmpeg/libavcodec/avcodec.h>
  int
  main()
  {
@@ -24,8 +24,8 @@
        LIBAVCODEC_BUILD="`./conftest$ac_exeext | sed -ne 's,BUILD=\(.*\),\1,p'`"],
 -    [TC_PKG_ERROR(libavcodec, ffmpeg/avcodec.h, required, libavcodec, [http://www.ffmpeg.org],
 -      [cannot compile ffmpeg/avcodec.h])],
-+    [TC_PKG_ERROR(libavcodec, libavcodec/avcodec.h, required, libavcodec, [http://www.ffmpeg.org],
-+      [cannot compile libavcodec/avcodec.h])],
++    [TC_PKG_ERROR(libavcodec, ffmpeg/libavcodec/avcodec.h, required, libavcodec, [http://www.ffmpeg.org],
++      [cannot compile ffmpeg/libavcodec/avcodec.h])],
      [echo $ac_n "cross compiling; assumed OK... $ac_c"
        LIBAVCODEC_VERSION=""
        LIBAVCODEC_BUILD=""])
@@ -34,7 +34,7 @@
      LIBS="$LIBS $w_libavcodec_l${deflib}/libavcodec.a $LIBAVCODEC_EXTRA_LIBS"
      AC_TRY_LINK([
 -#include <ffmpeg/avcodec.h>
-+#include <libavcodec/avcodec.h>
++#include <ffmpeg/libavcodec/avcodec.h>
  ],[
  AVCodecContext *ctx = (void *)0;
  avcodec_thread_init(ctx, 0);
@@ -43,7 +43,7 @@
  dnl libpostproc
  dnl
 -TC_PKG_CHECK(libpostproc, no, LIBPOSTPROC, no, postprocess.h,
-+TC_PKG_CHECK(libpostproc, no, LIBPOSTPROC, no, libpostproc/postprocess.h,
++TC_PKG_CHECK(libpostproc, no, LIBPOSTPROC, no, ffmpeg/libpostproc/postprocess.h,
    postproc, pp_postprocess, libpostproc, [http://www.ffmpeg.org/])
  TC_PKG_HAVE(libpostproc, LIBPOSTPROC)
  
@@ -55,7 +55,7 @@
  #include <assert.h>
  
 -#include <ffmpeg/avcodec.h>
-+#include <libavcodec/avcodec.h>
++#include <ffmpeg/libavcodec/avcodec.h>
  
  #include "aud_aux.h"
  #include "ac3.h"
@@ -67,7 +67,7 @@
  // FIXME
  #undef EMULATE_FAST_INT
 -#include <ffmpeg/avcodec.h>
-+#include <libavcodec/avcodec.h>
++#include <ffmpeg/libavcodec/avcodec.h>
  
  #if !defined(INFINITY) && defined(HUGE_VAL)
  #define INFINITY HUGE_VAL
@@ -79,7 +79,7 @@
  
  #include "libioaux/configs.h"
 -#include <ffmpeg/avcodec.h>
-+#include <libavcodec/avcodec.h>
++#include <ffmpeg/libavcodec/avcodec.h>
  
  //char *lavc_param_vcodec = "mpeg4";
  //extern int lavc_param_vbitrate;
@@ -91,7 +91,7 @@
  #include "optstr.h"
  
 -#include <ffmpeg/avcodec.h>
-+#include <libavcodec/avcodec.h>
++#include <ffmpeg/libavcodec/avcodec.h>
  
  static char * resample_buffer = NULL;
  static int bytes_per_sample;
@@ -103,7 +103,7 @@
  #include <inttypes.h>
  
 -#include "postprocess.h"
-+#include "libpostproc/postprocess.h"
++#include "ffmpeg/libpostproc/postprocess.h"
  
  static pp_mode_t *mode[MAX_FILTER];
  static pp_context_t *context[MAX_FILTER];
@@ -115,7 +115,7 @@
  #undef EMULATE_FAST_INT
  #endif
 -#include <ffmpeg/avcodec.h>
-+#include <libavcodec/avcodec.h>
++#include <ffmpeg/libavcodec/avcodec.h>
  #include "yuv2rgb.h"
  
  #define READ_BUFFER_SIZE (10*1024*1024)
@@ -127,7 +127,7 @@
  // FIXME
  #undef EMULATE_FAST_INT
 -#include <ffmpeg/avcodec.h>
-+#include <libavcodec/avcodec.h>
++#include <ffmpeg/libavcodec/avcodec.h>
  
  #include "libvo/yuv2rgb.h"
  #include "avilib/avilib.h"
@@ -139,7 +139,7 @@
  
  #if 0
 -#include <ffmpeg/avcodec.h>
-+#include <libavcodec/avcodec.h>
++#include <ffmpeg/libavcodec/avcodec.h>
  
  void dummy_avcodec(void) {
    AVCodecContext *ctx = NULL;

--------------030406080405050500040808
Content-Type: text/plain;
 name="diff-transcode.spec"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="diff-transcode.spec"

--- transcode.spec.org	2008-06-16 15:06:33.000000000 +0200
+++ transcode.spec	2008-06-16 16:47:41.000000000 +0200
@@ -85,6 +85,7 @@
     %{!?_without_mjpeg:--enable-mjpegtools} \
     --enable-sdl \
     --enable-gtk \
+    --disable-nuv \
     %{!?_without_libfame:--enable-libfame} \
     %{!?_without_magick:--enable-imagemagick}
 %{__make} %{?_smp_mflags}

--------------030406080405050500040808
Content-Type: text/x-chdr;
 name="diff-avcodec.h"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="diff-avcodec.h"

--- avcodec.h.org	2008-06-17 08:59:13.000000000 +0200
+++ avcodec.h	2008-06-17 08:58:57.000000000 +0200
@@ -27,7 +27,7 @@
  */
 
 
-#include "libavutil/avutil.h"
+#include "ffmpeg/libavutil/avutil.h"
 
 #define LIBAVCODEC_VERSION_MAJOR 51
 #define LIBAVCODEC_VERSION_MINOR 56

--------------030406080405050500040808--