annotate gxf.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 ab7237c58572
children 1b6245500d8c
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1306
8bf9be9bb107 Add official LGPL license headers to the files that were missing them.
diego
parents: 1183
diff changeset
1 /*
8bf9be9bb107 Add official LGPL license headers to the files that were missing them.
diego
parents: 1183
diff changeset
2 * GXF demuxer
8bf9be9bb107 Add official LGPL license headers to the files that were missing them.
diego
parents: 1183
diff changeset
3 * copyright (c) 2006 Reimar Doeffinger
8bf9be9bb107 Add official LGPL license headers to the files that were missing them.
diego
parents: 1183
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: 1183
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: 1183
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: 1183
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: 1183
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: 1183
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: 1183
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: 1183
diff changeset
16 *
8bf9be9bb107 Add official LGPL license headers to the files that were missing them.
diego
parents: 1183
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: 1183
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: 1183
diff changeset
20 */
8bf9be9bb107 Add official LGPL license headers to the files that were missing them.
diego
parents: 1183
diff changeset
21
1183
5b04d98e11bb GXF muxer
bcoudurier
parents:
diff changeset
22 #ifndef FFMPEG_GXF_H
5b04d98e11bb GXF muxer
bcoudurier
parents:
diff changeset
23 #define FFMPEG_GXF_H
5b04d98e11bb GXF muxer
bcoudurier
parents:
diff changeset
24
5b04d98e11bb GXF muxer
bcoudurier
parents:
diff changeset
25 /* gxf.c */
5b04d98e11bb GXF muxer
bcoudurier
parents:
diff changeset
26 typedef enum {
2283
ab7237c58572 cosmetics: alignment
aurel
parents: 2282
diff changeset
27 PKT_MAP = 0xbc,
ab7237c58572 cosmetics: alignment
aurel
parents: 2282
diff changeset
28 PKT_MEDIA = 0xbf,
ab7237c58572 cosmetics: alignment
aurel
parents: 2282
diff changeset
29 PKT_EOS = 0xfb,
ab7237c58572 cosmetics: alignment
aurel
parents: 2282
diff changeset
30 PKT_FLT = 0xfc,
ab7237c58572 cosmetics: alignment
aurel
parents: 2282
diff changeset
31 PKT_UMF = 0xfd,
1183
5b04d98e11bb GXF muxer
bcoudurier
parents:
diff changeset
32 } pkt_type_t;
5b04d98e11bb GXF muxer
bcoudurier
parents:
diff changeset
33
2282
47f5906c30cc replaces hardcoded values by the equivalent enum definitions
aurel
parents: 1358
diff changeset
34 typedef enum {
47f5906c30cc replaces hardcoded values by the equivalent enum definitions
aurel
parents: 1358
diff changeset
35 MAT_NAME = 0x40,
47f5906c30cc replaces hardcoded values by the equivalent enum definitions
aurel
parents: 1358
diff changeset
36 MAT_FIRST_FIELD = 0x41,
47f5906c30cc replaces hardcoded values by the equivalent enum definitions
aurel
parents: 1358
diff changeset
37 MAT_LAST_FIELD = 0x42,
47f5906c30cc replaces hardcoded values by the equivalent enum definitions
aurel
parents: 1358
diff changeset
38 MAT_MARK_IN = 0x43,
47f5906c30cc replaces hardcoded values by the equivalent enum definitions
aurel
parents: 1358
diff changeset
39 MAT_MARK_OUT = 0x44,
47f5906c30cc replaces hardcoded values by the equivalent enum definitions
aurel
parents: 1358
diff changeset
40 MAT_SIZE = 0x45,
47f5906c30cc replaces hardcoded values by the equivalent enum definitions
aurel
parents: 1358
diff changeset
41 } mat_tag_t;
47f5906c30cc replaces hardcoded values by the equivalent enum definitions
aurel
parents: 1358
diff changeset
42
47f5906c30cc replaces hardcoded values by the equivalent enum definitions
aurel
parents: 1358
diff changeset
43 typedef enum {
47f5906c30cc replaces hardcoded values by the equivalent enum definitions
aurel
parents: 1358
diff changeset
44 TRACK_NAME = 0x4c,
47f5906c30cc replaces hardcoded values by the equivalent enum definitions
aurel
parents: 1358
diff changeset
45 TRACK_AUX = 0x4d,
47f5906c30cc replaces hardcoded values by the equivalent enum definitions
aurel
parents: 1358
diff changeset
46 TRACK_VER = 0x4e,
47f5906c30cc replaces hardcoded values by the equivalent enum definitions
aurel
parents: 1358
diff changeset
47 TRACK_MPG_AUX = 0x4f,
47f5906c30cc replaces hardcoded values by the equivalent enum definitions
aurel
parents: 1358
diff changeset
48 TRACK_FPS = 0x50,
47f5906c30cc replaces hardcoded values by the equivalent enum definitions
aurel
parents: 1358
diff changeset
49 TRACK_LINES = 0x51,
47f5906c30cc replaces hardcoded values by the equivalent enum definitions
aurel
parents: 1358
diff changeset
50 TRACK_FPF = 0x52,
47f5906c30cc replaces hardcoded values by the equivalent enum definitions
aurel
parents: 1358
diff changeset
51 } track_tag_t;
47f5906c30cc replaces hardcoded values by the equivalent enum definitions
aurel
parents: 1358
diff changeset
52
1183
5b04d98e11bb GXF muxer
bcoudurier
parents:
diff changeset
53 #endif /* FFMPEG_GXF_H */