|
VLC
2.1.0-git
|
This file contains functions to dectect subtitle files. More...

Data Structures | |
| struct | vlc_subfn_t |
Macros | |
| #define | MAX_SUBTITLE_FILES 128 |
| We are not going to autodetect more subtitle files than this. | |
Enumerations | |
| enum | { SUB_PRIORITY_NONE = 0, SUB_PRIORITY_MATCH_NONE = 1, SUB_PRIORITY_MATCH_RIGHT = 2, SUB_PRIORITY_MATCH_LEFT = 3, SUB_PRIORITY_MATCH_ALL = 4 } |
Functions | |
| static void | strcpy_trim (char *d, const char *s) |
| static void | strcpy_strip_ext (char *d, const char *s) |
| static void | strcpy_get_ext (char *d, const char *s) |
| static int | whiteonly (const char *s) |
| static int | compare_sub_priority (const void *a, const void *b) |
| int | subtitles_Filter (const char *psz_dir_content) |
| static char ** | paths_to_list (const char *psz_dir, char *psz_path) |
| Convert a list of paths separated by ',' to a char**. | |
| char ** | subtitles_Detect (input_thread_t *p_this, char *psz_path, const char *psz_name_org) |
| Detect subtitle files. | |
Variables | |
| static const char const | sub_exts [][6] |
| The possible extensions for subtitle files we support. | |
This file contains functions to dectect subtitle files.
| #define MAX_SUBTITLE_FILES 128 |
We are not going to autodetect more subtitle files than this.
Referenced by subtitles_Detect().
| anonymous enum |
|
static |
References vlc_subfn_t::priority, and vlc_subfn_t::psz_fname.
Referenced by subtitles_Detect().
|
static |
Convert a list of paths separated by ',' to a char**.
References asprintf().
Referenced by subtitles_Detect().
|
static |
Referenced by subtitles_Detect().
|
static |
References strlcpy().
Referenced by subtitles_Detect().
|
static |
Referenced by subtitles_Detect().
| char** subtitles_Detect | ( | input_thread_t * | p_this, |
| char * | psz_path, | ||
| const char * | psz_name_org | ||
| ) |
Detect subtitle files.
When called this function will split up the psz_name string into a directory, filename and extension. It then opens the directory in which the file resides and tries to find possible matches of subtitles files.
| p_this | the calling input_thread_t |
| psz_path | a list of subdirectories (separated by a ',') to look in. |
| psz_name | the complete filename to base the search on. |
References compare_sub_priority(), DIR_SEP, DIR_SEP_CHAR, make_path(), MAX_SUBTITLE_FILES, msg_Dbg, paths_to_list(), vlc_subfn_t::priority, vlc_subfn_t::psz_ext, psz_ext, vlc_subfn_t::psz_fname, psz_name, strcasecmp(), strcpy_get_ext(), strcpy_strip_ext(), strcpy_trim(), strdup(), SUB_PRIORITY_MATCH_ALL, SUB_PRIORITY_MATCH_LEFT, SUB_PRIORITY_MATCH_NONE, SUB_PRIORITY_MATCH_RIGHT, SUB_PRIORITY_NONE, subtitles_Filter(), var_GetInteger, vlc_opendir(), vlc_readdir(), vlc_stat(), and whiteonly().
Referenced by LoadSubtitles().
| int subtitles_Filter | ( | const char * | psz_dir_content | ) |
References strcasecmp(), and sub_exts.
Referenced by input_vaControl(), and subtitles_Detect().
|
static |
Referenced by subtitles_Detect().
|
static |
The possible extensions for subtitle files we support.
Referenced by subtitles_Filter().
1.8.1.2