Samples - Multi Threaded Multi FIles (#255)

* adding new sample for decoding mulitple files on multiple threads

* threads work ; no decoding yet

* working version

* code clean up

* review comments

* removing spaces

* review comments

* fps cal + name changes for files

* code clean up

* update readme

* update readme

* remove spaces

* change to lambda functions

* changes for using reconfig

* adding dumping of yuv frames + review comments

* review comments

* remove extra lines/spaces

* adding struct for decoder info

* make separate decoders for 8 & 10bit

* code clean up

* addign reset for Saving frames

* review comments

* fixes dump issue for new file

* cmake update for threads

* support for avc

* name change for sample

* cmake soource name change

* readme update

* fixing typo in readme

---------

Co-authored-by: Aryan Salmanpour <aryan.salmanpour@amd.com>
This commit is contained in:
Lakshmi Kumar
2024-03-07 17:29:14 -08:00
committed by GitHub
parent 5fdedf2351
commit ce3ebadaab
5 changed files with 563 additions and 0 deletions
+7
View File
@@ -966,6 +966,13 @@ void RocVideoDecoder::SaveFrameToFile(std::string output_file_name, void *surf_m
}
}
void RocVideoDecoder::ResetSaveFrameToFile() {
if (fp_out_) {
fclose(fp_out_);
fp_out_ = nullptr;
}
}
void RocVideoDecoder::InitMd5() {
md5_ctx_ = av_md5_alloc();
av_md5_init(md5_ctx_);
+5
View File
@@ -317,6 +317,11 @@ class RocVideoDecoder {
*/
void SaveFrameToFile(std::string output_file_name, void *surf_mem, OutputSurfaceInfo *surf_info);
/**
* @brief Helper funtion to close a existing file and dump to new file in case of multiple files using same decoder
*/
void ResetSaveFrameToFile();
/**
* @brief Helper function to start MD5 calculation
*/