1 /*****************************************************************************
2 * mms.h: MMS access plug-in
3 *****************************************************************************
4 * Copyright (C) 2001, 2002 the VideoLAN team
7 * Authors: Laurent Aimar <fenrir@via.ecp.fr>
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
22 *****************************************************************************/
27 #define MMS_PACKET_ANY 0
28 #define MMS_PACKET_CMD 1
29 #define MMS_PACKET_HEADER 2
30 #define MMS_PACKET_MEDIA 3
31 #define MMS_PACKET_UDP_TIMING 4
33 #define MMS_CMD_HEADERSIZE 48
35 #define MMS_BUFFER_SIZE 100000
39 int i_proto; /* MMS_PROTO_TCP, MMS_PROTO_UDP */
40 int i_handle_tcp; /* TCP socket for communication with server */
41 int i_handle_udp; /* Optional UDP socket for data(media/header packet) */
43 char sz_bind_addr[NI_MAXNUMERICHOST]; /* used by udp */
52 uint8_t buffer_tcp[MMS_BUFFER_SIZE];
55 uint8_t buffer_udp[MMS_BUFFER_SIZE];
58 /* data necessary to send data to server */
62 uint32_t i_header_packet_id_type;
63 uint32_t i_media_packet_id_type;
67 uint8_t *p_cmd; /* latest command read */
68 size_t i_cmd; /* allocated at the begining */
70 uint8_t *p_header; /* allocated by mms_ReadPacket */
73 uint8_t *p_media; /* allocated by mms_ReadPacket */
77 /* extracted information */
80 /* from 0x01 answer (not yet set) */
81 char *psz_server_version;
82 char *psz_tool_version;
83 char *psz_update_player_url;
84 char *psz_encryption_type;
86 /* from 0x06 answer */
87 uint32_t i_flags_broadcast;
88 uint32_t i_media_length;
89 size_t i_packet_length;
90 uint32_t i_packet_count;
97 vlc_mutex_t lock_netwrite;
99 vlc_thread_t keep_alive;