Fix compilation problems when compiling without gstreamer
This commit is contained in:
parent
ed49a0b422
commit
f03449dd00
@ -355,16 +355,18 @@ void SettingsDialog::ShowTrayIconToggled(bool on) {
|
|||||||
ui_.gst_group->setEnabled(true);
|
ui_.gst_group->setEnabled(true);
|
||||||
ui_.replaygain_group->setEnabled(true);
|
ui_.replaygain_group->setEnabled(true);
|
||||||
}
|
}
|
||||||
|
#endif // HAVE_GSTREAMER
|
||||||
|
|
||||||
void SettingsDialog::GstPluginChanged(int index) {
|
void SettingsDialog::GstPluginChanged(int index) {
|
||||||
|
#ifdef HAVE_GSTREAMER
|
||||||
QString name = ui_.gst_plugin->itemData(index).toString();
|
QString name = ui_.gst_plugin->itemData(index).toString();
|
||||||
|
|
||||||
bool enabled = GstEngine::DoesThisSinkSupportChangingTheOutputDeviceToAUserEditableString(name);
|
bool enabled = GstEngine::DoesThisSinkSupportChangingTheOutputDeviceToAUserEditableString(name);
|
||||||
|
|
||||||
ui_.gst_device->setEnabled(enabled);
|
ui_.gst_device->setEnabled(enabled);
|
||||||
ui_.gst_device_label->setEnabled(enabled);
|
ui_.gst_device_label->setEnabled(enabled);
|
||||||
}
|
|
||||||
#endif // HAVE_GSTREAMER
|
#endif // HAVE_GSTREAMER
|
||||||
|
}
|
||||||
|
|
||||||
void SettingsDialog::RgPreampChanged(int value) {
|
void SettingsDialog::RgPreampChanged(int value) {
|
||||||
float db = float(value) / 10 - 15;
|
float db = float(value) / 10 - 15;
|
||||||
|
@ -59,9 +59,7 @@ class SettingsDialog : public QDialog {
|
|||||||
|
|
||||||
void UpdatePopupVisible();
|
void UpdatePopupVisible();
|
||||||
void ShowTrayIconToggled(bool on);
|
void ShowTrayIconToggled(bool on);
|
||||||
#ifdef HAVE_GSTREAMER
|
|
||||||
void GstPluginChanged(int index);
|
void GstPluginChanged(int index);
|
||||||
#endif
|
|
||||||
void FadingOptionsChanged();
|
void FadingOptionsChanged();
|
||||||
void RgPreampChanged(int value);
|
void RgPreampChanged(int value);
|
||||||
|
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
along with Clementine. If not, see <http://www.gnu.org/licenses/>.
|
along with Clementine. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "config.h"
|
||||||
#include "projectmvisualisation.h"
|
#include "projectmvisualisation.h"
|
||||||
#include "visualisationcontainer.h"
|
#include "visualisationcontainer.h"
|
||||||
#include "visualisationoverlay.h"
|
#include "visualisationoverlay.h"
|
||||||
@ -120,24 +121,31 @@ void VisualisationContainer::AddMenuItem(const QString &name, int value, int def
|
|||||||
|
|
||||||
void VisualisationContainer::SetEngine(GstEngine* engine) {
|
void VisualisationContainer::SetEngine(GstEngine* engine) {
|
||||||
engine_ = engine;
|
engine_ = engine;
|
||||||
|
|
||||||
|
#ifdef HAVE_GSTREAMER
|
||||||
if (isVisible())
|
if (isVisible())
|
||||||
engine_->AddBufferConsumer(vis_);
|
engine_->AddBufferConsumer(vis_);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void VisualisationContainer::showEvent(QShowEvent* e) {
|
void VisualisationContainer::showEvent(QShowEvent* e) {
|
||||||
QGraphicsView::showEvent(e);
|
QGraphicsView::showEvent(e);
|
||||||
update_timer_.start(1000 / fps_, this);
|
update_timer_.start(1000 / fps_, this);
|
||||||
|
|
||||||
|
#ifdef HAVE_GSTREAMER
|
||||||
if (engine_)
|
if (engine_)
|
||||||
engine_->AddBufferConsumer(vis_);
|
engine_->AddBufferConsumer(vis_);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void VisualisationContainer::hideEvent(QHideEvent* e) {
|
void VisualisationContainer::hideEvent(QHideEvent* e) {
|
||||||
QGraphicsView::hideEvent(e);
|
QGraphicsView::hideEvent(e);
|
||||||
update_timer_.stop();
|
update_timer_.stop();
|
||||||
|
|
||||||
|
#ifdef HAVE_GSTREAMER
|
||||||
if (engine_)
|
if (engine_)
|
||||||
engine_->RemoveBufferConsumer(vis_);
|
engine_->RemoveBufferConsumer(vis_);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void VisualisationContainer::resizeEvent(QResizeEvent* e) {
|
void VisualisationContainer::resizeEvent(QResizeEvent* e) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user