Commit 60dbf355 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Qt4: list hardware ALSA devices in capture panel

...rather than V4L2 audio tuner and OSS device nodes.

This is not quite correct, but we can do no better without alsa-lib.
parent 836d9708
...@@ -728,12 +728,7 @@ void CaptureOpenPanel::initialize() ...@@ -728,12 +728,7 @@ void CaptureOpenPanel::initialize()
"video*" "video*"
}; };
char const * const ppsz_v4ladevices[] = { /* V4L2 main panel */
"dsp*",
"radio*"
};
/* V4l Main panel */
QLabel *v4l2VideoDeviceLabel = new QLabel( qtr( "Video device name" ) ); QLabel *v4l2VideoDeviceLabel = new QLabel( qtr( "Video device name" ) );
v4l2DevLayout->addWidget( v4l2VideoDeviceLabel, 0, 0 ); v4l2DevLayout->addWidget( v4l2VideoDeviceLabel, 0, 0 );
...@@ -748,7 +743,17 @@ void CaptureOpenPanel::initialize() ...@@ -748,7 +743,17 @@ void CaptureOpenPanel::initialize()
v4l2AudioDevice = new QComboBox( this ); v4l2AudioDevice = new QComboBox( this );
v4l2AudioDevice->setEditable( true ); v4l2AudioDevice->setEditable( true );
POPULATE_WITH_DEVS( ppsz_v4ladevices, v4l2AudioDevice ); {
QStringList patterns = QStringList();
patterns << QString( "pcmC*D*c" );
QStringList nodes = QDir( "/dev/snd" ).entryList( patterns,
QDir::System );
QStringList names = nodes.replaceInStrings( QRegExp("^pcmC"), "hw:" )
.replaceInStrings( QRegExp("c$"), "" )
.replaceInStrings( QRegExp("D"), "," );
v4l2AudioDevice->addItems( names );
}
v4l2AudioDevice->clearEditText(); v4l2AudioDevice->clearEditText();
v4l2DevLayout->addWidget( v4l2AudioDevice, 1, 1 ); v4l2DevLayout->addWidget( v4l2AudioDevice, 1, 1 );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment