00001 /***************************************************************************** 00002 * mms.h: MMS access plug-in 00003 ***************************************************************************** 00004 * Copyright (C) 2001, 2002 the VideoLAN team 00005 * $Id: mmstu.h 11728 2005-07-13 18:30:46Z courmisch $ 00006 * 00007 * Authors: Laurent Aimar <[email protected]> 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., 59 Temple Place - Suite 330, Boston, MA 02111, USA. 00022 *****************************************************************************/ 00023 00024 #define MMS_PACKET_ANY 0 00025 #define MMS_PACKET_CMD 1 00026 #define MMS_PACKET_HEADER 2 00027 #define MMS_PACKET_MEDIA 3 00028 #define MMS_PACKET_UDP_TIMING 4 00029 00030 00031 #define MMS_CMD_HEADERSIZE 48 00032 00033 #define MMS_BUFFER_SIZE 100000 00034 struct access_sys_t 00035 { 00036 int i_proto; /* MMS_PROTO_TCP, MMS_PROTO_UDP */ 00037 int i_handle_tcp; /* TCP socket for communication with server */ 00038 int i_handle_udp; /* Optional UDP socket for data(media/header packet) */ 00039 /* send by server */ 00040 char sz_bind_addr[NI_MAXNUMERICHOST]; /* used by udp */ 00041 00042 vlc_url_t url; 00043 00044 asf_header_t asfh; 00045 00046 /* */ 00047 uint8_t buffer_tcp[MMS_BUFFER_SIZE]; 00048 int i_buffer_tcp; 00049 00050 uint8_t buffer_udp[MMS_BUFFER_SIZE]; 00051 int i_buffer_udp; 00052 00053 /* data necessary to send data to server */ 00054 guid_t guid; 00055 int i_command_level; 00056 int i_seq_num; 00057 uint32_t i_header_packet_id_type; 00058 uint32_t i_media_packet_id_type; 00059 00060 int i_packet_seq_num; 00061 00062 uint8_t *p_cmd; /* latest command read */ 00063 int i_cmd; /* allocated at the begining */ 00064 00065 uint8_t *p_header; /* allocated by mms_ReadPacket */ 00066 int i_header; 00067 00068 uint8_t *p_media; /* allocated by mms_ReadPacket */ 00069 size_t i_media; 00070 size_t i_media_used; 00071 00072 /* extracted information */ 00073 int i_command; 00074 00075 /* from 0x01 answer (not yet set) */ 00076 char *psz_server_version; 00077 char *psz_tool_version; 00078 char *psz_update_player_url; 00079 char *psz_encryption_type; 00080 00081 /* from 0x06 answer */ 00082 uint32_t i_flags_broadcast; 00083 uint32_t i_media_length; 00084 size_t i_packet_length; 00085 uint32_t i_packet_count; 00086 int i_max_bit_rate; 00087 int i_header_size; 00088 00089 /* */ 00090 vlc_bool_t b_seekable; 00091 }; 00092