Revision 83120e3b

View differences:

libavformat/asf.h
79 79
    uint16_t packet_count;
80 80
} ASFIndex;
81 81

  
82

  
83
typedef struct {
84
    uint32_t seqno;
85
    int is_streamed;
86
    int asfid2avid[128];                 ///< conversion table from asf ID 2 AVStream ID
87
    ASFStream streams[128];              ///< it's max number and it's not that big
88
    uint32_t stream_bitrates[128];       ///< max number of streams, bitrate for each (for streaming)
89
    char stream_languages[128][6];       ///< max number of streams, language for each (RFC1766, e.g. en-US)
90
    /* non streamed additonnal info */
91
    uint64_t nb_packets;                 ///< how many packets are there in the file, invalid if broadcasting
92
    int64_t duration;                    ///< in 100ns units
93
    /* packet filling */
94
    unsigned char multi_payloads_present;
95
    int packet_size_left;
96
    int packet_timestamp_start;
97
    int packet_timestamp_end;
98
    unsigned int packet_nb_payloads;
99
    int packet_nb_frames;
100
    uint8_t packet_buf[PACKET_SIZE];
101
    ByteIOContext pb;
102
    /* only for reading */
103
    uint64_t data_offset;                ///< beginning of the first data packet
104
    uint64_t data_object_offset;         ///< data object offset (excl. GUID & size)
105
    uint64_t data_object_size;           ///< size of the data object
106
    int index_read;
107

  
108
    ASFMainHeader hdr;
109

  
110
    int packet_flags;
111
    int packet_property;
112
    int packet_timestamp;
113
    int packet_segsizetype;
114
    int packet_segments;
115
    int packet_seq;
116
    int packet_replic_size;
117
    int packet_key_frame;
118
    int packet_padsize;
119
    unsigned int packet_frag_offset;
120
    unsigned int packet_frag_size;
121
    int64_t packet_frag_timestamp;
122
    int packet_multi_size;
123
    int packet_obj_size;
124
    int packet_time_delta;
125
    int packet_time_start;
126
    int64_t packet_pos;
127

  
128
    int stream_index;
129

  
130

  
131
    int64_t last_indexed_pts;
132
    ASFIndex* index_ptr;
133
    uint32_t nb_index_count;
134
    uint32_t nb_index_memory_alloc;
135
    uint16_t maximum_packet;
136

  
137
    ASFStream* asf_st;                   ///< currently decoded stream
138
} ASFContext;
139

  
140 82
extern const ff_asf_guid ff_asf_header;
141 83
extern const ff_asf_guid ff_asf_file_header;
142 84
extern const ff_asf_guid ff_asf_stream_header;
libavformat/asfdec.c
32 32

  
33 33
void ff_mms_set_stream_selection(URLContext *h, AVFormatContext *format);
34 34

  
35
typedef struct {
36
    int asfid2avid[128];                 ///< conversion table from asf ID 2 AVStream ID
37
    ASFStream streams[128];              ///< it's max number and it's not that big
38
    uint32_t stream_bitrates[128];       ///< max number of streams, bitrate for each (for streaming)
39
    char stream_languages[128][6];       ///< max number of streams, language for each (RFC1766, e.g. en-US)
40
    /* non streamed additonnal info */
41
    uint64_t nb_packets;                 ///< how many packets are there in the file, invalid if broadcasting
42
    /* packet filling */
43
    int packet_size_left;
44
    int packet_nb_frames;
45
    /* only for reading */
46
    uint64_t data_offset;                ///< beginning of the first data packet
47
    uint64_t data_object_offset;         ///< data object offset (excl. GUID & size)
48
    uint64_t data_object_size;           ///< size of the data object
49
    int index_read;
50

  
51
    ASFMainHeader hdr;
52

  
53
    int packet_flags;
54
    int packet_property;
55
    int packet_timestamp;
56
    int packet_segsizetype;
57
    int packet_segments;
58
    int packet_seq;
59
    int packet_replic_size;
60
    int packet_key_frame;
61
    int packet_padsize;
62
    unsigned int packet_frag_offset;
63
    unsigned int packet_frag_size;
64
    int64_t packet_frag_timestamp;
65
    int packet_multi_size;
66
    int packet_obj_size;
67
    int packet_time_delta;
68
    int packet_time_start;
69
    int64_t packet_pos;
70

  
71
    int stream_index;
72

  
73
    ASFStream* asf_st;                   ///< currently decoded stream
74
} ASFContext;
75

  
35 76
#undef NDEBUG
36 77
#include <assert.h>
37 78

  
libavformat/asfenc.c
188 188
                2*PAYLOAD_HEADER_SIZE_MULTIPLE_PAYLOADS \
189 189
                )
190 190

  
191
typedef struct {
192
    uint32_t seqno;
193
    int is_streamed;
194
    ASFStream streams[128];              ///< it's max number and it's not that big
195
    /* non streamed additonnal info */
196
    uint64_t nb_packets;                 ///< how many packets are there in the file, invalid if broadcasting
197
    int64_t duration;                    ///< in 100ns units
198
    /* packet filling */
199
    unsigned char multi_payloads_present;
200
    int packet_size_left;
201
    int packet_timestamp_start;
202
    int packet_timestamp_end;
203
    unsigned int packet_nb_payloads;
204
    uint8_t packet_buf[PACKET_SIZE];
205
    ByteIOContext pb;
206
    /* only for reading */
207
    uint64_t data_offset;                ///< beginning of the first data packet
208

  
209
    int64_t last_indexed_pts;
210
    ASFIndex* index_ptr;
211
    uint32_t nb_index_count;
212
    uint32_t nb_index_memory_alloc;
213
    uint16_t maximum_packet;
214
} ASFContext;
215

  
191 216
static const AVCodecTag codec_asf_bmp_tags[] = {
192 217
    { CODEC_ID_MPEG4, MKTAG('M', 'P', '4', 'S') },
193 218
    { CODEC_ID_MPEG4, MKTAG('M', '4', 'S', '2') },

Also available in: Unified diff