QMediaObject¶
The
QMediaObject
class provides a common base for multimedia objects. More…
Inherited by: QAudioDecoder, QCamera, QMediaPlayer, QRadioTuner
Synopsis¶
Functions¶
def
addPropertyWatch
(name)def
availableMetaData
()def
isMetaDataAvailable
()def
metaData
(key)def
notifyInterval
()def
removePropertyWatch
(name)def
setNotifyInterval
(milliSeconds)
Virtual functions¶
def
availability
()def
bind
(arg__1)def
isAvailable
()def
service
()def
unbind
(arg__1)
Signals¶
def
availabilityChanged
(availability)def
availabilityChanged
(available)def
metaDataAvailableChanged
(available)def
metaDataChanged
()def
metaDataChanged
(key, value)def
notifyIntervalChanged
(milliSeconds)
Detailed Description¶
It provides some basic functionality that is common to other high level classes like
QMediaPlayer
,QAudioDecoder
andQCamera
, including availability and meta-data functionality, as well as functionality to connect media objects with support classes likeQMediaPlaylist
.The higher level
QMediaObject
derived classes provide the actual multimedia functionality, by internally using aQMediaService
. Each media object hosts aQMediaService
and uses theQMediaControl
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 likeQMediaRecorder
andQAudioRecorder
will share a service with another object.See also
-
class
QMediaObject
(parent, service)¶ - param parent
QObject
- param service
Constructs a media object which uses the functionality provided by a media
service
.The
parent
is passed toQObject
.This class is meant as a base class for multimedia objects so this constructor is protected.
-
PySide2.QtMultimedia.QMediaObject.
addPropertyWatch
(name)¶ - Parameters
name –
QByteArray
Watch the property
name
. The property’s notify signal will be emitted once everynotifyInterval
milliseconds.See also
-
PySide2.QtMultimedia.QMediaObject.
availability
()¶ - Return type
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)¶ - Parameters
availability –
AvailabilityStatus
-
PySide2.QtMultimedia.QMediaObject.
availabilityChanged
(available) - Parameters
available –
bool
-
PySide2.QtMultimedia.QMediaObject.
availableMetaData
()¶ - Return type
list of strings
Returns a list of keys there is meta-data available for.
-
PySide2.QtMultimedia.QMediaObject.
bind
(arg__1)¶ - Parameters
arg__1 –
QObject
- Return type
bool
Bind
object
to thisQMediaObject
instance.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.
Most subclasses of
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
interface.See also
-
PySide2.QtMultimedia.QMediaObject.
isAvailable
()¶ - Return type
bool
Returns true if the service is available for use.
-
PySide2.QtMultimedia.QMediaObject.
isMetaDataAvailable
()¶ - Return type
bool
Returns true if there is meta-data associated with this media object, else false.
-
PySide2.QtMultimedia.QMediaObject.
metaData
(key)¶ - Parameters
key – unicode
- Return type
object
Returns the value associated with a meta-data
key
.See the list of predefined meta-data keys .
-
PySide2.QtMultimedia.QMediaObject.
metaDataAvailableChanged
(available)¶ - Parameters
available –
bool
-
PySide2.QtMultimedia.QMediaObject.
metaDataChanged
()¶
-
PySide2.QtMultimedia.QMediaObject.
metaDataChanged
(key, value) - Parameters
key – unicode
value – object
-
PySide2.QtMultimedia.QMediaObject.
notifyInterval
()¶ - Return type
int
See also
-
PySide2.QtMultimedia.QMediaObject.
notifyIntervalChanged
(milliSeconds)¶ - Parameters
milliSeconds –
int
-
PySide2.QtMultimedia.QMediaObject.
removePropertyWatch
(name)¶ - Parameters
name –
QByteArray
Remove property
name
from the list of properties whose changes are regularly signaled.See also
-
PySide2.QtMultimedia.QMediaObject.
service
()¶ - Return type
Returns the media service that provides the functionality of this multimedia object.
-
PySide2.QtMultimedia.QMediaObject.
setNotifyInterval
(milliSeconds)¶ - Parameters
milliSeconds –
int
See also
-
PySide2.QtMultimedia.QMediaObject.
unbind
(arg__1)¶ - Parameters
arg__1 –
QObject
Detach
object
from theQMediaObject
instance.Unbind the helper object from this media object. A warning will be generated if the object was not previously bound to this object.
See also
© 2018 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 the GNU 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.