内容表

上一话题

QMediaNetworkAccessControl

下一话题

QMediaPlayer

QMediaObject

QMediaObject class provides a common base for multimedia objects. 更多

Inheritance diagram of PySide2.QtMultimedia.QMediaObject

继承者: QAudioDecoder , QCamera , QMediaPlayer , QRadioTuner

概要

虚函数

信号

详细描述

It provides some basic functionality that is common to other high level classes like QMediaPlayer , QAudioDecoder and QCamera , including availability and meta-data functionality, as well as functionality to connect media objects with support classes like QMediaPlaylist .

The higher level QMediaObject derived classes provide the actual multimedia functionality, by internally using a QMediaService . Each media object hosts a QMediaService and uses the QMediaControl interfaces implemented by the service to implement its API. These controls can be accessed from the media object if necessary, but in general the useful functionality can be accessed from the higher level classes.

Most media objects when constructed will request a new QMediaService instance, but some like QMediaRecorder and QAudioRecorder will share a service with another object.

class QMediaObject ( parent , service )
param parent

QObject

param service

QMediaService

Constructs a media object which uses the functionality provided by a media service .

parent 会被传递给 QObject .

This class is meant as a base class for multimedia objects so this constructor is protected.

PySide2.QtMultimedia.QMediaObject. addPropertyWatch ( name )
参数

name QByteArray

Watch the property name . The property’s notify signal will be emitted once every notifyInterval 毫秒。

另请参阅

notifyInterval

PySide2.QtMultimedia.QMediaObject. availability ( )
返回类型

AvailabilityStatus

Returns the availability of the functionality offered by this object.

In some cases the functionality may not be available (for example, if the current operating system or platform does not provide the required functionality), or it may be temporarily unavailable (for example, audio playback during a phone call or similar).

PySide2.QtMultimedia.QMediaObject. availabilityChanged ( availability )
参数

availability AvailabilityStatus

PySide2.QtMultimedia.QMediaObject. availabilityChanged ( available )
参数

available bool

PySide2.QtMultimedia.QMediaObject. availableMetaData ( )
返回类型

字符串列表

返回元数据的可用键列表。

PySide2.QtMultimedia.QMediaObject. bind ( arg__1 )
参数

arg__1 QObject

返回类型

bool

绑定 object 到此 QMediaObject 实例。

This method establishes a relationship between this media object and a helper object. The nature of the relationship depends on both parties. This methods returns true if the helper was successfully bound, false otherwise.

大多数子类化的 QMediaObject provide more convenient functions that wrap this functionality, so this function rarely needs to be called directly.

The object passed must implement the QMediaBindableInterface 接口。

PySide2.QtMultimedia.QMediaObject. isAvailable ( )
返回类型

bool

Returns true if the service is available for use.

PySide2.QtMultimedia.QMediaObject. isMetaDataAvailable ( )
返回类型

bool

Returns true if there is meta-data associated with this media object, else false.

PySide2.QtMultimedia.QMediaObject. metaData ( key )
参数

key – unicode

返回类型

object

返回的值关联元数据 key .

见预定义列表 元数据键 .

PySide2.QtMultimedia.QMediaObject. metaDataAvailableChanged ( available )
参数

available bool

PySide2.QtMultimedia.QMediaObject. metaDataChanged ( )
PySide2.QtMultimedia.QMediaObject. metaDataChanged ( key , value )
参数
  • key – unicode

  • value – object

PySide2.QtMultimedia.QMediaObject. notifyInterval ( )
返回类型

int

PySide2.QtMultimedia.QMediaObject. notifyIntervalChanged ( milliSeconds )
参数

milliSeconds int

PySide2.QtMultimedia.QMediaObject. removePropertyWatch ( name )
参数

name QByteArray

Remove property name from the list of properties whose changes are regularly signaled.

另请参阅

notifyInterval

PySide2.QtMultimedia.QMediaObject. service ( )
返回类型

QMediaService

Returns the media service that provides the functionality of this multimedia object.

PySide2.QtMultimedia.QMediaObject. setNotifyInterval ( milliSeconds )
参数

milliSeconds int

另请参阅

notifyInterval()

PySide2.QtMultimedia.QMediaObject. unbind ( arg__1 )
参数

arg__1 QObject

Detach object QMediaObject 实例。

Unbind the helper object from this media object. A warning will be generated if the object was not previously bound to this object.