#include <AVDemuxer.h>
Enumerator |
---|
AudioStream |
|
VideoStream |
|
SubtitleStream |
|
QtAV::AVDemuxer::AVDemuxer |
( |
QObject * |
parent = 0 | ) |
|
QtAV::AVDemuxer::~AVDemuxer |
( |
| ) |
|
bool QtAV::AVDemuxer::atEnd |
( |
| ) |
const |
AVCodecContext* QtAV::AVDemuxer::audioCodecContext |
( |
int |
stream = -1 | ) |
const |
int QtAV::AVDemuxer::audioStream |
( |
| ) |
const |
QList<int> QtAV::AVDemuxer::audioStreams |
( |
| ) |
const |
int QtAV::AVDemuxer::bitRate |
( |
| ) |
const |
int QtAV::AVDemuxer::currentStream |
( |
StreamType |
st | ) |
const |
qint64 QtAV::AVDemuxer::duration |
( |
| ) |
const |
qint64 QtAV::AVDemuxer::durationUs |
( |
| ) |
const |
QString QtAV::AVDemuxer::fileName |
( |
| ) |
const |
void QtAV::AVDemuxer::finished |
( |
| ) |
|
|
signal |
QString QtAV::AVDemuxer::formatForced |
( |
| ) |
const |
QString QtAV::AVDemuxer::formatLongName |
( |
| ) |
const |
QString QtAV::AVDemuxer::formatName |
( |
| ) |
const |
qreal QtAV::AVDemuxer::frameRate |
( |
| ) |
const |
qint64 QtAV::AVDemuxer::frames |
( |
int |
stream = -1 | ) |
const |
int QtAV::AVDemuxer::getInterruptStatus |
( |
| ) |
const |
getInterruptStatus return the interrupt status.
- Returns
- -1: interrupted by user 0: not interrupted >0: timeout value of AVError::ErrorCode
qint64 QtAV::AVDemuxer::getInterruptTimeout |
( |
| ) |
const |
getInterruptTimeout return the interrupt timeout
bool QtAV::AVDemuxer::hasAttacedPicture |
( |
| ) |
const |
QIODevice* QtAV::AVDemuxer::ioDevice |
( |
| ) |
const |
bool QtAV::AVDemuxer::isInterruptOnTimeout |
( |
| ) |
const |
bool QtAV::AVDemuxer::isLoaded |
( |
| ) |
const |
bool QtAV::AVDemuxer::isSeekable |
( |
| ) |
const |
bool QtAV::AVDemuxer::load |
( |
| ) |
|
void QtAV::AVDemuxer::loaded |
( |
| ) |
|
|
signal |
MediaIO* QtAV::AVDemuxer::mediaIO |
( |
| ) |
const |
not null for QIODevice, custom protocols
QVariantHash QtAV::AVDemuxer::options |
( |
| ) |
const |
Packet QtAV::AVDemuxer::packet |
( |
| ) |
const |
packet return the packet read by demuxer.
packet is invalid if readFrame() returns false.
bool QtAV::AVDemuxer::readFrame |
( |
| ) |
|
readFrame Read a packet from 1 of the streams.
use packet() to get the result packet. packet() returns last valid packet. So do not use packet() if readFrame() failed. Call readFrame() and seek() in the same thread.
- Returns
- true if no error. false if error occurs, eof reaches, interrupted by user or time out(getInterruptTimeout())
bool QtAV::AVDemuxer::seek |
( |
qint64 |
pos | ) |
|
seek seek to a given position.
Only support timestamp seek now. Experiment: if pos is out of range (>duration()), do nothing unless a seekable and variableSize MediaIO is used.
- Returns
- false if fail
bool QtAV::AVDemuxer::seek |
( |
qreal |
q | ) |
|
seek Percentage seek.
duration() must be >0LL
- Parameters
-
q | [0, 1] TODO: what if duration() is not valid but size is known? |
void QtAV::AVDemuxer::seekableChanged |
( |
| ) |
|
|
signal |
SeekType QtAV::AVDemuxer::seekType |
( |
| ) |
const |
SeekUnit QtAV::AVDemuxer::seekUnit |
( |
| ) |
const |
void QtAV::AVDemuxer::setFormat |
( |
const QString & |
fmt | ) |
|
setFormat Force the input format.
Useful if input stream is a raw video stream(fmt="rawvideo). formatForced() is reset if media changed. So you have to call setFormat() for every media you want to force the format. If AVFormatContext.format_whitelist contains only 1 format, then that format will be forced. For example, setOptions({"format_whitelist": "rawvideo"})
void QtAV::AVDemuxer::setInterruptOnTimeout |
( |
bool |
value | ) |
|
void QtAV::AVDemuxer::setInterruptStatus |
( |
int |
interrupt | ) |
|
setInterruptStatus set the interrupt status
- Parameters
-
interrupt | <0: abort current operation like loading and reading packets. 0: no interrupt |
void QtAV::AVDemuxer::setInterruptTimeout |
( |
qint64 |
timeout | ) |
|
setInterruptTimeout set the interrupt timeout
- Parameters
-
bool QtAV::AVDemuxer::setMedia |
( |
const QString & |
fileName | ) |
|
setMedia
- Returns
- whether the media source is changed
bool QtAV::AVDemuxer::setMedia |
( |
QIODevice * |
dev | ) |
|
bool QtAV::AVDemuxer::setMedia |
( |
MediaIO * |
in | ) |
|
void QtAV::AVDemuxer::setOptions |
( |
const QVariantHash & |
dict | ) |
|
setOptions libav's AVDictionary.
we can ignore the flags used in av_dict_xxx because we can use hash api. empty value does nothing to current context if it is open, but will change AVDictionary options to null in next open. AVDictionary is used in avformat_open_input() and will not change unless user call setOptions() If an option is not found
void QtAV::AVDemuxer::setSeekType |
( |
SeekType |
target | ) |
|
void QtAV::AVDemuxer::setSeekUnit |
( |
SeekUnit |
unit | ) |
|
bool QtAV::AVDemuxer::setStreamIndex |
( |
StreamType |
st, |
|
|
int |
index |
|
) |
| |
setStreamIndex Set stream by index in stream list.
call it after loaded. Stream/index will not change in next load() unless media source changed index < 0 is invalid
void QtAV::AVDemuxer::started |
( |
| ) |
|
|
signal |
qint64 QtAV::AVDemuxer::startTime |
( |
| ) |
const |
qint64 QtAV::AVDemuxer::startTimeUs |
( |
| ) |
const |
int QtAV::AVDemuxer::stream |
( |
| ) |
const |
QList<int> QtAV::AVDemuxer::streams |
( |
StreamType |
st | ) |
const |
AVCodecContext* QtAV::AVDemuxer::subtitleCodecContext |
( |
int |
stream = -1 | ) |
const |
int QtAV::AVDemuxer::subtitleStream |
( |
| ) |
const |
QList<int> QtAV::AVDemuxer::subtitleStreams |
( |
| ) |
const |
static const QStringList& QtAV::AVDemuxer::supportedExtensions |
( |
| ) |
|
|
static |
static const QStringList& QtAV::AVDemuxer::supportedFormats |
( |
| ) |
|
|
static |
static const QStringList& QtAV::AVDemuxer::supportedProtocols |
( |
| ) |
|
|
static |
Supported ffmpeg/libav input protocols(not complete). A static string list.
bool QtAV::AVDemuxer::unload |
( |
| ) |
|
void QtAV::AVDemuxer::unloaded |
( |
| ) |
|
|
signal |
void QtAV::AVDemuxer::userInterrupted |
( |
| ) |
|
|
signal |
AVCodecContext* QtAV::AVDemuxer::videoCodecContext |
( |
int |
stream = -1 | ) |
const |
int QtAV::AVDemuxer::videoStream |
( |
| ) |
const |
QList<int> QtAV::AVDemuxer::videoStreams |
( |
| ) |
const |
friend class InterruptHandler |
|
friend |
The documentation for this class was generated from the following file: