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
#ifndef _MPLAYERPROCESS_H_
20
#define _MPLAYERPROCESS_H_
23
#include "myprocess.h"
24
#include "mediadata.h"
27
#define NOTIFY_SUB_CHANGES 1
28
#define NOTIFY_AUDIO_CHANGES 1
32
class MplayerProcess : public MyProcess
37
MplayerProcess(QObject * parent = 0);
41
void writeToStdin(QString text);
43
MediaData mediaData() { return md; };
47
void lineAvailable(QString line);
49
void receivedCurrentSec(double sec);
50
void receivedCurrentFrame(int frame);
52
void receivedWindowResolution(int,int);
53
void receivedNoVideo();
54
void receivedVO(QString);
55
void receivedAO(QString);
56
void receivedEndOfFile();
57
void mplayerFullyLoaded();
58
void receivedStartingTime(double sec);
60
void receivedCacheMessage(QString);
61
void receivedCreatingIndex(QString);
62
void receivedConnectingToMessage(QString);
63
void receivedResolvingMessage(QString);
64
void receivedScreenshot(QString);
65
void receivedUpdatingFontCache();
67
void receivedStreamTitleAndUrl(QString,QString);
69
void failedToParseMplayerVersion(QString line_with_mplayer_version);
71
#if NOTIFY_SUB_CHANGES
72
//! Emitted if a new subtitle has been added or an old one changed
73
void subtitleInfoChanged(const SubTracks &);
75
//! Emitted when subtitle info has been received but there wasn't anything new
76
void subtitleInfoReceivedAgain(const SubTracks &);
78
#if NOTIFY_AUDIO_CHANGES
79
//! Emitted if a new audio track been added or an old one changed
80
void audioInfoChanged(const Tracks &);
84
void receivedDVDTitle(int);
85
void receivedDuration(double);
89
void parseLine(QByteArray ba);
90
void processFinished(int exitCode, QProcess::ExitStatus exitStatus);
91
void gotError(QProcess::ProcessError);
94
bool notified_mplayer_is_running;
95
bool received_end_of_file;
103
#if NOTIFY_SUB_CHANGES
106
bool subtitle_info_received;
107
bool subtitle_info_changed;
110
#if NOTIFY_AUDIO_CHANGES
112
bool audio_info_changed;
115
#if GENERIC_CHAPTER_SUPPORT
116
int dvd_current_title;