|
The blo Library
|
Audio/Video file input using FFmpeg. More...
#include <AVFileIn.h>
Public Types | |
| enum class | SeekPosition { atOrAfter , atOrBefore } |
| enum class | SeekFrame { key , any } |
Public Member Functions | |
| AVFileIn () | |
| Default constructor. | |
| AVFileIn (const char *filename) | |
| Constructs AV file input. | |
| AVFileIn (const char *filename, const AVInputFormat *pInputFormat) | |
| Constructs AV file input. | |
| AVFileIn (const char *deviceName, const char *formatName, double frameRate) | |
| Constructs video device input. | |
| AVFileIn (const char *deviceName, const char *formatName, double frameRate, int width, int height) | |
| Constructs video device input. | |
| AVFileIn (const AVFileIn &rhs)=delete | |
| Copy constructor. | |
| virtual | ~AVFileIn () |
| Destructor. | |
| AVFileIn & | operator= (const AVFileIn &rhs)=delete |
| void | open (const char *filename) |
| Opens input file. | |
| void | open (const char *filename, const AVInputFormat *pInputFormat) |
| Opens input file. | |
| void | open (const char *deviceName, const char *formatName, double frameRate) |
| Opens input video device. | |
| void | open (const char *deviceName, const char *formatName, double frameRate, int width, int height) |
| Opens input video device. | |
| bool | isOpen () const |
| Tests if the file is open. | |
| void | close () |
| Closes file. | |
| double | startTime () const |
| File start time. | |
| double | duration () const |
| File duration. | |
| int | bitrate () const |
| File bitrate. | |
| int | numStreams () const |
| Number of streams in file. | |
| int | defaultStreamNumber () |
| Default stream number in file. | |
| int | numStreams (AVMediaType mediatype) const |
| Number of streams of specified media in file. | |
| void | streamNumbers (AVMediaType mediatype, int *pDstStreamNumbers) const |
| Stream numbers of specified media in file. | |
| int | numAudioStreams () const |
| Number of audio streams in file. | |
| void | audioStreamNumbers (int *pDstStreamNumbers) const |
| Stream numbers of audio streams in file. | |
| int | numVideoStreams () const |
| Number of video streams in file. | |
| void | videoStreamNumbers (int *pDstStreamNumbers) const |
| Stream numbers of video streams in file. | |
| int | numDataStreams () const |
| Number of data streams in file. | |
| void | dataStreamNumbers (int *pDstStreamNumbers) const |
| Stream numbers of data streams in file. | |
| int | numSubtitleStreams () const |
| Number of subtitle streams in file. | |
| void | subtitleStreamNumbers (int *pDstStreamNumbers) const |
| Stream numbers of subtitle streams in file. | |
| int | numAttachmentStreams () const |
| Number of attachment streams in file. | |
| void | attachmentStreamNumbers (int *pDstStreamNumbers) const |
| Stream numbers of attachment streams in file. | |
| int | numUnknownStreams () const |
| Number of unknown streams in file. | |
| void | unknownStreamNumbers (int *pDstStreamNumbers) const |
| Stream numbers of unknown streams in file. | |
| double | startTime (int streamNumber) const |
| Stream start time. | |
| double | duration (int streamNumber) const |
| Stream duration. | |
| int | bitrate (int streamNumber) const |
| Stream bitrate. | |
| bool | hasCodec (int streamNumber) const |
| Tests if stream codec is available. | |
| AVMediaType | mediaType (int streamNumber) const |
| Media type of stream. | |
| AVCodecID | codecID (int streamNumber) const |
| Codec ID of stream. | |
| unsigned int | codecTag (int streamNumber) const |
| Codec tag of stream. | |
| bool | isAudio (int streamNumber) const |
| Tests if stream is audio stream. | |
| bool | isVideo (int streamNumber) const |
| Tests if stream is video stream. | |
| bool | isData (int streamNumber) const |
| Tests if stream is data stream. | |
| bool | isSubtitle (int streamNumber) const |
| Tests if stream is subtitle stream. | |
| bool | isAttachment (int streamNumber) const |
| Tests if stream is attachment stream. | |
| bool | isUnknown (int streamNumber) const |
| Tests if stream is unknown stream. | |
| int | sampleRate (int streamNumber) const |
| Audio stream sample rate. | |
| AVSampleFormat | sampleFormat (int streamNumber) const |
| Audio stream sample format. | |
| uint64_t | channelLayout (int streamNumber) const |
| Audio stream channel layout. | |
| int | channels (int streamNumber) const |
| Audio stream number of channels. | |
| int | frameSize (int streamNumber) const |
| Audio stream frame size. | |
| double | avgFrameRate (int streamNumber) const |
| Video stream average frame rate. | |
| double | frameRate (int streamNumber) const |
| Video stream frame rate. | |
| AVPixelFormat | pixelFormat (int streamNumber) const |
| Video stream pixel format. | |
| int | width (int streamNumber) const |
| Video stream frame width. | |
| int | height (int streamNumber) const |
| Video stream frame height. | |
| double | storageAspectRatio (int streamNumber) const |
| Video stream frame storage aspect ratio. | |
| double | pixelAspectRatio (int streamNumber) const |
| Video stream frame pixel aspect ratio. | |
| double | displayAspectRatio (int streamNumber) const |
| Video stream frame display aspect ratio. | |
| bool | hasAlphaChannel (int streamNumber) const |
| Absence or presence of alpha channel in video stream frame. | |
| void | seek (double timeStamp, SeekPosition seekPosition, SeekFrame seekFrame) |
| Seeks to the frame at the specified time stamp. | |
| void | seek (int streamNumber, double timeStamp, SeekPosition seekPosition, SeekFrame seekFrame) |
| Seeks to the frame at the specified time stamp. | |
| bool | readNextFrame (int &streamNumber, double *p_pts=nullptr, double *p_dts=nullptr, bool *pIsKeyFrame=nullptr) |
| Reads the next frame. | |
| bool | readThroughNextFrameInStream (int streamNumber, double *p_pts=nullptr, double *p_dts=nullptr, bool *pIsKeyFrame=nullptr) |
| Reads the file through the next frame in the specified stream. | |
| bool | decodeAudioFrame (int &frameSize, bool &isLastFrameInPacket, double *p_pts=nullptr) |
| Decodes the current audio frame. | |
| template<typename T > | |
| bool | convertAudioFrame (uint64_t dstChannelLayout, T *pDst, int dstLen) |
| Converts the current decoded audio frame. | |
| template<typename T > | |
| bool | convertAudioFrame_Mono (T *pDst, int dstLen) |
| Converts the current decoded audio frame to mono. | |
| template<typename T > | |
| bool | convertAudioFrame_Stereo (T *pDst, int dstLen) |
| Converts the current decoded audio frame to stereo. | |
| bool | decodeVideoFrame (int &width, int &height, double *p_pts=nullptr, int *pFrameNum=nullptr, InterlacedFrame *pInterlacedFrame=nullptr, bool *pIsKeyFrame=nullptr) |
| Decodes the current video frame. | |
| bool | convertVideoFrame (AVPixelFormat dstPixelFormat, uint8_t *pDst, int dstStep, int dstWidth, int dstHeight) |
| Converts the current decoded video frame. | |
| bool | convertVideoFrame_Y_C1 (uint8_t *pDst, int dstStep, int dstWidth, int dstHeight) |
| Converts the current decoded video frame to Y. | |
| bool | convertVideoFrame_RGB_C3 (uint8_t *pDst, int dstStep, int dstWidth, int dstHeight) |
| Converts the current decoded video frame to RGB. | |
| bool | convertVideoFrame_BGR_C3 (uint8_t *pDst, int dstStep, int dstWidth, int dstHeight) |
| Converts the current decoded video frame to BGR. | |
| bool | convertVideoFrame_RGB_C4 (uint8_t *pDst, int dstStep, int dstWidth, int dstHeight) |
| Converts the current decoded video frame to RGB. | |
| bool | convertVideoFrame_BGR_C4 (uint8_t *pDst, int dstStep, int dstWidth, int dstHeight) |
| Converts the current decoded video frame to BGR. | |
| bool | convertVideoFrame_RGBA_C4 (uint8_t *pDst, int dstStep, int dstWidth, int dstHeight) |
| Converts the current decoded video frame to RGBA. | |
| bool | convertVideoFrame_BGRA_C4 (uint8_t *pDst, int dstStep, int dstWidth, int dstHeight) |
| Converts the current decoded video frame to BGRA. | |
| bool | convertVideoFrame_ARGB_C4 (uint8_t *pDst, int dstStep, int dstWidth, int dstHeight) |
| Converts the current decoded video frame to ARGB. | |
| bool | convertVideoFrame_ABGR_C4 (uint8_t *pDst, int dstStep, int dstWidth, int dstHeight) |
| Converts the current decoded video frame to ABGR. | |
Protected Member Functions | |
| virtual void | onReadFrame (int streamNumber) |
| Called on successful frame read. | |
Audio/Video file input using FFmpeg.
|
strong |
|
strong |
| blo::AVFileIn::AVFileIn | ( | ) |
Default constructor.
|
explicit |
Constructs AV file input.
| filename | Filename string. |
| blo::AVFileIn::AVFileIn | ( | const char * | filename, |
| const AVInputFormat * | pInputFormat | ||
| ) |
Constructs AV file input.
| filename | Filename string. |
| pInputFormat | Pointer to input format to use (force), or nullptr to use default. |
| blo::AVFileIn::AVFileIn | ( | const char * | deviceName, |
| const char * | formatName, | ||
| double | frameRate | ||
| ) |
Constructs video device input.
| deviceName | Device name string. |
| formatName | Format name string. |
| frameRate | Frame rate in frames/s. |
| blo::AVFileIn::AVFileIn | ( | const char * | deviceName, |
| const char * | formatName, | ||
| double | frameRate, | ||
| int | width, | ||
| int | height | ||
| ) |
Constructs video device input.
| deviceName | Device name string. |
| formatName | Format name string. |
| frameRate | Frame rate in frames/s. |
| width | The width of the frames. |
| height | The height of the frames. |
|
delete |
Copy constructor.
|
virtual |
Destructor.
| void blo::AVFileIn::attachmentStreamNumbers | ( | int * | pDstStreamNumbers | ) | const |
Stream numbers of attachment streams in file.
| pDstStreamNumbers | Pointer to the destination stream numbers. |
| void blo::AVFileIn::audioStreamNumbers | ( | int * | pDstStreamNumbers | ) | const |
Stream numbers of audio streams in file.
| pDstStreamNumbers | Pointer to the destination stream numbers. |
| double blo::AVFileIn::avgFrameRate | ( | int | streamNumber | ) | const |
Video stream average frame rate.
| streamNumber | Stream number. |
| int blo::AVFileIn::bitrate | ( | ) | const |
File bitrate.
| int blo::AVFileIn::bitrate | ( | int | streamNumber | ) | const |
Stream bitrate.
| streamNumber | Stream number. |
| uint64_t blo::AVFileIn::channelLayout | ( | int | streamNumber | ) | const |
Audio stream channel layout.
| streamNumber | Stream number. |
| int blo::AVFileIn::channels | ( | int | streamNumber | ) | const |
Audio stream number of channels.
| streamNumber | Stream number. |
| void blo::AVFileIn::close | ( | ) |
Closes file.
| AVCodecID blo::AVFileIn::codecID | ( | int | streamNumber | ) | const |
Codec ID of stream.
| streamNumber | Stream number. |
| unsigned int blo::AVFileIn::codecTag | ( | int | streamNumber | ) | const |
Codec tag of stream.
This function returns the four type tag of the stream, least significant byte (LSB) first.
| streamNumber | Stream number. |
| BLO_EXPIMP_TEMPLATE template BLO_API bool blo::AVFileIn::convertAudioFrame | ( | uint64_t | dstChannelLayout, |
| T * | pDst, | ||
| int | dstLen | ||
| ) |
Converts the current decoded audio frame.
This function converts the current decoded audio frame to the specified channel layout and sample format.
| T | Data type. |
| dstChannelLayout | The channel layout to convert the current decoded frame to. |
| pDst | Pointer to the destination audio buffer. |
| dstLen | Length of the destination audio buffer in samples (all channels). It must be equal to channels( dstChannelLayout ) * frameSize, where frameSize is output from decodeAudioFrame(). |
| BLO_EXPIMP_TEMPLATE template BLO_API bool blo::AVFileIn::convertAudioFrame_Mono | ( | T * | pDst, |
| int | dstLen | ||
| ) |
Converts the current decoded audio frame to mono.
This function converts the current decoded audio frame to mono channel layout and the specified sample format.
| T | Data type. |
| pDst | Pointer to the destination audio buffer. |
| dstLen | Length of the destination audio buffer in samples (all channels). It must be equal to frameSize, where frameSize is output from decodeAudioFrame(). |
| BLO_EXPIMP_TEMPLATE template BLO_API bool blo::AVFileIn::convertAudioFrame_Stereo | ( | T * | pDst, |
| int | dstLen | ||
| ) |
Converts the current decoded audio frame to stereo.
This function converts the current decoded audio frame to stereo channel layout and the specified sample format.
| T | Data type. |
| pDst | Pointer to the destination audio buffer. |
| dstLen | Length of the destination audio buffer in samples (all channels). It must be equal to 2 * frameSize, where frameSize is output from decodeAudioFrame(). |
| bool blo::AVFileIn::convertVideoFrame | ( | AVPixelFormat | dstPixelFormat, |
| uint8_t * | pDst, | ||
| int | dstStep, | ||
| int | dstWidth, | ||
| int | dstHeight | ||
| ) |
Converts the current decoded video frame.
| dstPixelFormat | The pixel format to decode the frame to. |
| pDst | Pointer to the destination image. |
| dstStep | Step in bytes between the rows in the destination image. |
| dstWidth | Width of the destination image in pixels. It must be equal to width, where width is output from decodeVideoFrame(). |
| dstHeight | Height of the destination image in pixels. It must be equal to height, where height is output from decodeVideoFrame(). |
| bool blo::AVFileIn::convertVideoFrame_ABGR_C4 | ( | uint8_t * | pDst, |
| int | dstStep, | ||
| int | dstWidth, | ||
| int | dstHeight | ||
| ) |
Converts the current decoded video frame to ABGR.
| pDst | Pointer to the destination image. |
| dstStep | Step in bytes between the rows in the destination image. |
| dstWidth | Width of the destination image in pixels. It must be equal to width, where width is output from decodeVideoFrame(). |
| dstHeight | Height of the destination image in pixels. It must be equal to height, where height is output from decodeVideoFrame(). |
| bool blo::AVFileIn::convertVideoFrame_ARGB_C4 | ( | uint8_t * | pDst, |
| int | dstStep, | ||
| int | dstWidth, | ||
| int | dstHeight | ||
| ) |
Converts the current decoded video frame to ARGB.
| pDst | Pointer to the destination image. |
| dstStep | Step in bytes between the rows in the destination image. |
| dstWidth | Width of the destination image in pixels. It must be equal to width, where width is output from decodeVideoFrame(). |
| dstHeight | Height of the destination image in pixels. It must be equal to height, where height is output from decodeVideoFrame(). |
| bool blo::AVFileIn::convertVideoFrame_BGR_C3 | ( | uint8_t * | pDst, |
| int | dstStep, | ||
| int | dstWidth, | ||
| int | dstHeight | ||
| ) |
Converts the current decoded video frame to BGR.
| pDst | Pointer to the destination image. |
| dstStep | Step in bytes between the rows in the destination image. |
| dstWidth | Width of the destination image in pixels. It must be equal to width, where width is output from decodeVideoFrame(). |
| dstHeight | Height of the destination image in pixels. It must be equal to height, where height is output from decodeVideoFrame(). |
| bool blo::AVFileIn::convertVideoFrame_BGR_C4 | ( | uint8_t * | pDst, |
| int | dstStep, | ||
| int | dstWidth, | ||
| int | dstHeight | ||
| ) |
Converts the current decoded video frame to BGR.
| pDst | Pointer to the destination image. |
| dstStep | Step in bytes between the rows in the destination image. |
| dstWidth | Width of the destination image in pixels. It must be equal to width, where width is output from decodeVideoFrame(). |
| dstHeight | Height of the destination image in pixels. It must be equal to height, where height is output from decodeVideoFrame(). |
| bool blo::AVFileIn::convertVideoFrame_BGRA_C4 | ( | uint8_t * | pDst, |
| int | dstStep, | ||
| int | dstWidth, | ||
| int | dstHeight | ||
| ) |
Converts the current decoded video frame to BGRA.
| pDst | Pointer to the destination image. |
| dstStep | Step in bytes between the rows in the destination image. |
| dstWidth | Width of the destination image in pixels. It must be equal to width, where width is output from decodeVideoFrame(). |
| dstHeight | Height of the destination image in pixels. It must be equal to height, where height is output from decodeVideoFrame(). |
| bool blo::AVFileIn::convertVideoFrame_RGB_C3 | ( | uint8_t * | pDst, |
| int | dstStep, | ||
| int | dstWidth, | ||
| int | dstHeight | ||
| ) |
Converts the current decoded video frame to RGB.
| pDst | Pointer to the destination image. |
| dstStep | Step in bytes between the rows in the destination image. |
| dstWidth | Width of the destination image in pixels. It must be equal to width, where width is output from decodeVideoFrame(). |
| dstHeight | Height of the destination image in pixels. It must be equal to height, where height is output from decodeVideoFrame(). |
| bool blo::AVFileIn::convertVideoFrame_RGB_C4 | ( | uint8_t * | pDst, |
| int | dstStep, | ||
| int | dstWidth, | ||
| int | dstHeight | ||
| ) |
Converts the current decoded video frame to RGB.
| pDst | Pointer to the destination image. |
| dstStep | Step in bytes between the rows in the destination image. |
| dstWidth | Width of the destination image in pixels. It must be equal to width, where width is output from decodeVideoFrame(). |
| dstHeight | Height of the destination image in pixels. It must be equal to height, where height is output from decodeVideoFrame(). |
| bool blo::AVFileIn::convertVideoFrame_RGBA_C4 | ( | uint8_t * | pDst, |
| int | dstStep, | ||
| int | dstWidth, | ||
| int | dstHeight | ||
| ) |
Converts the current decoded video frame to RGBA.
| pDst | Pointer to the destination image. |
| dstStep | Step in bytes between the rows in the destination image. |
| dstWidth | Width of the destination image in pixels. It must be equal to width, where width is output from decodeVideoFrame(). |
| dstHeight | Height of the destination image in pixels. It must be equal to height, where height is output from decodeVideoFrame(). |
| bool blo::AVFileIn::convertVideoFrame_Y_C1 | ( | uint8_t * | pDst, |
| int | dstStep, | ||
| int | dstWidth, | ||
| int | dstHeight | ||
| ) |
Converts the current decoded video frame to Y.
| pDst | Pointer to the destination image. |
| dstStep | Step in bytes between the rows in the destination image. |
| dstWidth | Width of the destination image in pixels. It must be equal to width, where width is output from decodeVideoFrame(). |
| dstHeight | Height of the destination image in pixels. It must be equal to height, where height is output from decodeVideoFrame(). |
| void blo::AVFileIn::dataStreamNumbers | ( | int * | pDstStreamNumbers | ) | const |
Stream numbers of data streams in file.
| pDstStreamNumbers | Pointer to the destination stream numbers. |
| bool blo::AVFileIn::decodeAudioFrame | ( | int & | frameSize, |
| bool & | isLastFrameInPacket, | ||
| double * | p_pts = nullptr |
||
| ) |
Decodes the current audio frame.
This function decodes the current audio frame in the packet.
Audio packets can contain multiple frames, so this function may need to be called multiple times in order to decode all frames in the packet.
| frameSize | Frame size in samples/channel. |
| isLastFrameInPacket | Wheather or not the frame is the last one in the packet. |
| p_pts | Pointer to the presentation time stamp (PTS) of the frame. |
| bool blo::AVFileIn::decodeVideoFrame | ( | int & | width, |
| int & | height, | ||
| double * | p_pts = nullptr, |
||
| int * | pFrameNum = nullptr, |
||
| InterlacedFrame * | pInterlacedFrame = nullptr, |
||
| bool * | pIsKeyFrame = nullptr |
||
| ) |
Decodes the current video frame.
| width | Width of the image in pixels. |
| height | Height of the image in pixels. |
| p_pts | Pointer to the presentation time stamp (PTS). |
| pFrameNum | Pointer to the frame number. |
| pInterlacedFrame | Pointer to the type of interlacing. |
| pIsKeyFrame | Pointer to the whether or not the frame is a key frame. |
| int blo::AVFileIn::defaultStreamNumber | ( | ) |
Default stream number in file.
| double blo::AVFileIn::displayAspectRatio | ( | int | streamNumber | ) | const |
Video stream frame display aspect ratio.
| streamNumber | Stream number. |
| double blo::AVFileIn::duration | ( | ) | const |
File duration.
| double blo::AVFileIn::duration | ( | int | streamNumber | ) | const |
Stream duration.
| streamNumber | Stream number. |
| double blo::AVFileIn::frameRate | ( | int | streamNumber | ) | const |
Video stream frame rate.
| streamNumber | Stream number. |
| int blo::AVFileIn::frameSize | ( | int | streamNumber | ) | const |
Audio stream frame size.
| streamNumber | Stream number. |
| bool blo::AVFileIn::hasAlphaChannel | ( | int | streamNumber | ) | const |
Absence or presence of alpha channel in video stream frame.
| streamNumber | Stream number. |
| bool blo::AVFileIn::hasCodec | ( | int | streamNumber | ) | const |
Tests if stream codec is available.
| streamNumber | Stream number. |
| int blo::AVFileIn::height | ( | int | streamNumber | ) | const |
Video stream frame height.
| streamNumber | Stream number. |
| bool blo::AVFileIn::isAttachment | ( | int | streamNumber | ) | const |
Tests if stream is attachment stream.
| streamNumber | Stream number. |
| bool blo::AVFileIn::isAudio | ( | int | streamNumber | ) | const |
Tests if stream is audio stream.
| streamNumber | Stream number. |
| bool blo::AVFileIn::isData | ( | int | streamNumber | ) | const |
Tests if stream is data stream.
| streamNumber | Stream number. |
| bool blo::AVFileIn::isOpen | ( | ) | const |
Tests if the file is open.
| bool blo::AVFileIn::isSubtitle | ( | int | streamNumber | ) | const |
Tests if stream is subtitle stream.
| streamNumber | Stream number. |
| bool blo::AVFileIn::isUnknown | ( | int | streamNumber | ) | const |
Tests if stream is unknown stream.
| streamNumber | Stream number. |
| bool blo::AVFileIn::isVideo | ( | int | streamNumber | ) | const |
Tests if stream is video stream.
| streamNumber | Stream number. |
| AVMediaType blo::AVFileIn::mediaType | ( | int | streamNumber | ) | const |
Media type of stream.
| streamNumber | Stream number. |
| int blo::AVFileIn::numAttachmentStreams | ( | ) | const |
Number of attachment streams in file.
| int blo::AVFileIn::numAudioStreams | ( | ) | const |
Number of audio streams in file.
| int blo::AVFileIn::numDataStreams | ( | ) | const |
Number of data streams in file.
| int blo::AVFileIn::numStreams | ( | ) | const |
Number of streams in file.
| int blo::AVFileIn::numStreams | ( | AVMediaType | mediatype | ) | const |
Number of streams of specified media in file.
| mediatype | The media type. |
| int blo::AVFileIn::numSubtitleStreams | ( | ) | const |
Number of subtitle streams in file.
| int blo::AVFileIn::numUnknownStreams | ( | ) | const |
Number of unknown streams in file.
| int blo::AVFileIn::numVideoStreams | ( | ) | const |
Number of video streams in file.
|
protectedvirtual |
Called on successful frame read.
This function is called upon each successfully frame read.
This function does nothing in the base class AVFileIn.
| streamNumber | The stream number that the frame is in. |
| void blo::AVFileIn::open | ( | const char * | deviceName, |
| const char * | formatName, | ||
| double | frameRate | ||
| ) |
Opens input video device.
| deviceName | Device name string. |
| formatName | Format name string. |
| frameRate | Frame rate in frames/s. |
| void blo::AVFileIn::open | ( | const char * | deviceName, |
| const char * | formatName, | ||
| double | frameRate, | ||
| int | width, | ||
| int | height | ||
| ) |
Opens input video device.
| deviceName | Device name string. |
| formatName | Format name string. |
| frameRate | Frame rate in frames/s. |
| width | The width of the frames. |
| height | The height of the frames. |
| void blo::AVFileIn::open | ( | const char * | filename | ) |
Opens input file.
| filename | Filename string. |
| void blo::AVFileIn::open | ( | const char * | filename, |
| const AVInputFormat * | pInputFormat | ||
| ) |
Opens input file.
| filename | Filename string. |
| pInputFormat | File format to use (force), or nullptr to use default. |
| double blo::AVFileIn::pixelAspectRatio | ( | int | streamNumber | ) | const |
Video stream frame pixel aspect ratio.
| streamNumber | Stream number. |
| AVPixelFormat blo::AVFileIn::pixelFormat | ( | int | streamNumber | ) | const |
Video stream pixel format.
| streamNumber | Stream number. |
| bool blo::AVFileIn::readNextFrame | ( | int & | streamNumber, |
| double * | p_pts = nullptr, |
||
| double * | p_dts = nullptr, |
||
| bool * | pIsKeyFrame = nullptr |
||
| ) |
Reads the next frame.
| streamNumber | The stream number that the frame is in. |
| p_pts | Pointer to the presentation time stamp (PTS). |
| p_dts | Pointer to the decode time stamp (DTS). |
| pIsKeyFrame | Pointer to the whether or not the frame is a key frame. |
| bool blo::AVFileIn::readThroughNextFrameInStream | ( | int | streamNumber, |
| double * | p_pts = nullptr, |
||
| double * | p_dts = nullptr, |
||
| bool * | pIsKeyFrame = nullptr |
||
| ) |
Reads the file through the next frame in the specified stream.
This function reads frames until after it has read the next frame in the specified stream.
| streamNumber | The stream number. |
| p_pts | Pointer to the presentation time stamp (PTS). |
| p_dts | Pointer to the decode time stamp (DTS). |
| pIsKeyFrame | Pointer to the whether or not the frame is a key frame. |
| AVSampleFormat blo::AVFileIn::sampleFormat | ( | int | streamNumber | ) | const |
Audio stream sample format.
| streamNumber | Stream number. |
| int blo::AVFileIn::sampleRate | ( | int | streamNumber | ) | const |
Audio stream sample rate.
| streamNumber | Stream number. |
| void blo::AVFileIn::seek | ( | double | timeStamp, |
| SeekPosition | seekPosition, | ||
| SeekFrame | seekFrame | ||
| ) |
Seeks to the frame at the specified time stamp.
| timeStamp | The time stamp. |
| seekPosition | Type of position to seek to. |
| seekFrame | Type of frame to seek to. |
| void blo::AVFileIn::seek | ( | int | streamNumber, |
| double | timeStamp, | ||
| SeekPosition | seekPosition, | ||
| SeekFrame | seekFrame | ||
| ) |
Seeks to the frame at the specified time stamp.
| streamNumber | The stream number. |
| timeStamp | The time stamp. |
| seekPosition | Type of position to seek to. |
| seekFrame | Type of frame to seek to. |
| double blo::AVFileIn::startTime | ( | ) | const |
File start time.
| double blo::AVFileIn::startTime | ( | int | streamNumber | ) | const |
Stream start time.
| streamNumber | Stream number. |
| double blo::AVFileIn::storageAspectRatio | ( | int | streamNumber | ) | const |
Video stream frame storage aspect ratio.
| streamNumber | Stream number. |
| void blo::AVFileIn::streamNumbers | ( | AVMediaType | mediatype, |
| int * | pDstStreamNumbers | ||
| ) | const |
Stream numbers of specified media in file.
| mediatype | The media type. |
| pDstStreamNumbers | Pointer to the destination stream numbers. |
| void blo::AVFileIn::subtitleStreamNumbers | ( | int * | pDstStreamNumbers | ) | const |
Stream numbers of subtitle streams in file.
| pDstStreamNumbers | Pointer to the destination stream numbers. |
| void blo::AVFileIn::unknownStreamNumbers | ( | int * | pDstStreamNumbers | ) | const |
Stream numbers of unknown streams in file.
| pDstStreamNumbers | Pointer to the destination stream numbers. |
| void blo::AVFileIn::videoStreamNumbers | ( | int * | pDstStreamNumbers | ) | const |
Stream numbers of video streams in file.
| pDstStreamNumbers | Pointer to the destination stream numbers. |
| int blo::AVFileIn::width | ( | int | streamNumber | ) | const |
Video stream frame width.
| streamNumber | Stream number. |