annotate mms.h @ 6416:e60cca9e99a3 libavformat

Insert info from extradata into header
author bindhammer
date Thu, 26 Aug 2010 10:03:11 +0000
parents 91076395b8d3
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
6371
75e7dad45e44 Add another missing file from r24799.
rbultje
parents:
diff changeset
1 /*
75e7dad45e44 Add another missing file from r24799.
rbultje
parents:
diff changeset
2 * MMS protocol common definitions.
75e7dad45e44 Add another missing file from r24799.
rbultje
parents:
diff changeset
3 * Copyright (c) 2010 Zhentan Feng <spyfeng at gmail dot com>
75e7dad45e44 Add another missing file from r24799.
rbultje
parents:
diff changeset
4 *
75e7dad45e44 Add another missing file from r24799.
rbultje
parents:
diff changeset
5 * This file is part of FFmpeg.
75e7dad45e44 Add another missing file from r24799.
rbultje
parents:
diff changeset
6 *
75e7dad45e44 Add another missing file from r24799.
rbultje
parents:
diff changeset
7 * FFmpeg is free software; you can redistribute it and/or
75e7dad45e44 Add another missing file from r24799.
rbultje
parents:
diff changeset
8 * modify it under the terms of the GNU Lesser General Public
75e7dad45e44 Add another missing file from r24799.
rbultje
parents:
diff changeset
9 * License as published by the Free Software Foundation; either
75e7dad45e44 Add another missing file from r24799.
rbultje
parents:
diff changeset
10 * version 2.1 of the License, or (at your option) any later version.
75e7dad45e44 Add another missing file from r24799.
rbultje
parents:
diff changeset
11 *
75e7dad45e44 Add another missing file from r24799.
rbultje
parents:
diff changeset
12 * FFmpeg is distributed in the hope that it will be useful,
75e7dad45e44 Add another missing file from r24799.
rbultje
parents:
diff changeset
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
75e7dad45e44 Add another missing file from r24799.
rbultje
parents:
diff changeset
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
75e7dad45e44 Add another missing file from r24799.
rbultje
parents:
diff changeset
15 * Lesser General Public License for more details.
75e7dad45e44 Add another missing file from r24799.
rbultje
parents:
diff changeset
16 *
75e7dad45e44 Add another missing file from r24799.
rbultje
parents:
diff changeset
17 * You should have received a copy of the GNU Lesser General Public
75e7dad45e44 Add another missing file from r24799.
rbultje
parents:
diff changeset
18 * License along with FFmpeg; if not, write to the Free Software
75e7dad45e44 Add another missing file from r24799.
rbultje
parents:
diff changeset
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
75e7dad45e44 Add another missing file from r24799.
rbultje
parents:
diff changeset
20 */
75e7dad45e44 Add another missing file from r24799.
rbultje
parents:
diff changeset
21 #ifndef AVFORMAT_MMS_H
75e7dad45e44 Add another missing file from r24799.
rbultje
parents:
diff changeset
22 #define AVFORMAT_MMS_H
75e7dad45e44 Add another missing file from r24799.
rbultje
parents:
diff changeset
23
75e7dad45e44 Add another missing file from r24799.
rbultje
parents:
diff changeset
24 #include "avformat.h"
75e7dad45e44 Add another missing file from r24799.
rbultje
parents:
diff changeset
25
75e7dad45e44 Add another missing file from r24799.
rbultje
parents:
diff changeset
26 typedef struct {
75e7dad45e44 Add another missing file from r24799.
rbultje
parents:
diff changeset
27 int id;
75e7dad45e44 Add another missing file from r24799.
rbultje
parents:
diff changeset
28 }MMSStream;
75e7dad45e44 Add another missing file from r24799.
rbultje
parents:
diff changeset
29
75e7dad45e44 Add another missing file from r24799.
rbultje
parents:
diff changeset
30 typedef struct {
75e7dad45e44 Add another missing file from r24799.
rbultje
parents:
diff changeset
31 URLContext *mms_hd; ///< TCP connection handle
6376
91076395b8d3 Remove use of MAX_STREAMS in MMSContext->streams[] array. Instead, dynamically
rbultje
parents: 6371
diff changeset
32 MMSStream *streams;
6371
75e7dad45e44 Add another missing file from r24799.
rbultje
parents:
diff changeset
33
75e7dad45e44 Add another missing file from r24799.
rbultje
parents:
diff changeset
34 /** Buffer for outgoing packets. */
75e7dad45e44 Add another missing file from r24799.
rbultje
parents:
diff changeset
35 /*@{*/
75e7dad45e44 Add another missing file from r24799.
rbultje
parents:
diff changeset
36 uint8_t *write_out_ptr; ///< Pointer for writting the buffer.
75e7dad45e44 Add another missing file from r24799.
rbultje
parents:
diff changeset
37 uint8_t out_buffer[512]; ///< Buffer for outgoing packet.
75e7dad45e44 Add another missing file from r24799.
rbultje
parents:
diff changeset
38 /*@}*/
75e7dad45e44 Add another missing file from r24799.
rbultje
parents:
diff changeset
39
75e7dad45e44 Add another missing file from r24799.
rbultje
parents:
diff changeset
40 /** Buffer for incoming packets. */
75e7dad45e44 Add another missing file from r24799.
rbultje
parents:
diff changeset
41 /*@{*/
75e7dad45e44 Add another missing file from r24799.
rbultje
parents:
diff changeset
42 uint8_t in_buffer[8192]; ///< Buffer for incoming packets.
75e7dad45e44 Add another missing file from r24799.
rbultje
parents:
diff changeset
43 uint8_t *read_in_ptr; ///< Pointer for reading from incoming buffer.
75e7dad45e44 Add another missing file from r24799.
rbultje
parents:
diff changeset
44 int remaining_in_len; ///< Reading length from incoming buffer.
75e7dad45e44 Add another missing file from r24799.
rbultje
parents:
diff changeset
45 /*@}*/
75e7dad45e44 Add another missing file from r24799.
rbultje
parents:
diff changeset
46
75e7dad45e44 Add another missing file from r24799.
rbultje
parents:
diff changeset
47 /** Internal handling of the ASF header */
75e7dad45e44 Add another missing file from r24799.
rbultje
parents:
diff changeset
48 /*@{*/
75e7dad45e44 Add another missing file from r24799.
rbultje
parents:
diff changeset
49 uint8_t *asf_header; ///< Stored ASF header.
75e7dad45e44 Add another missing file from r24799.
rbultje
parents:
diff changeset
50 int asf_header_size; ///< Size of stored ASF header.
75e7dad45e44 Add another missing file from r24799.
rbultje
parents:
diff changeset
51 int header_parsed; ///< The header has been received and parsed.
75e7dad45e44 Add another missing file from r24799.
rbultje
parents:
diff changeset
52 int asf_packet_len;
75e7dad45e44 Add another missing file from r24799.
rbultje
parents:
diff changeset
53 int asf_header_read_size;
75e7dad45e44 Add another missing file from r24799.
rbultje
parents:
diff changeset
54 /*@}*/
75e7dad45e44 Add another missing file from r24799.
rbultje
parents:
diff changeset
55
75e7dad45e44 Add another missing file from r24799.
rbultje
parents:
diff changeset
56 int stream_num; ///< stream numbers.
6376
91076395b8d3 Remove use of MAX_STREAMS in MMSContext->streams[] array. Instead, dynamically
rbultje
parents: 6371
diff changeset
57 unsigned int nb_streams_allocated; ///< allocated size of streams
6371
75e7dad45e44 Add another missing file from r24799.
rbultje
parents:
diff changeset
58 } MMSContext;
75e7dad45e44 Add another missing file from r24799.
rbultje
parents:
diff changeset
59
75e7dad45e44 Add another missing file from r24799.
rbultje
parents:
diff changeset
60 int ff_mms_asf_header_parser(MMSContext * mms);
75e7dad45e44 Add another missing file from r24799.
rbultje
parents:
diff changeset
61 int ff_mms_read_data(MMSContext *mms, uint8_t *buf, const int size);
75e7dad45e44 Add another missing file from r24799.
rbultje
parents:
diff changeset
62 int ff_mms_read_header(MMSContext * mms, uint8_t * buf, const int size);
75e7dad45e44 Add another missing file from r24799.
rbultje
parents:
diff changeset
63 #endif