AVBlocks for C++
1.9
Audio and Video Software Development Kit
|
Analyzes a file or a stream and provides information about its type and properties. More...
Inherits Reference.
Public Member Functions | |
virtual primo::codecs::StreamInfoEnum * | streams () const =0 |
Returns a collection of StreamInfo objects describing the audio and video streams (tracks) found in the input. | |
virtual void | setInputFile (const char_t *filename)=0 |
Sets the input that should be analyzed. | |
virtual const char_t * | inputFile () const =0 |
Returns the input file previously set via setInputFile(). | |
virtual void | setInputStream (primo::Stream *stream)=0 |
Sets the input stream that should be analyzed. | |
virtual primo::Stream * | inputStream () const =0 |
Returns the input stream previously set via setInputStream(). | |
virtual void | setInputType (primo::codecs::StreamType::Enum inputType)=0 |
Forces a specific input type. | |
virtual primo::codecs::StreamType::Enum | inputType () const =0 |
Returns the input type previously set via setInputType(). | |
virtual bool_t | load ()=0 |
Analyzes the input specified by setInputFile() or setInputStream() and loads the information in the MediaInfo object. | |
virtual const ErrorInfo * | error () const =0 |
Returns a detailed error information for the last load operation. | |
virtual primo::codecs::Metadata * | metadata () const =0 |
Returns the metadata for the input. | |
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.
Returns a detailed error information for the last load operation.
virtual const char_t* inputFile | ( | ) | const [pure virtual] |
Returns the input file previously set via setInputFile().
virtual primo::Stream* inputStream | ( | ) | const [pure virtual] |
Returns the input stream previously set via setInputStream().
virtual primo::codecs::StreamType::Enum inputType | ( | ) | const [pure virtual] |
Returns the input type previously set via setInputType().
virtual bool_t load | ( | ) | [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.
virtual primo::codecs::Metadata* metadata | ( | ) | const [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.
virtual void setInputFile | ( | const char_t * | filename | ) | [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. |
virtual void setInputStream | ( | primo::Stream * | stream | ) | [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.
virtual void setInputType | ( | primo::codecs::StreamType::Enum | inputType | ) | [pure virtual] |
Forces a specific input type.
inputType | [in] input stream type such as AVI, WAV, MP4, etc. |
If the input is a file and the input type is not set, the input type is deduced from the filename extension. If the input is a stream, MediaInfo requires the input type to be specified. If the input type is set to something other than StreamType::Unknown, it takes precedence and is used by MediaInfo regardless of the detected stream type.
virtual primo::codecs::StreamInfoEnum* streams | ( | ) | const [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.