Skip to content

Commit 136ec98

Browse files
committed
Add routing based on user input
1 parent 15fcdca commit 136ec98

File tree

3 files changed

+16
-2
lines changed

3 files changed

+16
-2
lines changed

include/ffmpeg-coder/quickConvertSettings.hpp

+1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ class QC_Settings{
2323
void showOptions();
2424
void default_encoding_configurer();
2525
void default_crf_configurer();
26+
void optionsRouter();
2627
};
2728

2829
#endif

src/frontend_funcs.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ void settings() {
5555
QC_Settings *qc = new QC_Settings();
5656

5757
qc->showOptions();
58-
qc->default_encoding_configurer();
58+
qc->optionsRouter();
5959
delete qc;
6060
}
6161

src/quickConvertSettings.cpp

+14-1
Original file line numberDiff line numberDiff line change
@@ -99,4 +99,17 @@ void QC_Settings::default_encoding_configurer(){
9999
}
100100
else
101101
std::cerr << "\nInvalid Option Selected ! Try again";
102-
}
102+
}
103+
104+
void QC_Settings::default_crf_configurer(){
105+
106+
}
107+
108+
void QC_Settings::optionsRouter(){
109+
if (userChoice == 1)
110+
default_encoding_configurer();
111+
else if (userChoice == 2)
112+
default_crf_configurer();
113+
else
114+
std::cout<<"Invalid choice. Try again"
115+
}

0 commit comments

Comments
 (0)