Code Search for Developers
 
 
  

subreader.h from The Open2x Project at Krugle


Show subreader.h syntax highlighted

/*              
 *  Original code routine from Mplayer < www.mplayerhq.hu >             
 *
 *  - godori <ghcstop>, www.aesop-embedded.org
 *    => Modified. Jan, 2005
 *
 *    => DIGNSYS Inc. < www.dignsys.com > developing from April 2005
 *
 */

#ifndef __MPLAYER_SUBREADER_H
#    define __MPLAYER_SUBREADER_H

#    include <stdio.h>

extern int      suboverlap_enabled;
extern int      sub_no_text_pp; 
extern int      sub_match_fuzziness;


#    define SUB_INVALID   -1
#    define SUB_MICRODVD  0
#    define SUB_SUBRIP    1
#    define SUB_SUBVIEWER 2
#    define SUB_SAMI      3
#    define SUB_VPLAYER   4
#    define SUB_RT        5
#    define SUB_SSA       6
#    define SUB_PJS       7
#    define SUB_MPSUB     8
#    define SUB_AQTITLE   9
#    define SUB_SUBVIEWER2 10
#    define SUB_SUBRIP09 11
#    define SUB_JACOSUB  12
#    define SUB_MPL2     13


extern int      sub_format;

#    define MAX_SUBTITLE_FILES 128

#    define SUB_MAX_TEXT 10
#    define SUB_ALIGNMENT_BOTTOMLEFT       1
#    define SUB_ALIGNMENT_BOTTOMCENTER     2
#    define SUB_ALIGNMENT_BOTTOMRIGHT      3
#    define SUB_ALIGNMENT_MIDDLELEFT       4
#    define SUB_ALIGNMENT_MIDDLECENTER     5
#    define SUB_ALIGNMENT_MIDDLERIGHT      6
#    define SUB_ALIGNMENT_TOPLEFT          7
#    define SUB_ALIGNMENT_TOPCENTER        8
#    define SUB_ALIGNMENT_TOPRIGHT         9

typedef struct
{

    int             lines;

    unsigned long   start;
    unsigned long   end;

    char           *text[SUB_MAX_TEXT];
    unsigned char   alignment;
} subtitle;

typedef struct
{
    subtitle       *subtitles;
    char           *filename;
    int             sub_uses_time;
    int             sub_num;    
    int             sub_errs;
} sub_data;

#    ifdef  USE_FRIBIDI
extern char    *fribidi_charset;
extern int      flip_hebrew;
extern int      fribidi_flip_commas;
#    endif

sub_data       *sub_read_file(char *filename, float pts);
subtitle       *subcp_recode1(subtitle * sub);



void            subcp_open(FILE * enca_fd); 
void            subcp_close(void);  

#    ifdef HAVE_ENCA
void           	*guess_cp(FILE * enca_fd, char *preferred_language, char *fallback);
#    endif
char          	**sub_filenames(char *path, char *fname);
void            list_sub_file(sub_data * subd);
void            dump_srt(sub_data * subd, float fps);
void            dump_mpsub(sub_data * subd, float fps);
void            dump_microdvd(sub_data * subd, float fps);
void            dump_jacosub(sub_data * subd, float fps);
void            dump_sami(sub_data * subd, float fps);
void            sub_free(sub_data * subd);
inline void     find_sub(sub_data * subd, int key); 
void            step_sub(sub_data * subd, float pts, int movement);
#endif




See more files for this project here

The Open2x Project

The Open2x project exists to provide an open source resource for the GP2X handheld console based on the MagicEyes MMSP2 processing platform and MP2520F SoC. The project hosts Linux kernel source for the GP2X, boot loader (U-Boot) source and more.

Project homepage: http://www.distant-earth.com/open2x
Programming language(s): Assembly,C,C++
License: other

  default_skin/
    asf.png
    avi.png
    body.png
    dat.png
    downarrow.png
    error.png
    ext.png
    ext_on.png
    folder.png
    full.png
    loading.png
    mpg.png
    nand.png
    nand_on.png
    normal.png
    resume.png
    save.png
    sd.png
    sd_on.png
    selectbar.png
    uparrow.png
    wmv.png
  etc/
    codecs.conf
    dvb-menu.conf
    example.conf
    input.conf
    inttypes.h
    menu.conf
    mplayer.desktop
    mplayer.ico
  fbdisp/
    Makefile
    fblin16.c
    fblin24.c
    fblin32.c
    fbs.h
    fontdisp.h
    fontout.c
    gfxdev.h
    gfxfontext.c
    gfxfontload.c
    gfxfontout.c
    gfxtype.h
    gulim_96_10_eng.c
    gulim_96_10_han.c
    main.c
    scr_fb.c
  help/
    help_diff.sh
    help_mp-bg.h
    help_mp-cs.h
    help_mp-de.h
    help_mp-dk.h
    help_mp-el.h
    help_mp-en.h
    help_mp-es.h
    help_mp-fr.h
    help_mp-hu.h
    help_mp-it.h
    help_mp-ja.h
    help_mp-ko.h
    help_mp-mk.h
    help_mp-nl.h
    help_mp-no.h
    help_mp-pl.h
    help_mp-pt_BR.h
    help_mp-ro.h
    help_mp-ru.h
  libaf/
  libao2/
  libmpcodecs/
  libmpdemux/
  loader/
  osdep/
  AUTHORS
  DirDisplay.c
  DirDisplay.h
  DirList.c
  DirList.h
  FontDisplay.c
  FontDisplay.h
  LICENSE
  Makefile
  bswap.h
  codec-cfg.c
  codec-cfg.h
  config.h
  config.mak
  csource.lst
  cx25874.h
  drawcontrol.c
  drawcontrol.h
  dualcpu.h
  filelistview.c
  filelistview.h
  find_sub.c
  g2player.h
  get_path.c
  glock.c
  glock.h
  guictrl.c
  guictrl.h
  gv.c
  gvlib_export.h
  help_mp.h
  i2c.h
  imgNumber.h
  imgbinary.h
  m_config.c
  m_config.h
  m_option.c
  m_option.h
  m_struct.c
  m_struct.h
  mangle.h
  mixer.c
  mixer.h
  mmsp2_940_if.c
  mmsp2_if.h
  mp_msg.c
  mp_msg.h
  mplayer.c
  mplayer.h
  open2x-mplayer.sh
  rtc_1024_table.h
  subdisp.c
  subdisp.h
  subreader.c
  subreader.h
  typed.h
  version.h
  vpp.h
  vpts_q.c
  wincetype.h