~ubuntu-branches/ubuntu/feisty/kdetv/feisty

« back to all changes in this revision

Viewing changes to kdetv/plugins/video/xv/kdetv_xv.h

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Riddell
  • Date: 2005-09-17 23:25:16 UTC
  • Revision ID: james.westby@ubuntu.com-20050917232516-9wdsn3ckagbqieh8
Tags: upstream-0.8.8
ImportĀ upstreamĀ versionĀ 0.8.8

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// -*- c++ -*-
 
2
 
 
3
/*
 
4
 *
 
5
 * Copyright (C) 2002 George Staikos <staikos@kde.org>
 
6
 *
 
7
 * This library is free software; you can redistribute it and/or
 
8
 * modify it under the terms of the GNU Library General Public
 
9
 * License as published by the Free Software Foundation; either
 
10
 * version 2 of the License, or (at your option) any later version.
 
11
 *
 
12
 * This library is distributed in the hope that it will be useful,
 
13
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
14
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
15
 * Library General Public License for more details.
 
16
 *
 
17
 * You should have received a copy of the GNU Library General Public License
 
18
 * along with this library; see the file COPYING.LIB.  If not, write to
 
19
 * the Free Software Foundation, Inc., 51 Franklin Steet, Fifth Floor,
 
20
 * Boston, MA 02110-1301, USA.
 
21
 */
 
22
 
 
23
 
 
24
 
 
25
#ifndef __KDETVXV_PLUGIN_H
 
26
#define __KDETVXV_PLUGIN_H
 
27
 
 
28
#include <qwidget.h>
 
29
#include <qmap.h>
 
30
#include <qstring.h>
 
31
#include <kdetvsrcplugin.h>
 
32
#include <kxv.h>
 
33
 
 
34
class QTimer;
 
35
 
 
36
/**
 
37
 * Video source plugin for Xv
 
38
 */
 
39
class KdetvXv : public KdetvSourcePlugin
 
40
{
 
41
    Q_OBJECT
 
42
 
 
43
public:
 
44
    KdetvXv(Kdetv *ktv, QWidget *parent = 0, const char* name = 0);
 
45
    virtual ~KdetvXv();
 
46
 
 
47
    /**
 
48
     * To get various values.
 
49
     */
 
50
    virtual int frequency();
 
51
    virtual bool muted();
 
52
    virtual bool isTuner();
 
53
    virtual int signal();
 
54
    virtual QColor colourKey();
 
55
    virtual Control::ControlList& controls();
 
56
 
 
57
    virtual const QStringList& broadcastedAudioModes();
 
58
    virtual const QString&     defaultAudioMode();
 
59
 
 
60
    virtual int probeDevices();
 
61
 
 
62
    virtual bool videoPlaying() const;
 
63
 
 
64
public slots:
 
65
    /**
 
66
     * Sets the device to use.
 
67
     */
 
68
    virtual int setDevice( const QString &dev );
 
69
 
 
70
    /**
 
71
     * Sets the channel properties.
 
72
     */
 
73
    virtual int setChannelProperties(const Channel::PropertyList& properties);
 
74
 
 
75
    /**
 
76
     * Sets the source to use.
 
77
     */
 
78
    virtual int setSource( const QString &src );
 
79
 
 
80
    /**
 
81
     * Sets the encoding.
 
82
     */
 
83
    virtual int setEncoding( const QString &encoding );
 
84
 
 
85
    /**
 
86
     * Sets the current current channel.
 
87
     */
 
88
    virtual void setFrequency( int freq );
 
89
 
 
90
    /**
 
91
     * Mutes the sound.
 
92
     */
 
93
    virtual void setMuted( bool muted );
 
94
 
 
95
    int setAudioMode( const QString& audioMode );
 
96
 
 
97
    virtual void viewResized();
 
98
 
 
99
    virtual int startVideo();
 
100
    virtual int stopVideo();
 
101
    
 
102
    virtual int setVideoDesktop(bool on);
 
103
    virtual bool canVideoDesktop() const;
 
104
 
 
105
    virtual bool canGrabStill() const;
 
106
    virtual bool grabStill( QImage *pix );
 
107
 
 
108
private:
 
109
    int  doSetEncoding( const QString &encoding, const QString &source );
 
110
    void parseXvEncoding( const QString &xvEncoding, QString &source, QString &encoding );
 
111
 
 
112
    QTimer *resizeTimer;
 
113
    QMap<QString, QString> _encodingsMap;
 
114
    QMap<QString, QString> _sourcesMap;
 
115
    Control::ControlList _controls;
 
116
 
 
117
public:
 
118
    KXv *xvHandle;
 
119
    KXvDevice *xvDevice;
 
120
};
 
121
 
 
122
#endif
 
123