~ubuntu-branches/debian/experimental/smplayer/experimental

« back to all changes in this revision

Viewing changes to src/corelib/mplayerprocess.h

  • Committer: Bazaar Package Importer
  • Author(s): Maia Kozheva
  • Date: 2009-01-03 17:08:06 UTC
  • mfrom: (1.1.8 upstream)
  • Revision ID: james.westby@ubuntu.com-20090103170806-eodntb2slv6g2pb6
Tags: 0.6.6-0ubuntu1
* The "just before FF" release.
* New upstream release.
* debian/control: Bumped Standards-Version to 3.8.0.
* debian/copyright: Changed (C) to © to fix Lintian warning.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*  smplayer, GUI front-end for mplayer.
2
 
    Copyright (C) 2006-2008 Ricardo Villalba <rvm@escomposlinux.org>
3
 
 
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.
8
 
 
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.
13
 
 
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
17
 
*/
18
 
 
19
 
#ifndef _MPLAYERPROCESS_H_
20
 
#define _MPLAYERPROCESS_H_
21
 
 
22
 
#include <QString>
23
 
#include "myprocess.h"
24
 
#include "mediadata.h"
25
 
#include "config.h"
26
 
 
27
 
class QStringList;
28
 
 
29
 
class MplayerProcess : public MyProcess 
30
 
{
31
 
        Q_OBJECT
32
 
 
33
 
public:
34
 
        MplayerProcess(QObject * parent = 0);
35
 
        ~MplayerProcess();
36
 
 
37
 
        bool start();
38
 
        void writeToStdin(QString text);
39
 
 
40
 
        MediaData mediaData() { return md; };
41
 
 
42
 
signals:
43
 
        void processExited();
44
 
        void lineAvailable(QString line);
45
 
 
46
 
        void receivedCurrentSec(double sec);
47
 
        void receivedCurrentFrame(int frame);
48
 
        void receivedPause();
49
 
        void receivedWindowResolution(int,int);
50
 
        void receivedNoVideo();
51
 
        void receivedVO(QString);
52
 
        void receivedAO(QString);
53
 
        void receivedEndOfFile();
54
 
        void mplayerFullyLoaded();
55
 
        void receivedStartingTime(double sec);
56
 
 
57
 
        void receivedCacheMessage(QString);
58
 
        void receivedCreatingIndex(QString);
59
 
        void receivedConnectingToMessage(QString);
60
 
        void receivedResolvingMessage(QString);
61
 
        void receivedScreenshot(QString);
62
 
 
63
 
        void receivedStreamTitleAndUrl(QString,QString);
64
 
 
65
 
        void failedToParseMplayerVersion(QString line_with_mplayer_version);
66
 
 
67
 
protected slots:
68
 
        void parseLine(QByteArray ba);
69
 
        void processFinished(int exitCode, QProcess::ExitStatus exitStatus);
70
 
        void gotError(QProcess::ProcessError);
71
 
 
72
 
protected:
73
 
        void init_rx();
74
 
 
75
 
private:
76
 
        bool notified_mplayer_is_running;
77
 
        bool received_end_of_file;
78
 
 
79
 
        MediaData md;
80
 
 
81
 
        int last_sub_id;
82
 
 
83
 
        int mplayer_svn;
84
 
 
85
 
#if NOTIFY_AUDIO_SUB_CHANGES
86
 
        bool audio_tracks_changed;
87
 
        bool subtitle_tracks_changed;
88
 
#endif
89
 
};
90
 
 
91
 
 
92
 
#endif