1
/* smplayer, GUI front-end for mplayer.
2
Copyright (C) 2006-2009 Ricardo Villalba <rvm@escomposlinux.org>
4
This program is free software; you can redistribute it and/or modify
5
it under the terms of the GNU General Public License as published by
6
the Free Software Foundation; either version 2 of the License, or
7
(at your option) any later version.
9
This program is distributed in the hope that it will be useful,
10
but WITHOUT ANY WARRANTY; without even the implied warranty of
11
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
GNU General Public License for more details.
14
You should have received a copy of the GNU General Public License
15
along with this program; if not, write to the Free Software
16
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19
#include "mplayerprocess.h"
21
#include <QStringList>
22
#include <QApplication>
25
#include "preferences.h"
26
#include "mplayerversion.h"
29
using namespace Global;
31
MplayerProcess::MplayerProcess(QObject * parent) : MyProcess(parent)
33
#if NOTIFY_SUB_CHANGES
34
qRegisterMetaType<SubTracks>("SubTracks");
37
#if NOTIFY_AUDIO_CHANGES
38
qRegisterMetaType<Tracks>("Tracks");
41
connect( this, SIGNAL(lineAvailable(QByteArray)),
42
this, SLOT(parseLine(QByteArray)) );
44
connect( this, SIGNAL(finished(int,QProcess::ExitStatus)),
45
this, SLOT(processFinished(int,QProcess::ExitStatus)) );
47
connect( this, SIGNAL(error(QProcess::ProcessError)),
48
this, SLOT(gotError(QProcess::ProcessError)) );
50
notified_mplayer_is_running = false;
52
mplayer_svn = -1; // Not found yet
55
MplayerProcess::~MplayerProcess() {
58
bool MplayerProcess::start() {
60
notified_mplayer_is_running = false;
62
mplayer_svn = -1; // Not found yet
63
received_end_of_file = false;
65
#if NOTIFY_SUB_CHANGES
67
subtitle_info_received = false;
68
subtitle_info_changed = false;
71
#if NOTIFY_AUDIO_CHANGES
73
audio_info_changed = false;
76
#if GENERIC_CHAPTER_SUPPORT
77
dvd_current_title = -1;
81
return waitForStarted();
84
void MplayerProcess::writeToStdin(QString text) {
86
//qDebug("MplayerProcess::writeToStdin");
87
write( text.toLocal8Bit() + "\n");
89
qWarning("MplayerProcess::writeToStdin: process not running");
93
static QRegExp rx_av("^[AV]: *([0-9,:.-]+)");
94
static QRegExp rx_frame("^[AV]:.* (\\d+)\\/.\\d+");// [0-9,.]+");
95
static QRegExp rx("^(.*)=(.*)");
96
#if !NOTIFY_AUDIO_CHANGES
97
static QRegExp rx_audio_mat("^ID_AID_(\\d+)_(LANG|NAME)=(.*)");
99
static QRegExp rx_video("^ID_VID_(\\d+)_(LANG|NAME)=(.*)");
100
static QRegExp rx_title("^ID_DVD_TITLE_(\\d+)_(LENGTH|CHAPTERS|ANGLES)=(.*)");
101
static QRegExp rx_winresolution("^VO: \\[(.*)\\] (\\d+)x(\\d+) => (\\d+)x(\\d+)");
102
static QRegExp rx_ao("^AO: \\[(.*)\\]");
103
static QRegExp rx_paused("^ID_PAUSED");
104
#if !CHECK_VIDEO_CODEC_FOR_NO_VIDEO
105
static QRegExp rx_novideo("^Video: no video");
107
static QRegExp rx_cache("^Cache fill:.*");
108
static QRegExp rx_create_index("^Generating Index:.*");
109
static QRegExp rx_play("^Starting playback...");
110
static QRegExp rx_connecting("^Connecting to .*");
111
static QRegExp rx_resolving("^Resolving .*");
112
static QRegExp rx_screenshot("^\\*\\*\\* screenshot '(.*)'");
113
static QRegExp rx_endoffile("^Exiting... \\(End of file\\)|^ID_EXIT=EOF");
114
static QRegExp rx_mkvchapters("\\[mkv\\] Chapter (\\d+) from");
115
static QRegExp rx_aspect2("^Movie-Aspect is ([0-9,.]+):1");
116
static QRegExp rx_fontcache("^\\[ass\\] Updating font cache|^\\[ass\\] Init");
118
static QRegExp rx_dvdnav_switch_title("^DVDNAV, switched to title: (\\d+)");
119
static QRegExp rx_dvdnav_length("^ANS_length=(.*)");
123
static QRegExp rx_vcd("^ID_VCD_TRACK_(\\d+)_MSF=(.*)");
126
static QRegExp rx_cdda("^ID_CDDA_TRACK_(\\d+)_MSF=(.*)");
129
static QRegExp rx_subtitle("^ID_(SUBTITLE|FILE_SUB|VOBSUB)_ID=(\\d+)");
130
static QRegExp rx_sid("^ID_(SID|VSID)_(\\d+)_(LANG|NAME)=(.*)");
131
static QRegExp rx_subtitle_file("^ID_FILE_SUB_FILENAME=(.*)");
134
#if NOTIFY_AUDIO_CHANGES
135
static QRegExp rx_audio("^ID_AUDIO_ID=(\\d+)");
136
static QRegExp rx_audio_info("^ID_AID_(\\d+)_(LANG|NAME)=(.*)");
140
static QRegExp rx_clip_name("^ (name|title): (.*)", Qt::CaseInsensitive);
141
static QRegExp rx_clip_artist("^ artist: (.*)", Qt::CaseInsensitive);
142
static QRegExp rx_clip_author("^ author: (.*)", Qt::CaseInsensitive);
143
static QRegExp rx_clip_album("^ album: (.*)", Qt::CaseInsensitive);
144
static QRegExp rx_clip_genre("^ genre: (.*)", Qt::CaseInsensitive);
145
static QRegExp rx_clip_date("^ (creation date|year): (.*)", Qt::CaseInsensitive);
146
static QRegExp rx_clip_track("^ track: (.*)", Qt::CaseInsensitive);
147
static QRegExp rx_clip_copyright("^ copyright: (.*)", Qt::CaseInsensitive);
148
static QRegExp rx_clip_comment("^ comment: (.*)", Qt::CaseInsensitive);
149
static QRegExp rx_clip_software("^ software: (.*)", Qt::CaseInsensitive);
151
static QRegExp rx_stream_title("^.* StreamTitle='(.*)';StreamUrl='(.*)';");
154
void MplayerProcess::parseLine(QByteArray ba) {
155
//qDebug("MplayerProcess::parseLine: '%s'", ba.data() );
160
#if COLOR_OUTPUT_SUPPORT
161
QString line = Helper::stripColorsTags(QString::fromLocal8Bit(ba));
163
QString line = QString::fromLocal8Bit(ba);
167
//qDebug("%s", line.toUtf8().data());
168
if (rx_av.indexIn(line) > -1) {
169
double sec = rx_av.cap(1).toDouble();
170
//qDebug("cap(1): '%s'", rx_av.cap(1).toUtf8().data() );
171
//qDebug("sec: %f", sec);
173
#if NOTIFY_SUB_CHANGES
174
if (notified_mplayer_is_running) {
175
if (subtitle_info_changed) {
176
qDebug("MplayerProcess::parseLine: subtitle_info_changed");
177
subtitle_info_changed = false;
178
subtitle_info_received = false;
179
emit subtitleInfoChanged(subs);
181
if (subtitle_info_received) {
182
qDebug("MplayerProcess::parseLine: subtitle_info_received");
183
subtitle_info_received = false;
184
emit subtitleInfoReceivedAgain(subs);
189
#if NOTIFY_AUDIO_CHANGES
190
if (notified_mplayer_is_running) {
191
if (audio_info_changed) {
192
qDebug("MplayerProcess::parseLine: audio_info_changed");
193
audio_info_changed = false;
194
emit audioInfoChanged(audios);
199
if (!notified_mplayer_is_running) {
200
qDebug("MplayerProcess::parseLine: starting sec: %f", sec);
201
#if GENERIC_CHAPTER_SUPPORT
202
if ( (md.chapters <= 0) && (dvd_current_title > 0) &&
203
(md.titles.find(dvd_current_title) != -1) )
205
int idx = md.titles.find(dvd_current_title);
206
md.chapters = md.titles.itemAt(idx).chapters();
207
qDebug("MplayerProcess::parseLine: setting chapters to %d", md.chapters);
211
#if CHECK_VIDEO_CODEC_FOR_NO_VIDEO
212
// Another way to find out if there's no video
213
if (md.video_codec.isEmpty()) {
215
emit receivedNoVideo();
219
emit receivedStartingTime(sec);
220
emit mplayerFullyLoaded();
222
emit receivedCurrentFrame(0); // Ugly hack: set the frame counter to 0
224
notified_mplayer_is_running = true;
227
emit receivedCurrentSec( sec );
230
if (rx_frame.indexIn(line) > -1) {
231
int frame = rx_frame.cap(1).toInt();
232
//qDebug(" frame: %d", frame);
233
emit receivedCurrentFrame(frame);
237
// Emulates mplayer version in Ubuntu:
238
//if (line.startsWith("MPlayer 1.0rc1")) line = "MPlayer 2:1.0~rc1-0ubuntu13.1 (C) 2000-2006 MPlayer Team";
240
// Emulates unknown version
241
//if (line.startsWith("MPlayer SVN")) line = "MPlayer lalksklsjjakksja";
243
emit lineAvailable(line);
245
// Parse other things
246
qDebug("MplayerProcess::parseLine: '%s'", line.toUtf8().data() );
249
if (rx_screenshot.indexIn(line) > -1) {
250
QString shot = rx_screenshot.cap(1);
251
qDebug("MplayerProcess::parseLine: screenshot: '%s'", shot.toUtf8().data());
252
emit receivedScreenshot( shot );
257
if (rx_endoffile.indexIn(line) > -1) {
258
qDebug("MplayerProcess::parseLine: detected end of file");
259
if (!received_end_of_file) {
260
// In case of playing VCDs or DVDs, maybe the first title
261
// is not playable, so the GUI doesn't get the info about
262
// available titles. So if we received the end of file
263
// first let's pretend the file has started so the GUI can have
265
if ( !notified_mplayer_is_running) {
266
emit mplayerFullyLoaded();
269
//emit receivedEndOfFile();
270
// Send signal once the process is finished, not now!
271
received_end_of_file = true;
277
if (rx_winresolution.indexIn(line) > -1) {
279
md.win_width = rx_winresolution.cap(4).toInt();
280
md.win_height = rx_winresolution.cap(5).toInt();
281
md.video_aspect = (double) md.win_width / md.win_height;
284
int w = rx_winresolution.cap(4).toInt();
285
int h = rx_winresolution.cap(5).toInt();
287
emit receivedVO( rx_winresolution.cap(1) );
288
emit receivedWindowResolution( w, h );
289
//emit mplayerFullyLoaded();
293
#if !CHECK_VIDEO_CODEC_FOR_NO_VIDEO
295
if (rx_novideo.indexIn(line) > -1) {
297
emit receivedNoVideo();
298
//emit mplayerFullyLoaded();
304
if (rx_paused.indexIn(line) > -1) {
305
emit receivedPause();
309
if (rx_stream_title.indexIn(line) > -1) {
310
QString s = rx_stream_title.cap(1);
311
QString url = rx_stream_title.cap(2);
312
qDebug("MplayerProcess::parseLine: stream_title: '%s'", s.toUtf8().data());
313
qDebug("MplayerProcess::parseLine: stream_url: '%s'", url.toUtf8().data());
316
emit receivedStreamTitleAndUrl( s, url );
319
#if NOTIFY_SUB_CHANGES
321
if ((rx_subtitle.indexIn(line) > -1) || (rx_sid.indexIn(line) > -1) || (rx_subtitle_file.indexIn(line) > -1)) {
322
int r = subs.parse(line);
323
subtitle_info_received = true;
324
subtitle_info_changed = ((r == SubTracks::SubtitleAdded) || (r == SubTracks::SubtitleChanged));
328
#if NOTIFY_AUDIO_CHANGES
330
if (rx_audio.indexIn(line) > -1) {
331
int ID = rx_audio.cap(1).toInt();
332
qDebug("MplayerProcess::parseLine: ID_AUDIO_ID: %d", ID);
333
if (audios.find(ID) == -1) audio_info_changed = true;
337
if (rx_audio_info.indexIn(line) > -1) {
338
int ID = rx_audio_info.cap(1).toInt();
339
QString lang = rx_audio_info.cap(3);
340
QString t = rx_audio_info.cap(2);
341
qDebug("MplayerProcess::parseLine: Audio: ID: %d, Lang: '%s' Type: '%s'",
342
ID, lang.toUtf8().data(), t.toUtf8().data());
344
int idx = audios.find(ID);
346
qDebug("MplayerProcess::parseLine: audio %d doesn't exist, adding it", ID);
348
audio_info_changed = true;
350
audios.addName(ID, lang);
352
audios.addLang(ID, lang);
354
qDebug("MplayerProcess::parseLine: audio %d exists, modifing it", ID);
357
//qDebug("MplayerProcess::parseLine: name of audio %d: %s", ID, audios.itemAt(idx).name().toUtf8().constData());
358
if (audios.itemAt(idx).name() != lang) {
359
audio_info_changed = true;
360
audios.addName(ID, lang);
363
//qDebug("MplayerProcess::parseLine: language of audio %d: %s", ID, audios.itemAt(idx).lang().toUtf8().constData());
364
if (audios.itemAt(idx).lang() != lang) {
365
audio_info_changed = true;
366
audios.addLang(ID, lang);
374
if (rx_dvdnav_switch_title.indexIn(line) > -1) {
375
int title = rx_dvdnav_switch_title.cap(1).toInt();
376
qDebug("MplayerProcess::parseLine: dvd title: %d", title);
377
emit receivedDVDTitle(title);
379
if (rx_dvdnav_length.indexIn(line) > -1) {
380
double length = rx_dvdnav_length.cap(1).toDouble();
381
qDebug("MplayerProcess::parseLine: length: %f", length);
382
if (length != md.duration) {
383
md.duration = length;
384
emit receivedDuration(length);
389
// The following things are not sent when the file has started to play
390
// (or if sent, smplayer will ignore anyway...)
391
// So not process anymore, if video is playing to save some time
392
if (notified_mplayer_is_running) {
396
if ( (mplayer_svn == -1) && (line.startsWith("MPlayer ")) ) {
397
mplayer_svn = MplayerVersion::mplayerVersion(line);
398
qDebug("MplayerProcess::parseLine: MPlayer SVN: %d", mplayer_svn);
399
if (mplayer_svn <= 0) {
400
qWarning("MplayerProcess::parseLine: couldn't parse mplayer version!");
401
emit failedToParseMplayerVersion(line);
405
#if !NOTIFY_SUB_CHANGES
407
if (rx_subtitle.indexIn(line) > -1) {
411
if (rx_sid.indexIn(line) > -1) {
415
if (rx_subtitle_file.indexIn(line) > -1) {
420
if (rx_ao.indexIn(line) > -1) {
421
emit receivedAO( rx_ao.cap(1) );
425
#if !NOTIFY_AUDIO_CHANGES
427
if (rx_audio_mat.indexIn(line) > -1) {
428
int ID = rx_audio_mat.cap(1).toInt();
429
QString lang = rx_audio_mat.cap(3);
430
QString t = rx_audio_mat.cap(2);
431
qDebug("MplayerProcess::parseLine: Audio: ID: %d, Lang: '%s' Type: '%s'",
432
ID, lang.toUtf8().data(), t.toUtf8().data());
435
md.audios.addName(ID, lang);
437
md.audios.addLang(ID, lang);
443
if (rx_video.indexIn(line) > -1) {
444
int ID = rx_video.cap(1).toInt();
445
QString lang = rx_video.cap(3);
446
QString t = rx_video.cap(2);
447
qDebug("MplayerProcess::parseLine: Video: ID: %d, Lang: '%s' Type: '%s'",
448
ID, lang.toUtf8().data(), t.toUtf8().data());
451
md.videos.addName(ID, lang);
453
md.videos.addLang(ID, lang);
457
// Matroshka chapters
458
if (rx_mkvchapters.indexIn(line)!=-1) {
459
int c = rx_mkvchapters.cap(1).toInt();
460
qDebug("MplayerProcess::parseLine: mkv chapters: %d", c);
461
#if GENERIC_CHAPTER_SUPPORT
462
if ((c+1) > md.chapters) {
464
qDebug("MplayerProcess::parseLine: chapters set to: %d", md.chapters);
467
if ((c+1) > md.mkv_chapters) {
468
md.mkv_chapters = c+1;
469
qDebug("MplayerProcess::parseLine: mkv_chapters set to: %d", md.mkv_chapters);
476
if (rx_vcd.indexIn(line) > -1 ) {
477
int ID = rx_vcd.cap(1).toInt();
478
QString length = rx_vcd.cap(2);
479
//md.titles.addID( ID );
480
md.titles.addName( ID, length );
485
if (rx_cdda.indexIn(line) > -1 ) {
486
int ID = rx_cdda.cap(1).toInt();
487
QString length = rx_cdda.cap(2);
489
QRegExp r("(\\d+):(\\d+):(\\d+)");
490
if ( r.indexIn(length) > -1 ) {
491
duration = r.cap(1).toInt() * 60;
492
duration += r.cap(2).toInt();
494
md.titles.addID( ID );
496
QString name = QString::number(ID) + " (" + length + ")";
497
md.titles.addName( ID, name );
499
md.titles.addDuration( ID, duration );
504
if (rx_title.indexIn(line) > -1) {
505
int ID = rx_title.cap(1).toInt();
506
QString t = rx_title.cap(2);
509
double length = rx_title.cap(3).toDouble();
510
qDebug("MplayerProcess::parseLine: Title: ID: %d, Length: '%f'", ID, length);
511
md.titles.addDuration(ID, length);
515
int chapters = rx_title.cap(3).toInt();
516
qDebug("MplayerProcess::parseLine: Title: ID: %d, Chapters: '%d'", ID, chapters);
517
md.titles.addChapters(ID, chapters);
521
int angles = rx_title.cap(3).toInt();
522
qDebug("MplayerProcess::parseLine: Title: ID: %d, Angles: '%d'", ID, angles);
523
md.titles.addAngles(ID, angles);
528
// Catch cache messages
529
if (rx_cache.indexIn(line) > -1) {
530
emit receivedCacheMessage(line);
535
if (rx_create_index.indexIn(line) > -1) {
536
emit receivedCreatingIndex(line);
540
// Catch connecting message
541
if (rx_connecting.indexIn(line) > -1) {
542
emit receivedConnectingToMessage(line);
546
// Catch resolving message
547
if (rx_resolving.indexIn(line) > -1) {
548
emit receivedResolvingMessage(line);
552
// Aspect ratio for old versions of mplayer
553
if (rx_aspect2.indexIn(line) > -1) {
554
md.video_aspect = rx_aspect2.cap(1).toDouble();
555
qDebug("MplayerProcess::parseLine: md.video_aspect set to %f", md.video_aspect);
561
//QString::trimmed() is used for removing leading and trailing whitespaces
562
//Some .mp3 files contain tags with starting and ending whitespaces
563
//Unfortunately MPlayer gives us leading and trailing whitespaces, Winamp for example doesn't show them
566
if (rx_clip_name.indexIn(line) > -1) {
567
QString s = rx_clip_name.cap(2).trimmed();
568
qDebug("MplayerProcess::parseLine: clip_name: '%s'", s.toUtf8().data());
574
if (rx_clip_artist.indexIn(line) > -1) {
575
QString s = rx_clip_artist.cap(1).trimmed();
576
qDebug("MplayerProcess::parseLine: clip_artist: '%s'", s.toUtf8().data());
582
if (rx_clip_author.indexIn(line) > -1) {
583
QString s = rx_clip_author.cap(1).trimmed();
584
qDebug("MplayerProcess::parseLine: clip_author: '%s'", s.toUtf8().data());
590
if (rx_clip_album.indexIn(line) > -1) {
591
QString s = rx_clip_album.cap(1).trimmed();
592
qDebug("MplayerProcess::parseLine: clip_album: '%s'", s.toUtf8().data());
598
if (rx_clip_genre.indexIn(line) > -1) {
599
QString s = rx_clip_genre.cap(1).trimmed();
600
qDebug("MplayerProcess::parseLine: clip_genre: '%s'", s.toUtf8().data());
606
if (rx_clip_date.indexIn(line) > -1) {
607
QString s = rx_clip_date.cap(2).trimmed();
608
qDebug("MplayerProcess::parseLine: clip_date: '%s'", s.toUtf8().data());
614
if (rx_clip_track.indexIn(line) > -1) {
615
QString s = rx_clip_track.cap(1).trimmed();
616
qDebug("MplayerProcess::parseLine: clip_track: '%s'", s.toUtf8().data());
622
if (rx_clip_copyright.indexIn(line) > -1) {
623
QString s = rx_clip_copyright.cap(1).trimmed();
624
qDebug("MplayerProcess::parseLine: clip_copyright: '%s'", s.toUtf8().data());
625
md.clip_copyright = s;
630
if (rx_clip_comment.indexIn(line) > -1) {
631
QString s = rx_clip_comment.cap(1).trimmed();
632
qDebug("MplayerProcess::parseLine: clip_comment: '%s'", s.toUtf8().data());
638
if (rx_clip_software.indexIn(line) > -1) {
639
QString s = rx_clip_software.cap(1).trimmed();
640
qDebug("MplayerProcess::parseLine: clip_software: '%s'", s.toUtf8().data());
641
md.clip_software = s;
645
if (rx_fontcache.indexIn(line) > -1) {
646
//qDebug("MplayerProcess::parseLine: updating font cache");
647
emit receivedUpdatingFontCache();
651
// Catch starting message
653
pos = rx_play.indexIn(line);
655
emit mplayerFullyLoaded();
660
if (rx.indexIn(line) > -1) {
663
//qDebug("MplayerProcess::parseLine: tag: %s, value: %s", tag.toUtf8().data(), value.toUtf8().data());
665
#if !NOTIFY_AUDIO_CHANGES
667
if (tag == "ID_AUDIO_ID") {
668
int ID = value.toInt();
669
qDebug("MplayerProcess::parseLine: ID_AUDIO_ID: %d", ID);
670
md.audios.addID( ID );
676
if (tag == "ID_VIDEO_ID") {
677
int ID = value.toInt();
678
qDebug("MplayerProcess::parseLine: ID_VIDEO_ID: %d", ID);
679
md.videos.addID( ID );
682
if (tag == "ID_LENGTH") {
683
md.duration = value.toDouble();
684
qDebug("MplayerProcess::parseLine: md.duration set to %f", md.duration);
687
if (tag == "ID_VIDEO_WIDTH") {
688
md.video_width = value.toInt();
689
qDebug("MplayerProcess::parseLine: md.video_width set to %d", md.video_width);
692
if (tag == "ID_VIDEO_HEIGHT") {
693
md.video_height = value.toInt();
694
qDebug("MplayerProcess::parseLine: md.video_height set to %d", md.video_height);
697
if (tag == "ID_VIDEO_ASPECT") {
698
md.video_aspect = value.toDouble();
699
if ( md.video_aspect == 0.0 ) {
700
// I hope width & height are already set.
701
md.video_aspect = (double) md.video_width / md.video_height;
703
qDebug("MplayerProcess::parseLine: md.video_aspect set to %f", md.video_aspect);
706
if (tag == "ID_DVD_DISC_ID") {
708
qDebug("MplayerProcess::parseLine: md.dvd_id set to '%s'", md.dvd_id.toUtf8().data());
711
if (tag == "ID_DEMUXER") {
715
if (tag == "ID_VIDEO_FORMAT") {
716
md.video_format = value;
719
if (tag == "ID_AUDIO_FORMAT") {
720
md.audio_format = value;
723
if (tag == "ID_VIDEO_BITRATE") {
724
md.video_bitrate = value.toInt();
727
if (tag == "ID_VIDEO_FPS") {
728
md.video_fps = value;
731
if (tag == "ID_AUDIO_BITRATE") {
732
md.audio_bitrate = value.toInt();
735
if (tag == "ID_AUDIO_RATE") {
736
md.audio_rate = value.toInt();
739
if (tag == "ID_AUDIO_NCH") {
740
md.audio_nch = value.toInt();
743
if (tag == "ID_VIDEO_CODEC") {
744
md.video_codec = value;
747
if (tag == "ID_AUDIO_CODEC") {
748
md.audio_codec = value;
750
#if GENERIC_CHAPTER_SUPPORT
752
if (tag == "ID_CHAPTERS") {
753
md.chapters = value.toInt();
756
if (tag == "ID_DVD_CURRENT_TITLE") {
757
dvd_current_title = value.toInt();
764
// Called when the process is finished
765
void MplayerProcess::processFinished(int exitCode, QProcess::ExitStatus exitStatus) {
766
qDebug("MplayerProcess::processFinished: exitCode: %d, status: %d", exitCode, (int) exitStatus);
767
// Send this signal before the endoffile one, otherwise
768
// the playlist will start to play next file before all
769
// objects are notified that the process has exited.
770
emit processExited();
771
if (received_end_of_file) emit receivedEndOfFile();
774
void MplayerProcess::gotError(QProcess::ProcessError error) {
775
qDebug("MplayerProcess::gotError: %d", (int) error);
778
#include "moc_mplayerprocess.cpp"