QMediaObjectclass provides a common base for multimedia objects. 更多 …
继承者: QAudioDecoder , QCamera , QMediaPlayer , QRadioTuner
def
addPropertyWatch
(name)
def
availableMetaData
()
def
isMetaDataAvailable
()
def
metaData
(key)
def
notifyInterval
()
def
removePropertyWatch
(name)
def
setNotifyInterval
(milliSeconds)
def
availability
()
def
bind
(arg__1)
def
isAvailable
()
def
service
()
def
unbind
(arg__1)
def
availabilityChanged
(availability)
def
availabilityChanged
(available)
def
metaDataAvailableChanged
(available)
def
metaDataChanged
()
def
metaDataChanged
(key, value)
def
notifyIntervalChanged
(milliSeconds)
It provides some basic functionality that is common to other high level classes like
QMediaPlayer,QAudioDecoderandQCamera, including availability and meta-data functionality, as well as functionality to connect media objects with support classes likeQMediaPlaylist.The higher level
QMediaObjectderived classes provide the actual multimedia functionality, by internally using aQMediaService. Each media object hosts aQMediaServiceand uses theQMediaControlinterfaces 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
QMediaServiceinstance, but some likeQMediaRecorderandQAudioRecorderwill share a service with another object.
QMediaObject
(
parent
,
service
)
¶
- param parent
QObject- param service
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
毫秒。
另请参阅
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.
另请参阅
PySide2.QtMultimedia.QMediaObject.
service
(
)
¶
Returns the media service that provides the functionality of this multimedia object.
PySide2.QtMultimedia.QMediaObject.
setNotifyInterval
(
milliSeconds
)
¶
milliSeconds
–
int
另请参阅
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.