• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdenetwork API Reference
  • KDE Home
  • Contact Us
 

kopete/libkopete

  • sources
  • kde-4.14
  • kdenetwork
  • kopete
  • libkopete
  • avdevice
videodevicepool.h
Go to the documentation of this file.
1 /*
2  videodevicepool.h - Kopete Multiple Video Device handler Class
3 
4  Copyright (c) 2005-2006 by Cláudio da Silveira Pinheiro <taupter@gmail.com>
5  Copyright (c) 2010 by Frank Schaefer <fschaefer.oss@googlemail.com>
6 
7  Kopete (c) 2002-2003 by the Kopete developers <kopete-devel@kde.org>
8 
9  *************************************************************************
10  * *
11  * This library is free software; you can redistribute it and/or *
12  * modify it under the terms of the GNU Lesser General Public *
13  * License as published by the Free Software Foundation; either *
14  * version 2 of the License, or (at your option) any later version. *
15  * *
16  *************************************************************************
17 */
18 
19 #ifndef VIDEODEVICEPOOL_H
20 #define VIDEODEVICEPOOL_H
21 
22 #include <iostream>
23 
24 
25 #include "videoinput.h"
26 #include <qstring.h>
27 #include <qimage.h>
28 #include <kcombobox.h>
29 #include "videodevice.h"
30 #include "kopete_export.h"
31 #include <kconfig.h>
32 #include <kglobal.h>
33 #include <solid/device.h>
34 
35 
36 namespace Kopete {
37 
38 namespace AV {
39 
46 class KOPETE_EXPORT VideoDevicePool : public QObject
47 {
48 
49 Q_OBJECT
50 
51 public:
52  static VideoDevicePool* self();
53  ~VideoDevicePool();
54  bool isOpen();
55  int open( int device = -1 );
56  int close();
57 
58  int size();
59  int currentDevice();
60  QString currentDeviceUdi();
61  int inputs();
62  int currentInput();
63  int selectInput( int newinput );
64 
65  QList<NumericVideoControl> getSupportedNumericControls();
66  QList<BooleanVideoControl> getSupportedBooleanControls();
67  QList<MenuVideoControl> getSupportedMenuControls();
68  QList<ActionVideoControl> getSupportedActionControls();
69  int getControlValue( quint32 ctrl_id, qint32 * value );
70  int setControlValue( quint32 ctrl_id, qint32 value );
71 
72  int startCapturing();
73  int stopCapturing();
74  int getFrame();
75  int getImage( QImage *qimage );
76 
77  int width();
78  int minWidth();
79  int maxWidth();
80  int height();
81  int minHeight();
82  int maxHeight();
83  int setImageSize( int newwidth, int newheight );
84 
85  void fillDeviceKComboBox( KComboBox *combobox );
86  void fillInputKComboBox( KComboBox *combobox );
87  void fillStandardKComboBox( KComboBox *combobox );
88 
89  void saveCurrentDeviceConfig();
90 
91 protected:
92  int m_current_device;
93  QVector<VideoDevice*> m_videodevices;
95  bool registerDevice( Solid::Device & dev );
96  int showDeviceCapabilities( int device = -1 );
97  int getSavedDevice();
98  void loadDeviceConfig();
99 
100 private:
101  static VideoDevicePool* s_self;
102  static __u64 m_clients; // Number of instances
103 
104  VideoDevicePool();
105 
106 protected slots:
110  void deviceAdded( const QString & udi );
111  void deviceRemoved( const QString & udi );
112 
113 signals:
117  void deviceRegistered( const QString & udi );
118  void deviceUnregistered( const QString & udi );
119 
120 };
121 
122 }
123 
124 }
125 
126 #endif // VIDEODEVICEPOOL_H
KOPETE_EXPORT
#define KOPETE_EXPORT
Definition: kopete_export.h:27
videodevice.h
QObject
kopete_export.h
QString
QList
QImage
Kopete::AV::VideoDevicePool::m_current_device
int m_current_device
Definition: videodevicepool.h:92
Kopete::AV::VideoDevicePool
This class allows kopete to check for the existence, open, configure, test, set parameters, grab frames from and close a given video capture card using the Video4Linux API.
Definition: videodevicepool.h:46
QVector
Kopete::AV::VideoDevicePool::m_videodevices
QVector< VideoDevice * > m_videodevices
Definition: videodevicepool.h:93
__u64
#define __u64
Definition: videoinput.h:28
videoinput.h
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:29:20 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kopete/libkopete

Skip menu "kopete/libkopete"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdenetwork API Reference

Skip menu "kdenetwork API Reference"
  • kget
  • kopete
  •   kopete
  •   libkopete
  • krdc
  • krfb

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal