23#include "phononnamespace.h"
24#include "phononnamespace_p.h"
25#include "phonondefs_p.h"
27#include "experimental/videoframe2.h"
31#include <QCoreApplication>
43 const char *phononVersion()
45 return PHONON_VERSION_STR;
48 QString categoryToString(Category c)
52 case Phonon::NoCategory:
54 case Phonon::NotificationCategory:
56 case Phonon::MusicCategory:
58 case Phonon::VideoCategory:
60 case Phonon::CommunicationCategory:
62 case Phonon::GameCategory:
64 case Phonon::AccessibilityCategory:
70 QString categoryToString(CaptureCategory c)
74 case Phonon::NoCaptureCategory:
76 case Phonon::CommunicationCaptureCategory:
78 case Phonon::RecordingCaptureCategory:
80 case Phonon::ControlCaptureCategory:
86 QDebug operator <<(
QDebug dbg,
const Phonon::DiscType &type)
90 dbg.
space() <<
"Phonon::NoDisc";
93 dbg.
space() <<
"Phonon::Cd";
96 dbg.
space() <<
"Phonon::Dvd";
99 dbg.
space() <<
"Phonon::Vcd";
102 dbg.
space() <<
"Phonon::BluRay";
108 QDebug operator <<(
QDebug dbg,
const Phonon::MetaData &metaData)
111 case Phonon::ArtistMetaData:
112 dbg.
space() <<
"Phonon::ArtistMetaData";
114 case Phonon::AlbumMetaData:
115 dbg.
space() <<
"Phonon::AlbumMetaData";
117 case Phonon::TitleMetaData:
118 dbg.
space() <<
"Phonon::TitleMetaData";
120 case Phonon::DateMetaData:
121 dbg.
space() <<
"Phonon::DateMetaData";
123 case Phonon::GenreMetaData:
124 dbg.
space() <<
"Phonon::GenreMetaData";
126 case Phonon::TracknumberMetaData:
127 dbg.
space() <<
"Phonon::TracknumberMetaData";
129 case Phonon::DescriptionMetaData:
130 dbg.
space() <<
"Phonon::DescriptionMetaData";
132 case Phonon::MusicBrainzDiscIdMetaData:
133 dbg.
space() <<
"Phonon::MusicBrainzDiscIdMetaData";
139 QDebug operator <<(
QDebug dbg,
const Phonon::State &state)
142 case Phonon::LoadingState:
143 dbg.
space() <<
"Phonon::LoadingState";
145 case Phonon::StoppedState:
146 dbg.
space() <<
"Phonon::StoppedState";
148 case Phonon::PlayingState:
149 dbg.
space() <<
"Phonon::PlayingState";
151 case Phonon::BufferingState:
152 dbg.
space() <<
"Phonon::BufferingState";
154 case Phonon::PausedState:
155 dbg.
space() <<
"Phonon::PausedState";
157 case Phonon::ErrorState:
158 dbg.
space() <<
"Phonon::ErrorState";
164 QDebug operator <<(
QDebug dbg,
const Phonon::Category &category)
166 dbg.
space() << categoryToString(category);
170 QDebug operator <<(
QDebug dbg,
const Phonon::CaptureCategory &category)
172 dbg.
space() << categoryToString(category);
176 QDebug operator <<(
QDebug dbg,
const Phonon::Capture::DeviceType &type)
179 case Phonon::Capture::AudioType:
180 dbg.
space() <<
"Phonon::Capture::AudioType";
182 case Phonon::Capture::VideoType:
183 dbg.
space() <<
"Phonon::Capture::VideoType";
189 QDebug operator <<(
QDebug dbg,
const Phonon::ErrorType &errorType)
192 case Phonon::NoError:
193 dbg.
space() <<
"Phonon::NoError";
195 case Phonon::NormalError:
196 dbg.
space() <<
"Phonon::NormalError";
198 case Phonon::FatalError:
199 dbg.
space() <<
"Phonon::FatalError";
206static int registerPhononMetaTypes()
208 qRegisterMetaType<Phonon::State>();
209 qRegisterMetaType<Phonon::ErrorType>();
210 qRegisterMetaType<Phonon::Category>();
211 qRegisterMetaType<Phonon::CaptureCategory>();
214 qRegisterMetaType<QList<int> >();
215#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
216 qRegisterMetaTypeStreamOperators<QList<int> >(
"QList<int>");
218 qRegisterMetaType<Phonon::Experimental::VideoFrame2>();
220 qRegisterMetaType<Phonon::DeviceAccess>();
221#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
222 qRegisterMetaTypeStreamOperators<Phonon::DeviceAccess>(
"Phonon::DeviceAccess");
224 qRegisterMetaType<Phonon::DeviceAccessList>();
225#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
226 qRegisterMetaTypeStreamOperators<Phonon::DeviceAccessList>(
"Phonon::DeviceAccessList");
231#ifdef Q_CONSTRUCTOR_FUNCTION
232Q_CONSTRUCTOR_FUNCTION(registerPhononMetaTypes)
234static const int _Phonon_registerMetaTypes = registerPhononMetaTypes();
QString translate(const char *context, const char *sourceText, const char *disambiguation, int n)