[MPlayer-cvslog] r30697 - in trunk/stream: network.h stream.h

diego subversion at mplayerhq.hu
Mon Feb 22 14:27:58 CET 2010


Author: diego
Date: Mon Feb 22 14:27:58 2010
New Revision: 30697

Log:
Move struct streaming_control from network.h to stream.h, where it is used.
This will help in declaring some public functions where they really belong.

Modified:
   trunk/stream/network.h
   trunk/stream/stream.h

Modified: trunk/stream/network.h
==============================================================================
--- trunk/stream/network.h	Mon Feb 22 11:14:00 2010	(r30696)
+++ trunk/stream/network.h	Mon Feb 22 14:27:58 2010	(r30697)
@@ -35,6 +35,7 @@
 #include <arpa/inet.h>
 #endif
 
+#include "stream.h"
 #include "url.h"
 #include "http.h"
 
@@ -52,25 +53,6 @@ typedef struct {
 	int demuxer_type;
 } mime_struct_t;
 
-typedef enum {
-	streaming_stopped_e,
-	streaming_playing_e
-} streaming_status;
-
-typedef struct streaming_control {
-	URL_t *url;
-	streaming_status status;
-	int buffering;	// boolean
-	unsigned int prebuffer_size;
-	char *buffer;
-	unsigned int buffer_size;
-	unsigned int buffer_pos;
-	unsigned int bandwidth;	// The downstream available
-	int (*streaming_read)( int fd, char *buffer, int buffer_size, struct streaming_control *stream_ctrl );
-	int (*streaming_seek)( int fd, off_t pos, struct streaming_control *stream_ctrl );
-	void *data;
-} streaming_ctrl_t;
-
 streaming_ctrl_t *streaming_ctrl_new(void);
 int streaming_bufferize( streaming_ctrl_t *streaming_ctrl, char *buffer, int size);
 

Modified: trunk/stream/stream.h
==============================================================================
--- trunk/stream/stream.h	Mon Feb 22 11:14:00 2010	(r30696)
+++ trunk/stream/stream.h	Mon Feb 22 14:27:58 2010	(r30697)
@@ -21,6 +21,7 @@
 
 #include "config.h"
 #include "mp_msg.h"
+#include "url.h"
 #include <string.h>
 #include <inttypes.h>
 #include <sys/types.h>
@@ -89,9 +90,24 @@
 #define STREAM_CTRL_SET_ANGLE 11
 
 
-#ifdef CONFIG_NETWORK
-#include "network.h"
-#endif
+typedef enum {
+	streaming_stopped_e,
+	streaming_playing_e
+} streaming_status;
+
+typedef struct streaming_control {
+	URL_t *url;
+	streaming_status status;
+	int buffering;	// boolean
+	unsigned int prebuffer_size;
+	char *buffer;
+	unsigned int buffer_size;
+	unsigned int buffer_pos;
+	unsigned int bandwidth;	// The downstream available
+	int (*streaming_read)( int fd, char *buffer, int buffer_size, struct streaming_control *stream_ctrl );
+	int (*streaming_seek)( int fd, off_t pos, struct streaming_control *stream_ctrl );
+	void *data;
+} streaming_ctrl_t;
 
 struct stream_st;
 typedef struct stream_info_st {
@@ -142,6 +158,10 @@ typedef struct stream_st {
   unsigned char buffer[STREAM_BUFFER_SIZE>VCD_SECTOR_SIZE?STREAM_BUFFER_SIZE:VCD_SECTOR_SIZE];
 } stream_t;
 
+#ifdef CONFIG_NETWORK
+#include "network.h"
+#endif
+
 int stream_fill_buffer(stream_t *s);
 int stream_seek_long(stream_t *s, off_t pos);
 


More information about the MPlayer-cvslog mailing list