#include <video.h>
Inheritance diagram for fl::VideoInFileFFMPEG:

Public Methods | |
| VideoInFileFFMPEG (const std::string &fileName, const PixelFormat &hint) | |
| virtual | ~VideoInFileFFMPEG () |
| virtual void | seekFrame (int frame) |
| Position stream just before the given frame. Numbers follow same convention as Video class. | |
| virtual void | seekTime (double timestamp) |
| virtual void | readNext (Image &image) |
| Reads the next frame and stores it in image. image may end up attached to a buffer used internally by the video device or library, so it may be freed unexpectedly. However, this clss guarantees that the memory will not be freed before the next call to a method of this class. | |
| virtual bool | good () const |
| virtual void | setTimestampMode (bool frames=false) |
| Changes image.timestamp from presentation time to frame number. | |
| virtual void | get (const std::string &name, double &value) |
| Retrieve values of stream attributes (such as duration in seconds). | |
| void | open (const std::string &fileName) |
| void | close () |
| void | readNext (Image *image) |
| same as readNext() above, except if image is null, then don't do extraction step | |
| void | extractImage (Image &image) |
Public Attributes | |
| AVFormatContext * | fc |
| AVCodecContext * | cc |
| AVStream * | stream |
| AVCodec * | codec |
| AVFrame | picture |
| AVPacket | packet |
| Ensure that if nextImage() attaches image to packet, the memory won't be freed before next read. | |
| int | size |
| unsigned char * | data |
| int | gotPicture |
| indicates that picture contains a full image | |
| int | state |
| state == 0 means good; anything else means we can't read more frames | |
| bool | timestampMode |
| Indicates that image.timestamp should be frame number rather than presentation time. | |
| double | expectedSkew |
| Compensates for difference between PTS and DTS when seeking. Units = frames. | |
| bool | seekLinear |
| Indicates that the file only supports linear seeking, not random seeking. Generally due to lack of timestamps in stream. | |
| const PixelFormat * | hint |
| std::string | fileName |
|
||||||||||||
|
|
|
|
|
|
|
|
|
|
|
|
||||||||||||
|
Retrieve values of stream attributes (such as duration in seconds).
Implements fl::VideoInFile. |
|
|
Registry of states: 0 = everything good [-7,-1] = FFMPEG libavformat errors, see avformat.h -10 = did not find a video stream -11 = did not find a codec -12 = VideoInFile is closed Implements fl::VideoInFile. |
|
|
|
|
|
same as readNext() above, except if image is null, then don't do extraction step
|
|
|
Reads the next frame and stores it in image. image may end up attached to a buffer used internally by the video device or library, so it may be freed unexpectedly. However, this clss guarantees that the memory will not be freed before the next call to a method of this class.
Implements fl::VideoInFile. |
|
|
Position stream just before the given frame. Numbers follow same convention as Video class.
Implements fl::VideoInFile. |
|
|
Implements fl::VideoInFile. |
|
|
Changes image.timestamp from presentation time to frame number.
Implements fl::VideoInFile. |
|
|
|
|
|
|
|
|
|
|
|
Compensates for difference between PTS and DTS when seeking. Units = frames.
|
|
|
|
|
|
|
|
|
indicates that picture contains a full image
|
|
|
|
|
|
Ensure that if nextImage() attaches image to packet, the memory won't be freed before next read.
|
|
|
|
|
|
Indicates that the file only supports linear seeking, not random seeking. Generally due to lack of timestamps in stream.
|
|
|
|
|
|
state == 0 means good; anything else means we can't read more frames
|
|
|
|
|
|
Indicates that image.timestamp should be frame number rather than presentation time.
|
1.2.18