]> git.sesse.net Git - vlc/blobdiff - modules/access/mms/mmsh.h
Fix tiny memleak.
[vlc] / modules / access / mms / mmsh.h
index 5f871bd03f8de56e2753907f7b83a717fb5476ee..3a2aa695df4179aa618e0d30b5cd1e20929633c9 100644 (file)
@@ -1,8 +1,8 @@
 /*****************************************************************************
  * mmsh.h:
  *****************************************************************************
- * Copyright (C) 2001, 2002 VideoLAN
- * $Id: mmsh.h,v 1.4 2003/08/26 00:51:19 fenrir Exp $
+ * 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 _MMSH_H_
+#define _MMSH_H_ 1
+
 typedef struct
 {
     uint16_t i_type;
@@ -36,23 +39,22 @@ typedef struct
 
 } chunk_t;
 
-static int chunk_parse( chunk_t *, uint8_t *, int );
-
-#define BUFFER_SIZE 150000
+#define BUFFER_SIZE 65536
 struct access_sys_t
 {
     int             i_proto;
 
-    input_socket_t  *p_socket;
-    url_t           *p_url;
+    int             fd;
+    vlc_url_t       url;
+
+    bool      b_proxy;
+    vlc_url_t       proxy;
 
     int             i_request_context;
 
-    int             i_buffer;
-    int             i_buffer_pos;
     uint8_t         buffer[BUFFER_SIZE + 1];
 
-    vlc_bool_t      b_broadcast;
+    bool      b_broadcast;
 
     uint8_t         *p_header;
     int             i_header;
@@ -62,46 +64,10 @@ struct access_sys_t
     unsigned int    i_packet_used;
     unsigned int    i_packet_length;
 
-    off_t           i_pos;
+    int64_t         i_start;
 
     asf_header_t    asfh;
     guid_t          guid;
 };
 
-static input_socket_t * NetOpenTCP  ( input_thread_t *, url_t * );
-static ssize_t          NetRead     ( input_thread_t *, input_socket_t *, byte_t *, size_t );
-static ssize_t          NetWrite    ( input_thread_t *, input_socket_t *, byte_t *, size_t );
-static void             NetClose    ( input_thread_t *, input_socket_t * );
-
-
-static ssize_t NetFill( input_thread_t *, access_sys_t *, int );
-
-typedef struct http_field_s
-{
-    char *psz_name;
-    char *psz_value;
-
-    struct http_field_s *p_next;
-
-} http_field_t;
-
-typedef struct
-{
-    int     i_version;
-    int     i_error;
-    char    *psz_answer;
-
-    http_field_t *p_fields;
-
-    uint8_t *p_body;
-    int     i_body;
-
-} http_answer_t;
-
-static http_answer_t    *http_answer_parse  ( uint8_t *, int );
-static void              http_answer_free   ( http_answer_t * );
-/* static char             *http_field_get_value   ( http_answer_t *, char * ); */
-static http_field_t     *http_field_find    ( http_field_t *, char * );
-
-static int  mmsh_start( input_thread_t *, off_t );
-static void mmsh_stop ( input_thread_t * );
+#endif