139
143
//qDebug("incomplete_line: '%s'", incomplete_line.utf8().data());
142
QRegExp rx_av("^[AV]: *([0-9,:.-]+)");
143
QRegExp rx_frame("^[AV]:.* (\\d+)\\/.\\d+");// [0-9,.]+");
144
QRegExp rx("^(.*)=(.*)");
145
QRegExp rx_audio_mat("^ID_AID_(\\d+)_(LANG|NAME)=(.*)");
146
QRegExp rx_title("^ID_DVD_TITLE_(\\d+)_(LENGTH|CHAPTERS|ANGLES)=(.*)");
147
QRegExp rx_winresolution("^VO: \\[(.*)\\] (\\d+)x(\\d+) => (\\d+)x(\\d+)");
148
QRegExp rx_ao("^AO: \\[(.*)\\]");
149
QRegExp rx_paused("^ID_PAUSED");
150
QRegExp rx_novideo("^Video: no video");
151
QRegExp rx_cache("^Cache fill:.*");
152
QRegExp rx_create_index("^Generating Index:.*");
153
QRegExp rx_play("^Starting playback...");
154
QRegExp rx_connecting("^Connecting to .*");
155
QRegExp rx_resolving("^Resolving .*");
156
QRegExp rx_screenshot("^\\*\\*\\* screenshot '(.*)'");
157
QRegExp rx_endoffile("^Exiting... \\(End of file\\)");
158
QRegExp rx_mkvchapters("\\[mkv\\] Chapter (\\d+) from");
159
QRegExp rx_aspect2("^Movie-Aspect is ([0-9,.]+):1");
146
static QRegExp rx_av("^[AV]: *([0-9,:.-]+)");
147
static QRegExp rx_frame("^[AV]:.* (\\d+)\\/.\\d+");// [0-9,.]+");
148
static QRegExp rx("^(.*)=(.*)");
149
static QRegExp rx_audio_mat("^ID_AID_(\\d+)_(LANG|NAME)=(.*)");
150
static QRegExp rx_title("^ID_DVD_TITLE_(\\d+)_(LENGTH|CHAPTERS|ANGLES)=(.*)");
151
static QRegExp rx_winresolution("^VO: \\[(.*)\\] (\\d+)x(\\d+) => (\\d+)x(\\d+)");
152
static QRegExp rx_ao("^AO: \\[(.*)\\]");
153
static QRegExp rx_paused("^ID_PAUSED");
154
static QRegExp rx_novideo("^Video: no video");
155
static QRegExp rx_cache("^Cache fill:.*");
156
static QRegExp rx_create_index("^Generating Index:.*");
157
static QRegExp rx_play("^Starting playback...");
158
static QRegExp rx_connecting("^Connecting to .*");
159
static QRegExp rx_resolving("^Resolving .*");
160
static QRegExp rx_screenshot("^\\*\\*\\* screenshot '(.*)'");
161
static QRegExp rx_endoffile("^Exiting... \\(End of file\\)");
162
static QRegExp rx_mkvchapters("\\[mkv\\] Chapter (\\d+) from");
163
static QRegExp rx_aspect2("^Movie-Aspect is ([0-9,.]+):1");
162
QRegExp rx_vcd("^ID_VCD_TRACK_(\\d+)_MSF=(.*)");
166
static QRegExp rx_vcd("^ID_VCD_TRACK_(\\d+)_MSF=(.*)");
169
static QRegExp rx_cdda("^ID_CDDA_TRACK_(\\d+)_MSF=(.*)");
166
173
#if SUBTITLES_BY_INDEX
167
QRegExp rx_subtitle("^ID_(SUBTITLE|FILE_SUB|VOBSUB)_ID=(\\d+)");
168
QRegExp rx_sid("^ID_(SID|VSID)_(\\d+)_(LANG|NAME)=(.*)");
169
QRegExp rx_subtitle_file("^ID_FILE_SUB_FILENAME=(.*)");
174
static QRegExp rx_subtitle("^ID_(SUBTITLE|FILE_SUB|VOBSUB)_ID=(\\d+)");
175
static QRegExp rx_sid("^ID_(SID|VSID)_(\\d+)_(LANG|NAME)=(.*)");
176
static QRegExp rx_subtitle_file("^ID_FILE_SUB_FILENAME=(.*)");
171
QRegExp rx_subs("^ID_SID_(\\d+)_(LANG|NAME)=(.*)");
178
static QRegExp rx_subs("^ID_SID_(\\d+)_(LANG|NAME)=(.*)");
175
QRegExp rx_clip_name("^ (name|title): (.*)");
176
QRegExp rx_clip_artist("^ artist: (.*)");
177
QRegExp rx_clip_author("^ author: (.*)");
178
QRegExp rx_clip_album("^ album: (.*)");
179
QRegExp rx_clip_genre("^ genre: (.*)");
180
QRegExp rx_clip_date("^ (creation date|year): (.*)");
181
QRegExp rx_clip_track("^ track: (.*)");
182
QRegExp rx_clip_copyright("^ copyright: (.*)");
183
QRegExp rx_clip_comment("^ comment: (.*)");
184
QRegExp rx_clip_software("^ software: (.*)");
182
static QRegExp rx_clip_name("^ (name|title): (.*)", false);
183
static QRegExp rx_clip_artist("^ artist: (.*)", false);
184
static QRegExp rx_clip_author("^ author: (.*)", false);
185
static QRegExp rx_clip_album("^ album: (.*)", false);
186
static QRegExp rx_clip_genre("^ genre: (.*)", false);
187
static QRegExp rx_clip_date("^ (creation date|year): (.*)", false);
188
static QRegExp rx_clip_track("^ track: (.*)", false);
189
static QRegExp rx_clip_copyright("^ copyright: (.*)", false);
190
static QRegExp rx_clip_comment("^ comment: (.*)", false);
191
static QRegExp rx_clip_software("^ software: (.*)", false);
193
static QRegExp rx_stream_title("^.* StreamTitle='(.*)';StreamUrl='(.*)';");
187
195
void MplayerProcess::init_rx() {
188
rx_clip_name.setCaseSensitive(FALSE);
189
rx_clip_artist.setCaseSensitive(FALSE);
190
rx_clip_author.setCaseSensitive(FALSE);
191
rx_clip_album.setCaseSensitive(FALSE);
192
rx_clip_genre.setCaseSensitive(FALSE);
193
rx_clip_date.setCaseSensitive(FALSE);
194
rx_clip_track.setCaseSensitive(FALSE);
195
rx_clip_copyright.setCaseSensitive(FALSE);
196
rx_clip_comment.setCaseSensitive(FALSE);
197
rx_clip_software.setCaseSensitive(FALSE);
196
qDebug("MplayerProcess::init_rx");
198
if (!pref->rx_endoffile.isEmpty())
199
rx_endoffile.setPattern(pref->rx_endoffile);
201
if (!pref->rx_novideo.isEmpty())
202
rx_novideo.setPattern(pref->rx_novideo);