#include <QLoggingCategory>
Q_LOGGING_CATEGORY(mpvBackend, "mpv")
+Q_LOGGING_CATEGORY(mpvVerboseBackend, "mpv.verbose")
Q_LOGGING_CATEGORY(mpvLog, "mpv.log")
static constexpr const char VOLUME[] = "volume";
event = mpv_wait_event(m_handle, 0);
if (event->event_id == MPV_EVENT_NONE)
break;
- qCDebug(mpvBackend).nospace()
+ qCDebug(mpvVerboseBackend).nospace()
<< "Event " << mpv_event_name(event->event_id) << '(' << event->event_id
<< "), error: " << event->error;
switch (event->event_id) {
if (!event->data)
qCWarning(mpvBackend, "PROPERTY CHANGE data is null");
auto property = static_cast<mpv_event_property *>(event->data);
- qCDebug(mpvBackend) << "Property" << property->name << "changed";
+ qCDebug(mpvVerboseBackend) << "Property" << property->name << "changed";
if (property->format == MPV_FORMAT_NONE) {
qCDebug(mpvBackend) << "No data in event";
break;
#include "videoelement.h"
#include <QDebug>
+#include <QLoggingCategory>
int main(int argc, char *argv[]) {
+ QLoggingCategory::setFilterRules(QStringLiteral("*.verbose=false"));
+
QtSingleApplication app(argc, argv);
app.setApplicationDisplayName("AniPlayer");
app.setApplicationName("AniPlayer3");
#include <Windows.h>
#endif
-Q_LOGGING_CATEGORY(playerCategory, "Player")
+Q_LOGGING_CATEGORY(playerCategory, "player")
+Q_LOGGING_CATEGORY(playerVerboseCategory, "player.verbose")
Player::Player(BackendPluginBase *backendPlugin, QObject *parent)
: QObject(parent) {
if (qFuzzyCompare(m_position, position))
return;
- qCDebug(playerCategory) << "Position changed to" << position;
+ qCDebug(playerVerboseCategory) << "Position changed to" << position;
m_position = position;
emit positionChanged(position);
}