Add const
This commit is contained in:
parent
d3dd26c596
commit
17e88bb97d
|
@ -126,10 +126,10 @@ class EngineBase : public QObject {
|
||||||
|
|
||||||
virtual OutputDetailsList GetOutputsList() const = 0;
|
virtual OutputDetailsList GetOutputsList() const = 0;
|
||||||
virtual bool ValidOutput(const QString &output) = 0;
|
virtual bool ValidOutput(const QString &output) = 0;
|
||||||
virtual QString DefaultOutput() = 0;
|
virtual QString DefaultOutput() const = 0;
|
||||||
virtual bool CustomDeviceSupport(const QString &output) = 0;
|
virtual bool CustomDeviceSupport(const QString &output) const = 0;
|
||||||
virtual bool ALSADeviceSupport(const QString &output) = 0;
|
virtual bool ALSADeviceSupport(const QString &output) const = 0;
|
||||||
virtual bool ExclusiveModeSupport(const QString &output) = 0;
|
virtual bool ExclusiveModeSupport(const QString &output) const = 0;
|
||||||
|
|
||||||
// Plays a media stream represented with the URL 'u' from the given 'beginning' to the given 'end' (usually from 0 to a song's length).
|
// Plays a media stream represented with the URL 'u' from the given 'beginning' to the given 'end' (usually from 0 to a song's length).
|
||||||
// Both markers should be passed in nanoseconds. 'end' can be negative, indicating that the real length of 'u' stream is unknown.
|
// Both markers should be passed in nanoseconds. 'end' can be negative, indicating that the real length of 'u' stream is unknown.
|
||||||
|
|
|
@ -454,15 +454,15 @@ bool GstEngine::ValidOutput(const QString &output) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool GstEngine::CustomDeviceSupport(const QString &output) {
|
bool GstEngine::CustomDeviceSupport(const QString &output) const {
|
||||||
return output == QLatin1String(kALSASink) || output == QLatin1String(kOpenALSASink) || output == QLatin1String(kOSSSink) || output == QLatin1String(kOSS4Sink) || output == QLatin1String(kPulseSink) || output == QLatin1String(kA2DPSink) || output == QLatin1String(kAVDTPSink) || output == QLatin1String(kJackAudioSink);
|
return output == QLatin1String(kALSASink) || output == QLatin1String(kOpenALSASink) || output == QLatin1String(kOSSSink) || output == QLatin1String(kOSS4Sink) || output == QLatin1String(kPulseSink) || output == QLatin1String(kA2DPSink) || output == QLatin1String(kAVDTPSink) || output == QLatin1String(kJackAudioSink);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool GstEngine::ALSADeviceSupport(const QString &output) {
|
bool GstEngine::ALSADeviceSupport(const QString &output) const {
|
||||||
return output == QLatin1String(kALSASink);
|
return output == QLatin1String(kALSASink);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool GstEngine::ExclusiveModeSupport(const QString &output) {
|
bool GstEngine::ExclusiveModeSupport(const QString &output) const {
|
||||||
return output == QLatin1String(kWASAPISink);
|
return output == QLatin1String(kWASAPISink);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -78,10 +78,10 @@ class GstEngine : public EngineBase, public GstBufferConsumer {
|
||||||
|
|
||||||
OutputDetailsList GetOutputsList() const override;
|
OutputDetailsList GetOutputsList() const override;
|
||||||
bool ValidOutput(const QString &output) override;
|
bool ValidOutput(const QString &output) override;
|
||||||
QString DefaultOutput() override { return QLatin1String(kAutoSink); }
|
QString DefaultOutput() const override { return QLatin1String(kAutoSink); }
|
||||||
bool CustomDeviceSupport(const QString &output) override;
|
bool CustomDeviceSupport(const QString &output) const override;
|
||||||
bool ALSADeviceSupport(const QString &output) override;
|
bool ALSADeviceSupport(const QString &output) const override;
|
||||||
bool ExclusiveModeSupport(const QString &output) override;
|
bool ExclusiveModeSupport(const QString &output) const override;
|
||||||
|
|
||||||
void SetStartup(GstStartup *gst_startup) { gst_startup_ = gst_startup; }
|
void SetStartup(GstStartup *gst_startup) { gst_startup_ = gst_startup; }
|
||||||
void EnsureInitialized() { gst_startup_->EnsureInitialized(); }
|
void EnsureInitialized() { gst_startup_->EnsureInitialized(); }
|
||||||
|
|
|
@ -255,15 +255,15 @@ bool VLCEngine::ValidOutput(const QString &output) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool VLCEngine::CustomDeviceSupport(const QString &output) {
|
bool VLCEngine::CustomDeviceSupport(const QString &output) const {
|
||||||
return (output != QLatin1String("auto"));
|
return output != QLatin1String("auto");
|
||||||
}
|
}
|
||||||
|
|
||||||
bool VLCEngine::ALSADeviceSupport(const QString &output) {
|
bool VLCEngine::ALSADeviceSupport(const QString &output) const {
|
||||||
return (output == QLatin1String("alsa"));
|
return output == QLatin1String("alsa");
|
||||||
}
|
}
|
||||||
|
|
||||||
bool VLCEngine::ExclusiveModeSupport(const QString &output) {
|
bool VLCEngine::ExclusiveModeSupport(const QString &output) const {
|
||||||
Q_UNUSED(output);
|
Q_UNUSED(output);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -67,10 +67,10 @@ class VLCEngine : public EngineBase {
|
||||||
|
|
||||||
OutputDetailsList GetOutputsList() const override;
|
OutputDetailsList GetOutputsList() const override;
|
||||||
bool ValidOutput(const QString &output) override;
|
bool ValidOutput(const QString &output) override;
|
||||||
QString DefaultOutput() override { return QLatin1String(""); }
|
QString DefaultOutput() const override { return QLatin1String(""); }
|
||||||
bool CustomDeviceSupport(const QString &output) override;
|
bool CustomDeviceSupport(const QString &output) const override;
|
||||||
bool ALSADeviceSupport(const QString &output) override;
|
bool ALSADeviceSupport(const QString &output) const override;
|
||||||
bool ExclusiveModeSupport(const QString &output) override;
|
bool ExclusiveModeSupport(const QString &output) const override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
libvlc_instance_t *instance_;
|
libvlc_instance_t *instance_;
|
||||||
|
|
Loading…
Reference in New Issue