xine-lib: xine-lib-1.2.12/src/input/vcd/vcdio.c File Reference

xine-lib 1.2.12

Macros | Functions
vcdio.c File Reference
`#include <stdio.h>`
`#include <stdlib.h>`
`#include <sys/types.h>`
`#include <sys/stat.h>`
`#include <unistd.h>`
`#include <fcntl.h>`
`#include <time.h>`
`#include <string.h>`
`#include <errno.h>`
`#include "libvcd/types.h"`
`#include "libvcd/files.h"`
`#include "cdio/iso9660.h"`
`#include "vcdplayer.h"`
`#include "vcdio.h"`

## Macros
#define | LOG_ERR(p_vcdplayer, s, args...)
#define | dbg_print(p_vcdplayer, mask, s, args...)
#define | FREE_AND_NULL(ptr) if (NULL != ptr) free(ptr); ptr = NULL;

## Functions
int | vcdio_close (vcdplayer_t *p_vcdplayer)
bool | vcdio_open (vcdplayer_t *p_vcdplayer, char *intended_vcd_device)
off_t | vcdio_seek (vcdplayer_t *p_vcdplayer, off_t offset, int origin)

## Macro Definition Documentation

## ◆ dbg_print

#define dbg_print | ( |  | p_vcdplayer,
|  |  | mask,
|  |  | s,
|  |  | args...
| ) |  |

Value:
if (p_vcdplayer->log_msg) \
p_vcdplayer->log_msg (p_vcdplayer->user_data, mask, "%s: "s, __func__ , ##args)

## ◆ FREE_AND_NULL

#define FREE_AND_NULL | ( |  | ptr | ) | if (NULL != ptr) free(ptr); ptr = NULL;

## ◆ LOG_ERR

#define LOG_ERR | ( |  | p_vcdplayer,
|  |  | s,
|  |  | args...
| ) |  |

Value:
if (p_vcdplayer->log_err) \
p_vcdplayer->log_err (p_vcdplayer->user_data, ~0, "%s: "s, __func__ , ##args)

## Function Documentation

## ◆ vcdio_close()

int vcdio_close | ( | vcdplayer_t * | p_vcdplayer | ) |

Closes VCD device specified via "this", and also wipes memory of it from it inside "this".

References vcdplayer_s::b_opened, vcdplayer_s::entry, FREE_AND_NULL, vcdplayer_s::psz_source, vcdplayer_s::segment, vcdplayer_s::track, and vcdplayer_s::vcd.

Referenced by vcd_build_mrl_list(), vcd_class_eject_media(), vcd_class_get_instance(), vcd_close(), vcd_plugin_dispose(), and vcdio_open().

## ◆ vcdio_open()

bool vcdio_open | ( | vcdplayer_t * | p_vcdplayer,
|  | char * | intended_vcd_device
| ) |  |

Opens VCD device and initializes things.

- do nothing if the device had already been open and is the same device.
- if the device had been open and is a different, close it before trying to open new device.

References vcdplayer_s::b_opened, dbg_print, vcdplayer_s::entry, vcdplayer_s::i_entries, vcdplayer_s::i_lids, vcdplayer_s::i_segments, vcdplayer_s::i_still, vcdplayer_s::i_tracks, INPUT_DBG_CALL, NULL, vcdplayer_s::psz_source, vcdplayer_s::segment, vcdplayer_play_item_info_t::size, vcdplayer_play_item_info_t::start_LSN, vcdplayer_s::track, vcdplayer_s::vcd, vcdplayer_s::vcd_format, and vcdio_close().

Referenced by vcd_build_mrl_list(), and vcd_plugin_read_block().

## ◆ vcdio_seek()

off_t vcdio_seek | ( | vcdplayer_t * | p_vcdplayer,
|  | off_t | offset,
|  | int | origin
| ) |  |

seek position, return new position

if seeking failed, -1 is returned

References _, dbg_print, vcdplayer_s::i_lsn, INPUT_DBG_SEEK_CUR, INPUT_DBG_SEEK_SET, LOG_ERR, vcdplayer_s::next_entry, vcdplayer_s::origin_lsn, vcdplayer_s::play_item, vcdplayer_s::slider_length, vcdplayer_s::track_lsn, vcdplayer_pbc_is_on(), and VCDPLAYER_SLIDER_LENGTH_TRACK.

Referenced by vcd_plugin_seek().