/*****************************************************************************
* mms.h: MMS access plug-in
*****************************************************************************
- * Copyright (C) 2001, 2002 VideoLAN
+ * Copyright (C) 2001, 2002 the VideoLAN team
* $Id$
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
+#ifndef _MMSTU_H_
+#define _MMSTU_H_ 1
+
#define MMS_PACKET_ANY 0
#define MMS_PACKET_CMD 1
#define MMS_PACKET_HEADER 2
#define MMS_PACKET_MEDIA 3
#define MMS_PACKET_UDP_TIMING 4
-
#define MMS_CMD_HEADERSIZE 48
#define MMS_BUFFER_SIZE 100000
+
+typedef struct mmstu_keepalive_thread_t mmstu_keepalive_thread_t;
+
struct access_sys_t
{
- int i_proto; /* MMS_PROTO_TCP, MMS_PROTO_UDP */
- int i_handle_tcp; /* TCP socket for communication with server */
- int i_handle_udp; /* Optional UDP socket for data(media/header packet) */
- /* send by server */
- char *psz_bind_addr; /* used by udp */
+ int i_proto; /* MMS_PROTO_TCP, MMS_PROTO_UDP */
+ int i_handle_tcp; /* TCP socket for communication with server */
+ int i_handle_udp; /* Optional UDP socket for data(media/header packet) */
+ /* send by server */
+ char sz_bind_addr[NI_MAXNUMERICHOST]; /* used by udp */
+
+ vlc_url_t url;
- vlc_url_t url;
+ asf_header_t asfh;
- asf_header_t asfh;
+ unsigned i_timeout;
/* */
- uint8_t buffer_tcp[MMS_BUFFER_SIZE];
- int i_buffer_tcp;
+ uint8_t buffer_tcp[MMS_BUFFER_SIZE];
+ int i_buffer_tcp;
- uint8_t buffer_udp[MMS_BUFFER_SIZE];
- int i_buffer_udp;
+ uint8_t buffer_udp[MMS_BUFFER_SIZE];
+ int i_buffer_udp;
/* data necessary to send data to server */
guid_t guid;
size_t i_media;
size_t i_media_used;
- /* extracted informations */
+ /* extracted information */
int i_command;
/* from 0x01 answer (not yet set) */
int i_max_bit_rate;
int i_header_size;
- /* */
- vlc_bool_t b_seekable;
+ /* misc */
+ bool b_seekable;
+
+ mmstu_keepalive_thread_t *p_keepalive_thread;
+ vlc_mutex_t lock_netwrite;
+};
+
+struct mmstu_keepalive_thread_t
+{
+ VLC_COMMON_MEMBERS
+
+ access_t *p_access;
+ bool b_paused;
+ bool b_thread_error;
};
+#endif