Mercurial > mplayer.hg
annotate libmpdemux/network.h @ 3297:9fdc998083cc
updated
author | arpi |
---|---|
date | Mon, 03 Dec 2001 21:53:09 +0000 |
parents | 6b6fa2be9b97 |
children | 1c2fb4764745 |
rev | line source |
---|---|
903 | 1 /* |
2 * Network layer for MPlayer | |
3 * by Bertrand BAUDET <bertrand_baudet@yahoo.com> | |
4 * (C) 2001, MPlayer team. | |
5 */ | |
6 | |
7 #ifndef __NETWORK_H | |
8 #define __NETWORK_H | |
9 | |
10 #include "url.h" | |
11 | |
999
92833c9472e8
Continue implementation of the network streaming part.
bertrand
parents:
903
diff
changeset
|
12 #define BUFFER_SIZE 2048 |
92833c9472e8
Continue implementation of the network streaming part.
bertrand
parents:
903
diff
changeset
|
13 |
92833c9472e8
Continue implementation of the network streaming part.
bertrand
parents:
903
diff
changeset
|
14 typedef enum { |
92833c9472e8
Continue implementation of the network streaming part.
bertrand
parents:
903
diff
changeset
|
15 streaming_stopped_e, |
92833c9472e8
Continue implementation of the network streaming part.
bertrand
parents:
903
diff
changeset
|
16 streaming_playing_e |
92833c9472e8
Continue implementation of the network streaming part.
bertrand
parents:
903
diff
changeset
|
17 } streaming_status; |
92833c9472e8
Continue implementation of the network streaming part.
bertrand
parents:
903
diff
changeset
|
18 |
3042 | 19 typedef struct streaming_control { |
20 URL_t *url; | |
21 streaming_status status; | |
22 int buffering; // boolean | |
23 unsigned int prebuffer_size; | |
999
92833c9472e8
Continue implementation of the network streaming part.
bertrand
parents:
903
diff
changeset
|
24 char *buffer; |
3042 | 25 unsigned int buffer_size; |
26 unsigned int buffer_pos; | |
27 int (*streaming_read)( int fd, char *buffer, int buffer_size, struct streaming_control *stream_ctrl ); | |
28 int (*streaming_seek)( int fd, off_t pos, struct streaming_control *stream_ctrl ); | |
999
92833c9472e8
Continue implementation of the network streaming part.
bertrand
parents:
903
diff
changeset
|
29 } streaming_ctrl_t; |
92833c9472e8
Continue implementation of the network streaming part.
bertrand
parents:
903
diff
changeset
|
30 |
3042 | 31 int streaming_bufferize( streaming_ctrl_t *streaming_ctrl, char *buffer, int size); |
999
92833c9472e8
Continue implementation of the network streaming part.
bertrand
parents:
903
diff
changeset
|
32 |
3042 | 33 int nop_streaming_read( int fd, char *buffer, int size, streaming_ctrl_t *stream_ctrl ); |
34 int nop_streaming_seek( int fd, off_t pos, streaming_ctrl_t *stream_ctrl ); | |
841 | 35 |
36 #endif |