xine-lib 1.2.11
|
#include <stdio.h>
#include <string.h>
#include <sys/types.h>
#include <stdlib.h>
#include <xine/xine_internal.h>
#include <xine/xineutils.h>
#include "bswap.h"
#include "http_helper.h"
#include "mmsh.h"
#include "../demuxers/asfheader.h"
Data Structures | |
struct | mmsh_s |
Macros | |
#define | LOG_MODULE "mmsh" |
#define | LOG_VERBOSE |
#define | USERAGENT "User-Agent: NSPlayer/4.1.0.3856\r\n" |
#define | CLIENTGUID "Pragma: xClientGUID={c77e7400-738a-11d2-9add-0020af0a3278}\r\n" |
#define | MMSH_PORT 80 |
#define | MMSH_UNKNOWN 0 |
#define | MMSH_SEEKABLE 1 |
#define | MMSH_LIVE 2 |
#define | CHUNK_HEADER_LENGTH 4 |
#define | EXT_HEADER_LENGTH 8 |
#define | CHUNK_TYPE_RESET 0x4324 |
#define | CHUNK_TYPE_DATA 0x4424 |
#define | CHUNK_TYPE_END 0x4524 |
#define | CHUNK_TYPE_ASF_HEADER 0x4824 |
#define | CHUNK_SIZE 65536 /* max chunk size */ |
#define | ASF_HEADER_SIZE 8192 /* max header size */ |
#define | SCRATCH_SIZE 1024 |
#define | mmsh_FirstRequest |
#define | mmsh_SeekableRequest |
#define | mmsh_LiveRequest |
Functions | |
static int | send_command (mmsh_t *this, char *cmd) |
static int | get_answer (mmsh_t *this) |
static int | get_chunk_header (mmsh_t *this) |
static int | get_header (mmsh_t *this) |
static int | interp_header (mmsh_t *this) |
static int | mmsh_valid_proto (const char *proto) |
static void | report_progress (xine_stream_t *stream, int p) |
static int | mmsh_tcp_connect (mmsh_t *this) |
static int | mmsh_connect_int (mmsh_t *this, int bandwidth) |
static int | mmsh_connect_int2 (mmsh_t *this, int bandwidth) |
mmsh_t * | mmsh_connect (xine_stream_t *stream, const char *url, int bandwidth) |
static int | get_media_packet (mmsh_t *this) |
size_t | mmsh_peek_header (mmsh_t *this, char *data, size_t maxsize) |
int | mmsh_read (mmsh_t *this, char *data, int len) |
void | mmsh_close (mmsh_t *this) |
uint32_t | mmsh_get_length (mmsh_t *this) |
off_t | mmsh_get_current_pos (mmsh_t *this) |
void | mmsh_set_start_time (mmsh_t *this, int time_offset) |
Variables | |
static const char | mmsh_proto_s [][8] = { "mms", "mmsh", "" } |
#define ASF_HEADER_SIZE 8192 /* max header size */ |
#define CHUNK_HEADER_LENGTH 4 |
#define CHUNK_SIZE 65536 /* max chunk size */ |
#define CHUNK_TYPE_ASF_HEADER 0x4824 |
#define CHUNK_TYPE_DATA 0x4424 |
#define CHUNK_TYPE_END 0x4524 |
#define CHUNK_TYPE_RESET 0x4324 |
#define CLIENTGUID "Pragma: xClientGUID={c77e7400-738a-11d2-9add-0020af0a3278}\r\n" |
#define EXT_HEADER_LENGTH 8 |
#define LOG_MODULE "mmsh" |
#define LOG_VERBOSE |
#define mmsh_FirstRequest |
#define MMSH_LIVE 2 |
#define mmsh_LiveRequest |
#define MMSH_PORT 80 |
#define MMSH_SEEKABLE 1 |
#define mmsh_SeekableRequest |
#define MMSH_UNKNOWN 0 |
#define SCRATCH_SIZE 1024 |
#define USERAGENT "User-Agent: NSPlayer/4.1.0.3856\r\n" |
|
static |
References _, _x_io_tcp_read(), lprintf, MMSH_LIVE, MMSH_SEEKABLE, MMSH_UNKNOWN, xine_log(), XINE_LOG_MSG, XINE_VERBOSITY_LOG, and xprintf.
Referenced by mmsh_connect_int(), and mmsh_connect_int2().
|
static |
References _x_io_tcp_read(), _X_LE_16, _X_LE_32, CHUNK_HEADER_LENGTH, CHUNK_TYPE_ASF_HEADER, CHUNK_TYPE_DATA, CHUNK_TYPE_END, CHUNK_TYPE_RESET, EXT_HEADER_LENGTH, lprintf, XINE_VERBOSITY_LOG, and xprintf.
Referenced by get_header(), and get_media_packet().
|
static |
References _x_io_tcp_read(), ASF_HEADER_SIZE, CHUNK_TYPE_ASF_HEADER, CHUNK_TYPE_DATA, get_chunk_header(), lprintf, XINE_VERBOSITY_LOG, and xprintf.
Referenced by get_media_packet(), mmsh_connect_int(), and mmsh_connect_int2().
|
static |
References _x_io_tcp_close(), _x_io_tcp_read(), CHUNK_TYPE_DATA, CHUNK_TYPE_END, CHUNK_TYPE_RESET, get_chunk_header(), get_header(), interp_header(), lprintf, mmsh_connect_int(), mmsh_tcp_connect(), XINE_VERBOSITY_LOG, and xprintf.
Referenced by mmsh_read().
|
static |
References asf_header_delete(), asf_header_new(), and lprintf.
Referenced by get_media_packet(), mmsh_connect_int(), and mmsh_connect_int2().
void mmsh_close | ( | mmsh_t * | this | ) |
References _x_io_tcp_close(), _x_url_cleanup(), asf_header_delete(), and lprintf.
Referenced by mms_plugin_dispose().
mmsh_t * mmsh_connect | ( | xine_stream_t * | stream, |
const char * | url, | ||
int | bandwidth | ||
) |
References _, _x_io_tcp_close(), _x_url_cleanup(), _x_url_parse2(), lprintf, mmsh_connect_int(), mmsh_tcp_connect(), mmsh_valid_proto(), NULL, report_progress(), xine_stream_s::xine, xine_log(), and XINE_LOG_MSG.
Referenced by mms_plugin_open().
|
static |
References _x_io_tcp_close(), asf_header_choose_streams(), asf_header_disable_streams(), get_answer(), get_header(), interp_header(), lprintf, mmsh_FirstRequest, mmsh_tcp_connect(), report_progress(), SCRATCH_SIZE, and send_command().
Referenced by get_media_packet(), and mmsh_connect().
|
static |
References asf_header_disable_streams(), ASF_MAX_NUM_STREAMS, get_answer(), get_header(), interp_header(), lprintf, MMSH_LIVE, mmsh_LiveRequest, MMSH_SEEKABLE, mmsh_SeekableRequest, SCRATCH_SIZE, send_command(), XINE_VERBOSITY_LOG, and xprintf.
Referenced by mmsh_read().
off_t mmsh_get_current_pos | ( | mmsh_t * | this | ) |
Referenced by mms_plugin_get_current_pos(), mms_plugin_seek(), and mms_plugin_seek_time().
uint32_t mmsh_get_length | ( | mmsh_t * | this | ) |
Referenced by mms_plugin_get_length().
size_t mmsh_peek_header | ( | mmsh_t * | this, |
char * | data, | ||
size_t | maxsize | ||
) |
References lprintf.
Referenced by mms_plugin_get_optional_data().
int mmsh_read | ( | mmsh_t * | this, |
char * | data, | ||
int | len | ||
) |
References get_media_packet(), lprintf, mmsh_connect_int2(), xine_fast_memcpy, XINE_VERBOSITY_LOG, and xprintf.
Referenced by mms_plugin_read().
void mmsh_set_start_time | ( | mmsh_t * | this, |
int | time_offset | ||
) |
Referenced by mms_plugin_seek_time().
|
static |
References _x_io_select(), _x_io_tcp_connect(), lprintf, MMSH_PORT, report_progress(), XINE_VERBOSITY_LOG, XIO_READY, XIO_TIMEOUT, XIO_WRITE_READY, and xprintf.
Referenced by get_media_packet(), mmsh_connect(), and mmsh_connect_int().
|
static |
References lprintf, and mmsh_proto_s.
Referenced by mmsh_connect().
|
static |
References _, xine_progress_data_t::description, xine_progress_data_t::percent, XINE_EVENT_PROGRESS, and xine_event_send().
Referenced by mmsh_connect(), mmsh_connect_int(), and mmsh_tcp_connect().
|
static |
References _, _x_io_tcp_write(), lprintf, XINE_LOG_MSG, and xprintf.
Referenced by mmsh_connect_int(), and mmsh_connect_int2().
|
static |
Referenced by mmsh_valid_proto().