This file is indexed.

/usr/include/avifile-0.7/subtitle.h is in libavifile-0.7-dev 1:0.7.48~20090503.ds-19+b1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
#ifndef AVIFILE_SUBTITLE_H
#define AVIFILE_SUBTITLE_H

/**
 * subtitle is plain C library - usable outside of avifile
 *
 * All subtitle lines are internally stored in UTF-8 format
 * (iconv is used for conversion and must be present for this)
 */

/** Maximum supported number of lines which may compose one subtitle */
#define SUBTITLE_MAX_LINES 5

#if defined(__cplusplus)
extern "C" {
#endif

/**
 * Types of recognized subtitles
 * with a short example of such subtitle line
 */
typedef struct __subtitles_s subtitles_t;

typedef enum
{
    /** \internal */
    SUBTITLE_UNSELECTED,
    /**
     * .SUB
     * {123}{345} text
     */
    SUBTITLE_MICRODVD,
    /**
     * .SRT
     * 123
     * 1:23:55.125 --> 1:24:00.275
     */
    SUBTITLE_SUBRIP,
    /**
     * 1:23:55
     * text
     */
    SUBTITLE_VPLAYER,
    SUBTITLE_AQT,
    SUBTITLE_SAMI,
    /**
     * 1:23:55.125,1:24:00.275
     * text
     */
    SUBTITLE_SUBVIEWER,
    SUBTITLE_MPSUB,		/* mplayer's format of subtitles */
    SUBTITLE_LAST
} subtitle_t;

typedef struct subtitle_line_t
{
    /** how many text lines are in this subtitle element */
    unsigned int lines;
    /** starting time for display  (time in 1/1000s = 1ms) */
    unsigned int start;
    /** ending time for display  (time in 1/1000s = 1ms) */
    unsigned int end;
    /** pointers to individual subtitle lines */
    char* line[SUBTITLE_MAX_LINES];
} subtitle_line_t;

/**
 * tries to open subtitle for the given filename
 * \returns  file descriptor
 */
int subtitle_filename(const char* filename, char** opened_filename);

/**
 * Opens subtiles from a given filename
 *
 * \param fd  file descriptor with opened file with subtitles
 * \param fps frame per seconds (needed for some subtitles types
 * \param codepage  when NULL default system codepage is used
 */
subtitles_t* subtitle_open(int fd, double fps, const char* codepage);
/**
 * Closes and destroys array of subtitles
 * \param subset  array of subtitles for freeing
 *
 * \warning after calling this function the subset array could no longer
 * be accessed as all the memory allocated by this structure has been
 * released
 */
void subtitle_close(subtitles_t* subs);
void subtitle_set_fps(subtitles_t*, double fps);
/** Returns number of lines in the subtitle array */
unsigned int subtitle_get_lines(subtitles_t*);
/** Returns type of subtitles */
subtitle_t subtitle_get_type(subtitles_t*, const char**);
/**
 * Copies subtitle into given subtitle_line_t pointer
 * It will check first if the line isn't already copied
 * returns true if subtitle is found
 */
int subtitle_get(subtitle_line_t*, subtitles_t*, double timepos);
/**
 * Check if two subtitles are equal
 * checking linecount & start,end pos (text is not being compared!)
 */
int subtitle_line_equals(const subtitle_line_t*, const subtitle_line_t*);
/** creates new empty subtitle line */
subtitle_line_t* subtitle_line_new(void);
/** duplicates one subtitle line */
subtitle_line_t* subtitle_line_copy(const subtitle_line_t*);
/** free allocated subtitle line (obtained with subtitle_line_copy) */
void subtitle_line_free(subtitle_line_t*);

/**
 * write subtitles to file
 */
int subtitle_write(const subtitles_t* st, const char* filename, subtitle_t type);

/*
 might be implemented later

 write
 update
 insert
 delete
 */

/*
 * private structure currently kept here
 */
struct __subtitles_s
{
    /*
     * never accessed directly
     * use suplied functions to manipulate subtitle array
     */
    int fd;
    subtitle_t type;
    unsigned int allocated;
    unsigned int count;
    int frame_based; /* if subtitles use frame number */
    int time_diff;
    double fps;
    char* encoding;  /* original encoding */
    char* out_encoding; /* for write */
    subtitle_line_t* subtitle;
};

#if defined(__cplusplus)
}
#endif

#endif // AVIFILE_SUBTITLE_H