annotate mxf.h @ 4332:0d776969b708 libavformat

Fix the Transport: line in the SETUP request so that it works with WMS servers when trying to set up a session over TCP: - add the interleave property - add unicast, only for WMS (since it is normally only UDP, but WMS expects it for UDP and TCP) - add mode=play See discussion in "[PATCH] RTSP-MS 9/15: add interleave property to the TCP transport line of the SETUP request" thread on mailinglist.
author rbultje
date Sun, 01 Feb 2009 13:37:45 +0000
parents 8f0e6cdf0a59
children 39f6b190c772
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1186
fbdd53c2a12d MXF demuxer
bcoudurier
parents:
diff changeset
1 /*
3734
3b3b45af4a92 Factorize common code out of the mxf demuxer.
michael
parents: 3699
diff changeset
2 * MXF
4251
77e0c7511d41 cosmetics: Remove pointless period after copyright statement non-sentences.
diego
parents: 4176
diff changeset
3 * Copyright (c) 2006 SmartJog S.A., Baptiste Coudurier <baptiste dot coudurier at smartjog dot com>
1186
fbdd53c2a12d MXF demuxer
bcoudurier
parents:
diff changeset
4 *
1358
0899bfe4105c Change license headers to say 'FFmpeg' instead of 'this program/this library'
diego
parents: 1354
diff changeset
5 * This file is part of FFmpeg.
0899bfe4105c Change license headers to say 'FFmpeg' instead of 'this program/this library'
diego
parents: 1354
diff changeset
6 *
0899bfe4105c Change license headers to say 'FFmpeg' instead of 'this program/this library'
diego
parents: 1354
diff changeset
7 * FFmpeg is free software; you can redistribute it and/or
1186
fbdd53c2a12d MXF demuxer
bcoudurier
parents:
diff changeset
8 * modify it under the terms of the GNU Lesser General Public
fbdd53c2a12d MXF demuxer
bcoudurier
parents:
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: 1354
diff changeset
10 * version 2.1 of the License, or (at your option) any later version.
1186
fbdd53c2a12d MXF demuxer
bcoudurier
parents:
diff changeset
11 *
1358
0899bfe4105c Change license headers to say 'FFmpeg' instead of 'this program/this library'
diego
parents: 1354
diff changeset
12 * FFmpeg is distributed in the hope that it will be useful,
1186
fbdd53c2a12d MXF demuxer
bcoudurier
parents:
diff changeset
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
fbdd53c2a12d MXF demuxer
bcoudurier
parents:
diff changeset
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
fbdd53c2a12d MXF demuxer
bcoudurier
parents:
diff changeset
15 * Lesser General Public License for more details.
fbdd53c2a12d MXF demuxer
bcoudurier
parents:
diff changeset
16 *
fbdd53c2a12d MXF demuxer
bcoudurier
parents:
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: 1354
diff changeset
18 * License along with FFmpeg; if not, write to the Free Software
1186
fbdd53c2a12d MXF demuxer
bcoudurier
parents:
diff changeset
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
fbdd53c2a12d MXF demuxer
bcoudurier
parents:
diff changeset
20 */
3852
1b6245500d8c Globally rename the header inclusion guard names.
stefano
parents: 3829
diff changeset
21 #ifndef AVFORMAT_MXF_H
1b6245500d8c Globally rename the header inclusion guard names.
stefano
parents: 3829
diff changeset
22 #define AVFORMAT_MXF_H
1186
fbdd53c2a12d MXF demuxer
bcoudurier
parents:
diff changeset
23
4288
8f0e6cdf0a59 Directly #include some required headers.
diego
parents: 4279
diff changeset
24 #include <string.h>
3734
3b3b45af4a92 Factorize common code out of the mxf demuxer.
michael
parents: 3699
diff changeset
25 #include "avformat.h"
3286
6f61c3b36632 Use full path for #includes from another directory.
diego
parents: 3146
diff changeset
26 #include "libavcodec/bytestream.h"
1186
fbdd53c2a12d MXF demuxer
bcoudurier
parents:
diff changeset
27
1197
75bfe00a5d30 get rid of DECLARED_ALIGNED
bcoudurier
parents: 1195
diff changeset
28 typedef uint8_t UID[16];
1189
fb1a9ccffe89 declare and use UID type
bcoudurier
parents: 1188
diff changeset
29
1223
5f1bf54448e7 resolve strong refs in parse_structural_metadata since objects may not be ordered, use object oriented approach
bcoudurier
parents: 1218
diff changeset
30 enum MXFMetadataSetType {
1634
eeb3521e4d09 AnyType is needed, descriptor_ref can reference Descriptor or MultipleDescriptor
bcoudurier
parents: 1633
diff changeset
31 AnyType,
1190
03c0b0e61e5b demuxer reworked, more accurate parsing, prepare handling of other operational patterns, streaming demuxing, simplified codec detection
bcoudurier
parents: 1189
diff changeset
32 MaterialPackage,
03c0b0e61e5b demuxer reworked, more accurate parsing, prepare handling of other operational patterns, streaming demuxing, simplified codec detection
bcoudurier
parents: 1189
diff changeset
33 SourcePackage,
03c0b0e61e5b demuxer reworked, more accurate parsing, prepare handling of other operational patterns, streaming demuxing, simplified codec detection
bcoudurier
parents: 1189
diff changeset
34 SourceClip,
1223
5f1bf54448e7 resolve strong refs in parse_structural_metadata since objects may not be ordered, use object oriented approach
bcoudurier
parents: 1218
diff changeset
35 TimecodeComponent,
5f1bf54448e7 resolve strong refs in parse_structural_metadata since objects may not be ordered, use object oriented approach
bcoudurier
parents: 1218
diff changeset
36 Sequence,
5f1bf54448e7 resolve strong refs in parse_structural_metadata since objects may not be ordered, use object oriented approach
bcoudurier
parents: 1218
diff changeset
37 MultipleDescriptor,
5f1bf54448e7 resolve strong refs in parse_structural_metadata since objects may not be ordered, use object oriented approach
bcoudurier
parents: 1218
diff changeset
38 Descriptor,
5f1bf54448e7 resolve strong refs in parse_structural_metadata since objects may not be ordered, use object oriented approach
bcoudurier
parents: 1218
diff changeset
39 Track,
1779
de2cf54eb68f mxf aes decryption support, patch by Reimar, simplified to only look for first crypto context, will be extended once we get files with multiple cryptocontext, and hope that they won't have broken container ul
bcoudurier
parents: 1655
diff changeset
40 CryptoContext,
3734
3b3b45af4a92 Factorize common code out of the mxf demuxer.
michael
parents: 3699
diff changeset
41 Preface,
3b3b45af4a92 Factorize common code out of the mxf demuxer.
michael
parents: 3699
diff changeset
42 Identification,
3b3b45af4a92 Factorize common code out of the mxf demuxer.
michael
parents: 3699
diff changeset
43 ContentStorage,
3b3b45af4a92 Factorize common code out of the mxf demuxer.
michael
parents: 3699
diff changeset
44 SubDescriptor,
4176
dc74e915dfe6 100l, add missing enum type, fix compilation
bcoudurier
parents: 3973
diff changeset
45 IndexTableSegment,
4279
2402eb8c37ff write essence container data
bcoudurier
parents: 4251
diff changeset
46 EssenceContainerData,
3760
fde28855a81e Import more ok'ed chunks of the mxf muxer from the soc tree
vitor
parents: 3749
diff changeset
47 TypeBottom,// add metadata type before this
1190
03c0b0e61e5b demuxer reworked, more accurate parsing, prepare handling of other operational patterns, streaming demuxing, simplified codec detection
bcoudurier
parents: 1189
diff changeset
48 };
03c0b0e61e5b demuxer reworked, more accurate parsing, prepare handling of other operational patterns, streaming demuxing, simplified codec detection
bcoudurier
parents: 1189
diff changeset
49
2125
f7253362df84 cosmetics remove struct name with typedef
bcoudurier
parents: 2124
diff changeset
50 typedef struct {
1189
fb1a9ccffe89 declare and use UID type
bcoudurier
parents: 1188
diff changeset
51 UID key;
3973
549a09cf23fe Remove offset_t typedef and use int64_t directly instead.
diego
parents: 3852
diff changeset
52 int64_t offset;
1186
fbdd53c2a12d MXF demuxer
bcoudurier
parents:
diff changeset
53 uint64_t length;
fbdd53c2a12d MXF demuxer
bcoudurier
parents:
diff changeset
54 } KLVPacket;
fbdd53c2a12d MXF demuxer
bcoudurier
parents:
diff changeset
55
2125
f7253362df84 cosmetics remove struct name with typedef
bcoudurier
parents: 2124
diff changeset
56 typedef struct {
1190
03c0b0e61e5b demuxer reworked, more accurate parsing, prepare handling of other operational patterns, streaming demuxing, simplified codec detection
bcoudurier
parents: 1189
diff changeset
57 UID uid;
2942
8c98cc165a09 simplify by checking min matching len
bcoudurier
parents: 2912
diff changeset
58 unsigned matching_len;
1190
03c0b0e61e5b demuxer reworked, more accurate parsing, prepare handling of other operational patterns, streaming demuxing, simplified codec detection
bcoudurier
parents: 1189
diff changeset
59 enum CodecID id;
03c0b0e61e5b demuxer reworked, more accurate parsing, prepare handling of other operational patterns, streaming demuxing, simplified codec detection
bcoudurier
parents: 1189
diff changeset
60 } MXFCodecUL;
03c0b0e61e5b demuxer reworked, more accurate parsing, prepare handling of other operational patterns, streaming demuxing, simplified codec detection
bcoudurier
parents: 1189
diff changeset
61
2125
f7253362df84 cosmetics remove struct name with typedef
bcoudurier
parents: 2124
diff changeset
62 typedef struct {
1341
884baacb7f7e use a data definition uls table to fetch codec type
bcoudurier
parents: 1340
diff changeset
63 UID uid;
884baacb7f7e use a data definition uls table to fetch codec type
bcoudurier
parents: 1340
diff changeset
64 enum CodecType type;
884baacb7f7e use a data definition uls table to fetch codec type
bcoudurier
parents: 1340
diff changeset
65 } MXFDataDefinitionUL;
884baacb7f7e use a data definition uls table to fetch codec type
bcoudurier
parents: 1340
diff changeset
66
3734
3b3b45af4a92 Factorize common code out of the mxf demuxer.
michael
parents: 3699
diff changeset
67 extern const MXFDataDefinitionUL ff_mxf_data_definition_uls[];
3b3b45af4a92 Factorize common code out of the mxf demuxer.
michael
parents: 3699
diff changeset
68 extern const MXFCodecUL ff_mxf_codec_uls[];
1186
fbdd53c2a12d MXF demuxer
bcoudurier
parents:
diff changeset
69
3749
84ad19dea09f Apply parts of MXF muxer ok'ed by Michael
vitor
parents: 3734
diff changeset
70 #ifdef DEBUG
1907
b33db97089ba Give context to dprintf
mbardiaux
parents: 1779
diff changeset
71 #define PRINT_KEY(pc, s, x) dprintf(pc, "%s %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X %02X\n", s, \
1208
c199d552d934 use parenthesis around value
bcoudurier
parents: 1205
diff changeset
72 (x)[0], (x)[1], (x)[2], (x)[3], (x)[4], (x)[5], (x)[6], (x)[7], (x)[8], (x)[9], (x)[10], (x)[11], (x)[12], (x)[13], (x)[14], (x)[15])
3749
84ad19dea09f Apply parts of MXF muxer ok'ed by Michael
vitor
parents: 3734
diff changeset
73 #else
84ad19dea09f Apply parts of MXF muxer ok'ed by Michael
vitor
parents: 3734
diff changeset
74 #define PRINT_KEY(pc, s, x)
84ad19dea09f Apply parts of MXF muxer ok'ed by Michael
vitor
parents: 3734
diff changeset
75 #endif
1186
fbdd53c2a12d MXF demuxer
bcoudurier
parents:
diff changeset
76
3852
1b6245500d8c Globally rename the header inclusion guard names.
stefano
parents: 3829
diff changeset
77 #endif /* AVFORMAT_MXF_H */