xine-lib  1.2.9
Data Structures | Macros | Functions
input_http.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
#include <string.h>
#include <ctype.h>
#include <errno.h>
#include <sys/time.h>
#include <xine/xine_internal.h>
#include <xine/xineutils.h>
#include <xine/input_plugin.h>
#include "net_buf_ctrl.h"
#include "group_network.h"
#include "http_helper.h"

Data Structures

struct  http_input_plugin_t
 
struct  http_input_class_t
 

Macros

#define LOG_MODULE   "input_http"
 
#define LOG_VERBOSE
 
#define BUFSIZE   1024
 
#define DEFAULT_HTTP_PORT   80
 
#define TAG_ICY_NAME   "icy-name:"
 
#define TAG_ICY_GENRE   "icy-genre:"
 
#define TAG_ICY_NOTICE1   "icy-notice1:"
 
#define TAG_ICY_NOTICE2   "icy-notice2:"
 
#define TAG_ICY_METAINT   "icy-metaint:"
 
#define TAG_CONTENT_TYPE   "Content-Type:"
 
#define TAG_LASTFM_SERVER   "Server: last.fm "
 

Functions

static void proxy_host_change_cb (void *this_gen, xine_cfg_entry_t *cfg)
 
static void proxy_port_change_cb (void *this_gen, xine_cfg_entry_t *cfg)
 
static void proxy_user_change_cb (void *this_gen, xine_cfg_entry_t *cfg)
 
static void proxy_password_change_cb (void *this_gen, xine_cfg_entry_t *cfg)
 
static void no_proxy_list_change_cb (void *this_gen, xine_cfg_entry_t *cfg)
 
static int _x_use_proxy (http_input_class_t *this, const char *host)
 
static void http_plugin_basicauth (const char *user, const char *password, char **dest)
 
static int http_plugin_read_metainf (http_input_plugin_t *this)
 
static off_t http_plugin_read_int (http_input_plugin_t *this, char *buf, off_t total)
 
static off_t http_plugin_read (input_plugin_t *this_gen, void *buf_gen, off_t nlen)
 
static int resync_nsv (http_input_plugin_t *this)
 
static buf_element_thttp_plugin_read_block (input_plugin_t *this_gen, fifo_buffer_t *fifo, off_t todo)
 
static off_t http_plugin_get_length (input_plugin_t *this_gen)
 
static uint32_t http_plugin_get_capabilities (input_plugin_t *this_gen)
 
static uint32_t http_plugin_get_blocksize (input_plugin_t *this_gen)
 
static off_t http_plugin_get_current_pos (input_plugin_t *this_gen)
 
static off_t http_plugin_seek (input_plugin_t *this_gen, off_t offset, int origin)
 
static const char * http_plugin_get_mrl (input_plugin_t *this_gen)
 
static int http_plugin_get_optional_data (input_plugin_t *this_gen, void *const data, int data_type)
 
static void http_plugin_dispose (input_plugin_t *this_gen)
 
static void report_progress (xine_stream_t *stream, int p)
 
static int http_plugin_open (input_plugin_t *this_gen)
 
static input_plugin_thttp_class_get_instance (input_class_t *cls_gen, xine_stream_t *stream, const char *mrl)
 
static void http_class_dispose (input_class_t *this_gen)
 
void * input_http_init_class (xine_t *xine, void *data)
 

Macro Definition Documentation

◆ BUFSIZE

#define BUFSIZE   1024

◆ DEFAULT_HTTP_PORT

#define DEFAULT_HTTP_PORT   80

◆ LOG_MODULE

#define LOG_MODULE   "input_http"

◆ LOG_VERBOSE

#define LOG_VERBOSE

◆ TAG_CONTENT_TYPE

#define TAG_CONTENT_TYPE   "Content-Type:"

Referenced by http_plugin_open().

◆ TAG_ICY_GENRE

#define TAG_ICY_GENRE   "icy-genre:"

Referenced by http_plugin_open().

◆ TAG_ICY_METAINT

#define TAG_ICY_METAINT   "icy-metaint:"

Referenced by http_plugin_open().

◆ TAG_ICY_NAME

#define TAG_ICY_NAME   "icy-name:"

Referenced by http_plugin_open().

◆ TAG_ICY_NOTICE1

#define TAG_ICY_NOTICE1   "icy-notice1:"

◆ TAG_ICY_NOTICE2

#define TAG_ICY_NOTICE2   "icy-notice2:"

Referenced by http_plugin_open().

◆ TAG_LASTFM_SERVER

#define TAG_LASTFM_SERVER   "Server: last.fm "

Referenced by http_plugin_open().

Function Documentation

◆ _x_use_proxy()

static int _x_use_proxy ( http_input_class_t this,
const char *  host 
)
static

References _, lprintf, NULL, xine_log(), and XINE_LOG_MSG.

Referenced by http_plugin_open().

◆ http_class_dispose()

static void http_class_dispose ( input_class_t this_gen)
static

◆ http_class_get_instance()

static input_plugin_t* http_class_get_instance ( input_class_t cls_gen,
xine_stream_t stream,
const char *  mrl 
)
static

◆ http_plugin_basicauth()

static void http_plugin_basicauth ( const char *  user,
const char *  password,
char **  dest 
)
static

References xine_base64_encode().

Referenced by http_plugin_open().

◆ http_plugin_dispose()

static void http_plugin_dispose ( input_plugin_t this_gen)
static

References _x_freep(), nbc_close(), and NULL.

Referenced by http_class_get_instance().

◆ http_plugin_get_blocksize()

static uint32_t http_plugin_get_blocksize ( input_plugin_t this_gen)
static

Referenced by http_class_get_instance().

◆ http_plugin_get_capabilities()

static uint32_t http_plugin_get_capabilities ( input_plugin_t this_gen)
static

◆ http_plugin_get_current_pos()

static off_t http_plugin_get_current_pos ( input_plugin_t this_gen)
static

Referenced by http_class_get_instance().

◆ http_plugin_get_length()

static off_t http_plugin_get_length ( input_plugin_t this_gen)
static

Referenced by http_class_get_instance().

◆ http_plugin_get_mrl()

static const char* http_plugin_get_mrl ( input_plugin_t this_gen)
static

Referenced by http_class_get_instance().

◆ http_plugin_get_optional_data()

static int http_plugin_get_optional_data ( input_plugin_t this_gen,
void *const  data,
int  data_type 
)
static

◆ http_plugin_open()

static int http_plugin_open ( input_plugin_t this_gen)
static

◆ http_plugin_read()

static off_t http_plugin_read ( input_plugin_t this_gen,
void *  buf_gen,
off_t  nlen 
)
static

◆ http_plugin_read_block()

static buf_element_t* http_plugin_read_block ( input_plugin_t this_gen,
fifo_buffer_t fifo,
off_t  todo 
)
static

◆ http_plugin_read_int()

static off_t http_plugin_read_int ( http_input_plugin_t this,
char *  buf,
off_t  total 
)
static

◆ http_plugin_read_metainf()

static int http_plugin_read_metainf ( http_input_plugin_t this)
static

◆ http_plugin_seek()

static off_t http_plugin_seek ( input_plugin_t this_gen,
off_t  offset,
int  origin 
)
static

◆ input_http_init_class()

void* input_http_init_class ( xine_t xine,
void *  data 
)

◆ no_proxy_list_change_cb()

static void no_proxy_list_change_cb ( void *  this_gen,
xine_cfg_entry_t cfg 
)
static

◆ proxy_host_change_cb()

static void proxy_host_change_cb ( void *  this_gen,
xine_cfg_entry_t cfg 
)
static

◆ proxy_password_change_cb()

static void proxy_password_change_cb ( void *  this_gen,
xine_cfg_entry_t cfg 
)
static

◆ proxy_port_change_cb()

static void proxy_port_change_cb ( void *  this_gen,
xine_cfg_entry_t cfg 
)
static

◆ proxy_user_change_cb()

static void proxy_user_change_cb ( void *  this_gen,
xine_cfg_entry_t cfg 
)
static

◆ report_progress()

static void report_progress ( xine_stream_t stream,
int  p 
)
static

◆ resync_nsv()

static int resync_nsv ( http_input_plugin_t this)
static