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$
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 typedef struct mmstu_keepalive_thread_t mmstu_keepalive_thread_t;
00038 
00039 struct access_sys_t
00040 {
00041     int         i_proto;        /* MMS_PROTO_TCP, MMS_PROTO_UDP */
00042     int         i_handle_tcp;   /* TCP socket for communication with server */
00043     int         i_handle_udp;   /* Optional UDP socket for data(media/header packet) */
00044                                 /* send by server */
00045     char        sz_bind_addr[NI_MAXNUMERICHOST]; /* used by udp */
00046 
00047     vlc_url_t   url;
00048 
00049     asf_header_t    asfh;
00050 
00051     unsigned    i_timeout;
00052 
00053     /* */
00054     uint8_t     buffer_tcp[MMS_BUFFER_SIZE];
00055     int         i_buffer_tcp;
00056 
00057     uint8_t     buffer_udp[MMS_BUFFER_SIZE];
00058     int         i_buffer_udp;
00059 
00060     /* data necessary to send data to server */
00061     guid_t      guid;
00062     int         i_command_level;
00063     int         i_seq_num;
00064     uint32_t    i_header_packet_id_type;
00065     uint32_t    i_media_packet_id_type;
00066 
00067     int         i_packet_seq_num;
00068 
00069     uint8_t     *p_cmd;     /* latest command read */
00070     int         i_cmd;      /* allocated at the begining */
00071 
00072     uint8_t     *p_header;  /* allocated by mms_ReadPacket */
00073     int         i_header;
00074 
00075     uint8_t     *p_media;   /* allocated by mms_ReadPacket */
00076     size_t      i_media;
00077     size_t      i_media_used;
00078 
00079     /* extracted information */
00080     int         i_command;
00081 
00082     /* from 0x01 answer (not yet set) */
00083     char        *psz_server_version;
00084     char        *psz_tool_version;
00085     char        *psz_update_player_url;
00086     char        *psz_encryption_type;
00087 
00088     /* from 0x06 answer */
00089     uint32_t    i_flags_broadcast;
00090     uint32_t    i_media_length;
00091     size_t      i_packet_length;
00092     uint32_t    i_packet_count;
00093     int         i_max_bit_rate;
00094     int         i_header_size;
00095 
00096     /* misc */
00097     bool  b_seekable;
00098 
00099     mmstu_keepalive_thread_t *p_keepalive_thread;
00100     vlc_mutex_t lock_netwrite;
00101 };
00102 
00103 struct mmstu_keepalive_thread_t
00104 {
00105     VLC_COMMON_MEMBERS
00106 
00107     access_t *p_access;
00108     bool b_paused;
00109     bool b_thread_error;
00110 };
00111 
00112 #endif

Generated on Wed Aug 13 08:02:37 2008 for VLC by  doxygen 1.5.1