annotate ffmpeg/libavformat/mms.h @ 13:844d341cf643 tip

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