MythTV  master
Macros | Typedefs | Functions | Variables
xine_demux_sputext.cpp File Reference
#include <array>
#include <cctype>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <fcntl.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#include "captions/xine_demux_sputext.h"
#include "mythlogging.h"
Include dependency graph for xine_demux_sputext.cpp:

Go to the source code of this file.

Macros

#define LOG_MODULE   "demux_sputext"
 
#define LOG_VERBOSE
 
#define ERR   ((void *)-1)
 
#define LINE_LEN   1000
 
#define LINE_LEN_QUOT   "1000"
 

Typedefs

using read_func_ptr = subtitle_t *(*)(demux_sputext_t *demuxstr, subtitle_t *dest)
 

Functions

static bool isEol (char p)
 
static void trail_space (std::string &str)
 
static char * read_line_from_input (demux_sputext_t *demuxstr, std::string &line)
 
static subtitle_tsub_read_line_sami (demux_sputext_t *demuxstr, subtitle_t *current)
 
static char * sub_readtext (char *source, std::string &dest)
 Extract the next token from a string. More...
 
static subtitle_tsub_read_line_microdvd (demux_sputext_t *demuxstr, subtitle_t *current)
 
static subtitle_tsub_read_line_subviewer (demux_sputext_t *demuxstr, subtitle_t *current)
 
static subtitle_tsub_read_line_subrip (demux_sputext_t *demuxstr, subtitle_t *current)
 
static subtitle_tsub_read_line_vplayer (demux_sputext_t *demuxstr, subtitle_t *current)
 
static subtitle_tsub_read_line_rt (demux_sputext_t *demuxstr, subtitle_t *current)
 
static subtitle_tsub_read_line_ssa (demux_sputext_t *demuxstr, subtitle_t *current)
 
static subtitle_tsub_read_line_pjs (demux_sputext_t *demuxstr, subtitle_t *current)
 
static subtitle_tsub_read_line_mpsub (demux_sputext_t *demuxstr, subtitle_t *current)
 
static subtitle_tsub_read_line_aqt (demux_sputext_t *demuxstr, subtitle_t *current)
 
static subtitle_tsub_read_line_jacobsub (demux_sputext_t *demuxstr, subtitle_t *current)
 
static subtitle_tsub_read_line_subviewer2 (demux_sputext_t *demuxstr, subtitle_t *current)
 
static subtitle_tsub_read_line_subrip09 (demux_sputext_t *demuxstr, subtitle_t *current)
 
static subtitle_tsub_read_line_mpl2 (demux_sputext_t *demuxstr, subtitle_t *current)
 
static int sub_autodetect (demux_sputext_t *demuxstr)
 
bool sub_read_file (demux_sputext_t *demuxstr)
 

Variables

const std::array< read_func_ptr, 14 > read_func
 

Macro Definition Documentation

◆ LOG_MODULE

#define LOG_MODULE   "demux_sputext"

Definition at line 50 of file xine_demux_sputext.cpp.

◆ LOG_VERBOSE

#define LOG_VERBOSE

Definition at line 51 of file xine_demux_sputext.cpp.

◆ ERR

#define ERR   ((void *)-1)

Definition at line 56 of file xine_demux_sputext.cpp.

◆ LINE_LEN

#define LINE_LEN   1000

Definition at line 57 of file xine_demux_sputext.cpp.

◆ LINE_LEN_QUOT

#define LINE_LEN_QUOT   "1000"

Definition at line 58 of file xine_demux_sputext.cpp.

Typedef Documentation

◆ read_func_ptr

using read_func_ptr = subtitle_t* (*)(demux_sputext_t *demuxstr,subtitle_t *dest)

Definition at line 1004 of file xine_demux_sputext.cpp.

Function Documentation

◆ isEol()

static bool isEol ( char  p)
static

◆ trail_space()

static void trail_space ( std::string &  str)
inlinestatic

Definition at line 68 of file xine_demux_sputext.cpp.

Referenced by sub_read_line_jacobsub(), and sub_read_line_sami().

◆ read_line_from_input()

static char* read_line_from_input ( demux_sputext_t demuxstr,
std::string &  line 
)
static

◆ sub_read_line_sami()

static subtitle_t* sub_read_line_sami ( demux_sputext_t demuxstr,
subtitle_t current 
)
static

Definition at line 114 of file xine_demux_sputext.cpp.

◆ sub_readtext()

static char* sub_readtext ( char *  source,
std::string &  dest 
)
static

Extract the next token from a string.

Parameters
sourceThe character string to scan.
destA newly allocated string containing the text from the source string up to the next newline, carriage return, or vertical bar.
Returns
one of 1) a pointer to a newly allocated string, 2) nullptr ig the end of te string was reached, or "(char*)-1" on error.

Definition at line 200 of file xine_demux_sputext.cpp.

Referenced by sub_read_line_aqt(), sub_read_line_microdvd(), sub_read_line_mpl2(), sub_read_line_rt(), sub_read_line_subrip09(), and sub_read_line_vplayer().

◆ sub_read_line_microdvd()

static subtitle_t* sub_read_line_microdvd ( demux_sputext_t demuxstr,
subtitle_t current 
)
static

Definition at line 220 of file xine_demux_sputext.cpp.

◆ sub_read_line_subviewer()

static subtitle_t* sub_read_line_subviewer ( demux_sputext_t demuxstr,
subtitle_t current 
)
static

Definition at line 243 of file xine_demux_sputext.cpp.

◆ sub_read_line_subrip()

static subtitle_t* sub_read_line_subrip ( demux_sputext_t demuxstr,
subtitle_t current 
)
static

Definition at line 276 of file xine_demux_sputext.cpp.

◆ sub_read_line_vplayer()

static subtitle_t* sub_read_line_vplayer ( demux_sputext_t demuxstr,
subtitle_t current 
)
static

Definition at line 346 of file xine_demux_sputext.cpp.

◆ sub_read_line_rt()

static subtitle_t* sub_read_line_rt ( demux_sputext_t demuxstr,
subtitle_t current 
)
static

Definition at line 392 of file xine_demux_sputext.cpp.

◆ sub_read_line_ssa()

static subtitle_t* sub_read_line_ssa ( demux_sputext_t demuxstr,
subtitle_t current 
)
static

Definition at line 435 of file xine_demux_sputext.cpp.

◆ sub_read_line_pjs()

static subtitle_t* sub_read_line_pjs ( demux_sputext_t demuxstr,
subtitle_t current 
)
static

Definition at line 509 of file xine_demux_sputext.cpp.

◆ sub_read_line_mpsub()

static subtitle_t* sub_read_line_mpsub ( demux_sputext_t demuxstr,
subtitle_t current 
)
static

Definition at line 538 of file xine_demux_sputext.cpp.

◆ sub_read_line_aqt()

static subtitle_t* sub_read_line_aqt ( demux_sputext_t demuxstr,
subtitle_t current 
)
static

Definition at line 584 of file xine_demux_sputext.cpp.

◆ sub_read_line_jacobsub()

static subtitle_t* sub_read_line_jacobsub ( demux_sputext_t demuxstr,
subtitle_t current 
)
static

Definition at line 607 of file xine_demux_sputext.cpp.

◆ sub_read_line_subviewer2()

static subtitle_t* sub_read_line_subviewer2 ( demux_sputext_t demuxstr,
subtitle_t current 
)
static

Definition at line 822 of file xine_demux_sputext.cpp.

◆ sub_read_line_subrip09()

static subtitle_t* sub_read_line_subrip09 ( demux_sputext_t demuxstr,
subtitle_t current 
)
static

Definition at line 845 of file xine_demux_sputext.cpp.

◆ sub_read_line_mpl2()

static subtitle_t* sub_read_line_mpl2 ( demux_sputext_t demuxstr,
subtitle_t current 
)
static

Definition at line 875 of file xine_demux_sputext.cpp.

◆ sub_autodetect()

static int sub_autodetect ( demux_sputext_t demuxstr)
static

Definition at line 900 of file xine_demux_sputext.cpp.

Referenced by sub_read_file().

◆ sub_read_file()

bool sub_read_file ( demux_sputext_t demuxstr)

Definition at line 1023 of file xine_demux_sputext.cpp.

Referenced by TextSubtitleParser::LoadSubtitles().

Variable Documentation

◆ read_func

const std::array<read_func_ptr, 14> read_func
sub_read_line_jacobsub
static subtitle_t * sub_read_line_jacobsub(demux_sputext_t *demuxstr, subtitle_t *current)
Definition: xine_demux_sputext.cpp:607
sub_read_line_mpsub
static subtitle_t * sub_read_line_mpsub(demux_sputext_t *demuxstr, subtitle_t *current)
Definition: xine_demux_sputext.cpp:538
sub_read_line_aqt
static subtitle_t * sub_read_line_aqt(demux_sputext_t *demuxstr, subtitle_t *current)
Definition: xine_demux_sputext.cpp:584
sub_read_line_sami
static subtitle_t * sub_read_line_sami(demux_sputext_t *demuxstr, subtitle_t *current)
Definition: xine_demux_sputext.cpp:114
sub_read_line_ssa
static subtitle_t * sub_read_line_ssa(demux_sputext_t *demuxstr, subtitle_t *current)
Definition: xine_demux_sputext.cpp:435
sub_read_line_mpl2
static subtitle_t * sub_read_line_mpl2(demux_sputext_t *demuxstr, subtitle_t *current)
Definition: xine_demux_sputext.cpp:875
sub_read_line_microdvd
static subtitle_t * sub_read_line_microdvd(demux_sputext_t *demuxstr, subtitle_t *current)
Definition: xine_demux_sputext.cpp:220
sub_read_line_subrip
static subtitle_t * sub_read_line_subrip(demux_sputext_t *demuxstr, subtitle_t *current)
Definition: xine_demux_sputext.cpp:276
sub_read_line_subviewer2
static subtitle_t * sub_read_line_subviewer2(demux_sputext_t *demuxstr, subtitle_t *current)
Definition: xine_demux_sputext.cpp:822
sub_read_line_pjs
static subtitle_t * sub_read_line_pjs(demux_sputext_t *demuxstr, subtitle_t *current)
Definition: xine_demux_sputext.cpp:509
sub_read_line_subviewer
static subtitle_t * sub_read_line_subviewer(demux_sputext_t *demuxstr, subtitle_t *current)
Definition: xine_demux_sputext.cpp:243
sub_read_line_vplayer
static subtitle_t * sub_read_line_vplayer(demux_sputext_t *demuxstr, subtitle_t *current)
Definition: xine_demux_sputext.cpp:346
sub_read_line_rt
static subtitle_t * sub_read_line_rt(demux_sputext_t *demuxstr, subtitle_t *current)
Definition: xine_demux_sputext.cpp:392
sub_read_line_subrip09
static subtitle_t * sub_read_line_subrip09(demux_sputext_t *demuxstr, subtitle_t *current)
Definition: xine_demux_sputext.cpp:845