|
VideoParser 0.2.0
C++ Video Bitstream Parsing Library
|
A Video Parser implementation. More...
Public Member Functions | |
| VideoParser (const char *filename) | |
| Construct a new Video Parser object. | |
| SequenceInfo | get_sequence_info () |
| Get information about the video sequence. | |
| bool | parse_frame (FrameInfo &frame_info) |
| Parse the next frame in the video. | |
| void | close () |
| Close the video file and free resources. | |
A Video Parser implementation.
This class is used to parse video files and extract information about the video sequence and individual frames. Call get_sequence_info() to get the general information about the video sequence, either before or after parsing the frames. Call parse_frame() to parse the next frame and get its information, in a loop. After parsing all frames, call close() to close the file and free all resources.
| videoparser::VideoParser::VideoParser | ( | const char * | filename | ) |
Construct a new Video Parser object.
Opens the specified video file and initializes the parser. This constructor will throw exceptions if the file cannot be opened or if no video stream is found.
| filename | C-style string path to the video file to parse |
| std::runtime_error | If the file cannot be opened or no video stream is found |
| void videoparser::VideoParser::close | ( | ) |
Close the video file and free resources.
This method should be called after parsing is complete to properly close the video file and free all allocated resources.
| SequenceInfo videoparser::VideoParser::get_sequence_info | ( | ) |
Get information about the video sequence.
This method can be called either before or after parsing frames.
| bool videoparser::VideoParser::parse_frame | ( | FrameInfo & | frame_info | ) |
Parse the next frame in the video.
This method should be called in a loop to parse all frames in the video. It will fill the provided frame_info struct with information about the parsed frame.
| frame_info | Reference to a FrameInfo struct to be filled with frame information |