Mercurial > libavformat.hg
annotate framehook.h @ 3754:8d267b43eaba libavformat
Move malloc() down until after all initializations, so that the resource is
only allocated if initialization worked. This means that on failure, we
don't have to deallocate it.
author | rbultje |
---|---|
date | Sat, 23 Aug 2008 18:46:30 +0000 |
parents | 6f61c3b36632 |
children | 1b6245500d8c |
rev | line source |
---|---|
1306
8bf9be9bb107
Add official LGPL license headers to the files that were missing them.
diego
parents:
885
diff
changeset
|
1 /* |
8bf9be9bb107
Add official LGPL license headers to the files that were missing them.
diego
parents:
885
diff
changeset
|
2 * video processing hooks |
8bf9be9bb107
Add official LGPL license headers to the files that were missing them.
diego
parents:
885
diff
changeset
|
3 * copyright (c) 2000, 2001 Fabrice Bellard |
8bf9be9bb107
Add official LGPL license headers to the files that were missing them.
diego
parents:
885
diff
changeset
|
4 * |
1358
0899bfe4105c
Change license headers to say 'FFmpeg' instead of 'this program/this library'
diego
parents:
1306
diff
changeset
|
5 * This file is part of FFmpeg. |
0899bfe4105c
Change license headers to say 'FFmpeg' instead of 'this program/this library'
diego
parents:
1306
diff
changeset
|
6 * |
0899bfe4105c
Change license headers to say 'FFmpeg' instead of 'this program/this library'
diego
parents:
1306
diff
changeset
|
7 * FFmpeg is free software; you can redistribute it and/or |
1306
8bf9be9bb107
Add official LGPL license headers to the files that were missing them.
diego
parents:
885
diff
changeset
|
8 * modify it under the terms of the GNU Lesser General Public |
8bf9be9bb107
Add official LGPL license headers to the files that were missing them.
diego
parents:
885
diff
changeset
|
9 * License as published by the Free Software Foundation; either |
1358
0899bfe4105c
Change license headers to say 'FFmpeg' instead of 'this program/this library'
diego
parents:
1306
diff
changeset
|
10 * version 2.1 of the License, or (at your option) any later version. |
1306
8bf9be9bb107
Add official LGPL license headers to the files that were missing them.
diego
parents:
885
diff
changeset
|
11 * |
1358
0899bfe4105c
Change license headers to say 'FFmpeg' instead of 'this program/this library'
diego
parents:
1306
diff
changeset
|
12 * FFmpeg is distributed in the hope that it will be useful, |
1306
8bf9be9bb107
Add official LGPL license headers to the files that were missing them.
diego
parents:
885
diff
changeset
|
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
8bf9be9bb107
Add official LGPL license headers to the files that were missing them.
diego
parents:
885
diff
changeset
|
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
8bf9be9bb107
Add official LGPL license headers to the files that were missing them.
diego
parents:
885
diff
changeset
|
15 * Lesser General Public License for more details. |
8bf9be9bb107
Add official LGPL license headers to the files that were missing them.
diego
parents:
885
diff
changeset
|
16 * |
8bf9be9bb107
Add official LGPL license headers to the files that were missing them.
diego
parents:
885
diff
changeset
|
17 * You should have received a copy of the GNU Lesser General Public |
1358
0899bfe4105c
Change license headers to say 'FFmpeg' instead of 'this program/this library'
diego
parents:
1306
diff
changeset
|
18 * License along with FFmpeg; if not, write to the Free Software |
1306
8bf9be9bb107
Add official LGPL license headers to the files that were missing them.
diego
parents:
885
diff
changeset
|
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
8bf9be9bb107
Add official LGPL license headers to the files that were missing them.
diego
parents:
885
diff
changeset
|
20 */ |
8bf9be9bb107
Add official LGPL license headers to the files that were missing them.
diego
parents:
885
diff
changeset
|
21 |
2620
792383dd085e
Add FFMPEG_ prefix to all multiple inclusion guards.
diego
parents:
2214
diff
changeset
|
22 #ifndef FFMPEG_FRAMEHOOK_H |
792383dd085e
Add FFMPEG_ prefix to all multiple inclusion guards.
diego
parents:
2214
diff
changeset
|
23 #define FFMPEG_FRAMEHOOK_H |
0 | 24 |
2885
266321e9b978
mention libavfilter in warning about deprecated vhook
aurel
parents:
2620
diff
changeset
|
25 #warning VHOOK is deprecated. Please help finishing libavfilter instead of wasting your time writing new filters for this crappy filter system. |
1954 | 26 |
0 | 27 /* |
885 | 28 * Prototypes for interface to .so that implement a video processing hook |
0 | 29 */ |
30 | |
3286 | 31 #include "libavcodec/avcodec.h" |
0 | 32 |
33 /* Function must be called 'Configure' */ | |
4
dcc03a32d1bb
Added support for a realease function to eliminate the context blocks used
philipjsg
parents:
0
diff
changeset
|
34 typedef int (FrameHookConfigure)(void **ctxp, int argc, char *argv[]); |
dcc03a32d1bb
Added support for a realease function to eliminate the context blocks used
philipjsg
parents:
0
diff
changeset
|
35 typedef FrameHookConfigure *FrameHookConfigureFn; |
dcc03a32d1bb
Added support for a realease function to eliminate the context blocks used
philipjsg
parents:
0
diff
changeset
|
36 extern FrameHookConfigure Configure; |
0 | 37 |
38 /* Function must be called 'Process' */ | |
65 | 39 typedef void (FrameHookProcess)(void *ctx, struct AVPicture *pict, enum PixelFormat pix_fmt, int width, int height, int64_t pts); |
4
dcc03a32d1bb
Added support for a realease function to eliminate the context blocks used
philipjsg
parents:
0
diff
changeset
|
40 typedef FrameHookProcess *FrameHookProcessFn; |
dcc03a32d1bb
Added support for a realease function to eliminate the context blocks used
philipjsg
parents:
0
diff
changeset
|
41 extern FrameHookProcess Process; |
dcc03a32d1bb
Added support for a realease function to eliminate the context blocks used
philipjsg
parents:
0
diff
changeset
|
42 |
dcc03a32d1bb
Added support for a realease function to eliminate the context blocks used
philipjsg
parents:
0
diff
changeset
|
43 /* Function must be called 'Release' */ |
dcc03a32d1bb
Added support for a realease function to eliminate the context blocks used
philipjsg
parents:
0
diff
changeset
|
44 typedef void (FrameHookRelease)(void *ctx); |
dcc03a32d1bb
Added support for a realease function to eliminate the context blocks used
philipjsg
parents:
0
diff
changeset
|
45 typedef FrameHookRelease *FrameHookReleaseFn; |
dcc03a32d1bb
Added support for a realease function to eliminate the context blocks used
philipjsg
parents:
0
diff
changeset
|
46 extern FrameHookRelease Release; |
0 | 47 |
48 extern int frame_hook_add(int argc, char *argv[]); | |
1960
c0289552590f
Change the vhook code to send real timestamps to the filters instead of the
diego
parents:
1954
diff
changeset
|
49 extern void frame_hook_process(struct AVPicture *pict, enum PixelFormat pix_fmt, int width, int height, int64_t pts); |
396 | 50 extern void frame_hook_release(void); |
0 | 51 |
2620
792383dd085e
Add FFMPEG_ prefix to all multiple inclusion guards.
diego
parents:
2214
diff
changeset
|
52 #endif /* FFMPEG_FRAMEHOOK_H */ |