Add ALSA PCM devices and option to set channels

Fixes #262
This commit is contained in:
jonas@jkvinge.net
2021-05-11 19:14:00 +02:00
parent 4a0a1a32a4
commit 5d96ee5492
12 changed files with 459 additions and 200 deletions

View File

@@ -74,6 +74,7 @@ class GstEnginePipeline : public QObject {
void set_buffer_low_watermark(const double value);
void set_buffer_high_watermark(const double value);
void set_proxy_settings(const QString &address, const bool authentication, const QString &user, const QString &pass);
void set_channels(const bool enabled, const int channels);
// Creates the pipeline, returns false on error
bool InitFromUrl(const QByteArray &stream_url, const QUrl original_url, const qint64 end_nanosec);
@@ -221,6 +222,10 @@ class GstEnginePipeline : public QObject {
QString proxy_user_;
QString proxy_pass_;
// Channels
bool channels_enabled_;
int channels_;
// These get called when there is a new audio buffer available
QList<GstBufferConsumer*> buffer_consumers_;
QMutex buffer_consumers_mutex_;