/[packages]/cauldron/xvidcap/current/SOURCES/xvidcap-1.1.7-mga-external_ffmpeg.patch
ViewVC logotype

Contents of /cauldron/xvidcap/current/SOURCES/xvidcap-1.1.7-mga-external_ffmpeg.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 206243 - (show annotations) (download)
Wed Feb 8 00:22:17 2012 UTC (12 years, 1 month ago) by tavvva
File size: 4887 byte(s)
patched to use external ffmpeg

1 diff -Naur xvidcap-1.1.7.orig/src/codecs.c xvidcap-1.1.7/src/codecs.c
2 --- xvidcap-1.1.7.orig/src/codecs.c 2012-02-07 23:54:17.000000000 +0100
3 +++ xvidcap-1.1.7/src/codecs.c 2012-02-08 00:08:57.908972307 +0100
4 @@ -43,8 +43,8 @@
5 #include <locale.h>
6
7 #ifdef USE_FFMPEG
8 -#include <avcodec.h>
9 -#include <avformat.h>
10 +#include <libavcodec/avcodec.h>
11 +#include <libavformat/avformat.h>
12 #endif // USE_FFMPEG
13
14 #include "app_data.h"
15 diff -Naur xvidcap-1.1.7.orig/src/main.c xvidcap-1.1.7/src/main.c
16 --- xvidcap-1.1.7.orig/src/main.c 2012-02-07 23:54:17.000000000 +0100
17 +++ xvidcap-1.1.7/src/main.c 2012-02-08 00:10:01.768341770 +0100
18 @@ -45,7 +45,7 @@
19 #include <locale.h>
20
21 #ifdef USE_FFMPEG
22 -#include <avcodec.h>
23 +#include <libavcodec/avcodec.h>
24 #endif // USE_FFMPEG
25
26 #include "control.h"
27 diff -Naur xvidcap-1.1.7.orig/src/xtoffmpeg.c xvidcap-1.1.7/src/xtoffmpeg.c
28 --- xvidcap-1.1.7.orig/src/xtoffmpeg.c 2012-02-07 23:54:17.000000000 +0100
29 +++ xvidcap-1.1.7/src/xtoffmpeg.c 2012-02-08 00:43:47.667062790 +0100
30 @@ -56,13 +56,13 @@
31 #include "xvidcap-intl.h"
32
33 // ffmpeg stuff
34 -#include <avcodec.h>
35 -#include <avformat.h>
36 -#include <avdevice.h>
37 +#include <libavcodec/avcodec.h>
38 +#include <libavformat/avformat.h>
39 +#include <libavdevice/avdevice.h>
40 //#include <ffmpeg/dsputil.h>
41 -#include <swscale.h>
42 -#include <rgb2rgb.h>
43 -#include <fifo.h>
44 +#include <libswscale/swscale.h>
45 +/*#include <libswscale/rgb2rgb.h>*/
46 +/*#include <fifo.h>*/
47 #define swscale_isRGB(x) ((x)==PIX_FMT_BGR32 || (x)==PIX_FMT_RGB24 \
48 || (x)==PIX_FMT_RGB565 || (x)==PIX_FMT_RGB555 \
49 || (x)==PIX_FMT_RGB8 || (x)==PIX_FMT_RGB4 \
50 @@ -905,7 +905,7 @@
51 ost->time_base);
52 }
53 if (enc->coded_frame->key_frame)
54 - pkt.flags |= PKT_FLAG_KEY;
55 + pkt.flags |= AV_PKT_FLAG_KEY;
56 }
57
58 pkt.stream_index = ost->index;
59 @@ -1157,7 +1157,7 @@
60 }
61
62 st->codec->codec_id = codec_id;
63 - st->codec->codec_type = CODEC_TYPE_VIDEO;
64 + st->codec->codec_type = AVMEDIA_TYPE_VIDEO;
65
66 // find the video encoder
67 codec = avcodec_find_encoder (st->codec->codec_id);
68 @@ -1247,8 +1247,9 @@
69 // flags
70 st->codec->flags |= CODEC_FLAG2_FAST;
71 // there is no trellis quantiser in libav* for mjpeg
72 - if (st->codec->codec_id != CODEC_ID_MJPEG)
73 +/* if (st->codec->codec_id != CODEC_ID_MJPEG)
74 st->codec->flags |= CODEC_FLAG_TRELLIS_QUANT;
75 +*/
76 st->codec->flags &= ~CODEC_FLAG_OBMC;
77 // some formats want stream headers to be seperate
78 if (oc->oformat->flags & AVFMT_GLOBALHEADER)
79 @@ -1346,7 +1347,7 @@
80 // Solaris/SPARC, but need to do the conversion
81 // for every frame we do it outside of this loop, cf.
82 // below this matches both ARGB32 and ABGR32
83 - input_pixfmt = PIX_FMT_ARGB32;
84 + input_pixfmt = PIX_FMT_RGB32;
85 } else {
86 fprintf (stderr,
87 _
88 @@ -1707,7 +1708,7 @@
89
90 /** \todo test if the special image conversion for Solaris is still
91 * necessary */
92 - if (input_pixfmt == PIX_FMT_ARGB32 && job->c_info->alpha_mask == 0xFF000000
93 + if (input_pixfmt == PIX_FMT_RGB32 && job->c_info->alpha_mask == 0xFF000000
94 && image->red_mask == 0xFF && image->green_mask == 0xFF00
95 && image->blue_mask == 0xFF0000) {
96 myABGR32toARGB32 (image);
97 diff -Naur xvidcap-1.1.7.orig/src/xtoffmpeg.c xvidcap-1.1.7/src/xtoffmpeg.c
98 --- xvidcap-1.1.7.orig/src/xtoffmpeg.c 2012-02-08 01:01:24.000000000 +0100
99 +++ xvidcap-1.1.7/src/xtoffmpeg.c 2012-02-08 01:08:04.082488983 +0100
100 @@ -1440,13 +1440,13 @@
101 // guess AVOutputFormat
102 if (job->target >= CAP_MF)
103 file_oformat =
104 - guess_format (xvc_formats[job->target].ffmpeg_name, NULL, NULL);
105 + av_guess_format (xvc_formats[job->target].ffmpeg_name, NULL, NULL);
106 else {
107 char tmp_fn[30];
108
109 snprintf (tmp_fn, 29, "test-%%d.%s",
110 xvc_formats[job->target].extensions[0]);
111 - file_oformat = guess_format (NULL, tmp_fn, NULL);
112 + file_oformat = av_guess_format (NULL, tmp_fn, NULL);
113 }
114 if (!file_oformat) {
115 fprintf (stderr,
116 @@ -1467,7 +1467,7 @@
117 #endif // DEBUG
118
119 // prepare AVFormatContext
120 - output_file = av_alloc_format_context ();
121 + output_file = avformat_alloc_context ();
122 if (!output_file) {
123 fprintf (stderr,
124 _
125 diff -Naur xvidcap-1.1.7.orig/src/main.c xvidcap-1.1.7/src/main.c
126 --- xvidcap-1.1.7.orig/src/main.c 2012-02-08 00:55:07.000000000 +0100
127 +++ xvidcap-1.1.7/src/main.c 2012-02-08 01:00:02.852704784 +0100
128 @@ -218,7 +218,7 @@
129 if (app)
130 xvc_appdata_free (app);
131 #ifdef USE_FFMPEG
132 - av_free_static ();
133 +/* av_free_static ();*/
134 #endif
135 }
136

  ViewVC Help
Powered by ViewVC 1.1.30