D not fuse - zwhen runnnin gthesmake test. Don't force b_force_latency ofr Perf/Fork sample (#85)

This commit is contained in:
Aryan Salmanpour
2023-11-27 12:33:28 -05:00
committato da GitHub
parent 57c040eff8
commit 8898af78a6
4 ha cambiato i file con 27 aggiunte e 10 eliminazioni
+11 -2
Vedi File
@@ -64,7 +64,8 @@ void ShowHelpAndExit(const char *option = NULL) {
std::cout << "Options:" << std::endl
<< "-i Input File Path - required" << std::endl
<< "-t Number of threads (>= 1) - optional; default: 4" << std::endl
<< "-d Device ID (>= 0) - optional; default: 0" << std::endl;
<< "-d Device ID (>= 0) - optional; default: 0" << std::endl
<< "-z force_zero_latency (force_zero_latency, Decoded frames will be flushed out for display immediately); optional;" << std::endl;
exit(0);
}
@@ -75,6 +76,7 @@ int main(int argc, char **argv) {
int n_thread = 4;
Rect *p_crop_rect = nullptr;
OutputSurfaceMemoryType mem_type = OUT_SURFACE_MEM_DEV_INTERNAL; // set to internal
bool b_force_zero_latency = false;
// Parse command-line arguments
if(argc < 1) {
ShowHelpAndExit();
@@ -110,6 +112,13 @@ int main(int argc, char **argv) {
}
continue;
}
if (!strcmp(argv[i], "-z")) {
if (i == argc) {
ShowHelpAndExit("-z");
}
b_force_zero_latency = true;
continue;
}
ShowHelpAndExit(argv[i]);
}
@@ -157,7 +166,7 @@ int main(int argc, char **argv) {
std::unique_ptr<VideoDemuxer> demuxer(new VideoDemuxer(input_file_path.c_str()));
rocDecVideoCodec rocdec_codec_id = AVCodec2RocDecVideoCodec(demuxer->GetCodecID());
v_device_id[i] = (i % 2 == 0) ? 0 : sd;
std::unique_ptr<RocVideoDecoder> dec(new RocVideoDecoder(v_device_id[i], mem_type, rocdec_codec_id, false, true, p_crop_rect));
std::unique_ptr<RocVideoDecoder> dec(new RocVideoDecoder(v_device_id[i], mem_type, rocdec_codec_id, false, b_force_zero_latency, p_crop_rect));
v_demuxer.push_back(std::move(demuxer));
v_viddec.push_back(std::move(dec));
}