GstEnginePipeline: Sort variables
This commit is contained in:
parent
88704efad8
commit
91eef0d695
|
@ -87,26 +87,26 @@ GstEnginePipeline::GstEnginePipeline(QObject *parent)
|
|||
valid_(false),
|
||||
exclusive_mode_(false),
|
||||
volume_enabled_(true),
|
||||
stereo_balancer_enabled_(false),
|
||||
eq_enabled_(false),
|
||||
rg_enabled_(false),
|
||||
fading_enabled_(false),
|
||||
strict_ssl_enabled_(false),
|
||||
buffer_duration_nanosec_(BackendSettingsPage::kDefaultBufferDuration * kNsecPerMsec),
|
||||
buffer_low_watermark_(BackendSettingsPage::kDefaultBufferLowWatermark),
|
||||
buffer_high_watermark_(BackendSettingsPage::kDefaultBufferHighWatermark),
|
||||
proxy_authentication_(false),
|
||||
channels_enabled_(false),
|
||||
channels_(0),
|
||||
bs2b_enabled_(false),
|
||||
stereo_balancer_enabled_(false),
|
||||
stereo_balance_(0.0F),
|
||||
eq_enabled_(false),
|
||||
eq_preamp_(0),
|
||||
rg_enabled_(false),
|
||||
rg_mode_(0),
|
||||
rg_preamp_(0.0),
|
||||
rg_fallbackgain_(0.0),
|
||||
rg_compression_(true),
|
||||
ebur128_loudness_normalization_(false),
|
||||
buffer_duration_nanosec_(BackendSettingsPage::kDefaultBufferDuration * kNsecPerMsec),
|
||||
buffer_low_watermark_(BackendSettingsPage::kDefaultBufferLowWatermark),
|
||||
buffer_high_watermark_(BackendSettingsPage::kDefaultBufferHighWatermark),
|
||||
buffering_(false),
|
||||
proxy_authentication_(false),
|
||||
channels_enabled_(false),
|
||||
channels_(0),
|
||||
bs2b_enabled_(false),
|
||||
strict_ssl_enabled_(false),
|
||||
ebur128_loudness_normalizing_gain_db_(0.0),
|
||||
segment_start_(0),
|
||||
segment_start_received_(false),
|
||||
end_offset_nanosec_(-1),
|
||||
|
@ -121,10 +121,10 @@ GstEnginePipeline::GstEnginePipeline(QObject *parent)
|
|||
last_known_position_ns_(0),
|
||||
next_uri_set_(false),
|
||||
next_uri_reset_(false),
|
||||
ebur128_loudness_normalizing_gain_db_(0.0),
|
||||
volume_set_(false),
|
||||
volume_internal_(-1.0),
|
||||
volume_percent_(100),
|
||||
buffering_(false),
|
||||
use_fudge_timer_(false),
|
||||
pipeline_(nullptr),
|
||||
audiobin_(nullptr),
|
||||
|
@ -398,8 +398,8 @@ bool GstEnginePipeline::InitFromUrl(const QUrl &media_url, const QUrl &stream_ur
|
|||
media_url_ = media_url;
|
||||
stream_url_ = stream_url;
|
||||
gst_url_ = gst_url;
|
||||
ebur128_loudness_normalizing_gain_db_ = ebur128_loudness_normalizing_gain_db;
|
||||
end_offset_nanosec_ = end_nanosec;
|
||||
ebur128_loudness_normalizing_gain_db_ = ebur128_loudness_normalizing_gain_db;
|
||||
|
||||
guint version_major = 0, version_minor = 0, version_micro = 0, version_nano = 0;
|
||||
gst_plugins_base_version(&version_major, &version_minor, &version_micro, &version_nano);
|
||||
|
@ -982,7 +982,9 @@ GstPadProbeReturn GstEnginePipeline::UpstreamEventsProbeCallback(GstPad *pad, Gs
|
|||
|
||||
}
|
||||
|
||||
void GstEnginePipeline::ElementAddedCallback(GstBin *bin, GstBin*, GstElement *element, gpointer self) {
|
||||
void GstEnginePipeline::ElementAddedCallback(GstBin *bin, GstBin *sub_bin, GstElement *element, gpointer self) {
|
||||
|
||||
Q_UNUSED(sub_bin)
|
||||
|
||||
GstEnginePipeline *instance = reinterpret_cast<GstEnginePipeline*>(self);
|
||||
|
||||
|
@ -1007,7 +1009,9 @@ void GstEnginePipeline::ElementAddedCallback(GstBin *bin, GstBin*, GstElement *e
|
|||
|
||||
}
|
||||
|
||||
void GstEnginePipeline::ElementRemovedCallback(GstBin *bin, GstBin*, GstElement *element, gpointer self) {
|
||||
void GstEnginePipeline::ElementRemovedCallback(GstBin *bin, GstBin *sub_bin, GstElement *element, gpointer self) {
|
||||
|
||||
Q_UNUSED(sub_bin)
|
||||
|
||||
GstEnginePipeline *instance = reinterpret_cast<GstEnginePipeline*>(self);
|
||||
|
||||
|
@ -1303,7 +1307,7 @@ GstPadProbeReturn GstEnginePipeline::BufferProbeCallback(GstPad *pad, GstPadProb
|
|||
|
||||
QList<GstBufferConsumer*> consumers;
|
||||
{
|
||||
QMutexLocker l(&instance->buffer_consumers_mutex_);
|
||||
QMutexLocker l(&instance->mutex_buffer_consumers_);
|
||||
consumers = instance->buffer_consumers_;
|
||||
}
|
||||
|
||||
|
@ -2048,17 +2052,17 @@ void GstEnginePipeline::timerEvent(QTimerEvent *e) {
|
|||
}
|
||||
|
||||
void GstEnginePipeline::AddBufferConsumer(GstBufferConsumer *consumer) {
|
||||
QMutexLocker l(&buffer_consumers_mutex_);
|
||||
QMutexLocker l(&mutex_buffer_consumers_);
|
||||
buffer_consumers_ << consumer;
|
||||
}
|
||||
|
||||
void GstEnginePipeline::RemoveBufferConsumer(GstBufferConsumer *consumer) {
|
||||
QMutexLocker l(&buffer_consumers_mutex_);
|
||||
QMutexLocker l(&mutex_buffer_consumers_);
|
||||
buffer_consumers_.removeAll(consumer);
|
||||
}
|
||||
|
||||
void GstEnginePipeline::RemoveAllBufferConsumers() {
|
||||
QMutexLocker l(&buffer_consumers_mutex_);
|
||||
QMutexLocker l(&mutex_buffer_consumers_);
|
||||
buffer_consumers_.clear();
|
||||
}
|
||||
|
||||
|
|
|
@ -173,8 +173,8 @@ class GstEnginePipeline : public QObject {
|
|||
static GstPadProbeReturn UpstreamEventsProbeCallback(GstPad *pad, GstPadProbeInfo *info, gpointer self);
|
||||
static GstPadProbeReturn BufferProbeCallback(GstPad *pad, GstPadProbeInfo *info, gpointer self);
|
||||
static GstPadProbeReturn PlaybinProbeCallback(GstPad *pad, GstPadProbeInfo *info, gpointer self);
|
||||
static void ElementAddedCallback(GstBin *bin, GstBin*, GstElement *element, gpointer self);
|
||||
static void ElementRemovedCallback(GstBin *bin, GstBin*, GstElement *element, gpointer self);
|
||||
static void ElementAddedCallback(GstBin *bin, GstBin *sub_bin, GstElement *element, gpointer self);
|
||||
static void ElementRemovedCallback(GstBin *bin, GstBin *sub_bin, GstElement *element, gpointer self);
|
||||
static void PadAddedCallback(GstElement *element, GstPad *pad, gpointer self);
|
||||
static void SourceSetupCallback(GstElement *playbin, GstElement *source, gpointer self);
|
||||
static void NotifyVolumeCallback(GstElement *element, GParamSpec *param_spec, gpointer self);
|
||||
|
@ -218,34 +218,13 @@ class GstEnginePipeline : public QObject {
|
|||
QVariant device_;
|
||||
bool exclusive_mode_;
|
||||
bool volume_enabled_;
|
||||
bool stereo_balancer_enabled_;
|
||||
bool eq_enabled_;
|
||||
bool rg_enabled_;
|
||||
bool fading_enabled_;
|
||||
|
||||
// Stereo balance:
|
||||
// From -1.0 - 1.0
|
||||
// -1.0 is left, 1.0 is right.
|
||||
float stereo_balance_;
|
||||
|
||||
// Equalizer
|
||||
int eq_preamp_;
|
||||
QList<int> eq_band_gains_;
|
||||
|
||||
// ReplayGain
|
||||
int rg_mode_;
|
||||
double rg_preamp_;
|
||||
double rg_fallbackgain_;
|
||||
bool rg_compression_;
|
||||
|
||||
// EBU R 128 Loudness Normalization
|
||||
bool ebur128_loudness_normalization_;
|
||||
bool strict_ssl_enabled_;
|
||||
|
||||
// Buffering
|
||||
quint64 buffer_duration_nanosec_;
|
||||
double buffer_low_watermark_;
|
||||
double buffer_high_watermark_;
|
||||
bool buffering_;
|
||||
|
||||
// Proxy
|
||||
QString proxy_address_;
|
||||
|
@ -257,9 +236,29 @@ class GstEnginePipeline : public QObject {
|
|||
bool channels_enabled_;
|
||||
int channels_;
|
||||
|
||||
// Options
|
||||
// bs2b
|
||||
bool bs2b_enabled_;
|
||||
bool strict_ssl_enabled_;
|
||||
|
||||
// Stereo balance:
|
||||
// From -1.0 - 1.0
|
||||
// -1.0 is left, 1.0 is right.
|
||||
bool stereo_balancer_enabled_;
|
||||
float stereo_balance_;
|
||||
|
||||
// Equalizer
|
||||
bool eq_enabled_;
|
||||
int eq_preamp_;
|
||||
QList<int> eq_band_gains_;
|
||||
|
||||
// ReplayGain
|
||||
bool rg_enabled_;
|
||||
int rg_mode_;
|
||||
double rg_preamp_;
|
||||
double rg_fallbackgain_;
|
||||
bool rg_compression_;
|
||||
|
||||
// EBU R 128 Loudness Normalization
|
||||
bool ebur128_loudness_normalization_;
|
||||
|
||||
// Spotify
|
||||
#ifdef HAVE_SPOTIFY
|
||||
|
@ -267,12 +266,6 @@ class GstEnginePipeline : public QObject {
|
|||
QString spotify_password_;
|
||||
#endif
|
||||
|
||||
// These get called when there is a new audio buffer available
|
||||
QList<GstBufferConsumer*> buffer_consumers_;
|
||||
QMutex buffer_consumers_mutex_;
|
||||
qint64 segment_start_;
|
||||
bool segment_start_received_;
|
||||
|
||||
// The URL that is currently playing, and the URL that is to be preloaded when the current track is close to finishing.
|
||||
QUrl media_url_;
|
||||
QUrl stream_url_;
|
||||
|
@ -280,6 +273,13 @@ class GstEnginePipeline : public QObject {
|
|||
QUrl next_media_url_;
|
||||
QUrl next_stream_url_;
|
||||
QByteArray next_gst_url_;
|
||||
double ebur128_loudness_normalizing_gain_db_;
|
||||
|
||||
// These get called when there is a new audio buffer available
|
||||
QList<GstBufferConsumer*> buffer_consumers_;
|
||||
QMutex mutex_buffer_consumers_;
|
||||
qint64 segment_start_;
|
||||
bool segment_start_received_;
|
||||
|
||||
// If this is > 0 then the pipeline will be forced to stop when playback goes past this position.
|
||||
qint64 end_offset_nanosec_;
|
||||
|
@ -317,11 +317,12 @@ class GstEnginePipeline : public QObject {
|
|||
bool next_uri_set_;
|
||||
bool next_uri_reset_;
|
||||
|
||||
double ebur128_loudness_normalizing_gain_db_;
|
||||
bool volume_set_;
|
||||
gdouble volume_internal_;
|
||||
uint volume_percent_;
|
||||
|
||||
bool buffering_;
|
||||
|
||||
SharedPtr<QTimeLine> fader_;
|
||||
QBasicTimer fader_fudge_timer_;
|
||||
bool use_fudge_timer_;
|
||||
|
|
Loading…
Reference in New Issue