Mercurial > mplayer.hg
view stream/network.h @ 23968:a9c0184eedcb
r23687: Implemented tv://[<channel>][/<input_id>] url syntax
r23748: Leave out (no) prefix from option names for consistency.
r23852: af channels example for ffdca to ALSA reordering
r23856: small wording improvement
r23897: Experimental negative panscan values
r23898: Set -vo gl slice-height default to 0
r23917: Document -rawvideo format="format string"
r23920 + r23924: Teletext support
r23926: update man page with v4l2 a/v outputs
r23978: add possibly incorrect subfont entry
r23982: i_certify_that_my_video_stream_does_not_use_b_frames is gone.
r23984: Added FIXME skeletons for missing lavc options.
author | kraymer |
---|---|
date | Wed, 01 Aug 2007 09:55:57 +0000 |
parents | 3f0d00abc073 |
children | 3baf6a2283da |
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 <sys/time.h> #include <sys/types.h> #include "config.h" #ifndef HAVE_WINSOCK2 #include <netdb.h> #include <netinet/in.h> #include <sys/socket.h> #include <arpa/inet.h> #endif #include "url.h" #include "http.h" #include "stream.h" #define BUFFER_SIZE 2048 typedef struct { const char *mime_type; 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; //int streaming_start( stream_t *stream, int *demuxer_type, URL_t *url ); streaming_ctrl_t *streaming_ctrl_new(void); 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 ); void streaming_ctrl_free( streaming_ctrl_t *streaming_ctrl ); int http_send_request(URL_t *url, off_t pos); HTTP_header_t *http_read_response(int fd); int http_authenticate(HTTP_header_t *http_hdr, URL_t *url, int *auth_retry); URL_t* check4proxies(URL_t *url); #endif