Inherits Rx::FileIO::IVideoDecode, and Rx::FileIO::IParameterVideoDecode.
|
void | ConvertToRxImageFormat (Rx::CRxImageFormat &xImageFormat, const AVCodecContext *pxAVCodecContext) |
| Converts a AVPixelFormat to a raytrix pixel format and stores it with its related data type inside a ImageFormat. More...
|
|
int | Decode (AVCodecContext *xAVCodecContext, AVFrame *xAVOrgFrame, AVPacket *xAVPkt, Rx::Interop::Runtime28::IImage *pTrgImg, int &iGotFrame) |
| Tries to decode a frame from the video stream. iGotFrame indicates if a frame was decoded (1 = frame decoded, 0 = no frame found/decoded). More...
|
|
int | OpenCodecContext (int &iStreamIndex, AVFormatContext *pxAVFormatContext) |
| Finds the best video stream in the video file and opens the codec used for the decoding. More...
|
|
Rx::FileIO::CFFmpegDec_Impl::CFFmpegDec_Impl |
( |
| ) |
|
Rx::FileIO::CFFmpegDec_Impl::~CFFmpegDec_Impl |
( |
| ) |
|
virtual void Rx::FileIO::CFFmpegDec_Impl::Close |
( |
| ) |
|
|
virtual |
void Rx::FileIO::CFFmpegDec_Impl::ConvertToRxImageFormat |
( |
Rx::CRxImageFormat & |
xImageFormat, |
|
|
const AVCodecContext * |
pxAVCodecContext |
|
) |
| |
|
protected |
Converts a AVPixelFormat to a raytrix pixel format and stores it with its related data type inside a ImageFormat.
- Parameters
-
xImageFormat | [out] The image format describing the format of the output images. |
pxAVCodecContext | [in] The AVCodecContext containing the pixel format. |
int Rx::FileIO::CFFmpegDec_Impl::Decode |
( |
AVCodecContext * |
xAVCodecContext, |
|
|
AVFrame * |
xAVOrgFrame, |
|
|
AVPacket * |
xAVPkt, |
|
|
Rx::Interop::Runtime28::IImage * |
pTrgImg, |
|
|
int & |
iGotFrame |
|
) |
| |
|
protected |
Tries to decode a frame from the video stream. iGotFrame indicates if a frame was decoded (1 = frame decoded, 0 = no frame found/decoded).
- Parameters
-
xAVCodecContext | [in] The AVCodecContext. |
xAVOrgFrame | [in] AVFrame for the orginal non scaled data. |
xAVPkt | [in] AVPacket containg the frame data. |
pTrgImg | [out] Target memory. |
iGotFrame | [out] Identifier if a frame was decoded. |
- Returns
- The length of the decoded frame on success or -1 when the frame was not part of the video stream.
virtual void Rx::FileIO::CFFmpegDec_Impl::Destroy |
( |
| ) |
|
|
virtual |
Get the next frame from the video stream as IImage.
- Parameters
-
pTrgImg | [out] The target memory. |
- Returns
- True if the next frame was found and decoded, false otherwise.
Implements Rx::FileIO::IVideoDecode.
virtual void Rx::FileIO::CFFmpegDec_Impl::Open |
( |
const Rx::CRxString & |
sxInputVideoPath | ) |
|
|
virtual |
Opens the video file and initialize/load the FFMpeg libraries. Registers all needed formats and setups the video decoder.
- Parameters
-
sxInputVideoPath | [in] The path to the input video file. |
Implements Rx::FileIO::IVideoDecode.
int Rx::FileIO::CFFmpegDec_Impl::OpenCodecContext |
( |
int & |
iStreamIndex, |
|
|
AVFormatContext * |
pxAVFormatContext |
|
) |
| |
|
protected |
Finds the best video stream in the video file and opens the codec used for the decoding.
- Parameters
-
iStreamIndex | [out] The index of the best video stream, if found. |
pxAVFormatContext | [in] The AVFormatContext. |
- Returns
- 0 on success, -1 if no stream was found.