diff --git a/ext/libclementine-common/core/logging.cpp b/ext/libclementine-common/core/logging.cpp index e002d74eb..acbc0e2f0 100644 --- a/ext/libclementine-common/core/logging.cpp +++ b/ext/libclementine-common/core/logging.cpp @@ -39,8 +39,7 @@ static Level sDefaultLevel = Level_Debug; static QMap* sClassLevels = nullptr; static QIODevice* sNullDevice = nullptr; -//const char* kDefaultLogLevels = "GstEnginePipeline:2,*:3"; -const char* kDefaultLogLevels = "*:3"; +const char* kDefaultLogLevels = "GstEnginePipeline:2,*:3"; static const char* kMessageHandlerMagic = "__logging_message__"; static const int kMessageHandlerMagicLength = strlen(kMessageHandlerMagic); diff --git a/src/engines/gstengine.cpp b/src/engines/gstengine.cpp index 283b5346f..2c04e23a9 100755 --- a/src/engines/gstengine.cpp +++ b/src/engines/gstengine.cpp @@ -281,8 +281,11 @@ void GstEngine::UpdateScope(int chunk_length) { if (!GST_CLOCK_TIME_IS_VALID(GST_BUFFER_DURATION(latest_buffer_))) return; if (GST_BUFFER_DURATION(latest_buffer_) == 0) return; + GstMapInfo map; + gst_buffer_map(latest_buffer_, &map, GST_MAP_READ); + // determine where to split the buffer - int chunk_density = (GST_BUFFER_SIZE(latest_buffer_) * kNsecPerMsec) / + int chunk_density = (map.size * kNsecPerMsec) / GST_BUFFER_DURATION(latest_buffer_); int chunk_size = chunk_length * chunk_density; @@ -293,7 +296,6 @@ void GstEngine::UpdateScope(int chunk_length) { return; } - gst_buffer_map(latest_buffer_, &map, GST_MAP_READ); const sample_type* source = reinterpret_cast(map.data); sample_type* dest = scope_.data(); source += (chunk_size / sizeof(sample_type)) * scope_chunk_; @@ -733,7 +735,7 @@ GstEngine::PluginDetailsList GstEngine::GetPluginList( GstElementFactory* factory = GST_ELEMENT_FACTORY(p->data); if (QString(gst_element_factory_get_klass(factory)).contains(classname)) { PluginDetails details; - details.name = QString::fromUtf8(GST_PLUGIN_FEATURE_NAME(p->data)); + details.name = QString::fromUtf8(gst_plugin_feature_get_name(p->data)); details.description = QString::fromUtf8( gst_element_factory_get_metadata(factory, GST_ELEMENT_METADATA_DESCRIPTION)); diff --git a/src/engines/gstenginepipeline.cpp b/src/engines/gstenginepipeline.cpp index ad82487cf..e5d9f7520 100644 --- a/src/engines/gstenginepipeline.cpp +++ b/src/engines/gstenginepipeline.cpp @@ -384,9 +384,9 @@ bool GstEnginePipeline::Init() { gst_caps_unref(caps32); // Link the outputs of tee to the queues on each path. - gst_pad_link(gst_element_get_request_pad(tee, "src_%d"), + gst_pad_link(gst_element_get_request_pad(tee, "src_%u"), gst_element_get_static_pad(probe_queue, "sink")); - gst_pad_link(gst_element_get_request_pad(tee, "src_%d"), + gst_pad_link(gst_element_get_request_pad(tee, "src_%u"), gst_element_get_static_pad(audio_queue, "sink")); // Link replaygain elements if enabled. @@ -401,13 +401,13 @@ bool GstEnginePipeline::Init() { audiosink_, nullptr); // Add probes and handlers. - gst_pad_add_buffer_probe(gst_element_get_static_pad(probe_converter, "src"), - GST_PAD_PROBE_TYPE_BUFFER, - HandoffCallback, this, nullptr); + gst_pad_add_probe(gst_element_get_static_pad(probe_converter, "src"), + GST_PAD_PROBE_TYPE_BUFFER, + HandoffCallback, this, nullptr); gst_bus_set_sync_handler(gst_pipeline_get_bus(GST_PIPELINE(pipeline_)), BusCallbackSync, this, nullptr); bus_cb_id_ = gst_bus_add_watch(gst_pipeline_get_bus(GST_PIPELINE(pipeline_)), - BusCallback, this, nullptr); + BusCallback, this); MaybeLinkDecodeToAudio(); diff --git a/src/ui/mainwindow.cpp b/src/ui/mainwindow.cpp index 166f9619f..f4d67fabc 100644 --- a/src/ui/mainwindow.cpp +++ b/src/ui/mainwindow.cpp @@ -156,9 +156,7 @@ #include -#include -#endif - +#ifdef Q_OS_DARWIN // Non exported mac-specific function. void qt_mac_set_dock_menu(QMenu*); #endif