Mercurial > mplayer.hg
comparison libmpdemux/asf.h @ 4310:1c88d75b446c
Removed unused code that I commented earlier.
author | bertrand |
---|---|
date | Wed, 23 Jan 2002 08:43:04 +0000 |
parents | b84e9861461c |
children | 8cfce21c6013 |
comparison
equal
deleted
inserted
replaced
4309:35b412015c39 | 4310:1c88d75b446c |
---|---|
2 #define __ASF_H | 2 #define __ASF_H |
3 | 3 |
4 //#include "config.h" /* for WORDS_BIGENDIAN */ | 4 //#include "config.h" /* for WORDS_BIGENDIAN */ |
5 #include <inttypes.h> | 5 #include <inttypes.h> |
6 #include "bswap.h" | 6 #include "bswap.h" |
7 #ifdef STREAMING | |
8 #include "stream.h" | |
9 #include "network.h" | |
10 #endif | |
11 | 7 |
12 #ifndef MIN | 8 #ifndef MIN |
13 #define MIN(a,b) ((a<b)?a:b) | 9 #define MIN(a,b) ((a<b)?a:b) |
14 #endif | 10 #endif |
15 | 11 |
46 } ASF_header_t; | 42 } ASF_header_t; |
47 | 43 |
48 ///////////////////// | 44 ///////////////////// |
49 // ASF File Header | 45 // ASF File Header |
50 ///////////////////// | 46 ///////////////////// |
51 /* Bertrand -- 2002/01/19 -- Start -- | |
52 typedef struct __attribute__((packed)) { | |
53 uint8_t client[16]; // Client GUID | |
54 uint64_t file_size; | |
55 uint64_t creat_time; //File creation time FILETIME 8 | |
56 uint64_t packets; //Number of packets UINT64 8 | |
57 uint64_t end_timestamp; //Timestamp of the end position UINT64 8 | |
58 uint64_t duration; //Duration of the playback UINT64 8 | |
59 uint32_t start_timestamp; //Timestamp of the start position UINT32 4 | |
60 uint32_t preroll; //Time to bufferize before playing UINT32 4 | |
61 uint32_t flags; //Unknown, maybe flags ( usually contains 2 ) UINT32 4 | |
62 uint32_t packetsize; //Size of packet, in bytes UINT32 4 | |
63 uint32_t packetsize2; //Size of packet ( confirm ) UINT32 4 | |
64 uint32_t frame_size; //Size of uncompressed video frame UINT32 4 | |
65 } ASF_file_header_t; | |
66 */ | |
67 typedef struct __attribute__((packed)) { | 47 typedef struct __attribute__((packed)) { |
68 uint8_t stream_id[16]; // stream GUID | 48 uint8_t stream_id[16]; // stream GUID |
69 uint64_t file_size; | 49 uint64_t file_size; |
70 uint64_t creation_time; //File creation time FILETIME 8 | 50 uint64_t creation_time; //File creation time FILETIME 8 |
71 uint64_t num_packets; //Number of packets UINT64 8 | 51 uint64_t num_packets; //Number of packets UINT64 8 |
75 uint32_t flags; //Unknown, maybe flags ( usually contains 2 ) UINT32 4 | 55 uint32_t flags; //Unknown, maybe flags ( usually contains 2 ) UINT32 4 |
76 uint32_t min_packet_size; //Min size of the packet, in bytes UINT32 4 | 56 uint32_t min_packet_size; //Min size of the packet, in bytes UINT32 4 |
77 uint32_t max_packet_size; //Max size of the packet UINT32 4 | 57 uint32_t max_packet_size; //Max size of the packet UINT32 4 |
78 uint32_t max_bitrate; //Maximum bitrate of the media (sum of all the stream) | 58 uint32_t max_bitrate; //Maximum bitrate of the media (sum of all the stream) |
79 } ASF_file_header_t; | 59 } ASF_file_header_t; |
80 // Bertrand -- 2002/01/19 -- End -- | |
81 | 60 |
82 /////////////////////// | 61 /////////////////////// |
83 // ASF Stream Header | 62 // ASF Stream Header |
84 /////////////////////// | 63 /////////////////////// |
85 typedef struct __attribute__((packed)) { | 64 typedef struct __attribute__((packed)) { |
152 (h)->type_size = le2me_32((h)->type_size); \ | 131 (h)->type_size = le2me_32((h)->type_size); \ |
153 (h)->stream_size = le2me_32((h)->stream_size); \ | 132 (h)->stream_size = le2me_32((h)->stream_size); \ |
154 (h)->stream_no = le2me_16((h)->stream_no); \ | 133 (h)->stream_no = le2me_16((h)->stream_no); \ |
155 (h)->unk2 = le2me_32((h)->unk2); \ | 134 (h)->unk2 = le2me_32((h)->unk2); \ |
156 } | 135 } |
157 /* Bertrand -- 2002/01/19 -- Start -- | |
158 #define le2me_ASF_file_header_t(h) { \ | |
159 (h)->file_size = le2me_64((h)->file_size); \ | |
160 (h)->creat_time = le2me_64((h)->creat_time); \ | |
161 (h)->packets = le2me_64((h)->packets); \ | |
162 (h)->end_timestamp = le2me_64((h)->end_timestamp); \ | |
163 (h)->duration = le2me_64((h)->duration); \ | |
164 (h)->start_timestamp = le2me_32((h)->start_timestamp); \ | |
165 (h)->preroll = le2me_32((h)->preroll); \ | |
166 (h)->flags = le2me_32((h)->flags); \ | |
167 (h)->packetsize = le2me_32((h)->packetsize); \ | |
168 (h)->packetsize2 = le2me_32((h)->packetsize2); \ | |
169 (h)->frame_size = le2me_32((h)->frame_size); \ | |
170 } | |
171 */ | |
172 #define le2me_ASF_file_header_t(h) { \ | 136 #define le2me_ASF_file_header_t(h) { \ |
173 (h)->file_size = le2me_64((h)->file_size); \ | 137 (h)->file_size = le2me_64((h)->file_size); \ |
174 (h)->creation_time = le2me_64((h)->creation_time); \ | 138 (h)->creation_time = le2me_64((h)->creation_time); \ |
175 (h)->num_packets = le2me_64((h)->num_packets); \ | 139 (h)->num_packets = le2me_64((h)->num_packets); \ |
176 (h)->play_duration = le2me_64((h)->play_duration); \ | 140 (h)->play_duration = le2me_64((h)->play_duration); \ |
179 (h)->flags = le2me_32((h)->flags); \ | 143 (h)->flags = le2me_32((h)->flags); \ |
180 (h)->min_packet_size = le2me_32((h)->min_packet_size); \ | 144 (h)->min_packet_size = le2me_32((h)->min_packet_size); \ |
181 (h)->max_packet_size = le2me_32((h)->max_packet_size); \ | 145 (h)->max_packet_size = le2me_32((h)->max_packet_size); \ |
182 (h)->max_bitrate = le2me_32((h)->max_bitrate); \ | 146 (h)->max_bitrate = le2me_32((h)->max_bitrate); \ |
183 } | 147 } |
184 // Bertrand -- 2002/01/19 -- End -- | |
185 #define le2me_ASF_content_description_t(h) { \ | 148 #define le2me_ASF_content_description_t(h) { \ |
186 (h)->title_size = le2me_16((h)->title_size); \ | 149 (h)->title_size = le2me_16((h)->title_size); \ |
187 (h)->author_size = le2me_16((h)->author_size); \ | 150 (h)->author_size = le2me_16((h)->author_size); \ |
188 (h)->copyright_size = le2me_16((h)->copyright_size); \ | 151 (h)->copyright_size = le2me_16((h)->copyright_size); \ |
189 (h)->comment_size = le2me_16((h)->comment_size); \ | 152 (h)->comment_size = le2me_16((h)->comment_size); \ |