1 /*****************************************************************************
2 * mms.h: MMS access plug-in
3 *****************************************************************************
4 * Copyright (C) 2001, 2002 VideoLAN
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., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
22 *****************************************************************************/
24 #define MMS_PACKET_ANY 0
25 #define MMS_PACKET_CMD 1
26 #define MMS_PACKET_HEADER 2
27 #define MMS_PACKET_MEDIA 3
28 #define MMS_PACKET_UDP_TIMING 4
31 #define MMS_CMD_HEADERSIZE 48
33 #define MMS_BUFFER_SIZE 100000
36 int i_proto; /* MMS_PROTO_TCP, MMS_PROTO_UDP */
37 int i_handle_tcp; /* TCP socket for communication with server */
38 int i_handle_udp; /* Optional UDP socket for data(media/header packet) */
40 char *psz_bind_addr; /* used by udp */
47 uint8_t buffer_tcp[MMS_BUFFER_SIZE];
50 uint8_t buffer_udp[MMS_BUFFER_SIZE];
53 /* data necessary to send data to server */
57 uint32_t i_header_packet_id_type;
58 uint32_t i_media_packet_id_type;
62 uint8_t *p_cmd; /* latest command read */
63 int i_cmd; /* allocated at the begining */
65 uint8_t *p_header; /* allocated by mms_ReadPacket */
68 uint8_t *p_media; /* allocated by mms_ReadPacket */
72 /* extracted information */
75 /* from 0x01 answer (not yet set) */
76 char *psz_server_version;
77 char *psz_tool_version;
78 char *psz_update_player_url;
79 char *psz_encryption_type;
81 /* from 0x06 answer */
82 uint32_t i_flags_broadcast;
83 uint32_t i_media_length;
84 size_t i_packet_length;
85 uint32_t i_packet_count;
90 vlc_bool_t b_seekable;