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 <stdlib.h>
#include <ctype.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

char * strcasestr (const char *str, const char *pattern)
 
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 1028 of file xine_demux_sputext.cpp.

Function Documentation

◆ strcasestr()

char* strcasestr ( const char *  str,
const char *  pattern 
)

Definition at line 64 of file xine_demux_sputext.cpp.

Referenced by sub_read_line_sami().

◆ isEol()

static bool isEol ( char  p)
static

◆ trail_space()

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

Definition at line 92 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 138 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 224 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 244 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 267 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 300 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 370 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 416 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 459 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 533 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 562 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 608 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 631 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 846 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 869 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 899 of file xine_demux_sputext.cpp.

◆ sub_autodetect()

static int sub_autodetect ( demux_sputext_t demuxstr)
static

Definition at line 924 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 1047 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:631
sub_read_line_mpsub
static subtitle_t * sub_read_line_mpsub(demux_sputext_t *demuxstr, subtitle_t *current)
Definition: xine_demux_sputext.cpp:562
sub_read_line_aqt
static subtitle_t * sub_read_line_aqt(demux_sputext_t *demuxstr, subtitle_t *current)
Definition: xine_demux_sputext.cpp:608
sub_read_line_sami
static subtitle_t * sub_read_line_sami(demux_sputext_t *demuxstr, subtitle_t *current)
Definition: xine_demux_sputext.cpp:138
sub_read_line_ssa
static subtitle_t * sub_read_line_ssa(demux_sputext_t *demuxstr, subtitle_t *current)
Definition: xine_demux_sputext.cpp:459
sub_read_line_mpl2
static subtitle_t * sub_read_line_mpl2(demux_sputext_t *demuxstr, subtitle_t *current)
Definition: xine_demux_sputext.cpp:899
sub_read_line_microdvd
static subtitle_t * sub_read_line_microdvd(demux_sputext_t *demuxstr, subtitle_t *current)
Definition: xine_demux_sputext.cpp:244
sub_read_line_subrip
static subtitle_t * sub_read_line_subrip(demux_sputext_t *demuxstr, subtitle_t *current)
Definition: xine_demux_sputext.cpp:300
sub_read_line_subviewer2
static subtitle_t * sub_read_line_subviewer2(demux_sputext_t *demuxstr, subtitle_t *current)
Definition: xine_demux_sputext.cpp:846
sub_read_line_pjs
static subtitle_t * sub_read_line_pjs(demux_sputext_t *demuxstr, subtitle_t *current)
Definition: xine_demux_sputext.cpp:533
sub_read_line_subviewer
static subtitle_t * sub_read_line_subviewer(demux_sputext_t *demuxstr, subtitle_t *current)
Definition: xine_demux_sputext.cpp:267
sub_read_line_vplayer
static subtitle_t * sub_read_line_vplayer(demux_sputext_t *demuxstr, subtitle_t *current)
Definition: xine_demux_sputext.cpp:370
sub_read_line_rt
static subtitle_t * sub_read_line_rt(demux_sputext_t *demuxstr, subtitle_t *current)
Definition: xine_demux_sputext.cpp:416
sub_read_line_subrip09
static subtitle_t * sub_read_line_subrip09(demux_sputext_t *demuxstr, subtitle_t *current)
Definition: xine_demux_sputext.cpp:869