Libav 0.7.1
libavformat/mms.h
Go to the documentation of this file.
00001 /*
00002  * MMS protocol common definitions.
00003  * Copyright (c) 2010 Zhentan Feng <spyfeng at gmail dot com>
00004  *
00005  * This file is part of Libav.
00006  *
00007  * Libav is free software; you can redistribute it and/or
00008  * modify it under the terms of the GNU Lesser General Public
00009  * License as published by the Free Software Foundation; either
00010  * version 2.1 of the License, or (at your option) any later version.
00011  *
00012  * Libav is distributed in the hope that it will be useful,
00013  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00015  * Lesser General Public License for more details.
00016  *
00017  * You should have received a copy of the GNU Lesser General Public
00018  * License along with Libav; if not, write to the Free Software
00019  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
00020  */
00021 #ifndef AVFORMAT_MMS_H
00022 #define AVFORMAT_MMS_H
00023 
00024 #include "url.h"
00025 
00026 typedef struct {
00027     int id;
00028 }MMSStream;
00029 
00030 typedef struct {
00031     URLContext *mms_hd;                  
00032     MMSStream *streams;
00033 
00036     uint8_t *write_out_ptr;              
00037     uint8_t out_buffer[512];            
00038 
00042     uint8_t in_buffer[65536];            
00043     uint8_t *read_in_ptr;                
00044     int remaining_in_len;                
00045 
00049     uint8_t *asf_header;                 
00050     int asf_header_size;                 
00051     int header_parsed;                   
00052     int asf_packet_len;
00053     int asf_header_read_size;
00056     int stream_num;                      
00057     unsigned int nb_streams_allocated;   
00058 } MMSContext;
00059 
00060 int ff_mms_asf_header_parser(MMSContext * mms);
00061 int ff_mms_read_data(MMSContext *mms, uint8_t *buf, const int size);
00062 int ff_mms_read_header(MMSContext * mms, uint8_t * buf, const int size);
00063 
00064 #endif /* AVFORMAT_MMS_H */