Originally committed as revision 24319 to svn://svn.ffmpeg.org/ffmpeg/trunk
Stefano Sabatini authored on 2010/07/19 07:37:39... | ... |
@@ -24,6 +24,7 @@ |
24 | 24 |
#include "libavcodec/imgconvert.h" |
25 | 25 |
#include "libavutil/pixdesc.h" |
26 | 26 |
#include "avfilter.h" |
27 |
+#include "internal.h" |
|
27 | 28 |
|
28 | 29 |
unsigned avfilter_version(void) { |
29 | 30 |
return LIBAVFILTER_VERSION_INT; |
... | ... |
@@ -168,7 +169,7 @@ int avfilter_config_links(AVFilterContext *filter) |
168 | 168 |
return 0; |
169 | 169 |
} |
170 | 170 |
|
171 |
-static void dprintf_picref(void *ctx, AVFilterPicRef *picref, int end) |
|
171 |
+void ff_dprintf_picref(void *ctx, AVFilterPicRef *picref, int end) |
|
172 | 172 |
{ |
173 | 173 |
dprintf(ctx, |
174 | 174 |
"picref[%p data[%p, %p, %p, %p] linesize[%d, %d, %d, %d] pts:%"PRId64" pos:%"PRId64" a:%d/%d s:%dx%d]%s", |
... | ... |
@@ -180,7 +181,7 @@ static void dprintf_picref(void *ctx, AVFilterPicRef *picref, int end) |
180 | 180 |
end ? "\n" : ""); |
181 | 181 |
} |
182 | 182 |
|
183 |
-static void dprintf_link(void *ctx, AVFilterLink *link, int end) |
|
183 |
+void ff_dprintf_link(void *ctx, AVFilterLink *link, int end) |
|
184 | 184 |
{ |
185 | 185 |
dprintf(ctx, |
186 | 186 |
"link[%p s:%dx%d fmt:%-16s %-16s->%-16s]%s", |
... | ... |
@@ -191,13 +192,11 @@ static void dprintf_link(void *ctx, AVFilterLink *link, int end) |
191 | 191 |
end ? "\n" : ""); |
192 | 192 |
} |
193 | 193 |
|
194 |
-#define DPRINTF_START(ctx, func) dprintf(NULL, "%-16s: ", #func) |
|
195 |
- |
|
196 | 194 |
AVFilterPicRef *avfilter_get_video_buffer(AVFilterLink *link, int perms, int w, int h) |
197 | 195 |
{ |
198 | 196 |
AVFilterPicRef *ret = NULL; |
199 | 197 |
|
200 |
- DPRINTF_START(NULL, get_video_buffer); dprintf_link(NULL, link, 0); dprintf(NULL, " perms:%d w:%d h:%d\n", perms, w, h); |
|
198 |
+ FF_DPRINTF_START(NULL, get_video_buffer); ff_dprintf_link(NULL, link, 0); dprintf(NULL, " perms:%d w:%d h:%d\n", perms, w, h); |
|
201 | 199 |
|
202 | 200 |
if(link_dpad(link).get_video_buffer) |
203 | 201 |
ret = link_dpad(link).get_video_buffer(link, perms, w, h); |
... | ... |
@@ -205,14 +204,14 @@ AVFilterPicRef *avfilter_get_video_buffer(AVFilterLink *link, int perms, int w, |
205 | 205 |
if(!ret) |
206 | 206 |
ret = avfilter_default_get_video_buffer(link, perms, w, h); |
207 | 207 |
|
208 |
- DPRINTF_START(NULL, get_video_buffer); dprintf_link(NULL, link, 0); dprintf(NULL, " returning "); dprintf_picref(NULL, ret, 1); |
|
208 |
+ FF_DPRINTF_START(NULL, get_video_buffer); ff_dprintf_link(NULL, link, 0); dprintf(NULL, " returning "); ff_dprintf_picref(NULL, ret, 1); |
|
209 | 209 |
|
210 | 210 |
return ret; |
211 | 211 |
} |
212 | 212 |
|
213 | 213 |
int avfilter_request_frame(AVFilterLink *link) |
214 | 214 |
{ |
215 |
- DPRINTF_START(NULL, request_frame); dprintf_link(NULL, link, 1); |
|
215 |
+ FF_DPRINTF_START(NULL, request_frame); ff_dprintf_link(NULL, link, 1); |
|
216 | 216 |
|
217 | 217 |
if(link_spad(link).request_frame) |
218 | 218 |
return link_spad(link).request_frame(link); |
... | ... |
@@ -246,7 +245,7 @@ void avfilter_start_frame(AVFilterLink *link, AVFilterPicRef *picref) |
246 | 246 |
void (*start_frame)(AVFilterLink *, AVFilterPicRef *); |
247 | 247 |
AVFilterPad *dst = &link_dpad(link); |
248 | 248 |
|
249 |
- DPRINTF_START(NULL, start_frame); dprintf_link(NULL, link, 0); dprintf(NULL, " "); dprintf_picref(NULL, picref, 1); |
|
249 |
+ FF_DPRINTF_START(NULL, start_frame); ff_dprintf_link(NULL, link, 0); dprintf(NULL, " "); ff_dprintf_picref(NULL, picref, 1); |
|
250 | 250 |
|
251 | 251 |
if(!(start_frame = dst->start_frame)) |
252 | 252 |
start_frame = avfilter_default_start_frame; |
... | ... |
@@ -295,7 +294,7 @@ void avfilter_draw_slice(AVFilterLink *link, int y, int h, int slice_dir) |
295 | 295 |
int i, j, vsub; |
296 | 296 |
void (*draw_slice)(AVFilterLink *, int, int, int); |
297 | 297 |
|
298 |
- DPRINTF_START(NULL, draw_slice); dprintf_link(NULL, link, 0); dprintf(NULL, " y:%d h:%d dir:%d\n", y, h, slice_dir); |
|
298 |
+ FF_DPRINTF_START(NULL, draw_slice); ff_dprintf_link(NULL, link, 0); dprintf(NULL, " y:%d h:%d dir:%d\n", y, h, slice_dir); |
|
299 | 299 |
|
300 | 300 |
/* copy the slice if needed for permission reasons */ |
301 | 301 |
if(link->srcpic) { |
... | ... |
@@ -26,7 +26,7 @@ |
26 | 26 |
|
27 | 27 |
#define LIBAVFILTER_VERSION_MAJOR 1 |
28 | 28 |
#define LIBAVFILTER_VERSION_MINOR 25 |
29 |
-#define LIBAVFILTER_VERSION_MICRO 0 |
|
29 |
+#define LIBAVFILTER_VERSION_MICRO 1 |
|
30 | 30 |
|
31 | 31 |
#define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \ |
32 | 32 |
LIBAVFILTER_VERSION_MINOR, \ |
33 | 33 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,35 @@ |
0 |
+/* |
|
1 |
+ * This file is part of FFmpeg. |
|
2 |
+ * |
|
3 |
+ * FFmpeg is free software; you can redistribute it and/or |
|
4 |
+ * modify it under the terms of the GNU Lesser General Public |
|
5 |
+ * License as published by the Free Software Foundation; either |
|
6 |
+ * version 2.1 of the License, or (at your option) any later version. |
|
7 |
+ * |
|
8 |
+ * FFmpeg is distributed in the hope that it will be useful, |
|
9 |
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
10 |
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|
11 |
+ * Lesser General Public License for more details. |
|
12 |
+ * |
|
13 |
+ * You should have received a copy of the GNU Lesser General Public |
|
14 |
+ * License along with FFmpeg; if not, write to the Free Software |
|
15 |
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
|
16 |
+ */ |
|
17 |
+ |
|
18 |
+#ifndef AVFILTER_INTERNAL_H |
|
19 |
+#define AVFILTER_INTERNAL_H |
|
20 |
+ |
|
21 |
+/** |
|
22 |
+ * @file |
|
23 |
+ * internal API functions |
|
24 |
+ */ |
|
25 |
+ |
|
26 |
+#include "avfilter.h" |
|
27 |
+ |
|
28 |
+void ff_dprintf_picref(void *ctx, AVFilterPicRef *picref, int end); |
|
29 |
+ |
|
30 |
+void ff_dprintf_link(void *ctx, AVFilterLink *link, int end); |
|
31 |
+ |
|
32 |
+#define FF_DPRINTF_START(ctx, func) dprintf(NULL, "%-16s: ", #func) |
|
33 |
+ |
|
34 |
+#endif /* AVFILTER_INTERNAL_H */ |