xine-lib 1.2.11
Data Structures | Macros | Functions | Variables
input_file.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <fcntl.h>
#include <string.h>
#include <errno.h>
#include <xine/xine_internal.h>
#include <xine/xineutils.h>
#include <xine/compat.h>
#include <xine/input_plugin.h>
#include "input_helper.h"

Data Structures

struct  file_input_class_t
 
struct  file_input_plugin_t
 

Macros

#define LOG_MODULE   "input_file"
 
#define LOG_VERBOSE
 
#define MAXFILES   65535
 
#define O_BINARY   0
 
#define S_ISLNK(mode)   0
 
#define S_ISFIFO(mode)   0
 
#define S_ISSOCK(mode)   0
 
#define S_ISCHR(mode)   0
 
#define S_ISBLK(mode)   0
 
#define S_ISREG(mode)   0
 
#define S_IXUGO   (S_IXUSR | S_IXGRP | S_IXOTH)
 
#define S_N   0x0
 
#define S_I   0x4
 
#define S_F   0x8
 
#define S_Z   0xC
 
#define CMP   2
 
#define LEN   3
 
#define ISDIGIT(c)   ((unsigned) (c) - '0' <= 9)
 
#define INPUT_FILE_CATALOG   { PLUGIN_INPUT | PLUGIN_MUST_PRELOAD, 18, "FILE", XINE_VERSION_CODE, NULL, file_input_init_plugin }
 

Functions

static uint32_t file_input_get_capabilities (input_plugin_t *this_gen)
 
static off_t file_input_read (input_plugin_t *this_gen, void *buf, off_t len)
 
static buf_element_tfile_input_read_block (input_plugin_t *this_gen, fifo_buffer_t *fifo, off_t todo)
 
static off_t file_input_seek (input_plugin_t *this_gen, off_t offset, int origin)
 
static off_t file_input_get_current_pos (input_plugin_t *this_gen)
 
static off_t file_input_get_length (input_plugin_t *this_gen)
 
static int file_input_is_dir (const char *filepathname)
 
static const char * file_input_get_mrl (input_plugin_t *this_gen)
 
static void file_input_dispose (input_plugin_t *this_gen)
 
static char * file_input_decode_uri (char *uri)
 
static int file_input_open (input_plugin_t *this_gen)
 
static int file_input_get_optional_data (input_plugin_t *this_gen, void *data, int data_type)
 
static input_plugin_tfile_input_get_instance (input_class_t *cls_gen, xine_stream_t *stream, const char *mrl)
 
static void file_input_origin_change_cb (void *data, xine_cfg_entry_t *cfg)
 
static int file_input_strverscmp (const char *s1, const char *s2)
 
static int file_input_sortfiles_default (const xine_mrl_t *s1, const xine_mrl_t *s2)
 
static uint32_t file_input_get_file_type (char *filepathname, char *origin, xine_t *xine)
 
static off_t file_input_get_file_size (const char *filepathname, const char *origin)
 
static xine_mrl_t ** file_input_class_get_dir (input_class_t *this_gen, const char *filename, int *nFiles)
 
static void file_input_class_dispose (input_class_t *this_gen)
 
static void * file_input_init_plugin (xine_t *xine, const void *data)
 

Variables

const plugin_info_t xine_plugin_info[] EXPORTED
 

Macro Definition Documentation

◆ CMP

#define CMP   2

◆ INPUT_FILE_CATALOG

#define INPUT_FILE_CATALOG   { PLUGIN_INPUT | PLUGIN_MUST_PRELOAD, 18, "FILE", XINE_VERSION_CODE, NULL, file_input_init_plugin }

◆ ISDIGIT

#define ISDIGIT (   c)    ((unsigned) (c) - '0' <= 9)

◆ LEN

#define LEN   3

◆ LOG_MODULE

#define LOG_MODULE   "input_file"

◆ LOG_VERBOSE

#define LOG_VERBOSE

◆ MAXFILES

#define MAXFILES   65535

◆ O_BINARY

#define O_BINARY   0

◆ S_F

#define S_F   0x8

◆ S_I

#define S_I   0x4

◆ S_ISBLK

#define S_ISBLK (   mode)    0

◆ S_ISCHR

#define S_ISCHR (   mode)    0

◆ S_ISFIFO

#define S_ISFIFO (   mode)    0

◆ S_ISLNK

#define S_ISLNK (   mode)    0

◆ S_ISREG

#define S_ISREG (   mode)    0

◆ S_ISSOCK

#define S_ISSOCK (   mode)    0

◆ S_IXUGO

#define S_IXUGO   (S_IXUSR | S_IXGRP | S_IXOTH)

◆ S_N

#define S_N   0x0

◆ S_Z

#define S_Z   0xC

Function Documentation

◆ file_input_class_dispose()

static void file_input_class_dispose ( input_class_t this_gen)
static

◆ file_input_class_get_dir()

static xine_mrl_t ** file_input_class_get_dir ( input_class_t this_gen,
const char *  filename,
int *  nFiles 
)
static

◆ file_input_decode_uri()

static char * file_input_decode_uri ( char *  uri)
static

References _x_mrl_unescape().

Referenced by file_input_open().

◆ file_input_dispose()

static void file_input_dispose ( input_plugin_t this_gen)
static

References _x_freep().

Referenced by file_input_get_instance().

◆ file_input_get_capabilities()

static uint32_t file_input_get_capabilities ( input_plugin_t this_gen)
static

◆ file_input_get_current_pos()

static off_t file_input_get_current_pos ( input_plugin_t this_gen)
static

Referenced by file_input_get_instance().

◆ file_input_get_file_size()

static off_t file_input_get_file_size ( const char *  filepathname,
const char *  origin 
)
static

References XINE_NAME_MAX, and XINE_PATH_MAX.

Referenced by file_input_class_get_dir().

◆ file_input_get_file_type()

static uint32_t file_input_get_file_type ( char *  filepathname,
char *  origin,
xine_t xine 
)
static

◆ file_input_get_instance()

static input_plugin_t * file_input_get_instance ( input_class_t cls_gen,
xine_stream_t stream,
const char *  mrl 
)
static

◆ file_input_get_length()

static off_t file_input_get_length ( input_plugin_t this_gen)
static

◆ file_input_get_mrl()

static const char * file_input_get_mrl ( input_plugin_t this_gen)
static

Referenced by file_input_get_instance().

◆ file_input_get_optional_data()

static int file_input_get_optional_data ( input_plugin_t this_gen,
void *  data,
int  data_type 
)
static

◆ file_input_init_plugin()

static void * file_input_init_plugin ( xine_t xine,
const void *  data 
)
static

◆ file_input_is_dir()

static int file_input_is_dir ( const char *  filepathname)
static

◆ file_input_open()

static int file_input_open ( input_plugin_t this_gen)
static

◆ file_input_origin_change_cb()

static void file_input_origin_change_cb ( void *  data,
xine_cfg_entry_t cfg 
)
static

◆ file_input_read()

static off_t file_input_read ( input_plugin_t this_gen,
void *  buf,
off_t  len 
)
static

Referenced by file_input_get_instance().

◆ file_input_read_block()

static buf_element_t * file_input_read_block ( input_plugin_t this_gen,
fifo_buffer_t fifo,
off_t  todo 
)
static

◆ file_input_seek()

static off_t file_input_seek ( input_plugin_t this_gen,
off_t  offset,
int  origin 
)
static

Referenced by file_input_get_instance().

◆ file_input_sortfiles_default()

static int file_input_sortfiles_default ( const xine_mrl_t s1,
const xine_mrl_t s2 
)
static

◆ file_input_strverscmp()

static int file_input_strverscmp ( const char *  s1,
const char *  s2 
)
static

References CMP, ISDIGIT, LEN, S_F, S_I, S_N, and S_Z.

Referenced by file_input_sortfiles_default().

Variable Documentation

◆ EXPORTED

const plugin_info_t xine_plugin_info [] EXPORTED
Initial value:
= {
{ PLUGIN_NONE, 0, NULL, 0, NULL, NULL }
}
static void * file_input_init_plugin(xine_t *xine, const void *data)
Definition: input_file.c:946
#define XINE_VERSION_CODE
Definition: xine_internal.h:57
NULL
Definition: xine_plugin.c:78
#define PLUGIN_NONE
Definition: xine_plugin.h:29
#define PLUGIN_MUST_PRELOAD
Definition: xine_plugin.h:46
#define PLUGIN_INPUT
Definition: xine_plugin.h:30