Phonon::AbstractMediaStream
#include <phonon/AbstractMediaStream>
Protected Attributes | |
QScopedPointer< AbstractMediaStreamPrivate > | d_ptr |
Detailed Description
Base class for custom media data streams.
Implement this class to provide a custom data stream to the backend. The class supports both, the push and the pull model.
Push:
Pull:
Definition at line 101 of file abstractmediastream.h.
Constructor & Destructor Documentation
◆ ~AbstractMediaStream()
|
override |
Definition at line 49 of file abstractmediastream.cpp.
◆ AbstractMediaStream() [1/2]
Constructs an AbstractMediaStream object with a parent
.
Definition at line 35 of file abstractmediastream.cpp.
◆ AbstractMediaStream() [2/2]
|
protected |
Definition at line 42 of file abstractmediastream.cpp.
Member Function Documentation
◆ endOfData()
|
protected |
Tells the backend that the media data stream is at its end.
- Warning
- Don't call this function before the first needData() is emitted.
Definition at line 103 of file abstractmediastream.cpp.
◆ enoughData()
|
protectedvirtual |
Reimplement this function to be notified when the backend has enough data and your stream object may take a break.
This method is important for pushing data to the backend in order to not fill the backend buffer unnecessarily.
Definition at line 126 of file abstractmediastream.cpp.
◆ error()
|
protected |
If an I/O error occurs you should call this function to make MediaObject go into ErrorState.
Definition at line 115 of file abstractmediastream.cpp.
◆ needData()
|
protectedpure virtual |
Reimplement this function to be notified when the backend needs data.
When this function is called you should try to call writeData or endOfData before returning.
◆ reset()
|
protectedpure virtual |
Reimplement this function to reset the stream.
Subsequent calls to writeData should start from the first position of the data unless a seek is requested.
The function is necessary for the case where a non-seekable MediaStream is played more than once. For a seekable stream the implementation can simply call
.
◆ seekStream()
Reimplement this function if your stream is seekable.
When this function is called the next call to writeData has to be at the requested offset
.
- Warning
- Do not call the parent implementation.
Definition at line 130 of file abstractmediastream.cpp.
◆ setStreamSeekable()
|
protected |
Sets whether your data stream is seekable.
Defaults to false
.
If you set this to true
you have to implement the seekStream function.
Definition at line 76 of file abstractmediastream.cpp.
◆ setStreamSize()
Sets the size of the stream in number of bytes.
A negative value means that the length of the stream cannot be known.
Defaults to 0.
This function has to be called. A backend will not call needData() until the stream size is set.
Definition at line 58 of file abstractmediastream.cpp.
◆ streamSeekable()
|
protected |
Returns whether your data stream is set as seekable.
Defaults to false
.
Definition at line 71 of file abstractmediastream.cpp.
◆ streamSize()
|
protected |
Returns the stream size that was set with setStreamSize.
A negative value means that the length of the stream cannot be known.
Defaults to 0
.
Definition at line 53 of file abstractmediastream.cpp.
◆ writeData()
|
protected |
Sends the media data
to the backend for decoding.
- Warning
- Don't call this function before the first needData() is emitted.
Definition at line 89 of file abstractmediastream.cpp.
Member Data Documentation
◆ d_ptr
|
protected |
Definition at line 215 of file abstractmediastream.h.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:20:24 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.