Mercurial > mplayer.hg
view libmpdemux/network.h @ 5151:610d399f50c3
- cleanup pass 1. more to come soon...
- fixed order of libcss and dumpstream stuff
- fixed some comments, added more to get source easier searchable
- removed some nonsense goto, use if() instead
- removed some obsoleted, #if 0'd code
- rewritten text subtitle init calls
- removed useless 'max benchmark' code (it shows 480% cpu when playing vcd on p4...)
TODO: fix order or ao/vo init, and migrate video codec selection to libmpcodecs
author | arpi |
---|---|
date | Sun, 17 Mar 2002 00:47:15 +0000 |
parents | f51bd827ed1c |
children | c4078c1f9d53 |
line wrap: on
line source
/* * Network layer for MPlayer * by Bertrand BAUDET <bertrand_baudet@yahoo.com> * (C) 2001, MPlayer team. */ #ifndef __NETWORK_H #define __NETWORK_H #include <fcntl.h> #include <netdb.h> #include <netinet/in.h> #include <sys/time.h> #include <sys/types.h> #include <sys/socket.h> #include <arpa/inet.h> #include "url.h" #include "stream.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 ); void *data; } streaming_ctrl_t; //int streaming_start( stream_t *stream, int *demuxer_type, URL_t *url ); 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 ); int connect2Server(char *host, int port); #endif