AVBlocks for C++
1.19
Audio and Video Software Development Kit
|
Analyzes a file or a stream and provides information about its type and properties. More...
Public Member Functions | |
virtual const primo::error::ErrorInfo * | error () const =0 |
Returns a detailed error information for the last load operation. More... | |
virtual const char_t * | inputFile () const =0 |
Returns the input file previously set via setInputFile(). More... | |
virtual primo::Stream * | inputStream () const =0 |
Returns the input stream previously set via setInputStream(). More... | |
virtual bool_t | isReady ()=0 |
Specifies if stream info and metadata has been loaded / parsed. More... | |
virtual bool_t | load ()=0 |
Analyzes the input specified by setInputFile() or setInputStream() and loads the information in the MediaInfo object. More... | |
virtual primo::codecs::Metadata * | metadata () const =0 |
Returns the metadata for the input. More... | |
PRIMO_DEPRECATED ("primo::avblocks::MediaInfo::setInputType is deprecated. Please use primo::avblocks::MediaInfo::setStreamType instead.") virtual void setInputType(primo | |
virtual bool_t | push (primo::codecs::MediaBuffer *inputBuffer)=0 |
Pushes input data to the MediaInfo. More... | |
virtual void | setInputFile (const char_t *filename)=0 |
Sets the input that should be analyzed. More... | |
virtual void | setInputStream (primo::Stream *stream)=0 |
Sets the input stream that should be analyzed. More... | |
virtual PRIMO_DEPRECATED("primo::avblocks::MediaInfo::inputType is deprecated. Please use primo::avblocks::MediaInfo::streamType instead.") virtual primo void | setStreamType (primo::codecs::StreamType::Enum streamType)=0 |
Forces a specific stream type. More... | |
virtual primo::codecs::StreamInfoEnum * | streams () const =0 |
Returns a collection of StreamInfo objects describing the audio and video streams (tracks) found in the input. More... | |
virtual primo::codecs::StreamSubType::Enum | streamSubType () const =0 |
Returns the stream subtype detected by MediaInfo. More... | |
virtual primo::codecs::StreamType::Enum | streamType () const =0 |
Returns the stream type previously set via setStreamType() or the one detected by MediaInfo. More... | |
Public Member Functions inherited from Reference | |
virtual int32_t | release () const =0 |
Releases the instance. More... | |
virtual int32_t | retain () const =0 |
Retains the instance. More... | |
virtual int32_t | retainCount () const =0 |
Returns the current reference count. More... | |
Protected Member Functions | |
~MediaInfo () | |
This object can be destroyed only by the AVBlocks library. | |
Analyzes a file or a stream and provides information about its type and properties.
|
pure virtual |
Returns a detailed error information for the last load operation.
|
pure virtual |
Returns the input file previously set via setInputFile().
|
pure virtual |
Returns the input stream previously set via setInputStream().
|
pure virtual |
Specifies if stream info and metadata has been loaded / parsed.
|
pure virtual |
Analyzes the input specified by setInputFile() or setInputStream() and loads the information in the MediaInfo object.
If this method is successful the information about the detected media streams (tracks) and metadata can be obtained from MediaInfo.
@see MediaInfo::streams @see MediaInfo::metadata
|
pure virtual |
Returns the metadata for the input.
Normally the caller is not required and should not release the returned object. However it is allowed to retain the Metadata object and it will be valid even when the MediaInfo instance is destroyed. In all cases when the caller retains the returned object it should release it when it is not needed anymore.
PRIMO_DEPRECATED | ( | "primo::avblocks::MediaInfo::setInputType is deprecated. Please use primo::avblocks::MediaInfo::setStreamType instead." | ) |
References MediaInfo::setStreamType().
|
pure virtual |
Pushes input data to the MediaInfo.
inputBuffer | [in] A pointer to a MediaBuffer object that contains the input data. |
Supported stream types: | StreamType::MPEG1_Video |
StreamType::MPEG2_Video | |
StreamType::H264 | |
StreamType::MPEG_TS |
|
pure virtual |
Sets the input that should be analyzed.
filename | [in] a filename as an Unicode zero terminated string. If NULL the filename is cleared. When not NULL the filename is copied internally and is not required to be valid after the method returns. |
|
pure virtual |
Sets the input stream that should be analyzed.
This is an alternative to setInputFile().
stream | [in] A pointer to a Stream object. If NULL the input stream is cleared. Internally the Stream object is retained by MediaInfo, so it is safe to release it after this method returns. |
MediaInfo will use the input file when both an input file and input stream are set.
|
pure virtual |
Forces a specific stream type.
@param streamType [in] stream type such as AVI, WAV, MP4, etc. If the input is a file and the stream type is not set, the stream type is deduced from the filename extension.If the input is a stream, MediaInfo requires the stream type to be specified. If the stream type is set to something other than StreamType::Unknown, it takes precedence and is used by MediaInfo regardless of the detected stream type.
Referenced by MediaInfo::PRIMO_DEPRECATED().
|
pure virtual |
Returns a collection of StreamInfo objects describing the audio and video streams (tracks) found in the input.
Normally the caller is not required and should not release the returned object. However it is allowed to retain the collection and it will be valid even when the MediaInfo instance is destroyed. In all cases when the caller retains the returned collection it should release it when it is not needed anymore.
|
pure virtual |
Returns the stream subtype detected by MediaInfo.
|
pure virtual |
Returns the stream type previously set via setStreamType() or the one detected by MediaInfo.