Movatterモバイル変換


[0]ホーム

URL:


We bake cookies in your browser for a better experience. Using this site means that you consent.Read More

Menu

Qt Documentation

Phonon Namespace

The Phonon namespace contains classes and functions for multimedia applications.More...

Header:#include <Phonon>
Since: Qt 4.4

    Namespaces

    Classes

    Types

    typedefAudioOutputDevice
    typedefAudioOutputDeviceModel
    enumCategory { NoCategory, NotificationCategory, MusicCategory, VideoCategory, CommunicationCategory, GameCategory }
    enumDiscType { NoDisc, Cd, Dvd, Vcd }
    typedefEffectDescription
    typedefEffectDescriptionModel
    enumErrorType { NoError, NormalError, FatalError }
    enumMetaData { ArtistMetaData, AlbumMetaData, TitleMetaData, DateMetaData, ..., MusicBrainzDiscIdMetaData }
    enumObjectDescriptionType { AudioOutputDeviceType, EffectType }
    enumState { LoadingState, StoppedState, PlayingState, BufferingState, PausedState, ErrorState }
    typedefVideoWidgetInterfaceLatest

    Functions

    QStringcategoryToString(Category c)
    PathcreatePath(MediaNode * source, MediaNode * sink)
    MediaObject *createPlayer(Phonon::Category category, const MediaSource & source = MediaSource())
    const char *phononVersion()

    Detailed Description

    The Phonon namespace contains classes and functions for multimedia applications.

    This namespace contains classes to access multimedia functions for audio and video playback. Those classes are not dependent on any specific framework, but rather use exchangeable backends to do the work.

    See thePhonon Module page for general information about the framework and thePhonon Overview for an introductory tour of its features.

    Namespaces

    namespace Phonon::BackendCapabilities

    TheBackendCapabilities namespace contains functions to describe the capabilities of the multimedia backend.

    This namespace was introduced in Qt 4.4.

    Classes

    classAudioDataOutput

    TheAudioDataOutput class provides access to audio data.More...

    classAudioOutput

    TheAudioOutput class is used to send data to audio output devices.More...

    classEffect

    The Effect class is used to transform audio streams.More...

    classEffectParameter

    TheEffectParameter class describes one parameter of an effect.More...

    classEffectWidget

    TheEffectWidget class provides a widget to control the parameters of an Effect.More...

    classMediaController

    TheMediaController class controls optional features of a media file/device.More...

    classMediaNode

    TheMediaNode class is the base class for all nodes in a media graph.More...

    classMediaObject

    TheMediaObject class provides an interface for media playback.More...

    classMediaSource

    TheMediaSource class provides multimedia data for media objects.More...

    classObjectDescription

    TheObjectDescription class provides information about Phonon objects.More...

    classPath

    The Path class describes connections between media nodes.More...

    classSeekSlider

    TheSeekSlider class provides a slider for seeking to positions in media streams.More...

    classVideoPlayer

    TheVideoPlayer widget is used to perform playback of video.More...

    classVideoWidget

    TheVideoWidget class provides a widget that is used to display video.More...

    classVideoWidgetInterface44

    classVolumeSlider

    TheVolumeSlider widget provides a slider that is used to control the volume of an audio output device.More...

    Type Documentation

    typedef Phonon::AudioOutputDevice

    This typedef ofObjectDescription describes an audio output device, such as soundcards (with different drivers), sound servers, or other virtual outputs like playback on a different computer on the network.

    A list of available devices is given by the backend with Backendcapabilities::availableAudioOutputDevices()

    QList<Phonon::AudioOutputDevice> audioOutputDevices=            Phonon::BackendCapabilities::availableAudioOutputDevices();

    typedef Phonon::AudioOutputDeviceModel

    provides an item view model containing available audio output devices.

    enum Phonon::Category

    Sets the category your program should be listed in in the mixer.

    ConstantValueDescription
    Phonon::NoCategory-1Will make use of the default device.
    Phonon::NotificationCategory0If the sounds produced are notifications (ping, beep and such) you should use this category.
    Phonon::MusicCategory1If your application is a music player (like a jukebox or media player playing an audio file).
    Phonon::VideoCategory2If the sound is the audio channel of a video.
    Phonon::CommunicationCategory3If your applications produces sounds from communication with somebody else (VoIP, voice chat).
    Phonon::GameCategory4Sound produced by a computer game should go into this category.
    Phonon::AccessibilityCategory5Sounds produced for accessibility (e.g., Text-To-Speech) Holds the largest value of categories.

    A Jukebox will set this to Music, a VoIP program to Communication, a DVD player to video, and so on.

    Note:These categories can also become useful for an application that controls the volumes automatically, like turning down the music when a call comes in, or turning down the notifications when the media player knows it's playing classical music.

    enum Phonon::DiscType

    Enum to identify the media discs supported byMediaObject.

    ConstantValueDescription
    Phonon::NoDisc-1No disc was selected. This is only useful as a return value from MediaSource::diskType().
    Phonon::Cd0Identifies Audio CDs.
    Phonon::Dvd1Identifies DVDs (not arbitrary data DVDs, only movie DVDs).
    Phonon::Vcd2Identifies Video CDs.

    See alsoMediaSource andMediaObject.

    typedef Phonon::EffectDescription

    EffectDescription gives a description of anaudio effect. It is a typedef of theObjectDescription class. Please see its class description for details.

    EffectDescription is used to create audioEffects, which can be inserted into a media graph, altering an audio stream.

    See alsoPhonon::ObjectDescription,Capabilities Example, andMedia Player.

    typedef Phonon::EffectDescriptionModel

    provides a item view model containing available audio effects.

    enum Phonon::ErrorType

    This enum describes the severity when an error has occurred during playback.

    After a media object has entered theErrorState, one can query the type of error from MediaObject::errorType(). Note that you should query the error when receiving the MediaObject::stateChanged() signal, because the error type will be lost if the media object leaves the error state.

    ConstantValueDescription
    Phonon::NoError0No error.MediaObject::errorType() returns this ifMediaObject::state() !=Phonon::ErrorState.
    Phonon::NormalError1An error has occurred with the playback of the current source. It might be possible to continue playback, for instance, if only the audio stream in a video cannot be played back. The media object will then leave the error state again.
    Phonon::FatalError2. Something important does not work. Your program cannot continue the playback of the current source, but it might be possible to try another.

    See alsoMediaObject::errorType().

    enum Phonon::MetaData

    Provided as keys for Phonon::MediaObject::metaData(). The enum values matches strings defined in the Ogg Vorbis specification

    ConstantValue
    Phonon::ArtistMetaData0
    Phonon::AlbumMetaData1
    Phonon::TitleMetaData2
    Phonon::DateMetaData3
    Phonon::GenreMetaData4
    Phonon::TracknumberMetaData5
    Phonon::DescriptionMetaData6
    Phonon::MusicBrainzDiscIdMetaData7

    enum Phonon::ObjectDescriptionType

    This enum defines the type of information that is contained in aObjectDescription object.

    ConstantValueDescription
    Phonon::AudioOutputDeviceType0An audio output device (AudioOutputDevice). This can be soundcards (with different drivers), sound servers, or other virtual outputs like playback on a different computer on the network.
    Phonon::EffectType1An audio effect (EffectDescription).

    enum Phonon::State

    The state enum describes the different states a media object can take. Several functions ofMediaObject are asynchronous, so even if a you have requested a state change through a function call, e.g., through play(), you cannot be sure that the change has taken place before you receive the stateChanged() signal.

    A media object can at any time change into any state, regardless of the state it previously had.

    ConstantValueDescription
    Phonon::LoadingState0After construction it might take a while before the media object is ready to play(). This state is commonly used by backends to initialize themedia graph and loading the source. When the object leaves the loading state, it will enter the StoppedState unless an error occurred or another state is requested through a function call, e.g., MediaObject::play().
    Phonon::StoppedState1In the stopped state, the media object is ready to play its current media source. The currentposition in the media stream is then 0.
    Phonon::PlayingState2The media object is playing back its media source.
    Phonon::BufferingState3The Player is waiting for data to be able to start or continue playing. This state is commonly used to wait for media data over a network connection.
    Phonon::PausedState4The media player has currently paused its playback, i.e., it stops playing but keeps the current playback position in the stream.
    Phonon::ErrorState5When a media object enters the error state a problem with the playback has occurred. The possible errors are grouped into two categories byPhonon::ErrorType, and the type can be queried through errorType(). AFatalError implies that the playback cannot continue, but one can still try with a new media source. With aNormalError it might be possible to continue playback, and a media object may therefore change state from the ErrorState.

    This enum was introduced or modified in Qt 4.4.

    See alsoMediaObject.

    typedef Phonon::VideoWidgetInterfaceLatest

    This typedef was introduced in Qt 4.7.

    Function Documentation

    QString Phonon::categoryToString(Category c)

    Returns a (translated) string to show to the user identifying the given Category (c).

    Path Phonon::createPath(MediaNode * source,MediaNode * sink)

    Creates a new Path connecting the two MediaNodessource andsink.

    The implementation will automatically select the right format and media type. E.g. connecting aMediaObject andAudioOutput will create a Path object connecting the audio. This might be represented as PCM or perhaps even AC3 depending on theAudioOutput object.

    source TheMediaNode to connect an output fromsink TheMediaNode to connect to.

    MediaObject * Phonon::createPlayer(Phonon::Category category, constMediaSource & source = MediaSource())

    Convenience function to create aMediaObject andAudioOutput connected by a path. TheMediaObject return will havesource set as its current source and the specifiedcategory.

    constchar * Phonon::phononVersion()

    Returns the Phonon version.

    This function was introduced in Qt 4.5.

    © 2016 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of theGNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.


    [8]ページ先頭

    ©2009-2025 Movatter.jp