xine-lib 1.2.13-20230125hg15249
Data Structures | Macros | Typedefs | Functions | Variables
input_dvd.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <stddef.h>
#include <sys/param.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <pthread.h>
#include <fcntl.h>
#include <time.h>
#include <string.h>
#include <errno.h>
#include <dlfcn.h>
#include <sys/mount.h>
#include <sys/wait.h>
#include <sys/poll.h>
#include <sys/ioctl.h>
#include "libdvdnav/dvdnav.h"
#include "libdvdnav/nav_read.h"
#include <xine/xineutils.h>
#include <xine/buffer.h>
#include <xine/xine_internal.h>
#include "media_helper.h"

Data Structures

union  dvd_input_saved_buf_u
 
struct  dvd_input_plugin_s
 
struct  dvd_input_class_t
 

Macros

#define DVDNAV_COMPILE
 
#define LOG_MODULE   "input_http"
 
#define LOG_VERBOSE
 
#define MODE_FAIL   0
 
#define MODE_NAVIGATE   1
 
#define MODE_TITLE   2
 
#define CAN_SEEK   1
 
#define DVD_PATH   "/dev/dvd"
 
#define RDVD_PATH   "/dev/rdvd"
 
#define DVD_BLOCK_SIZE   2048
 
#define PTR_ALIGN(p, align)   ((void*)(((uintptr_t)(p) + (align) - 1) & ~((uintptr_t)(align)-1)))
 

Typedefs

typedef struct dvd_input_plugin_s dvd_input_plugin_t
 
typedef union dvd_input_saved_buf_u dvd_input_saved_buf_t
 

Functions

static int dvd_input_saved_new (dvd_input_plugin_t *this)
 
static void dvd_input_saved_delete (dvd_input_plugin_t *this)
 
static dvd_input_saved_buf_tdvd_input_saved_acquire (dvd_input_plugin_t *this)
 
static int dvd_input_saved_release (dvd_input_plugin_t *this, dvd_input_saved_buf_t *s)
 
static void dvd_handle_events (dvd_input_plugin_t *this)
 
static void xine_dvd_send_button_update (dvd_input_plugin_t *this, int mode)
 
static void device_change_cb (void *data, xine_cfg_entry_t *cfg)
 
static uint32_t dvd_plugin_get_capabilities (input_plugin_t *this_gen)
 
static void apply_cfg (dvd_input_plugin_t *this)
 
static void update_cfg (dvd_input_plugin_t *this)
 
static void read_ahead_cb (void *this_gen, xine_cfg_entry_t *entry)
 
static void seek_mode_cb (void *this_gen, xine_cfg_entry_t *entry)
 
static void region_changed_cb (void *this_gen, xine_cfg_entry_t *entry)
 
static void language_changed_cb (void *this_gen, xine_cfg_entry_t *entry)
 
static void play_single_chapter_cb (void *this_gen, xine_cfg_entry_t *entry)
 
static void skip_changed_cb (void *this_gen, xine_cfg_entry_t *entry)
 
static void send_mouse_enter_leave_event (dvd_input_plugin_t *this, int direction)
 
static int update_title_display (dvd_input_plugin_t *this)
 
static void dvd_plugin_dispose (input_plugin_t *this_gen)
 
static void dvd_plugin_free_buffer (buf_element_t *buf)
 
static buf_element_tdvd_plugin_read_block (input_plugin_t *this_gen, fifo_buffer_t *fifo, off_t nlen)
 
static off_t dvd_plugin_read (input_plugin_t *this_gen, void *buf_gen, off_t len)
 
static off_t dvd_plugin_get_current_pos (input_plugin_t *this_gen)
 
static off_t dvd_plugin_seek (input_plugin_t *this_gen, off_t offset, int origin)
 
static off_t dvd_plugin_seek_time (input_plugin_t *this_gen, int time_offset, int origin)
 
static off_t dvd_plugin_get_length (input_plugin_t *this_gen)
 
static uint32_t dvd_plugin_get_blocksize (input_plugin_t *this_gen)
 
static const char * dvd_plugin_get_mrl (input_plugin_t *this_gen)
 
static int dvd_plugin_get_optional_data (input_plugin_t *this_gen, void *data, int data_type)
 
static int dvd_parse_try_open (dvd_input_plugin_t *this, const char *locator)
 
static int dvd_parse_mrl (dvd_input_plugin_t *this)
 
static int dvd_plugin_open (input_plugin_t *this_gen)
 
static input_plugin_tdvd_class_get_instance (input_class_t *class_gen, xine_stream_t *stream, const char *data)
 
static const char *const * dvd_class_get_autoplay_list (input_class_t *this_gen, int *num_files)
 
static void dvd_class_dispose (input_class_t *this_gen)
 
static int dvd_class_eject_media (input_class_t *this_gen)
 
static void * init_class (xine_t *xine, const void *data)
 

Variables

static const char *const dvdnav_menu_table []
 
const plugin_info_t xine_plugin_info[] EXPORTED
 

Macro Definition Documentation

◆ CAN_SEEK

#define CAN_SEEK   1

◆ DVD_BLOCK_SIZE

#define DVD_BLOCK_SIZE   2048

◆ DVD_PATH

#define DVD_PATH   "/dev/dvd"

Referenced by init_class().

◆ DVDNAV_COMPILE

#define DVDNAV_COMPILE

◆ LOG_MODULE

#define LOG_MODULE   "input_http"

◆ LOG_VERBOSE

#define LOG_VERBOSE

◆ MODE_FAIL

#define MODE_FAIL   0

Referenced by dvd_parse_mrl(), and dvd_plugin_open().

◆ MODE_NAVIGATE

#define MODE_NAVIGATE   1

Referenced by dvd_parse_mrl(), and dvd_plugin_open().

◆ MODE_TITLE

#define MODE_TITLE   2

◆ PTR_ALIGN

#define PTR_ALIGN ( p,
align )   ((void*)(((uintptr_t)(p) + (align) - 1) & ~((uintptr_t)(align)-1)))

◆ RDVD_PATH

#define RDVD_PATH   "/dev/rdvd"

Typedef Documentation

◆ dvd_input_plugin_t

◆ dvd_input_saved_buf_t

Function Documentation

◆ apply_cfg()

static void apply_cfg ( dvd_input_plugin_t * this)
static

◆ device_change_cb()

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

◆ dvd_class_dispose()

static void dvd_class_dispose ( input_class_t * this_gen)
static

◆ dvd_class_eject_media()

static int dvd_class_eject_media ( input_class_t * this_gen)
static

◆ dvd_class_get_autoplay_list()

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

References lprintf, and NULL.

Referenced by init_class().

◆ dvd_class_get_instance()

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

◆ dvd_handle_events()

static void dvd_handle_events ( dvd_input_plugin_t * this)
static

◆ dvd_input_saved_acquire()

static dvd_input_saved_buf_t * dvd_input_saved_acquire ( dvd_input_plugin_t * this)
static

◆ dvd_input_saved_delete()

static void dvd_input_saved_delete ( dvd_input_plugin_t * this)
static

References _x_freep().

Referenced by dvd_plugin_dispose(), and dvd_plugin_free_buffer().

◆ dvd_input_saved_new()

static int dvd_input_saved_new ( dvd_input_plugin_t * this)
static

◆ dvd_input_saved_release()

static int dvd_input_saved_release ( dvd_input_plugin_t * this,
dvd_input_saved_buf_t * s )
static

◆ dvd_parse_mrl()

static int dvd_parse_mrl ( dvd_input_plugin_t * this)
static

◆ dvd_parse_try_open()

static int dvd_parse_try_open ( dvd_input_plugin_t * this,
const char * locator )
static

◆ dvd_plugin_dispose()

static void dvd_plugin_dispose ( input_plugin_t * this_gen)
static

◆ dvd_plugin_free_buffer()

static void dvd_plugin_free_buffer ( buf_element_t * buf)
static

◆ dvd_plugin_get_blocksize()

static uint32_t dvd_plugin_get_blocksize ( input_plugin_t * this_gen)
static

References DVD_BLOCK_SIZE, and lprintf.

Referenced by dvd_class_get_instance().

◆ dvd_plugin_get_capabilities()

static uint32_t dvd_plugin_get_capabilities ( input_plugin_t * this_gen)
static

◆ dvd_plugin_get_current_pos()

static off_t dvd_plugin_get_current_pos ( input_plugin_t * this_gen)
static

◆ dvd_plugin_get_length()

static off_t dvd_plugin_get_length ( input_plugin_t * this_gen)
static

References DVD_BLOCK_SIZE, and lprintf.

Referenced by dvd_class_get_instance().

◆ dvd_plugin_get_mrl()

static const char * dvd_plugin_get_mrl ( input_plugin_t * this_gen)
static

References lprintf.

Referenced by dvd_class_get_instance().

◆ dvd_plugin_get_optional_data()

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

◆ dvd_plugin_open()

static int dvd_plugin_open ( input_plugin_t * this_gen)
static

◆ dvd_plugin_read()

static off_t dvd_plugin_read ( input_plugin_t * this_gen,
void * buf_gen,
off_t len )
static

Referenced by dvd_class_get_instance().

◆ dvd_plugin_read_block()

static buf_element_t * dvd_plugin_read_block ( input_plugin_t * this_gen,
fifo_buffer_t * fifo,
off_t nlen )
static

◆ dvd_plugin_seek()

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

◆ dvd_plugin_seek_time()

static off_t dvd_plugin_seek_time ( input_plugin_t * this_gen,
int time_offset,
int origin )
static

◆ init_class()

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

◆ language_changed_cb()

static void language_changed_cb ( void * this_gen,
xine_cfg_entry_t * entry )
static

◆ play_single_chapter_cb()

static void play_single_chapter_cb ( void * this_gen,
xine_cfg_entry_t * entry )
static

◆ read_ahead_cb()

static void read_ahead_cb ( void * this_gen,
xine_cfg_entry_t * entry )
static

◆ region_changed_cb()

static void region_changed_cb ( void * this_gen,
xine_cfg_entry_t * entry )
static

◆ seek_mode_cb()

static void seek_mode_cb ( void * this_gen,
xine_cfg_entry_t * entry )
static

◆ send_mouse_enter_leave_event()

static void send_mouse_enter_leave_event ( dvd_input_plugin_t * this,
int direction )
static

◆ skip_changed_cb()

static void skip_changed_cb ( void * this_gen,
xine_cfg_entry_t * entry )
static

◆ update_cfg()

static void update_cfg ( dvd_input_plugin_t * this)
static

◆ update_title_display()

static int update_title_display ( dvd_input_plugin_t * this)
static

◆ xine_dvd_send_button_update()

static void xine_dvd_send_button_update ( dvd_input_plugin_t * this,
int mode )
static

Variable Documentation

◆ dvdnav_menu_table

const char* const dvdnav_menu_table[]
static
Initial value:
= {
"Title",
"Root",
"Subpicture",
"Audio",
"Angle",
"Part"
}
NULL
Definition xine_plugin.c:78

Referenced by update_title_display().

◆ EXPORTED

const plugin_info_t xine_plugin_info [] EXPORTED
Initial value:
= {
{ PLUGIN_NONE, 0, NULL, 0, NULL, NULL }
}
static void * init_class(xine_t *xine, const void *data)
Definition input_dvd.c:1799
#define XINE_VERSION_CODE
Definition xine_internal.h:57
#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