kopete/libkopete
videodevicepool.cpp
Go to the documentation of this file.
77 connect( Solid::DeviceNotifier::instance(), SIGNAL(deviceAdded(QString)), SLOT(deviceAdded(QString)) );
78 connect( Solid::DeviceNotifier::instance(), SIGNAL(deviceRemoved(QString)), SLOT(deviceRemoved(QString)) );
79 /* NOTE: No locking needed as long as we don't connect with Qt::ConnectionType = Qt::DirectConnection
82 foreach( Solid::Device device, Solid::Device::listFromType(Solid::DeviceInterface::Video, QString()) )
522 kDebug() << "Added input" << loop << ": " << m_videodevices[m_current_device]->m_input[loop].name
551 kDebug() << "Added signal standard" << loop << ": " << m_videodevices[m_current_device]->signalStandardName(1 << loop);
575 kDebug() << "Device name:" << config.readEntry( QString::fromLocal8Bit( "Device %1 Name" ).arg( currentdevice ), QString("NOT SAVED") );
610 const QString key_currentinput = QString::fromLocal8Bit( "Device %1 Current Input" ).arg( m_videodevices[m_current_device]->udi() );
620 const QString key_control_start = QString::fromLocal8Bit( "Device %1 Input %2 Control " ).arg( m_videodevices[m_current_device]->udi() ).arg( m_videodevices[m_current_device]->currentInput() );
666 const QString name = QString::fromLocal8Bit( "Device %1 Name" ).arg( m_videodevices[m_current_device]->udi() );
683 const QString key_currentinput = QString::fromLocal8Bit( "Device %1 Current Input" ).arg( m_videodevices[m_current_device]->udi() );
687 const QString key_control_start = QString::fromLocal8Bit( "Device %1 Input %2 Control " ).arg( m_videodevices[m_current_device]->udi() ).arg( m_videodevices[m_current_device]->currentInput() );
689 QList<NumericVideoControl> numCtrls = m_videodevices[m_current_device]->getSupportedNumericControls();
702 QList<BooleanVideoControl> boolCtrls = m_videodevices[m_current_device]->getSupportedBooleanControls();
706 if (EXIT_SUCCESS == m_videodevices[m_current_device]->getControlValue(boolCtrl.id, &ctrl_value))
715 QList<MenuVideoControl> menuCtrls = m_videodevices[m_current_device]->getSupportedMenuControls();
719 if (EXIT_SUCCESS == m_videodevices[m_current_device]->getControlValue(menuCtrl.id, &ctrl_value))
823 /* NOTE: The device we register has usually an empty vendor string and a less meaningfull product string.
void fillInputKComboBox(KComboBox *combobox)
Fills a combobox with the names of all available inputs for the currently selected device...
Definition: videodevicepool.cpp:509
int startCapturing()
Starts capturing from the currently selected video device.
Definition: videodevicepool.cpp:374
int setImageSize(int newwidth, int newheight)
Definition: videodevicepool.cpp:471
bool registerDevice(Solid::Device &dev)
Checks if the given device is a valid video device and adds it do the device list.
Definition: videodevicepool.cpp:817
int showDeviceCapabilities(int device=-1)
Definition: videodevicepool.cpp:744
QString currentDeviceUdi()
Returns the unique device identifier (UDI) of the currently selected device.
Definition: videodevicepool.cpp:229
QList< NumericVideoControl > getSupportedNumericControls()
Returns the supported numeric controls for the current input.
Definition: videodevicepool.cpp:285
Definition: videodevice.h:255
int setFileName(QString filename)
Definition: videodevice.cpp:304
int getImage(QImage *qimage)
Definition: videodevicepool.cpp:412
void deviceRegistered(const QString &udi)
Provisional signatures, probably more useful to indicate which device was registered.
bool contains(const QString &str, Qt::CaseSensitivity cs) const
QString & remove(int position, int n)
QList< MenuVideoControl > getSupportedMenuControls()
Returns the supported menu-controls for the current input.
Definition: videodevicepool.cpp:311
void loadDeviceConfig()
Loads and applies the configuration for the currently selected device.
Definition: videodevicepool.cpp:603
int size() const
Definition: videodevice.h:276
int inputs()
Returns the number of available inputs of the currently selected device.
Definition: videodevicepool.cpp:242
const char * name() const
QString number(int n, int base)
QString fromLocal8Bit(const char *str, int size)
QList< BooleanVideoControl > getSupportedBooleanControls()
Returns the supported boolean controls for the current input.
Definition: videodevicepool.cpp:298
int toInt(bool *ok, int base) const
bool isEmpty() const
Definition: videodevice.h:267
void deviceAdded(const QString &udi)
Slot called when a new device is added to the system.
Definition: videodevicepool.cpp:761
int selectInput(int newinput)
Selects the input of the current video device.
Definition: videodevicepool.cpp:269
void saveCurrentDeviceConfig()
Saves the current device configuration.
Definition: videodevicepool.cpp:655
Definition: videodevice.h:245
void deviceRemoved(const QString &udi)
Removes the device with the specified UDI from the device pool.
Definition: videodevicepool.cpp:780
static VideoDevicePool * self()
Returns pointer to a common instance of the VideoDevicePool.
Definition: videodevicepool.cpp:57
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
int stopCapturing()
Starts capturing from the currently selected video device.
Definition: videodevicepool.cpp:389
int open(int device=-1)
Opens the video device with the specified index. The previously opened device is closed before...
Definition: videodevicepool.cpp:120
QVector< VideoDevice * > m_videodevices
Definition: videodevicepool.h:93
int getControlValue(quint32 ctrl_id, qint32 *value)
Reads the value of a video-control.
Definition: videodevicepool.cpp:341
void fillStandardKComboBox(KComboBox *combobox)
Fills a combobox with the names of the available signal standards for the currently selected device...
Definition: videodevicepool.cpp:536
bool isOpen()
Returns true if the currently selected device is open and false othwerise.
Definition: videodevicepool.cpp:104
int setControlValue(quint32 ctrl_id, qint32 value)
Sets the value of a video-control.
Definition: videodevicepool.cpp:359
void deviceUnregistered(const QString &udi)
QStringList filter(const QString &str, Qt::CaseSensitivity cs) const
void fillDeviceKComboBox(KComboBox *combobox)
Fills a combobox with the names of all available video devices.
Definition: videodevicepool.cpp:486
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
QString arg(qlonglong a, int fieldWidth, int base, const QChar &fillChar) const
QList< ActionVideoControl > getSupportedActionControls()
Returns the supported action-controls for the current input.
Definition: videodevicepool.cpp:324
uint toUInt(bool *ok, int base) const
int currentInput()
Returns the index of the currently selected input.
Definition: videodevicepool.cpp:255
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
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.