| 1 | /*
|
|---|
| 2 | This file is part of the KDE project
|
|---|
| 3 | Copyright (C) 2005-2007 Matthias Kretz <kretz@kde.org>
|
|---|
| 4 | Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
|
|---|
| 5 | Contact: Qt Software Information (qt-info@nokia.com)
|
|---|
| 6 |
|
|---|
| 7 | This library is free software; you can redistribute it and/or
|
|---|
| 8 | modify it under the terms of the GNU Library General Public
|
|---|
| 9 | License version 2 as published by the Free Software Foundation.
|
|---|
| 10 |
|
|---|
| 11 | This library is distributed in the hope that it will be useful,
|
|---|
| 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|---|
| 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|---|
| 14 | Library General Public License for more details.
|
|---|
| 15 |
|
|---|
| 16 | You should have received a copy of the GNU Library General Public License
|
|---|
| 17 | along with this library; see the file COPYING.LIB. If not, write to
|
|---|
| 18 | the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
|---|
| 19 | Boston, MA 02110-1301, USA.
|
|---|
| 20 | */
|
|---|
| 21 |
|
|---|
| 22 |
|
|---|
| 23 | /*!
|
|---|
| 24 | \enum Phonon::DiscType
|
|---|
| 25 | Enum to identify the media discs supported by MediaObject.
|
|---|
| 26 |
|
|---|
| 27 | \value NoDisc
|
|---|
| 28 | No disc was selected. This is only useful as a return value from
|
|---|
| 29 | MediaSource::diskType().
|
|---|
| 30 | \value Cd Identifies Audio CDs.
|
|---|
| 31 | \value Dvd Identifies DVDs (not arbitrary data DVDs, only movie DVDs).
|
|---|
| 32 | \value Vcd Identifies Video CDs.
|
|---|
| 33 |
|
|---|
| 34 | \sa MediaSource, MediaObject
|
|---|
| 35 | */
|
|---|
| 36 |
|
|---|
| 37 | /*!
|
|---|
| 38 | \enum Phonon::MetaData
|
|---|
| 39 |
|
|---|
| 40 | Provided as keys for Phonon::MediaObject::metaData(). The enum
|
|---|
| 41 | values matches strings defined in the Ogg Vorbis specification
|
|---|
| 42 |
|
|---|
| 43 | \value ArtistMetaData
|
|---|
| 44 | \value AlbumMetaData
|
|---|
| 45 | \value TitleMetaData
|
|---|
| 46 | \value DateMetaData
|
|---|
| 47 | \value GenreMetaData
|
|---|
| 48 | \value TracknumberMetaData
|
|---|
| 49 | \value DescriptionMetaData
|
|---|
| 50 | \value MusicBrainzDiscIdMetaData
|
|---|
| 51 | */
|
|---|
| 52 |
|
|---|
| 53 | /*!
|
|---|
| 54 | \enum Phonon::State
|
|---|
| 55 | \since 4.4
|
|---|
| 56 |
|
|---|
| 57 | The state enum describes the different states a media object can
|
|---|
| 58 | take. Several functions of \l{Phonon::}{MediaObject} are
|
|---|
| 59 | asynchronous, so even if a you have requested a state change
|
|---|
| 60 | through a function call, e.g., through
|
|---|
| 61 | \l{Phonon::MediaObject::}{play()}, you cannot be sure that the
|
|---|
| 62 | change has taken place before you receive the
|
|---|
| 63 | \l{Phonon::MediaObject::}{stateChanged()} signal.
|
|---|
| 64 |
|
|---|
| 65 | A media object can at any time change into any state, regardless
|
|---|
| 66 | of the state it previously had. \omit In the
|
|---|
| 67 | \l{Phonon::}{MediaObject} class description explains the typical
|
|---|
| 68 | state changes in the life of a media object. \endomit
|
|---|
| 69 |
|
|---|
| 70 | \value LoadingState
|
|---|
| 71 | After construction it might take a while before the media object
|
|---|
| 72 | is ready to \l{Phonon::MediaObject::}{play()}. This state is
|
|---|
| 73 | commonly used by backends to initialize the \l{Phonon
|
|---|
| 74 | Overview}{media graph} and loading the source. When
|
|---|
| 75 | the object leaves the loading state, it will enter the
|
|---|
| 76 | StoppedState unless an error occurred or another state is
|
|---|
| 77 | requested through a function call, e.g.,
|
|---|
| 78 | \l{Phonon::}{MediaObject::play()}.
|
|---|
| 79 |
|
|---|
| 80 | \value StoppedState
|
|---|
| 81 | In the stopped state, the media object is ready to play its
|
|---|
| 82 | current media source. The current
|
|---|
| 83 | \l{MediaObject::seek()}{position} in the media stream is then 0.
|
|---|
| 84 |
|
|---|
| 85 | \value PlayingState
|
|---|
| 86 | The media object is playing back its media source.
|
|---|
| 87 |
|
|---|
| 88 | \value BufferingState
|
|---|
| 89 | The Player is waiting for data to be able to start or continue
|
|---|
| 90 | playing. This state is commonly used to wait for media data over a
|
|---|
| 91 | network connection.
|
|---|
| 92 |
|
|---|
| 93 | \value PausedState
|
|---|
| 94 | The media player has currently paused its playback, i.e., it
|
|---|
| 95 | stops playing but keeps the current playback position in the
|
|---|
| 96 | stream.
|
|---|
| 97 |
|
|---|
| 98 | \value ErrorState
|
|---|
| 99 | When a media object enters the error state a problem with the
|
|---|
| 100 | playback has occurred. The possible errors are grouped into
|
|---|
| 101 | two categories by Phonon::ErrorType, and the type can be
|
|---|
| 102 | queried through \l{Phonon::MediaObject::}{errorType()}. A
|
|---|
| 103 | \l{Phonon::}{FatalError} implies that the playback
|
|---|
| 104 | cannot continue, but one can still try with a new media
|
|---|
| 105 | source. With a \l{Phonon::}{NormalError} it might
|
|---|
| 106 | be possible to continue playback, and a media object may
|
|---|
| 107 | therefore change state from the ErrorState.
|
|---|
| 108 |
|
|---|
| 109 | \sa MediaObject
|
|---|
| 110 | */
|
|---|
| 111 |
|
|---|
| 112 | /*!
|
|---|
| 113 | \enum Phonon::Category
|
|---|
| 114 |
|
|---|
| 115 | Sets the category your program should be listed in in the mixer.
|
|---|
| 116 |
|
|---|
| 117 | \value NoCategory
|
|---|
| 118 | Will make use of the default device.
|
|---|
| 119 | \value NotificationCategory
|
|---|
| 120 | If the sounds produced are notifications (ping, beep and such) you
|
|---|
| 121 | should use this category.
|
|---|
| 122 | \value MusicCategory
|
|---|
| 123 | If your application is a music player (like a jukebox or media player
|
|---|
| 124 | playing an audio file).
|
|---|
| 125 | \value VideoCategory
|
|---|
| 126 | If the sound is the audio channel of a video.
|
|---|
| 127 | \value CommunicationCategory
|
|---|
| 128 | If your applications produces sounds from communication with somebody
|
|---|
| 129 | else (VoIP, voice chat).
|
|---|
| 130 | \value GameCategory
|
|---|
| 131 | Sound produced by a computer game should go into this category.
|
|---|
| 132 | \value AccessibilityCategory
|
|---|
| 133 | Sounds produced for accessibility (e.g., Text-To-Speech)
|
|---|
| 134 | \omitvalue LastCategory
|
|---|
| 135 | Holds the largest value of categories.
|
|---|
| 136 | \omitvalue AccessibilityCategory
|
|---|
| 137 |
|
|---|
| 138 | A Jukebox will set this to Music, a VoIP program to Communication, a
|
|---|
| 139 | DVD player to video, and so on.
|
|---|
| 140 |
|
|---|
| 141 | \note These categories can also become useful for an application that
|
|---|
| 142 | controls the volumes automatically, like turning down the music when a call
|
|---|
| 143 | comes in, or turning down the notifications when the media player knows
|
|---|
| 144 | it's playing classical music.
|
|---|
| 145 | */
|
|---|
| 146 |
|
|---|
| 147 | /*!
|
|---|
| 148 | \enum Phonon::ErrorType
|
|---|
| 149 |
|
|---|
| 150 | This enum describes the severity when an error has occurred during
|
|---|
| 151 | playback.
|
|---|
| 152 |
|
|---|
| 153 | After a media object has entered the \l{Phonon::}{ErrorState}, one
|
|---|
| 154 | can query the type of error from
|
|---|
| 155 | \l{Phonon::}{MediaObject::errorType()}. Note that you should query
|
|---|
| 156 | the error when receiving the
|
|---|
| 157 | \l{Phonon::}{MediaObject::stateChanged()} signal, because the
|
|---|
| 158 | error type will be lost if the media object leaves the error
|
|---|
| 159 | state.
|
|---|
| 160 |
|
|---|
| 161 | \value NoError No error. MediaObject::errorType() returns this if
|
|---|
| 162 | MediaObject::state() != Phonon::ErrorState.
|
|---|
| 163 |
|
|---|
| 164 | \value NormalError An error has occurred with the playback of the current
|
|---|
| 165 | source. It might be possible to continue playback, for instance, if only the
|
|---|
| 166 | audio stream in a video cannot be played back. The media object will then
|
|---|
| 167 | leave the error state again.
|
|---|
| 168 |
|
|---|
| 169 | \value FatalError. Something important does not work. Your program cannot continue
|
|---|
| 170 | the playback of the current source, but it might be possible to try another.
|
|---|
| 171 |
|
|---|
| 172 | \sa MediaObject::errorType()
|
|---|
| 173 | */
|
|---|
| 174 |
|
|---|
| 175 | /*!
|
|---|
| 176 | \fn QString Phonon::categoryToString(Category c)
|
|---|
| 177 |
|
|---|
| 178 | Returns a (translated) string to show to the user identifying the given
|
|---|
| 179 | Category (\a c).
|
|---|
| 180 | */
|
|---|
| 181 |
|
|---|
| 182 | /*!
|
|---|
| 183 | \enum Phonon::ObjectDescriptionType
|
|---|
| 184 | \relates Phonon::ObjectDescription
|
|---|
| 185 |
|
|---|
| 186 | This enum defines the type of information that is contained in a
|
|---|
| 187 | \l{Phonon::}{ObjectDescription} object.
|
|---|
| 188 |
|
|---|
| 189 | \value AudioOutputDeviceType An audio output device (\l{Phonon::}{AudioOutputDevice}).
|
|---|
| 190 | This can be soundcards (with different drivers),
|
|---|
| 191 | sound servers, or other virtual outputs like playback on a different
|
|---|
| 192 | computer on the network.
|
|---|
| 193 |
|
|---|
| 194 | \value EffectType An audio effect (\l{Phonon::}{EffectDescription}).
|
|---|
| 195 | \omitvalue SubtitleType
|
|---|
| 196 | \omitvalue AudioCaptureDeviceType
|
|---|
| 197 | \omitvalue AudioChannelType
|
|---|
| 198 | */
|
|---|
| 199 |
|
|---|
| 200 | /*!
|
|---|
| 201 | \typedef Phonon::AudioOutputDevice
|
|---|
| 202 | \relates Phonon::ObjectDescription
|
|---|
| 203 |
|
|---|
| 204 | This typedef of \l{Phonon::}{ObjectDescription} describes an audio output
|
|---|
| 205 | device, such as soundcards (with different drivers), sound servers, or other
|
|---|
| 206 | virtual outputs like playback on a different computer on the network.
|
|---|
| 207 |
|
|---|
| 208 | \omit
|
|---|
| 209 | For Hardware devices the backend should use libkaudiodevicelist
|
|---|
| 210 | (AudioDevice and AudioDeviceEnumerator) which will list removable
|
|---|
| 211 | devices even when they are unplugged and provide a unique identifier
|
|---|
| 212 | that can make backends use the same identifiers.
|
|---|
| 213 | \endomit
|
|---|
| 214 |
|
|---|
| 215 | A list of available devices is given by the backend with
|
|---|
| 216 | Backendcapabilities::availableAudioOutputDevices()
|
|---|
| 217 |
|
|---|
| 218 | \snippet doc/src/snippets/phononobjectdescription.cpp 1
|
|---|
| 219 |
|
|---|
| 220 | */
|
|---|
| 221 |
|
|---|
| 222 | /*!
|
|---|
| 223 | \fn Phonon::phononVersion()
|
|---|
| 224 | \inmodule Phonon
|
|---|
| 225 | \since 4.5
|
|---|
| 226 |
|
|---|
| 227 | Returns the Phonon version.
|
|---|
| 228 | */
|
|---|
| 229 |
|
|---|
| 230 | /*!
|
|---|
| 231 | \class Phonon::ObjectDescription
|
|---|
| 232 | \inmodule Phonon
|
|---|
| 233 | \inheaderfile Phonon/ObjectDescription
|
|---|
| 234 | \since 4.4
|
|---|
| 235 | \brief The ObjectDescription class provides information about Phonon objects.
|
|---|
| 236 |
|
|---|
| 237 | Phonon currently uses this class to describe audio effects and
|
|---|
| 238 | audio output devices - using the typedefs AudioOutputDevice and
|
|---|
| 239 | EffectDescription. The type of an ObjectDescription is also
|
|---|
| 240 | described through the \l{Phonon::}{ObjectDescriptionType} enum.
|
|---|
| 241 | Objects of the same \l{Phonon::ObjectDescriptionType}{type} are
|
|---|
| 242 | uniquely identified by an index().
|
|---|
| 243 |
|
|---|
| 244 | The class gives a description() and a name() of the object, both
|
|---|
| 245 | of which are strings appropriate for end users of a Phonon
|
|---|
| 246 | application. You can also check whether the device or effect
|
|---|
| 247 | described is \l{isValid()}{valid}. This does not guarantee that
|
|---|
| 248 | the device or effect functions as expected, but that the
|
|---|
| 249 | ObjectDescription describes an existing device or effect.
|
|---|
| 250 |
|
|---|
| 251 | Audio output devices and effect descriptions are used to select
|
|---|
| 252 | the audio output device to be used for playback and to create
|
|---|
| 253 | effects; we show examples of this in the snippet below. The
|
|---|
| 254 | available descriptions can be fetched with
|
|---|
| 255 | \l{Phonon::BackendCapabilities::}{availableAudioOutputDevices()}
|
|---|
| 256 | and \l{Phonon::BackendCapabilities::}{availableAudioEffects()}
|
|---|
| 257 | static functions in the Phonon::BackendCapabilities namespace
|
|---|
| 258 |
|
|---|
| 259 | \snippet doc/src/snippets/phononobjectdescription.cpp 0
|
|---|
| 260 |
|
|---|
| 261 | Other types of ObjectDescriptions might be possible in the future,
|
|---|
| 262 | e.g., descriptions of audio capture devices, such as microphones.
|
|---|
| 263 |
|
|---|
| 264 | \omit Not implemented yet.
|
|---|
| 265 | Need a new paragraph on that some descriptions 'belong
|
|---|
| 266 | together', such as chained audio effects.
|
|---|
| 267 |
|
|---|
| 268 | Some parts give the end user choices, e.g. what source to capture
|
|---|
| 269 | audio from. These choices are described by the name and
|
|---|
| 270 | description methods of this class and identified with the id
|
|---|
| 271 | method. Subclasses then define additional information like which
|
|---|
| 272 | audio and video choices belong together. \endomit
|
|---|
| 273 |
|
|---|
| 274 | \sa Phonon::AudioOutputDevice, Phonon::EffectDescription, {Capabilities Example}, {Phonon Module}
|
|---|
| 275 | */
|
|---|
| 276 |
|
|---|
| 277 | /*!
|
|---|
| 278 | \fn Phonon::ObjectDescription::ObjectDescription()
|
|---|
| 279 | \brief constructs a new object description.
|
|---|
| 280 | \internal
|
|---|
| 281 | */
|
|---|
| 282 |
|
|---|
| 283 | /*!
|
|---|
| 284 | \fn Phonon::ObjectDescription::ObjectDescription (int index, const QHash<QByteArray, QVariant> & properties)
|
|---|
| 285 | \internal
|
|---|
| 286 | */
|
|---|
| 287 |
|
|---|
| 288 | /*!
|
|---|
| 289 | \fn Phonon::ObjectDescription::ObjectDescription(const QExplicitlySharedDataPointer<ObjectDescriptionData> &dd)
|
|---|
| 290 | \internal
|
|---|
| 291 | */
|
|---|
| 292 |
|
|---|
| 293 | /*!
|
|---|
| 294 | \fn static inline ObjectDescription<T> Phonon::ObjectDescription::fromIndex(int index)
|
|---|
| 295 | \internal
|
|---|
| 296 |
|
|---|
| 297 | \omit Currently indices are not unique for all ObjectDescription types, making
|
|---|
| 298 | the behavior of this function undefined. \endomit
|
|---|
| 299 |
|
|---|
| 300 | Returns a new description object that describes the
|
|---|
| 301 | device/effect/codec/... with the given \a index.
|
|---|
| 302 | */
|
|---|
| 303 |
|
|---|
| 304 | /*!
|
|---|
| 305 | \fn inline bool Phonon::ObjectDescription::operator==(const ObjectDescription &otherDescription) const
|
|---|
| 306 |
|
|---|
| 307 | Returns \c true if this ObjectDescription describes the same
|
|---|
| 308 | object as \a otherDescription; otherwise, returns \c false.
|
|---|
| 309 | */
|
|---|
| 310 |
|
|---|
| 311 | /*!
|
|---|
| 312 | \fn inline bool Phonon::ObjectDescription::operator!=(const ObjectDescription &otherDescription) const
|
|---|
| 313 | Returns \c false if this ObjectDescription describes the same
|
|---|
| 314 | as \a otherDescription; otherwise, returns \c true.
|
|---|
| 315 | */
|
|---|
| 316 |
|
|---|
| 317 | /*!
|
|---|
| 318 | \fn inline QString Phonon::ObjectDescription::name() const
|
|---|
| 319 |
|
|---|
| 320 | Returns a string appropriate for a user to select between
|
|---|
| 321 | object descriptions, e.g., from a QComboBox.
|
|---|
| 322 |
|
|---|
| 323 | \sa description()
|
|---|
| 324 | */
|
|---|
| 325 |
|
|---|
| 326 | /*!
|
|---|
| 327 | \fn inline QString Phonon::ObjectDescription::description() const
|
|---|
| 328 |
|
|---|
| 329 | Returns a more extensive description than the name() function.
|
|---|
| 330 |
|
|---|
| 331 | For example, in the case of \l{Phonon::}{AudioOutputDevice}s, this
|
|---|
| 332 | text should make clear which sound source is described; this is
|
|---|
| 333 | sometimes hard to describe or understand from just the name.
|
|---|
| 334 |
|
|---|
| 335 | The text is appropriate to present to an end user in for example
|
|---|
| 336 | tool tips of items, with the name()'s as text, in a QComboBox.
|
|---|
| 337 |
|
|---|
| 338 | */
|
|---|
| 339 |
|
|---|
| 340 | /*!
|
|---|
| 341 | \fn inline QVariant Phonon::ObjectDescription::property(const char *name) const
|
|---|
| 342 |
|
|---|
| 343 | Returns the property named \a name. A property can be used for
|
|---|
| 344 | extended information, such as the manufacturer of a sound card. The
|
|---|
| 345 | information will usually be given as text.
|
|---|
| 346 |
|
|---|
| 347 | If the property is not set an invalid QVariant is returned.
|
|---|
| 348 |
|
|---|
| 349 | Qt's backends do not use properties at the time of this writing.
|
|---|
| 350 |
|
|---|
| 351 | \sa propertyNames()
|
|---|
| 352 | */
|
|---|
| 353 |
|
|---|
| 354 | /*!
|
|---|
| 355 | \fn inline QList<QByteArray> Phonon::ObjectDescription::propertyNames() const
|
|---|
| 356 |
|
|---|
| 357 | Properties can be used for extended information about a
|
|---|
| 358 | ObjectDescription, e.g., a manufacturer of a sound card. The
|
|---|
| 359 | information will usually be given text.
|
|---|
| 360 |
|
|---|
| 361 | This function returns all names that return valid data when
|
|---|
| 362 | property() is called.
|
|---|
| 363 |
|
|---|
| 364 | Currently, Qt backends do not use properties for their object
|
|---|
| 365 | descriptions.
|
|---|
| 366 |
|
|---|
| 367 | \sa property()
|
|---|
| 368 | */
|
|---|
| 369 |
|
|---|
| 370 | /*!
|
|---|
| 371 | \fn inline bool Phonon::ObjectDescription::isValid() const
|
|---|
| 372 |
|
|---|
| 373 | Returns true if the device or effect described exists.
|
|---|
| 374 |
|
|---|
| 375 | An ObjectDescription that is invalid, will also have an
|
|---|
| 376 | index() of -1.
|
|---|
| 377 |
|
|---|
| 378 | \sa index()
|
|---|
| 379 | */
|
|---|
| 380 |
|
|---|
| 381 | /*!
|
|---|
| 382 | \fn inline int Phonon::ObjectDescription::index() const
|
|---|
| 383 |
|
|---|
| 384 | Returns a unique identifier for this ObjectDescription. Used
|
|---|
| 385 | internally to distinguish between the descriptions.
|
|---|
| 386 |
|
|---|
| 387 | Notice that the identifiers are only unique to the type of
|
|---|
| 388 | description, e.g., \l{Phonon::}{AudioOutputDevice} or
|
|---|
| 389 | \l{Phonon::}{EffectDescription}.
|
|---|
| 390 | */
|
|---|
| 391 |
|
|---|
| 392 | /*!
|
|---|
| 393 | \class Phonon::ObjectDescriptionPrivate
|
|---|
| 394 | \inmodule Phonon
|
|---|
| 395 | \since 4.4
|
|---|
| 396 | \internal
|
|---|
| 397 |
|
|---|
| 398 | */
|
|---|
| 399 |
|
|---|
| 400 | /*!
|
|---|
| 401 | \class Phonon::StreamInterface
|
|---|
| 402 | \inmodule Phonon
|
|---|
| 403 | \since 4.4
|
|---|
| 404 | \brief Backend interface to handle media streams (AbstractMediaStream).
|
|---|
| 405 | \internal
|
|---|
| 406 | */
|
|---|
| 407 |
|
|---|
| 408 | /*!
|
|---|
| 409 | \fn virtual Phonon::StreamInterface::~StreamInterface()
|
|---|
| 410 | */
|
|---|
| 411 |
|
|---|
| 412 | /*!
|
|---|
| 413 | \fn virtual void Phonon::StreamInterface::writeData(const QByteArray &data) = 0
|
|---|
| 414 | \internal
|
|---|
| 415 | */
|
|---|
| 416 |
|
|---|
| 417 | /*!
|
|---|
| 418 | \fn virtual void Phonon::StreamInterface::endOfData() = 0
|
|---|
| 419 | \internal
|
|---|
| 420 | */
|
|---|
| 421 |
|
|---|
| 422 | /*!
|
|---|
| 423 | \fn virtual void Phonon::StreamInterface::setStreamSize(qint64 newSize) = 0
|
|---|
| 424 | \internal
|
|---|
| 425 | */
|
|---|
| 426 |
|
|---|
| 427 | /*!
|
|---|
| 428 | \fn virtual void Phonon::StreamInterface::setStreamSeekable(bool s) = 0
|
|---|
| 429 | \internal
|
|---|
| 430 | */
|
|---|
| 431 |
|
|---|
| 432 | /*!
|
|---|
| 433 | \fn void Phonon::StreamInterface::connectToSource(const MediaSource &mediaSource)
|
|---|
| 434 | \internal
|
|---|
| 435 | */
|
|---|
| 436 |
|
|---|
| 437 | /*!
|
|---|
| 438 | \fn void Phonon::StreamInterface::needData()
|
|---|
| 439 | \internal
|
|---|
| 440 | */
|
|---|
| 441 |
|
|---|
| 442 | /*!
|
|---|
| 443 | \fn void Phonon::StreamInterface::enoughData()
|
|---|
| 444 | \internal
|
|---|
| 445 | */
|
|---|
| 446 |
|
|---|
| 447 | /*!
|
|---|
| 448 | \fn void Phonon::StreamInterface::seekStream(qint64)
|
|---|
| 449 | \internal
|
|---|
| 450 | */
|
|---|
| 451 |
|
|---|
| 452 | /*!
|
|---|
| 453 | \fn void Phonon::StreamInterface::reset()
|
|---|
| 454 | \internal
|
|---|
| 455 | */
|
|---|
| 456 |
|
|---|
| 457 | /*!
|
|---|
| 458 | \fn Phonon::StreamInterface::StreamInterface()
|
|---|
| 459 | \internal
|
|---|
| 460 | \omit
|
|---|
| 461 | For subclasses.
|
|---|
| 462 | \endomit
|
|---|
| 463 | */
|
|---|
| 464 |
|
|---|
| 465 | /*!
|
|---|
| 466 | \class StreamInterfacePrivate
|
|---|
| 467 | \inmodule Phonon
|
|---|
| 468 | \internal
|
|---|
| 469 | */
|
|---|
| 470 |
|
|---|
| 471 | /*!
|
|---|
| 472 | \class Phonon::AbstractVideoOutput
|
|---|
| 473 | \inmodule Phonon
|
|---|
| 474 | \internal
|
|---|
| 475 | \since 4.4
|
|---|
| 476 | \brief The AbstractVideoOutput class is the common base class for all video output classes.
|
|---|
| 477 |
|
|---|
| 478 | \sa VideoWidget
|
|---|
| 479 | */
|
|---|
| 480 |
|
|---|
| 481 | /*!
|
|---|
| 482 | \namespace Phonon::Experimental
|
|---|
| 483 | \internal
|
|---|
| 484 | */
|
|---|
| 485 |
|
|---|
| 486 | /*!
|
|---|
| 487 | \fn Phonon::AbstractVideoOutput::AbstractVideoOutput(AbstractVideoOutputPrivate &d)
|
|---|
| 488 | \internal
|
|---|
| 489 |
|
|---|
| 490 | Constructor that is called from derived classes.
|
|---|
| 491 |
|
|---|
| 492 | \param parent Standard QObject parent.
|
|---|
| 493 | */
|
|---|
| 494 |
|
|---|
| 495 | /*!
|
|---|
| 496 | \class Phonon::AbstractVideoOutputPrivate
|
|---|
| 497 | \inmodule Phonon
|
|---|
| 498 | \internal
|
|---|
| 499 | \since 4.4
|
|---|
| 500 | */
|
|---|
| 501 |
|
|---|
| 502 | /*!
|
|---|
| 503 | \class Phonon::VolumeFaderEffect
|
|---|
| 504 | \inmodule Phonon
|
|---|
| 505 | \internal
|
|---|
| 506 | \since 4.4
|
|---|
| 507 |
|
|---|
| 508 | This effect differs from gradually changing the output volume in that
|
|---|
| 509 | a dedicated effect can change the volume in the smallest possible
|
|---|
| 510 | steps while every other volume control will make more or less
|
|---|
| 511 | noticeable steps.
|
|---|
| 512 |
|
|---|
| 513 | \sa AudioOutput::volume()
|
|---|
| 514 | */
|
|---|
| 515 |
|
|---|
| 516 | /*!
|
|---|
| 517 | \property Phonon::VolumeFaderEffect::volume
|
|---|
| 518 |
|
|---|
| 519 | This is the current volume of the output as voltage factor.
|
|---|
| 520 | Setting this property changes the volume immediately.
|
|---|
| 521 |
|
|---|
| 522 | 1.0 means 100%, 0.5 means 50% voltage/25% power, 0.0 means 0%
|
|---|
| 523 |
|
|---|
| 524 | \sa volumeDecibel
|
|---|
| 525 | */
|
|---|
| 526 |
|
|---|
| 527 | /*!
|
|---|
| 528 | \property Phonon::VolumeFaderEffect::volumeDecibel
|
|---|
| 529 |
|
|---|
| 530 | This is the current volume of the output in decibel.
|
|---|
| 531 | Setting this property changes the volume immediately.
|
|---|
| 532 |
|
|---|
| 533 | 0 dB means no change in volume, -6dB means an attenuation of the
|
|---|
| 534 | voltage to 50% and an attenuation of the power to 25%, -inf dB means
|
|---|
| 535 | silence.
|
|---|
| 536 |
|
|---|
| 537 | \sa volume
|
|---|
| 538 | */
|
|---|
| 539 |
|
|---|
| 540 | /*!
|
|---|
| 541 | \property Phonon::VolumeFaderEffect::fadeCurve
|
|---|
| 542 |
|
|---|
| 543 | This property holds the fade curve to be used for the fadeIn(), fadeOut()
|
|---|
| 544 | and fadeTo() slots.
|
|---|
| 545 |
|
|---|
| 546 | Defaults to Fade3Decibel.
|
|---|
| 547 |
|
|---|
| 548 | \sa FadeCurve
|
|---|
| 549 | */
|
|---|
| 550 |
|
|---|
| 551 | /*!
|
|---|
| 552 | \enum Phonon::VolumeFaderEffect::FadeCurve
|
|---|
| 553 | Determines the curve of the volume change.
|
|---|
| 554 |
|
|---|
| 555 | \value Fade3Decibel Crossfade curve/fast fade out.
|
|---|
| 556 | This is the default fade curve.
|
|---|
| 557 | \value Fade6Decibel Linear fade out.
|
|---|
| 558 | \value Fade9Decibel Slow fade out.
|
|---|
| 559 | \value Fade12Decibel A more extreme version of the -9dB fade.
|
|---|
| 560 |
|
|---|
| 561 | \bold{Notes:}
|
|---|
| 562 |
|
|---|
| 563 | \c Fade3Decibel is often the best fade for a crossfade, as after half
|
|---|
| 564 | of the time the volume reached -3dB. This means that half the
|
|---|
| 565 | possible power (which is proportional to the square of the
|
|---|
| 566 | voltage) is reached. Summed, the maximum power of two audio
|
|---|
| 567 | signals fading with a -3dB curve will always be equal.
|
|---|
| 568 |
|
|---|
| 569 | For fading in or out the -3dB curve is too abrupt in the end.
|
|---|
| 570 |
|
|---|
| 571 | With a -6dB fade curve, a volume of -6dB is reached after half of
|
|---|
| 572 | the fading time. -6dB is equal to half of the voltage meaning
|
|---|
| 573 | that the voltage multiplier changes linearly from the start
|
|---|
| 574 | of the fade to the end.
|
|---|
| 575 |
|
|---|
| 576 | With the \c Fade9Decibel fade, a volume of -9dB is reached after
|
|---|
| 577 | half of the fade time, so the fade is fast in the beginning and
|
|---|
| 578 | slow at the end. This is a good fade for ending music.
|
|---|
| 579 | */
|
|---|
| 580 |
|
|---|
| 581 | /*!
|
|---|
| 582 | \fn void Phonon::VolumeFaderEffect::fadeIn(int fadeTime)
|
|---|
| 583 |
|
|---|
| 584 | Tells the Fader to change the volume from the current volume to 100%
|
|---|
| 585 | in \a fadeTime milliseconds.
|
|---|
| 586 |
|
|---|
| 587 | Short for \c fadeTo(1.0, fadeTime).
|
|---|
| 588 |
|
|---|
| 589 | \param fadeTime the fade duration in milliseconds
|
|---|
| 590 |
|
|---|
| 591 | \sa fadeTo(), volume
|
|---|
| 592 | */
|
|---|
| 593 |
|
|---|
| 594 | /*!
|
|---|
| 595 | \fn void Phonon::VolumeFaderEffect::fadeOut(int fadeTime)
|
|---|
| 596 |
|
|---|
| 597 | Tells the Fader to change the volume from the current volume to 0%
|
|---|
| 598 | in \a fadeTime milliseconds.
|
|---|
| 599 | Short for \c fadeTo(0.0, fadeTime).
|
|---|
| 600 |
|
|---|
| 601 | \param fadeTime the fade duration in milliseconds
|
|---|
| 602 |
|
|---|
| 603 | \sa fadeTo
|
|---|
| 604 | */
|
|---|
| 605 |
|
|---|
| 606 | /*!
|
|---|
| 607 | \fn void Phonon::VolumeFaderEffect::fadeTo(float volume, int fadeTime)
|
|---|
| 608 |
|
|---|
| 609 | Tells the Fader to change the volume from the current value to
|
|---|
| 610 | \a volume in \a fadeTime milliseconds.
|
|---|
| 611 |
|
|---|
| 612 | \sa fadeIn(), fadeOut()
|
|---|
| 613 | */
|
|---|
| 614 |
|
|---|
| 615 | /*!
|
|---|
| 616 | \class Phonon::VolumeFaderEffectPrivate
|
|---|
| 617 | \inmodule Phonon
|
|---|
| 618 | \since 4.4
|
|---|
| 619 | \internal
|
|---|
| 620 | */
|
|---|
| 621 |
|
|---|
| 622 | /*!
|
|---|
| 623 | \class Phonon::VolumeFaderInterface
|
|---|
| 624 | \inmodule Phonon
|
|---|
| 625 | \since 4.4
|
|---|
| 626 | \internal
|
|---|
| 627 | */
|
|---|
| 628 |
|
|---|
| 629 | /*!
|
|---|
| 630 | \fn virtual Phonon::VolumeFaderInterface::~VolumeFaderInterface()
|
|---|
| 631 | \internal
|
|---|
| 632 | */
|
|---|
| 633 |
|
|---|
| 634 | /*!
|
|---|
| 635 | \fn virtual float Phonon::VolumeFaderInterface::volume() const
|
|---|
| 636 | \internal
|
|---|
| 637 | */
|
|---|
| 638 |
|
|---|
| 639 | /*!
|
|---|
| 640 | \fn virtual void Phonon::VolumeFaderInterface::setVolume(float)
|
|---|
| 641 | \internal
|
|---|
| 642 | */
|
|---|
| 643 |
|
|---|
| 644 | /*!
|
|---|
| 645 | \fn virtual Phonon::VolumeFaderEffect::FadeCurve Phonon::VolumeFaderInterface::fadeCurve() const
|
|---|
| 646 | \internal
|
|---|
| 647 | */
|
|---|
| 648 |
|
|---|
| 649 | /*!
|
|---|
| 650 | \fn virtual void Phonon::VolumeFaderInterface::setFadeCurve(Phonon::VolumeFaderEffect::FadeCurve)
|
|---|
| 651 | \internal
|
|---|
| 652 | */
|
|---|
| 653 |
|
|---|
| 654 | /*!
|
|---|
| 655 | \fn virtual void Phonon::VolumeFaderInterface::fadeTo(float, int)
|
|---|
| 656 | \internal
|
|---|
| 657 | */
|
|---|
| 658 |
|
|---|
| 659 | /*!
|
|---|
| 660 | \class Phonon::AbstractMediaStream
|
|---|
| 661 | \inmodule Phonon
|
|---|
| 662 | \internal
|
|---|
| 663 | \since 4.4
|
|---|
| 664 | \brief The AbstractMediaStream class is the base class for custom media data streams.
|
|---|
| 665 | \inheaderfile Phonon/AbstractMediaStream
|
|---|
| 666 |
|
|---|
| 667 | This class is subclassed to provide custom data streams for
|
|---|
| 668 | \l{Phonon::}{MediaSource}s.
|
|---|
| 669 |
|
|---|
| 670 | The \l{Phonon::}{MediaSource} knows how to handle the most common
|
|---|
| 671 | media sources, such as files and CD. If you need to fetch
|
|---|
| 672 | multimedia from other sources, you can reimplement this class,
|
|---|
| 673 | which can be used by a \l{Phonon::}{MediaSource}.
|
|---|
| 674 |
|
|---|
| 675 | When a backend needs more data from the stream, needData() will be
|
|---|
| 676 | called. You must then use writeData() to write the data to the
|
|---|
| 677 | backend. You can either write one time and wait for a new
|
|---|
| 678 | needData() call, or continue to write data until you receive an
|
|---|
| 679 | enoughData() call. When the stream is at its end, call endOfData()
|
|---|
| 680 | instead of writeData().
|
|---|
| 681 |
|
|---|
| 682 | Before the custom stream is passed to a \l{Phonon::}{MediaSource},
|
|---|
| 683 | setStreamSize() needs to be called, and also setStreamSeekable()
|
|---|
| 684 | (if the stream is seekable). A good place to do this work is in
|
|---|
| 685 | the constructor. A seekable stream must also reimplement
|
|---|
| 686 | seekStream().
|
|---|
| 687 |
|
|---|
| 688 | We show two examples. The first writes data repeatedly until it
|
|---|
| 689 | receives the enoughData() call, while the second only writes once
|
|---|
| 690 | and waits for a new needData() call.
|
|---|
| 691 |
|
|---|
| 692 | Example where data is written repeatedly.
|
|---|
| 693 |
|
|---|
| 694 | \snippet doc/src/snippets/code/doc_src_phonon-api.qdoc 0
|
|---|
| 695 |
|
|---|
| 696 | Example where data is written once:
|
|---|
| 697 |
|
|---|
| 698 | \snippet doc/src/snippets/code/doc_src_phonon-api.qdoc 1
|
|---|
| 699 |
|
|---|
| 700 | \sa Phonon::MediaSource, Phonon::MediaObject
|
|---|
| 701 |
|
|---|
| 702 | */
|
|---|
| 703 |
|
|---|
| 704 | /*!
|
|---|
| 705 | \fn Phonon::AbstractMediaStream::AbstractMediaStream(QObject *parent = 0)
|
|---|
| 706 | \internal
|
|---|
| 707 |
|
|---|
| 708 | Constructs an AbstractMediaStream object with the given \a parent.
|
|---|
| 709 |
|
|---|
| 710 | */
|
|---|
| 711 |
|
|---|
| 712 | /*!
|
|---|
| 713 | \fn qint64 Phonon::AbstractMediaStream::streamSize() const
|
|---|
| 714 |
|
|---|
| 715 | Returns the stream size that was set with setStreamSize().
|
|---|
| 716 |
|
|---|
| 717 | A negative value means that the length of the stream cannot be known.
|
|---|
| 718 |
|
|---|
| 719 | Defaults to 0.
|
|---|
| 720 |
|
|---|
| 721 | \sa setStreamSize()
|
|---|
| 722 | */
|
|---|
| 723 |
|
|---|
| 724 | /*!
|
|---|
| 725 | \fn void Phonon::AbstractMediaStream::setStreamSize(qint64 size)
|
|---|
| 726 |
|
|---|
| 727 | Sets the \a size of the stream in number of bytes.
|
|---|
| 728 |
|
|---|
| 729 | A negative value means that the length of the stream cannot be known.
|
|---|
| 730 |
|
|---|
| 731 | Defaults to 0.
|
|---|
| 732 |
|
|---|
| 733 | This function has to be called. A backend will not call needData()
|
|---|
| 734 | until the stream size is set.
|
|---|
| 735 |
|
|---|
| 736 | \sa streamSize()
|
|---|
| 737 |
|
|---|
| 738 | */
|
|---|
| 739 |
|
|---|
| 740 | /*!
|
|---|
| 741 | \fn bool Phonon::AbstractMediaStream::streamSeekable() const
|
|---|
| 742 |
|
|---|
| 743 | Returns whether your data stream is set as seekable.
|
|---|
| 744 |
|
|---|
| 745 | Defaults to \c false.
|
|---|
| 746 |
|
|---|
| 747 | \sa setStreamSeekable()
|
|---|
| 748 |
|
|---|
| 749 | */
|
|---|
| 750 |
|
|---|
| 751 | /*!
|
|---|
| 752 | \fn void Phonon::AbstractMediaStream::setStreamSeekable(bool s)
|
|---|
| 753 |
|
|---|
| 754 | Sets whether your data stream is seekable. \a s should be true if
|
|---|
| 755 | the stream is seekable; otherwise false.
|
|---|
| 756 |
|
|---|
| 757 | Defaults to \c false.
|
|---|
| 758 |
|
|---|
| 759 | If you set this to \c true you have to implement the seekStream()
|
|---|
| 760 | function.
|
|---|
| 761 |
|
|---|
| 762 | \sa streamSeekable()
|
|---|
| 763 | */
|
|---|
| 764 |
|
|---|
| 765 | /*!
|
|---|
| 766 | \fn void Phonon::AbstractMediaStream::writeData(const QByteArray &data)
|
|---|
| 767 |
|
|---|
| 768 | Sends the media \a data to the backend for decoding.
|
|---|
| 769 |
|
|---|
| 770 | Use this function to send data to the backend after needData() has
|
|---|
| 771 | been called.
|
|---|
| 772 |
|
|---|
| 773 | If your stream is a push stream, data should be written until the
|
|---|
| 774 | enoughData() function is called. For a pull stream, write data
|
|---|
| 775 | once before the call to needData() function returns.
|
|---|
| 776 |
|
|---|
| 777 | If the data is depleted, call endOfData() instead of writeData().
|
|---|
| 778 |
|
|---|
| 779 | \warning Don't call this function before the first needData() is emitted.
|
|---|
| 780 |
|
|---|
| 781 | \sa needData(), endOfData()
|
|---|
| 782 |
|
|---|
| 783 | */
|
|---|
| 784 |
|
|---|
| 785 | /*!
|
|---|
| 786 | \fn void Phonon::AbstractMediaStream::endOfData()
|
|---|
| 787 |
|
|---|
| 788 | Tells the backend that the media data stream is at its end.
|
|---|
| 789 |
|
|---|
| 790 | \warning Don't call this function before the first needData() is emitted.
|
|---|
| 791 |
|
|---|
| 792 | \sa writeData(), needData()
|
|---|
| 793 | */
|
|---|
| 794 |
|
|---|
| 795 | /*!
|
|---|
| 796 | \fn void Phonon::AbstractMediaStream::error(Phonon::ErrorType errorType, const QString &errorString)
|
|---|
| 797 |
|
|---|
| 798 | If an I/O error occurs you should call this function to make
|
|---|
| 799 | MediaObject go into ErrorState. \c errorType classifies the error,
|
|---|
| 800 | while \a errorString is a textual description of the error suitable
|
|---|
| 801 | for users of Phonon applications.
|
|---|
| 802 |
|
|---|
| 803 | \sa MediaObject::errorType(), MediaObject::errorString()
|
|---|
| 804 | */
|
|---|
| 805 |
|
|---|
| 806 | /*!
|
|---|
| 807 | \fn virtual void Phonon::AbstractMediaStream::reset() = 0
|
|---|
| 808 |
|
|---|
| 809 | Reimplement this function to reset the stream. Subsequent calls to writeData should start
|
|---|
| 810 | from the first position of the data unless a seek is requested.
|
|---|
| 811 |
|
|---|
| 812 | The function is necessary for the case where a non-seekable MediaStream is
|
|---|
| 813 | played more than once. For a seekable stream the implementation can simply call
|
|---|
| 814 | \snippet doc/src/snippets/code/doc_src_phonon-api.qdoc 2
|
|---|
| 815 |
|
|---|
| 816 | \sa writeData(), needData()
|
|---|
| 817 | */
|
|---|
| 818 |
|
|---|
| 819 | /*!
|
|---|
| 820 | \fn virtual void Phonon::AbstractMediaStream::needData() = 0
|
|---|
| 821 |
|
|---|
| 822 | Reimplement this function to be notified when the backend needs data.
|
|---|
| 823 |
|
|---|
| 824 | When this function is called you should write data to the backend
|
|---|
| 825 | (See writeData()).
|
|---|
| 826 |
|
|---|
| 827 | \sa writeData(), endOfData(), enoughData()
|
|---|
| 828 | */
|
|---|
| 829 |
|
|---|
| 830 | /*!
|
|---|
| 831 | \fn virtual void Phonon::AbstractMediaStream::enoughData()
|
|---|
| 832 |
|
|---|
| 833 | If your stream is a push stream, reimplement this function to be
|
|---|
| 834 | notified when the backend has enough data and your stream object
|
|---|
| 835 | may take a break.
|
|---|
| 836 |
|
|---|
| 837 | This method is important for pushing data to the backend in order
|
|---|
| 838 | to not fill the backend buffer unnecessarily.
|
|---|
| 839 |
|
|---|
| 840 | \sa needData()
|
|---|
| 841 | */
|
|---|
| 842 |
|
|---|
| 843 | /*!
|
|---|
| 844 | \fn virtual void Phonon::AbstractMediaStream::seekStream(qint64 offset)
|
|---|
| 845 |
|
|---|
| 846 | Reimplement this function if your stream is seekable.
|
|---|
| 847 |
|
|---|
| 848 | When this function is called the next call to writeData has to be at the
|
|---|
| 849 | requested \a offset.
|
|---|
| 850 |
|
|---|
| 851 | \warning Do not call the parent implementation.
|
|---|
| 852 |
|
|---|
| 853 | \sa setStreamSeekable(), streamSeekable(), needData()
|
|---|
| 854 | */
|
|---|
| 855 |
|
|---|
| 856 | /*!
|
|---|
| 857 | \class Phonon::BackendInterface
|
|---|
| 858 | \inmodule Phonon
|
|---|
| 859 | \since 4.4
|
|---|
| 860 | \brief Main Backend class interface
|
|---|
| 861 | \internal
|
|---|
| 862 |
|
|---|
| 863 | This interface defines the main factory of the backend. The createObject() function creates all the
|
|---|
| 864 | objects needed by the frontend.
|
|---|
| 865 |
|
|---|
| 866 | The objectDescriptionIndexes and objectDescriptionProperties functions return information about
|
|---|
| 867 | available devices, effects and codecs.
|
|---|
| 868 |
|
|---|
| 869 | An implementation could look like this:
|
|---|
| 870 | \snippet snippets/phonon/samplebackend/main.cpp snippet
|
|---|
| 871 |
|
|---|
| 872 | */
|
|---|
| 873 |
|
|---|
| 874 | /*!
|
|---|
| 875 | \fn virtual Phonon::BackendInterface::~BackendInterface()
|
|---|
| 876 | \internal
|
|---|
| 877 |
|
|---|
| 878 | Silence gcc's warning.
|
|---|
| 879 | */
|
|---|
| 880 |
|
|---|
| 881 | /*!
|
|---|
| 882 | \enum Phonon::BackendInterface::Class
|
|---|
| 883 | \internal
|
|---|
| 884 |
|
|---|
| 885 | Classes that the createObject() function has to handle.
|
|---|
| 886 |
|
|---|
| 887 | \value MediaObjectClass Request to return a \c MediaObject object.
|
|---|
| 888 | \value VolumeFaderEffectClass Request to return a \c VolumeFaderEffect
|
|---|
| 889 | object.
|
|---|
| 890 | \value AudioOutputClass Request to return an \c AudioOutput object.
|
|---|
| 891 | \value AudioDataOutputClass Request to return an \c AudioDataOutput object.
|
|---|
| 892 | \value VisualizationClass Request to return a \c Visualization object.
|
|---|
| 893 | \value VideoDataOutputClass Request to return a \c VideoDataOutput object.
|
|---|
| 894 | \value EffectClass Request to return a \c Effect object.
|
|---|
| 895 | Takes an additional int that specifies the effect ID.
|
|---|
| 896 | \value VideoWidgetClass Request to return a \c VideoWidget object.
|
|---|
| 897 | */
|
|---|
| 898 |
|
|---|
| 899 | /*!
|
|---|
| 900 | \fn virtual QObject *Phonon::BackendInterface::createObject(Class c, QObject *parent, const QList<QVariant> &args = QList<QVariant>()) = 0
|
|---|
| 901 | \internal
|
|---|
| 902 |
|
|---|
| 903 | Returns a new instance of the requested class.
|
|---|
| 904 |
|
|---|
| 905 | \param c The requested class.
|
|---|
| 906 | \param parent The parent object.
|
|---|
| 907 | \param args Additional arguments (documented in Class).
|
|---|
| 908 | */
|
|---|
| 909 |
|
|---|
| 910 |
|
|---|
| 911 | /*!
|
|---|
| 912 | \fn virtual QList<int> Phonon::BackendInterface::objectDescriptionIndexes(ObjectDescriptionType type) const = 0
|
|---|
| 913 | \internal
|
|---|
| 914 |
|
|---|
| 915 | Returns the unique identifiers for the devices/effects/codecs of the given \a type.
|
|---|
| 916 |
|
|---|
| 917 | \param type see ObjectDescriptionType
|
|---|
| 918 | */
|
|---|
| 919 |
|
|---|
| 920 | /*!
|
|---|
| 921 | \fn virtual QHash<QByteArray, QVariant> Phonon::BackendInterface::objectDescriptionProperties(ObjectDescriptionType type, int index) const = 0
|
|---|
| 922 | \internal
|
|---|
| 923 |
|
|---|
| 924 | Given a unique identifier that was returned from objectDescriptionIndexes this function
|
|---|
| 925 | returns a hash mapping property names to values.
|
|---|
| 926 |
|
|---|
| 927 | The property "name" must always be present. All other properties are optional.
|
|---|
| 928 |
|
|---|
| 929 | \table
|
|---|
| 930 | \header \o Property \o Description
|
|---|
| 931 | \row \o name \o The name of the device/effect/codec/...
|
|---|
| 932 | \row \o description \o A text explaining what this device/effect/codec/... is/can do
|
|---|
| 933 | \row \o icon \o An icon name (using the freedesktop naming scheme) or a QIcon for this
|
|---|
| 934 | device/effect/codec/...
|
|---|
| 935 | \row \o available \o A bool telling whether the device is present or unplugged.
|
|---|
| 936 | \endtable
|
|---|
| 937 |
|
|---|
| 938 | \param type see ObjectDescriptionType
|
|---|
| 939 | \param index The unique identifier that is returned from objectDescriptionIndexes
|
|---|
| 940 | */
|
|---|
| 941 |
|
|---|
| 942 | /*!
|
|---|
| 943 | \fn virtual bool Phonon::BackendInterface::startConnectionChange(QSet<QObject *>) = 0;
|
|---|
| 944 | \internal
|
|---|
| 945 |
|
|---|
| 946 | When this function is called the nodes given in the parameter list should
|
|---|
| 947 | not lose any signal data when connections are changed.
|
|---|
| 948 | */
|
|---|
| 949 |
|
|---|
| 950 | /*!
|
|---|
| 951 | \fn virtual bool Phonon::BackendInterface::connectNodes(QObject *, QObject *) = 0
|
|---|
| 952 | \internal
|
|---|
| 953 |
|
|---|
| 954 | Defines a signal connection between the two given nodes.
|
|---|
| 955 | */
|
|---|
| 956 |
|
|---|
| 957 | /*!
|
|---|
| 958 | \fn virtual bool Phonon::BackendInterface::disconnectNodes(QObject *, QObject *) = 0
|
|---|
| 959 | \internal
|
|---|
| 960 |
|
|---|
| 961 | Cuts a signal connection between the two given nodes.
|
|---|
| 962 | */
|
|---|
| 963 |
|
|---|
| 964 | /*!
|
|---|
| 965 | \fn virtual bool Phonon::BackendInterface::endConnectionChange(QSet<QObject *>) = 0
|
|---|
| 966 | \internal
|
|---|
| 967 |
|
|---|
| 968 | When this function is called the nodes given in the parameter list may lose
|
|---|
| 969 | signal data when a port is not connected.
|
|---|
| 970 | */
|
|---|
| 971 |
|
|---|
| 972 | /*!
|
|---|
| 973 | \fn virtual QStringList Phonon::BackendInterface::availableMimeTypes() const = 0
|
|---|
| 974 | \internal
|
|---|
| 975 |
|
|---|
| 976 | Returns all available MIME types.
|
|---|
| 977 | */
|
|---|
| 978 |
|
|---|
| 979 | /*!
|
|---|
| 980 | \class Phonon::MediaSource
|
|---|
| 981 | \inmodule Phonon
|
|---|
| 982 | \inheaderfile Phonon/MediaSource
|
|---|
| 983 | \since 4.4
|
|---|
| 984 | \brief The MediaSource class provides multimedia data for media objects.
|
|---|
| 985 |
|
|---|
| 986 | The MediaSource class manages a source of multimedia content, such
|
|---|
| 987 | as a music or video file, of which data is given to a
|
|---|
| 988 | \l{Phonon::}{MediaObject}.
|
|---|
| 989 |
|
|---|
| 990 | The media source knows how fetch its data from several sources,
|
|---|
| 991 | e.g., from files, a QIODevice, or a CD. The possible source types
|
|---|
| 992 | are described by the \l{MediaSource::}{Type} enum. The type of the
|
|---|
| 993 | source is set by the media source itself, and is dependent on the
|
|---|
| 994 | constructor used to create it. Note that it is possible to provide
|
|---|
| 995 | data from any source by implementing a QIODevice.
|
|---|
| 996 |
|
|---|
| 997 | The class has several functions to acquire information about the
|
|---|
| 998 | source it manages, e.g., fileName() and url(). The return from
|
|---|
| 999 | these functions are dependent on the type() of the media source.
|
|---|
| 1000 |
|
|---|
| 1001 | Normally, a programmer does not need to be concerned with media
|
|---|
| 1002 | sources. It's constructors are implicit, so one can, for instance,
|
|---|
| 1003 | send an URL or filename directly to the constructors of the
|
|---|
| 1004 | \l{Phonon::}{MediaObject}.
|
|---|
| 1005 |
|
|---|
| 1006 | \snippet doc/src/snippets/code/doc_src_phonon-api.qdoc 3
|
|---|
| 1007 |
|
|---|
| 1008 | A MediaSource object cannot be reused for another multimedia
|
|---|
| 1009 | source. It is possible to play the same source again, and also
|
|---|
| 1010 | stop and start a non-seekable media source, such as a radio
|
|---|
| 1011 | stream, with the same MediaSource object.
|
|---|
| 1012 |
|
|---|
| 1013 | \section1 Qt Backends
|
|---|
| 1014 |
|
|---|
| 1015 | Currently, Qt's backends support files in local and remote
|
|---|
| 1016 | locations. Support for other sources, such as CD/DVD, are planned
|
|---|
| 1017 | for the future.
|
|---|
| 1018 |
|
|---|
| 1019 | \sa MediaObject, {Phonon Module}
|
|---|
| 1020 | */
|
|---|
| 1021 |
|
|---|
| 1022 | /*!
|
|---|
| 1023 | \enum Phonon::MediaSource::Type
|
|---|
| 1024 |
|
|---|
| 1025 | Identifies the type of media described by the MediaSource object.
|
|---|
| 1026 |
|
|---|
| 1027 | \value Invalid The MediaSource object does not describe any valid source.
|
|---|
| 1028 | \value LocalFile The MediaSource object describes a local file.
|
|---|
| 1029 | \value Url The MediaSource object describes an URL, which can be either a
|
|---|
| 1030 | local file or a file on the network.
|
|---|
| 1031 | \value Disc The MediaSource object describes a disc, e.g., a CD.
|
|---|
| 1032 | \value Stream The MediaSource object describes a data stream.
|
|---|
| 1033 | This is the type used for \l{QIODevice}s. Note
|
|---|
| 1034 | that a stream opened with a QUrl, will still be of the Url type.
|
|---|
| 1035 |
|
|---|
| 1036 | \sa MediaSource::type()
|
|---|
| 1037 | */
|
|---|
| 1038 |
|
|---|
| 1039 | /*!
|
|---|
| 1040 | \fn Phonon::MediaSource::MediaSource()
|
|---|
| 1041 | \internal
|
|---|
| 1042 |
|
|---|
| 1043 | Creates an invalid MediaSource object.
|
|---|
| 1044 |
|
|---|
| 1045 | \sa Invalid
|
|---|
| 1046 | */
|
|---|
| 1047 |
|
|---|
| 1048 | /*!
|
|---|
| 1049 | \fn Phonon::MediaSource::MediaSource(const QString &fileName)
|
|---|
| 1050 |
|
|---|
| 1051 | Creates a MediaSource object for the file specified by \a
|
|---|
| 1052 | fileName. You can also use this constructor with \l{The Qt
|
|---|
| 1053 | Resource System}{Qt resources}
|
|---|
| 1054 |
|
|---|
| 1055 | \omit
|
|---|
| 1056 | \param fileName file name of a local media file or a Qt resource that was compiled in.
|
|---|
| 1057 | \endomit
|
|---|
| 1058 | */
|
|---|
| 1059 |
|
|---|
| 1060 | /*!
|
|---|
| 1061 | \fn Phonon::MediaSource::MediaSource(const QUrl &url)
|
|---|
| 1062 |
|
|---|
| 1063 | Creates a MediaSource object for a the URL specified by \a url.
|
|---|
| 1064 |
|
|---|
| 1065 | If the multimedia content you would like to play back is on a
|
|---|
| 1066 | remote network location, you should use this constructor; though,
|
|---|
| 1067 | it also possible to specify an URL to a local file.
|
|---|
| 1068 |
|
|---|
| 1069 | \sa QUrl
|
|---|
| 1070 | */
|
|---|
| 1071 |
|
|---|
| 1072 |
|
|---|
| 1073 | /*!
|
|---|
| 1074 | \fn Phonon::MediaSource::MediaSource(Phonon::DiscType discType, const QString &deviceName = QString())
|
|---|
| 1075 |
|
|---|
| 1076 | Creates a MediaSource object for the type of disc specified by \a discType in the named
|
|---|
| 1077 | device referred to by \a deviceName.
|
|---|
| 1078 |
|
|---|
| 1079 | \note \a deviceName is a platform dependent device name. It can be useful to specify this
|
|---|
| 1080 | if the computer has more than one CD drive. On KDE, it is recommended to use the Solid
|
|---|
| 1081 | hardware discovery framework to retrieve the device name in a portable way.
|
|---|
| 1082 | */
|
|---|
| 1083 |
|
|---|
| 1084 | /*!
|
|---|
| 1085 | \fn Phonon::MediaSource::MediaSource(AbstractMediaStream *stream)
|
|---|
| 1086 | \internal
|
|---|
| 1087 | Creates a MediaSource object for a data stream.
|
|---|
| 1088 |
|
|---|
| 1089 | Your application can provide the media data by subclassing AbstractMediaStream and
|
|---|
| 1090 | passing a pointer to that object. Phonon will never delete the \a stream.
|
|---|
| 1091 |
|
|---|
| 1092 | \param stream The AbstractMediaStream subclass to provide the media data.
|
|---|
| 1093 |
|
|---|
| 1094 | \sa setAutoDelete
|
|---|
| 1095 | */
|
|---|
| 1096 |
|
|---|
| 1097 | /*!
|
|---|
| 1098 | \fn Phonon::MediaSource::MediaSource(QIODevice *ioDevice)
|
|---|
| 1099 |
|
|---|
| 1100 | Creates a MediaSource object for the QIODevice specified by \a ioDevice.
|
|---|
| 1101 |
|
|---|
| 1102 | This constructor can be very handy in the combination of
|
|---|
| 1103 | QByteArray and QBuffer.
|
|---|
| 1104 |
|
|---|
| 1105 | If you need to fetch multimedia data from a source that is not
|
|---|
| 1106 | supported by MediaSource, you should subclass QIODevice and use
|
|---|
| 1107 | this MediaSource constructor. It is important that you reimplement
|
|---|
| 1108 | QIODevice::isSequential(), as it is used by MediaSource to
|
|---|
| 1109 | determine if the media source is seekable.
|
|---|
| 1110 |
|
|---|
| 1111 | \a ioDevice is an arbitrary readable QIODevice subclass. If the device is not opened
|
|---|
| 1112 | MediaSource will open it as QIODevice::ReadOnly.
|
|---|
| 1113 |
|
|---|
| 1114 | \note Sequential devices can also be used, but MediaObject::isSeekable() will
|
|---|
| 1115 | return false as a result.
|
|---|
| 1116 |
|
|---|
| 1117 | \sa setAutoDelete()
|
|---|
| 1118 | */
|
|---|
| 1119 |
|
|---|
| 1120 | /*!
|
|---|
| 1121 | \fn Phonon::MediaSource::MediaSource(MediaSourcePrivate &)
|
|---|
| 1122 | \internal
|
|---|
| 1123 | */
|
|---|
| 1124 |
|
|---|
| 1125 | /*!
|
|---|
| 1126 | \fn Phonon::MediaSource::~MediaSource()
|
|---|
| 1127 |
|
|---|
| 1128 | Destroys the MediaSource object. You should never delete a
|
|---|
| 1129 | MediaSource yourself, the MediaObject will handle this.
|
|---|
| 1130 |
|
|---|
| 1131 | */
|
|---|
| 1132 |
|
|---|
| 1133 | /*!
|
|---|
| 1134 | \fn Phonon::MediaSource::MediaSource(const MediaSource &other)
|
|---|
| 1135 |
|
|---|
| 1136 | Constructs a copy of the \a other media source.
|
|---|
| 1137 |
|
|---|
| 1138 | This constructor is fast thanks to explicit sharing.
|
|---|
| 1139 | */
|
|---|
| 1140 |
|
|---|
| 1141 | /*!
|
|---|
| 1142 | \fn MediaSource &Phonon::MediaSource::operator=(const MediaSource &other)
|
|---|
| 1143 |
|
|---|
| 1144 | Assigns the \a other media source to this media source and returns a
|
|---|
| 1145 | reference to it.
|
|---|
| 1146 |
|
|---|
| 1147 | This operation is fast thanks to explicit sharing.
|
|---|
| 1148 | */
|
|---|
| 1149 |
|
|---|
| 1150 | /*!
|
|---|
| 1151 | \fn bool Phonon::MediaSource::operator==(const MediaSource &other) const
|
|---|
| 1152 |
|
|---|
| 1153 | Returns true if this media source is equal to the \a other media source;
|
|---|
| 1154 | otherwise returns false.
|
|---|
| 1155 | */
|
|---|
| 1156 |
|
|---|
| 1157 | /*!
|
|---|
| 1158 | \fn void Phonon::MediaSource::setAutoDelete(bool enable)
|
|---|
| 1159 |
|
|---|
| 1160 | If \a enable is true, the media source will take ownership of the
|
|---|
| 1161 | object passed in the \l{Phonon::}{MediaSource}'s constructor
|
|---|
| 1162 | object that was passed in the constructor; otherwise, the
|
|---|
| 1163 | programmer is responsible for deletion of this object.
|
|---|
| 1164 |
|
|---|
| 1165 | This setting is false by default. If you enable it, you should
|
|---|
| 1166 | only access the stream or device as long as you keep the media
|
|---|
| 1167 | source object around. As long as you keep the media source
|
|---|
| 1168 | wrapping the stream or device, the object will not get deleted.
|
|---|
| 1169 |
|
|---|
| 1170 | \sa autoDelete()
|
|---|
| 1171 | */
|
|---|
| 1172 |
|
|---|
| 1173 | /*!
|
|---|
| 1174 | \fn bool Phonon::MediaSource::autoDelete() const
|
|---|
| 1175 |
|
|---|
| 1176 | Returns the setting of the auto-delete option. The default is
|
|---|
| 1177 | false.
|
|---|
| 1178 |
|
|---|
| 1179 | \sa setAutoDelete()
|
|---|
| 1180 | */
|
|---|
| 1181 |
|
|---|
| 1182 | /*!
|
|---|
| 1183 | \fn Type Phonon::MediaSource::type() const
|
|---|
| 1184 |
|
|---|
| 1185 | Returns the type of the MediaSource (depends on the constructor
|
|---|
| 1186 | that was used).
|
|---|
| 1187 |
|
|---|
| 1188 | \sa Type
|
|---|
| 1189 | */
|
|---|
| 1190 |
|
|---|
| 1191 | /*!
|
|---|
| 1192 | \fn QString Phonon::MediaSource::fileName() const
|
|---|
| 1193 |
|
|---|
| 1194 | Returns the file name of the MediaSource if type() ==
|
|---|
| 1195 | LocalFile; otherwise, returns QString().
|
|---|
| 1196 |
|
|---|
| 1197 | \sa type()
|
|---|
| 1198 | */
|
|---|
| 1199 |
|
|---|
| 1200 | /*!
|
|---|
| 1201 | \fn QUrl Phonon::MediaSource::url() const
|
|---|
| 1202 | Returns the URL of the MediaSource if type() == URL or type() == LocalFile;
|
|---|
| 1203 | otherwise returns QUrl().
|
|---|
| 1204 |
|
|---|
| 1205 | \sa type()
|
|---|
| 1206 | */
|
|---|
| 1207 |
|
|---|
| 1208 | /*!
|
|---|
| 1209 | \fn Phonon::DiscType Phonon::MediaSource::discType() const
|
|---|
| 1210 | Returns the disc type of the MediaSource if type() == Disc; otherwise
|
|---|
| 1211 | returns NoDisc.
|
|---|
| 1212 |
|
|---|
| 1213 | \sa type()
|
|---|
| 1214 | */
|
|---|
| 1215 |
|
|---|
| 1216 | /*!
|
|---|
| 1217 | \fn QString Phonon::MediaSource::deviceName() const
|
|---|
| 1218 |
|
|---|
| 1219 | Returns the device name of the MediaSource if type() == Disc; otherwise
|
|---|
| 1220 | returns QString().
|
|---|
| 1221 |
|
|---|
| 1222 | \sa type()
|
|---|
| 1223 | */
|
|---|
| 1224 |
|
|---|
| 1225 | /*!
|
|---|
| 1226 | \fn AbstractMediaStream *Phonon::MediaSource::stream() const
|
|---|
| 1227 | \internal
|
|---|
| 1228 | Returns the media stream of the MediaSource if type() == Stream; otherwise
|
|---|
| 1229 | returns 0.
|
|---|
| 1230 | QIODevices are handled as streams, too.
|
|---|
| 1231 | */
|
|---|
| 1232 |
|
|---|
| 1233 | /*!
|
|---|
| 1234 | \class Phonon::MediaSourcePrivate
|
|---|
| 1235 | \inmodule Phonon
|
|---|
| 1236 | \since 4.4
|
|---|
| 1237 | \internal
|
|---|
| 1238 | */
|
|---|
| 1239 |
|
|---|
| 1240 | /*!
|
|---|
| 1241 | \class Phonon::SeekSlider
|
|---|
| 1242 | \inmodule Phonon
|
|---|
| 1243 | \inheaderfile Phonon/SeekSlider
|
|---|
| 1244 | \since 4.4
|
|---|
| 1245 | \brief The SeekSlider class provides a slider for seeking to positions in media streams.
|
|---|
| 1246 |
|
|---|
| 1247 | The SeekSlider connects to a \l{Phonon::}{MediaObject}, and
|
|---|
| 1248 | controls the seek position in the object's media stream.
|
|---|
| 1249 |
|
|---|
| 1250 | The slider will connect to the necessary signals to keep track of
|
|---|
| 1251 | the sliders maximum, minimum, and current values. It will also
|
|---|
| 1252 | disable itself for non-seekable streams, and update the media
|
|---|
| 1253 | object when the current value of the slider changes.
|
|---|
| 1254 |
|
|---|
| 1255 | Here follows a typical example of SeekSlider usage:
|
|---|
| 1256 |
|
|---|
| 1257 | \snippet doc/src/snippets/seekslider.cpp 0
|
|---|
| 1258 |
|
|---|
| 1259 | \sa Phonon::VolumeSlider, Phonon::VideoWidget, {Music Player Example}, {Phonon Module}
|
|---|
| 1260 |
|
|---|
| 1261 | */
|
|---|
| 1262 |
|
|---|
| 1263 | /*!
|
|---|
| 1264 | \property Phonon::SeekSlider::iconVisible
|
|---|
| 1265 | \brief whether the icon next to the slider is visible
|
|---|
| 1266 |
|
|---|
| 1267 | By default the icon is visible if the platform provides an icon; else
|
|---|
| 1268 | it's hidden.
|
|---|
| 1269 |
|
|---|
| 1270 | */
|
|---|
| 1271 |
|
|---|
| 1272 | /*!
|
|---|
| 1273 | \property Phonon::SeekSlider::tracking
|
|---|
| 1274 | \brief whether slider tracking is enabled
|
|---|
| 1275 |
|
|---|
| 1276 | If tracking is enabled (the default), the media seeks
|
|---|
| 1277 | while the slider is being dragged. If tracking is
|
|---|
| 1278 | disabled, the media seeks only when the user
|
|---|
| 1279 | releases the slider.
|
|---|
| 1280 | */
|
|---|
| 1281 |
|
|---|
| 1282 | /*!
|
|---|
| 1283 | \property Phonon::SeekSlider::pageStep
|
|---|
| 1284 | \brief the page step interval
|
|---|
| 1285 |
|
|---|
| 1286 | The larger of two natural steps that a slider provides and
|
|---|
| 1287 | typically corresponds to the user pressing PageUp or PageDown.
|
|---|
| 1288 |
|
|---|
| 1289 | Defaults to 5 seconds.
|
|---|
| 1290 | */
|
|---|
| 1291 |
|
|---|
| 1292 | /*!
|
|---|
| 1293 | \property Phonon::SeekSlider::singleStep
|
|---|
| 1294 | \brief the single step interval
|
|---|
| 1295 |
|
|---|
| 1296 | The smaller of two natural steps that a slider provides and
|
|---|
| 1297 | typically corresponds to the user pressing an arrow key.
|
|---|
| 1298 |
|
|---|
| 1299 | Defaults to 0.5 seconds.
|
|---|
| 1300 | */
|
|---|
| 1301 |
|
|---|
| 1302 | /*!
|
|---|
| 1303 | \property Phonon::SeekSlider::orientation
|
|---|
| 1304 | \brief the orientation of the slider
|
|---|
| 1305 |
|
|---|
| 1306 | The orientation must be Qt::Vertical or Qt::Horizontal (the default).
|
|---|
| 1307 | */
|
|---|
| 1308 |
|
|---|
| 1309 | /*!
|
|---|
| 1310 | \property Phonon::SeekSlider::iconSize
|
|---|
| 1311 | \brief the icon size used for the mute button/icon.
|
|---|
| 1312 |
|
|---|
| 1313 | The default size is defined by the GUI style.
|
|---|
| 1314 | */
|
|---|
| 1315 |
|
|---|
| 1316 | /*!
|
|---|
| 1317 | \fn explicit Phonon::SeekSlider::SeekSlider(QWidget *parent = 0)
|
|---|
| 1318 |
|
|---|
| 1319 | Constructs a seek slider widget with the given \a parent.
|
|---|
| 1320 | */
|
|---|
| 1321 |
|
|---|
| 1322 | /*!
|
|---|
| 1323 | \fn explicit Phonon::SeekSlider::SeekSlider(MediaObject *media, QWidget *parent = 0)
|
|---|
| 1324 |
|
|---|
| 1325 | Constructs a seek slider widget for the specified \a media with the
|
|---|
| 1326 | given \a parent.
|
|---|
| 1327 | */
|
|---|
| 1328 |
|
|---|
| 1329 | /*!
|
|---|
| 1330 | \fn Phonon::SeekSlider::~SeekSlider()
|
|---|
| 1331 | Destroys the seek slider.
|
|---|
| 1332 | */
|
|---|
| 1333 |
|
|---|
| 1334 | /*!
|
|---|
| 1335 | \fn Phonon::MediaObject *Phonon::SeekSlider::mediaObject() const
|
|---|
| 1336 |
|
|---|
| 1337 | Return the media object this SeekSlider controls.
|
|---|
| 1338 | */
|
|---|
| 1339 |
|
|---|
| 1340 | /*!
|
|---|
| 1341 | \class Phonon::SeekSliderPrivate
|
|---|
| 1342 | \inmodule Phonon
|
|---|
| 1343 | \since 4.4
|
|---|
| 1344 | \internal
|
|---|
| 1345 | */
|
|---|
| 1346 |
|
|---|
| 1347 | /*!
|
|---|
| 1348 | \fn void Phonon::SeekSlider::setMediaObject(MediaObject *media)
|
|---|
| 1349 |
|
|---|
| 1350 | Sets the media object to be controlled by this slider to the \a media specified.
|
|---|
| 1351 | */
|
|---|
| 1352 |
|
|---|
| 1353 | /*!
|
|---|
| 1354 | \class Phonon::VideoPlayer
|
|---|
| 1355 | \inmodule Phonon
|
|---|
| 1356 | \inheaderfile Phonon/VideoPlayer
|
|---|
| 1357 | \since 4.4
|
|---|
| 1358 | \brief The VideoPlayer widget is used to perform playback of video.
|
|---|
| 1359 |
|
|---|
| 1360 | With VideoPlayer you can get results quickly and easily. You can
|
|---|
| 1361 | do the standard playback tasks like play(), pause(), and stop(),
|
|---|
| 1362 | but also set a playback volume and seek - if the media and backend
|
|---|
| 1363 | supports seeking.
|
|---|
| 1364 |
|
|---|
| 1365 | VideoPlayer is provided for convenience and removes the need to
|
|---|
| 1366 | create a media graph with a \l{Phonon::}{MediaObject},
|
|---|
| 1367 | \l{Phonon::}{AudioOutput}, and \l{Phonon::}{VideoWidget}. If
|
|---|
| 1368 | you need functionality not supported by the player, you can build
|
|---|
| 1369 | this \l{Building Graphs}{graph} yourself.
|
|---|
| 1370 |
|
|---|
| 1371 | Keep in mind that when the VideoPlayer instance is deleted the
|
|---|
| 1372 | playback will stop.
|
|---|
| 1373 |
|
|---|
| 1374 | Note also that most of the functions in this class are
|
|---|
| 1375 | asynchronous. For instance, a media source may not play
|
|---|
| 1376 | immediately after you call the play() function.
|
|---|
| 1377 |
|
|---|
| 1378 | A play and forget code example:
|
|---|
| 1379 | \snippet doc/src/snippets/code/doc_src_phonon-api.qdoc 4
|
|---|
| 1380 |
|
|---|
| 1381 | \sa {Phonon Module}, MediaObject
|
|---|
| 1382 | */
|
|---|
| 1383 |
|
|---|
| 1384 | /*!
|
|---|
| 1385 | \fn Phonon::VideoPlayer::VideoPlayer(QWidget *parent = 0)
|
|---|
| 1386 |
|
|---|
| 1387 | Constructs a new video widget with a \a parent using
|
|---|
| 1388 | Phonon::VideoCategory as its category.
|
|---|
| 1389 |
|
|---|
| 1390 | \param parent The QObject parent.
|
|---|
| 1391 | */
|
|---|
| 1392 |
|
|---|
| 1393 | /*!
|
|---|
| 1394 | \fn Phonon::VideoPlayer::VideoPlayer(Phonon::Category category, QWidget *parent = 0)
|
|---|
| 1395 |
|
|---|
| 1396 | Constructs a new VideoPlayer instance with the specified \a
|
|---|
| 1397 | parent.
|
|---|
| 1398 |
|
|---|
| 1399 | \a category is the category used for the audio output device.
|
|---|
| 1400 | */
|
|---|
| 1401 |
|
|---|
| 1402 | /*!
|
|---|
| 1403 | \fn Phonon::VideoPlayer::~VideoPlayer()
|
|---|
| 1404 |
|
|---|
| 1405 | On destruction the playback is stopped, also the audio output is
|
|---|
| 1406 | removed so that the desktop mixer will not show the application
|
|---|
| 1407 | anymore. If you need a persistent audio output don't use
|
|---|
| 1408 | VideoPlayer but MediaObject, VideoPath and VideoOutput.
|
|---|
| 1409 | */
|
|---|
| 1410 |
|
|---|
| 1411 | /*!
|
|---|
| 1412 | \fn qint64 Phonon::VideoPlayer::totalTime() const
|
|---|
| 1413 |
|
|---|
| 1414 | Get the total time (in milliseconds) of the file currently being played.
|
|---|
| 1415 | */
|
|---|
| 1416 |
|
|---|
| 1417 | /*!
|
|---|
| 1418 | \fn qint64 Phonon::VideoPlayer::currentTime() const
|
|---|
| 1419 |
|
|---|
| 1420 | Get the current time (in milliseconds) of the file currently being played.
|
|---|
| 1421 | */
|
|---|
| 1422 |
|
|---|
| 1423 | /*!
|
|---|
| 1424 | \fn float Phonon::VideoPlayer::volume() const
|
|---|
| 1425 |
|
|---|
| 1426 | This is the current volume of the output as voltage factor.
|
|---|
| 1427 |
|
|---|
| 1428 | 1.0 means 100%, 0.5 means 50% voltage/25% power, 0.0 means 0%
|
|---|
| 1429 | */
|
|---|
| 1430 |
|
|---|
| 1431 | /*!
|
|---|
| 1432 | \fn bool Phonon::VideoPlayer::isPlaying() const
|
|---|
| 1433 |
|
|---|
| 1434 | Returns true if it is currently playing; otherwise returns false if it
|
|---|
| 1435 | is currently stopped or paused
|
|---|
| 1436 | */
|
|---|
| 1437 |
|
|---|
| 1438 | /*!
|
|---|
| 1439 | \fn bool Phonon::VideoPlayer::isPaused() const
|
|---|
| 1440 |
|
|---|
| 1441 | Returns true if it is currently paused; otherwise returns false if it
|
|---|
| 1442 | is currently playing or stopped.
|
|---|
| 1443 | */
|
|---|
| 1444 |
|
|---|
| 1445 | /*!
|
|---|
| 1446 | \fn void Phonon::VideoPlayer::load(const Phonon::MediaSource &source)
|
|---|
| 1447 |
|
|---|
| 1448 | Starts pre-loading the media data from the specified \a source and
|
|---|
| 1449 | filling audio buffers in the backend.
|
|---|
| 1450 |
|
|---|
| 1451 | When there's already a media playing (or paused) it will be stopped
|
|---|
| 1452 | (the finished signal will not be emitted).
|
|---|
| 1453 |
|
|---|
| 1454 | \sa MediaObject::setCurrentSource()
|
|---|
| 1455 | */
|
|---|
| 1456 |
|
|---|
| 1457 | /*!
|
|---|
| 1458 | \fn void Phonon::VideoPlayer::play(const Phonon::MediaSource &source)
|
|---|
| 1459 |
|
|---|
| 1460 | Plays the media from the given \a source. Starts playback as fast as
|
|---|
| 1461 | possible.
|
|---|
| 1462 | This can take a considerable time depending on the URL and the
|
|---|
| 1463 | backend.
|
|---|
| 1464 |
|
|---|
| 1465 | If you need low latency between calling play() and the sound actually
|
|---|
| 1466 | starting to play on your output device you need to use MediaObject
|
|---|
| 1467 | and be able to set the URL before calling play(). Note that
|
|---|
| 1468 | \snippet doc/src/snippets/code/doc_src_phonon-api.qdoc 5
|
|---|
| 1469 | doesn't make a difference: the application should be idle between the
|
|---|
| 1470 | load and play calls so that the backend can start preloading the
|
|---|
| 1471 | media and fill audio buffers.
|
|---|
| 1472 | */
|
|---|
| 1473 |
|
|---|
| 1474 | /*!
|
|---|
| 1475 | \fn void Phonon::VideoPlayer::play()
|
|---|
| 1476 |
|
|---|
| 1477 | Continues playback of paused media. Restarts playback of a stopped
|
|---|
| 1478 | (or newly loaded) media.
|
|---|
| 1479 |
|
|---|
| 1480 | \sa MediaObject::play(), play()
|
|---|
| 1481 | */
|
|---|
| 1482 |
|
|---|
| 1483 | /*!
|
|---|
| 1484 | \fn void Phonon::VideoPlayer::pause()
|
|---|
| 1485 |
|
|---|
| 1486 | Pauses the playback.
|
|---|
| 1487 |
|
|---|
| 1488 | \sa MediaObject::pause()
|
|---|
| 1489 | */
|
|---|
| 1490 |
|
|---|
| 1491 | /*!
|
|---|
| 1492 | \fn void Phonon::VideoPlayer::stop()
|
|---|
| 1493 |
|
|---|
| 1494 | Stops the playback.
|
|---|
| 1495 |
|
|---|
| 1496 | \sa MediaObject::stop()
|
|---|
| 1497 | */
|
|---|
| 1498 |
|
|---|
| 1499 | /*!
|
|---|
| 1500 | \fn void Phonon::VideoPlayer::seek(qint64 ms)
|
|---|
| 1501 |
|
|---|
| 1502 | Seeks to the requested time. Note that the backend is free to
|
|---|
| 1503 | ignore the seek request if the media source isn't seekable; you
|
|---|
| 1504 | can check this by asking the media object of the VideoPlayer.
|
|---|
| 1505 |
|
|---|
| 1506 | \snippet doc/src/snippets/videomedia.cpp 0
|
|---|
| 1507 |
|
|---|
| 1508 | The \a ms parameter is the time in milliseconds from the start of
|
|---|
| 1509 | the media.
|
|---|
| 1510 |
|
|---|
| 1511 | The call is asynchronous, so currentTime() can still be the old
|
|---|
| 1512 | value right after this method was called. If all you need is a
|
|---|
| 1513 | slider that shows the current position and allows the user to
|
|---|
| 1514 | seek, use the class SeekSlider.
|
|---|
| 1515 |
|
|---|
| 1516 | \sa MediaObject::seek(), MediaObject::isSeekable(), mediaObject()
|
|---|
| 1517 | */
|
|---|
| 1518 |
|
|---|
| 1519 | /*!
|
|---|
| 1520 | \fn void Phonon::VideoPlayer::setVolume(float volume)
|
|---|
| 1521 |
|
|---|
| 1522 | Sets the \a volume of the output as voltage factor.
|
|---|
| 1523 |
|
|---|
| 1524 | 1.0 means 100%, 0.5 means 50% voltage/25% power, 0.0 means 0%
|
|---|
| 1525 | */
|
|---|
| 1526 |
|
|---|
| 1527 | /*!
|
|---|
| 1528 | \fn MediaObject *Phonon::VideoPlayer::mediaObject() const
|
|---|
| 1529 |
|
|---|
| 1530 | Returns the media object being used by the player.
|
|---|
| 1531 |
|
|---|
| 1532 | The media object can be accessed directly instead of using the
|
|---|
| 1533 | \l{VideoPlayer}s convenience functions, e.g., play() and stop().
|
|---|
| 1534 | It is also possible to give the object to other Phonon widgets,
|
|---|
| 1535 | e.g., a \l{Phonon::}{SeekSlider} or a \l{Phonon::}{VolumeSlider}.
|
|---|
| 1536 |
|
|---|
| 1537 | \sa Phonon::SeekSlider, Phonon::MediaObject
|
|---|
| 1538 | */
|
|---|
| 1539 |
|
|---|
| 1540 | /*!
|
|---|
| 1541 | \fn AudioOutput *Phonon::VideoPlayer::audioOutput() const
|
|---|
| 1542 |
|
|---|
| 1543 | Returns the audio output object being used by the player.
|
|---|
| 1544 |
|
|---|
| 1545 | */
|
|---|
| 1546 |
|
|---|
| 1547 | /*!
|
|---|
| 1548 | \fn VideoWidget *Phonon::VideoPlayer::videoWidget() const
|
|---|
| 1549 |
|
|---|
| 1550 | Returns the video widget being used by the player.
|
|---|
| 1551 | */
|
|---|
| 1552 |
|
|---|
| 1553 | /*!
|
|---|
| 1554 | \fn void Phonon::VideoPlayer::finished()
|
|---|
| 1555 |
|
|---|
| 1556 | This signal is emitted when the playback finished.
|
|---|
| 1557 |
|
|---|
| 1558 | */
|
|---|
| 1559 |
|
|---|
| 1560 | /*!
|
|---|
| 1561 | \class Phonon::VideoWidgetPrivate
|
|---|
| 1562 | \inmodule Phonon
|
|---|
| 1563 | \since 4.4
|
|---|
| 1564 | \internal
|
|---|
| 1565 | */
|
|---|
| 1566 |
|
|---|
| 1567 | /*!
|
|---|
| 1568 | \class Phonon::MediaObject
|
|---|
| 1569 | \inmodule Phonon
|
|---|
| 1570 | \inheaderfile Phonon/MediaObject
|
|---|
| 1571 | \since 4.4
|
|---|
| 1572 | \brief The MediaObject class provides an interface for media playback.
|
|---|
| 1573 |
|
|---|
| 1574 |
|
|---|
| 1575 | The media object manages a \l{Phonon::}{MediaSource}, which
|
|---|
| 1576 | supplies the media object with multimedia content, e.g., from a
|
|---|
| 1577 | file. A playback in Phonon is always started by calling the
|
|---|
| 1578 | \l{Phonon::MediaObject::}{play()} function.
|
|---|
| 1579 |
|
|---|
| 1580 | The state of play (play, pause, stop, seek) is controlled by the
|
|---|
| 1581 | media object, and you can also query the current
|
|---|
| 1582 | \l{Phonon::MediaObject::}{state()}. It keeps track of the playback
|
|---|
| 1583 | position in the media stream, and emits the
|
|---|
| 1584 | \l{Phonon::MediaObject::}{tick()} signal when the current position
|
|---|
| 1585 | in the stream changes.
|
|---|
| 1586 |
|
|---|
| 1587 | Notice that most functions of this class are asynchronous, so you
|
|---|
| 1588 | cannot rely on that a state is entered after a function call
|
|---|
| 1589 | before you receive the \l{Phonon::MediaObject::}{stateChanged()}
|
|---|
| 1590 | signal. The description of the \l{Phonon::}{State} enum gives a
|
|---|
| 1591 | description of the different states.
|
|---|
| 1592 |
|
|---|
| 1593 | Before play() is called, the media object should be connected to
|
|---|
| 1594 | \l{Sinks}{output nodes}, which outputs the media to the
|
|---|
| 1595 | underlying hardware. The output nodes required are dependent on
|
|---|
| 1596 | the contents of the multimedia file that is played back. Phonon
|
|---|
| 1597 | has currently two output nodes: the \l{Phonon::}{AudioOutput} for
|
|---|
| 1598 | audio content and \l{Phonon::}{VideoWidget} for video content. If
|
|---|
| 1599 | a \l{Phonon::}{MediaSource} contains both audio and video, both
|
|---|
| 1600 | nodes need to be connected to the media object.
|
|---|
| 1601 |
|
|---|
| 1602 | \snippet snippets/phonon.cpp 4
|
|---|
| 1603 | \snippet snippets/phonon.cpp 5
|
|---|
| 1604 |
|
|---|
| 1605 | The media object can queue sources for playback. When it has
|
|---|
| 1606 | finished to play one source, it will start playing the next in the
|
|---|
| 1607 | queue; the new source is then removed from the queue. The
|
|---|
| 1608 | queue can be altered at any time.
|
|---|
| 1609 |
|
|---|
| 1610 | \snippet doc/src/snippets/code/doc_src_phonon-api.qdoc 7
|
|---|
| 1611 |
|
|---|
| 1612 | You can also make use of the
|
|---|
| 1613 | \l{Phonon::MediaObject::}{aboutToFinish()} signal, which is
|
|---|
| 1614 | guaranteed to be emitted in time for altering the queue.
|
|---|
| 1615 |
|
|---|
| 1616 | \snippet doc/src/snippets/code/doc_src_phonon-api.qdoc 8
|
|---|
| 1617 |
|
|---|
| 1618 | When playback is finishing, i.e., when a media source has been
|
|---|
| 1619 | played to the end and the queue is empty, several signals are
|
|---|
| 1620 | emitted. First, the media object will emit aboutToFinish() -
|
|---|
| 1621 | shortly before the playback has finished - and then finished().
|
|---|
| 1622 | The stateChanged() signal will also be emitted with
|
|---|
| 1623 | \l{Phonon::}{PausedState}, which is the state the media object
|
|---|
| 1624 | takes when the playback is finished. If you wish to enter another
|
|---|
| 1625 | state, you can connect a slot to finished() and set a new state
|
|---|
| 1626 | there.
|
|---|
| 1627 |
|
|---|
| 1628 | The media object resolves the meta information, such as title,
|
|---|
| 1629 | artist, and album. The meta data is not resolved immediately after
|
|---|
| 1630 | a new source is provided, but will be resolved before the object
|
|---|
| 1631 | leaves the \l{Phonon::}{LoadingState}. The data is queried by
|
|---|
| 1632 | string keys - which should follow the Ogg Vorbis specification
|
|---|
| 1633 | \l http://xiph.org/vorbis/doc/v-comment.html - or by using the
|
|---|
| 1634 | \l{Phonon::}{MetaData} enum. The data available will depend on the
|
|---|
| 1635 | type and content of the individual media files. metaDataChanged()
|
|---|
| 1636 | will be emitted when the media object has resolved new meta data.
|
|---|
| 1637 |
|
|---|
| 1638 | Errors encountered during playback and loading of media sources
|
|---|
| 1639 | are reported by emitting a state changed signal with
|
|---|
| 1640 | \l{Phonon::}{ErrorState}. The severity of the error can be queried
|
|---|
| 1641 | by the \l{Phonon::}{ErrorType}. With a \l{Phonon::}{NormalError},
|
|---|
| 1642 | it might be possible to continue the playback, for instance, if
|
|---|
| 1643 | only audio playback fails for a media source which also has video.
|
|---|
| 1644 | A \l{Phonon::}{FatalError} indicates that Phonon cannot continue
|
|---|
| 1645 | playback of the current source, but it is possible to try with a
|
|---|
| 1646 | different one. A user readable error message is given by
|
|---|
| 1647 | errorString().
|
|---|
| 1648 |
|
|---|
| 1649 | \sa Phonon::MediaSource, Phonon::AudioOutput, VideoWidget,
|
|---|
| 1650 | {Music Player Example}, {Phonon Overview}, Phonon::VideoPlayer,
|
|---|
| 1651 | Phonon::createPlayer(), {Phonon Module}
|
|---|
| 1652 |
|
|---|
| 1653 | */
|
|---|
| 1654 |
|
|---|
| 1655 | /*!
|
|---|
| 1656 | \property Phonon::MediaObject::transitionTime
|
|---|
| 1657 | \brief Defines the time between playback of two media sources
|
|---|
| 1658 | in the media queue.
|
|---|
| 1659 |
|
|---|
| 1660 | A positive transition time defines a gap of silence between queued
|
|---|
| 1661 | media sources.
|
|---|
| 1662 |
|
|---|
| 1663 | A transition time of 0 ms requests gapless playback (i.e., the
|
|---|
| 1664 | next source in the media queue starts immediately after the
|
|---|
| 1665 | playback of the current source finishes).
|
|---|
| 1666 |
|
|---|
| 1667 | A negative transition time defines a crossfade between the queued
|
|---|
| 1668 | media sources.
|
|---|
| 1669 |
|
|---|
| 1670 | Defaults to 0 (gapless playback).
|
|---|
| 1671 |
|
|---|
| 1672 | \warning This feature might not work reliably with every
|
|---|
| 1673 | backend.
|
|---|
| 1674 | */
|
|---|
| 1675 |
|
|---|
| 1676 | /*!
|
|---|
| 1677 | \property Phonon::MediaObject::prefinishMark
|
|---|
| 1678 | \brief the time when the prefinishMarkReached signal is emitted before playback ends.
|
|---|
| 1679 |
|
|---|
| 1680 | This property specifies the time in milliseconds the
|
|---|
| 1681 | prefinishMarkReached() signal is emitted before the playback
|
|---|
| 1682 | finishes. A value of \c 0 disables the signal. The signal is only
|
|---|
| 1683 | emitted for the last source in the \l{queue()}{media queue}.
|
|---|
| 1684 |
|
|---|
| 1685 | Defaults to \c 0 (disabled).
|
|---|
| 1686 |
|
|---|
| 1687 | \warning For some media data the total time cannot be determined
|
|---|
| 1688 | accurately, therefore the accuracy of the prefinishMarkReached signal
|
|---|
| 1689 | can be bad sometimes. Still, it is better to use this method than to
|
|---|
| 1690 | look at totalTime() and currentTime() to emulate the behavior
|
|---|
| 1691 | because the backend might have more information available than your
|
|---|
| 1692 | application does through totalTime() and currentTime().
|
|---|
| 1693 |
|
|---|
| 1694 | \sa prefinishMarkReached()
|
|---|
| 1695 | */
|
|---|
| 1696 |
|
|---|
| 1697 | /*!
|
|---|
| 1698 | \property Phonon::MediaObject::tickInterval
|
|---|
| 1699 | \brief The time interval in milliseconds between two ticks.
|
|---|
| 1700 |
|
|---|
| 1701 | The tick() signal is emitted continuously during playback.
|
|---|
| 1702 | The tick interval is the time that elapses between the emission of two tick signals.
|
|---|
| 1703 | If you set the interval to \c 0 the tick signal gets disabled.
|
|---|
| 1704 |
|
|---|
| 1705 | The tick() signal can, for instance, be used to update widgets
|
|---|
| 1706 | that show the current position in the playback of a media source.
|
|---|
| 1707 |
|
|---|
| 1708 | Defaults to \c 0 (disabled).
|
|---|
| 1709 |
|
|---|
| 1710 | \warning The back-end is free to choose a different tick interval close
|
|---|
| 1711 | to what you asked for. This means that the following code \c may fail:
|
|---|
| 1712 | \snippet doc/src/snippets/code/doc_src_phonon-api.qdoc 9
|
|---|
| 1713 | On the other hand the following is guaranteed:
|
|---|
| 1714 | \snippet doc/src/snippets/code/doc_src_phonon-api.qdoc 10
|
|---|
| 1715 |
|
|---|
| 1716 | \sa tick()
|
|---|
| 1717 | */
|
|---|
| 1718 |
|
|---|
| 1719 | /*!
|
|---|
| 1720 | \fn Phonon::MediaObject::~MediaObject()
|
|---|
| 1721 |
|
|---|
| 1722 | Destroys the MediaObject.
|
|---|
| 1723 | */
|
|---|
| 1724 |
|
|---|
| 1725 | /*!
|
|---|
| 1726 | \fn State Phonon::MediaObject::state() const
|
|---|
| 1727 |
|
|---|
| 1728 | Returns the current Phonon::State of the object.
|
|---|
| 1729 |
|
|---|
| 1730 | \sa Phonon::State, stateChanged()
|
|---|
| 1731 | */
|
|---|
| 1732 |
|
|---|
| 1733 | /*!
|
|---|
| 1734 | \fn bool Phonon::MediaObject::hasVideo() const
|
|---|
| 1735 |
|
|---|
| 1736 | Check whether the current media source includes a video stream.
|
|---|
| 1737 |
|
|---|
| 1738 | \warning This information is not resolved immediately after a
|
|---|
| 1739 | media object gets a new source. Listen to the hasVideoChanged()
|
|---|
| 1740 | signal instead.
|
|---|
| 1741 |
|
|---|
| 1742 | \snippet doc/src/snippets/code/doc_src_phonon-api.qdoc 11
|
|---|
| 1743 |
|
|---|
| 1744 | Returns \c true if the media contains video data; otherwise,
|
|---|
| 1745 | returns \c false.
|
|---|
| 1746 |
|
|---|
| 1747 | \sa hasVideoChanged()
|
|---|
| 1748 | */
|
|---|
| 1749 |
|
|---|
| 1750 | /*!
|
|---|
| 1751 | \fn bool Phonon::MediaObject::isSeekable() const
|
|---|
| 1752 |
|
|---|
| 1753 | Check whether it is possible to seek, i.e., change the
|
|---|
| 1754 | playback position in the media stream.
|
|---|
| 1755 |
|
|---|
| 1756 | \warning This information is not solved immediately after the
|
|---|
| 1757 | media object gets a new media source. The hasVideoChanged() signal
|
|---|
| 1758 | is emitted after this information is available.
|
|---|
| 1759 |
|
|---|
| 1760 | \snippet doc/src/snippets/code/doc_src_phonon-api.qdoc 12
|
|---|
| 1761 |
|
|---|
| 1762 | Returns \c true if the current media may be seeked; otherwise,
|
|---|
| 1763 | returns \c false.
|
|---|
| 1764 |
|
|---|
| 1765 | \sa seekableChanged()
|
|---|
| 1766 | */
|
|---|
| 1767 |
|
|---|
| 1768 | /*!
|
|---|
| 1769 | \fn QStringList Phonon::MediaObject::metaData(const QString &key) const
|
|---|
| 1770 |
|
|---|
| 1771 | Returns the strings associated with the given \a key.
|
|---|
| 1772 |
|
|---|
| 1773 | Backends should use the keys specified in the Ogg Vorbis
|
|---|
| 1774 | documentation: \l http://xiph.org/vorbis/doc/v-comment.html
|
|---|
| 1775 |
|
|---|
| 1776 | Therefore the following should work with every backend:
|
|---|
| 1777 |
|
|---|
| 1778 | Note that meta data is not resolved before the \c
|
|---|
| 1779 | metaDataChanged() signal is emitted.
|
|---|
| 1780 |
|
|---|
| 1781 | A typical usage looks like this:
|
|---|
| 1782 |
|
|---|
| 1783 | \snippet doc/src/snippets/code/doc_src_phonon-api.qdoc 13
|
|---|
| 1784 | */
|
|---|
| 1785 |
|
|---|
| 1786 | /*!
|
|---|
| 1787 | \fn QStringList Phonon::MediaObject::metaData(Phonon::MetaData key) const
|
|---|
| 1788 |
|
|---|
| 1789 | Returns the strings associated with the given \a key.
|
|---|
| 1790 |
|
|---|
| 1791 | Same as above except that the keys are defined in the
|
|---|
| 1792 | Phonon::MetaData enum.
|
|---|
| 1793 |
|
|---|
| 1794 | \sa metaDataChanged()
|
|---|
| 1795 | */
|
|---|
| 1796 |
|
|---|
| 1797 | /*!
|
|---|
| 1798 | \fn QMultiMap<QString, QString> Phonon::MediaObject::metaData() const
|
|---|
| 1799 |
|
|---|
| 1800 | Returns all meta data in a multi map.
|
|---|
| 1801 |
|
|---|
| 1802 | \sa metaDataChanged()
|
|---|
| 1803 | */
|
|---|
| 1804 |
|
|---|
| 1805 | /*!
|
|---|
| 1806 | \fn QString Phonon::MediaObject::errorString() const
|
|---|
| 1807 |
|
|---|
| 1808 | Returns a human-readable description of the last error that occurred.
|
|---|
| 1809 | The strings given may vary between backends.
|
|---|
| 1810 |
|
|---|
| 1811 | The error description can be used to give a message to the user -
|
|---|
| 1812 | and the developer - when the stateChanged() signal is emitted with
|
|---|
| 1813 | \l{Phonon::}{ErrorState}.
|
|---|
| 1814 |
|
|---|
| 1815 | \section1 Qt Backends
|
|---|
| 1816 |
|
|---|
| 1817 | On Windows, Qt fetches its error messages from the DirectShow
|
|---|
| 1818 | backend. This usually includes an error number, which can be
|
|---|
| 1819 | looked up in the DirectShow documentation:
|
|---|
| 1820 | \l{http://msdn.microsoft.com/archive/default.asp?url=/archive/en-us/dx81_c/directx_cpp/htm/errorandsuccesscodes.asp}.
|
|---|
| 1821 |
|
|---|
| 1822 | On Linux and Mac, the error strings are not fetched directly from
|
|---|
| 1823 | the backend, but are created in the backend.
|
|---|
| 1824 |
|
|---|
| 1825 | \sa Phonon::ErrorState, stateChanged()
|
|---|
| 1826 | */
|
|---|
| 1827 |
|
|---|
| 1828 | /*!
|
|---|
| 1829 | \fn ErrorType Phonon::MediaObject::errorType() const
|
|---|
| 1830 |
|
|---|
| 1831 | Tells your program what to do about the last error that occurred.
|
|---|
| 1832 | Use this function after receiving a stateChanged() signal with
|
|---|
| 1833 | \l{Phonon::}{ErrorState}.
|
|---|
| 1834 |
|
|---|
| 1835 | \sa Phonon::ErrorType, Phonon::ErrorState, stateChanged()
|
|---|
| 1836 | */
|
|---|
| 1837 |
|
|---|
| 1838 | /*!
|
|---|
| 1839 | \fn MediaSource Phonon::MediaObject::currentSource() const
|
|---|
| 1840 |
|
|---|
| 1841 | Returns the current media source, i.e., the media source that is
|
|---|
| 1842 | being played back. The current source is either set with
|
|---|
| 1843 | setCurrentSource() or taken from the media queue() when a media
|
|---|
| 1844 | source has finished playing.
|
|---|
| 1845 |
|
|---|
| 1846 | \sa setCurrentSource()
|
|---|
| 1847 | */
|
|---|
| 1848 |
|
|---|
| 1849 | /*!
|
|---|
| 1850 | \fn void Phonon::MediaObject::setCurrentSource(const MediaSource &source)
|
|---|
| 1851 |
|
|---|
| 1852 | Set the media source the MediaObject should use.
|
|---|
| 1853 |
|
|---|
| 1854 | After the media object receives a new source, it will enter the
|
|---|
| 1855 | \l{Phonon::}{LoadingState}. When it is ready to play, it
|
|---|
| 1856 | enters the \l{Phonon::}{StoppedState} unless another state
|
|---|
| 1857 | has been requested, e.g., by calling play().
|
|---|
| 1858 |
|
|---|
| 1859 | \a source is the MediaSource object to the media data. You can
|
|---|
| 1860 | just as well use a QUrl or QString (for a local file) here.
|
|---|
| 1861 |
|
|---|
| 1862 | We show an example:
|
|---|
| 1863 |
|
|---|
| 1864 | \snippet doc/src/snippets/code/doc_src_phonon-api.qdoc 14
|
|---|
| 1865 |
|
|---|
| 1866 | \sa currentSource()
|
|---|
| 1867 | */
|
|---|
| 1868 |
|
|---|
| 1869 | /*!
|
|---|
| 1870 | \fn QList<MediaSource> Phonon::MediaObject::queue() const
|
|---|
| 1871 |
|
|---|
| 1872 | Returns the queued media sources.
|
|---|
| 1873 |
|
|---|
| 1874 | This does list does not include the current source,
|
|---|
| 1875 | returned by currentSource().
|
|---|
| 1876 |
|
|---|
| 1877 | \sa enqueue()
|
|---|
| 1878 | */
|
|---|
| 1879 |
|
|---|
| 1880 | /*!
|
|---|
| 1881 | \fn void Phonon::MediaObject::setQueue(const QList<MediaSource> &sources)
|
|---|
| 1882 |
|
|---|
| 1883 | Set the \a sources to play when the current source has finished.
|
|---|
| 1884 |
|
|---|
| 1885 | This function will overwrite the current queue.
|
|---|
| 1886 |
|
|---|
| 1887 | \sa clearQueue(), enqueue()
|
|---|
| 1888 | */
|
|---|
| 1889 |
|
|---|
| 1890 | /*!
|
|---|
| 1891 | \fn void Phonon::MediaObject::setQueue(const QList<QUrl> &urls)
|
|---|
| 1892 |
|
|---|
| 1893 | Set the \a urls to play when the current media has finished.
|
|---|
| 1894 |
|
|---|
| 1895 | This function overwrites the current queue.
|
|---|
| 1896 |
|
|---|
| 1897 | \sa clearQueue(), enqueue()
|
|---|
| 1898 | */
|
|---|
| 1899 |
|
|---|
| 1900 | /*!
|
|---|
| 1901 | \fn void Phonon::MediaObject::enqueue(const MediaSource &source)
|
|---|
| 1902 |
|
|---|
| 1903 | Appends \a source to the queue.
|
|---|
| 1904 |
|
|---|
| 1905 | You can use this function to provide the next source after the
|
|---|
| 1906 | aboutToFinish() signal has been emitted.
|
|---|
| 1907 |
|
|---|
| 1908 | \sa aboutToFinish(), setQueue(), clearQueue()
|
|---|
| 1909 | */
|
|---|
| 1910 |
|
|---|
| 1911 | /*!
|
|---|
| 1912 | \fn void Phonon::MediaObject::enqueue(const QList<MediaSource> &sources)
|
|---|
| 1913 |
|
|---|
| 1914 | Appends multiple \a sources to the queue.
|
|---|
| 1915 |
|
|---|
| 1916 | \sa setQueue(), clearQueue()
|
|---|
| 1917 | */
|
|---|
| 1918 |
|
|---|
| 1919 | /*!
|
|---|
| 1920 | \fn void Phonon::MediaObject::enqueue(const QList<QUrl> &urls)
|
|---|
| 1921 |
|
|---|
| 1922 | Appends the URLs in \a urls to the media source queue.
|
|---|
| 1923 |
|
|---|
| 1924 | The function will create \l{MediaSource}s from the \l{QUrl}s, and
|
|---|
| 1925 | append these to the queue.
|
|---|
| 1926 |
|
|---|
| 1927 | \sa setQueue(), clearQueue()
|
|---|
| 1928 | */
|
|---|
| 1929 |
|
|---|
| 1930 | /*!
|
|---|
| 1931 | \fn void Phonon::MediaObject::clearQueue()
|
|---|
| 1932 |
|
|---|
| 1933 | Clears the queue of media sources.
|
|---|
| 1934 |
|
|---|
| 1935 | \sa queue(), enqueue()
|
|---|
| 1936 | */
|
|---|
| 1937 |
|
|---|
| 1938 | /*!
|
|---|
| 1939 | \fn qint64 Phonon::MediaObject::currentTime() const
|
|---|
| 1940 |
|
|---|
| 1941 | Returns the current time (in milliseconds), i.e., position in the
|
|---|
| 1942 | media stream, of the file currently being played.
|
|---|
| 1943 |
|
|---|
| 1944 | \sa tick(), totalTime(), remainingTime()
|
|---|
| 1945 | */
|
|---|
| 1946 |
|
|---|
| 1947 | /*!
|
|---|
| 1948 | \fn qint64 Phonon::MediaObject::totalTime() const
|
|---|
| 1949 |
|
|---|
| 1950 | Get the total time (in milliseconds) of the file currently being played.
|
|---|
| 1951 |
|
|---|
| 1952 | Returns the total time in milliseconds.
|
|---|
| 1953 |
|
|---|
| 1954 | \warning The total time is not defined before the media object
|
|---|
| 1955 | enters the \l{Phonon::}{LoadingState}.
|
|---|
| 1956 |
|
|---|
| 1957 | \sa totalTimeChanged()
|
|---|
| 1958 | */
|
|---|
| 1959 |
|
|---|
| 1960 | /*!
|
|---|
| 1961 | \fn qint64 Phonon::MediaObject::remainingTime() const
|
|---|
| 1962 |
|
|---|
| 1963 | Get the remaining time (in milliseconds) of the file currently being played.
|
|---|
| 1964 |
|
|---|
| 1965 | Returns the remaining time in milliseconds.
|
|---|
| 1966 |
|
|---|
| 1967 | \sa totalTime(), currentTime(), totalTimeChanged()
|
|---|
| 1968 | */
|
|---|
| 1969 |
|
|---|
| 1970 | /*!
|
|---|
| 1971 | \fn void Phonon::MediaObject::play()
|
|---|
| 1972 |
|
|---|
| 1973 | Requests playback of the media data to start.
|
|---|
| 1974 |
|
|---|
| 1975 | Playback starts when the stateChanged() signal is emitted with
|
|---|
| 1976 | \l{Phonon::}{PlayingState}.
|
|---|
| 1977 |
|
|---|
| 1978 | If the media object is already in a
|
|---|
| 1979 | \l{Phonon::}{PlayingState}, nothing happens.
|
|---|
| 1980 |
|
|---|
| 1981 | \sa stop(), pause(), stateChanged()
|
|---|
| 1982 | */
|
|---|
| 1983 |
|
|---|
| 1984 | /*!
|
|---|
| 1985 | \fn void Phonon::MediaObject::pause()
|
|---|
| 1986 |
|
|---|
| 1987 | Requests playback to pause, and the media object to enter the
|
|---|
| 1988 | \l{Phonon::}{PausedState}. If it was paused already, nothing
|
|---|
| 1989 | changes.
|
|---|
| 1990 |
|
|---|
| 1991 | This function is asynchronous and the media might not be paused
|
|---|
| 1992 | immediately.
|
|---|
| 1993 |
|
|---|
| 1994 | \sa play(), stop(), stateChanged()
|
|---|
| 1995 | */
|
|---|
| 1996 |
|
|---|
| 1997 | /*!
|
|---|
| 1998 | \fn void Phonon::MediaObject::stop()
|
|---|
| 1999 |
|
|---|
| 2000 | Requests playback to stop, and the media object to enter the
|
|---|
| 2001 | \l{Phonon::}{StoppedState}. If it was stopped before
|
|---|
| 2002 | nothing changes.
|
|---|
| 2003 |
|
|---|
| 2004 | This function is asynchronous and the media might not be
|
|---|
| 2005 | stopped immediately.
|
|---|
| 2006 |
|
|---|
| 2007 | \sa play(), pause(), stateChanged()
|
|---|
| 2008 | */
|
|---|
| 2009 |
|
|---|
| 2010 | /*!
|
|---|
| 2011 | \fn void Phonon::MediaObject::seek(qint64 time)
|
|---|
| 2012 |
|
|---|
| 2013 | Requests a seek to the \a time indicated, specified in milliseconds.
|
|---|
| 2014 |
|
|---|
| 2015 | You can only seek if state() is PlayingState, BufferingState or PausedState.
|
|---|
| 2016 |
|
|---|
| 2017 | The call is asynchronous, so currentTime can still be the old
|
|---|
| 2018 | value right after this method was called. If all you need is a
|
|---|
| 2019 | slider that shows the current position and allows the user to
|
|---|
| 2020 | seek, use the class SeekSlider.
|
|---|
| 2021 |
|
|---|
| 2022 | If the current source of the media object is not seekable, calls
|
|---|
| 2023 | to this functions do nothing.
|
|---|
| 2024 |
|
|---|
| 2025 | \sa SeekSlider, tick()
|
|---|
| 2026 | */
|
|---|
| 2027 |
|
|---|
| 2028 | /*!
|
|---|
| 2029 | \fn void Phonon::MediaObject::stateChanged(Phonon::State newstate, Phonon::State oldstate)
|
|---|
| 2030 |
|
|---|
| 2031 | This signal is emitted when the state of the MediaObject has changed.
|
|---|
| 2032 | The \a oldstate and \a newstate parameters indicate the previous
|
|---|
| 2033 | state and current state of the media object.
|
|---|
| 2034 |
|
|---|
| 2035 | If you are only interested in the new state of the media object, you can
|
|---|
| 2036 | connect this signal to a slot that accepts only one State argument.
|
|---|
| 2037 | */
|
|---|
| 2038 |
|
|---|
| 2039 | /*!
|
|---|
| 2040 | \fn void Phonon::MediaObject::tick(qint64 time)
|
|---|
| 2041 |
|
|---|
| 2042 | This signal is emitted in intervals defined by the
|
|---|
| 2043 | \l{tickInterval} property. The current position of the media
|
|---|
| 2044 | object in the stream is given by the \a time parameter. The \a
|
|---|
| 2045 | time is specified in milliseconds.
|
|---|
| 2046 |
|
|---|
| 2047 | \sa tickInterval
|
|---|
| 2048 | */
|
|---|
| 2049 |
|
|---|
| 2050 | /*!
|
|---|
| 2051 | \fn void Phonon::MediaObject::metaDataChanged()
|
|---|
| 2052 |
|
|---|
| 2053 | This signal is emitted when the media object has resolved new meta
|
|---|
| 2054 | data. This will happen before the media object leaves the
|
|---|
| 2055 | \l{Phonon::}{LoadingState} after a new source has been set.
|
|---|
| 2056 |
|
|---|
| 2057 | This signal is not emitted when the media object removes the
|
|---|
| 2058 | current data, i.e., when a new source is set or an error has
|
|---|
| 2059 | occurred. If you need to know this, you can listen for the
|
|---|
| 2060 | \l{Phonon::}{ErrorState}, and connect to the
|
|---|
| 2061 | \l{Phonon::MediaObject::}{currentSourceChanged()} signal.
|
|---|
| 2062 |
|
|---|
| 2063 | You can get the new meta data with the metaData methods.
|
|---|
| 2064 |
|
|---|
| 2065 | \sa metaData(), currentSourceChanged(), stateChanged(), Phonon::State
|
|---|
| 2066 | */
|
|---|
| 2067 |
|
|---|
| 2068 | /*!
|
|---|
| 2069 | \fn void Phonon::MediaObject::seekableChanged(bool isSeekable)
|
|---|
| 2070 |
|
|---|
| 2071 | This signal is emitted when the media object's ability to seek in
|
|---|
| 2072 | the media stream changes. \a isSeekable is true if it is possible
|
|---|
| 2073 | to seek(); otherwise, it is false.
|
|---|
| 2074 |
|
|---|
| 2075 | Change in the ability to seek in the stream usually happens when
|
|---|
| 2076 | the current source changes or when an error occurs.
|
|---|
| 2077 |
|
|---|
| 2078 | \omit Emitted whenever the return value of isSeekable()
|
|---|
| 2079 | changes. \endomit
|
|---|
| 2080 |
|
|---|
| 2081 | Normally you'll check isSeekable() after setting a new media
|
|---|
| 2082 | source, and then let this signal tell you when seeking is
|
|---|
| 2083 | possible. That way you don't have to poll isSeekable().
|
|---|
| 2084 | */
|
|---|
| 2085 |
|
|---|
| 2086 | /*!
|
|---|
| 2087 | \fn void Phonon::MediaObject::hasVideoChanged(bool hasVideo)
|
|---|
| 2088 |
|
|---|
| 2089 | Emitted whenever the return value of hasVideo() changes, i.e.,
|
|---|
| 2090 | the media source being played back contains video.
|
|---|
| 2091 |
|
|---|
| 2092 | Normally you'll check hasVideo() first and then let this signal
|
|---|
| 2093 | tell you whether video is available now or not. That way you
|
|---|
| 2094 | don't have to poll hasVideo().
|
|---|
| 2095 |
|
|---|
| 2096 | \a hasVideo is true when the stream contains video and adding a
|
|---|
| 2097 | VideoWidget will show a video, and false if there is no video data
|
|---|
| 2098 | in the stream and adding a VideoWidget will show an empty (black)
|
|---|
| 2099 | VideoWidget.
|
|---|
| 2100 | */
|
|---|
| 2101 |
|
|---|
| 2102 | /*!
|
|---|
| 2103 | \fn void Phonon::MediaObject::bufferStatus(int percentFilled)
|
|---|
| 2104 |
|
|---|
| 2105 | Provides information about the status of the buffer.
|
|---|
| 2106 |
|
|---|
| 2107 | When a MediaObject is in the \l{Phonon::}{BufferingState}, it will
|
|---|
| 2108 | send this signal regularly. \a percentFilled is a number between 0
|
|---|
| 2109 | and 100 telling you how much the buffer is filled.
|
|---|
| 2110 |
|
|---|
| 2111 | You can use this signal to show a progress bar to the user when
|
|---|
| 2112 | in BufferingState:
|
|---|
| 2113 |
|
|---|
| 2114 | \snippet doc/src/snippets/code/doc_src_phonon-api.qdoc 15
|
|---|
| 2115 |
|
|---|
| 2116 | Note that the \l{Phonon::}{BufferingState} is commonly used when
|
|---|
| 2117 | waiting for data over a network connection, but this might not be
|
|---|
| 2118 | true for all backends.
|
|---|
| 2119 | */
|
|---|
| 2120 |
|
|---|
| 2121 | /*!
|
|---|
| 2122 | \fn void Phonon::MediaObject::finished()
|
|---|
| 2123 |
|
|---|
| 2124 | Emitted when the object has finished playback. It is not emitted
|
|---|
| 2125 | if you call stop(), pause() or load(). It is emitted only when the
|
|---|
| 2126 | current media source has finished playing and the media queue() is
|
|---|
| 2127 | empty, or when a \l{Phonon::FatalError}{fatal error} occurs.
|
|---|
| 2128 |
|
|---|
| 2129 | \warning This signal is not emitted when the current source has
|
|---|
| 2130 | finished and there's another source in the queue. It is only
|
|---|
| 2131 | emitted when the queue is empty.
|
|---|
| 2132 |
|
|---|
| 2133 | \sa currentSourceChanged(), aboutToFinish(), prefinishMarkReached()
|
|---|
| 2134 | */
|
|---|
| 2135 |
|
|---|
| 2136 | /*!
|
|---|
| 2137 | \fn void Phonon::MediaObject::currentSourceChanged(const Phonon::MediaSource &newSource)
|
|---|
| 2138 |
|
|---|
| 2139 | Emitted when the MediaObject fetches a new MediaSource from the
|
|---|
| 2140 | queue() and before it enters the \l{Phonon::}{LoadingState} for
|
|---|
| 2141 | the new source. The media object will take a new source from the
|
|---|
| 2142 | queue() when it has finished the playback of the
|
|---|
| 2143 | \l{currentSource()}{current source}.
|
|---|
| 2144 |
|
|---|
| 2145 | \a newSource is the source that starts to play at the time the
|
|---|
| 2146 | signal is emitted.
|
|---|
| 2147 | */
|
|---|
| 2148 |
|
|---|
| 2149 | /*!
|
|---|
| 2150 | \fn void Phonon::MediaObject::aboutToFinish()
|
|---|
| 2151 |
|
|---|
| 2152 | Emitted before the playback of the whole queue ends. When this
|
|---|
| 2153 | signal is emitted you still have time to enqueue() a new
|
|---|
| 2154 | MediaSource, so that playback continues.
|
|---|
| 2155 |
|
|---|
| 2156 | If you need a signal to be emitted at a specific time before
|
|---|
| 2157 | playback is finished, you should use the prefinishMarkReached()
|
|---|
| 2158 | signal instead.
|
|---|
| 2159 |
|
|---|
| 2160 | \sa enqueue(), prefinishMark, prefinishMarkReached()
|
|---|
| 2161 | */
|
|---|
| 2162 |
|
|---|
| 2163 | /*!
|
|---|
| 2164 | \fn void Phonon::MediaObject::prefinishMarkReached(qint32 msecToEnd)
|
|---|
| 2165 |
|
|---|
| 2166 | Emitted when there are only \a msecToEnd milliseconds left
|
|---|
| 2167 | of playback.
|
|---|
| 2168 |
|
|---|
| 2169 | \warning This signal is not emitted when there is another source
|
|---|
| 2170 | in the queue. It is only emitted when the queue is empty.
|
|---|
| 2171 |
|
|---|
| 2172 | \sa setPrefinishMark(), prefinishMark(), aboutToFinish(), finished()
|
|---|
| 2173 | */
|
|---|
| 2174 |
|
|---|
| 2175 | /*!
|
|---|
| 2176 | \fn void Phonon::MediaObject::totalTimeChanged(qint64 newTotalTime)
|
|---|
| 2177 |
|
|---|
| 2178 | This signal is emitted as soon as the total time of the media file is
|
|---|
| 2179 | known or has changed. For most non-local media data the total
|
|---|
| 2180 | time of the media can only be known after some time. At that time the
|
|---|
| 2181 | totalTime function can not return useful information. You have
|
|---|
| 2182 | to wait for this signal to know the real total time.
|
|---|
| 2183 |
|
|---|
| 2184 | \a newTotalTime is the length of the media file in milliseconds.
|
|---|
| 2185 |
|
|---|
| 2186 | \sa totalTime()
|
|---|
| 2187 | */
|
|---|
| 2188 |
|
|---|
| 2189 | /*!
|
|---|
| 2190 | \fn MediaObject *Phonon::createPlayer(Phonon::Category category, const MediaSource &source = MediaSource())
|
|---|
| 2191 |
|
|---|
| 2192 | Convenience function to create a MediaObject and AudioOutput
|
|---|
| 2193 | connected by a path. The \l{Phonon::}{MediaObject} return will
|
|---|
| 2194 | have \a source set as its current source and the specified \a
|
|---|
| 2195 | category.
|
|---|
| 2196 |
|
|---|
| 2197 | */
|
|---|
| 2198 |
|
|---|
| 2199 | /*!
|
|---|
| 2200 | \class Phonon::MediaObjectPrivate
|
|---|
| 2201 | \inmodule Phonon
|
|---|
| 2202 | \since 4.4
|
|---|
| 2203 | \internal
|
|---|
| 2204 | */
|
|---|
| 2205 |
|
|---|
| 2206 | /*!
|
|---|
| 2207 | \namespace Phonon::BackendCapabilities
|
|---|
| 2208 | \inmodule Phonon
|
|---|
| 2209 | \since 4.4
|
|---|
| 2210 | \brief The BackendCapabilities namespace contains functions to describe the capabilities of the multimedia backend.
|
|---|
| 2211 |
|
|---|
| 2212 | */
|
|---|
| 2213 |
|
|---|
| 2214 | /*!
|
|---|
| 2215 | \class Phonon::BackendCapabilitiesPrivate
|
|---|
| 2216 | \inmodule Phonon
|
|---|
| 2217 | \since 4.4
|
|---|
| 2218 | \internal
|
|---|
| 2219 | */
|
|---|
| 2220 |
|
|---|
| 2221 | /*!
|
|---|
| 2222 | \class Phonon::BackendCapabilities::Notifier
|
|---|
| 2223 | \since 4.4
|
|---|
| 2224 | \inmodule Phonon
|
|---|
| 2225 | \inheaderfile Phonon/BackendCapabilities
|
|---|
| 2226 |
|
|---|
| 2227 | Notifications about backend capabilities.
|
|---|
| 2228 | */
|
|---|
| 2229 |
|
|---|
| 2230 | /*!
|
|---|
| 2231 | \fn void Phonon::BackendCapabilities::Notifier::capabilitiesChanged()
|
|---|
| 2232 |
|
|---|
| 2233 | This signal is emitted if the capabilities have changed. This can
|
|---|
| 2234 | happen if the user has requested a backend change.
|
|---|
| 2235 | */
|
|---|
| 2236 |
|
|---|
| 2237 | /*!
|
|---|
| 2238 | \fn void Phonon::BackendCapabilities::Notifier::availableAudioOutputDevicesChanged()
|
|---|
| 2239 |
|
|---|
| 2240 | This signal is emitted when audio output devices were plugged or
|
|---|
| 2241 | unplugged.
|
|---|
| 2242 |
|
|---|
| 2243 | Check BackendCapabilities::availableAudioOutputDevices to get the
|
|---|
| 2244 | current list of available devices.
|
|---|
| 2245 | */
|
|---|
| 2246 |
|
|---|
| 2247 | /*!
|
|---|
| 2248 | \fn Notifier *Phonon::BackendCapabilities::notifier()
|
|---|
| 2249 |
|
|---|
| 2250 | Use this function to get a QObject pointer to connect to the capabilitiesChanged signal.
|
|---|
| 2251 |
|
|---|
| 2252 | \return a pointer to a QObject.
|
|---|
| 2253 |
|
|---|
| 2254 | The capabilitiesChanged signal is emitted if the capabilities have changed. This can
|
|---|
| 2255 | happen if the user has requested a backend change.
|
|---|
| 2256 |
|
|---|
| 2257 | To connect to this signal do the following:
|
|---|
| 2258 | \snippet doc/src/snippets/code/doc_src_phonon-api.qdoc 16
|
|---|
| 2259 |
|
|---|
| 2260 | \sa Notifier::capabilitiesChanged()
|
|---|
| 2261 | */
|
|---|
| 2262 |
|
|---|
| 2263 | /*!
|
|---|
| 2264 | \fn QStringList Phonon::BackendCapabilities::availableMimeTypes()
|
|---|
| 2265 |
|
|---|
| 2266 | Returns a list of mime types that the Backend can decode.
|
|---|
| 2267 |
|
|---|
| 2268 | \sa isMimeTypeAvailable()
|
|---|
| 2269 | */
|
|---|
| 2270 |
|
|---|
| 2271 | /*!
|
|---|
| 2272 | \fn bool Phonon::BackendCapabilities::isMimeTypeAvailable(const QString &mimeType)
|
|---|
| 2273 |
|
|---|
| 2274 | Often all you want to know is whether one given MIME type can be
|
|---|
| 2275 | decoded by the backend. Use this method in favor of
|
|---|
| 2276 | availableMimeTypes() as it can give you a negative answer without
|
|---|
| 2277 | having a backend loaded.
|
|---|
| 2278 |
|
|---|
| 2279 | Returns true if the given \a mimeType is supported by the backend;
|
|---|
| 2280 | otherwise, returns false.
|
|---|
| 2281 |
|
|---|
| 2282 | \sa availableMimeTypes()
|
|---|
| 2283 | */
|
|---|
| 2284 |
|
|---|
| 2285 | /*!
|
|---|
| 2286 | \fn QList<AudioOutputDevice> Phonon::BackendCapabilities::availableAudioOutputDevices()
|
|---|
| 2287 |
|
|---|
| 2288 | Returns the audio output devices the backend supports.
|
|---|
| 2289 |
|
|---|
| 2290 | \return A list of AudioOutputDevice objects that give a name and
|
|---|
| 2291 | description for every supported audio output device.
|
|---|
| 2292 | */
|
|---|
| 2293 |
|
|---|
| 2294 | /*!
|
|---|
| 2295 | \fn QList<EffectDescription> Phonon::BackendCapabilities::availableAudioEffects()
|
|---|
| 2296 |
|
|---|
| 2297 | Returns descriptions for the audio effects the backend supports.
|
|---|
| 2298 |
|
|---|
| 2299 | \return A list of AudioEffectDescription objects that give a name and
|
|---|
| 2300 | description for every supported audio effect.
|
|---|
| 2301 | */
|
|---|
| 2302 |
|
|---|
| 2303 | /*!
|
|---|
| 2304 | \internal
|
|---|
| 2305 | \class ObjectDescriptionModelData
|
|---|
| 2306 | \internal
|
|---|
| 2307 | \inmodule Phonon
|
|---|
| 2308 | \brief Data class for models for ObjectDescription objects.
|
|---|
| 2309 | */
|
|---|
| 2310 |
|
|---|
| 2311 | /*!
|
|---|
| 2312 | \typedef Phonon::EffectDescription
|
|---|
| 2313 | \relates Phonon::ObjectDescription
|
|---|
| 2314 |
|
|---|
| 2315 | EffectDescription gives a description of an \l{Processors}{audio
|
|---|
| 2316 | effect}. It is a typedef of the \l{Phonon::}{ObjectDescription}
|
|---|
| 2317 | class. Please see its class description for details.
|
|---|
| 2318 |
|
|---|
| 2319 | EffectDescription is used to create audio \l{Phonon::}{Effect}s,
|
|---|
| 2320 | which can be inserted into a media graph, altering an audio
|
|---|
| 2321 | stream.
|
|---|
| 2322 |
|
|---|
| 2323 | \sa Phonon::ObjectDescription, {Capabilities Example}, {Media
|
|---|
| 2324 | Player}
|
|---|
| 2325 |
|
|---|
| 2326 | */
|
|---|
| 2327 |
|
|---|
| 2328 | /*!
|
|---|
| 2329 | \class Phonon::ObjectDescriptionModel
|
|---|
| 2330 | \inmodule Phonon
|
|---|
| 2331 | \internal
|
|---|
| 2332 | \since 4.4
|
|---|
| 2333 | \brief The ObjectDescriptionModel class provides a model from
|
|---|
| 2334 | a list of ObjectDescription objects.
|
|---|
| 2335 |
|
|---|
| 2336 | ObjectDescriptionModel is a read only model that supplies a list
|
|---|
| 2337 | using ObjectDescription::name() for the text and
|
|---|
| 2338 | ObjectDescription::description() for the tooltip. If set the properties
|
|---|
| 2339 | "icon" and "available" are used to set the decoration and disable the
|
|---|
| 2340 | item (disabled only visually, you can still select and drag it).
|
|---|
| 2341 |
|
|---|
| 2342 | It also provides the methods moveUp() and moveDown() to order the list.
|
|---|
| 2343 | Additionally drag and drop is possible so that
|
|---|
| 2344 | QAbstractItemView::InternalMove can be used.
|
|---|
| 2345 | The resulting order of the ObjectDescription::index() values can then be
|
|---|
| 2346 | retrieved using tupleIndexOrder().
|
|---|
| 2347 |
|
|---|
| 2348 | An example use case would be to give the user a QComboBox to select
|
|---|
| 2349 | the output device:
|
|---|
| 2350 | \snippet doc/src/snippets/code/doc_src_phonon-api.qdoc 17
|
|---|
| 2351 |
|
|---|
| 2352 | And to retrieve the selected AudioOutputDevice:
|
|---|
| 2353 | \snippet doc/src/snippets/code/doc_src_phonon-api.qdoc 18
|
|---|
| 2354 |
|
|---|
| 2355 | */
|
|---|
| 2356 |
|
|---|
| 2357 | /*!
|
|---|
| 2358 | \fn inline int Phonon::ObjectDescriptionModel::rowCount(const QModelIndex &parent = QModelIndex()) const
|
|---|
| 2359 |
|
|---|
| 2360 | Returns the number of rows in the model. This value corresponds
|
|---|
| 2361 | to the size of the list passed through setModelData.
|
|---|
| 2362 |
|
|---|
| 2363 | \param parent The optional \a parent argument is used in most models to specify
|
|---|
| 2364 | the parent of the rows to be counted. Because this is a list if a
|
|---|
| 2365 | valid parent is specified the result will always be 0.
|
|---|
| 2366 |
|
|---|
| 2367 | Reimplemented from QAbstractItemModel.
|
|---|
| 2368 |
|
|---|
| 2369 | \sa QAbstractItemModel::rowCount()
|
|---|
| 2370 | */
|
|---|
| 2371 |
|
|---|
| 2372 | /*!
|
|---|
| 2373 | \fn inline QVariant Phonon::ObjectDescriptionModel::data(const QModelIndex &index, int role = Qt::DisplayRole) const
|
|---|
| 2374 |
|
|---|
| 2375 | Returns data from the item with the given \a index for the specified
|
|---|
| 2376 | \a role.
|
|---|
| 2377 | If the view requests an invalid index, an invalid variant is
|
|---|
| 2378 | returned.
|
|---|
| 2379 |
|
|---|
| 2380 | Reimplemented from QAbstractItemModel.
|
|---|
| 2381 |
|
|---|
| 2382 | \sa QAbstractItemModel::data(), Qt::ItemDataRole
|
|---|
| 2383 | */
|
|---|
| 2384 |
|
|---|
| 2385 | /*!
|
|---|
| 2386 | \fn inline Qt::ItemFlags Phonon::ObjectDescriptionModel::flags(const QModelIndex &index) const
|
|---|
| 2387 | \internal
|
|---|
| 2388 |
|
|---|
| 2389 | Reimplemented to show unavailable devices as disabled (but still
|
|---|
| 2390 | selectable). The \a index of the model index for which to return
|
|---|
| 2391 | flags.
|
|---|
| 2392 |
|
|---|
| 2393 | */
|
|---|
| 2394 |
|
|---|
| 2395 | /*!
|
|---|
| 2396 | \fn inline QList<int> Phonon::ObjectDescriptionModel::tupleIndexOrder() const
|
|---|
| 2397 |
|
|---|
| 2398 | Returns a list of indexes in the same order as they are in the
|
|---|
| 2399 | model. The indexes come from the ObjectDescription::index
|
|---|
| 2400 | method.
|
|---|
| 2401 |
|
|---|
| 2402 | This is useful to let the user define a list of preference.
|
|---|
| 2403 | */
|
|---|
| 2404 |
|
|---|
| 2405 | /*!
|
|---|
| 2406 | \fn inline int Phonon::ObjectDescriptionModel::tupleIndexAtPositionIndex(int positionIndex) const
|
|---|
| 2407 |
|
|---|
| 2408 | Returns the ObjectDescription::index for the tuple
|
|---|
| 2409 | at the given position \a positionIndex. For example a
|
|---|
| 2410 | QComboBox will give you the currentIndex as the
|
|---|
| 2411 | position in the list. But to select the according
|
|---|
| 2412 | AudioOutputDevice using AudioOutputDevice::fromIndex
|
|---|
| 2413 | you can use this method.
|
|---|
| 2414 |
|
|---|
| 2415 | \param positionIndex The position in the list.
|
|---|
| 2416 | */
|
|---|
| 2417 |
|
|---|
| 2418 | /*!
|
|---|
| 2419 | \class Phonon::ObjectDescriptionModelDataPrivate
|
|---|
| 2420 | \inmodule Phonon
|
|---|
| 2421 | \since 4.4
|
|---|
| 2422 | \internal
|
|---|
| 2423 | */
|
|---|
| 2424 |
|
|---|
| 2425 | /*!
|
|---|
| 2426 | \fn inline QMimeData *Phonon::ObjectDescriptionModel::mimeData(const QModelIndexList &indexes) const
|
|---|
| 2427 | \internal
|
|---|
| 2428 |
|
|---|
| 2429 | Returns the MIME data that dropMimeData() can use to create new
|
|---|
| 2430 | items.
|
|---|
| 2431 | */
|
|---|
| 2432 |
|
|---|
| 2433 | /*!
|
|---|
| 2434 | \fn inline void Phonon::ObjectDescriptionModel::moveUp(const QModelIndex &index)
|
|---|
| 2435 |
|
|---|
| 2436 | Moves the item at the given \a index up. In the resulting list
|
|---|
| 2437 | the items at index.row() and index.row() - 1 are swapped.
|
|---|
| 2438 |
|
|---|
| 2439 | Connected views are updated automatically.
|
|---|
| 2440 | */
|
|---|
| 2441 |
|
|---|
| 2442 | /*!
|
|---|
| 2443 | \fn inline void Phonon::ObjectDescriptionModel::moveDown(const QModelIndex &index)
|
|---|
| 2444 |
|
|---|
| 2445 | Moves the item at the given \a index down. In the resulting list
|
|---|
| 2446 | the items at index.row() and index.row() + 1 are swapped.
|
|---|
| 2447 |
|
|---|
| 2448 | Connected views are updated automatically.
|
|---|
| 2449 | */
|
|---|
| 2450 |
|
|---|
| 2451 | /*!
|
|---|
| 2452 | \fn explicit inline Phonon::ObjectDescriptionModel::ObjectDescriptionModel(QObject *parent = 0)
|
|---|
| 2453 |
|
|---|
| 2454 | Constructs a ObjectDescription model with the
|
|---|
| 2455 | given \a parent.
|
|---|
| 2456 | */
|
|---|
| 2457 |
|
|---|
| 2458 | /*!
|
|---|
| 2459 | \fn explicit inline Phonon::ObjectDescriptionModel::ObjectDescriptionModel(const QList<ObjectDescription<type> > &data, QObject *parent = 0)
|
|---|
| 2460 |
|
|---|
| 2461 | Constructs a ObjectDescription model with the
|
|---|
| 2462 | given \a parent and the given \a data.
|
|---|
| 2463 | */
|
|---|
| 2464 |
|
|---|
| 2465 | /*!
|
|---|
| 2466 | \fn inline void Phonon::ObjectDescriptionModel::setModelData(const QList<ObjectDescription<type> > &data)
|
|---|
| 2467 |
|
|---|
| 2468 | Sets the model data using the list provided by \a data.
|
|---|
| 2469 |
|
|---|
| 2470 | All previous model data is cleared.
|
|---|
| 2471 | */
|
|---|
| 2472 |
|
|---|
| 2473 | /*!
|
|---|
| 2474 | \fn inline QList<ObjectDescription<type> > Phonon::ObjectDescriptionModel::modelData() const
|
|---|
| 2475 |
|
|---|
| 2476 | Returns the model data.
|
|---|
| 2477 |
|
|---|
| 2478 | As the order of the list might have changed this can be different
|
|---|
| 2479 | to what was set using setModelData().
|
|---|
| 2480 | */
|
|---|
| 2481 |
|
|---|
| 2482 | /*!
|
|---|
| 2483 | \fn inline ObjectDescription<type> Phonon::ObjectDescriptionModel::modelData(const QModelIndex &index) const
|
|---|
| 2484 |
|
|---|
| 2485 | Returns one ObjectDescription of the model data for the given \a index.
|
|---|
| 2486 | */
|
|---|
| 2487 |
|
|---|
| 2488 | /*!
|
|---|
| 2489 | \fn inline Qt::DropActions Phonon::ObjectDescriptionModel::supportedDropActions() const
|
|---|
| 2490 |
|
|---|
| 2491 | This model supports drag and drop to copy or move
|
|---|
| 2492 | items.
|
|---|
| 2493 | */
|
|---|
| 2494 |
|
|---|
| 2495 | /*!
|
|---|
| 2496 | \fn inline bool Phonon::ObjectDescriptionModel::dropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent)
|
|---|
| 2497 |
|
|---|
| 2498 | Accept drops from other models of the same ObjectDescriptionType.
|
|---|
| 2499 |
|
|---|
| 2500 | The \a data is dropped at the given \a row and \a column; you
|
|---|
| 2501 | also receive the \a parent model index.
|
|---|
| 2502 |
|
|---|
| 2503 | If a valid \a parent is given the dropped items will be inserted
|
|---|
| 2504 | above that item.
|
|---|
| 2505 | */
|
|---|
| 2506 |
|
|---|
| 2507 | /*!
|
|---|
| 2508 | \fn inline bool Phonon::ObjectDescriptionModel::removeRows(int row, int count, const QModelIndex &parent = QModelIndex())
|
|---|
| 2509 |
|
|---|
| 2510 | Removes count rows starting with the given row.
|
|---|
| 2511 |
|
|---|
| 2512 | If a valid \a parent is given no rows are removed since this is a
|
|---|
| 2513 | list model.
|
|---|
| 2514 |
|
|---|
| 2515 | Returns true if the rows were successfully removed; otherwise returns false.
|
|---|
| 2516 | */
|
|---|
| 2517 |
|
|---|
| 2518 | /*!
|
|---|
| 2519 | \fn inline QStringList Phonon::ObjectDescriptionModel::mimeTypes() const
|
|---|
| 2520 |
|
|---|
| 2521 | Returns a list of supported drag and drop MIME types. Currently
|
|---|
| 2522 | it only supports one type used internally.
|
|---|
| 2523 | */
|
|---|
| 2524 |
|
|---|
| 2525 | /*!
|
|---|
| 2526 | \class Phonon::EffectInterface
|
|---|
| 2527 | \inmodule Phonon
|
|---|
| 2528 | \since 4.4
|
|---|
| 2529 | \internal
|
|---|
| 2530 | */
|
|---|
| 2531 |
|
|---|
| 2532 | /*!
|
|---|
| 2533 | \class Phonon::Effect
|
|---|
| 2534 | \inmodule Phonon
|
|---|
| 2535 | \inheaderfile Phonon/Effect
|
|---|
| 2536 | \since 4.4
|
|---|
| 2537 | \brief The Effect class is used to transform audio streams.
|
|---|
| 2538 |
|
|---|
| 2539 | An effect is a media node which is inserted into a path between a
|
|---|
| 2540 | \l{Phonon::}{MediaObject} and an audio output node, for instance,
|
|---|
| 2541 | an \l{Phonon::}{AudioOutput}. The Effect transforms the media
|
|---|
| 2542 | stream on that path.
|
|---|
| 2543 |
|
|---|
| 2544 | Examples may include simple modifiers, such as fading or pitch
|
|---|
| 2545 | shifting, and more complex mathematical transformations. You can
|
|---|
| 2546 | query the backend for available effects with
|
|---|
| 2547 | BackendCapabilities::availableAudioEffects(). Note that the
|
|---|
| 2548 | effects available is dependent on the underlying system
|
|---|
| 2549 | (DirectDraw, GStreamer, or QuickTime).
|
|---|
| 2550 |
|
|---|
| 2551 | In order to use an effect, insert it into the path as follows:
|
|---|
| 2552 |
|
|---|
| 2553 | \snippet doc/src/snippets/code/doc_src_phonon-api.qdoc 19
|
|---|
| 2554 |
|
|---|
| 2555 | The effect will immediately begin applying it's transformations on
|
|---|
| 2556 | the path. To stop it, remove the Effect from the path.
|
|---|
| 2557 |
|
|---|
| 2558 | To create an effect, you use the \l{Phonon::}{EffectDescription}
|
|---|
| 2559 | class, which you get from
|
|---|
| 2560 | \l{BackendCapabilities::}{availableAudioEffects()}. We give a code
|
|---|
| 2561 | example below.
|
|---|
| 2562 |
|
|---|
| 2563 | \snippet doc/src/snippets/audioeffects.cpp 0
|
|---|
| 2564 |
|
|---|
| 2565 | An effect can have one or more parameters, which let you alter how
|
|---|
| 2566 | the effect works, for instance, by specifying the depth of a
|
|---|
| 2567 | reverb effect. See the EffectParameter class description for
|
|---|
| 2568 | details.
|
|---|
| 2569 |
|
|---|
| 2570 | Phonon also provides EffectWidget, which lets the user modify the
|
|---|
| 2571 | parameters of an effect an the fly; e.g., with combo boxes.
|
|---|
| 2572 |
|
|---|
| 2573 | \sa {Phonon Module}, EffectWidget
|
|---|
| 2574 | */
|
|---|
| 2575 |
|
|---|
| 2576 | /*!
|
|---|
| 2577 | \fn explicit Phonon::Effect::Effect(const EffectDescription &description, QObject *parent = 0)
|
|---|
| 2578 |
|
|---|
| 2579 | Constructs a new effect object with the given \a description and \a parent object.
|
|---|
| 2580 |
|
|---|
| 2581 | The EffectDescription object determines the type of the effect.
|
|---|
| 2582 |
|
|---|
| 2583 | \sa {Phonon::BackendCapabilities::availableAudioEffects()}
|
|---|
| 2584 | */
|
|---|
| 2585 |
|
|---|
| 2586 | /*!
|
|---|
| 2587 | \fn Phonon::Effect::Effect(EffectPrivate &dd, QObject *parent)
|
|---|
| 2588 | \internal
|
|---|
| 2589 | */
|
|---|
| 2590 |
|
|---|
| 2591 | /*!
|
|---|
| 2592 | \fn Phonon::Effect::~Effect()
|
|---|
| 2593 | \internal
|
|---|
| 2594 | */
|
|---|
| 2595 |
|
|---|
| 2596 | /*!
|
|---|
| 2597 | \fn QVariant Phonon::Effect::parameterValue(const EffectParameter ¶meter) const
|
|---|
| 2598 |
|
|---|
| 2599 | Returns the value of the given effect \a parameter. You can fetch
|
|---|
| 2600 | the available parameters for an effect with parameters().
|
|---|
| 2601 |
|
|---|
| 2602 | \sa setParameterValue(), EffectParameter
|
|---|
| 2603 | */
|
|---|
| 2604 |
|
|---|
| 2605 | /*!
|
|---|
| 2606 | \fn void Phonon::Effect::setParameterValue(const EffectParameter ¶meter, const QVariant &value)
|
|---|
| 2607 |
|
|---|
| 2608 | Sets the given effect \a parameter to the specified \a value.
|
|---|
| 2609 |
|
|---|
| 2610 | Parameters for an effect are returned by parameters(). You can
|
|---|
| 2611 | check which QVariant::Type an EffectParameter takes with the
|
|---|
| 2612 | EffectParameter::type() function.
|
|---|
| 2613 |
|
|---|
| 2614 | \sa parameterValue(), EffectParameter
|
|---|
| 2615 | */
|
|---|
| 2616 |
|
|---|
| 2617 | /*!
|
|---|
| 2618 | \fn EffectDescription Phonon::Effect::description() const;
|
|---|
| 2619 |
|
|---|
| 2620 | Returns the description of this effect. This is the same
|
|---|
| 2621 | description that was passed to the constructor.
|
|---|
| 2622 | */
|
|---|
| 2623 |
|
|---|
| 2624 | /*!
|
|---|
| 2625 | \fn QList<EffectParameter> Phonon::Effect::parameters() const;
|
|---|
| 2626 |
|
|---|
| 2627 | Returns a list of parameters that this effect provides to control
|
|---|
| 2628 | its behavior.
|
|---|
| 2629 |
|
|---|
| 2630 | \sa EffectParameter, EffectWidget
|
|---|
| 2631 | */
|
|---|
| 2632 |
|
|---|
| 2633 | /*!
|
|---|
| 2634 | \class Phonon::EffectPrivate
|
|---|
| 2635 | \inmodule Phonon
|
|---|
| 2636 | \since 4.4
|
|---|
| 2637 | \internal
|
|---|
| 2638 | */
|
|---|
| 2639 |
|
|---|
| 2640 | /*!
|
|---|
| 2641 | \class Phonon::AudioOutput
|
|---|
| 2642 | \inmodule Phonon
|
|---|
| 2643 | \inheaderfile Phonon/AudioOutput
|
|---|
| 2644 | \since 4.4
|
|---|
| 2645 | \brief The AudioOutput class is used to send data to audio output devices.
|
|---|
| 2646 |
|
|---|
| 2647 | The AudioOutput class plays sound over a sound device. The audio
|
|---|
| 2648 | output needs to be connected to a \l{Phonon::}{MediaObject} using
|
|---|
| 2649 | \l{Phonon::}{createPath()}. To start playback, you call
|
|---|
| 2650 | \l{Phonon::MediaObject::}{play()} on the media object.
|
|---|
| 2651 |
|
|---|
| 2652 | \snippet snippets/phonon.cpp 2
|
|---|
| 2653 |
|
|---|
| 2654 | The class supports changing the volume(). It is also possible to
|
|---|
| 2655 | mute the sound.
|
|---|
| 2656 |
|
|---|
| 2657 | To find out what \l{Phonon::}{AudioOutputDevice}s are available
|
|---|
| 2658 | for AudioOutput, you can call
|
|---|
| 2659 | BackendCapabilities::availableAudioOutputDevices(). A default device is
|
|---|
| 2660 | selected by the backend, but it is possible to set the device to
|
|---|
| 2661 | be used with setOutputDevice(). The outputDeviceChanged() signal
|
|---|
| 2662 | will be emitted if the device changes.
|
|---|
| 2663 |
|
|---|
| 2664 | If an error occurs with the playback, for instance, if no valid
|
|---|
| 2665 | output device is found, the media object will receive a
|
|---|
| 2666 | stateChanged() signal with the \l{Phonon::}{ErrorState}.
|
|---|
| 2667 |
|
|---|
| 2668 | Note that the default values of properties are dependent on the
|
|---|
| 2669 | backend.
|
|---|
| 2670 |
|
|---|
| 2671 | \sa Phonon::VolumeSlider, {Music Player Example}, BackendCapabilities, {Phonon Module}
|
|---|
| 2672 | */
|
|---|
| 2673 |
|
|---|
| 2674 | /*!
|
|---|
| 2675 | \property Phonon::AudioOutput::name
|
|---|
| 2676 |
|
|---|
| 2677 | This is the name that appears in Mixer applications that control
|
|---|
| 2678 | the volume of this output.
|
|---|
| 2679 |
|
|---|
| 2680 | */
|
|---|
| 2681 |
|
|---|
| 2682 | /*!
|
|---|
| 2683 | \property Phonon::AudioOutput::volume
|
|---|
| 2684 |
|
|---|
| 2685 | This is the current loudness of the output. \omit The volume is a
|
|---|
| 2686 | real value between 0.0 (minimum) and 1.0 (maximum). The volume
|
|---|
| 2687 | follows the sound device used, with 1.0 being the maximum volume
|
|---|
| 2688 | the device can produce. \endomit
|
|---|
| 2689 |
|
|---|
| 2690 | (it is using Stevens' law
|
|---|
| 2691 | to calculate the change in voltage internally).
|
|---|
| 2692 |
|
|---|
| 2693 | \sa volumeDecibel
|
|---|
| 2694 | */
|
|---|
| 2695 |
|
|---|
| 2696 | /*!
|
|---|
| 2697 | \property Phonon::AudioOutput::volumeDecibel
|
|---|
| 2698 |
|
|---|
| 2699 | This is the current volume of the output in decibel.
|
|---|
| 2700 |
|
|---|
| 2701 | 0 dB means no change in volume, -6dB means an attenuation of the
|
|---|
| 2702 | voltage to 50% and an attenuation of the power to 25%, -inf dB means
|
|---|
| 2703 | silence.
|
|---|
| 2704 |
|
|---|
| 2705 | \sa volume
|
|---|
| 2706 | */
|
|---|
| 2707 |
|
|---|
| 2708 | /*!
|
|---|
| 2709 | \property Phonon::AudioOutput::outputDevice
|
|---|
| 2710 | This property holds the (hardware) destination for the output.
|
|---|
| 2711 |
|
|---|
| 2712 | The default device is determined by the \l{Phonon::}{Category} and the global
|
|---|
| 2713 | configuration for that category. Normally you don't need
|
|---|
| 2714 | to override this setting - letting the user change the global
|
|---|
| 2715 | configuration is the right choice. You can still override the
|
|---|
| 2716 | device though, if you have good reasons to do so.
|
|---|
| 2717 |
|
|---|
| 2718 | \sa outputDeviceChanged()
|
|---|
| 2719 | */
|
|---|
| 2720 |
|
|---|
| 2721 | /*!
|
|---|
| 2722 | \property Phonon::AudioOutput::muted
|
|---|
| 2723 | This property tells whether the output is muted.
|
|---|
| 2724 |
|
|---|
| 2725 | Muting the output has the same effect as calling setVolume(0.0).
|
|---|
| 2726 | */
|
|---|
| 2727 |
|
|---|
| 2728 | /*!
|
|---|
| 2729 | \fn explicit Phonon::AudioOutput::AudioOutput(Phonon::Category category, QObject *parent = 0)
|
|---|
| 2730 |
|
|---|
| 2731 | Creates a new AudioOutput with the given \a parent that defines
|
|---|
| 2732 | output to a physical device.
|
|---|
| 2733 |
|
|---|
| 2734 | The \a category can be used by mixer applications to group volume
|
|---|
| 2735 | controls of applications into categories. That makes it easier for
|
|---|
| 2736 | the user to identify the programs.
|
|---|
| 2737 | The category is also used for the default output device that is
|
|---|
| 2738 | configured centrally. As an example: often users want to have the
|
|---|
| 2739 | audio signal of a VoIP application go to their USB headset while
|
|---|
| 2740 | all other sounds should go to the internal soundcard.
|
|---|
| 2741 |
|
|---|
| 2742 | \sa Phonon::categoryToString(), outputDevice
|
|---|
| 2743 | */
|
|---|
| 2744 |
|
|---|
| 2745 | /*!
|
|---|
| 2746 | \fn explicit Phonon::AudioOutput::AudioOutput(QObject *parent = 0)
|
|---|
| 2747 |
|
|---|
| 2748 | Creates a new AudioOutput that defines output to the system
|
|---|
| 2749 | default device with the \{Phonon::Category::}{NoCategory} category
|
|---|
| 2750 |
|
|---|
| 2751 | \sa Phonon::categoryToString(), outputDevice
|
|---|
| 2752 | */
|
|---|
| 2753 |
|
|---|
| 2754 | /*!
|
|---|
| 2755 | \fn Phonon::Category Phonon::AudioOutput::category() const
|
|---|
| 2756 |
|
|---|
| 2757 | Returns the category of this output.
|
|---|
| 2758 |
|
|---|
| 2759 | \sa Phonon::AudioOutput::AudioOutput()
|
|---|
| 2760 | */
|
|---|
| 2761 |
|
|---|
| 2762 | /*!
|
|---|
| 2763 | \fn void Phonon::AudioOutput::volumeChanged(qreal newVolume)
|
|---|
| 2764 |
|
|---|
| 2765 | This signal is emitted whenever the volume has changed. As the
|
|---|
| 2766 | volume can change without a call to setVolume (calls over dbus)
|
|---|
| 2767 | this is important to keep a widget showing the current volume up
|
|---|
| 2768 | to date.
|
|---|
| 2769 |
|
|---|
| 2770 | \a newVolume is the new volume level.
|
|---|
| 2771 |
|
|---|
| 2772 | \sa setVolume(), volume()
|
|---|
| 2773 | */
|
|---|
| 2774 |
|
|---|
| 2775 | /*!
|
|---|
| 2776 | \fn void Phonon::AudioOutput::mutedChanged(bool muted)
|
|---|
| 2777 |
|
|---|
| 2778 | This signal is emitted when the muted property has changed. The \a muted
|
|---|
| 2779 | value passed by the signal indicates the state of the muted property.
|
|---|
| 2780 | As this property can change by IPC (DBus) calls a UI element showing
|
|---|
| 2781 | the muted property should listen to this signal.
|
|---|
| 2782 | */
|
|---|
| 2783 |
|
|---|
| 2784 | /*!
|
|---|
| 2785 | \fn void Phonon::AudioOutput::outputDeviceChanged(const Phonon::AudioOutputDevice &newAudioOutputDevice)
|
|---|
| 2786 |
|
|---|
| 2787 | This signal is emitted when the (hardware) device for the output
|
|---|
| 2788 | has changed. \a newAudioOutputDevice is the new device.
|
|---|
| 2789 |
|
|---|
| 2790 | The change can happen either through setOutputDevice or if the
|
|---|
| 2791 | global configuration for the used category has changed.
|
|---|
| 2792 |
|
|---|
| 2793 | \sa outputDevice
|
|---|
| 2794 | */
|
|---|
| 2795 |
|
|---|
| 2796 | /*!
|
|---|
| 2797 | \class Phonon::AudioOutputPrivate
|
|---|
| 2798 | \inmodule Phonon
|
|---|
| 2799 | \since 4.4
|
|---|
| 2800 | \internal
|
|---|
| 2801 | */
|
|---|
| 2802 |
|
|---|
| 2803 | /*!
|
|---|
| 2804 | \class Phonon::EffectParameter
|
|---|
| 2805 | \inmodule Phonon
|
|---|
| 2806 | \inheaderfile Phonon/EffectParameter
|
|---|
| 2807 | \since 4.4
|
|---|
| 2808 | \brief The EffectParameter class describes one parameter of an effect.
|
|---|
| 2809 |
|
|---|
| 2810 | You fetch the parameters of an \l{Phonon::}{Effect} with
|
|---|
| 2811 | \l{Phonon::}{Effect::parameters()}.
|
|---|
| 2812 |
|
|---|
| 2813 | \snippet doc/src/snippets/phononeffectparameter.cpp 0
|
|---|
| 2814 |
|
|---|
| 2815 | To describe itself, an effect parameter gives a name() and
|
|---|
| 2816 | possibly description() (depending on the backend used). These are
|
|---|
| 2817 | suited to present the effect parameter to the user of a Phonon
|
|---|
| 2818 | application.
|
|---|
| 2819 |
|
|---|
| 2820 | Note that effects are created by the backend, and that
|
|---|
| 2821 | their name and descriptions may vary.
|
|---|
| 2822 |
|
|---|
| 2823 | The value of an effect parameter is stored in a \l{QVariant},
|
|---|
| 2824 | of which type() is usually \c int or \c double.
|
|---|
| 2825 |
|
|---|
| 2826 | The value is retrieved with \l{Phonon::}{Effect::parameterValue()}
|
|---|
| 2827 | and set with \l{Phonon::Effect::}{setParameterValue()} - both of
|
|---|
| 2828 | which takes the EffectParameter as argument. Note that not all
|
|---|
| 2829 | effect parameters support setting of their value.
|
|---|
| 2830 |
|
|---|
| 2831 | You get the values a parameter can take with possibleValues(); an
|
|---|
| 2832 | empty list is returned if the values are continuous.
|
|---|
| 2833 |
|
|---|
| 2834 | A parameter may also specify default(), minimum(), and maximum()
|
|---|
| 2835 | values. Values are returned as \l{QVariant}s. If the parameter
|
|---|
| 2836 | does not have the requested value, an \l{QVariant::Invalid}
|
|---|
| 2837 | invalid QVariant is returned from these functions.
|
|---|
| 2838 |
|
|---|
| 2839 | The \l{Phonon::}{EffectWidget} provides a widget with which one
|
|---|
| 2840 | can control the parameters of an \l{Phonon::}{Effect}.
|
|---|
| 2841 |
|
|---|
| 2842 | \snippet doc/src/snippets/phononeffectparameter.cpp 1
|
|---|
| 2843 |
|
|---|
| 2844 | \sa Effect, EffectWidget, {Capabilities Example}, {Phonon Module}
|
|---|
| 2845 | */
|
|---|
| 2846 |
|
|---|
| 2847 | /*!
|
|---|
| 2848 | \fn Phonon::EffectParameter::EffectParameter()
|
|---|
| 2849 | \internal
|
|---|
| 2850 |
|
|---|
| 2851 | Creates an invalid effect parameter.
|
|---|
| 2852 | */
|
|---|
| 2853 |
|
|---|
| 2854 | /*!
|
|---|
| 2855 | \fn Phonon::EffectParameter::~EffectParameter()
|
|---|
| 2856 |
|
|---|
| 2857 | Destroys the effect parameter.
|
|---|
| 2858 | */
|
|---|
| 2859 |
|
|---|
| 2860 | /*!
|
|---|
| 2861 | \fn Phonon::EffectParameter::EffectParameter(const EffectParameter &other)
|
|---|
| 2862 |
|
|---|
| 2863 | Constructs a copy of the \a other effect parameter.
|
|---|
| 2864 | */
|
|---|
| 2865 |
|
|---|
| 2866 | /*!
|
|---|
| 2867 | \fn const QString &Phonon::EffectParameter::name() const
|
|---|
| 2868 |
|
|---|
| 2869 | The name of the parameter. Can be used as the label.
|
|---|
| 2870 |
|
|---|
| 2871 | \return A label for the parameter.
|
|---|
| 2872 | */
|
|---|
| 2873 |
|
|---|
| 2874 | /*!
|
|---|
| 2875 | \fn const QString &Phonon::EffectParameter::description() const
|
|---|
| 2876 |
|
|---|
| 2877 | The parameter may come with a description (LADSPA doesn't have a
|
|---|
| 2878 | field for this, so don't expect many effects to provide a
|
|---|
| 2879 | description).
|
|---|
| 2880 |
|
|---|
| 2881 | The description can be used for a tooltip or WhatsThis help.
|
|---|
| 2882 |
|
|---|
| 2883 | \return A text describing the parameter.
|
|---|
| 2884 | */
|
|---|
| 2885 |
|
|---|
| 2886 | /*!
|
|---|
| 2887 | \fn QVariant::Type Phonon::EffectParameter::type() const
|
|---|
| 2888 |
|
|---|
| 2889 | Returns the parameter type.
|
|---|
| 2890 |
|
|---|
| 2891 | Common types are QVariant::Int, QVariant::Double, QVariant::Bool and QVariant::String. When
|
|---|
| 2892 | QVariant::String is returned you get the possible values from possibleValues.
|
|---|
| 2893 | */
|
|---|
| 2894 |
|
|---|
| 2895 | /*!
|
|---|
| 2896 | \fn bool Phonon::EffectParameter::isLogarithmicControl() const
|
|---|
| 2897 |
|
|---|
| 2898 | Returns whether the parameter should be
|
|---|
| 2899 | displayed using a logarithmic scale. This is particularly useful for
|
|---|
| 2900 | frequencies and gains.
|
|---|
| 2901 | */
|
|---|
| 2902 |
|
|---|
| 2903 | /*!
|
|---|
| 2904 | \fn QVariant Phonon::EffectParameter::minimumValue() const
|
|---|
| 2905 |
|
|---|
| 2906 | The minimum value to be used for the control to edit the parameter.
|
|---|
| 2907 |
|
|---|
| 2908 | If the returned QVariant is invalid the value is not bounded from
|
|---|
| 2909 | below.
|
|---|
| 2910 | */
|
|---|
| 2911 |
|
|---|
| 2912 | /*!
|
|---|
| 2913 | \fn QVariant Phonon::EffectParameter::maximumValue() const
|
|---|
| 2914 |
|
|---|
| 2915 | The maximum value to be used for the control to edit the parameter.
|
|---|
| 2916 |
|
|---|
| 2917 | If the returned QVariant is invalid the value is not bounded from
|
|---|
| 2918 | above.
|
|---|
| 2919 | */
|
|---|
| 2920 |
|
|---|
| 2921 | /*!
|
|---|
| 2922 | \fn QVariant Phonon::EffectParameter::defaultValue() const
|
|---|
| 2923 |
|
|---|
| 2924 | The default value.
|
|---|
| 2925 | */
|
|---|
| 2926 |
|
|---|
| 2927 | /*!
|
|---|
| 2928 | \fn QVariantList Phonon::EffectParameter::possibleValues() const
|
|---|
| 2929 |
|
|---|
| 2930 | The possible values to be used for the control to edit the parameter.
|
|---|
| 2931 |
|
|---|
| 2932 | if the value of this parameter is to be picked from predefined values
|
|---|
| 2933 | this returns the list (otherwise it returns an empty QVariantList).
|
|---|
| 2934 | */
|
|---|
| 2935 |
|
|---|
| 2936 | /*!
|
|---|
| 2937 | \fn bool Phonon::EffectParameter::operator<(const EffectParameter &rhs) const
|
|---|
| 2938 |
|
|---|
| 2939 | \internal
|
|---|
| 2940 | compares the ids of the parameters
|
|---|
| 2941 | */
|
|---|
| 2942 |
|
|---|
| 2943 | /*!
|
|---|
| 2944 | \fn bool Phonon::EffectParameter::operator>(const EffectParameter &rhs) const
|
|---|
| 2945 |
|
|---|
| 2946 | \internal
|
|---|
| 2947 | compares the ids of the parameters
|
|---|
| 2948 | */
|
|---|
| 2949 |
|
|---|
| 2950 | /*!
|
|---|
| 2951 | \fn bool Phonon::EffectParameter::operator==(const EffectParameter &rhs) const
|
|---|
| 2952 |
|
|---|
| 2953 | \internal
|
|---|
| 2954 | compares the ids of the parameters
|
|---|
| 2955 | */
|
|---|
| 2956 |
|
|---|
| 2957 | /*!
|
|---|
| 2958 | \fn Phonon::EffectParameter &Phonon::EffectParameter::operator=(const EffectParameter &other)
|
|---|
| 2959 |
|
|---|
| 2960 | Assigns the \a other effect parameter to this parameter and returns
|
|---|
| 2961 | a reference to this parameter.
|
|---|
| 2962 | */
|
|---|
| 2963 |
|
|---|
| 2964 | /*!
|
|---|
| 2965 | \enum Phonon::EffectParameter::Hint
|
|---|
| 2966 |
|
|---|
| 2967 | Only for backend developers:
|
|---|
| 2968 |
|
|---|
| 2969 | Flags to set the return values of isToggleControl(),
|
|---|
| 2970 | isLogarithmicControl(), isIntegerControl(), isBoundedBelow() and
|
|---|
| 2971 | isBoundedAbove(). The values of the flags correspond to the values
|
|---|
| 2972 | used for LADSPA effects.
|
|---|
| 2973 |
|
|---|
| 2974 | \value ToggledHint
|
|---|
| 2975 | If this hint is set it means that
|
|---|
| 2976 | the the control has only two states: zero and non-zero
|
|---|
| 2977 | (see isToggleControl()).
|
|---|
| 2978 |
|
|---|
| 2979 | \value LogarithmicHint
|
|---|
| 2980 | LADSPA's SAMPLE_RATE hint needs to be translated by the backend
|
|---|
| 2981 | to normal bounds, as the backend knows the sample rate - and the
|
|---|
| 2982 | frontend doesn't (see isLogarithmicControl()).
|
|---|
| 2983 |
|
|---|
| 2984 | \value IntegerHint See isIntegerControl().
|
|---|
| 2985 | */
|
|---|
| 2986 |
|
|---|
| 2987 | /*!
|
|---|
| 2988 | \fn Phonon::EffectParameter::EffectParameter(int parameterId,
|
|---|
| 2989 | const QString &name, EffectParameter::Hints hints,
|
|---|
| 2990 | const QVariant &defaultValue, const QVariant &min = QVariant(),
|
|---|
| 2991 | const QVariant &max = QVariant(), const QVariantList &values = QVariantList(),
|
|---|
| 2992 | const QString &description = QString())
|
|---|
| 2993 |
|
|---|
| 2994 | Only to be used by backend implementations:
|
|---|
| 2995 |
|
|---|
| 2996 | Creates a new effect parameter.
|
|---|
| 2997 |
|
|---|
| 2998 | \a parameterId This is a number to uniquely identify the
|
|---|
| 2999 | parameter. The id is used for value() and setValue().
|
|---|
| 3000 |
|
|---|
| 3001 | \a name is the name/label for this parameter.
|
|---|
| 3002 |
|
|---|
| 3003 | \a hints sets the hints for the type of parameter.
|
|---|
| 3004 |
|
|---|
| 3005 | \a defaultValue The value that should be used as a default.
|
|---|
| 3006 |
|
|---|
| 3007 | \a min is the minimum value allowed for this parameter. You only
|
|---|
| 3008 | need to set this if the BoundedBelowHint is set.
|
|---|
| 3009 |
|
|---|
| 3010 | \a max is the maximum value allowed for this parameter. You only
|
|---|
| 3011 | need to set this if the BoundedAboveHint is set.
|
|---|
| 3012 |
|
|---|
| 3013 | The \a values parameter is the values that the effect parameter
|
|---|
| 3014 | can take (only applies if non-continuous)
|
|---|
| 3015 |
|
|---|
| 3016 | \a description is a descriptive text for the parameter
|
|---|
| 3017 | (explaining what it controls) to be used as a tooltip or
|
|---|
| 3018 | WhatsThis help.
|
|---|
| 3019 | */
|
|---|
| 3020 |
|
|---|
| 3021 | /*!
|
|---|
| 3022 | \fn int Phonon::EffectParameter::id() const
|
|---|
| 3023 |
|
|---|
| 3024 | \internal
|
|---|
| 3025 |
|
|---|
| 3026 | Returns the parameter's identifier.
|
|---|
| 3027 | */
|
|---|
| 3028 |
|
|---|
| 3029 | /*!
|
|---|
| 3030 | \class Phonon::AudioOutputInterface40
|
|---|
| 3031 | \inmodule Phonon
|
|---|
| 3032 | \since 4.4
|
|---|
| 3033 | \internal
|
|---|
| 3034 | \brief Interface for AudioOutput objects
|
|---|
| 3035 |
|
|---|
| 3036 | */
|
|---|
| 3037 |
|
|---|
| 3038 | /*!
|
|---|
| 3039 | \fn virtual Phonon::AudioOutputInterface40::~AudioOutputInterface40()
|
|---|
| 3040 | \internal
|
|---|
| 3041 | */
|
|---|
| 3042 |
|
|---|
| 3043 | /*!
|
|---|
| 3044 | \fn virtual qreal Phonon::AudioOutputInterface40::volume() const = 0
|
|---|
| 3045 | \internal
|
|---|
| 3046 | */
|
|---|
| 3047 |
|
|---|
| 3048 | /*!
|
|---|
| 3049 | \fn virtual void Phonon::AudioOutputInterface40::setVolume(qreal) = 0
|
|---|
| 3050 | \internal
|
|---|
| 3051 | */
|
|---|
| 3052 |
|
|---|
| 3053 | /*!
|
|---|
| 3054 | \fn virtual int Phonon::AudioOutputInterface40::outputDevice() const = 0
|
|---|
| 3055 | \internal
|
|---|
| 3056 | */
|
|---|
| 3057 |
|
|---|
| 3058 | /*!
|
|---|
| 3059 | \fn virtual bool Phonon::AudioOutputInterface40::setOutputDevice(int) = 0
|
|---|
| 3060 | \internal
|
|---|
| 3061 | */
|
|---|
| 3062 |
|
|---|
| 3063 | /*!
|
|---|
| 3064 | \class Phonon::Path
|
|---|
| 3065 | \inmodule Phonon
|
|---|
| 3066 | \inheaderfile Phonon/Path
|
|---|
| 3067 | \since 4.4
|
|---|
| 3068 | \brief The Path class describes connections between media nodes.
|
|---|
| 3069 |
|
|---|
| 3070 | In a \l{Building Graphs}{media graph}, \l{Phonon::}{MediaNode}s
|
|---|
| 3071 | are connected by Paths. The multimedia travels in streams over
|
|---|
| 3072 | these paths.
|
|---|
| 3073 |
|
|---|
| 3074 | You create a path between two media nodes using the static
|
|---|
| 3075 | Phonon::createPath() function, which takes two nodes as arguments.
|
|---|
| 3076 | The first argument will send the media stream to the second.
|
|---|
| 3077 | Please refer to the class description of the individual media
|
|---|
| 3078 | nodes and the Phonon \l{Phonon Overview}{overview} to see which
|
|---|
| 3079 | nodes can be connected to each other.
|
|---|
| 3080 |
|
|---|
| 3081 | Paths are also used to insert audio \l{Phonon::}{Effect}s between
|
|---|
| 3082 | two media nodes. The effect will then alter the stream on the
|
|---|
| 3083 | path. Notice that \l{Phonon::}{Effect}s also are media nodes, but
|
|---|
| 3084 | that insertEffect() - instead of Phonon::createPath() - is used to
|
|---|
| 3085 | insert them into the media graph.
|
|---|
| 3086 |
|
|---|
| 3087 | The following code example shows how to create a path between two
|
|---|
| 3088 | media nodes and insert an effect on that path.
|
|---|
| 3089 |
|
|---|
| 3090 | \snippet doc/src/snippets/code/doc_src_phonon-api.qdoc 20
|
|---|
| 3091 |
|
|---|
| 3092 | \sa Phonon::MediaNode, Phonon::MediaObject, Phonon::AudioOutput,
|
|---|
| 3093 | Phonon::VideoWidget, {Phonon Module}
|
|---|
| 3094 | */
|
|---|
| 3095 |
|
|---|
| 3096 | /*!
|
|---|
| 3097 | \fn Phonon::Path::~Path();
|
|---|
| 3098 |
|
|---|
| 3099 | Destroys this reference to the Path. If the path was valid the connection is not broken
|
|---|
| 3100 | as both the source and the sink MediaNodes still keep a reference to the Path.
|
|---|
| 3101 |
|
|---|
| 3102 | \sa disconnect()
|
|---|
| 3103 | */
|
|---|
| 3104 |
|
|---|
| 3105 | /*!
|
|---|
| 3106 | \fn Phonon::Path::Path();
|
|---|
| 3107 |
|
|---|
| 3108 | Creates an invalid path.
|
|---|
| 3109 |
|
|---|
| 3110 | You can still make it a valid path by calling reconnect. It is
|
|---|
| 3111 | recommended to use the Phonon::createPath() function to create
|
|---|
| 3112 | paths.
|
|---|
| 3113 |
|
|---|
| 3114 | \sa Phonon::createPath(), isValid()
|
|---|
| 3115 | */
|
|---|
| 3116 |
|
|---|
| 3117 | /*!
|
|---|
| 3118 | \fn Phonon::Path::Path(const Path &path);
|
|---|
| 3119 |
|
|---|
| 3120 | Constructs a copy of the other \a path specified.
|
|---|
| 3121 |
|
|---|
| 3122 | This constructor is fast thanks to explicit sharing.
|
|---|
| 3123 | */
|
|---|
| 3124 |
|
|---|
| 3125 | /*!
|
|---|
| 3126 | \fn bool Phonon::Path::isValid() const;
|
|---|
| 3127 |
|
|---|
| 3128 | A path is considered valid if it is connected to two media nodes,
|
|---|
| 3129 | in which case this function returns true. If it is connected to
|
|---|
| 3130 | one or no media nodes, it is consider invalid, and this function
|
|---|
| 3131 | will then return false.
|
|---|
| 3132 | */
|
|---|
| 3133 |
|
|---|
| 3134 | /*!
|
|---|
| 3135 | \fn Effect *Phonon::Path::insertEffect(const EffectDescription &desc, Effect *insertBefore = 0);
|
|---|
| 3136 |
|
|---|
| 3137 | Creates and inserts an effect into the path.
|
|---|
| 3138 |
|
|---|
| 3139 | You may insert effects of the same class as often as you like,
|
|---|
| 3140 | but if you insert the same object, the call will fail.
|
|---|
| 3141 |
|
|---|
| 3142 | \a desc is the EffectDescription object for the effect to be inserted.
|
|---|
| 3143 |
|
|---|
| 3144 | If you already inserted an effect you can
|
|---|
| 3145 | tell with \a insertBefore in which order the data gets
|
|---|
| 3146 | processed. If this is \c 0 the effect is appended at the end of
|
|---|
| 3147 | the processing list. If the effect has not been inserted before
|
|---|
| 3148 | the method will do nothing and return \c false.
|
|---|
| 3149 |
|
|---|
| 3150 | Returns a pointer to the effect object if it could be inserted
|
|---|
| 3151 | at the specified position. If \c 0 is returned, the effect was not
|
|---|
| 3152 | inserted.
|
|---|
| 3153 |
|
|---|
| 3154 | Below is a code example for inserting an effect into a path:
|
|---|
| 3155 |
|
|---|
| 3156 | \snippet doc/src/snippets/audioeffects.cpp 0
|
|---|
| 3157 |
|
|---|
| 3158 | \sa removeEffect(), effects()
|
|---|
| 3159 | */
|
|---|
| 3160 |
|
|---|
| 3161 | /*!
|
|---|
| 3162 | \fn bool Phonon::Path::insertEffect(Effect *effect, Effect *insertBefore = 0);
|
|---|
| 3163 |
|
|---|
| 3164 | Inserts the given \a effect into the path before the effect specified by \a insertBefore
|
|---|
| 3165 | and returns true if successful; otherwise returns false.
|
|---|
| 3166 |
|
|---|
| 3167 | If \a insertBefore is zero, the effect is appended to the processing list.
|
|---|
| 3168 |
|
|---|
| 3169 | You may insert effects of the same class as often as you like, but if you insert
|
|---|
| 3170 | the same object, the call will fail.
|
|---|
| 3171 |
|
|---|
| 3172 | \a effect will be inserted right before \a insertBefore. If
|
|---|
| 3173 | \a insertBefore is \c 0, the effect is appended at the end of the
|
|---|
| 3174 | processing list. If the effect has not been inserted before the
|
|---|
| 3175 | method will do nothing and return \c false.
|
|---|
| 3176 |
|
|---|
| 3177 | Returns whether the effect could be inserted at the specified
|
|---|
| 3178 | position. If \c false is returned the effect was not inserted.
|
|---|
| 3179 |
|
|---|
| 3180 | \sa removeEffect(), effects()
|
|---|
| 3181 | */
|
|---|
| 3182 |
|
|---|
| 3183 | /*!
|
|---|
| 3184 | \fn bool Phonon::Path::removeEffect(Effect *effect);
|
|---|
| 3185 |
|
|---|
| 3186 | Removes the given \a effect from the path and returns true; otherwise returns false.
|
|---|
| 3187 |
|
|---|
| 3188 | Removes an \a effect from the path.
|
|---|
| 3189 |
|
|---|
| 3190 | If the effect is deleted while it is still connected, the effect will be removed
|
|---|
| 3191 | automatically.
|
|---|
| 3192 |
|
|---|
| 3193 | \omit
|
|---|
| 3194 | \param effect The effect to be removed.
|
|---|
| 3195 |
|
|---|
| 3196 | \return Returns whether the call was successful. If it returns
|
|---|
| 3197 | \c false the effect could not be found in the path, meaning it
|
|---|
| 3198 | has not been inserted before.
|
|---|
| 3199 | \endomit
|
|---|
| 3200 |
|
|---|
| 3201 | \sa insertEffect(), effects()
|
|---|
| 3202 | */
|
|---|
| 3203 |
|
|---|
| 3204 | /*!
|
|---|
| 3205 | \fn QList<Effect *> Phonon::Path::effects() const;
|
|---|
| 3206 |
|
|---|
| 3207 | Returns a list of Effect objects that are currently
|
|---|
| 3208 | used as effects. The order in the list determines the order the
|
|---|
| 3209 | signal is sent through the effects.
|
|---|
| 3210 |
|
|---|
| 3211 | \return A list with all current effects.
|
|---|
| 3212 |
|
|---|
| 3213 | \sa insertEffect(), removeEffect()
|
|---|
| 3214 | */
|
|---|
| 3215 |
|
|---|
| 3216 | /*!
|
|---|
| 3217 | \fn bool Phonon::Path::reconnect(MediaNode *source, MediaNode *sink);
|
|---|
| 3218 |
|
|---|
| 3219 | Changes the media nodes the path is connected to by connecting the path
|
|---|
| 3220 | to the \a source and \a sink nodes specified. Returns true if successful;
|
|---|
| 3221 | otherwise returns false.
|
|---|
| 3222 |
|
|---|
| 3223 | If unsuccessful, the path remains connected to the same nodes as before.
|
|---|
| 3224 |
|
|---|
| 3225 | \sa Phonon::createPath(), {Phonon Overview}
|
|---|
| 3226 | */
|
|---|
| 3227 |
|
|---|
| 3228 | /*!
|
|---|
| 3229 | \fn bool Phonon::Path::disconnect();
|
|---|
| 3230 |
|
|---|
| 3231 | Tries to disconnect the path from the MediaNodes it is connected to, returning
|
|---|
| 3232 | true if successful or false if unsuccessful.
|
|---|
| 3233 |
|
|---|
| 3234 | If successful, the path is invalidated: isValid() will returns false.
|
|---|
| 3235 | */
|
|---|
| 3236 |
|
|---|
| 3237 | /*!
|
|---|
| 3238 | \fn Path &Phonon::Path::operator=(const Path &p);
|
|---|
| 3239 |
|
|---|
| 3240 | Assigns \a p to this Path and returns a reference to this Path.
|
|---|
| 3241 |
|
|---|
| 3242 | This operation is fast thanks to explicit sharing.
|
|---|
| 3243 | */
|
|---|
| 3244 |
|
|---|
| 3245 | /*!
|
|---|
| 3246 | \fn bool Phonon::Path::operator==(const Path &p) const;
|
|---|
| 3247 |
|
|---|
| 3248 | Returns true if this Path is equal to \a p; otherwise returns false;
|
|---|
| 3249 | */
|
|---|
| 3250 |
|
|---|
| 3251 | /*!
|
|---|
| 3252 | \fn bool Phonon::Path::operator!=(const Path &p) const;
|
|---|
| 3253 |
|
|---|
| 3254 | Returns true if this Path is not equal to \a p; otherwise returns false;
|
|---|
| 3255 | */
|
|---|
| 3256 |
|
|---|
| 3257 | /*!
|
|---|
| 3258 | \fn Path Phonon::createPath(MediaNode *source, MediaNode *sink);
|
|---|
| 3259 |
|
|---|
| 3260 | \relates Phonon::Path
|
|---|
| 3261 | Creates a new Path connecting the two MediaNodes \a source and \a sink.
|
|---|
| 3262 |
|
|---|
| 3263 | The implementation will automatically select the right format and media type. E.g. connecting a
|
|---|
| 3264 | MediaObject and AudioOutput will create a Path object connecting the audio. This might be
|
|---|
| 3265 | represented as PCM or perhaps even AC3 depending on the AudioOutput object.
|
|---|
| 3266 |
|
|---|
| 3267 | \param source The MediaNode to connect an output from
|
|---|
| 3268 | \param sink The MediaNode to connect to.
|
|---|
| 3269 | */
|
|---|
| 3270 |
|
|---|
| 3271 | /*!
|
|---|
| 3272 | \class Phonon::PathPrivate
|
|---|
| 3273 | \inmodule Phonon
|
|---|
| 3274 | \since 4.4
|
|---|
| 3275 | \internal
|
|---|
| 3276 | */
|
|---|
| 3277 |
|
|---|
| 3278 | /*!
|
|---|
| 3279 | \class Phonon::MediaObjectInterface
|
|---|
| 3280 | \inmodule Phonon
|
|---|
| 3281 | \since 4.4
|
|---|
| 3282 | \internal
|
|---|
| 3283 | \brief Backend interface for media sources.
|
|---|
| 3284 |
|
|---|
| 3285 | The backend implementation has to provide two signals, that are not defined
|
|---|
| 3286 | in this interface:
|
|---|
| 3287 | \list
|
|---|
| 3288 | \o \target phonon_MediaObjectInterface_stateChanged
|
|---|
| 3289 | void stateChanged(Phonon::State newstate, Phonon::State oldstate)
|
|---|
| 3290 |
|
|---|
| 3291 | Emitted when the state of the MediaObject has changed.
|
|---|
| 3292 | In case you're not interested in the old state you can also
|
|---|
| 3293 | connect to a slot that only has one State argument.
|
|---|
| 3294 |
|
|---|
| 3295 | \param newstate The state the Player is in now.
|
|---|
| 3296 | \param oldstate The state the Player was in before.
|
|---|
| 3297 |
|
|---|
| 3298 | \o \target phonon_MediaObjectInterface_tick
|
|---|
| 3299 | void tick(qint64 time)
|
|---|
| 3300 |
|
|---|
| 3301 | This signal gets emitted every tickInterval milliseconds.
|
|---|
| 3302 |
|
|---|
| 3303 | \param time The position of the media file in milliseconds.
|
|---|
| 3304 |
|
|---|
| 3305 | \sa setTickInterval()
|
|---|
| 3306 | \sa tickInterval()
|
|---|
| 3307 | \endlist
|
|---|
| 3308 |
|
|---|
| 3309 | \sa MediaObject
|
|---|
| 3310 | */
|
|---|
| 3311 |
|
|---|
| 3312 | /*!
|
|---|
| 3313 | \fn virtual Phonon::MediaObjectInterface::~MediaObjectInterface()
|
|---|
| 3314 | \internal
|
|---|
| 3315 | */
|
|---|
| 3316 |
|
|---|
| 3317 | /*!
|
|---|
| 3318 | \fn virtual qint64 Phonon::MediaObjectInterface::remainingTime() const
|
|---|
| 3319 | \internal
|
|---|
| 3320 | */
|
|---|
| 3321 |
|
|---|
| 3322 | /*!
|
|---|
| 3323 | \fn virtual qint32 Phonon::MediaObjectInterface::prefinishMark() const = 0
|
|---|
| 3324 | \internal
|
|---|
| 3325 | */
|
|---|
| 3326 |
|
|---|
| 3327 | /*!
|
|---|
| 3328 | \fn virtual void Phonon::MediaObjectInterface::setPrefinishMark(qint32) = 0
|
|---|
| 3329 | \internal
|
|---|
| 3330 | */
|
|---|
| 3331 |
|
|---|
| 3332 | /*!
|
|---|
| 3333 | \fn virtual qint32 Phonon::MediaObjectInterface::transitionTime() const = 0
|
|---|
| 3334 | \internal
|
|---|
| 3335 | */
|
|---|
| 3336 |
|
|---|
| 3337 | /*!
|
|---|
| 3338 | \fn virtual void Phonon::MediaObjectInterface::setTransitionTime(qint32) = 0
|
|---|
| 3339 | \internal
|
|---|
| 3340 | */
|
|---|
| 3341 |
|
|---|
| 3342 | /*!
|
|---|
| 3343 | \fn virtual void Phonon::MediaObjectInterface::play() = 0
|
|---|
| 3344 | \internal
|
|---|
| 3345 |
|
|---|
| 3346 | Requests the playback to start.
|
|---|
| 3347 |
|
|---|
| 3348 | This method is only called if the state transition to PlayingState is possible.
|
|---|
| 3349 |
|
|---|
| 3350 | The backend should react immediately
|
|---|
| 3351 | by either going into PlayingState or BufferingState if the
|
|---|
| 3352 | former is not possible.
|
|---|
| 3353 | */
|
|---|
| 3354 |
|
|---|
| 3355 | /*!
|
|---|
| 3356 | \fn virtual void Phonon::MediaObjectInterface::pause() = 0
|
|---|
| 3357 | \internal
|
|---|
| 3358 |
|
|---|
| 3359 | Requests the playback to pause.
|
|---|
| 3360 |
|
|---|
| 3361 | This method is only called if the state transition to PausedState is possible.
|
|---|
| 3362 |
|
|---|
| 3363 | The backend should react as fast as possible. Go to PausedState
|
|---|
| 3364 | as soon as playback is paused.
|
|---|
| 3365 | */
|
|---|
| 3366 |
|
|---|
| 3367 | /*!
|
|---|
| 3368 | \fn virtual void Phonon::MediaObjectInterface::stop() = 0
|
|---|
| 3369 | \internal
|
|---|
| 3370 |
|
|---|
| 3371 | Requests the playback to be stopped.
|
|---|
| 3372 |
|
|---|
| 3373 | This method is only called if the state transition to StoppedState is possible.
|
|---|
| 3374 |
|
|---|
| 3375 | The backend should react as fast as possible. Go to StoppedState
|
|---|
| 3376 | as soon as playback is stopped.
|
|---|
| 3377 |
|
|---|
| 3378 | A subsequent call to play() will start playback at the beginning of
|
|---|
| 3379 | the media.
|
|---|
| 3380 | */
|
|---|
| 3381 |
|
|---|
| 3382 | /*!
|
|---|
| 3383 | \fn virtual void Phonon::MediaObjectInterface::seek(qint64 milliseconds) = 0
|
|---|
| 3384 | \internal
|
|---|
| 3385 |
|
|---|
| 3386 | Requests the playback to be seeked to the given time.
|
|---|
| 3387 |
|
|---|
| 3388 | The backend does not have to finish seeking while in this function
|
|---|
| 3389 | (i.e. the backend does not need to block the thread until the seek is
|
|---|
| 3390 | finished; even worse it might lead to deadlocks when using a
|
|---|
| 3391 | ByteStream which gets its data from the thread this function would
|
|---|
| 3392 | block).
|
|---|
| 3393 |
|
|---|
| 3394 | As soon as the seek is done the currentTime() function and
|
|---|
| 3395 | the tick() signal will report it.
|
|---|
| 3396 |
|
|---|
| 3397 | \param milliseconds The time where playback should seek to in
|
|---|
| 3398 | milliseconds.
|
|---|
| 3399 | */
|
|---|
| 3400 |
|
|---|
| 3401 | /*!
|
|---|
| 3402 | \fn virtual qint32 Phonon::MediaObjectInterface::tickInterval() const = 0
|
|---|
| 3403 | \internal
|
|---|
| 3404 |
|
|---|
| 3405 | Return the time interval in milliseconds between two ticks.
|
|---|
| 3406 |
|
|---|
| 3407 | Returns the tick interval that it was set to (might not
|
|---|
| 3408 | be the same as you asked for).
|
|---|
| 3409 | */
|
|---|
| 3410 |
|
|---|
| 3411 | /*!
|
|---|
| 3412 | \fn virtual void Phonon::MediaObjectInterface::setTickInterval(qint32 interval) = 0
|
|---|
| 3413 | \internal
|
|---|
| 3414 |
|
|---|
| 3415 | Change the interval the tick signal is emitted. Set \a interval to 0 to
|
|---|
| 3416 | disable the signal.
|
|---|
| 3417 |
|
|---|
| 3418 | \a interval tick interval in milliseconds
|
|---|
| 3419 |
|
|---|
| 3420 | Returns the tick interval that it was set to (might not be the same as you
|
|---|
| 3421 | asked for).
|
|---|
| 3422 |
|
|---|
| 3423 | */
|
|---|
| 3424 |
|
|---|
| 3425 | /*!
|
|---|
| 3426 | \fn virtual bool Phonon::MediaObjectInterface::hasVideo() const = 0
|
|---|
| 3427 | \internal
|
|---|
| 3428 |
|
|---|
| 3429 | Check whether the media data includes a video stream.
|
|---|
| 3430 |
|
|---|
| 3431 | Returns true if the media contains video data.
|
|---|
| 3432 | */
|
|---|
| 3433 |
|
|---|
| 3434 | /*!
|
|---|
| 3435 | \fn virtual bool Phonon::MediaObjectInterface::isSeekable() const = 0
|
|---|
| 3436 | \internal
|
|---|
| 3437 |
|
|---|
| 3438 | If the current media may be seeked this function returns true;
|
|---|
| 3439 | otherwise, false.
|
|---|
| 3440 |
|
|---|
| 3441 | Returns whether the current media may be seeked.
|
|---|
| 3442 | */
|
|---|
| 3443 |
|
|---|
| 3444 | /*!
|
|---|
| 3445 | \fn virtual qint64 Phonon::MediaObjectInterface::currentTime() const = 0
|
|---|
| 3446 | \internal
|
|---|
| 3447 |
|
|---|
| 3448 | Get the current time (in milliseconds) of the file currently being played.
|
|---|
| 3449 | */
|
|---|
| 3450 |
|
|---|
| 3451 | /*!
|
|---|
| 3452 | \fn virtual Phonon::State Phonon::MediaObjectInterface::state() const = 0
|
|---|
| 3453 | \internal
|
|---|
| 3454 |
|
|---|
| 3455 | Get the current state.
|
|---|
| 3456 | */
|
|---|
| 3457 |
|
|---|
| 3458 | /*!
|
|---|
| 3459 | \fn virtual QString Phonon::MediaObjectInterface::errorString() const = 0
|
|---|
| 3460 | \internal
|
|---|
| 3461 |
|
|---|
| 3462 | A translated string describing the error.
|
|---|
| 3463 | */
|
|---|
| 3464 |
|
|---|
| 3465 | /*!
|
|---|
| 3466 | \fn virtual Phonon::ErrorType Phonon::MediaObjectInterface::errorType() const = 0
|
|---|
| 3467 | \internal
|
|---|
| 3468 |
|
|---|
| 3469 | Tells your program what to do about the error.
|
|---|
| 3470 |
|
|---|
| 3471 | \sa Phonon::ErrorType
|
|---|
| 3472 | */
|
|---|
| 3473 |
|
|---|
| 3474 | /*!
|
|---|
| 3475 | \fn virtual qint64 Phonon::MediaObjectInterface::totalTime() const = 0
|
|---|
| 3476 | \internal
|
|---|
| 3477 |
|
|---|
| 3478 | Returns the total time of the media in milliseconds.
|
|---|
| 3479 |
|
|---|
| 3480 | If the total time is not know return -1. Do not block until it is
|
|---|
| 3481 | known, instead emit the totalTimeChanged signal as soon as the total
|
|---|
| 3482 | time is known or changes.
|
|---|
| 3483 | */
|
|---|
| 3484 |
|
|---|
| 3485 | /*!
|
|---|
| 3486 | \fn virtual MediaSource Phonon::MediaObjectInterface::source() const = 0
|
|---|
| 3487 | \internal
|
|---|
| 3488 |
|
|---|
| 3489 | Returns the current source.
|
|---|
| 3490 | */
|
|---|
| 3491 |
|
|---|
| 3492 | /*!
|
|---|
| 3493 | \fn virtual void Phonon::MediaObjectInterface::setSource(const MediaSource &) = 0
|
|---|
| 3494 | \internal
|
|---|
| 3495 |
|
|---|
| 3496 | Sets the current source. When this function is called the MediaObject is
|
|---|
| 3497 | expected to stop all current activity and start loading the new
|
|---|
| 3498 | source (i.e. go into LoadingState).
|
|---|
| 3499 |
|
|---|
| 3500 | It is expected that the
|
|---|
| 3501 | backend now starts preloading the media data, filling the audio
|
|---|
| 3502 | and video buffers and making all media meta data available. It
|
|---|
| 3503 | will also trigger the totalTimeChanged signal.
|
|---|
| 3504 |
|
|---|
| 3505 | If the backend does not know how to handle the source it needs to
|
|---|
| 3506 | change state to Phonon::ErrorState. Don't bother about handling KIO
|
|---|
| 3507 | URLs. It is enough to handle AbstractMediaStream sources correctly.
|
|---|
| 3508 |
|
|---|
| 3509 | \warning Keep the MediaSource object around as long as the backend
|
|---|
| 3510 | uses the AbstractMediaStream returned by the MediaSource. In case
|
|---|
| 3511 | that no other reference to the MediaSource exists and it is set to
|
|---|
| 3512 | MediaSource::autoDelete, the AbstractMediaStream is deleted when the
|
|---|
| 3513 | last MediaSource ref is deleted.
|
|---|
| 3514 | */
|
|---|
| 3515 |
|
|---|
| 3516 | /*!
|
|---|
| 3517 | \fn virtual void Phonon::MediaObjectInterface::setNextSource(const MediaSource &source) = 0
|
|---|
| 3518 | \internal
|
|---|
| 3519 |
|
|---|
| 3520 | Sets the next source to be used for transitions. When a next source
|
|---|
| 3521 | is set playback should continue with the new source. In that case
|
|---|
| 3522 | finished and prefinishMarkReached are not emitted.
|
|---|
| 3523 |
|
|---|
| 3524 | \param source The source to transition to (crossfade/gapless/gap). If
|
|---|
| 3525 | \a source is an invalid MediaSource object then the queue is empty
|
|---|
| 3526 | and the playback should stop normally.
|
|---|
| 3527 |
|
|---|
| 3528 | \warning Keep the MediaSource object around as long as the backend
|
|---|
| 3529 | uses the AbstractMediaStream returned by the MediaSource. In case
|
|---|
| 3530 | that no other reference to the MediaSource exists and it is set to
|
|---|
| 3531 | MediaSource::autoDelete, the AbstractMediaStream is deleted when the
|
|---|
| 3532 | last MediaSource ref is deleted.
|
|---|
| 3533 | */
|
|---|
| 3534 |
|
|---|
| 3535 | /*!
|
|---|
| 3536 | \class Phonon::EffectWidget effectwidget.h Phonon/EffectWidget
|
|---|
| 3537 | \inmodule Phonon
|
|---|
| 3538 | \inheaderfile Phonon/EffectWidget
|
|---|
| 3539 | \since 4.4
|
|---|
| 3540 | \brief The EffectWidget class provides a widget to control the parameters of an Effect.
|
|---|
| 3541 |
|
|---|
| 3542 | The EffectWidget class provides a widget, with which an effects
|
|---|
| 3543 | parameters can be controlled. The widget does not have an API,
|
|---|
| 3544 | and is constructed with the \l{Phonon::}{Effect}, of which
|
|---|
| 3545 | parameters should be controlled.
|
|---|
| 3546 |
|
|---|
| 3547 | \snippet doc/src/snippets/audioeffects.cpp 1
|
|---|
| 3548 |
|
|---|
| 3549 | The following image shows an example of an effect widget.
|
|---|
| 3550 |
|
|---|
| 3551 | \image effectwidget.png
|
|---|
| 3552 |
|
|---|
| 3553 | Note that some audio effects do not have parameters, and the
|
|---|
| 3554 | widget will then not \l{QWidget::}{show()} at all.
|
|---|
| 3555 |
|
|---|
| 3556 | \sa Effect, BackendCapabilities, EffectDescription, {Phonon Module}
|
|---|
| 3557 | */
|
|---|
| 3558 |
|
|---|
| 3559 | /*!
|
|---|
| 3560 | \class Phonon::AbstractAudioOutput
|
|---|
| 3561 | \inmodule Phonon
|
|---|
| 3562 | \internal
|
|---|
| 3563 | \brief Provides a common base class for all audio outputs.
|
|---|
| 3564 |
|
|---|
| 3565 | \sa AudioOutput
|
|---|
| 3566 | */
|
|---|
| 3567 |
|
|---|
| 3568 | /*!
|
|---|
| 3569 | \fn Phonon::AbstractAudioOutput::~AbstractAudioOutput()
|
|---|
| 3570 | \internal
|
|---|
| 3571 | */
|
|---|
| 3572 |
|
|---|
| 3573 | /*!
|
|---|
| 3574 | \class Phonon::AbstractAudioOutputPrivate
|
|---|
| 3575 | \inmodule Phonon
|
|---|
| 3576 | \since 4.4
|
|---|
| 3577 | \internal
|
|---|
| 3578 | */
|
|---|
| 3579 |
|
|---|
| 3580 | /*!
|
|---|
| 3581 | \class AudioOutputAdaptor
|
|---|
| 3582 | \inmodule Phonon
|
|---|
| 3583 | \brief Provides an adaptor class for interface org.kde.Phonon.AudioOutput
|
|---|
| 3584 | \internal
|
|---|
| 3585 | */
|
|---|
| 3586 |
|
|---|
| 3587 | /*!
|
|---|
| 3588 | \class Phonon::VolumeSlider
|
|---|
| 3589 | \inmodule Phonon
|
|---|
| 3590 | \inheaderfile Phonon/VolumeSlider
|
|---|
| 3591 | \since 4.4
|
|---|
| 3592 | \brief The VolumeSlider widget provides a slider that is used to control the volume of an audio output device.
|
|---|
| 3593 |
|
|---|
| 3594 | The slider also displays an icon indicating if the volume of the
|
|---|
| 3595 | \l{Phonon::}{AudioOutput} it is connected to is muted. The icon
|
|---|
| 3596 | can be removed with setMuteVisible().
|
|---|
| 3597 |
|
|---|
| 3598 | It is possible to set the \l{maximumVolume}{maximum} value of the
|
|---|
| 3599 | slider. By default, the minimum and maximum values of the slider
|
|---|
| 3600 | are 0.0 (no sound) to 1.0 (the maximum volume the audio output can
|
|---|
| 3601 | produce).
|
|---|
| 3602 |
|
|---|
| 3603 | Here follows a code example:
|
|---|
| 3604 |
|
|---|
| 3605 | \snippet doc/src/snippets/volumeslider.cpp 0
|
|---|
| 3606 |
|
|---|
| 3607 | \omit mention how to change the style of the slider. \endomit
|
|---|
| 3608 |
|
|---|
| 3609 | \sa {Phonon Module}
|
|---|
| 3610 | */
|
|---|
| 3611 |
|
|---|
| 3612 | /*!
|
|---|
| 3613 | \property Phonon::VolumeSlider::maximumVolume
|
|---|
| 3614 |
|
|---|
| 3615 | This property holds the maximum volume that can be set with this slider.
|
|---|
| 3616 |
|
|---|
| 3617 | By default the maximum value is 1.0 (100%).
|
|---|
| 3618 | */
|
|---|
| 3619 |
|
|---|
| 3620 | /*!
|
|---|
| 3621 | \property Phonon::VolumeSlider::orientation
|
|---|
| 3622 | This property holds the orientation of the slider.
|
|---|
| 3623 |
|
|---|
| 3624 | The orientation must be Qt::Vertical (the default) or Qt::Horizontal.
|
|---|
| 3625 | */
|
|---|
| 3626 |
|
|---|
| 3627 | /*!
|
|---|
| 3628 | \property Phonon::VolumeSlider::tracking
|
|---|
| 3629 | This property holds whether slider tracking is enabled.
|
|---|
| 3630 |
|
|---|
| 3631 | If tracking is enabled (the default), the volume changes
|
|---|
| 3632 | while the slider is being dragged. If tracking is
|
|---|
| 3633 | disabled, the volume changes only when the user
|
|---|
| 3634 | releases the slider.
|
|---|
| 3635 | */
|
|---|
| 3636 |
|
|---|
| 3637 | /*!
|
|---|
| 3638 | \property Phonon::VolumeSlider::pageStep
|
|---|
| 3639 | This property holds the page step.
|
|---|
| 3640 |
|
|---|
| 3641 | The larger of two natural steps that a slider provides and
|
|---|
| 3642 | typically corresponds to the user pressing PageUp or PageDown.
|
|---|
| 3643 |
|
|---|
| 3644 | Defaults to 5 (5% of the voltage).
|
|---|
| 3645 | */
|
|---|
| 3646 |
|
|---|
| 3647 | /*!
|
|---|
| 3648 | \property Phonon::VolumeSlider::singleStep
|
|---|
| 3649 | This property holds the single step.
|
|---|
| 3650 |
|
|---|
| 3651 | The smaller of two natural steps that a slider provides and
|
|---|
| 3652 | typically corresponds to the user pressing an arrow key.
|
|---|
| 3653 |
|
|---|
| 3654 | Defaults to 1 (1% of the voltage).
|
|---|
| 3655 | */
|
|---|
| 3656 |
|
|---|
| 3657 | /*!
|
|---|
| 3658 | \property Phonon::VolumeSlider::muteVisible
|
|---|
| 3659 | This property holds whether the mute button/icon next to the slider is visible.
|
|---|
| 3660 |
|
|---|
| 3661 | By default the mute button/icon is visible.
|
|---|
| 3662 | */
|
|---|
| 3663 |
|
|---|
| 3664 | /*!
|
|---|
| 3665 | \property Phonon::VolumeSlider::iconSize
|
|---|
| 3666 | \brief the icon size used for the mute button/icon.
|
|---|
| 3667 |
|
|---|
| 3668 | The default size is defined by the GUI style.
|
|---|
| 3669 | */
|
|---|
| 3670 |
|
|---|
| 3671 | /*!
|
|---|
| 3672 | \fn explicit Phonon::VolumeSlider::VolumeSlider(QWidget *parent = 0)
|
|---|
| 3673 | Constructs a new volume slider with the given \a parent.
|
|---|
| 3674 | */
|
|---|
| 3675 |
|
|---|
| 3676 | /*!
|
|---|
| 3677 | \fn explicit Phonon::VolumeSlider::VolumeSlider(AudioOutput *output, QWidget *parent = 0)
|
|---|
| 3678 | Constructs a new volume slider with the given \a output object and \a parent.
|
|---|
| 3679 | */
|
|---|
| 3680 |
|
|---|
| 3681 | /*!
|
|---|
| 3682 | \fn Phonon::VolumeSlider::~VolumeSlider()
|
|---|
| 3683 | */
|
|---|
| 3684 |
|
|---|
| 3685 | /*!
|
|---|
| 3686 | \fn AudioOutput *Phonon::VolumeSlider::audioOutput() const
|
|---|
| 3687 | */
|
|---|
| 3688 |
|
|---|
| 3689 | /*!
|
|---|
| 3690 | \fn void Phonon::VolumeSlider::setAudioOutput(Phonon::AudioOutput *output)
|
|---|
| 3691 |
|
|---|
| 3692 | Sets the audio output object to be controlled by this slider to the specified
|
|---|
| 3693 | \a output object.
|
|---|
| 3694 | */
|
|---|
| 3695 |
|
|---|
| 3696 | /*!
|
|---|
| 3697 | \class Phonon::VolumeSliderPrivate
|
|---|
| 3698 | \inmodule Phonon
|
|---|
| 3699 | \since 4.4
|
|---|
| 3700 | \internal
|
|---|
| 3701 | */
|
|---|
| 3702 |
|
|---|
| 3703 | /*!
|
|---|
| 3704 | \class Phonon::MediaController
|
|---|
| 3705 | \inmodule Phonon
|
|---|
| 3706 | \inheaderfile Phonon/MediaController
|
|---|
| 3707 | \since 4.4
|
|---|
| 3708 | \brief The MediaController class controls optional features of a media file/device.
|
|---|
| 3709 |
|
|---|
| 3710 | Some media sources have content that the \l{Phonon::}{MediaObject}
|
|---|
| 3711 | does not provide control over, for instance, chapters in a DVD
|
|---|
| 3712 | file. The functionality the media controller offers is
|
|---|
| 3713 | dependent on the type of media source that is played back.
|
|---|
| 3714 | Commonly, the media controller allows you to:
|
|---|
| 3715 |
|
|---|
| 3716 | \list
|
|---|
| 3717 | \o Navigate between \bold chapters.
|
|---|
| 3718 | \o Navigate between \bold titles.
|
|---|
| 3719 | \o Select between \bold angles.
|
|---|
| 3720 | \endlist
|
|---|
| 3721 |
|
|---|
| 3722 | The \l{Phonon::MediaController::}{Feature} enum explains these
|
|---|
| 3723 | terms in more detail, and their context in playback of CD and DVD.
|
|---|
| 3724 |
|
|---|
| 3725 | The media controller keeps a \l{Phonon::}{MediaObject}, of which
|
|---|
| 3726 | \l{Phonon::MediaObject::currentSource()}{media source} is played
|
|---|
| 3727 | back. You can still call the media object's functions, e.g.,
|
|---|
| 3728 | \l{Phonon::MediaObject::}{stop()}; this is all handled correctly
|
|---|
| 3729 | by the media controller. You have the option of letting the media
|
|---|
| 3730 | controller play all titles of a source in sequence by setting the
|
|---|
| 3731 | \l{autoplayTitles()}{autoplay titles} option.
|
|---|
| 3732 |
|
|---|
| 3733 | To start a playback using a media object, you call
|
|---|
| 3734 | \l{Phonon::MediaObject::}{play()} on the media object. To play a
|
|---|
| 3735 | specific title, use setCurrentTitle() and then call
|
|---|
| 3736 | \l{Phonon::MediaObject::}{play()}.
|
|---|
| 3737 |
|
|---|
| 3738 | \warning The Phonon::MediaController class is not yet supported by
|
|---|
| 3739 | Qt backends.
|
|---|
| 3740 |
|
|---|
| 3741 | \sa {Phonon Module}
|
|---|
| 3742 | */
|
|---|
| 3743 |
|
|---|
| 3744 | /*!
|
|---|
| 3745 | \fn int Phonon::MediaController::availableAudioChannels() const
|
|---|
| 3746 | \internal
|
|---|
| 3747 | */
|
|---|
| 3748 |
|
|---|
| 3749 | /*!
|
|---|
| 3750 | \fn void Phonon::MediaController::availableAudioChannelsChanged()
|
|---|
| 3751 | \internal
|
|---|
| 3752 | */
|
|---|
| 3753 |
|
|---|
| 3754 | /*!
|
|---|
| 3755 | \fn QList<SubtitleDescription> Phonon::MediaController::availableSubtitles() const
|
|---|
| 3756 | \internal
|
|---|
| 3757 | */
|
|---|
| 3758 |
|
|---|
| 3759 | /*!
|
|---|
| 3760 | \fn void Phonon::MediaController::availableSubtitlesChanged()
|
|---|
| 3761 | \internal
|
|---|
| 3762 | */
|
|---|
| 3763 |
|
|---|
| 3764 | /*!
|
|---|
| 3765 | \fn AudioChannelDescription Phonon::MediaController::currentAudioChannel() const
|
|---|
| 3766 | \internal
|
|---|
| 3767 | */
|
|---|
| 3768 |
|
|---|
| 3769 | /*!
|
|---|
| 3770 | \fn SubtitleDescription Phonon::MediaController::currentSubtitle() const
|
|---|
| 3771 | \internal
|
|---|
| 3772 | */
|
|---|
| 3773 |
|
|---|
| 3774 | /*!
|
|---|
| 3775 | \fn void Phonon::MediaController::setCurrentAudioChannel(const Phonon::AudioChannelDescription &stream)
|
|---|
| 3776 | \internal
|
|---|
| 3777 | */
|
|---|
| 3778 |
|
|---|
| 3779 | /*!
|
|---|
| 3780 | \fn void Phonon::MediaController::setCurrentSubtitle(const Phonon::SubtitleDescription &stream)
|
|---|
| 3781 | \internal
|
|---|
| 3782 | */
|
|---|
| 3783 |
|
|---|
| 3784 | /*!
|
|---|
| 3785 | \fn Phonon::BackendCapabilities::availableAudioCaptureDevices()
|
|---|
| 3786 | \internal
|
|---|
| 3787 | */
|
|---|
| 3788 |
|
|---|
| 3789 | /*!
|
|---|
| 3790 | \fn Phonon::BackendCapabilities::Notifier::availableAudioCaptureDevicesChanged()
|
|---|
| 3791 | \internal
|
|---|
| 3792 | */
|
|---|
| 3793 |
|
|---|
| 3794 | /*!
|
|---|
| 3795 | \enum Phonon::MediaController::Feature
|
|---|
| 3796 |
|
|---|
| 3797 | The values of this enum are interpreted differently depending on
|
|---|
| 3798 | the type of media source, e.g., DVD or CD. We give examples for
|
|---|
| 3799 | these sources.
|
|---|
| 3800 |
|
|---|
| 3801 | \value Angles In the VOB (DVD) format, it is possible to to give
|
|---|
| 3802 | several video streams of the same scene, each of which displays
|
|---|
| 3803 | the scene from a different angle. The DVD viewer can then change
|
|---|
| 3804 | between these angles.
|
|---|
| 3805 |
|
|---|
| 3806 | \value Chapters In the VOB format, chapters are points in a
|
|---|
| 3807 | single video stream that can be played and seeked to
|
|---|
| 3808 | separately.
|
|---|
| 3809 |
|
|---|
| 3810 | \value Titles On a CD, a title is a separate sound track. On DVD,
|
|---|
| 3811 | a title is a separate VOB file.
|
|---|
| 3812 |
|
|---|
| 3813 | */
|
|---|
| 3814 |
|
|---|
| 3815 | /*!
|
|---|
| 3816 | \fn Phonon::MediaController::MediaController(MediaObject *parent)
|
|---|
| 3817 |
|
|---|
| 3818 | Constructs a new MediaController with the media object (\a parent)
|
|---|
| 3819 | to be used by the media controller.
|
|---|
| 3820 |
|
|---|
| 3821 | \sa MediaObject, Feature
|
|---|
| 3822 | */
|
|---|
| 3823 |
|
|---|
| 3824 | /*!
|
|---|
| 3825 | \fn Phonon::MediaController::~MediaController()
|
|---|
| 3826 | */
|
|---|
| 3827 |
|
|---|
| 3828 | /*!
|
|---|
| 3829 | \fn Features Phonon::MediaController::supportedFeatures() const
|
|---|
| 3830 | */
|
|---|
| 3831 |
|
|---|
| 3832 | /*!
|
|---|
| 3833 | \fn int Phonon::MediaController::availableAngles() const
|
|---|
| 3834 |
|
|---|
| 3835 | Returns the available angles that is available for the current
|
|---|
| 3836 | media source.
|
|---|
| 3837 |
|
|---|
| 3838 | \sa Feature
|
|---|
| 3839 | */
|
|---|
| 3840 |
|
|---|
| 3841 | /*!
|
|---|
| 3842 | \fn int Phonon::MediaController::currentAngle() const
|
|---|
| 3843 |
|
|---|
| 3844 | Returns the angle that is currently used.
|
|---|
| 3845 |
|
|---|
| 3846 | \sa Feature
|
|---|
| 3847 | */
|
|---|
| 3848 |
|
|---|
| 3849 | /*!
|
|---|
| 3850 | \fn int Phonon::MediaController::availableChapters() const
|
|---|
| 3851 |
|
|---|
| 3852 | Returns the number of chapters the current media source
|
|---|
| 3853 | contains.
|
|---|
| 3854 |
|
|---|
| 3855 | \sa Feature
|
|---|
| 3856 | */
|
|---|
| 3857 |
|
|---|
| 3858 | /*!
|
|---|
| 3859 | \fn int Phonon::MediaController::currentChapter() const
|
|---|
| 3860 |
|
|---|
| 3861 | Returns the chapter that is currently being played back.
|
|---|
| 3862 |
|
|---|
| 3863 | \sa Feature
|
|---|
| 3864 | */
|
|---|
| 3865 |
|
|---|
| 3866 | /*!
|
|---|
| 3867 | \fn int Phonon::MediaController::availableTitles() const
|
|---|
| 3868 |
|
|---|
| 3869 | Returns the number of titles that the current media source
|
|---|
| 3870 | contains.
|
|---|
| 3871 |
|
|---|
| 3872 | \sa Feature
|
|---|
| 3873 | */
|
|---|
| 3874 |
|
|---|
| 3875 | /*!
|
|---|
| 3876 | \fn int Phonon::MediaController::currentTitle() const
|
|---|
| 3877 |
|
|---|
| 3878 | Returns the title that is currently played back.
|
|---|
| 3879 |
|
|---|
| 3880 | The current title is 0 (the first) by default.
|
|---|
| 3881 |
|
|---|
| 3882 | \sa Feature
|
|---|
| 3883 | */
|
|---|
| 3884 |
|
|---|
| 3885 | /*!
|
|---|
| 3886 | \fn bool Phonon::MediaController::autoplayTitles() const
|
|---|
| 3887 |
|
|---|
| 3888 | Returns true if titles will automatically be played when the media
|
|---|
| 3889 | is played; otherwise returns false.
|
|---|
| 3890 |
|
|---|
| 3891 | The media controller will play the titles of the media source in
|
|---|
| 3892 | sequence when the media object's \l{Phonon::MediaObject::}{play()}
|
|---|
| 3893 | function is called. If the autoplay option is disabled, the media
|
|---|
| 3894 | object will play the
|
|---|
| 3895 | \l{Phonon::}{MediaController::currentTitle()}{current title} and then
|
|---|
| 3896 | finish the playback.
|
|---|
| 3897 |
|
|---|
| 3898 | \sa setAutoplayTitles(), currentTitle()
|
|---|
| 3899 | */
|
|---|
| 3900 |
|
|---|
| 3901 | /*!
|
|---|
| 3902 | \fn void Phonon::MediaController::setAutoplayTitles(bool enable)
|
|---|
| 3903 |
|
|---|
| 3904 | Sets the titles to play automatically when the media is played if
|
|---|
| 3905 | \a enable is true; otherwise disables this option.
|
|---|
| 3906 |
|
|---|
| 3907 | The media controller will play the titles of the media source in
|
|---|
| 3908 | sequence when the media object's \l{Phonon::MediaObject::}{play()}
|
|---|
| 3909 | function is called. If the autoplay option is disabled, the media
|
|---|
| 3910 | object will play the
|
|---|
| 3911 | \l{Phonon::}{MediaController::currentTitle()}{current title} and then
|
|---|
| 3912 | finish the playback.
|
|---|
| 3913 |
|
|---|
| 3914 | \sa autoplayTitles(), currentTitle()
|
|---|
| 3915 | */
|
|---|
| 3916 |
|
|---|
| 3917 | /*!
|
|---|
| 3918 | \fn void Phonon::MediaController::setCurrentAngle(int angleNumber)
|
|---|
| 3919 |
|
|---|
| 3920 | Sets the current angle to the given \a angleNumber if the media
|
|---|
| 3921 | file or device supports navigation by angle number.
|
|---|
| 3922 |
|
|---|
| 3923 | \sa Feature
|
|---|
| 3924 | */
|
|---|
| 3925 |
|
|---|
| 3926 | /*!
|
|---|
| 3927 | \fn void Phonon::MediaController::setCurrentChapter(int chapterNumber)
|
|---|
| 3928 |
|
|---|
| 3929 | Sets the current chapter to the given \a chapterNumber if the media
|
|---|
| 3930 | file or device supports navigation by chapter number.
|
|---|
| 3931 |
|
|---|
| 3932 | \sa Feature
|
|---|
| 3933 | */
|
|---|
| 3934 |
|
|---|
| 3935 | /*!
|
|---|
| 3936 | \fn void Phonon::MediaController::setCurrentTitle(int titleNumber)
|
|---|
| 3937 |
|
|---|
| 3938 | Skips to the given title \a titleNumber.
|
|---|
| 3939 |
|
|---|
| 3940 | If it was playing before the title change it will start playback on the new title if
|
|---|
| 3941 | autoplayTitles is enabled.
|
|---|
| 3942 |
|
|---|
| 3943 | \sa Feature
|
|---|
| 3944 | */
|
|---|
| 3945 |
|
|---|
| 3946 | /*!
|
|---|
| 3947 | \fn void Phonon::MediaController::nextTitle()
|
|---|
| 3948 |
|
|---|
| 3949 | Skips to the next title.
|
|---|
| 3950 |
|
|---|
| 3951 | If it was playing before the title change it will start playback on the next title if
|
|---|
| 3952 | autoplayTitles is enabled.
|
|---|
| 3953 |
|
|---|
| 3954 | \sa Feature
|
|---|
| 3955 | */
|
|---|
| 3956 |
|
|---|
| 3957 | /*!
|
|---|
| 3958 | \fn void Phonon::MediaController::previousTitle()
|
|---|
| 3959 |
|
|---|
| 3960 | Skips to the previous title.
|
|---|
| 3961 |
|
|---|
| 3962 | If it was playing before the title change it will start playback on the previous title if
|
|---|
| 3963 | autoplayTitles is enabled.
|
|---|
| 3964 |
|
|---|
| 3965 | \sa Feature
|
|---|
| 3966 | */
|
|---|
| 3967 |
|
|---|
| 3968 | /*!
|
|---|
| 3969 | \fn void Phonon::MediaController::availableAnglesChanged(int availableAngles)
|
|---|
| 3970 |
|
|---|
| 3971 | This signal is emitted whenever the number of available angles changes.
|
|---|
| 3972 | The new number of available angles is given by \a availableAngles.
|
|---|
| 3973 |
|
|---|
| 3974 | \sa Feature
|
|---|
| 3975 | */
|
|---|
| 3976 |
|
|---|
| 3977 | /*!
|
|---|
| 3978 | \fn void Phonon::MediaController::angleChanged(int angleNumber)
|
|---|
| 3979 |
|
|---|
| 3980 | This signal is emitted whenever the current angle changes.
|
|---|
| 3981 | The new angle number is given by \a angleNumber.
|
|---|
| 3982 |
|
|---|
| 3983 | \sa Feature
|
|---|
| 3984 | */
|
|---|
| 3985 |
|
|---|
| 3986 | /*!
|
|---|
| 3987 | \fn void Phonon::MediaController::availableChaptersChanged(int availableChapters)
|
|---|
| 3988 |
|
|---|
| 3989 | This signal is emitted whenever the number of available chapters changes.
|
|---|
| 3990 | The new number of available chapters is given by \a availableChapters.
|
|---|
| 3991 |
|
|---|
| 3992 | \sa Feature
|
|---|
| 3993 | */
|
|---|
| 3994 |
|
|---|
| 3995 | /*!
|
|---|
| 3996 | \fn void Phonon::MediaController::chapterChanged(int chapterNumber)
|
|---|
| 3997 |
|
|---|
| 3998 | This signal is emitted whenever the current chapter changes.
|
|---|
| 3999 | The new chapter number is given by \a chapterNumber.
|
|---|
| 4000 |
|
|---|
| 4001 | \sa Feature
|
|---|
| 4002 | */
|
|---|
| 4003 |
|
|---|
| 4004 | /*!
|
|---|
| 4005 | \fn void Phonon::MediaController::availableTitlesChanged(int availableTitles)
|
|---|
| 4006 |
|
|---|
| 4007 | This signal is emitted whenever the number of available titles changes.
|
|---|
| 4008 | The new number of available titles is given by \a availableTitles.
|
|---|
| 4009 |
|
|---|
| 4010 | \sa Feature
|
|---|
| 4011 | */
|
|---|
| 4012 |
|
|---|
| 4013 | /*!
|
|---|
| 4014 | \fn void Phonon::MediaController::titleChanged(int titleNumber)
|
|---|
| 4015 |
|
|---|
| 4016 | This signal is emitted whenever the current title changes.
|
|---|
| 4017 | The new title number is given by \a titleNumber.
|
|---|
| 4018 |
|
|---|
| 4019 | \sa Feature
|
|---|
| 4020 | */
|
|---|
| 4021 |
|
|---|
| 4022 | /*!
|
|---|
| 4023 | \class Phonon::VideoWidget
|
|---|
| 4024 | \inmodule Phonon
|
|---|
| 4025 | \inheaderfile Phonon/VideoWidget
|
|---|
| 4026 | \since 4.4
|
|---|
| 4027 | \ingroup advanced
|
|---|
| 4028 | \ingroup multimedia
|
|---|
| 4029 | \brief The VideoWidget class provides a widget that is used to display video.
|
|---|
| 4030 |
|
|---|
| 4031 | The VideoWidget class renders the video of a media stream on a
|
|---|
| 4032 | QWidget. It is connected to the \l{Phonon::}{MediaObject}, of
|
|---|
| 4033 | which video stream it should render. You connect the two objects
|
|---|
| 4034 | using the Phonon::createPath() function.
|
|---|
| 4035 |
|
|---|
| 4036 | The widget has some possibilities to manipulate the video
|
|---|
| 4037 | stream. You can change the brightness(), hue(), saturation(),
|
|---|
| 4038 | and contrast().
|
|---|
| 4039 |
|
|---|
| 4040 | Resizing of the video is handled automatically, but you can affect
|
|---|
| 4041 | the way the video is resized with the aspectRatio and scaleMode
|
|---|
| 4042 | properties. By default, the widget will use the aspect ratio of
|
|---|
| 4043 | the video stream itself.
|
|---|
| 4044 |
|
|---|
| 4045 | The video widget takes the size of the video when it receives a new video
|
|---|
| 4046 | stream (i.e., when a new MediaSource is set on the MediaObject to which it is
|
|---|
| 4047 | connected). If you need to know the size of the video, you can call
|
|---|
| 4048 | \l{QWidget::}{sizeHint()} after the video has been loaded (i.e., after the
|
|---|
| 4049 | MediaObject leaves the \l{Phonon::}{LoadingState}).
|
|---|
| 4050 |
|
|---|
| 4051 | It is also possible to go to \l{fullScreen}{full screen} mode.
|
|---|
| 4052 |
|
|---|
| 4053 | A typical example of usage follows below:
|
|---|
| 4054 |
|
|---|
| 4055 | \snippet doc/src/snippets/code/doc_src_phonon-api.qdoc 21
|
|---|
| 4056 |
|
|---|
| 4057 | \sa {Phonon Module}
|
|---|
| 4058 | */
|
|---|
| 4059 |
|
|---|
| 4060 | /*!
|
|---|
| 4061 | \fn Phonon::VideoWidget::VideoWidget(QWidget *parent = 0)
|
|---|
| 4062 |
|
|---|
| 4063 | Constructs a new video widget with the specified \a parent.
|
|---|
| 4064 | */
|
|---|
| 4065 |
|
|---|
| 4066 | /*!
|
|---|
| 4067 | \fn Phonon::VideoWidget::VideoWidget(VideoWidgetPrivate &d, QWidget *parent)
|
|---|
| 4068 | \internal
|
|---|
| 4069 |
|
|---|
| 4070 | Constructs a new video widget with the specified \a parent.
|
|---|
| 4071 | */
|
|---|
| 4072 |
|
|---|
| 4073 | /*!
|
|---|
| 4074 | \fn bool Phonon::VideoWidget::event(QEvent *)
|
|---|
| 4075 | \reimp
|
|---|
| 4076 | */
|
|---|
| 4077 |
|
|---|
| 4078 | /*!
|
|---|
| 4079 | \fn void Phonon::VideoWidget::mouseMoveEvent(QMouseEvent *)
|
|---|
| 4080 | \reimp
|
|---|
| 4081 | */
|
|---|
| 4082 |
|
|---|
| 4083 | /*!
|
|---|
| 4084 | \enum Phonon::VideoWidget::ScaleMode
|
|---|
| 4085 |
|
|---|
| 4086 | The ScaleMode enum describes how to treat aspect ratio during
|
|---|
| 4087 | resizing of video.
|
|---|
| 4088 |
|
|---|
| 4089 | \value FitInView The video will be fitted to fill the view
|
|---|
| 4090 | keeping aspect ratio.
|
|---|
| 4091 | \value ScaleAndCrop The video is scaled
|
|---|
| 4092 |
|
|---|
| 4093 |
|
|---|
| 4094 | */
|
|---|
| 4095 |
|
|---|
| 4096 | /*!
|
|---|
| 4097 | \property Phonon::VideoWidget::fullScreen
|
|---|
| 4098 | This property holds whether the video is shown using the complete
|
|---|
| 4099 | screen.
|
|---|
| 4100 |
|
|---|
| 4101 | The property differs from QWidget::fullScreen in that it is
|
|---|
| 4102 | writeable.
|
|---|
| 4103 |
|
|---|
| 4104 | By default the widget is not shown in fullScreen.
|
|---|
| 4105 |
|
|---|
| 4106 | \warning When switching to full screen mode using setFullScreen(),
|
|---|
| 4107 | the widget onto which the video is rendered is shown as a
|
|---|
| 4108 | top-level window. Key event forwarding is handled by VideoWidget,
|
|---|
| 4109 | but if you need to handle other events, e.g., mouse events, you
|
|---|
| 4110 | should handle fullscreen mode yourself.
|
|---|
| 4111 |
|
|---|
| 4112 | */
|
|---|
| 4113 |
|
|---|
| 4114 | /*!
|
|---|
| 4115 | \property Phonon::VideoWidget::aspectRatio
|
|---|
| 4116 | Defaults to AspectRatioAuto.
|
|---|
| 4117 |
|
|---|
| 4118 | \sa AspectRatio
|
|---|
| 4119 | */
|
|---|
| 4120 |
|
|---|
| 4121 | /*!
|
|---|
| 4122 | \property Phonon::VideoWidget::scaleMode
|
|---|
| 4123 |
|
|---|
| 4124 | If the size of the widget and the size of the video are not equal.
|
|---|
| 4125 | The video will be zoomed to fit the widget. The smaller zoom
|
|---|
| 4126 | (AddBarsScaleMode) adds black bars at the left/right or top/bottom to
|
|---|
| 4127 | make all of the image visible (default). The bigger zoom (ExpandMode)
|
|---|
| 4128 | fills the widget completely, keeping all information in one direction
|
|---|
| 4129 | and leaving parts of the image outside of the widget in the other
|
|---|
| 4130 | direction.
|
|---|
| 4131 | */
|
|---|
| 4132 |
|
|---|
| 4133 | /*!
|
|---|
| 4134 | \property Phonon::VideoWidget::brightness
|
|---|
| 4135 |
|
|---|
| 4136 | This property holds brightness of the video.
|
|---|
| 4137 |
|
|---|
| 4138 | Default is 0. Acceptable values are in range of -1, 1.
|
|---|
| 4139 | */
|
|---|
| 4140 |
|
|---|
| 4141 | /*!
|
|---|
| 4142 | \property Phonon::VideoWidget::contrast
|
|---|
| 4143 |
|
|---|
| 4144 | This property holds the contrast of the video.
|
|---|
| 4145 |
|
|---|
| 4146 | Default is 0. Acceptable values are in range of -1, 1.
|
|---|
| 4147 | */
|
|---|
| 4148 |
|
|---|
| 4149 | /*!
|
|---|
| 4150 | \property Phonon::VideoWidget::hue
|
|---|
| 4151 |
|
|---|
| 4152 | This property holds the hue of the video.
|
|---|
| 4153 |
|
|---|
| 4154 | Default is 0. Acceptable values are in range of -1, 1.
|
|---|
| 4155 | */
|
|---|
| 4156 |
|
|---|
| 4157 | /*!
|
|---|
| 4158 | \property Phonon::VideoWidget::saturation
|
|---|
| 4159 |
|
|---|
| 4160 | This property holds saturation of the video.
|
|---|
| 4161 |
|
|---|
| 4162 | Default is 0. Acceptable values are in range of -1, 1.
|
|---|
| 4163 | */
|
|---|
| 4164 |
|
|---|
| 4165 | /*!
|
|---|
| 4166 | \enum Phonon::VideoWidget::AspectRatio
|
|---|
| 4167 |
|
|---|
| 4168 | Defines the width:height to be used for the video.
|
|---|
| 4169 |
|
|---|
| 4170 | \value AspectRatioAuto
|
|---|
| 4171 | Let the decoder find the aspect ratio automatically from the
|
|---|
| 4172 | media file (this is the default).
|
|---|
| 4173 |
|
|---|
| 4174 | \value AspectRatioWidget
|
|---|
| 4175 | Fits the video into the widget making the aspect ratio depend
|
|---|
| 4176 | solely on the size of the widget. This way the aspect ratio
|
|---|
| 4177 | is freely resizeable by the user.
|
|---|
| 4178 |
|
|---|
| 4179 | \value AspectRatio4_3
|
|---|
| 4180 | Make width/height == 4/3, which is the old TV size and
|
|---|
| 4181 | monitor size (1024/768 == 4/3). (4:3)
|
|---|
| 4182 |
|
|---|
| 4183 | \value AspectRatio16_9
|
|---|
| 4184 | Make width/height == 16/9, which is the size of most current
|
|---|
| 4185 | media. (16:9)
|
|---|
| 4186 | */
|
|---|
| 4187 |
|
|---|
| 4188 | /*!
|
|---|
| 4189 | \fn void Phonon::VideoWidget::exitFullScreen()
|
|---|
| 4190 |
|
|---|
| 4191 | Convenience slot, calling setFullScreen(false)
|
|---|
| 4192 | */
|
|---|
| 4193 |
|
|---|
| 4194 |
|
|---|
| 4195 | /*!
|
|---|
| 4196 | \fn void Phonon::VideoWidget::enterFullScreen()
|
|---|
| 4197 |
|
|---|
| 4198 | Convenience slot, calling setFullScreen(true)
|
|---|
| 4199 | */
|
|---|
| 4200 |
|
|---|
| 4201 | /*!
|
|---|
| 4202 | \class Phonon::VideoWidgetInterface
|
|---|
| 4203 | \inmodule Phonon
|
|---|
| 4204 | \since 4.4
|
|---|
| 4205 | \internal
|
|---|
| 4206 | */
|
|---|
| 4207 |
|
|---|
| 4208 | /*!
|
|---|
| 4209 | \fn virtual Phonon::VideoWidgetInterface::~VideoWidgetInterface()
|
|---|
| 4210 | */
|
|---|
| 4211 |
|
|---|
| 4212 | /*!
|
|---|
| 4213 | \fn virtual Phonon::VideoWidget::AspectRatio Phonon::VideoWidgetInterface::aspectRatio() const = 0
|
|---|
| 4214 | \internal
|
|---|
| 4215 | */
|
|---|
| 4216 |
|
|---|
| 4217 | /*!
|
|---|
| 4218 | \fn virtual void Phonon::VideoWidgetInterface::setAspectRatio(Phonon::VideoWidget::AspectRatio ratio) = 0
|
|---|
| 4219 | \internal
|
|---|
| 4220 | */
|
|---|
| 4221 |
|
|---|
| 4222 | /*!
|
|---|
| 4223 | \fn virtual qreal Phonon::VideoWidgetInterface::brightness() const = 0
|
|---|
| 4224 | \internal
|
|---|
| 4225 | */
|
|---|
| 4226 |
|
|---|
| 4227 | /*!
|
|---|
| 4228 | \fn virtual void Phonon::VideoWidgetInterface::setBrightness(qreal) = 0
|
|---|
| 4229 | \internal
|
|---|
| 4230 | */
|
|---|
| 4231 |
|
|---|
| 4232 | /*!
|
|---|
| 4233 | \fn virtual Phonon::VideoWidget::ScaleMode Phonon::VideoWidgetInterface::scaleMode() const = 0
|
|---|
| 4234 | \internal
|
|---|
| 4235 | */
|
|---|
| 4236 |
|
|---|
| 4237 | /*!
|
|---|
| 4238 | \fn virtual void Phonon::VideoWidgetInterface::setScaleMode(Phonon::VideoWidget::ScaleMode mode) = 0
|
|---|
| 4239 | \internal
|
|---|
| 4240 | */
|
|---|
| 4241 |
|
|---|
| 4242 | /*!
|
|---|
| 4243 | \fn virtual qreal Phonon::VideoWidgetInterface::contrast() const = 0
|
|---|
| 4244 | \internal
|
|---|
| 4245 | */
|
|---|
| 4246 |
|
|---|
| 4247 | /*!
|
|---|
| 4248 | \fn virtual void Phonon::VideoWidgetInterface::setContrast(qreal) = 0
|
|---|
| 4249 | \internal
|
|---|
| 4250 | */
|
|---|
| 4251 |
|
|---|
| 4252 | /*!
|
|---|
| 4253 | \fn virtual qreal Phonon::VideoWidgetInterface::hue() const = 0
|
|---|
| 4254 | \internal
|
|---|
| 4255 | */
|
|---|
| 4256 |
|
|---|
| 4257 | /*!
|
|---|
| 4258 | \fn virtual void Phonon::VideoWidgetInterface::setHue(qreal) = 0
|
|---|
| 4259 | \internal
|
|---|
| 4260 | */
|
|---|
| 4261 |
|
|---|
| 4262 | /*!
|
|---|
| 4263 | \fn virtual qreal Phonon::VideoWidgetInterface::saturation() const = 0
|
|---|
| 4264 | \internal
|
|---|
| 4265 | */
|
|---|
| 4266 |
|
|---|
| 4267 | /*!
|
|---|
| 4268 | \fn virtual void Phonon::VideoWidgetInterface::setSaturation(qreal) = 0
|
|---|
| 4269 | \internal
|
|---|
| 4270 | */
|
|---|
| 4271 |
|
|---|
| 4272 | /*!
|
|---|
| 4273 | \fn virtual QWidget *Phonon::VideoWidgetInterface::widget() = 0
|
|---|
| 4274 | \internal
|
|---|
| 4275 | */
|
|---|
| 4276 |
|
|---|
| 4277 | /*!
|
|---|
| 4278 | \class Phonon::PlatformPlugin
|
|---|
| 4279 | \inmodule Phonon
|
|---|
| 4280 | \since 4.4
|
|---|
| 4281 | \internal
|
|---|
| 4282 | */
|
|---|
| 4283 |
|
|---|
| 4284 | /*!
|
|---|
| 4285 | \fn virtual AbstractMediaStream *Phonon::PlatformPlugin::createMediaStream(const QUrl &url, QObject *parent) = 0
|
|---|
| 4286 |
|
|---|
| 4287 | Creates a AbstractMediaStream object with the given \a parent that provides the data
|
|---|
| 4288 | for the given URL specified by \a url.
|
|---|
| 4289 | \omit
|
|---|
| 4290 | On KDE this uses KIO.
|
|---|
| 4291 | \endomit
|
|---|
| 4292 | */
|
|---|
| 4293 |
|
|---|
| 4294 | /*!
|
|---|
| 4295 | \fn virtual QIcon Phonon::PlatformPlugin::icon(const QString &name) const = 0
|
|---|
| 4296 |
|
|---|
| 4297 | Returns the icon for the given icon name.
|
|---|
| 4298 | */
|
|---|
| 4299 |
|
|---|
| 4300 | /*!
|
|---|
| 4301 | \fn virtual void Phonon::PlatformPlugin::notification(const char *notificationName, const QString &text,
|
|---|
| 4302 | const QStringList &actions, QObject *receiver, const char *actionSlot) const = 0
|
|---|
| 4303 |
|
|---|
| 4304 | Shows a notification pop-up with the given \a notificationName and \a text.
|
|---|
| 4305 | Each action in the associated list of \a actions is connected to the \a actionSlot
|
|---|
| 4306 | of the specified \a receiver object, which is expected to act on the actions as
|
|---|
| 4307 | they are triggered by the user.
|
|---|
| 4308 | */
|
|---|
| 4309 |
|
|---|
| 4310 | /*!
|
|---|
| 4311 | \fn virtual QString Phonon::PlatformPlugin::applicationName() const = 0
|
|---|
| 4312 |
|
|---|
| 4313 | Returns the name of the application. For most Qt application this is
|
|---|
| 4314 | QCoreApplication::applicationName(), but for KDE this is overridden by KAboutData.
|
|---|
| 4315 | */
|
|---|
| 4316 |
|
|---|
| 4317 |
|
|---|
| 4318 | /*!
|
|---|
| 4319 | \fn virtual QObject *Phonon::PlatformPlugin::createBackend() = 0
|
|---|
| 4320 |
|
|---|
| 4321 | Creates a backend object. This way the platform can decide the backend preference.
|
|---|
| 4322 | */
|
|---|
| 4323 |
|
|---|
| 4324 | /*!
|
|---|
| 4325 | \fn virtual QObject *Phonon::PlatformPlugin::createBackend(const QString &library, const QString &version) = 0
|
|---|
| 4326 |
|
|---|
| 4327 | Using the library loader of the platform, loads a given backend provided the
|
|---|
| 4328 | specified \a library and \a version.
|
|---|
| 4329 | */
|
|---|
| 4330 |
|
|---|
| 4331 | /*!
|
|---|
| 4332 | \fn virtual bool Phonon::PlatformPlugin::isMimeTypeAvailable(const QString &mimeType) const = 0
|
|---|
| 4333 |
|
|---|
| 4334 | Tries to check whether the default backend supports the MIME type specified by \a mimeType
|
|---|
| 4335 | without loading the actual backend library.
|
|---|
| 4336 | \omit
|
|---|
| 4337 | On KDE this reads the MIME type list from the .desktop file of
|
|---|
| 4338 | the backend.
|
|---|
| 4339 | \endomit
|
|---|
| 4340 | */
|
|---|
| 4341 |
|
|---|
| 4342 | /*!
|
|---|
| 4343 | \fn virtual void Phonon::PlatformPlugin::saveVolume(const QString &outputName, qreal volume) = 0
|
|---|
| 4344 |
|
|---|
| 4345 | Saves the volume for the given output.
|
|---|
| 4346 | */
|
|---|
| 4347 |
|
|---|
| 4348 | /*!
|
|---|
| 4349 | \fn virtual qreal Phonon::PlatformPlugin::loadVolume(const QString &outputName) const = 0
|
|---|
| 4350 |
|
|---|
| 4351 | Loads the volume for the given output.
|
|---|
| 4352 | */
|
|---|
| 4353 |
|
|---|
| 4354 | /*!
|
|---|
| 4355 | \class Phonon::MediaNode
|
|---|
| 4356 | \inmodule Phonon
|
|---|
| 4357 | \inheaderfile Phonon/MediaNode
|
|---|
| 4358 | \since 4.4
|
|---|
| 4359 | \brief The MediaNode class is the base class for all nodes in a media graph.
|
|---|
| 4360 |
|
|---|
| 4361 | In all phonon applications, one builds a media graph consisting of
|
|---|
| 4362 | MediaNodes. The graph will take multimedia content, e.g., from a
|
|---|
| 4363 | file, as input. After its nodes have processed the multimedia, the
|
|---|
| 4364 | graph will output the media again, e.g., to a sound card.
|
|---|
| 4365 |
|
|---|
| 4366 | The multimedia content is streamed over \l{Phonon::}{Path}s
|
|---|
| 4367 | between the nodes in the graph. You can query the paths that are
|
|---|
| 4368 | connected to a media node with inputPaths() and outputPaths().
|
|---|
| 4369 |
|
|---|
| 4370 | You can check whether the node is implemented by the current
|
|---|
| 4371 | backend by calling isValid(). This does not guarantee that an
|
|---|
| 4372 | instance of the class works as expected, but that the backend has
|
|---|
| 4373 | implemented functionality for the class.
|
|---|
| 4374 |
|
|---|
| 4375 | Currently, Phonon has four media nodes: \l{Phonon::}{MediaObject},
|
|---|
| 4376 | \l{Phonon::}{AudioOutput}, \l{Phonon::}{VideoWidget}, and \l{Phonon::}{Effect}.
|
|---|
| 4377 | Please refer to their class descriptions for details about their usage, and to
|
|---|
| 4378 | find out which nodes can be connected to each other. See also \l{Building
|
|---|
| 4379 | Graphs} in Phonon's \l{Phonon Overview}{overview} document.
|
|---|
| 4380 |
|
|---|
| 4381 | Two nodes are connected to each other using the
|
|---|
| 4382 | Phonon::createPath() or \l{Phonon::}{Path::insertEffect()}
|
|---|
| 4383 | functions (only \l{Phonon::Effect}s use
|
|---|
| 4384 | \l{Phonon::Path::}{insertEffect()}). We show a code example below,
|
|---|
| 4385 | in which we build a media graph for video playback and then query
|
|---|
| 4386 | its media nodes for their \l{Phonon::}{Path}s:
|
|---|
| 4387 |
|
|---|
| 4388 | \snippet doc/src/snippets/medianodesnippet.cpp 0
|
|---|
| 4389 |
|
|---|
| 4390 | When you create a Phonon application, you will likely build the
|
|---|
| 4391 | graph yourself. This makes isValid() the most useful function of
|
|---|
| 4392 | this class. The other two functions help navigate the graph, which
|
|---|
| 4393 | you do not need to do as you created the nodes yourself.
|
|---|
| 4394 |
|
|---|
| 4395 | \sa {Phonon Overview}, Phonon::MediaObject,
|
|---|
| 4396 | Phonon::AudioOutput, Phonon::VideoWidget, {Phonon Module}
|
|---|
| 4397 | */
|
|---|
| 4398 |
|
|---|
| 4399 | /*!
|
|---|
| 4400 | \fn virtual Phonon::MediaNode::~MediaNode()
|
|---|
| 4401 |
|
|---|
| 4402 | Destroys the media node and any paths connecting it to other
|
|---|
| 4403 | nodes. Any \l{Phonon::}{Effect}s connected to these paths will
|
|---|
| 4404 | also be deleted.
|
|---|
| 4405 | */
|
|---|
| 4406 |
|
|---|
| 4407 | /*!
|
|---|
| 4408 | \fn bool Phonon::MediaNode::isValid() const
|
|---|
| 4409 |
|
|---|
| 4410 | Returns true if the backend provides an implementation of this
|
|---|
| 4411 | class; otherwise returns false.
|
|---|
| 4412 |
|
|---|
| 4413 | This does not guarantee that instances of the class works as
|
|---|
| 4414 | expected, but that the backend has implemented the functionality
|
|---|
| 4415 | for this class. For instance, Qt's GStreamer backend will return
|
|---|
| 4416 | true for instances of the \l{Phonon::}{AudioOutput} class, even if
|
|---|
| 4417 | there is a problem with GStreamer and it could not play sound.
|
|---|
| 4418 |
|
|---|
| 4419 | */
|
|---|
| 4420 |
|
|---|
| 4421 | /*!
|
|---|
| 4422 | \fn QList<Path> Phonon::MediaNode::inputPaths() const
|
|---|
| 4423 |
|
|---|
| 4424 | Returns the paths that inputs multimedia to this media node.
|
|---|
| 4425 |
|
|---|
| 4426 | \sa outputPaths()
|
|---|
| 4427 | */
|
|---|
| 4428 |
|
|---|
| 4429 | /*!
|
|---|
| 4430 | \fn QList<Path> Phonon::MediaNode::outputPaths() const
|
|---|
| 4431 |
|
|---|
| 4432 | Returns the paths to which this media node outputs media.
|
|---|
| 4433 |
|
|---|
| 4434 | \sa inputPaths()
|
|---|
| 4435 | */
|
|---|
| 4436 |
|
|---|
| 4437 | /*!
|
|---|
| 4438 | \fn Phonon::MediaNode::MediaNode(MediaNodePrivate &dd)
|
|---|
| 4439 | \internal
|
|---|
| 4440 | */
|
|---|
| 4441 |
|
|---|
| 4442 | /*!
|
|---|
| 4443 | \class Phonon::GlobalConfig
|
|---|
| 4444 | \inmodule Phonon
|
|---|
| 4445 | \since 4.4
|
|---|
| 4446 | \internal
|
|---|
| 4447 | */
|
|---|
| 4448 |
|
|---|
| 4449 | /*!
|
|---|
| 4450 | \fn Phonon::GlobalConfig::GlobalConfig()
|
|---|
| 4451 | \internal
|
|---|
| 4452 | */
|
|---|
| 4453 |
|
|---|
| 4454 | /*!
|
|---|
| 4455 | \fn Phonon::GlobalConfig::~GlobalConfig()
|
|---|
| 4456 | \internal
|
|---|
| 4457 | */
|
|---|
| 4458 |
|
|---|
| 4459 | /*!
|
|---|
| 4460 | \fn QList<int> Phonon::GlobalConfig::audioOutputDeviceListFor(Phonon::Category category, HideAdvancedDevicesOverride override = FromSettings) const
|
|---|
| 4461 | \internal
|
|---|
| 4462 | */
|
|---|
| 4463 |
|
|---|
| 4464 | /*!
|
|---|
| 4465 | \fn int Phonon::GlobalConfig::audioOutputDeviceFor(Phonon::Category category) const
|
|---|
| 4466 | \internal
|
|---|
| 4467 | */
|
|---|
| 4468 |
|
|---|
| 4469 | /*!
|
|---|
| 4470 | \class Phonon::ObjectDescriptionData
|
|---|
| 4471 | \inmodule Phonon
|
|---|
| 4472 | \since 4.4
|
|---|
| 4473 | \internal
|
|---|
| 4474 | \brief Data class for objects describing devices or features of the backend.
|
|---|
| 4475 |
|
|---|
| 4476 | \sa Phonon::BackendCapabilities
|
|---|
| 4477 | */
|
|---|
| 4478 |
|
|---|
| 4479 | /*!
|
|---|
| 4480 | \fn bool Phonon::ObjectDescriptionData::operator==(const ObjectDescriptionData &otherDescription) const
|
|---|
| 4481 |
|
|---|
| 4482 | Returns \c true if this ObjectDescription describes the same
|
|---|
| 4483 | as \a otherDescription; otherwise returns \c false.
|
|---|
| 4484 | */
|
|---|
| 4485 |
|
|---|
| 4486 | /*!
|
|---|
| 4487 | \fn QString Phonon::ObjectDescriptionData::name() const
|
|---|
| 4488 |
|
|---|
| 4489 | Returns the name of the capture source.
|
|---|
| 4490 |
|
|---|
| 4491 | \return A string that should be presented to the user to
|
|---|
| 4492 | choose the capture source.
|
|---|
| 4493 | */
|
|---|
| 4494 |
|
|---|
| 4495 | /*!
|
|---|
| 4496 | \fn QString Phonon::ObjectDescriptionData::description() const
|
|---|
| 4497 |
|
|---|
| 4498 | Returns a description of the capture source. This text should
|
|---|
| 4499 | make clear what sound source this is, which is sometimes hard
|
|---|
| 4500 | to describe or understand from just the name.
|
|---|
| 4501 |
|
|---|
| 4502 | \return A string describing the capture source.
|
|---|
| 4503 | */
|
|---|
| 4504 |
|
|---|
| 4505 | /*!
|
|---|
| 4506 | \fn QVariant Phonon::ObjectDescriptionData::property(const char *name) const
|
|---|
| 4507 |
|
|---|
| 4508 | Returns a named property.
|
|---|
| 4509 |
|
|---|
| 4510 | If the property is not set an invalid value is returned.
|
|---|
| 4511 |
|
|---|
| 4512 | \sa propertyNames()
|
|---|
| 4513 | */
|
|---|
| 4514 |
|
|---|
| 4515 | /*!
|
|---|
| 4516 | \fn QList<QByteArray> Phonon::ObjectDescriptionData::propertyNames() const
|
|---|
| 4517 |
|
|---|
| 4518 | Returns all names that return valid data when property() is called.
|
|---|
| 4519 |
|
|---|
| 4520 | \sa property()
|
|---|
| 4521 | */
|
|---|
| 4522 |
|
|---|
| 4523 | /*!
|
|---|
| 4524 | \fn bool Phonon::ObjectDescriptionData::isValid() const
|
|---|
| 4525 |
|
|---|
| 4526 | Returns true if the Tuple is valid (index != -1); otherwise returns
|
|---|
| 4527 | false.
|
|---|
| 4528 | */
|
|---|
| 4529 |
|
|---|
| 4530 | /*!
|
|---|
| 4531 | \fn int Phonon::ObjectDescriptionData::index() const
|
|---|
| 4532 |
|
|---|
| 4533 | A unique identifier for this device/. Used internally
|
|---|
| 4534 | to distinguish between the devices/.
|
|---|
| 4535 |
|
|---|
| 4536 | \return An integer that uniquely identifies every device.
|
|---|
| 4537 | */
|
|---|
| 4538 |
|
|---|
| 4539 | /*!
|
|---|
| 4540 | \fn static ObjectDescriptionData *Phonon::ObjectDescriptionData::fromIndex(ObjectDescriptionType type, int index)
|
|---|
| 4541 | \internal
|
|---|
| 4542 | */
|
|---|
| 4543 |
|
|---|
| 4544 | /*!
|
|---|
| 4545 | \fn Phonon::ObjectDescriptionData::~ObjectDescriptionData()
|
|---|
| 4546 | \internal
|
|---|
| 4547 | */
|
|---|
| 4548 |
|
|---|
| 4549 | /*!
|
|---|
| 4550 | \fn Phonon::ObjectDescriptionData::ObjectDescriptionData(ObjectDescriptionPrivate * = 0)
|
|---|
| 4551 | \internal
|
|---|
| 4552 | */
|
|---|
| 4553 |
|
|---|
| 4554 | /*!
|
|---|
| 4555 | \class Phonon::AddonInterface
|
|---|
| 4556 | \inmodule Phonon
|
|---|
| 4557 | \since 4.4
|
|---|
| 4558 | \internal
|
|---|
| 4559 | \brief Interface for Menu, Chapter, Angle and Title/Track control.
|
|---|
| 4560 | */
|
|---|
| 4561 |
|
|---|
| 4562 | /*!
|
|---|
| 4563 | \fn virtual Phonon::AddonInterface::~AddonInterface()
|
|---|
| 4564 | \internal
|
|---|
| 4565 | */
|
|---|
| 4566 |
|
|---|
| 4567 | /*!
|
|---|
| 4568 | \enum Phonon::AddonInterface::Interface
|
|---|
| 4569 |
|
|---|
| 4570 | This enum describes the type of interface represented by an AddonInterface object.
|
|---|
| 4571 |
|
|---|
| 4572 | \value NavigationInterface
|
|---|
| 4573 | \value ChapterInterface
|
|---|
| 4574 | \value AngleInterface
|
|---|
| 4575 | \value TitleInterface
|
|---|
| 4576 | */
|
|---|
| 4577 |
|
|---|
| 4578 | /*!
|
|---|
| 4579 | \enum Phonon::AddonInterface::NavigationCommand
|
|---|
| 4580 | \internal
|
|---|
| 4581 | \value Menu1Button
|
|---|
| 4582 | */
|
|---|
| 4583 |
|
|---|
| 4584 | /*!
|
|---|
| 4585 | \enum Phonon::AddonInterface::ChapterCommand
|
|---|
| 4586 | \internal
|
|---|
| 4587 | \value availableChapters
|
|---|
| 4588 | \value chapter
|
|---|
| 4589 | \value setChapter
|
|---|
| 4590 | */
|
|---|
| 4591 |
|
|---|
| 4592 | /*!
|
|---|
| 4593 | \enum Phonon::AddonInterface::AngleCommand
|
|---|
| 4594 | \internal
|
|---|
| 4595 | \value availableAngles
|
|---|
| 4596 | \value angle
|
|---|
| 4597 | \value setAngle
|
|---|
| 4598 | */
|
|---|
| 4599 |
|
|---|
| 4600 | /*!
|
|---|
| 4601 | \enum Phonon::AddonInterface::TitleCommand
|
|---|
| 4602 | \internal
|
|---|
| 4603 | \value availableTitles
|
|---|
| 4604 | \value title
|
|---|
| 4605 | \value setTitle
|
|---|
| 4606 | \value autoplayTitles
|
|---|
| 4607 | \value setAutoplayTitles
|
|---|
| 4608 | */
|
|---|
| 4609 |
|
|---|
| 4610 | /*!
|
|---|
| 4611 | \fn virtual bool Phonon::AddonInterface::hasInterface(Interface iface) const = 0
|
|---|
| 4612 | \internal
|
|---|
| 4613 | */
|
|---|
| 4614 |
|
|---|
| 4615 | /*!
|
|---|
| 4616 | \fn virtual QVariant Phonon::AddonInterface::interfaceCall(Interface iface, int command,
|
|---|
| 4617 | const QList<QVariant> &arguments) = 0
|
|---|
| 4618 | \internal
|
|---|
| 4619 | */
|
|---|
| 4620 |
|
|---|
| 4621 | /*!
|
|---|
| 4622 | \class Phonon::MediaNodePrivate
|
|---|
| 4623 | \inmodule Phonon
|
|---|
| 4624 | \since 4.4
|
|---|
| 4625 | \internal
|
|---|
| 4626 | */
|
|---|
| 4627 |
|
|---|
| 4628 | /*!
|
|---|
| 4629 | \namespace Phonon::Factory
|
|---|
| 4630 | \inmodule Phonon
|
|---|
| 4631 | \internal
|
|---|
| 4632 | */
|
|---|
| 4633 |
|
|---|
| 4634 | /*!
|
|---|
| 4635 | \fn Sender *Phonon::Factory::sender()
|
|---|
| 4636 |
|
|---|
| 4637 | Returns a pointer to the object emitting the signals.
|
|---|
| 4638 |
|
|---|
| 4639 | \sa Sender::backendChanged()
|
|---|
| 4640 | */
|
|---|
| 4641 |
|
|---|
| 4642 | /*!
|
|---|
| 4643 | \fn QObject *Phonon::Factory::createMediaObject(QObject *parent = 0)
|
|---|
| 4644 |
|
|---|
| 4645 | Create a new backend object for a MediaObject.
|
|---|
| 4646 |
|
|---|
| 4647 | \return a pointer to the MediaObject the backend provides.
|
|---|
| 4648 | */
|
|---|
| 4649 |
|
|---|
| 4650 | /*!
|
|---|
| 4651 | \fn QObject *Phonon::Factory::createEffect(int effectId, QObject *parent = 0)
|
|---|
| 4652 |
|
|---|
| 4653 | Create a new backend object for a Effect.
|
|---|
| 4654 |
|
|---|
| 4655 | \return a pointer to the Effect the backend provides.
|
|---|
| 4656 | */
|
|---|
| 4657 |
|
|---|
| 4658 | /*!
|
|---|
| 4659 | \fn QObject *Phonon::Factory::createVolumeFaderEffect(QObject *parent = 0)
|
|---|
| 4660 |
|
|---|
| 4661 | Create a new backend object for a VolumeFaderEffect.
|
|---|
| 4662 |
|
|---|
| 4663 | \return a pointer to the VolumeFaderEffect the backend provides.
|
|---|
| 4664 | */
|
|---|
| 4665 |
|
|---|
| 4666 | /*!
|
|---|
| 4667 | \fn QObject *Phonon::Factory::createAudioOutput(QObject *parent = 0)
|
|---|
| 4668 |
|
|---|
| 4669 | Create a new backend object for a AudioOutput.
|
|---|
| 4670 |
|
|---|
| 4671 | \return a pointer to the AudioOutput the backend provides.
|
|---|
| 4672 | */
|
|---|
| 4673 |
|
|---|
| 4674 | /*!
|
|---|
| 4675 | \fn QObject *Phonon::Factory::createVideoWidget(QObject *parent = 0)
|
|---|
| 4676 |
|
|---|
| 4677 | Create a new backend object for a VideoWidget.
|
|---|
| 4678 |
|
|---|
| 4679 | \return a pointer to the VideoWidget the backend provides.
|
|---|
| 4680 | */
|
|---|
| 4681 |
|
|---|
| 4682 | /*!
|
|---|
| 4683 | \fn QObject *Phonon::Factory::backend(bool createWhenNull = true)
|
|---|
| 4684 |
|
|---|
| 4685 | \return a pointer to the backend interface.
|
|---|
| 4686 | */
|
|---|
| 4687 |
|
|---|
| 4688 | /*!
|
|---|
| 4689 | \fn QString Phonon::Factory::identifier()
|
|---|
| 4690 |
|
|---|
| 4691 | Unique identifier for the Backend. Can be used in configuration files
|
|---|
| 4692 | for example.
|
|---|
| 4693 | */
|
|---|
| 4694 |
|
|---|
| 4695 |
|
|---|
| 4696 | /*!
|
|---|
| 4697 | \fn QString Phonon::Factory::backendName()
|
|---|
| 4698 |
|
|---|
| 4699 | Get the name of the Backend.
|
|---|
| 4700 | \omit
|
|---|
| 4701 | It's the name from the .desktop file.
|
|---|
| 4702 | \endomit
|
|---|
| 4703 | */
|
|---|
| 4704 |
|
|---|
| 4705 | /*!
|
|---|
| 4706 | \fn QString Phonon::Factory::backendComment()
|
|---|
| 4707 |
|
|---|
| 4708 | Get the comment of the Backend.
|
|---|
| 4709 | \omit
|
|---|
| 4710 | It's the comment from the .desktop file.
|
|---|
| 4711 | \endomit
|
|---|
| 4712 | */
|
|---|
| 4713 |
|
|---|
| 4714 | /*!
|
|---|
| 4715 | \fn QString Phonon::Factory::backendVersion()
|
|---|
| 4716 |
|
|---|
| 4717 | Get the version of the Backend.
|
|---|
| 4718 | \omit
|
|---|
| 4719 | It's the version from the .desktop file.
|
|---|
| 4720 | \endomit
|
|---|
| 4721 |
|
|---|
| 4722 | The version is especially interesting if there are several versions
|
|---|
| 4723 | available for binary incompatible versions of the backend's media
|
|---|
| 4724 | framework.
|
|---|
| 4725 | */
|
|---|
| 4726 |
|
|---|
| 4727 | /*!
|
|---|
| 4728 | \fn QString Phonon::Factory::backendIcon()
|
|---|
| 4729 |
|
|---|
| 4730 | Get the icon (name) of the Backend.
|
|---|
| 4731 | \omit
|
|---|
| 4732 | It's the icon from the .desktop file.
|
|---|
| 4733 | \endomit
|
|---|
| 4734 | */
|
|---|
| 4735 |
|
|---|
| 4736 | /*!
|
|---|
| 4737 | \fn QString Phonon::Factory::backendWebsite()
|
|---|
| 4738 |
|
|---|
| 4739 | Get the website of the Backend.
|
|---|
| 4740 | \omit
|
|---|
| 4741 | It's the website from the .desktop file.
|
|---|
| 4742 | \endomit
|
|---|
| 4743 | */
|
|---|
| 4744 |
|
|---|
| 4745 | /*!
|
|---|
| 4746 | \fn QObject *Phonon::Factory::registerQObject(QObject *object)
|
|---|
| 4747 |
|
|---|
| 4748 | Registers the given backend \a object with the factory.
|
|---|
| 4749 | */
|
|---|
| 4750 |
|
|---|
| 4751 | /*!
|
|---|
| 4752 | \fn bool Phonon::Factory::isMimeTypeAvailable(const QString &mimeType)
|
|---|
| 4753 | */
|
|---|
| 4754 |
|
|---|
| 4755 | /*!
|
|---|
| 4756 | \fn void Phonon::Factory::registerFrontendObject(MediaNodePrivate *)
|
|---|
| 4757 | \internal
|
|---|
| 4758 | */
|
|---|
| 4759 |
|
|---|
| 4760 | /*!
|
|---|
| 4761 | \fn void Phonon::Factory::deregisterFrontendObject(MediaNodePrivate *)
|
|---|
| 4762 | \internal
|
|---|
| 4763 | */
|
|---|
| 4764 |
|
|---|
| 4765 | /*!
|
|---|
| 4766 | \fn void Phonon::Factory::setBackend(QObject *)
|
|---|
| 4767 | */
|
|---|
| 4768 |
|
|---|
| 4769 | /*!
|
|---|
| 4770 | \fn PlatformPlugin *Phonon::Factory::platformPlugin()
|
|---|
| 4771 | */
|
|---|
| 4772 |
|
|---|
| 4773 | /*!
|
|---|
| 4774 | /*!
|
|---|
| 4775 | \class Phonon::AbstractMediaStreamPrivate
|
|---|
| 4776 | \inmodule Phonon
|
|---|
| 4777 | \since 4.4
|
|---|
| 4778 | \internal
|
|---|
| 4779 | */
|
|---|
| 4780 |
|
|---|
| 4781 | /*!
|
|---|
| 4782 | \class Phonon::FrontendInterfacePrivate
|
|---|
| 4783 | \inmodule Phonon
|
|---|
| 4784 | \since 4.4
|
|---|
| 4785 | \internal
|
|---|
| 4786 | */
|
|---|
| 4787 |
|
|---|
| 4788 | /*!
|
|---|
| 4789 | \class Phonon::EffectWidgetPrivate
|
|---|
| 4790 | \inmodule Phonon
|
|---|
| 4791 | \since 4.4
|
|---|
| 4792 | \internal
|
|---|
| 4793 | */
|
|---|
| 4794 |
|
|---|
| 4795 | /*!
|
|---|
| 4796 | \class Phonon::IODeviceStream
|
|---|
| 4797 | \inmodule Phonon
|
|---|
| 4798 | \since 4.4
|
|---|
| 4799 | \internal
|
|---|
| 4800 | */
|
|---|
| 4801 |
|
|---|
| 4802 | /*!
|
|---|
| 4803 | \fn explicit Phonon::IODeviceStream::IODeviceStream(QIODevice *ioDevice, QObject *parent = 0)
|
|---|
| 4804 | \internal
|
|---|
| 4805 |
|
|---|
| 4806 | Creates a new IODeviceStream with the given \a ioDevice and \a
|
|---|
| 4807 | parent.
|
|---|
| 4808 |
|
|---|
| 4809 | */
|
|---|
| 4810 |
|
|---|
| 4811 | /*!
|
|---|
| 4812 | \fn Phonon::IODeviceStream::~IODeviceStream()
|
|---|
| 4813 | \internal
|
|---|
| 4814 | */
|
|---|
| 4815 |
|
|---|
| 4816 | /*!
|
|---|
| 4817 | \fn void Phonon::IODeviceStream::reset()
|
|---|
| 4818 | \internal
|
|---|
| 4819 | */
|
|---|
| 4820 |
|
|---|
| 4821 | /*!
|
|---|
| 4822 | \fn void Phonon::IODeviceStream::needData()
|
|---|
| 4823 | \internal
|
|---|
| 4824 | */
|
|---|
| 4825 |
|
|---|
| 4826 | /*!
|
|---|
| 4827 | \fn void Phonon::IODeviceStream::seekStream(qint64)
|
|---|
| 4828 | \internal
|
|---|
| 4829 | */
|
|---|
| 4830 |
|
|---|
| 4831 | /*!
|
|---|
| 4832 | \namespace Phonon::Platform
|
|---|
| 4833 | \inmodule Phonon
|
|---|
| 4834 | \internal
|
|---|
| 4835 | */
|
|---|
| 4836 |
|
|---|
| 4837 | /*!
|
|---|
| 4838 | \typedef Phonon::EffectDescriptionModel
|
|---|
| 4839 | \inmodule Phonon
|
|---|
| 4840 | \brief provides a item view model containing available audio effects.
|
|---|
| 4841 |
|
|---|
| 4842 | */
|
|---|
| 4843 |
|
|---|
| 4844 | /*!
|
|---|
| 4845 | \typedef Phonon::SubtitleDescription
|
|---|
| 4846 | \inmodule Phonon
|
|---|
| 4847 | \internal
|
|---|
| 4848 | */
|
|---|
| 4849 |
|
|---|
| 4850 | /*!
|
|---|
| 4851 | \typedef Phonon::SubtitleDescriptionModel
|
|---|
| 4852 | \inmodule Phonon
|
|---|
| 4853 | \internal
|
|---|
| 4854 | */
|
|---|
| 4855 |
|
|---|
| 4856 | /*!
|
|---|
| 4857 | \typedef Phonon::AudioChannelDescription
|
|---|
| 4858 | \inmodule Phonon
|
|---|
| 4859 | \internal
|
|---|
| 4860 | */
|
|---|
| 4861 |
|
|---|
| 4862 | /*!
|
|---|
| 4863 | \typedef Phonon::AudioChannelDescriptionModel
|
|---|
| 4864 | \inmodule Phonon
|
|---|
| 4865 | \internal
|
|---|
| 4866 | */
|
|---|
| 4867 |
|
|---|
| 4868 | /*!
|
|---|
| 4869 | \typedef Phonon::AudioCaptureDevice
|
|---|
| 4870 | \inmodule Phonon
|
|---|
| 4871 | \internal
|
|---|
| 4872 | */
|
|---|
| 4873 |
|
|---|
| 4874 | /*!
|
|---|
| 4875 | \typedef Phonon::AudioCaptureDeviceModel
|
|---|
| 4876 | \inmodule Phonon
|
|---|
| 4877 | \internal
|
|---|
| 4878 | */
|
|---|
| 4879 |
|
|---|
| 4880 | /*!
|
|---|
| 4881 | \typedef typedef void (*CleanUpFunction)()
|
|---|
| 4882 | \inmodule Phonon
|
|---|
| 4883 | \internal
|
|---|
| 4884 | */
|
|---|
| 4885 |
|
|---|
| 4886 | /*!
|
|---|
| 4887 | \typedef Phonon::QObjectPair
|
|---|
| 4888 | \inmodule Phonon
|
|---|
| 4889 | \since 4.4
|
|---|
| 4890 | \internal
|
|---|
| 4891 |
|
|---|
| 4892 | */
|
|---|
| 4893 |
|
|---|
| 4894 | /*!
|
|---|
| 4895 | \typedef Phonon::AudioOutputDeviceModel
|
|---|
| 4896 | \inmodule Phonon
|
|---|
| 4897 | \brief provides an item view model containing available audio output devices.
|
|---|
| 4898 |
|
|---|
| 4899 | */
|
|---|
| 4900 |
|
|---|
| 4901 | /*!
|
|---|
| 4902 | \fn uint Phonon::qHash(const Phonon::EffectParameter ¶m)
|
|---|
| 4903 | \internal
|
|---|
| 4904 |
|
|---|
| 4905 | */
|
|---|
| 4906 |
|
|---|
| 4907 | /*!
|
|---|
| 4908 | \fn Phonon::CleanUpGlobalStatic::~CleanUpGlobalStatic()
|
|---|
| 4909 | \internal
|
|---|
| 4910 | */
|
|---|
| 4911 |
|
|---|
| 4912 | /*!
|
|---|
| 4913 | \class Phonon::ConstIface
|
|---|
| 4914 | \inmodule Phonon
|
|---|
| 4915 | \since 4.4
|
|---|
| 4916 | \internal
|
|---|
| 4917 | */
|
|---|
| 4918 |
|
|---|
| 4919 | /*!
|
|---|
| 4920 | \class Phonon::CleanUpGlobalStatic
|
|---|
| 4921 | \inmodule Phonon
|
|---|
| 4922 | \since 4.4
|
|---|
| 4923 | \internal
|
|---|
| 4924 | */
|
|---|
| 4925 |
|
|---|
| 4926 | /*!
|
|---|
| 4927 | \class Phonon::EffectParameterPrivate
|
|---|
| 4928 | \inmodule Phonon
|
|---|
| 4929 | \since 4.4
|
|---|
| 4930 | \internal
|
|---|
| 4931 |
|
|---|
| 4932 | */
|
|---|
| 4933 |
|
|---|
| 4934 | /*!
|
|---|
| 4935 | \class Phonon::QSettingsGroup
|
|---|
| 4936 | \inmodule Phonon
|
|---|
| 4937 | \since 4.4
|
|---|
| 4938 | \internal
|
|---|
| 4939 |
|
|---|
| 4940 | */
|
|---|
| 4941 |
|
|---|
| 4942 | /*!
|
|---|
| 4943 | \class Phonon::MediaNodeDestructionHandler
|
|---|
| 4944 | \inmodule Phonon
|
|---|
| 4945 | \since 4.4
|
|---|
| 4946 | \internal
|
|---|
| 4947 |
|
|---|
| 4948 | */
|
|---|
| 4949 |
|
|---|
| 4950 | /*!
|
|---|
| 4951 | \fn Phonon::MediaNodeDestructionHandler::~MediaNodeDestructionHandler()
|
|---|
| 4952 | \internal
|
|---|
| 4953 | Called from Base::~Base if this object was registered
|
|---|
| 4954 | using BasePrivate::addDestructionHandler().
|
|---|
| 4955 | */
|
|---|
| 4956 |
|
|---|
| 4957 | /*!
|
|---|
| 4958 | \fn Phonon::MediaNodeDestructionHandler::phononObjectDestroyed(MediaNodePrivate *)
|
|---|
| 4959 | \internal
|
|---|
| 4960 | */
|
|---|
| 4961 |
|
|---|
| 4962 | /*!
|
|---|
| 4963 | \fn explicit Phonon::EffectWidget::EffectWidget(Effect *effect, QWidget *parent = 0)
|
|---|
| 4964 | \internal
|
|---|
| 4965 |
|
|---|
| 4966 | Constructs a new EffectWidget for the specified \a effect and with
|
|---|
| 4967 | the specified \a parent.
|
|---|
| 4968 | */
|
|---|
| 4969 |
|
|---|
| 4970 | /*!
|
|---|
| 4971 | \fn Phonon::EffectWidget::~EffectWidget()
|
|---|
| 4972 | \internal
|
|---|
| 4973 | */
|
|---|
| 4974 |
|
|---|
| 4975 | /*!
|
|---|
| 4976 | \fn QDebug Phonon::operator<<(QDebug s, const ObjectDescription<T> &o)
|
|---|
| 4977 | \internal
|
|---|
| 4978 | */
|
|---|
| 4979 |
|
|---|
| 4980 | /*!
|
|---|
| 4981 | \class Phonon::ListModelHelper
|
|---|
| 4982 | \inmodule Phonon
|
|---|
| 4983 | \since 4.4
|
|---|
| 4984 | \internal
|
|---|
| 4985 | */
|
|---|
| 4986 |
|
|---|
| 4987 | /*!
|
|---|
| 4988 | \class AudioOutputInterface42
|
|---|
| 4989 | \inmodule Phonon
|
|---|
| 4990 | \since 4.4
|
|---|
| 4991 | \internal
|
|---|
| 4992 | */
|
|---|
| 4993 |
|
|---|