xine-lib: xine-lib-1.2.13/src/input/input_rtp.c File Reference

xine-lib 1.2.13-20230125hg15249

Data Structures | Macros | Functions | Variables
input_rtp.c File Reference
`#include <stdio.h>`
`#include <unistd.h>`
`#include <fcntl.h>`
`#include <string.h>`
`#include <sys/ioctl.h>`
`#include <errno.h>`
`#include <pthread.h>`
`#include <sys/time.h>`
`#include <stdlib.h>`
`#include <net/if.h>`
`#include <sys/select.h>`
`#include <xine/xine_internal.h>`
`#include <xine/xineutils.h>`
`#include <xine/input_plugin.h>`
`#include "net_buf_ctrl.h"`
`#include "input_helper.h"`

## Data Structures
struct | rtp_input_plugin_t

## Macros
#define | LOG_MODULE "input_rtp"
#define | LOG_VERBOSE
#define | LOG_MSG(xine, ...)
#define | BUFFER_SIZE (1024*1024)

## Functions
static int | host_connect_attempt (struct in_addr ia, int port, const char *interface, xine_t *xine)
static int | host_connect (const char *host, int port, const char *interface, xine_t *xine)
static void * | input_plugin_read_loop (void *arg)
static off_t | rtp_plugin_read (input_plugin_t *this_gen, void *buf_gen, off_t length)
static off_t | rtp_plugin_seek (input_plugin_t *this_gen, off_t offset, int origin)
static off_t | rtp_plugin_get_length (input_plugin_t *this_gen)
static off_t | rtp_plugin_get_current_pos (input_plugin_t *this_gen)
static const char * | rtp_plugin_get_mrl (input_plugin_t *this_gen)
static int | rtp_plugin_get_optional_data (input_plugin_t *this_gen, void *data, int data_type)
static void | rtp_plugin_dispose (input_plugin_t *this_gen)
static int | rtp_plugin_open (input_plugin_t *this_gen)
static input_plugin_t * | rtp_class_get_instance (input_class_t *cls_gen, xine_stream_t *stream, const char *data)
static void * | init_class (xine_t *xine, const void *data)

## Variables
const plugin_info_t xine_plugin_info[] | EXPORTED

## Macro Definition Documentation

## ◆ BUFFER_SIZE

#define BUFFER_SIZE (1024*1024)

Referenced by host_connect_attempt(), input_plugin_read_loop(), rtp_class_get_instance(), and rtp_plugin_read().

## ◆ LOG_MODULE

#define LOG_MODULE "input_rtp"

## ◆ LOG_MSG

#define LOG_MSG | ( |  | xine,
|  |  | ... )

Value:
{ \
xine_log(xine, XINE_LOG_MSG, __VA_ARGS__); \
lprintf(__VA_ARGS__); \
}
XINE_LOG_MSG
#define XINE_LOG_MSG
Definition xine_internal.h:64

Referenced by host_connect(), host_connect_attempt(), input_plugin_read_loop(), rtp_plugin_dispose(), and rtp_plugin_open().

## ◆ LOG_VERBOSE

#define LOG_VERBOSE

## Function Documentation

## ◆ host_connect()

static int host_connect | ( | const char * | host,
|  | int | port,
|  | const char * | interface,
|  | xine_t * | xine )
| static

References _, host_connect_attempt(), LOG_MSG, and NULL.

Referenced by rtp_plugin_open().

## ◆ host_connect_attempt()

static int host_connect_attempt | ( | struct in_addr | ia,
|  | int | port,
|  | const char * | interface,
|  | xine_t * | xine )
| static

References _, BUFFER_SIZE, LOG_MSG, NULL, and xine_socket_cloexec().

Referenced by host_connect().

## ◆ init_class()

static void * init_class | ( | xine_t * | xine,
|  | const void * | data )
| static

References input_plugin_s::dispose, input_class_s::get_instance, N_, NULL, and rtp_class_get_instance().

## ◆ input_plugin_read_loop()

static void * input_plugin_read_loop | ( | void * | arg | ) |
| static

References _, BUFFER_SIZE, LOG_MSG, and NULL.

Referenced by rtp_plugin_open().

## ◆ rtp_class_get_instance()

static input_plugin_t * rtp_class_get_instance | ( | input_class_t * | cls_gen,
|  | xine_stream_t * | stream,
|  | const char * | data )
| static

References _x_input_default_get_blocksize(), _x_input_default_read_block(), _x_input_get_capabilities_preview(), BUFFER_SIZE, nbc_init, NULL, rtp_plugin_dispose(), rtp_plugin_get_current_pos(), rtp_plugin_get_length(), rtp_plugin_get_mrl(), rtp_plugin_get_optional_data(), rtp_plugin_open(), rtp_plugin_read(), and rtp_plugin_seek().

Referenced by init_class().

## ◆ rtp_plugin_dispose()

static void rtp_plugin_dispose | ( | input_plugin_t * | this_gen | ) |
| static

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

Referenced by rtp_class_get_instance().

## ◆ rtp_plugin_get_current_pos()

static off_t rtp_plugin_get_current_pos | ( | input_plugin_t * | this_gen | ) |
| static

Referenced by rtp_class_get_instance().

## ◆ rtp_plugin_get_length()

static off_t rtp_plugin_get_length | ( | input_plugin_t * | this_gen | ) |
| static

Referenced by rtp_class_get_instance().

## ◆ rtp_plugin_get_mrl()

static const char * rtp_plugin_get_mrl | ( | input_plugin_t * | this_gen | ) |
| static

Referenced by rtp_class_get_instance().

## ◆ rtp_plugin_get_optional_data()

static int rtp_plugin_get_optional_data | ( | input_plugin_t * | this_gen,
|  | void * | data,
|  | int | data_type )
| static

References INPUT_OPTIONAL_DATA_PREVIEW, INPUT_OPTIONAL_UNSUPPORTED, lprintf, MAX_PREVIEW_SIZE, and rtp_plugin_read().

Referenced by rtp_class_get_instance().

## ◆ rtp_plugin_open()

static int rtp_plugin_open | ( | input_plugin_t * | this_gen | ) |
| static

References _, _x_assert, host_connect(), input_plugin_read_loop(), LOG_MSG, and NULL.

Referenced by rtp_class_get_instance().

## ◆ rtp_plugin_read()

static off_t rtp_plugin_read | ( | input_plugin_t * | this_gen,
|  | void * | buf_gen,
|  | off_t | length )
| static

References BUFFER_SIZE, and NULL.

Referenced by rtp_class_get_instance(), and rtp_plugin_get_optional_data().

## ◆ rtp_plugin_seek()

static off_t rtp_plugin_seek | ( | input_plugin_t * | this_gen,
|  | off_t | offset,
|  | int | origin )
| static

References _x_input_seek_preview().

Referenced by rtp_class_get_instance().

## Variable Documentation

## ◆ EXPORTED

const plugin_info_t xine_plugin_info [] EXPORTED

Initial value:
= {
{ PLUGIN_INPUT, 18, "rtp", XINE_VERSION_CODE, NULL, init_class },
{ PLUGIN_NONE, 0, NULL, 0, NULL, NULL }
}
init_class
static void * init_class(xine_t *xine, const void *data)
Definition input_rtp.c:765
XINE_VERSION_CODE
#define XINE_VERSION_CODE
Definition xine_internal.h:57
NULL
NULL
Definition xine_plugin.c:78
PLUGIN_NONE
#define PLUGIN_NONE
Definition xine_plugin.h:29
PLUGIN_INPUT
#define PLUGIN_INPUT
Definition xine_plugin.h:30