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

xine-lib 1.2.13-20230125hg15249

Data Structures | Macros | Functions | Variables
input_stdin_fifo.c File Reference
`#include <stdio.h>`
`#include <stdlib.h>`
`#include <string.h>`
`#include <unistd.h>`
`#include <fcntl.h>`
`#include <sys/stat.h>`
`#include <errno.h>`
`#include <xine/xine_internal.h>`
`#include <xine/xineutils.h>`
`#include <xine/input_plugin.h>`
`#include "input_helper.h"`

## Data Structures
struct | stdin_input_plugin_t

## Macros
#define | LOG_MODULE "input_stdin_fifo"
#define | LOG_VERBOSE
#define | BUFSIZE 1024
#define | FILE_FLAGS O_RDONLY
#define | RING_LD 15
#define | RING_SIZE (1 << RING_LD)
#define | RING_MASK (RING_SIZE - 1)
#define | INPUT_STDIN_CATALOG { PLUGIN_INPUT, 18, "stdin", XINE_VERSION_CODE, NULL, stdin_plugin_init_class }

## Functions
static off_t | stdin_plugin_get_current_pos (input_plugin_t *this_gen)
static int | stdin_plugin_wait (stdin_input_plugin_t *this)
static off_t | stdin_plugin_read (input_plugin_t *this_gen, void *buf_gen, off_t len)
static off_t | stdin_plugin_seek (input_plugin_t *this_gen, off_t offset, int origin)
static off_t | stdin_plugin_get_length (input_plugin_t *this_gen)
static const char * | stdin_plugin_get_mrl (input_plugin_t *this_gen)
static void | stdin_plugin_dispose (input_plugin_t *this_gen)
static uint32_t | stdin_plugin_get_capabilities (input_plugin_t *this_gen)
static int | stdin_plugin_get_optional_data (input_plugin_t *this_gen, void *data, int data_type)
static int | stdin_plugin_open (input_plugin_t *this_gen)
static input_plugin_t * | stdin_class_get_instance (input_class_t *class_gen, xine_stream_t *stream, const char *data)
static void * | stdin_plugin_init_class (xine_t *xine, const void *data)

## Variables
const plugin_info_t xine_plugin_info[] | EXPORTED

## Macro Definition Documentation

## ◆ BUFSIZE

#define BUFSIZE 1024

## ◆ FILE_FLAGS

#define FILE_FLAGS O_RDONLY

Referenced by stdin_plugin_open().

## ◆ INPUT_STDIN_CATALOG

#define INPUT_STDIN_CATALOG { PLUGIN_INPUT, 18, "stdin", XINE_VERSION_CODE, NULL, stdin_plugin_init_class }

## ◆ LOG_MODULE

#define LOG_MODULE "input_stdin_fifo"

Referenced by stdin_plugin_dispose(), stdin_plugin_read(), and stdin_plugin_wait().

## ◆ LOG_VERBOSE

#define LOG_VERBOSE

## ◆ RING_LD

#define RING_LD 15

## ◆ RING_MASK

#define RING_MASK (RING_SIZE - 1)

Referenced by stdin_plugin_read().

## ◆ RING_SIZE

#define RING_SIZE (1 << RING_LD)

Referenced by stdin_plugin_open(), and stdin_plugin_read().

## Function Documentation

## ◆ stdin_class_get_instance()

static input_plugin_t * stdin_class_get_instance | ( | input_class_t * | class_gen,
|  | xine_stream_t * | stream,
|  | const char * | data )
| static

References _x_input_default_get_blocksize(), _x_input_default_read_block(), lprintf, NULL, stdin_plugin_dispose(), stdin_plugin_get_capabilities(), stdin_plugin_get_current_pos(), stdin_plugin_get_length(), stdin_plugin_get_mrl(), stdin_plugin_get_optional_data(), stdin_plugin_open(), stdin_plugin_read(), stdin_plugin_seek(), xine_stream_s::xine, and xine_nbc_init().

Referenced by stdin_plugin_init_class().

## ◆ stdin_plugin_dispose()

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

References LOG_MODULE, xine_nbc_close(), XINE_VERBOSITY_DEBUG, and xprintf.

Referenced by stdin_class_get_instance().

## ◆ stdin_plugin_get_capabilities()

static uint32_t stdin_plugin_get_capabilities | ( | input_plugin_t * | this_gen | ) |
| static

References INPUT_CAP_NO_CACHE, INPUT_CAP_PREVIEW, and INPUT_CAP_SIZED_PREVIEW.

Referenced by stdin_class_get_instance().

## ◆ stdin_plugin_get_current_pos()

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

Referenced by stdin_class_get_instance().

## ◆ stdin_plugin_get_length()

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

Referenced by stdin_class_get_instance().

## ◆ stdin_plugin_get_mrl()

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

Referenced by stdin_class_get_instance().

## ◆ stdin_plugin_get_optional_data()

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

References INPUT_OPTIONAL_DATA_PREVIEW, INPUT_OPTIONAL_DATA_SIZED_PREVIEW, and INPUT_OPTIONAL_UNSUPPORTED.

Referenced by stdin_class_get_instance().

## ◆ stdin_plugin_init_class()

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

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

## ◆ stdin_plugin_open()

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

References _, _x_freep(), FILE_FLAGS, lprintf, MAX_PREVIEW_SIZE, mode(), RING_SIZE, stdin_plugin_read(), xine_open_cloexec(), XINE_VERBOSITY_LOG, and xprintf.

Referenced by stdin_class_get_instance().

## ◆ stdin_plugin_read()

static off_t stdin_plugin_read | ( | input_plugin_t * | this_gen,
|  | void * | buf_gen,
|  | off_t | len )
| static

References _x_message(), LOG_MODULE, lprintf, NULL, RING_MASK, RING_SIZE, stdin_plugin_wait(), xine_fast_memcpy, XINE_MSG_FILE_NOT_FOUND, XINE_MSG_PERMISSION_ERROR, XINE_MSG_READ_ERROR, XINE_VERBOSITY_LOG, XIO_READY, and xprintf.

Referenced by stdin_class_get_instance(), and stdin_plugin_open().

## ◆ stdin_plugin_seek()

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

References _x_input_seek_preview(), and lprintf.

Referenced by stdin_class_get_instance().

## ◆ stdin_plugin_wait()

static int stdin_plugin_wait | ( | stdin_input_plugin_t * | this | ) |
| static

References _x_io_select(), _x_message(), _x_query_network_timeout(), LOG_MODULE, NULL, XINE_MSG_READ_ERROR, XINE_VERBOSITY_DEBUG, XINE_VERBOSITY_LOG, XIO_ABORTED, XIO_READ_READY, XIO_READY, XIO_TIMEOUT, and xprintf.

Referenced by stdin_plugin_read().

## Variable Documentation

## ◆ EXPORTED

const plugin_info_t xine_plugin_info [] EXPORTED

Initial value:
= {
{ PLUGIN_INPUT, 18, "stdin", XINE_VERSION_CODE, NULL, stdin_plugin_init_class } ,
{ PLUGIN_NONE, 0, NULL, 0, NULL, NULL }
}
stdin_plugin_init_class
static void * stdin_plugin_init_class(xine_t *xine, const void *data)
Definition input_stdin_fifo.c:488
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