mmstu.h

Go to the documentation of this file.
00001 /*****************************************************************************
00002  * mms.h: MMS access plug-in
00003  *****************************************************************************
00004  * Copyright (C) 2001, 2002 the VideoLAN team
00005  * $Id: f924209d507ac89a04d4bf84570c00edb7d4f1ca $
00006  *
00007  * Authors: Laurent Aimar <fenrir@via.ecp.fr>
00008  *
00009  * This program is free software; you can redistribute it and/or modify
00010  * it under the terms of the GNU General Public License as published by
00011  * the Free Software Foundation; either version 2 of the License, or
00012  * (at your option) any later version.
00013  *
00014  * This program is distributed in the hope that it will be useful,
00015  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00016  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00017  * GNU General Public License for more details.
00018  *
00019  * You should have received a copy of the GNU General Public License
00020  * along with this program; if not, write to the Free Software
00021  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
00022  *****************************************************************************/
00023 
00024 #ifndef _MMSTU_H_
00025 #define _MMSTU_H_ 1
00026 
00027 #define MMS_PACKET_ANY          0
00028 #define MMS_PACKET_CMD          1
00029 #define MMS_PACKET_HEADER       2
00030 #define MMS_PACKET_MEDIA        3
00031 #define MMS_PACKET_UDP_TIMING   4
00032 
00033 #define MMS_CMD_HEADERSIZE  48
00034 
00035 #define MMS_BUFFER_SIZE 100000
00036 
00037 struct access_sys_t
00038 {
00039     int         i_proto;        /* MMS_PROTO_TCP, MMS_PROTO_UDP */
00040     int         i_handle_tcp;   /* TCP socket for communication with server */
00041     int         i_handle_udp;   /* Optional UDP socket for data(media/header packet) */
00042                                 /* send by server */
00043     char        sz_bind_addr[NI_MAXNUMERICHOST]; /* used by udp */
00044 
00045     vlc_url_t   url;
00046 
00047     asf_header_t    asfh;
00048 
00049     unsigned    i_timeout;
00050 
00051     /* */
00052     uint8_t     buffer_tcp[MMS_BUFFER_SIZE];
00053     int         i_buffer_tcp;
00054 
00055     uint8_t     buffer_udp[MMS_BUFFER_SIZE];
00056     int         i_buffer_udp;
00057 
00058     /* data necessary to send data to server */
00059     guid_t      guid;
00060     int         i_command_level;
00061     int         i_seq_num;
00062     uint32_t    i_header_packet_id_type;
00063     uint32_t    i_media_packet_id_type;
00064 
00065     int         i_packet_seq_num;
00066 
00067     uint8_t     *p_cmd;     /* latest command read */
00068     size_t      i_cmd;      /* allocated at the begining */
00069 
00070     uint8_t     *p_header;  /* allocated by mms_ReadPacket */
00071     size_t      i_header;
00072 
00073     uint8_t     *p_media;   /* allocated by mms_ReadPacket */
00074     size_t      i_media;
00075     size_t      i_media_used;
00076 
00077     /* extracted information */
00078     int         i_command;
00079 
00080     /* from 0x01 answer (not yet set) */
00081     char        *psz_server_version;
00082     char        *psz_tool_version;
00083     char        *psz_update_player_url;
00084     char        *psz_encryption_type;
00085 
00086     /* from 0x06 answer */
00087     uint32_t    i_flags_broadcast;
00088     uint32_t    i_media_length;
00089     size_t      i_packet_length;
00090     uint32_t    i_packet_count;
00091     int         i_max_bit_rate;
00092     size_t      i_header_size;
00093 
00094     /* misc */
00095     bool  b_seekable;
00096 
00097     vlc_mutex_t  lock_netwrite;
00098     bool         b_keep_alive;
00099     vlc_thread_t keep_alive;
00100 };
00101 
00102 #endif

Generated on Tue May 25 08:04:52 2010 for VLC by  doxygen 1.5.6