|
xine-lib
1.2.10
|
#include <config.h>#include <stdio.h>#include <string.h>#include <stdlib.h>#include <sys/types.h>#include "pnm.h"#include "libreal/rmff.h"#include "bswap.h"#include <xine/io_helper.h>#include <xine/xineutils.h>#include <xine/xine_internal.h>Data Structures | |
| struct | pnm_s |
Macros | |
| #define | LOG_MODULE "pnm" |
| #define | LOG_VERBOSE |
| #define | BUF_SIZE 4096 |
| #define | HEADER_SIZE 4096 |
| #define | PREAMBLE_SIZE 8 |
| #define | CHECKSUM_SIZE 3 |
| #define | RM_HEADER_SIZE 0x12 |
| #define | PNM_DATA_HEADER_SIZE 18 |
| #define | PNA_CLIENT_CAPS 0x03 |
| #define | PNA_CLIENT_CHALLANGE 0x04 |
| #define | PNA_BANDWIDTH 0x05 |
| #define | PNA_GUID 0x13 |
| #define | PNA_TIMESTAMP 0x17 |
| #define | PNA_TWENTYFOUR 0x18 |
| #define | PNA_CLIENT_STRING 0x63 |
| #define | PNA_PATH_REQUEST 0x52 |
| #define | PNM_HEADER_SIZE 11 |
| #define | PNM_CLIENT_CAPS_SIZE 126 |
| #define | PNM_TWENTYFOUR_SIZE 16 |
Functions | |
| static unsigned int | pnm_get_chunk (pnm_t *p, unsigned int max, unsigned int *chunk_type, char *data, int *need_response) |
| static int | pnm_write_chunk (uint16_t chunk_id, uint16_t length, const char *chunk, char *data) |
| static int | pnm_send_request (pnm_t *p, uint32_t bandwidth) |
| static int | pnm_send_response (pnm_t *p, const char *response) |
| static int | pnm_get_headers (pnm_t *p, int *need_response) |
| static int | pnm_calc_stream (pnm_t *p) |
| static int | pnm_get_stream_chunk (pnm_t *p) |
| pnm_t * | pnm_connect (xine_stream_t *stream, const char *mrl) |
| int | pnm_read (pnm_t *this, char *data, int len) |
| int | pnm_peek_header (pnm_t *this, char *data, int maxsize) |
| void | pnm_close (pnm_t *p) |
Variables | |
| static const unsigned char | rm_header [] |
| static const unsigned char | pnm_data_header [] |
| static const char | pnm_challenge [] = "0990f6b4508b51e801bd6da011ad7b56" |
| static const char | pnm_timestamp [] = "[15/06/1999:22:22:49 00:00]" |
| static const char | pnm_guid [] = "3eac2411-83d5-11d2-f3ea-d7c3a51aa8b0" |
| static const char | pnm_response [] = "97715a899cbe41cee00dd434851535bf" |
| static const char | client_string [] = "WinNT_9.0_6.0.6.45_plus32_MP60_en-US_686l" |
| static const unsigned char | pnm_header [] |
| static const unsigned char | pnm_client_caps [] |
| static const uint32_t | pnm_default_bandwidth =10485800 |
| static const uint32_t | pnm_available_bandwidths [] |
| static const unsigned char | pnm_twentyfour [] |
| static const int | after_chunks_length =6 |
| static const unsigned char | after_chunks [] |
| #define BUF_SIZE 4096 |
| #define CHECKSUM_SIZE 3 |
| #define HEADER_SIZE 4096 |
| #define LOG_MODULE "pnm" |
| #define LOG_VERBOSE |
| #define PNA_BANDWIDTH 0x05 |
| #define PNA_CLIENT_CAPS 0x03 |
| #define PNA_CLIENT_CHALLANGE 0x04 |
| #define PNA_CLIENT_STRING 0x63 |
| #define PNA_GUID 0x13 |
| #define PNA_PATH_REQUEST 0x52 |
| #define PNA_TIMESTAMP 0x17 |
| #define PNA_TWENTYFOUR 0x18 |
| #define PNM_CLIENT_CAPS_SIZE 126 |
| #define PNM_DATA_HEADER_SIZE 18 |
| #define PNM_HEADER_SIZE 11 |
| #define PNM_TWENTYFOUR_SIZE 16 |
| #define PREAMBLE_SIZE 8 |
| #define RM_HEADER_SIZE 0x12 |
|
static |
References lprintf, pnm_s::seq_current, pnm_s::seq_num, pnm_s::stream, pnm_s::ts_current, pnm_s::ts_last, xine_stream_s::xine, XINE_VERBOSITY_DEBUG, and xprintf.
Referenced by pnm_get_stream_chunk().
| void pnm_close | ( | pnm_t * | p | ) |
References _x_io_tcp_close(), pnm_s::host, pnm_s::path, pnm_s::s, pnm_s::stream, and pnm_s::url.
Referenced by pnm_connect(), and pnm_plugin_dispose().
| pnm_t* pnm_connect | ( | xine_stream_t * | stream, |
| const char * | mrl | ||
| ) |
References _, _x_io_tcp_connect(), pnm_s::buffer, pnm_s::header, pnm_s::header_len, pnm_s::host, lprintf, NULL, pnm_s::packet, pnm_s::path, pnm_available_bandwidths, pnm_close(), pnm_get_headers(), pnm_response, pnm_send_request(), pnm_send_response(), pnm_s::port, pnm_s::recv, pnm_s::recv_read, pnm_s::recv_size, pnm_s::s, pnm_s::stream, pnm_s::ts_last, pnm_s::url, xine_stream_s::xine, XINE_VERBOSITY_LOG, and xprintf.
Referenced by pnm_plugin_open().
|
static |
References _x_io_tcp_read(), be2me_16, be2me_32, CHECKSUM_SIZE, CONT_TAG, DATA_TAG, MDPR_TAG, PNA_TAG, PREAMBLE_SIZE, PROP_TAG, RMF_TAG, pnm_s::s, pnm_s::stream, xine_stream_s::xine, xine_hexdump(), XINE_VERBOSITY_DEBUG, and xprintf.
Referenced by pnm_get_headers().
|
static |
References _x_io_tcp_read(), be2me_32, pnm_s::buffer, DATA_TAG, pnm_s::header, pnm_s::header_len, HEADER_SIZE, NULL, PNA_TAG, pnm_data_header, PNM_DATA_HEADER_SIZE, pnm_get_chunk(), PREAMBLE_SIZE, PROP_TAG, rm_header, RM_HEADER_SIZE, RMF_TAG, pnm_s::s, pnm_s::stream, xine_stream_s::xine, XINE_VERBOSITY_DEBUG, and xprintf.
Referenced by pnm_connect().
|
static |
References _, _X_BE_16, _X_BE_32, _x_io_tcp_read(), _x_io_tcp_write(), be2me_16, BUF_SIZE, pnm_s::buffer, lprintf, pnm_s::packet, pnm_calc_stream(), pnm_s::recv, pnm_s::recv_size, pnm_s::s, pnm_s::seq_current, pnm_s::stream, pnm_s::ts_current, pnm_s::ts_last, xine_stream_s::xine, xine_hexdump(), XINE_VERBOSITY_DEBUG, XINE_VERBOSITY_LOG, and xprintf.
Referenced by pnm_read().
| int pnm_peek_header | ( | pnm_t * | this, |
| char * | data, | ||
| int | maxsize | ||
| ) |
Referenced by pnm_plugin_get_optional_data().
| int pnm_read | ( | pnm_t * | this, |
| char * | data, | ||
| int | len | ||
| ) |
References lprintf, and pnm_get_stream_chunk().
Referenced by pnm_plugin_read().
|
static |
References _x_io_tcp_write(), after_chunks, after_chunks_length, be2me_16, pnm_s::buffer, client_string, NULL, pnm_s::path, PNA_BANDWIDTH, PNA_CLIENT_CAPS, PNA_CLIENT_CHALLANGE, PNA_CLIENT_STRING, PNA_GUID, PNA_PATH_REQUEST, PNA_TIMESTAMP, PNA_TWENTYFOUR, pnm_challenge, pnm_client_caps, PNM_CLIENT_CAPS_SIZE, pnm_default_bandwidth, pnm_guid, pnm_header, PNM_HEADER_SIZE, pnm_timestamp, pnm_twentyfour, PNM_TWENTYFOUR_SIZE, pnm_write_chunk(), pnm_s::s, and pnm_s::stream.
Referenced by pnm_connect().
|
static |
@TODO should check that sze is always < 256
References _x_io_tcp_write(), pnm_s::buffer, pnm_s::s, and pnm_s::stream.
Referenced by pnm_connect().
|
static |
References be2me_16.
Referenced by pnm_send_request().
|
static |
Referenced by pnm_send_request().
|
static |
Referenced by pnm_send_request().
|
static |
Referenced by pnm_send_request().
|
static |
Referenced by pnm_connect().
|
static |
Referenced by pnm_send_request().
|
static |
Referenced by pnm_send_request().
|
static |
Referenced by pnm_get_headers().
|
static |
Referenced by pnm_send_request().
|
static |
Referenced by pnm_send_request().
|
static |
Referenced by pnm_send_request().
|
static |
Referenced by pnm_connect().
|
static |
Referenced by pnm_send_request().
|
static |
Referenced by pnm_send_request().
|
static |
Referenced by pnm_get_headers().
1.8.17