Gentoo Archives: gentoo-commits

From: "Ben de Groot (yngwin)" <yngwin@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in x11-misc/xvidcap/files: xvidcap-1.1.7_rc1-new-ffmpeg-headers.patch xvidcap-1.1.7_rc1-ffmpeg.patch
Date: Sun, 13 Apr 2008 23:27:58
Message-Id: E1JlBc4-0004Gd-55@stork.gentoo.org
1 yngwin 08/04/13 23:27:56
2
3 Added: xvidcap-1.1.7_rc1-new-ffmpeg-headers.patch
4 xvidcap-1.1.7_rc1-ffmpeg.patch
5 Log:
6 Adding xvidcap-1.1.4_rc1, patched to work with new ffmpeg
7 (Portage version: 2.1.5_rc3)
8
9 Revision Changes Path
10 1.1 x11-misc/xvidcap/files/xvidcap-1.1.7_rc1-new-ffmpeg-headers.patch
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-misc/xvidcap/files/xvidcap-1.1.7_rc1-new-ffmpeg-headers.patch?rev=1.1&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-misc/xvidcap/files/xvidcap-1.1.7_rc1-new-ffmpeg-headers.patch?rev=1.1&content-type=text/plain
14
15 Index: xvidcap-1.1.7_rc1-new-ffmpeg-headers.patch
16 ===================================================================
17 diff -burN xvidcap-orig/src/codecs.c xvidcap-1.1.6/src/codecs.c
18 --- xvidcap-orig/src/codecs.c 2007-12-16 23:01:38.000000000 +0100
19 +++ xvidcap-1.1.6/src/codecs.c 2008-04-13 22:21:45.000000000 +0200
20 @@ -43,8 +43,8 @@
21 #include <locale.h>
22
23 #ifdef USE_FFMPEG
24 -#include <ffmpeg/avcodec.h>
25 -#include <ffmpeg/avformat.h>
26 +#include <libavcodec/avcodec.h>
27 +#include <libavformat/avformat.h>
28 #endif // USE_FFMPEG
29
30 #include "app_data.h"
31 diff -burN xvidcap-orig/src/main.c xvidcap-1.1.6/src/main.c
32 --- xvidcap-orig/src/main.c 2007-12-01 00:52:51.000000000 +0100
33 +++ xvidcap-1.1.6/src/main.c 2008-04-13 22:21:14.000000000 +0200
34 @@ -45,7 +45,7 @@
35 #include <locale.h>
36
37 #ifdef USE_FFMPEG
38 -#include <ffmpeg/avcodec.h>
39 +#include <libavcodec/avcodec.h>
40 #endif // USE_FFMPEG
41
42 #include "control.h"
43 diff -burN xvidcap-orig/src/xtoffmpeg.c xvidcap-1.1.6/src/xtoffmpeg.c
44 --- xvidcap-orig/src/xtoffmpeg.c 2008-04-13 22:00:04.000000000 +0200
45 +++ xvidcap-1.1.6/src/xtoffmpeg.c 2008-04-13 22:20:31.000000000 +0200
46 @@ -56,13 +56,13 @@
47 #include "xvidcap-intl.h"
48
49 // ffmpeg stuff
50 -#include <ffmpeg/avcodec.h>
51 -#include <ffmpeg/avformat.h>
52 -#include <ffmpeg/avdevice.h>
53 +#include <libavcodec/avcodec.h>
54 +#include <libavformat/avformat.h>
55 +#include <libavdevice/avdevice.h>
56 //#include <ffmpeg/dsputil.h>
57 -#include <ffmpeg/swscale.h>
58 -#include <ffmpeg/rgb2rgb.h>
59 -#include <ffmpeg/fifo.h>
60 +#include <libswscale/swscale.h>
61 +#include <libswscale/rgb2rgb.h>
62 +#include <libavutil/fifo.h>
63 #define swscale_isRGB(x) ((x)==PIX_FMT_BGR32 || (x)==PIX_FMT_RGB24 \
64 || (x)==PIX_FMT_RGB565 || (x)==PIX_FMT_RGB555 \
65 || (x)==PIX_FMT_RGB8 || (x)==PIX_FMT_RGB4 \
66
67
68
69 1.1 x11-misc/xvidcap/files/xvidcap-1.1.7_rc1-ffmpeg.patch
70
71 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-misc/xvidcap/files/xvidcap-1.1.7_rc1-ffmpeg.patch?rev=1.1&view=markup
72 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/x11-misc/xvidcap/files/xvidcap-1.1.7_rc1-ffmpeg.patch?rev=1.1&content-type=text/plain
73
74 Index: xvidcap-1.1.7_rc1-ffmpeg.patch
75 ===================================================================
76 Index: src/xtoffmpeg.c
77 ===================================================================
78 --- src/xtoffmpeg.c (Revision 302)
79 +++ src/xtoffmpeg.c (Arbeitskopie)
80 @@ -58,6 +58,7 @@
81 // ffmpeg stuff
82 #include <ffmpeg/avcodec.h>
83 #include <ffmpeg/avformat.h>
84 +#include <ffmpeg/avdevice.h>
85 //#include <ffmpeg/dsputil.h>
86 #include <ffmpeg/swscale.h>
87 #include <ffmpeg/rgb2rgb.h>
88 @@ -291,13 +292,13 @@
89
90 // prepare input stream
91 memset (ap, 0, sizeof (*ap));
92 - ap->device = job->snd_device;
93 +// ap->device = job->snd_device;
94
95 if (grab_audio) {
96 ap->sample_rate = target->sndrate;
97 ap->channels = target->sndchannels;
98
99 - grab_iformat = av_find_input_format ("audio_device");
100 + grab_iformat = av_find_input_format ("oss");
101 #ifdef DEBUG
102 printf ("%s %s: grab iformat %p\n", DEBUGFILE, DEBUGFUNCTION,
103 grab_iformat);
104 @@ -308,7 +309,7 @@
105 }
106
107 err =
108 - av_open_input_file (&ic, ap->device, (grab_audio ? grab_iformat : NULL),
109 + av_open_input_file (&ic, job->snd_device, (grab_audio ? grab_iformat : NULL),
110 0, ap);
111 if (err < 0) {
112 fprintf (stderr, _("%s %s: error opening input file %s: %i\n"),
113 @@ -1432,7 +1433,8 @@
114 input_pixfmt = guess_input_pix_fmt (image, job->c_info);
115
116 // register all libav* related stuff
117 - av_register_all ();
118 + avdevice_register_all();
119 + av_register_all();
120
121 // guess AVOutputFormat
122 if (job->target >= CAP_MF)
123 @@ -1763,7 +1765,7 @@
124 }
125
126 if (job->target < CAP_MF)
127 - url_fclose (&output_file->pb);
128 + url_fclose (output_file->pb);
129
130 #ifdef HAVE_FFMPEG_AUDIO
131 /*
132 @@ -1828,7 +1830,7 @@
133 * close file if multi-frame capture ... otherwise closed already
134 */
135 if (job->target >= CAP_MF)
136 - url_fclose (&output_file->pb);
137 + url_fclose (output_file->pb);
138 /*
139 * free streams
140 */
141 Index: configure.in
142 ===================================================================
143 --- configure.in (Revision 302)
144 +++ configure.in (Arbeitskopie)
145 @@ -103,6 +103,7 @@
146 rm ffmpeg/adler32.h >/dev/null 2>&1 || echo "" > /dev/null
147 rm ffmpeg/avcodec.h >/dev/null 2>&1 || echo "" > /dev/null
148 rm ffmpeg/avutil.h >/dev/null 2>&1 || echo "" > /dev/null
149 +rm ffmpeg/avdevice.h >/dev/null 2>&1 || echo "" > /dev/null
150 rm ffmpeg/common.h >/dev/null 2>&1 || echo "" > /dev/null
151 rm ffmpeg/dsputil.h >/dev/null 2>&1 || echo "" > /dev/null
152 rm ffmpeg/integer.h >/dev/null 2>&1 || echo "" > /dev/null
153 @@ -118,6 +119,8 @@
154 rm ffmpeg/rtspcodes.h >/dev/null 2>&1 || echo "" > /dev/null
155 rm ffmpeg/rtp_h264.h >/dev/null 2>&1 || echo "" > /dev/null
156 rm ffmpeg/rtp_internal.h >/dev/null 2>&1 || echo "" > /dev/null
157 +rm ffmpeg/rtp_aac.h >/dev/null 2>&1 || echo "" > /dev/null
158 +rm ffmpeg/rtp_mpv.h >/dev/null 2>&1 || echo "" > /dev/null
159 rm ffmpeg/fifo.h >/dev/null 2>&1 || echo "" > /dev/null
160 rm ffmpeg/swscale.h >/dev/null 2>&1 || echo "" > /dev/null
161 rm ffmpeg/rgb2rgb.h >/dev/null 2>&1 || echo "" > /dev/null
162 @@ -356,7 +359,7 @@
163 # build embedded ffmpeg
164 echo "${MAKE-make}-ing prerequisite ffmpeg libraries" && \
165 ( cd ./ffmpeg/ && \
166 - ./configure --cc=${CC} --enable-gpl ${ac_my_ffmpeg_cfg_lib_switch} --enable-pthreads --enable-swscaler --disable-ffserver --disable-ffplay && \
167 + ./configure --cc=${CC} --enable-gpl ${ac_my_ffmpeg_cfg_lib_switch} --enable-pthreads --enable-swscale --disable-ffserver --disable-ffplay && \
168 ln -s libavcodec/avcodec.h ./ && \
169 ln -s libavcodec/dsputil.h ./ && \
170 ln -s libavformat/avformat.h ./ && \
171 @@ -371,11 +374,12 @@
172 ln -s libavutil/fifo.h ./ && \
173 ln -s libswscale/swscale.h ./ && \
174 ln -s libswscale/rgb2rgb.h ./ && \
175 + ln -s libavdevice/avdevice.h ./ && \
176 ${MAKE-make} )
177 # try to link it statically, or reset cache, set static_avcodec=no
178 top_srcdir=`pwd`
179 - ac_my_ldflags_save=${LDFLAGS} ; LDFLAGS="${LDFLAGS} -L$top_srcdir/ffmpeg/libavcodec -L$top_srcdir/ffmpeg/libavformat -L$top_srcdir/ffmpeg/libavutil -L$top_srcdir/ffmpeg/libswscale"
180 - ac_my_cflags_save=${CFLAGS} ; CFLAGS="${CFLAGS} -I $top_srcdir -I[$top_srcdir]/ffmpeg/libavcodec -I[$top_srcdir]/ffmpeg/libavformat -I[$top_srcdir]/ffmpeg/libavutil -I[$top_srcdir]/ffmpeg/libswscale"
181 + ac_my_ldflags_save=${LDFLAGS} ; LDFLAGS="${LDFLAGS} -L$top_srcdir/ffmpeg/libavcodec -L$top_srcdir/ffmpeg/libavformat -L$top_srcdir/ffmpeg/libavutil -L$top_srcdir/ffmpeg/libswscale -L$top_srcdir/ffmpeg/libavdevice"
182 + ac_my_cflags_save=${CFLAGS} ; CFLAGS="${CFLAGS} -I $top_srcdir -I[$top_srcdir]/ffmpeg/libavcodec -I[$top_srcdir]/ffmpeg/libavformat -I[$top_srcdir]/ffmpeg/libavutil -I[$top_srcdir]/ffmpeg/libswscale -I[$top_srcdir]/ffmpeg/libavdevice"
183 AC_CHECK_LIB_STATIC(avutil, av_rescale,,[unset ac_cv_lib_avutil_av_rescale ; static_avcodec=no ; LDFLAGS=$ac_my_ldflags_save ; CFLAGS=$ac_my_cflags_save])
184 fi
185
186 @@ -392,16 +396,21 @@
187
188 # if avutil is linked statically, avcodec should, too
189 static_avcodec=$static_avutil
190 -ac_my_avcodec_libs=""
191 -test x`(uname -s)` = xSunOS && ac_my_avcodec_libs="-lnsl -lsocket"
192 +ac_my_avcodec_libs="-lz"
193 +test x`(uname -s)` = xSunOS && ac_my_avcodec_libs="-lz -lnsl -lsocket"
194 AC_CHECK_LIB_STATIC(avcodec, avcodec_encode_video,,[unset ac_cv_lib_avcodec_avcodec_encode_video ; static_avcodec=no ; AC_CHECK_LIB(avcodec, avcodec_encode_video,,,[$ac_my_avcodec_libs])],[$ac_my_avcodec_libs])
195
196 # if avcodec is linked statically, avformat should, too
197 static_avformat=$static_avcodec
198 -ac_my_avformat_libs=""
199 -test x`(uname -s)` = xSunOS && ac_my_avformat_libs="-lnsl -lsocket"
200 +ac_my_avformat_libs="-lz"
201 +test x`(uname -s)` = xSunOS && ac_my_avformat_libs="-lz -lnsl -lsocket"
202 AC_CHECK_LIB_STATIC(avformat, av_write_header,,[unset ac_cv_lib_avformat_av_write_header ; static_avformat=no ; AC_CHECK_LIB(avformat, av_write_header,,,[$ac_my_avformat_libs])],[$ac_my_avformat_libs])
203
204 +# if avcodec is linked statically, avdevice should, too
205 +static_avdevice=$static_avcodec
206 +ac_my_avdevice_libs="-lz"
207 +test x`(uname -s)` = xSunOS && ac_my_avdevice_libs="-lz -lnsl -lsocket"
208 +AC_CHECK_LIB_STATIC(avdevice, avdevice_register_all,,[unset ac_cv_lib_avdevice_avdevice_register_all ; static_avdevice=no ; AC_CHECK_LIB(avdevice, avdevice_register_all,,,[$ac_my_avdevice_libs])],[$ac_my_avdevice_libs])
209
210 # only use ffmpeg if ALL required libs are present
211 if ( `test x$ac_cv_lib_avcodec_avcodec_encode_video = xyes -a x$ac_cv_lib_avformat_av_write_header = xyes -a x$ac_cv_lib_avutil_av_rescale = xyes -a x$ac_cv_lib_swscale_sws_scale = xyes` ) ; then
212 Index: config.h.in
213 ===================================================================
214 --- config.h.in (Revision 302)
215 +++ config.h.in (Arbeitskopie)
216 @@ -51,6 +51,9 @@
217 /* Define to 1 if you have the `avcodec' library (-lavcodec). */
218 #undef HAVE_LIBAVCODEC
219
220 +/* Define to 1 if you have the `avdevice' library (-lavdevice). */
221 +#undef HAVE_LIBAVDEVICE
222 +
223 /* Define to 1 if you have the `avformat' library (-lavformat). */
224 #undef HAVE_LIBAVFORMAT
225
226
227
228 --
229 gentoo-commits@l.g.o mailing list