hvirtual/libmpeg3/mpeg3ifo.c File Reference

#include <byteswap.h>
#include <dirent.h>
#include <fcntl.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <unistd.h>
#include "ifo.h"
#include "mpeg3private.h"
#include "mpeg3protos.h"

Include dependency graph for mpeg3ifo.c:

Go to the source code of this file.

Data Structures

struct  mpeg3ifo_cell_t
struct  mpeg3ifo_celltable_t
struct  cell_addr_hdr_t
struct  audio_hdr_t
struct  pgci_sub_t

Defines

#define CADDR_HDR_LEN   8
#define AUDIO_HDR_LEN   4
#define PGCI_SUB_LEN   8
#define PGCI_COLOR_LEN   4
#define OFF_PTT   get4bytes (ifo->data[ID_MAT] + 0xC8)
#define OFF_TITLE_PGCI   get4bytes (ifo->data[ID_MAT] + 0xCC)
#define OFF_MENU_PGCI   get4bytes (ifo->data[ID_MAT] + 0xD0)
#define OFF_TMT   get4bytes (ifo->data[ID_MAT] + 0xD4)
#define OFF_MENU_CELL_ADDR   get4bytes (ifo->data[ID_MAT] + 0xD8)
#define OFF_MENU_VOBU_ADDR_MAP   get4bytes (ifo->data[ID_MAT] + 0xDC)
#define OFF_TITLE_CELL_ADDR   get4bytes (ifo->data[ID_MAT] + 0xE0)
#define OFF_TITLE_VOBU_ADDR_MAP   get4bytes (ifo->data[ID_MAT] + 0xE4)
#define OFF_VMG_TSP   get4bytes (ifo->data[ID_MAT] + 0xC4)
#define OFF_VMG_MENU_PGCI   get4bytes (ifo->data[ID_MAT] + 0xC8)
#define OFF_VMG_TMT   get4bytes (ifo->data[ID_MAT] + 0xD0)
#define TEST_START   0x1000000
#define TEST_LEN   0x1000000

Functions

static u_int get4bytes (u_char *buf)
static u_int get2bytes (u_char *buf)
static int ifo_read (int fd, long pos, long count, unsigned char *data)
static int ifo_vts (ifo_t *ifo)
static int ifo_vmg (ifo_t *ifo)
static int ifo_table (ifo_t *ifo, int64_t offset, unsigned long tbl_id)
static ifo_tifo_open (int fd, long pos)
static int ifo_close (ifo_t *ifo)
static int ifo_audio (char *_hdr, char **ptr)
static int pgci (ifo_hdr_t *hdr, int title, char **ptr)
static int program_map (mpeg3_t *file, char *pgc, unsigned char **ptr)
static u_int get_cellplayinfo (u_char *pgc, u_char **ptr)
static void get_ifo_playlist (mpeg3_t *file, mpeg3_demuxer_t *demuxer)
static void get_ifo_header (mpeg3_demuxer_t *demuxer, ifo_t *ifo)
static mpeg3ifo_cell_tappend_cell (mpeg3ifo_celltable_t *table)
static void delete_celltable (mpeg3ifo_celltable_t *table)
static void cellplayinfo (mpeg3_t *file, ifo_t *ifo, mpeg3ifo_celltable_t *cells)
static void celladdresses (ifo_t *ifo, mpeg3ifo_celltable_t *cell_addresses)
static void finaltable (mpeg3ifo_celltable_t *final_cells, mpeg3ifo_celltable_t *cells, mpeg3ifo_celltable_t *cell_addresses)
int mpeg3_read_ifo (mpeg3_t *file, int read_cells)


Define Documentation

#define AUDIO_HDR_LEN   4

Definition at line 48 of file mpeg3ifo.c.

Referenced by ifo_audio().

#define CADDR_HDR_LEN   8

Definition at line 35 of file mpeg3ifo.c.

Referenced by celladdresses().

#define OFF_MENU_CELL_ADDR   get4bytes (ifo->data[ID_MAT] + 0xD8)

Definition at line 86 of file mpeg3ifo.c.

Referenced by ifo_open().

#define OFF_MENU_PGCI   get4bytes (ifo->data[ID_MAT] + 0xD0)

Definition at line 84 of file mpeg3ifo.c.

Referenced by ifo_open().

#define OFF_MENU_VOBU_ADDR_MAP   get4bytes (ifo->data[ID_MAT] + 0xDC)

Definition at line 87 of file mpeg3ifo.c.

Referenced by ifo_open().

#define OFF_PTT   get4bytes (ifo->data[ID_MAT] + 0xC8)

Definition at line 82 of file mpeg3ifo.c.

Referenced by ifo_open().

#define OFF_TITLE_CELL_ADDR   get4bytes (ifo->data[ID_MAT] + 0xE0)

Definition at line 88 of file mpeg3ifo.c.

Referenced by ifo_open().

#define OFF_TITLE_PGCI   get4bytes (ifo->data[ID_MAT] + 0xCC)

Definition at line 83 of file mpeg3ifo.c.

Referenced by ifo_open().

#define OFF_TITLE_VOBU_ADDR_MAP   get4bytes (ifo->data[ID_MAT] + 0xE4)

Definition at line 89 of file mpeg3ifo.c.

Referenced by ifo_open().

#define OFF_TMT   get4bytes (ifo->data[ID_MAT] + 0xD4)

Definition at line 85 of file mpeg3ifo.c.

Referenced by ifo_open().

#define OFF_VMG_MENU_PGCI   get4bytes (ifo->data[ID_MAT] + 0xC8)

Definition at line 92 of file mpeg3ifo.c.

Referenced by ifo_open().

#define OFF_VMG_TMT   get4bytes (ifo->data[ID_MAT] + 0xD0)

Definition at line 93 of file mpeg3ifo.c.

Referenced by ifo_open().

#define OFF_VMG_TSP   get4bytes (ifo->data[ID_MAT] + 0xC4)

Definition at line 91 of file mpeg3ifo.c.

Referenced by ifo_open().

#define PGCI_COLOR_LEN   4

Definition at line 58 of file mpeg3ifo.c.

Referenced by get_cellplayinfo().

#define PGCI_SUB_LEN   8

Definition at line 56 of file mpeg3ifo.c.

#define TEST_LEN   0x1000000

Referenced by get_ifo_header().

#define TEST_START   0x1000000

Referenced by get_ifo_header().


Function Documentation

static mpeg3ifo_cell_t* append_cell ( mpeg3ifo_celltable_t table  )  [static]

static void celladdresses ( ifo_t ifo,
mpeg3ifo_celltable_t cell_addresses 
) [static]

static void cellplayinfo ( mpeg3_t file,
ifo_t ifo,
mpeg3ifo_celltable_t cells 
) [static]

static void delete_celltable ( mpeg3ifo_celltable_t table  )  [static]

Definition at line 498 of file mpeg3ifo.c.

References mpeg3ifo_celltable_t::cells.

Referenced by mpeg3_read_ifo().

static void finaltable ( mpeg3ifo_celltable_t final_cells,
mpeg3ifo_celltable_t cells,
mpeg3ifo_celltable_t cell_addresses 
) [static]

static u_int get2bytes ( u_char *  buf  )  [static]

Definition at line 66 of file mpeg3ifo.c.

References bswap_16().

Referenced by get_cellplayinfo(), and program_map().

Here is the call graph for this function:

static u_int get4bytes ( u_char *  buf  )  [static]

Definition at line 61 of file mpeg3ifo.c.

References bswap_32().

Referenced by ifo_open(), and ifo_table().

Here is the call graph for this function:

static u_int get_cellplayinfo ( u_char *  pgc,
u_char **  ptr 
) [static]

Definition at line 319 of file mpeg3ifo.c.

References get2bytes(), and PGCI_COLOR_LEN.

Referenced by cellplayinfo().

Here is the call graph for this function:

static void get_ifo_header ( mpeg3_demuxer_t demuxer,
ifo_t ifo 
) [static]

static void get_ifo_playlist ( mpeg3_t file,
mpeg3_demuxer_t demuxer 
) [static]

static int ifo_audio ( char *  _hdr,
char **  ptr 
) [static]

Definition at line 230 of file mpeg3ifo.c.

References AUDIO_HDR_LEN, bswap_16(), and audio_hdr_t::num.

Referenced by get_ifo_header().

Here is the call graph for this function:

static int ifo_close ( ifo_t ifo  )  [static]

static ifo_t* ifo_open ( int  fd,
long  pos 
) [static]

static int ifo_read ( int  fd,
long  pos,
long  count,
unsigned char *  data 
) [static]

Definition at line 71 of file mpeg3ifo.c.

Referenced by ifo_open(), and ifo_table().

static int ifo_table ( ifo_t ifo,
int64_t  offset,
unsigned long  tbl_id 
) [static]

Definition at line 113 of file mpeg3ifo.c.

References bswap_32(), ifo_t::data, DVD_VIDEO_LB_LEN, ifo_t::fd, get4bytes(), ID_MENU_VOBU_ADDR_MAP, ID_TITLE_VOBU_ADDR_MAP, ID_TMT, ifo_read(), ifo_hdr_t::len, and ifo_t::pos.

Referenced by ifo_open().

Here is the call graph for this function:

static int ifo_vmg ( ifo_t ifo  )  [static]

Definition at line 105 of file mpeg3ifo.c.

References ifo_t::data, and ID_MAT.

Referenced by get_ifo_header(), and ifo_open().

static int ifo_vts ( ifo_t ifo  )  [static]

Definition at line 96 of file mpeg3ifo.c.

References ifo_t::data, and ID_MAT.

Referenced by get_ifo_header(), and ifo_open().

int mpeg3_read_ifo ( mpeg3_t file,
int  read_cells 
)

static int pgci ( ifo_hdr_t hdr,
int  title,
char **  ptr 
) [static]

Definition at line 242 of file mpeg3ifo.c.

References bswap_32(), IFO_HDR_LEN, ifo_hdr_t::num, and pgci_sub_t::start.

Referenced by cellplayinfo().

Here is the call graph for this function:

static int program_map ( mpeg3_t file,
char *  pgc,
unsigned char **  ptr 
) [static]

Definition at line 261 of file mpeg3ifo.c.

References b, CLAMP, get2bytes(), mpeg3_t::have_palette, mpeg3_t::palette, and r.

Referenced by cellplayinfo().

Here is the call graph for this function:


Generated on Mon Apr 28 13:59:21 2008 for Cinelerra by  doxygen 1.5.5