Utility functions for reading video frames from a file to the buffer structure and for writing from the buffer structure to a file.
Functions | |
| int | read_video_frame (std::ifstream *stream, NvBuffer &buffer) |
| Reads a video frame from a file to the buffer structure. More... | |
| int | write_video_frame (std::ofstream *stream, NvBuffer &buffer) |
| Writes a video frame from the buffer structure to a file. More... | |
| int | read_dmabuf (int dmabuf_fd, unsigned int plane, std::ifstream *stream) |
| Reads a plane of data from a file to the buffer. More... | |
| int | dump_dmabuf (int dmabuf_fd, unsigned int plane, std::ofstream *stream) |
| Writes a plane of data from the buffer to a file. More... | |
| int | parse_csv_recon_file (std::ifstream *stream, std::string *recon_params) |
| Parses the reference recon file to write the Y, U and V checksums. More... | |
| int dump_dmabuf | ( | int | dmabuf_fd, |
| unsigned int | plane, | ||
| std::ofstream * | stream | ||
| ) |
Writes a plane of data from the buffer to a file.
| [in] | dmabuf_fd | The DMABUF file descriptor of the buffer. |
| [in] | plane | Index of the video frame plane. |
| [in] | stream | A pointer to the output file stream. |
| int parse_csv_recon_file | ( | std::ifstream * | stream, |
| std::string * | recon_params | ||
| ) |
Parses the reference recon file to write the Y, U and V checksums.
This function parses Y, U and V checksums from the reference recon file.
| [in] | stream | A pointer to the input recon file stream. |
| [in] | recon_params | A pointer to an array in which to store the parsed Y, U and V strings. |
| int read_dmabuf | ( | int | dmabuf_fd, |
| unsigned int | plane, | ||
| std::ifstream * | stream | ||
| ) |
Reads a plane of data from a file to the buffer.
| [in] | dmabuf_fd | The DMABUF file descriptor of the buffer. |
| [in] | plane | Index of the video frame plane. |
| [in] | stream | A pointer to the intput file stream. |
| int read_video_frame | ( | std::ifstream * | stream, |
| NvBuffer & | buffer | ||
| ) |
Reads a video frame from a file to the buffer structure.
This function reads data from the file into the buffer, one data plane at a time. For each data plane, the number of bytes read is:
or
| [in] | stream | A pointer to the input file stream. |
| [in] | buffer | A reference to the buffer object into which data is read. |
| int write_video_frame | ( | std::ofstream * | stream, |
| NvBuffer & | buffer | ||
| ) |
Writes a video frame from the buffer structure to a file.
This function writes data to the file from the buffer, one plane at a time. For each data plane, the number of bytes written is:
or
| [in] | stream | A pointer to the output file stream. |
| [in] | buffer | A reference to the buffer object from which data is written. |