mirror of
https://github.com/mpv-player/mpv
synced 2024-12-15 03:15:52 +00:00
55d2e87d8f
Removed the network thread. Changed the network layer to use cache2. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@3043 b3059339-0415-0410-9bf9-f77b7e298cf2
37 lines
945 B
C
37 lines
945 B
C
/*
|
|
* Network layer for MPlayer
|
|
* by Bertrand BAUDET <bertrand_baudet@yahoo.com>
|
|
* (C) 2001, MPlayer team.
|
|
*/
|
|
|
|
#ifndef __NETWORK_H
|
|
#define __NETWORK_H
|
|
|
|
#include "url.h"
|
|
|
|
#define BUFFER_SIZE 2048
|
|
|
|
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;
|
|
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 );
|
|
} streaming_ctrl_t;
|
|
|
|
int streaming_bufferize( streaming_ctrl_t *streaming_ctrl, char *buffer, int size);
|
|
|
|
int nop_streaming_read( int fd, char *buffer, int size, streaming_ctrl_t *stream_ctrl );
|
|
int nop_streaming_seek( int fd, off_t pos, streaming_ctrl_t *stream_ctrl );
|
|
|
|
#endif
|