xine-lib 1.2.13-20230125hg15249
Data Structures | Macros | Functions | Variables
input_test.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <unistd.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 <xine/video_out.h>
#include "input_helper.h"

Data Structures

struct  test_input_class_t
 
struct  test_input_plugin_t
 

Macros

#define LOG_MODULE   "input_test"
 
#define LOG_VERBOSE
 
#define TEST_FILES   ((sizeof (test_names) / sizeof (char *)) - 1)
 
#define SSHIFT   17
 
#define SFACTOR   (1 << SSHIFT)
 
#define INPUT_TEST_CATALOG   { PLUGIN_INPUT | PLUGIN_MUST_PRELOAD, 18, "TEST", XINE_VERSION_CODE, &input_info_test, test_init_plugin }
 

Functions

static void put32le (unsigned int v, unsigned char *p)
 
static unsigned int isqr (unsigned int v)
 
static int iatan (int x, int y)
 
static int adiff (int a, int b)
 
static void render_parallelogram (unsigned char *buf, int buf_width, int buf_height, unsigned int gray, int x, int y, int width, int height, int slant, int sc)
 
static void render_turn (unsigned char *buf, int buf_width, int buf_height, unsigned int gray, int x, int y, int size, int quad)
 
static void render_xine_logo (unsigned char *buf, int buf_width, int buf_height, unsigned int gray)
 
static int test_make (test_input_plugin_t *this)
 
static off_t test_plugin_read (input_plugin_t *this_gen, void *buf, off_t len)
 
static off_t test_plugin_seek (input_plugin_t *this_gen, off_t offset, int origin)
 
static off_t test_plugin_get_current_pos (input_plugin_t *this_gen)
 
static off_t test_plugin_get_length (input_plugin_t *this_gen)
 
static const char * test_plugin_get_mrl (input_plugin_t *this_gen)
 
static void test_plugin_dispose (input_plugin_t *this_gen)
 
static int test_plugin_open (input_plugin_t *this_gen)
 
static input_plugin_ttest_class_get_instance (input_class_t *cls_gen, xine_stream_t *stream, const char *data)
 
static const char *const * test_get_autoplay_list (input_class_t *this_gen, int *num_files)
 
static xine_mrl_t ** test_class_get_dir (input_class_t *this_gen, const char *filename, int *nFiles)
 
static void test_class_dispose (input_class_t *this_gen)
 
static void * test_init_plugin (xine_t *xine, const void *data)
 

Variables

static const char *const test_names []
 
static const char test_type [] = {2, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 2}
 
static const char test_is_yuv [] = {0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1}
 
static const char test_is_mpeg_range [] = {0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0}
 
static const input_info_t input_info_test
 
const plugin_info_t xine_plugin_info[] EXPORTED
 

Macro Definition Documentation

◆ INPUT_TEST_CATALOG

#define INPUT_TEST_CATALOG   { PLUGIN_INPUT | PLUGIN_MUST_PRELOAD, 18, "TEST", XINE_VERSION_CODE, &input_info_test, test_init_plugin }

◆ LOG_MODULE

#define LOG_MODULE   "input_test"

◆ LOG_VERBOSE

#define LOG_VERBOSE

◆ SFACTOR

#define SFACTOR   (1 << SSHIFT)

◆ SSHIFT

#define SSHIFT   17

◆ TEST_FILES

#define TEST_FILES   ((sizeof (test_names) / sizeof (char *)) - 1)

Function Documentation

◆ adiff()

static int adiff ( int a,
int b )
static

Referenced by test_make().

◆ iatan()

static int iatan ( int x,
int y )
static

References v.

Referenced by test_make().

◆ isqr()

static unsigned int isqr ( unsigned int v)
static

References v.

Referenced by render_parallelogram(), and test_make().

◆ put32le()

static void put32le ( unsigned int v,
unsigned char * p )
static

References v.

Referenced by test_make().

◆ render_parallelogram()

static void render_parallelogram ( unsigned char * buf,
int buf_width,
int buf_height,
unsigned int gray,
int x,
int y,
int width,
int height,
int slant,
int sc )
static

References height, isqr(), and width.

Referenced by render_xine_logo().

◆ render_turn()

static void render_turn ( unsigned char * buf,
int buf_width,
int buf_height,
unsigned int gray,
int x,
int y,
int size,
int quad )
static

Referenced by render_xine_logo().

◆ render_xine_logo()

static void render_xine_logo ( unsigned char * buf,
int buf_width,
int buf_height,
unsigned int gray )
static

References height, render_parallelogram(), render_turn(), and width.

Referenced by test_make().

◆ test_class_dispose()

static void test_class_dispose ( input_class_t * this_gen)
static

Referenced by test_init_plugin().

◆ test_class_get_dir()

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

◆ test_class_get_instance()

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

◆ test_get_autoplay_list()

static const char *const * test_get_autoplay_list ( input_class_t * this_gen,
int * num_files )
static

References TEST_FILES, and test_names.

Referenced by test_init_plugin().

◆ test_init_plugin()

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

◆ test_make()

static int test_make ( test_input_plugin_t * this)
static

◆ test_plugin_dispose()

static void test_plugin_dispose ( input_plugin_t * this_gen)
static

Referenced by test_class_get_instance().

◆ test_plugin_get_current_pos()

static off_t test_plugin_get_current_pos ( input_plugin_t * this_gen)
static

Referenced by test_class_get_instance().

◆ test_plugin_get_length()

static off_t test_plugin_get_length ( input_plugin_t * this_gen)
static

Referenced by test_class_get_instance().

◆ test_plugin_get_mrl()

static const char * test_plugin_get_mrl ( input_plugin_t * this_gen)
static

References test_names.

Referenced by test_class_get_instance().

◆ test_plugin_open()

static int test_plugin_open ( input_plugin_t * this_gen)
static

References test_make().

Referenced by test_class_get_instance().

◆ test_plugin_read()

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

References test_is_yuv, and xine_fast_memcpy.

Referenced by test_class_get_instance().

◆ test_plugin_seek()

static off_t test_plugin_seek ( input_plugin_t * this_gen,
off_t offset,
int origin )
static

Variable Documentation

◆ EXPORTED

const plugin_info_t xine_plugin_info [] EXPORTED
Initial value:
= {
{ PLUGIN_NONE, 0, NULL, 0, NULL, NULL }
}
static const input_info_t input_info_test
Definition input_test.c:739
static void * test_init_plugin(xine_t *xine, const void *data)
Definition input_test.c:718
#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

◆ input_info_test

const input_info_t input_info_test
static
Initial value:
= {
.priority = 110
}

◆ test_is_mpeg_range

const char test_is_mpeg_range[] = {0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0}
static

Referenced by test_make().

◆ test_is_yuv

const char test_is_yuv[] = {0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1}
static

Referenced by test_make(), and test_plugin_read().

◆ test_names

const char* const test_names[]
static
Initial value:
= {
"test://",
"test://color_circle.bmp",
"test://rgb_levels.bmp",
"test://saturation_levels.bmp",
"test://uv_square.bmp",
"test://y_resolution.bmp",
"test://color_circle.y4m",
"test://rgb_levels.y4m",
"test://saturation_levels.y4m",
"test://uv_square.y4m",
"test://y_resolution.y4m",
"test://rgb_levels_fullrange.y4m",
}

Referenced by test_class_get_dir(), test_class_get_instance(), test_get_autoplay_list(), and test_plugin_get_mrl().

◆ test_type

const char test_type[] = {2, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 2}
static

Referenced by test_make().