openshot-example: Path fixes

Instead of the hardcoded `/home/jonathan/...` input path, load the input file from TEST_MEDIA_PATH, defined as in `tests/CMakeLists.txt`
This commit is contained in:
FeRD (Frank Dana)
2019-09-13 07:48:57 -04:00
parent e3b6478a0b
commit 7fc214d803
2 changed files with 14 additions and 3 deletions

View File

@@ -43,12 +43,15 @@ int main(int argc, char* argv[]) {
s->HARDWARE_DECODER = 2; // 1 VA-API, 2 NVDEC
s->HW_DE_DEVICE_SET = 0;
FFmpegReader r9("/home/jonathan/Videos/sintel_trailer-720p.mp4");
std::string input_filepath = TEST_MEDIA_PATH;
input_filepath += "sintel_trailer-720p.mp4";
FFmpegReader r9(input_filepath);
r9.Open();
r9.DisplayInfo();
/* WRITER ---------------- */
FFmpegWriter w9("/home/jonathan/metadata.mp4");
FFmpegWriter w9("metadata.mp4");
// Set options
w9.SetAudioOptions(true, "libmp3lame", r9.info.sample_rate, r9.info.channels, r9.info.channel_layout, 128000);
@@ -83,4 +86,4 @@ int main(int argc, char* argv[]) {
cout << "Completed successfully!" << endl;
return 0;
}
}