MultiVideoDemuxer pre-registered with every container format this library ships a demuxer for: DemuxerAVI (RIFF/AVI, AudioCodecs/ContainerAVI.h), DemuxerMP4 (ISO base media/MP4, AudioCodecs/ContainerMP4.h), DemuxerMPG (MPEG Program Stream, AudioCodecs/ContainerMPG.h) - drop it in wherever a plain Demuxer& is expected (VideoPlayer in fact uses one internally as its own built-in demuxer) and it self-selects the right one from the stream's own container signature instead of the caller having to know the file format up front. Use the plain MultiVideoDemuxer (MultiVideoDemuxer.h) instead if you don't want all three container parsers pulled in unconditionally - register only what your content actually needs via its own addDemuxer().
More...
#include <MultiVideoDemuxerFull.h>
|
| int | id |
| | custom id to be used by application
|
| |
MultiVideoDemuxer pre-registered with every container format this library ships a demuxer for: DemuxerAVI (RIFF/AVI, AudioCodecs/ContainerAVI.h), DemuxerMP4 (ISO base media/MP4, AudioCodecs/ContainerMP4.h), DemuxerMPG (MPEG Program Stream, AudioCodecs/ContainerMPG.h) - drop it in wherever a plain Demuxer& is expected (VideoPlayer in fact uses one internally as its own built-in demuxer) and it self-selects the right one from the stream's own container signature instead of the caller having to know the file format up front. Use the plain MultiVideoDemuxer (MultiVideoDemuxer.h) instead if you don't want all three container parsers pulled in unconditionally - register only what your content actually needs via its own addDemuxer().
Unlike MultiVideoDecoderFull's codecs, none of DemuxerAVI/DemuxerMP4/ DemuxerMPG wrap an external codec library - all three are pure parsing code within this library itself, so this header adds no additional third-party dependency beyond what MultiVideoDemuxer.h already needs.
- Author
- Phil Schatzmann
- Copyright
- GPLv3
◆ MultiVideoDemuxerFull()
◆ addDemuxer()
| void addDemuxer |
( |
Demuxer & |
demuxer | ) |
|
|
inlineinherited |
Registers a demuxer under its own Demuxer::mimeVideo() - see the class comment for when/how it's later selected (content-sniffing via its own Demuxer::isValid()). Call before the first write() reaches this object.
Replaces, rather than adds to, any demuxer already registered under the same mimeVideo() - at most one entry per container format, for the same reason MultiVideoDecoder::addDecoder() does: a stale second entry for the same format would otherwise be permanently unreachable dead weight, never actually selected.
◆ addNotifyAudioChange()
Adds target to be notified about audio changes.
Reimplemented in CodecNOP, EncodedAudioOutput, EncodedAudioStream, AACDecoderFDK, DecoderBasic, CodecChain, MP3DecoderHelix, MP3DecoderMAD, OggContainerDecoder, RTSPClient< TcpClient, UdpSocket >, Pipeline, and Pipeline::ModifyingStreamAdapter.
◆ audioInfo()
|
|
inlineoverridevirtualinherited |
provides the actual input AudioInfo
Implements AudioInfoSupport.
Reimplemented in CodecNOP, DecoderBasic, DSFDecoder, MP3DecoderHelix, MP3DecoderMAD, OpusAudioDecoder, OpusMultiStreamAudioDecoder, VorbisDecoder, WAVDecoder, WavIMADecoder, OggContainerDecoder, and VorbisDecoder.
◆ audioInfoOut()
provides the actual output AudioInfo: this is usually the same as audioInfo() unless we use a transforming stream
Reimplemented in MP3EncoderShine, PureDataStream, PWMAudioOutput< PWMDriverT >, ChannelFormatConverterStreamT< T >, ChannelFormatConverterStream, NumberFormatConverterStreamT< TFrom, TTo >, NumberFormatConverterStream, FormatConverterStream, Pipeline, ResampleStream, ResampleStreamT< TInterpolator >, and SupportedRatesStream.
◆ begin() [1/2]
|
|
inlineoverridevirtualinherited |
Defers actual demuxer init to the first write() (see class comment)
Reimplemented from AudioDecoder.
◆ begin() [2/2]
|
|
inlineoverridevirtualinherited |
◆ clearNotifyAudioChange()
| virtual void clearNotifyAudioChange |
( |
| ) |
|
|
inlinevirtualinherited |
◆ end()
|
|
inlineoverridevirtualinherited |
◆ getAudioInfo()
|
|
inlineoverridevirtualinherited |
◆ getOutput()
◆ getVideoInfo()
|
|
inlineoverridevirtualinherited |
Common video info of the currently selected demuxer - an empty VideoInfo before the first write()/if none matched.
Implements Demuxer.
◆ isNotifyActive()
Checks if the automatic AudioInfo update is active.
◆ isValid()
| virtual bool isValid |
( |
const uint8_t * |
data, |
|
|
size_t |
len |
|
) |
| |
|
inlinevirtualinherited |
True if data (the start of the stream, as handed to the first write()) looks like this demuxer's own container format - content-sniffing, not a guarantee (see the concrete class for exactly what's checked). Used by MultiVideoDemuxer to auto-select a registered demuxer (MultiVideoDemuxer.h); not otherwise part of the write()/parse path. Default false, matching VideoDecoder::isValid()'s own default - a demuxer not meant to be auto-detected this way simply never overrides it.
Reimplemented in DemuxerAVI, DemuxerMP4, and DemuxerMPG.
◆ mime()
|
|
inlineoverridevirtualinherited |
The audio MIME type of the currently selected demuxer's audio track
- see Demuxer::mime(). nullptr before the first write()/if none matched, or (depending on the concrete demuxer) until enough of the audio track's own metadata has been parsed.
Implements Demuxer.
◆ mimeVideo()
| const char * mimeVideo |
( |
| ) |
|
|
inlineoverridevirtualinherited |
The container MIME type of the currently selected demuxer (e.g. "video/avi") - nullptr before the first write()/if none matched.
Implements Demuxer.
◆ notifyAudioChange()
◆ operator bool()
|
|
inlineoverridevirtualinherited |
◆ removeNotifyAudioChange()
◆ select()
◆ selectedDemuxer()
| Demuxer * selectedDemuxer |
( |
| ) |
const |
|
inlineinherited |
The demuxer detection picked for the current stream - nullptr before the first write(), or if none matched.
◆ setAudioInfo()
|
|
inlineoverridevirtualinherited |
◆ setCodecConfig()
| virtual bool setCodecConfig |
( |
const uint8_t * |
data, |
|
|
size_t |
len |
|
) |
| |
|
inlinevirtualinherited |
Some decoders need e.g. a magic cookie to provide the relevant info for decoding.
Reimplemented in DecoderALAC, and MultiDecoder.
◆ setNotifyActive()
| void setNotifyActive |
( |
bool |
flag | ) |
|
|
inlineinherited |
Deactivate/Reactivate automatic AudioInfo updates: (default is active)
◆ setOutput() [1/3]
◆ setOutput() [2/3]
◆ setOutput() [3/3]
| void setOutput |
( |
Print & |
out | ) |
|
|
inlineoverridevirtualinherited |
◆ setOutputAudio()
| void setOutputAudio |
( |
Print & |
out | ) |
|
|
inlineoverridevirtualinherited |
Defines the audio output stream - forwarded to every registered demuxer eagerly (see class comment).
Implements Demuxer.
◆ setOutputVideo() [1/2]
| void setOutputVideo |
( |
Print & |
out | ) |
|
|
inlineoverridevirtualinherited |
Defines the video output - forwarded to every registered demuxer eagerly (see class comment).
Implements Demuxer.
◆ setOutputVideo() [2/2]
|
|
inlineoverridevirtualinherited |
◆ setSendWavHeader()
| void setSendWavHeader |
( |
bool |
flag | ) |
|
|
inlineoverridevirtualinherited |
Forwarded to every registered demuxer eagerly (see class comment).
Implements Demuxer.
◆ videoInfo()
|
|
inlineoverridevirtualinherited |
Fulfills VideoInfoSource::videoInfo(), so any Demuxer can be passed directly to e.g. OutputOpenCV::setVideoInfoSource() - note the reported 'format' is the container's codec (e.g. H264), not necessarily what ends up written to a raw-picture VideoOutput/Print (that depends on whatever decoder sits between the demuxer and the output); consumers that care about the decoded format should still set it explicitly and rely on this only for width/height.
Implements VideoInfoSource.
◆ write()
| size_t write |
( |
const uint8_t * |
data, |
|
|
size_t |
len |
|
) |
| |
|
inlineoverridevirtualinherited |
◆ writeBlocking()
| void writeBlocking |
( |
Print * |
out, |
|
|
uint8_t * |
data, |
|
|
size_t |
len |
|
) |
| |
|
inlineprotectedinherited |
◆ avi
◆ demuxers
◆ id
custom id to be used by application
◆ info
◆ is_first
◆ is_notify_active
| bool is_notify_active = true |
|
protectedinherited |
◆ mp4
◆ mpg
◆ notify_vector
◆ p_print
◆ p_selected
The documentation for this class was generated from the following file: