• PySide 模块
  • PySide.phonon
  • 内容表

    上一话题

    Phonon.AbstractVideoOutput

    下一话题

    Phonon.AudioChannelDescription

    Phonon.Path

    概要

    函数

    详细描述

    The Path class describes connections between media nodes.

    In a media graph , Phonon.MediaNode s are connected by Paths. The multimedia travels in streams over these paths.

    You create a path between two media nodes using the static Phonon.createPath() function, which takes two nodes as arguments. The first argument will send the media stream to the second. Please refer to the class description of the individual media nodes and the Phonon 概述 to see which nodes can be connected to each other.

    Paths are also used to insert audio Phonon.Effect s between two media nodes. The effect will then alter the stream on the path. Notice that Phonon.Effect s also are media nodes, but that PySide.phonon.Phonon::Path.insertEffect() - instead of Phonon.createPath() - is used to insert them into the media graph.

    The following code example shows how to create a path between two media nodes and insert an effect on that path.

    <Code snippet "doc/src/snippets/code/doc_src_phonon-api.cpp:20" not found>
    									

    另请参阅

    Phonon.MediaNode Phonon.MediaObject Phonon.AudioOutput Phonon.VideoWidget Phonon Module

    class PySide.phonon.Phonon. Path
    class PySide.phonon.Phonon. Path ( arg__1 )
    参数: arg__1 PySide.phonon.Phonon::Path

    Creates an invalid path.

    You can still make it a valid path by calling reconnect. It is recommended to use the Phonon.createPath() function to create paths.

    另请参阅

    Phonon.createPath() PySide.phonon.Phonon::Path.isValid()

    Constructs a copy of the other path 指定。

    This constructor is fast thanks to explicit sharing.

    PySide.phonon.Phonon.Path. disconnectPath ( )
    返回类型: PySide.QtCore.bool

    Tries to disconnect the path from the MediaNodes it is connected to, returning true if successful or false if unsuccessful.

    If successful, the path is invalidated: PySide.phonon.Phonon::Path.isValid() will returns false.

    PySide.phonon.Phonon.Path. effects ( )
    返回类型:

    Returns a list of Effect objects that are currently used as effects. The order in the list determines the order the signal is sent through the effects.

    Returns A list with all current effects.

    另请参阅

    PySide.phonon.Phonon::Path.insertEffect() PySide.phonon.Phonon::Path.removeEffect()

    PySide.phonon.Phonon.Path. insertEffect ( newEffect [ , insertBefore=None ] )
    参数:
    • newEffect PySide.phonon.Phonon::Effect
    • insertBefore PySide.phonon.Phonon::Effect
    返回类型:

    PySide.QtCore.bool

    Inserts the given effect into the path before the effect specified by insertBefore and returns true if successful; otherwise returns false.

    insertBefore is zero, the effect is appended to the processing list.

    You may insert effects of the same class as often as you like, but if you insert the same object, the call will fail.

    effect will be inserted right before insertBefore 。若 insertBefore is 0 , the effect is appended at the end of the processing list. If the effect has not been inserted before the method will do nothing and return false .

    Returns whether the effect could be inserted at the specified position. If false is returned the effect was not inserted.

    另请参阅

    PySide.phonon.Phonon::Path.removeEffect() PySide.phonon.Phonon::Path.effects()

    PySide.phonon.Phonon.Path. insertEffect ( desc [ , insertBefore=None ] )
    参数:
    • desc PySide.phonon.Phonon::EffectDescription
    • insertBefore PySide.phonon.Phonon::Effect
    返回类型:

    PySide.phonon.Phonon::Effect

    Creates and inserts an effect into the path.

    You may insert effects of the same class as often as you like, but if you insert the same object, the call will fail.

    desc EffectDescription object for the effect to be inserted.

    If you already inserted an effect you can tell with insertBefore in which order the data gets processed. If this is 0 the effect is appended at the end of the processing list. If the effect has not been inserted before the method will do nothing and return false .

    Returns a pointer to the effect object if it could be inserted at the specified position. If 0 is returned, the effect was not inserted.

    Below is a code example for inserting an effect into a path:

    QList<Phonon::EffectDescription> effectDescriptions =
            Phonon::BackendCapabilities::availableAudioEffects();
    Phonon::EffectDescription effectDescription = effectDescriptions.at(4);
    Phonon::Path path = Phonon::createPath(mediaObject, audioOutput);
    Phonon::Effect *effect = new Phonon::Effect(effectDescription);
    path.insertEffect(effect);
    										

    另请参阅

    PySide.phonon.Phonon::Path.removeEffect() PySide.phonon.Phonon::Path.effects()

    PySide.phonon.Phonon.Path. isValid ( )
    返回类型: PySide.QtCore.bool

    A path is considered valid if it is connected to two media nodes, in which case this function returns true. If it is connected to one or no media nodes, it is consider invalid, and this function will then return false.

    PySide.phonon.Phonon.Path. __ne__ ( p )
    参数: p PySide.phonon.Phonon::Path
    返回类型: PySide.QtCore.bool

    Returns true if this Path is not equal to p ;否则返回 false。

    PySide.phonon.Phonon.Path. __eq__ ( p )
    参数: p PySide.phonon.Phonon::Path
    返回类型: PySide.QtCore.bool

    Returns true if this Path is equal to p ; otherwise returns false;

    PySide.phonon.Phonon.Path. reconnect ( source , sink )
    参数:
    • source PySide.phonon.Phonon::MediaNode
    • sink PySide.phonon.Phonon::MediaNode
    返回类型:

    PySide.QtCore.bool

    Changes the media nodes the path is connected to by connecting the path to the source and sink nodes specified. Returns true if successful; otherwise returns false.

    If unsuccessful, the path remains connected to the same nodes as before.

    另请参阅

    Phonon.createPath() Phonon Overview

    PySide.phonon.Phonon.Path. removeEffect ( effect )
    参数: effect PySide.phonon.Phonon::Effect
    返回类型: PySide.QtCore.bool

    移除给定 effect from the path and returns true; otherwise returns false.

    Removes an effect from the path.

    If the effect is deleted while it is still connected, the effect will be removed automatically.

    另请参阅

    PySide.phonon.Phonon::Path.insertEffect() PySide.phonon.Phonon::Path.effects()

    PySide.phonon.Phonon.Path. sink ( )
    返回类型: PySide.phonon.Phonon::MediaNode

    Returns the sink MediaNode used by the path.

    PySide.phonon.Phonon.Path. source ( )
    返回类型: PySide.phonon.Phonon::MediaNode

    Returns the source MediaNode used by the path.