OSDN Git Service

dummy implement
[tsremuxcpp/developing01.git] / src / Form1.cc
1 #include <stdio.h>
2 #include <string>
3 #include "Form1.h"
4
5 namespace TsRemux {
6
7 ExecCondition::ExecCondition(void)
8 {
9     input_file_text_ = NULL;
10     use_async_io_ = false;
11     bypass_audio_processing_ = false;
12     mip_to_ac3_ = false;
13     keep_con_open_ = false;
14     output_file_text_ = NULL;
15     m2ts_format_ = false;
16     ts_format_ = false;
17     bluray_format_ = false;
18 }
19
20 ExecCondition::~ExecCondition(void)
21 {
22 }
23
24 TsRemux::TsRemux(int argc, char *argv[])
25 {
26     argc_ = argc;
27     argv_ = argv;
28     Init();
29
30
31 TsRemux::~TsRemux(void)
32 {
33 }
34
35 int TsRemux::Exec(void)
36 {
37     for(int i=0; i<argc_; i++) {
38         printf("arg[%d]=[%s]\n", i, argv_[i]);
39     }
40     printf("");
41     printf("");
42     if(argc_ < 3){
43         printf("usage: tsremux input-file output-path [-a] [+b] [+m] [+c]\n");
44         printf("   -a: do not use async io (default on)\n");
45         printf("   +b: bypass audio alignment (default off)\n");
46         printf("   +m: trueHd to ac3 (default off)\n");
47         printf("   +c: keep console open when done (win2k)\n");
48         printf("   output extension cotrols processing:\n");
49         printf("       ts, m2ts, none for bluray directory\n");
50         return 0;
51     }
52
53     exec_condition_.input_file_text_ = argv_[1];
54     exec_condition_.use_async_io_ = false;
55     exec_condition_.bypass_audio_processing_ = false;
56     exec_condition_.mip_to_ac3_ = false;
57
58     for(int i=3; i < argc_; i++) {
59         if(!strncmp(argv_[i], "-a", 2)) {
60             exec_condition_.use_async_io_ = true;
61         } else if(!strncmp(argv_[i], "+b", 2)) {
62             exec_condition_.bypass_audio_processing_ = true;
63         } else if(!strncmp(argv_[i], "+c", 2)) {
64             exec_condition_.keep_con_open_ = true;
65         } else if(!strncmp(argv_[i], "+m", 2)) {
66             exec_condition_.mip_to_ac3_ = true;
67         } else {
68             printf("unrecognized option: %s \n", argv_[i]);
69         }
70     }
71
72     exec_condition_.output_file_text_ = argv_[2];
73     char* output_extension;
74     for(int i = strlen(exec_condition_.output_file_text_)-1; i >= 0; i--) {
75         if(!strncmp(&exec_condition_.output_file_text_[i], ".", 1)) {
76              strncpy(output_extension,
77                  &exec_condition_.output_file_text_[i],
78                  strlen(&exec_condition_.output_file_text_[i]));
79         }
80     }
81     if(!strncmp(output_extension, ".m2ts", 5)) {
82         exec_condition_.m2ts_format_ = true;
83     } else if(!strncmp(output_extension, ".ts", 3)) {
84         exec_condition_.ts_format_= true;
85     } else if(!strncmp(output_extension, ".", 1)) {
86         exec_condition_.bluray_format_= true;
87     } else {
88         printf("unrecognized output type\n");
89     }
90
91     say(argv_[2]);
92     return 0;
93 }
94
95 void TsRemux::say(char* txt)
96 {
97     printf("%s\n", txt);
98 }
99
100 void TsRemux::Init(void)
101 {
102 }
103
104 void DisableNumerics(void)
105 {
106     return;
107 }
108 void DisableSup(void)
109 {
110     return;
111 }
112 void EnableSup(void)
113 {
114     return;
115 }
116 void EnableNumerics(void)
117 {
118     return;
119 }
120 void OpenFile(std::string filename)
121 {
122     return; 
123 }
124 void OpenInputFileDialog_FileOK()
125 {
126     return;
127 }
128 void AsyncOpenFile(std::string filename)
129 {
130     return;
131 }
132 void InputFileBrowseButton_Click()
133 {
134     return;
135 }
136 void EnableCbxMlp(void)
137 {
138     return;
139 }
140 void ElementaryStreamListBox_ItemCheck()
141 {
142     return;
143 }
144 void Quit_Click()
145 {
146     return;
147 }
148 void RemuxButton_Click()
149 {
150     return;
151 }
152 void backgroundWorker1_DoWork()
153 {
154     return;
155 }
156 void backgroundWorker1_ProgressChanged()
157 {
158     return;
159 }
160 void backgroundWorker1_RunWorkerCompleted()
161 {
162     return;
163 }
164 void RemuxButton_MouseEnter()
165 {
166     return;
167 }
168 void RemuxButton_MouseLeave()
169 {
170     return;
171 }
172 void TsRemux_DragDrop()
173 {
174     return;
175 }
176 void TsRemux_DragEnter()
177 {
178     return;
179 }
180 void TrimStartNumericHours_ValueChanged()
181 {
182     return;
183 }
184 void TrimStartNumericMinutes_ValueChanged()
185 {
186     return;
187 }
188 void TrimStartNumericSeconds_ValueChanged()
189 {
190     return;
191 }
192 void TrimEndNumericHours_ValueChanged()
193 {
194     return;
195 }
196 void TrimEndNumericMinutes_ValueChanged()
197 {
198     return;
199 }
200 void TrimEndNumericSeconds_ValueChanged()
201 {
202     return;
203 }
204 void CheckTrimStart(void)
205 {
206     return;
207 }
208 void CheckSupStart(void)
209 {
210     return;
211 }
212 void CheckChapterLen(void)
213 {
214     return;
215 }
216 void CheckTrimEnd(void)
217 {
218     return;
219 }
220 void ElementaryContextMenu_Opening()
221 {
222     return;
223 }
224 void AddStream_Click()
225 {
226     return;
227 }
228 void RemoveStream_Click()
229 {
230     return;
231 }
232 void DemuxElementary_Click()
233 {
234     return;
235 }
236 void DemuxPes_Click()
237 {
238     return;
239 }
240 void DemuxSup_Click()
241 {
242     return;
243 }
244 void SaveElementaryStream_FileOK()
245 {
246     return;
247 }
248 void RemoveSup(void)
249 {
250     return;
251 }
252 void OpenSupFileDialog_FileOK()
253 {
254     return;
255 }
256 bool PidExist(unsigned short pid)
257 {
258     return false;
259 }
260 void SupOffsetNumericSeconds_ValueChanged()
261 {
262     return;
263 }
264 void SupOffsetNumericMinutes_ValueChanged()
265 {
266     return;
267 }
268 void SupOffsetNumericHours_ValueChanged()
269 {
270     return;
271 }
272 void TsFormatRadioButton_CheckedChenged()
273 {
274     return;
275 }
276 void M2tsFormatRadioButton_CheckedChanged()
277 {
278     return;
279 }
280 void backgroundWorker2_Dowork()
281 {
282     return;
283 }
284 void backgroundWorker2_ProgressChanged()
285 {
286     return;
287 }
288 void backgroundWorker2_RunWorkerCompleted()
289 {
290     return;
291 }
292
293 }  //namespace
294