xine-lib  1.2.10
mms.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2002-2009 the xine project
3  *
4  * This file is part of xine, a free video player.
5  *
6  * xine is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * xine is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
19  *
20  * libmms public header
21  */
22 
23 #ifndef HAVE_MMS_H
24 #define HAVE_MMS_H
25 
26 #include <inttypes.h>
27 #include <xine/xine_internal.h>
28 
29 typedef struct mms_s mms_t;
30 
31 char* mms_connect_common(int *s ,int *port, char *url, char **host, char **path, char **file);
32 mms_t* mms_connect (xine_stream_t *stream, const char *url_, int bandwidth);
33 
34 int mms_read (mms_t *this, char *data, int len);
35 uint32_t mms_get_length (mms_t *this);
36 void mms_close (mms_t *this);
37 
38 size_t mms_peek_header (mms_t *this, char *data, size_t maxsize);
39 
40 off_t mms_get_current_pos (mms_t *this);
41 
42 void mms_set_start_time (mms_t *this, int time_offset);
43 
44 #endif
45 
MMS_PACKET_ASF_HEADER
#define MMS_PACKET_ASF_HEADER
Definition: mms.c:81
http_helper.h
mms_set_start_time
void mms_set_start_time(mms_t *this, int time_offset)
Definition: mms.c:1146
xine_stream_s::xine
xine_t * xine
Definition: xine_internal.h:126
mms_connect_common
char * mms_connect_common(int *s, int *port, char *url, char **host, char **path, char **file)
xine_stream_s
Definition: xine_internal.h:123
_x_io_tcp_write
off_t _x_io_tcp_write(xine_stream_t *stream, int s, const void *wbuf_gen, off_t todo)
Definition: io_helper.c:607
CMD_BODY_LEN
#define CMD_BODY_LEN
Definition: mms.c:74
xineutils.h
mms_s::asf_header_len
uint32_t asf_header_len
Definition: mms.c:124
interp_asf_header
static int interp_asf_header(mms_t *this)
Definition: mms.c:509
mms_s::eos
int eos
Definition: mms.c:132
mms_s::asf_header_buffer
uint8_t asf_header_buffer[8192]
Definition: mms.c:123
mms_s::buf_size
int buf_size
Definition: mms.c:119
asf_header_new
asf_header_t * asf_header_new(uint8_t *buffer, int buffer_len)
Definition: asfheader.c:720
get_packet_header
static int get_packet_header(mms_t *this, mms_packet_header_t *header)
Definition: mms.c:336
xine_fast_memcpy
void *(* xine_fast_memcpy)(void *to, const void *from, size_t len)
Definition: memcpy.c:60
mms_s::scmd_body
char * scmd_body
Definition: mms.c:114
xine_event_t
Definition: xine.h:1923
iconv_open
#define iconv_open(TO, FROM)
Definition: asfheader.c:58
mms_buffer_s
Definition: mms.c:89
_x_io_select
int _x_io_select(xine_stream_t *stream, int fd, int state, int timeout_msec)
Definition: io_helper.c:356
xine_url_t
Definition: http_helper.h:49
mms_connect
mms_t * mms_connect(xine_stream_t *stream, const char *url_, int bandwidth)
Definition: mms.c:661
mms_packet_header_s::flags
uint8_t flags
Definition: mms.c:97
XINE_EVENT_PROGRESS
#define XINE_EVENT_PROGRESS
Definition: xine.h:1821
mms_s::seq_num
int seq_num
Definition: mms.c:127
mms.h
mms_buffer_s::pos
int pos
Definition: mms.c:91
MMS_PACKET_ASF_PACKET
#define MMS_PACKET_ASF_PACKET
Definition: mms.c:82
lprintf
#define lprintf(...)
Definition: xineutils.h:620
XIO_TIMEOUT
#define XIO_TIMEOUT
Definition: io_helper.h:37
_x_url_cleanup
void _x_url_cleanup(xine_url_t *url)
Definition: http_helper.c:374
mms_s::buf_read
int buf_read
Definition: mms.c:120
mms_s::stream
xine_stream_t * stream
Definition: mms.c:105
mms_packet_header_s::packet_id_type
uint8_t packet_id_type
Definition: mms.c:98
mms_get_length
uint32_t mms_get_length(mms_t *this)
Definition: mms.c:1138
iconv_t
int iconv_t
Definition: asfheader.c:67
mms_s::start_time
double start_time
Definition: mms.c:137
_X_LE_16
#define _X_LE_16(x)
Definition: bswap.h:58
mms_s
Definition: mms.c:103
NULL
NULL
Definition: xine_plugin.c:78
xine_event_send
void xine_event_send(xine_stream_t *s, const xine_event_t *event)
Definition: events.c:194
ASF_MEDIA_PACKET_ID_TYPE
#define ASF_MEDIA_PACKET_ID_TYPE
Definition: mms.c:85
XIO_WRITE_READY
#define XIO_WRITE_READY
Definition: io_helper.h:31
CMD_HEADER_LEN
#define CMD_HEADER_LEN
Definition: mms.c:72
mms_buffer_init
static void mms_buffer_init(mms_buffer_t *mms_buffer, char *buffer)
Definition: mms.c:148
mms_packet_header_s::packet_len
uint32_t packet_len
Definition: mms.c:96
XIO_READY
#define XIO_READY
Definition: io_helper.h:34
XINE_VERBOSITY_LOG
#define XINE_VERBOSITY_LOG
Definition: xine.h:425
_x_url_parse2
int _x_url_parse2(const char *mrl, xine_url_t *url)
Definition: http_helper.c:156
mmst_valid_proto
static int mmst_valid_proto(const char *proto)
Definition: mms.c:529
mms_get_length
uint32_t mms_get_length(mms_t *this)
Definition: mms.c:1138
_
#define _(String)
Definition: vcdplayer.h:39
BUF_SIZE
#define BUF_SIZE
Definition: mms.c:70
mms_buffer_put_64
static void mms_buffer_put_64(mms_buffer_t *mms_buffer, uint64_t value)
Definition: mms.c:180
_X_LE_32
#define _X_LE_32(x)
Definition: bswap.h:63
get_media_packet
static int get_media_packet(mms_t *this)
Definition: mms.c:907
xine_progress_data_t::description
const char * description
Definition: xine.h:2010
mms_buffer_put_8
static void mms_buffer_put_8(mms_buffer_t *mms_buffer, uint8_t value)
Definition: mms.c:153
mms_read
int mms_read(mms_t *this, char *data, int len)
Definition: mms.c:1050
mms_s::playing
uint8_t playing
Definition: mms.c:136
iconv
#define iconv(CD, INBUF, INLEFT, OUTBUF, OUTLEFT)
Definition: asfheader.c:59
get_answer
static int get_answer(mms_t *this)
Definition: mms.c:413
mms_s::live_flag
uint8_t live_flag
Definition: mms.c:134
D2Q
#define D2Q(d)
Definition: mms.c:141
MMS_PACKET_ERR
#define MMS_PACKET_ERR
Definition: mms.c:79
mms_close
void mms_close(mms_t *this)
Definition: mms.c:1126
print_command
#define print_command(data, len)
Definition: mms.c:235
asf_header_s
Definition: asfheader.h:132
mms_s::s
int s
Definition: mms.c:107
get_packet_command
static int get_packet_command(mms_t *this, uint32_t packet_len)
Definition: mms.c:383
send_command
static int send_command(mms_t *this, int command, uint32_t prefix1, uint32_t prefix2, int length)
Definition: mms.c:240
ASF_HEADER_LEN
#define ASF_HEADER_LEN
Definition: mms.c:76
mms_s::bandwidth
int bandwidth
Definition: mms.c:129
string_utf16
static void string_utf16(int unused, char *dest, const char *src, int len)
Definition: mms.c:317
asf_header_delete
void asf_header_delete(asf_header_t *header_pub)
Definition: asfheader.c:858
ICONV_CONST
#define ICONV_CONST
Definition: mms.c:45
mms_connect
mms_t * mms_connect(xine_stream_t *stream, const char *url, int bandwidth)
Definition: mms.c:661
mms_packet_header_s
Definition: mms.c:95
mms_s::buf
uint8_t buf[102400]
Definition: mms.c:118
report_progress
static void report_progress(xine_stream_t *stream, int p)
Definition: mms.c:546
xine_progress_data_t::percent
int percent
Definition: xine.h:2011
get_asf_header
static int get_asf_header(mms_t *this)
Definition: mms.c:450
mms_get_current_pos
off_t mms_get_current_pos(mms_t *this)
Definition: mms.c:1142
mms_s::url
xine_url_t url
Definition: mms.c:110
bswap.h
mmst_proto_s
static const char mmst_proto_s[][8]
Definition: mms.c:527
MMST_PORT
#define MMST_PORT
Definition: mms.c:68
mms_gen_guid
static void mms_gen_guid(char guid[])
Definition: mms.c:596
mms_get_current_pos
off_t mms_get_current_pos(mms_t *this)
Definition: mms.c:1142
mms_read
int mms_read(mms_t *this, char *data, int len)
Definition: mms.c:1050
mms_buffer_put_32
static void mms_buffer_put_32(mms_buffer_t *mms_buffer, uint32_t value)
Definition: mms.c:170
xine_internal.h
ASF_HEADER_PACKET_ID_TYPE
#define ASF_HEADER_PACKET_ID_TYPE
Definition: mms.c:84
_x_mrl_unescape
void _x_mrl_unescape(char *mrl)
Definition: xine.c:1381
config.h
CMD_PREFIX_LEN
#define CMD_PREFIX_LEN
Definition: mms.c:73
_x_io_tcp_connect
int _x_io_tcp_connect(xine_stream_t *stream, const char *host, int port)
Definition: io_helper.c:159
MMS_PACKET_COMMAND
#define MMS_PACKET_COMMAND
Definition: mms.c:80
mms_close
void mms_close(mms_t *this)
Definition: mms.c:1126
mms_tcp_connect
static int mms_tcp_connect(mms_t *this)
Definition: mms.c:565
mms_peek_header
size_t mms_peek_header(mms_t *this, char *data, size_t maxsize)
Definition: mms.c:1040
mms_s::asf_header_read
uint32_t asf_header_read
Definition: mms.c:125
mms_s::current_pos
off_t current_pos
Definition: mms.c:131
mms_peek_header
size_t mms_peek_header(mms_t *this, char *data, size_t maxsize)
Definition: mms.c:1040
asf_header_choose_streams
void asf_header_choose_streams(asf_header_t *header_pub, uint32_t bandwidth, int *video_id, int *audio_id)
Definition: asfheader.c:894
mms_s::scmd
char scmd[40+1024]
Definition: mms.c:113
_x_io_tcp_close
int _x_io_tcp_close(xine_stream_t *stream, int fd)
Definition: io_helper.c:740
mms_s::guid
char guid[37]
Definition: mms.c:128
xine_progress_data_t
Definition: xine.h:2009
mms_s::scmd_len
int scmd_len
Definition: mms.c:115
iconv_close
#define iconv_close(CD)
Definition: asfheader.c:60
mms_set_start_time
void mms_set_start_time(mms_t *this, int time_offset)
Definition: mms.c:1146
xprintf
#define xprintf(xine, verbose,...)
Definition: xineutils.h:664
mms_buffer_s::buffer
uint8_t * buffer
Definition: mms.c:90
mms_s::asf_header
asf_header_t * asf_header
Definition: mms.c:122
_x_io_tcp_read
off_t _x_io_tcp_read(xine_stream_t *stream, int s, void *buf_gen, off_t todo)
Definition: io_helper.c:524
mms_packet_header_s::packet_seq
uint32_t packet_seq
Definition: mms.c:99
mms_choose_best_streams
static int mms_choose_best_streams(mms_t *this)
Definition: mms.c:611