xine-lib 1.2.13-20230125hg15249
Macros | Functions | Variables
real.c File Reference
#include <stdio.h>
#include <string.h>
#include "real.h"
#include "asmrp.h"
#include "sdpplin.h"
#include <xine/xineutils.h>
#include <xine/xine_buffer.h>
#include "bswap.h"

Macros

#define LOG_MODULE   "real"
 
#define LOG_VERBOSE
 
#define XOR_TABLE_LEN   37
 
#define _X_BE_32C(x, y)
 
#define _X_LE_32C(x, y)
 
#define MAX_DESC_BUF   (20 * 1024 * 1024)
 maximum size of the rtsp description, must be < INT_MAX
 

Functions

static void hash (uint8_t *field, const uint8_t *param)
 
static void call_hash (uint8_t *key, const uint8_t *challenge, unsigned int len)
 
static void calc_response (uint8_t *result, uint8_t *field)
 
static void calc_response_string (char *result, const uint8_t *challenge)
 
void real_calc_response_and_checksum (char *response, char *chksum, char *challenge)
 
static int select_mlti_data (const char *mlti_chunk, int mlti_size, int selection, char **out)
 
rmff_header_treal_parse_sdp (char *data, char **stream_rules, uint32_t bandwidth)
 
int real_get_rdt_chunk (rtsp_t *rtsp_session, unsigned char **buffer)
 
rmff_header_treal_setup_and_get_header (rtsp_t *rtsp_session, uint32_t bandwidth)
 

Variables

static const unsigned char xor_table []
 

Macro Definition Documentation

◆ _X_BE_32C

#define _X_BE_32C ( x,
y )
Value:
do { \
uint32_t X = be2me_32((y)); \
memcpy((x), &X, sizeof(uint32_t)); \
} while(0)
#define be2me_32(x)
Definition ffmpeg_bswap.h:168

Referenced by real_calc_response_and_checksum().

◆ _X_LE_32C

#define _X_LE_32C ( x,
y )
Value:
do { \
uint32_t X = le2me_32((y)); \
memcpy((x), &X, sizeof(uint32_t)); \
} while(0)
#define le2me_32(x)
Definition ffmpeg_bswap.h:171

Referenced by call_hash(), and hash().

◆ LOG_MODULE

#define LOG_MODULE   "real"

◆ LOG_VERBOSE

#define LOG_VERBOSE

◆ MAX_DESC_BUF

#define MAX_DESC_BUF   (20 * 1024 * 1024)

maximum size of the rtsp description, must be < INT_MAX

Referenced by real_setup_and_get_header().

◆ XOR_TABLE_LEN

#define XOR_TABLE_LEN   37

Function Documentation

◆ calc_response()

static void calc_response ( uint8_t * result,
uint8_t * field )
static

References _X_LE_32, call_hash(), field, and lprintf.

Referenced by calc_response_string().

◆ calc_response_string()

static void calc_response_string ( char * result,
const uint8_t * challenge )
static

◆ call_hash()

static void call_hash ( uint8_t * key,
const uint8_t * challenge,
unsigned int len )
static

References _X_LE_32, _X_LE_32C, hash(), key, and lprintf.

Referenced by calc_response(), and calc_response_string().

◆ hash()

static void hash ( uint8_t * field,
const uint8_t * param )
static

◆ real_calc_response_and_checksum()

void real_calc_response_and_checksum ( char * response,
char * chksum,
char * challenge )

◆ real_get_rdt_chunk()

int real_get_rdt_chunk ( rtsp_t * rtsp_session,
unsigned char ** buffer )

◆ real_parse_sdp()

rmff_header_t * real_parse_sdp ( char * data,
char ** stream_rules,
uint32_t bandwidth )

◆ real_setup_and_get_header()

rmff_header_t * real_setup_and_get_header ( rtsp_t * rtsp_session,
uint32_t bandwidth )

◆ select_mlti_data()

static int select_mlti_data ( const char * mlti_chunk,
int mlti_size,
int selection,
char ** out )
static

Variable Documentation

◆ xor_table

const unsigned char xor_table[]
static
Initial value:
= {
0x05, 0x18, 0x74, 0xd0, 0x0d, 0x09, 0x02, 0x53,
0xc0, 0x01, 0x05, 0x05, 0x67, 0x03, 0x19, 0x70,
0x08, 0x27, 0x66, 0x10, 0x10, 0x72, 0x08, 0x09,
0x63, 0x11, 0x03, 0x71, 0x08, 0x08, 0x70, 0x02,
0x10, 0x57, 0x05, 0x18, 0x54, 0x00, 0x00, 0x00 }

Referenced by real_calc_response_and_checksum().