#include <MediaIO.h>
◆ AccessMode
◆ ~MediaIO()
virtual QtAV::MediaIO::~MediaIO |
( |
| ) |
|
|
virtual |
◆ MediaIO() [1/2]
◆ MediaIO() [2/2]
QtAV::MediaIO::MediaIO |
( |
QObject * |
parent = 0 | ) |
|
|
protected |
◆ accessMode()
◆ avioContext()
void* QtAV::MediaIO::avioContext |
( |
| ) |
|
◆ builtInNames()
static QStringList QtAV::MediaIO::builtInNames |
( |
| ) |
|
|
static |
◆ create() [1/2]
◆ create() [2/2]
static MediaIO* QtAV::MediaIO::create |
( |
const char * |
name | ) |
|
|
static |
◆ createForProtocol()
static MediaIO* QtAV::MediaIO::createForProtocol |
( |
const QString & |
protocol | ) |
|
|
static |
createForProtocol If an MediaIO subclass SomeInput.protocols() contains the protocol, return it's instance.
"QFile" input has protocols "qrc"(and empty "" means "qrc")
- Returns
- Null if none of registered MediaIO supports the protocol
◆ createForUrl()
static MediaIO* QtAV::MediaIO::createForUrl |
( |
const QString & |
url | ) |
|
|
static |
createForUrl Create a MediaIO and setUrl(url) if protocol of url is supported.
Example: MediaIO *qrc = MediaIO::createForUrl("qrc:/icon/test.mkv");
- Returns
- MediaIO instance with url set. Null if protocol is not supported.
◆ id()
static MediaIOId QtAV::MediaIO::id |
( |
const char * |
name | ) |
|
|
static |
◆ isSeekable()
virtual bool QtAV::MediaIO::isSeekable |
( |
| ) |
const |
|
pure virtual |
◆ isVariableSize()
virtual bool QtAV::MediaIO::isVariableSize |
( |
| ) |
const |
|
inlinevirtual |
isVariableSize Experiment: A hack for size() changes during playback.
If true, containers that estimate duration from pts(or bit rate) will get an invalid duration. Thus no eof get when the size of playback start reaches. So playback will not stop. Demuxer seeking should work for this case.
◆ isWritable()
virtual bool QtAV::MediaIO::isWritable |
( |
| ) |
const |
|
inlinevirtual |
◆ name() [1/2]
virtual QString QtAV::MediaIO::name |
( |
| ) |
const |
|
pure virtual |
◆ name() [2/2]
static const char* QtAV::MediaIO::name |
( |
MediaIOId |
id | ) |
|
|
static |
◆ next()
next
- Parameters
-
id | NULL to get the first id address |
- Returns
- address of id or NULL if not found/end
◆ onUrlChanged()
virtual void QtAV::MediaIO::onUrlChanged |
( |
| ) |
|
|
protectedvirtual |
onUrlChanged Here you can close old url, parse new url() and open it
◆ position()
virtual qint64 QtAV::MediaIO::position |
( |
| ) |
const |
|
pure virtual |
position MUST implement this.
Used in seek TODO: implement internally by default
◆ protocols()
virtual const QStringList& QtAV::MediaIO::protocols |
( |
| ) |
const |
|
virtual |
supported protocols. default is empty
◆ read()
virtual qint64 QtAV::MediaIO::read |
( |
char * |
data, |
|
|
qint64 |
maxSize |
|
) |
| |
|
pure virtual |
read read at most maxSize bytes to data, and return the bytes were actually read
◆ Register()
template<class C >
static bool QtAV::MediaIO::Register |
( |
MediaIOId |
id, |
|
|
const char * |
name |
|
) |
| |
|
inlinestatic |
◆ registerAll()
static void QtAV::MediaIO::registerAll |
( |
| ) |
|
|
static |
◆ release()
void QtAV::MediaIO::release |
( |
| ) |
|
◆ seek()
virtual bool QtAV::MediaIO::seek |
( |
qint64 |
offset, |
|
|
int |
from = SEEK_SET |
|
) |
| |
|
pure virtual |
seek
- Parameters
-
from | SEEK_SET, SEEK_CUR and SEEK_END from stdio.h |
- Returns
- true if success
◆ setAccessMode()
bool QtAV::MediaIO::setAccessMode |
( |
AccessMode |
value | ) |
|
setAccessMode A MediaIO instance can be 1 mode, Read (default) or Write.
If !isWritable(), then set to Write will fail and mode does not change Call it before any function!
- Returns
- false if set failed
◆ setUrl()
void QtAV::MediaIO::setUrl |
( |
const QString & |
url = QString() | ) |
|
setUrl onUrlChange() will be called if url is different.
onUrlChange() will close the old url and open the new url if it's not empty
- Parameters
-
◆ size()
virtual qint64 QtAV::MediaIO::size |
( |
| ) |
const |
|
pure virtual |
size
- Returns
- <=0 if not support
◆ url()
QString QtAV::MediaIO::url |
( |
| ) |
const |
◆ write()
virtual qint64 QtAV::MediaIO::write |
( |
const char * |
data, |
|
|
qint64 |
maxSize |
|
) |
| |
|
inlinevirtual |
write write at most maxSize bytes from data, and return the bytes were actually written
The documentation for this class was generated from the following file: