diff options
author | Maia Kozheva <sikon@ubuntu.com> | 2010-05-09 21:22:23 +0700 |
---|---|---|
committer | Maia Kozheva <sikon@ubuntu.com> | 2010-05-09 21:22:23 +0700 |
commit | 99b53d44a60e3e934fc664152c115ae0d6e19920 (patch) | |
tree | e38698c486f6b4044125fa0d0bf33475d92e8f3a /src/mplayerprocess.cpp | |
parent | 263b32f108c15cd1c55a8f4eb4704fac6553f1ac (diff) |
Imported Upstream version 0.6.9
Diffstat (limited to 'src/mplayerprocess.cpp')
-rw-r--r-- | src/mplayerprocess.cpp | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/src/mplayerprocess.cpp b/src/mplayerprocess.cpp index 07d0573..d6a8675 100644 --- a/src/mplayerprocess.cpp +++ b/src/mplayerprocess.cpp @@ -1,5 +1,5 @@ /* smplayer, GUI front-end for mplayer. - Copyright (C) 2006-2009 Ricardo Villalba <rvm@escomposlinux.org> + Copyright (C) 2006-2010 Ricardo Villalba <rvm@escomposlinux.org> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -114,6 +114,7 @@ static QRegExp rx_endoffile("^Exiting... \\(End of file\\)|^ID_EXIT=EOF"); static QRegExp rx_mkvchapters("\\[mkv\\] Chapter (\\d+) from"); static QRegExp rx_aspect2("^Movie-Aspect is ([0-9,.]+):1"); static QRegExp rx_fontcache("^\\[ass\\] Updating font cache|^\\[ass\\] Init"); +static QRegExp rx_scanning_font("Scanning file"); #if DVDNAV_SUPPORT static QRegExp rx_dvdnav_switch_title("^DVDNAV, switched to title: (\\d+)"); static QRegExp rx_dvdnav_length("^ANS_length=(.*)"); @@ -154,7 +155,8 @@ static QRegExp rx_clip_copyright("^ copyright: (.*)", Qt::CaseInsensitive); static QRegExp rx_clip_comment("^ comment: (.*)", Qt::CaseInsensitive); static QRegExp rx_clip_software("^ software: (.*)", Qt::CaseInsensitive); -static QRegExp rx_stream_title("^.* StreamTitle='(.*)';StreamUrl='(.*)';"); +static QRegExp rx_stream_title("^.* StreamTitle='(.*)';"); +static QRegExp rx_stream_title_and_url("^.* StreamTitle='(.*)';StreamUrl='(.*)';"); void MplayerProcess::parseLine(QByteArray ba) { @@ -312,22 +314,30 @@ void MplayerProcess::parseLine(QByteArray ba) { } // Stream title - if (rx_stream_title.indexIn(line) > -1) { - QString s = rx_stream_title.cap(1); - QString url = rx_stream_title.cap(2); + if (rx_stream_title_and_url.indexIn(line) > -1) { + QString s = rx_stream_title_and_url.cap(1); + QString url = rx_stream_title_and_url.cap(2); qDebug("MplayerProcess::parseLine: stream_title: '%s'", s.toUtf8().data()); qDebug("MplayerProcess::parseLine: stream_url: '%s'", url.toUtf8().data()); md.stream_title = s; md.stream_url = url; emit receivedStreamTitleAndUrl( s, url ); } + else + if (rx_stream_title.indexIn(line) > -1) { + QString s = rx_stream_title.cap(1); + qDebug("MplayerProcess::parseLine: stream_title: '%s'", s.toUtf8().data()); + md.stream_title = s; + emit receivedStreamTitle( s ); + } #if NOTIFY_SUB_CHANGES // Subtitles if ((rx_subtitle.indexIn(line) > -1) || (rx_sid.indexIn(line) > -1) || (rx_subtitle_file.indexIn(line) > -1)) { int r = subs.parse(line); + //qDebug("MplayerProcess::parseLine: result of parse: %d", r); subtitle_info_received = true; - subtitle_info_changed = ((r == SubTracks::SubtitleAdded) || (r == SubTracks::SubtitleChanged)); + if ((r == SubTracks::SubtitleAdded) || (r == SubTracks::SubtitleChanged)) subtitle_info_changed = true; } #endif @@ -669,6 +679,10 @@ void MplayerProcess::parseLine(QByteArray ba) { emit receivedUpdatingFontCache(); } else + if (rx_scanning_font.indexIn(line) > -1) { + emit receivedScanningFont(line); + } + else // Catch starting message /* |