1 /* ------------------------------------------------------------------
2 * Copyright (C) 1998-2009 PacketVideo
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
13 * express or implied.
14 * See the License for the specific language governing permissions
15 * and limitations under the License.
16 * -------------------------------------------------------------------
17 */
18 #ifndef TEST_PV_MEDIAINPUT_AUTHOR_ENGINE_H
19 #include "test_pv_mediainput_author_engine.h"
20 #endif
21
22 #ifndef TEST_PV_AUTHOR_ENGINE_TESTSET5_H_INCLUDED
23 #include "test_pv_author_engine_testset5.h"
24 #endif
25
26 #ifndef TEST_PV_AUTHOR_ENGINE_TESTSET6_H_INCLUDED
27 #include "test_pv_author_engine_testset6.h"
28 #endif
29
30 #ifndef TEST_PV_AUTHOR_ENGINE_TESTSET7_H_INCLUDED
31 #include "test_pv_author_engine_testset7.h"
32 #endif
33
34 #ifndef TEST_PV_AUTHOR_ENGINE_TESTSET8_H_INCLUDED
35 #include "test_pv_author_engine_testset8.h"
36 #endif
37
38 #define DEFAULT_LOOPTIME 60 //secs
Set_Default_Params(int32 aTestnum,PVMediaInputTestParam & aMediaInputParam)39 bool PVMediaInputAuthorEngineTest::Set_Default_Params(int32 aTestnum, PVMediaInputTestParam& aMediaInputParam)
40 {
41 aMediaInputParam.iInputFormat = DEFAULTSOURCEFORMATTYPE;
42
43 if (iAsap)
44 {
45 aMediaInputParam.iRealTimeAuthoring = false;
46 }
47
48 bool retval = true;
49 switch (aTestnum)
50 {
51 case CapConfigTest:
52 {
53 aMediaInputParam.iIPFileInfo = KPCM_YUV_AVI_FILENAME;
54 aMediaInputParam.iOPFileInfo = KCAPCONFIG_OUTPUT;
55 }
56 break;
57
58 case PVMediaInput_Open_Compose_Stop_Test:
59 case PVMediaInput_Open_Compose_Stop_Test_UsingExternalFileHandle:
60 {
61 if ((iFirstTest != iLastTest) || (aMediaInputParam.iIPFileInfo.get_size() == 0))
62 {
63 aMediaInputParam.iIPFileInfo = DEFAULTSOURCEFILENAME;
64 }
65 if ((iFirstTest != iLastTest) || (aMediaInputParam.iOPFileInfo.get_size() == 0))
66 {
67 aMediaInputParam.iOPFileInfo = DEFAULTOUTPUTFILENAME;
68 }
69 }
70 break;
71
72 case ErrorHandling_VideoInitFailed:
73 case ErrorHandling_VideoEncodeFailed:
74 case ErrorHandling_VideoEncode5FramesFailed:
75 case ErrorHandling_ComposerAddFragFailed:
76 case ErrorHandling_ComposerAddTrackFailed:
77 case ErrorHandling_MediaInputNodeStopFailed:
78 case ErrorHandling_AudioInitFailed:
79 case ErrorHandling_AudioEncodeFailed:
80 case ErrorHandling_MediaInputNode_NoMemBuffer:
81 case ErrorHandling_MediaInputNode_large_time_stamp:
82 case ErrorHandling_MediaInputNode_wrong_time_stamp_after_duration:
83 case ErrorHandling_MediaInputNode_zero_time_stamp:
84 case ErrorHandling_MediaInputNode_StateFailure_EPause_SendMIORequest:
85 case ErrorHandling_MediaInputNode_StateFailure_CancelMIORequest:
86 case ErrorHandling_MediaInputNode_Corrupt_Video_InputData:
87 case ErrorHandling_MediaInputNode_Corrupt_Audio_InputData:
88 case ErrorHandling_MediaInputNode_Node_Cmd_Start:
89 case ErrorHandling_MediaInputNode_Node_Cmd_Stop:
90 case ErrorHandling_MediaInputNode_Node_Cmd_Flush:
91 case ErrorHandling_MediaInputNode_Node_Cmd_Pause:
92 case ErrorHandling_MediaInputNode_Node_Cmd_ReleasePort:
93 case ErrorHandling_MediaInputNode_DataPath_Stall:
94 case ErrorHandling_MP4Composer_AddTrack_PVMF_AMR_IETF:
95 case ErrorHandling_MP4Composer_AddTrack_PVMF_3GPP_TIMEDTEXT:
96 case ErrorHandling_MP4Composer_AddTrack_PVMF_M4V:
97 case ErrorHandling_MP4Composer_AddTrack_PVMF_H263:
98 case ErrorHandling_MP4Composer_AddTrack_PVMF_H264_MP4:
99 case ErrorHandling_MP4Composer_Node_Cmd_Start:
100 case ErrorHandling_MP4Composer_Node_Cmd_Stop:
101 case ErrorHandling_MP4Composer_Node_Cmd_Flush:
102 case ErrorHandling_MP4Composer_Node_Cmd_Pause:
103 case ErrorHandling_MP4Composer_Node_Cmd_ReleasePort:
104 case ErrorHandling_MP4Composer_Create_FileParser:
105 case ErrorHandling_MP4Composer_RenderToFile:
106 case ErrorHandling_MP4Composer_FailAfter_FileSize:
107 case ErrorHandling_MP4Composer_FailAfter_Duration:
108 case ErrorHandling_MP4Composer_DataPathStall:
109 case ErrorHandling_VideoEncodeNode_Node_Cmd_Start:
110 case ErrorHandling_VideoEncodeNode_Node_Cmd_Stop:
111 case ErrorHandling_VideoEncodeNode_Node_Cmd_Flush:
112 case ErrorHandling_VideoEncodeNode_Node_Cmd_Pause:
113 case ErrorHandling_VideoEncodeNode_Node_Cmd_ReleasePort:
114 case ErrorHandling_VideoEncodeNode_ConfigHeader:
115 case ErrorHandling_VideoEncodeNode_DataPathStall_Before_ProcessingData:
116 case ErrorHandling_VideoEncodeNode_DataPathStall_After_ProcessingData:
117 case ErrorHandling_VideoEncodeNode_FailEncode_AfterDuration:
118 case ErrorHandling_AudioEncodeNode_Node_Cmd_Start:
119 case ErrorHandling_AudioEncodeNode_Node_Cmd_Stop:
120 case ErrorHandling_AudioEncodeNode_Node_Cmd_Flush:
121 case ErrorHandling_AudioEncodeNode_Node_Cmd_Pause:
122 case ErrorHandling_AudioEncodeNode_Node_Cmd_ReleasePort:
123 case ErrorHandling_AudioEncodeNode_FailEncode_AfterDuration:
124 case ErrorHandling_AudioEncodeNode_DataPathStall_Before_ProcessingData:
125 case ErrorHandling_AudioEncodeNode_DataPathStall_After_ProcessingData:
126 case ErrorHandling_MediaInputNode_Out_Queue_busy:
127 {
128 aMediaInputParam.iIPFileInfo = DEFAULTSOURCEFILENAME;
129 aMediaInputParam.iOPFileInfo = DEFAULTOUTPUTFILENAME;
130 aMediaInputParam.iRealTimeAuthoring = false;
131 }
132 break;
133 case ErrorHandling_AVCEncodeNode_Node_Cmd_Start:
134 case ErrorHandling_AVCEncodeNode_Node_Cmd_Stop:
135 case ErrorHandling_AVCEncodeNode_Node_Cmd_Flush:
136 case ErrorHandling_AVCEncodeNode_Node_Cmd_Pause:
137 case ErrorHandling_AVCEncodeNode_Node_Cmd_ReleasePort:
138 case ErrorHandling_AVCEncodeNode_ConfigHeader:
139 case ErrorHandling_AVCEncodeNode_DataPathStall_Before_ProcessingData:
140 case ErrorHandling_AVCEncodeNode_DataPathStall_After_ProcessingData:
141 case ErrorHandling_AVCEncodeNode_FailEncode_AfterDuration:
142 case ErrorHandling_AVCVideoEncodeFailed:
143 case ErrorHandling_AVCVideoEncode5FramesFailed:
144 {
145 aMediaInputParam.iIPFileInfo = DEFAULTSOURCEFILENAME;
146 aMediaInputParam.iOPFileInfo = DEFAULTOUTPUTFILENAME;
147 aMediaInputParam.iVideoEncInfo = KH264EncMimeType;
148 aMediaInputParam.iRealTimeAuthoring = false;
149
150 }
151 break;
152 case PVMediaInput_Open_RealTimeCompose_Stop_Test:
153 {
154 aMediaInputParam.iIPFileInfo = DEFAULTSOURCEFILENAME;
155 aMediaInputParam.iRealTimeAuthoring = true;
156 aMediaInputParam.iOPFileInfo = KMediaInput_Open_RealTimeCompose_Output;
157 }
158 break;
159 case PVMediaInput_Pause_Resume_Test:
160 case PVMediaInput_Reset_After_Create_Test:
161 case PVMediaInput_Reset_After_Open_Test:
162 case PVMediaInput_Reset_After_AddDataSource_Test:
163 case PVMediaInput_Reset_After_SelectComposer_Test:
164 case PVMediaInput_Reset_After_AddMediaTrack_Test:
165 case PVMediaInput_Reset_After_Init_Test:
166 case PVMediaInput_Reset_After_Start_Test:
167 case PVMediaInput_Reset_After_Pause_Test:
168 case PVMediaInput_Reset_After_Recording_Test:
169 case PVMediaInput_Reset_After_Stop_Test:
170
171 case PVMediaInput_Delete_After_Create_Test:
172 case PVMediaInput_Delete_After_Open_Test:
173 case PVMediaInput_Delete_After_AddDataSource_Test:
174 case PVMediaInput_Delete_After_SelectComposer_Test:
175 case PVMediaInput_Delete_After_AddMediaTrack_Test:
176 case PVMediaInput_Delete_After_Init_Test:
177 case PVMediaInput_Delete_After_Start_Test:
178 case PVMediaInput_Delete_After_Pause_Test:
179 case PVMediaInput_Delete_After_Recording_Test:
180 case PVMediaInput_Delete_After_Stop_Test:
181
182 {
183 aMediaInputParam.iIPFileInfo = DEFAULTSOURCEFILENAME;
184 aMediaInputParam.iOPFileInfo = DEFAULTOUTPUTFILENAME;
185 }
186 break;
187 case AVI_Input_Longetivity_Test:
188 {
189 if ((iFirstTest != iLastTest) || (aMediaInputParam.iIPFileInfo.get_size() == 0))
190 {
191 aMediaInputParam.iIPFileInfo = DEFAULTSOURCEFILENAME;
192 }
193 if ((iFirstTest != iLastTest) || (aMediaInputParam.iOPFileInfo.get_size() == 0))
194 {
195 aMediaInputParam.iOPFileInfo = KAVI_Input_Long_OUTPUT;
196 }
197 if (0 == aMediaInputParam.iLoopTime)
198 {
199 aMediaInputParam.iLoopTime = DEFAULT_LOOPTIME;
200 }
201 }
202 break;
203
204 case YUV_Input_VOnly_3gpTest:
205 {
206 aMediaInputParam.iIPFileInfo = KYUV_AVI_VIDEO_ONLY;
207 aMediaInputParam.iOPFileInfo = KYUV_VOnly_3GPP_Output;
208 }
209 break;
210
211 case H264_Input_VOnly_3gpTest:
212 {
213 aMediaInputParam.iIPFileInfo = KYUV_AVI_VIDEO_ONLY;
214 aMediaInputParam.iOPFileInfo = KH264_VOnly_MP4_Output;
215 }
216 break;
217
218 case PCM16_Input_AOnly_3gpTest:
219 {
220 aMediaInputParam.iIPFileInfo = KPCM_AVI_AUDIO_ONLY;
221 aMediaInputParam.iInputFormat = PVMF_MIME_WAVFF;
222 aMediaInputParam.iOPFileInfo = KPCM_AOnly_3GPP_Output;
223 }
224 break;
225
226 case PCM16In_AMROut_Test:
227 {
228 aMediaInputParam.iIPFileInfo = KPCM_AVI_AUDIO_ONLY;
229 aMediaInputParam.iOPFileInfo = KPCM16_AMR_TestOutput;
230 aMediaInputParam.iInputFormat = PVMF_MIME_WAVFF;
231 }
232 break;
233
234 case PCM16_YUV_Input_AV_3gpTest:
235 {
236 aMediaInputParam.iIPFileInfo = KPCM_YUV_AVI_FILENAME;
237 aMediaInputParam.iOPFileInfo = KPCM_YUV_AV_3GPP_Output;
238 }
239 break;
240
241 case KMaxFileSizeTest:
242 {
243 aMediaInputParam.iIPFileInfo = KPCM_YUV_AVI_FILENAME;
244 aMediaInputParam.iOPFileInfo = KMaxFileSizeTestOutput;
245 }
246 break;
247
248 case KMaxFileSizeLongetivityTest:
249 {
250 if ((iFirstTest != iLastTest) || (aMediaInputParam.iIPFileInfo.get_size() == 0))
251 {
252 aMediaInputParam.iIPFileInfo = KPCM_YUV_AVI_FILENAME;
253 }
254 if ((iFirstTest != iLastTest) || (aMediaInputParam.iOPFileInfo.get_size() == 0))
255 {
256 aMediaInputParam.iOPFileInfo = KMaxFileSize_long_Output;
257 }
258 if (0 == aMediaInputParam.iLoopTime)
259 {
260 aMediaInputParam.iLoopTime = DEFAULT_LOOPTIME;
261 }
262 }
263 break;
264
265
266 case K3GPPDownloadModeTest:
267 {
268 aMediaInputParam.iIPFileInfo = KPCM_YUV_AVI_FILENAME;
269 aMediaInputParam.iOPFileInfo = K3GPPDOWNLOADMODE_OUTPUT;
270 }
271 break;
272
273 case K3GPPDownloadModeLongetivityTest:
274 {
275 if ((iFirstTest != iLastTest) || (aMediaInputParam.iIPFileInfo.get_size() == 0))
276 {
277 aMediaInputParam.iIPFileInfo = KPCM_YUV_AVI_FILENAME;
278 }
279 if ((iFirstTest != iLastTest) || (aMediaInputParam.iOPFileInfo.get_size() == 0))
280 {
281 aMediaInputParam.iOPFileInfo = K3GPPDOWNLOADMODE_Long_OUTPUT;
282 }
283 if (0 == aMediaInputParam.iLoopTime)
284 {
285 aMediaInputParam.iLoopTime = DEFAULT_LOOPTIME;
286 }
287 }
288 break;
289
290 case K3GPPProgressiveDownloadModeTest:
291 {
292 aMediaInputParam.iIPFileInfo = KPCM_YUV_AVI_FILENAME;
293 aMediaInputParam.iOPFileInfo = K3GPPPROGRESSIVEDOWNLOADMODE_OUTPUT;
294 }
295 break;
296
297 case K3GPPProgressiveDownloadModeLongetivityTest:
298 {
299 if ((iFirstTest != iLastTest) || (aMediaInputParam.iIPFileInfo.get_size() == 0))
300 {
301 aMediaInputParam.iIPFileInfo = KPCM_YUV_AVI_FILENAME;
302 }
303 if ((iFirstTest != iLastTest) || (aMediaInputParam.iOPFileInfo.get_size() == 0))
304 {
305 aMediaInputParam.iOPFileInfo = K3GPPPROGRESSIVEDOWNLOADMODE_Long_OUTPUT;
306 }
307 if (0 == aMediaInputParam.iLoopTime)
308 {
309 aMediaInputParam.iLoopTime = DEFAULT_LOOPTIME;
310 }
311 }
312 break;
313
314 case KMovieFragmentModeTest:
315 {
316 aMediaInputParam.iIPFileInfo = KPCM_YUV_AVI_FILENAME;
317 aMediaInputParam.iOPFileInfo = KMOVIEFRAGMENTMODE_OUTPUT;
318 }
319 break;
320
321 case KMovieFragmentModeLongetivityTest:
322 {
323 if ((iFirstTest != iLastTest) || (aMediaInputParam.iIPFileInfo.get_size() == 0))
324 {
325 aMediaInputParam.iIPFileInfo = KPCM_YUV_AVI_FILENAME;
326 }
327 if ((iFirstTest != iLastTest) || (aMediaInputParam.iOPFileInfo.get_size() == 0))
328 {
329 aMediaInputParam.iOPFileInfo = KMOVIEFRAGMENTMODE_Long_OUTPUT;
330 }
331 if (0 == aMediaInputParam.iLoopTime)
332 {
333 aMediaInputParam.iLoopTime = DEFAULT_LOOPTIME;
334 }
335 }
336 break;
337
338 case PVMediaInput_ErrorHandling_Test_WrongFormat:
339 {
340 aMediaInputParam.iIPFileInfo = FILE_NAME_ERROR_HANDLING;
341 aMediaInputParam.iInputFormat = DEFAULTSOURCEFORMATTYPE;
342 }
343 break;
344
345 case PVMediaInput_ErrorHandling_Test_WrongIPFileName:
346 {
347 aMediaInputParam.iIPFileInfo = WRONGIPFILENAME_ERRORHANDLING;
348 aMediaInputParam.iInputFormat = DEFAULTSOURCEFORMATTYPE;
349 }
350 break;
351
352 case ErrorHandling_WrongOutputPathTest:
353 {
354 aMediaInputParam.iIPFileInfo = DEFAULTSOURCEFILENAME;
355 aMediaInputParam.iOPFileInfo = WRONGOPFILENAME_ERRORHANDLING;
356 }
357 break;
358 default:
359 retval = false;
360 break;
361 }
362 return retval;
363 }
364
test()365 void PVMediaInputAuthorEngineTest::test()
366 {
367 iTotalSuccess = 0;
368 iTotalFail = 0;
369 iTotalError = 0;
370 PVAECmdType resetState = PVAE_CMD_CREATE;
371
372 if (iNextTestCase < UnCompressed_NormalTestBegin)
373 {
374 iNextTestCase = UnCompressed_NormalTestBegin;
375 }
376
377 while ((iNextTestCase <= iLastTest) || (iNextTestCase < Invalid_Test))
378 {
379 if (iCurrentTest)
380 {
381 delete iCurrentTest;
382 iCurrentTest = NULL;
383
384 // Shutdown PVLogger and scheduler before checking mem stats
385 CleanupLoggerScheduler();
386 #if !(OSCL_BYPASS_MEMMGT)
387 // Print out the memory usage results for this test case
388 OsclAuditCB auditCB;
389 OsclMemInit(auditCB);
390 if (auditCB.pAudit)
391 {
392 MM_Stats_t* stats = auditCB.pAudit->MM_GetStats("");
393 if (stats)
394 {
395 fprintf(iFile, " Mem stats: TotalAllocs(%d), TotalBytes(%d),\n AllocFailures(%d), AllocLeak(%d)\n",
396 stats->totalNumAllocs - iTotalAlloc, stats->totalNumBytes - iTotalBytes, stats->numAllocFails - iAllocFails, stats->numAllocs - iNumAllocs);
397 }
398 else
399 {
400 fprintf(iFile, "Retrieving memory statistics after running test case failed! Memory statistics result is not available.\n");
401 }
402 }
403 else
404 {
405 fprintf(iFile, "Memory audit not available! Memory statistics result is not available.\n");
406 }
407 #endif
408
409 } //iCurrentTest
410
411 #if !(OSCL_BYPASS_MEMMGT)
412 // Obtain the current mem stats before running the test case
413 OsclAuditCB auditCB;
414 OsclMemInit(auditCB);
415
416 if (auditCB.pAudit)
417 {
418 MM_Stats_t* stats = auditCB.pAudit->MM_GetStats("");
419 if (stats)
420 {
421 iTotalAlloc = stats->totalNumAllocs;
422 iTotalBytes = stats->totalNumBytes;
423 iAllocFails = stats->numAllocFails;
424 iNumAllocs = stats->numAllocs;
425 }
426 else
427 {
428 fprintf(iFile, "Retrieving memory statistics before running test case failed! Memory statistics result would be invalid.\n");
429 }
430 }
431 else
432 {
433 fprintf(iFile, "Memory audit not available! Memory statistics result would be invalid.\n");
434 }
435 #endif
436 if (iNextTestCase > iLastTest)
437 {
438 iNextTestCase = Invalid_Test;
439 }
440 else
441 {
442 if ((iNextTestCase >= UnCompressed_NormalTestEnd && iNextTestCase <= UnCompressed_LongetivityTestBegin) && (iLastTest >= UnCompressed_LongetivityTestBegin))
443 {
444 iNextTestCase = UnCompressed_LongetivityTestBegin;
445 iNextTestCase++;
446 }
447
448 if ((UnCompressed_NormalTestBegin == iNextTestCase) || (UnCompressed_LongetivityTestBegin == iNextTestCase)
449 || (KUnCompressed_Errorhandling_TestBegin == iNextTestCase) || (UnCompressed_NormalTestEnd == iNextTestCase))
450 {
451 fprintf(iFile, "\nPlace Holder Not actual testcase %d: ", iNextTestCase);
452 iNextTestCase++;
453 }
454
455 if ((iNextTestCase > UnCompressed_NormalTestEnd) && (iLastTest < UnCompressed_LongetivityTestBegin))
456 {
457 iNextTestCase = Invalid_Test;
458 }//stop at last test
459 else if ((UnCompressed_LongetivityTestEnd == iNextTestCase) || (KUnCompressed_Errorhandling_TestEnd == iNextTestCase))
460 {
461 fprintf(iFile, "\nPlace Holder Not actual testcase %d: ", iNextTestCase);
462 iNextTestCase = Invalid_Test;
463 }
464 else
465 {
466 fprintf(iFile, "\nStarting Test %d: ", iNextTestCase);
467 InitLoggerScheduler();
468 }
469 }
470
471 PVAuthorAsyncTestParam testparam;
472 testparam.iObserver = this;
473 testparam.iTestCase = this;
474 testparam.iTestCaseNum = iNextTestCase;
475 testparam.iStdOut = iFile;
476 if (!Set_Default_Params(iNextTestCase, iMediaInputParam) && (Invalid_Test != iNextTestCase))
477 {
478 fprintf(iFile, "\nNo Default Parameters specified for test case:%d\n", iNextTestCase);
479 }
480
481 switch (iNextTestCase)
482 {
483 case PVMediaInput_Open_Compose_Stop_Test:
484 case PVMediaInput_Open_RealTimeCompose_Stop_Test:
485 case YUV_Input_VOnly_3gpTest:
486 case H264_Input_VOnly_3gpTest:
487 case PCM16_Input_AOnly_3gpTest:
488 case PCM16_YUV_Input_AV_3gpTest:
489 case PCM16In_AMROut_Test:
490 case KMaxFileSizeTest:
491
492 case K3GPPDownloadModeTest:
493 case K3GPPProgressiveDownloadModeTest:
494 case CapConfigTest:
495 case AVI_Input_Longetivity_Test:
496 case KMaxFileSizeLongetivityTest:
497 case K3GPPDownloadModeLongetivityTest:
498 case K3GPPProgressiveDownloadModeLongetivityTest:
499 case KMovieFragmentModeLongetivityTest:
500 {
501 Print_TestCase_Name(iNextTestCase);
502 iCurrentTest = new pv_mediainput_async_test_opencomposestop(testparam, iMediaInputParam, false);
503 // Go to next test
504 ++iNextTestCase;
505 }
506 break;
507 case PVMediaInput_Open_Compose_Stop_Test_UsingExternalFileHandle:
508 {
509 Print_TestCase_Name(iNextTestCase);
510 iCurrentTest = new pv_mediainput_async_test_opencomposestop(testparam, iMediaInputParam, false, true);
511 // Go to next test
512 ++iNextTestCase;
513 }
514 break;
515 case PVMediaInput_Pause_Resume_Test:
516 {
517 fprintf(iFile, "Pause Resume test with AVI/WAV MIO Comp:\n");
518 iCurrentTest = new pv_mediainput_async_test_opencomposestop(testparam, iMediaInputParam, true);
519 // Go to next test
520 ++iNextTestCase;
521 }
522 break;
523 case PVMediaInput_ErrorHandling_Test_WrongFormat:
524 {
525 fprintf(iFile, "Error Handling Wrong Format test with AVI/WAV MIO Comp\n");
526 iCurrentTest = new pv_mediainput_async_test_errorhandling(testparam, iMediaInputParam, false, iNextTestCase);
527
528 // Go to next test
529 ++iNextTestCase;
530 }
531 break;
532
533 case PVMediaInput_ErrorHandling_Test_WrongIPFileName:
534 case ErrorHandling_WrongOutputPathTest:
535 {
536 Print_TestCase_Name(iNextTestCase);
537 iCurrentTest = new pv_mediainput_async_test_errorhandling(testparam, iMediaInputParam, false, iNextTestCase);
538
539 // Go to next test
540 ++iNextTestCase;
541 }
542 break;
543
544 case ErrorHandling_AVCVideoEncodeFailed:
545 case ErrorHandling_AVCVideoEncode5FramesFailed:
546 {
547 iMediaInputParam.iVideoEncInfo = KH264EncMimeType;
548 }
549 case ErrorHandling_VideoInitFailed:
550 case ErrorHandling_VideoEncodeFailed:
551 case ErrorHandling_VideoEncode5FramesFailed:
552 case ErrorHandling_ComposerAddFragFailed:
553 case ErrorHandling_ComposerAddTrackFailed:
554 case ErrorHandling_MediaInputNodeStopFailed:
555 case ErrorHandling_AudioInitFailed:
556 case ErrorHandling_AudioEncodeFailed:
557 case ErrorHandling_MediaInputNode_NoMemBuffer:
558 case ErrorHandling_MediaInputNode_Out_Queue_busy:
559 case ErrorHandling_MediaInputNode_large_time_stamp:
560 case ErrorHandling_MediaInputNode_wrong_time_stamp_after_duration:
561 case ErrorHandling_MediaInputNode_zero_time_stamp:
562 case ErrorHandling_MediaInputNode_StateFailure_EPause_SendMIORequest:
563 case ErrorHandling_MediaInputNode_StateFailure_CancelMIORequest:
564 case ErrorHandling_MediaInputNode_Corrupt_Video_InputData:
565 case ErrorHandling_MediaInputNode_Corrupt_Audio_InputData:
566 case ErrorHandling_MediaInputNode_Node_Cmd_Start:
567 case ErrorHandling_MediaInputNode_Node_Cmd_Stop:
568 case ErrorHandling_MediaInputNode_Node_Cmd_Flush:
569 case ErrorHandling_MediaInputNode_Node_Cmd_Pause:
570 case ErrorHandling_MediaInputNode_Node_Cmd_ReleasePort:
571 case ErrorHandling_MediaInputNode_DataPath_Stall:
572 case ErrorHandling_MP4Composer_AddTrack_PVMF_AMR_IETF:
573 case ErrorHandling_MP4Composer_AddTrack_PVMF_3GPP_TIMEDTEXT:
574 case ErrorHandling_MP4Composer_AddTrack_PVMF_M4V:
575 case ErrorHandling_MP4Composer_AddTrack_PVMF_H263:
576 case ErrorHandling_MP4Composer_AddTrack_PVMF_H264_MP4:
577 case ErrorHandling_MP4Composer_Node_Cmd_Start:
578 case ErrorHandling_MP4Composer_Node_Cmd_Stop:
579 case ErrorHandling_MP4Composer_Node_Cmd_Flush:
580 case ErrorHandling_MP4Composer_Node_Cmd_Pause:
581 case ErrorHandling_MP4Composer_Node_Cmd_ReleasePort:
582 case ErrorHandling_MP4Composer_Create_FileParser:
583 case ErrorHandling_MP4Composer_RenderToFile:
584 case ErrorHandling_MP4Composer_FailAfter_FileSize:
585 case ErrorHandling_MP4Composer_FailAfter_Duration:
586 case ErrorHandling_MP4Composer_DataPathStall:
587 case ErrorHandling_VideoEncodeNode_Node_Cmd_Start:
588 case ErrorHandling_VideoEncodeNode_Node_Cmd_Stop:
589 case ErrorHandling_VideoEncodeNode_Node_Cmd_Flush:
590 case ErrorHandling_VideoEncodeNode_Node_Cmd_Pause:
591 case ErrorHandling_VideoEncodeNode_Node_Cmd_ReleasePort:
592 case ErrorHandling_VideoEncodeNode_ConfigHeader:
593 case ErrorHandling_VideoEncodeNode_DataPathStall_Before_ProcessingData:
594 case ErrorHandling_VideoEncodeNode_DataPathStall_After_ProcessingData:
595 case ErrorHandling_VideoEncodeNode_FailEncode_AfterDuration:
596 case ErrorHandling_AudioEncodeNode_FailEncode_AfterDuration:
597 case ErrorHandling_AudioEncodeNode_DataPathStall_Before_ProcessingData:
598 case ErrorHandling_AudioEncodeNode_DataPathStall_After_ProcessingData:
599 case ErrorHandling_AVCEncodeNode_Node_Cmd_Start:
600 case ErrorHandling_AVCEncodeNode_Node_Cmd_Stop:
601 case ErrorHandling_AVCEncodeNode_Node_Cmd_Flush:
602 case ErrorHandling_AVCEncodeNode_Node_Cmd_Pause:
603 case ErrorHandling_AVCEncodeNode_Node_Cmd_ReleasePort:
604 case ErrorHandling_AudioEncodeNode_Node_Cmd_Start:
605 case ErrorHandling_AudioEncodeNode_Node_Cmd_Stop:
606 case ErrorHandling_AudioEncodeNode_Node_Cmd_Flush:
607 case ErrorHandling_AudioEncodeNode_Node_Cmd_Pause:
608 case ErrorHandling_AudioEncodeNode_Node_Cmd_ReleasePort:
609 case ErrorHandling_AVCEncodeNode_ConfigHeader:
610 case ErrorHandling_AVCEncodeNode_DataPathStall_Before_ProcessingData:
611 case ErrorHandling_AVCEncodeNode_DataPathStall_After_ProcessingData:
612 case ErrorHandling_AVCEncodeNode_FailEncode_AfterDuration:
613
614 #ifndef _TEST_AE_ERROR_HANDLING
615 fprintf(iFile, " AE Error Handling Test Not implemented\n");
616 iCurrentTest = NULL;
617 break;
618 #else
619 {
620
621 //fprintf(iFile, "\nCurrently executing test:%d\n\n", iNextTestCase);
622 fprintf(iFile, "Begin test with the following parameters:\
623 \nInput File Name : %s\nOutput File Name: %s,\nVideo Encoder: %s,\nAudio Encoder: %s,\
624 \nComposer: %s\n", iMediaInputParam.iIPFileInfo.get_cstr(), iMediaInputParam.iOPFileInfo.get_cstr(),
625 iMediaInputParam.iVideoEncInfo.get_cstr(), iMediaInputParam.iAudioEncInfo.get_cstr(),
626 iMediaInputParam.iComposerInfo.get_cstr());
627
628
629 //fprintf(iFile, "\nCurrently executing test:%d\n\n", iNextTestCase);
630 Print_TestCase_Name(iNextTestCase);
631
632 iCurrentTest = new pv_mediainput_async_test_errorhandling(testparam, iMediaInputParam, false, iNextTestCase);
633
634 // Go to next test
635 ++iNextTestCase;
636
637 }
638 break;
639 #endif
640 case PVMediaInput_Reset_After_Create_Test:
641 {
642 fprintf(iFile, "Reset After Create test with AVI/WAV MIO Comp\n");
643 resetState = PVAE_CMD_CREATE;
644 iCurrentTest = new pv_mediainput_async_test_reset(testparam, iMediaInputParam, false, resetState);
645 // Go to next test
646 ++iNextTestCase;
647 }
648 break;
649 case PVMediaInput_Reset_After_Open_Test:
650 {
651 fprintf(iFile, "Reset After Open test with AVI/WAV MIO Comp\n");
652 resetState = PVAE_CMD_OPEN;
653 iCurrentTest = new pv_mediainput_async_test_reset(testparam, iMediaInputParam, false, resetState);
654 // Go to next test
655 ++iNextTestCase;
656 }
657 break;
658 case PVMediaInput_Reset_After_AddDataSource_Test:
659 {
660 fprintf(iFile, "Reset After AddDataSource test with AVI/WAV MIO Comp\n");
661 resetState = PVAE_CMD_ADD_DATA_SOURCE;
662 iCurrentTest = new pv_mediainput_async_test_reset(testparam, iMediaInputParam, false, resetState);
663 // Go to next test
664 ++iNextTestCase;
665 }
666 break;
667 case PVMediaInput_Reset_After_SelectComposer_Test:
668 {
669 fprintf(iFile, "Reset After SelectComposer test with AVI/WAV MIO Comp\n");
670 resetState = PVAE_CMD_SELECT_COMPOSER;
671 iCurrentTest = new pv_mediainput_async_test_reset(testparam, iMediaInputParam, false, resetState);
672 // Go to next test
673 ++iNextTestCase;
674 }
675 break;
676 case PVMediaInput_Reset_After_AddMediaTrack_Test:
677 {
678 fprintf(iFile, "Reset After AddMediaTrack test with AVI/WAV MIO Comp\n");
679 resetState = PVAE_CMD_ADD_MEDIA_TRACK;
680 iCurrentTest = new pv_mediainput_async_test_reset(testparam, iMediaInputParam, false, resetState);
681 // Go to next test
682 ++iNextTestCase;
683 }
684 break;
685 case PVMediaInput_Reset_After_Init_Test:
686 {
687 fprintf(iFile, "Reset After Init test with AVI/WAV MIO Comp\n");
688 resetState = PVAE_CMD_INIT;
689 iCurrentTest = new pv_mediainput_async_test_reset(testparam, iMediaInputParam, false, resetState);
690 // Go to next test
691 ++iNextTestCase;
692 }
693 break;
694 case PVMediaInput_Reset_After_Start_Test:
695 {
696 fprintf(iFile, "Reset After Start test with AVI/WAV MIO Comp\n");
697 resetState = PVAE_CMD_START;
698 iCurrentTest = new pv_mediainput_async_test_reset(testparam, iMediaInputParam, false, resetState);
699 // Go to next test
700 ++iNextTestCase;
701 }
702 break;
703 case PVMediaInput_Reset_After_Pause_Test:
704 {
705 fprintf(iFile, "Reset After Pause test with AVI/WAV MIO Comp\n");
706 resetState = PVAE_CMD_PAUSE;
707 iCurrentTest = new pv_mediainput_async_test_reset(testparam, iMediaInputParam, false, resetState);
708 // Go to next test
709 ++iNextTestCase;
710 }
711 break;
712 case PVMediaInput_Reset_After_Recording_Test:
713 {
714 fprintf(iFile, "Reset After Recording test with AVI/WAV MIO Comp\n");
715 resetState = PVAE_CMD_RECORDING;
716 iCurrentTest = new pv_mediainput_async_test_reset(testparam, iMediaInputParam, false, resetState);
717 // Go to next test
718 ++iNextTestCase;
719 }
720 break;
721 case PVMediaInput_Reset_After_Stop_Test:
722 {
723 fprintf(iFile, "Reset After Stop test with AVI/WAV MIO Comp\n");
724 resetState = PVAE_CMD_STOP;
725 iCurrentTest = new pv_mediainput_async_test_reset(testparam, iMediaInputParam, false, resetState);
726 // Go to next test
727 ++iNextTestCase;
728 }
729 break;
730
731 case PVMediaInput_Delete_After_Create_Test:
732 {
733 fprintf(iFile, "Delete After Create test with AVI/WAV MIO Comp\n");
734 resetState = PVAE_CMD_CREATE;
735 iCurrentTest = new pv_mediainput_async_test_delete(testparam, iMediaInputParam, false, resetState);
736 // Go to next test
737 ++iNextTestCase;
738 }
739 break;
740 case PVMediaInput_Delete_After_Open_Test:
741 {
742 fprintf(iFile, "Delete After Open test with AVI/WAV MIO Comp\n");
743 resetState = PVAE_CMD_OPEN;
744 iCurrentTest = new pv_mediainput_async_test_delete(testparam, iMediaInputParam, false, resetState);
745 // Go to next test
746 ++iNextTestCase;
747 }
748 break;
749 case PVMediaInput_Delete_After_AddDataSource_Test:
750 {
751 fprintf(iFile, "Delete After AddDataSource test with AVI/WAV MIO Comp\n");
752 resetState = PVAE_CMD_ADD_DATA_SOURCE;
753 iCurrentTest = new pv_mediainput_async_test_delete(testparam, iMediaInputParam, false, resetState);
754 // Go to next test
755 ++iNextTestCase;
756 }
757 break;
758 case PVMediaInput_Delete_After_SelectComposer_Test:
759 {
760 fprintf(iFile, "Delete After SelectComposer test with AVI/WAV MIO Comp\n");
761 resetState = PVAE_CMD_SELECT_COMPOSER;
762 iCurrentTest = new pv_mediainput_async_test_delete(testparam, iMediaInputParam, false, resetState);
763 // Go to next test
764 ++iNextTestCase;
765 }
766 break;
767 case PVMediaInput_Delete_After_AddMediaTrack_Test:
768 {
769 fprintf(iFile, "Delete After AddMediaTrack test with AVI/WAV MIO Comp\n");
770 resetState = PVAE_CMD_ADD_MEDIA_TRACK;
771 iCurrentTest = new pv_mediainput_async_test_delete(testparam, iMediaInputParam, false, resetState);
772 // Go to next test
773 ++iNextTestCase;
774 }
775 break;
776 case PVMediaInput_Delete_After_Init_Test:
777 {
778 fprintf(iFile, "Delete After Init test with AVI/WAV MIO Comp\n");
779 resetState = PVAE_CMD_INIT;
780 iCurrentTest = new pv_mediainput_async_test_delete(testparam, iMediaInputParam, false, resetState);
781 // Go to next test
782 ++iNextTestCase;
783 }
784 break;
785 case PVMediaInput_Delete_After_Start_Test:
786 {
787 fprintf(iFile, "Delete After Start test with AVI/WAV MIO Comp\n");
788 resetState = PVAE_CMD_START;
789 iCurrentTest = new pv_mediainput_async_test_delete(testparam, iMediaInputParam, false, resetState);
790 // Go to next test
791 ++iNextTestCase;
792 }
793 break;
794 case PVMediaInput_Delete_After_Pause_Test:
795 {
796 fprintf(iFile, "Delete After Pause test with AVI/WAV MIO Comp\n");
797 resetState = PVAE_CMD_PAUSE;
798 iCurrentTest = new pv_mediainput_async_test_delete(testparam, iMediaInputParam, false, resetState);
799 // Go to next test
800 ++iNextTestCase;
801 }
802 break;
803 case PVMediaInput_Delete_After_Recording_Test:
804 {
805 fprintf(iFile, "Delete After Recording test with AVI/WAV MIO Comp\n");
806 resetState = PVAE_CMD_RECORDING;
807 iCurrentTest = new pv_mediainput_async_test_delete(testparam, iMediaInputParam, false, resetState);
808 // Go to next test
809 ++iNextTestCase;
810 }
811 break;
812 case PVMediaInput_Delete_After_Stop_Test:
813 {
814 fprintf(iFile, "Delete After Stop test with AVI/WAV MIO Comp\n");
815 resetState = PVAE_CMD_STOP;
816 iCurrentTest = new pv_mediainput_async_test_delete(testparam, iMediaInputParam, false, resetState);
817 // Go to next test
818 ++iNextTestCase;
819 }
820 break;
821
822 default:
823 {
824 iCurrentTest = NULL;
825 break;
826 }
827 }
828
829 if (iCurrentTest)
830 {
831
832 // Setup Scheduler
833 OsclExecScheduler *sched = OsclExecScheduler::Current();
834 if (sched)
835 {
836 int32 err;
837 iCurrentTest->StartTest();
838
839 #if(USE_NATIVE_SCHEDULER)
840 OSCL_TRY(err,
841 uint32 currticks = 0;
842 currticks = OsclTickCount::TickCount();
843 uint32 starttime = OsclTickCount::TicksToMsec(currticks);
844
845 sched->StartNativeScheduler();
846
847 currticks = OsclTickCount::TickCount();
848 uint32 endtime = OsclTickCount::TicksToMsec(currticks);
849 fprintf(iFile, " Time taken by the test: %d\n", (endtime - starttime)););
850
851 #else
852 OSCL_TRY(err,
853 uint32 currticks = 0;
854 currticks = OsclTickCount::TickCount();
855 uint32 starttime = OsclTickCount::TicksToMsec(currticks);
856
857 sched->StartScheduler();
858
859 currticks = OsclTickCount::TickCount();
860 uint32 endtime = OsclTickCount::TicksToMsec(currticks);
861 fprintf(iFile, " Time taken by the test: %d\n", (endtime - starttime));
862 );
863 #endif
864
865 }
866 else
867 {
868 fprintf(iFile, "ERROR! Scheduler is not available. Test case could not run.");
869 iNextTestCase++;
870 }
871
872 }
873 else
874 {
875 iNextTestCase++;
876
877 if (iNextTestCase < Invalid_Test)
878 {
879 CleanupLoggerScheduler();
880 }
881 }
882
883 }//while iNextTest loop
884 }
885
CompleteTest(test_case & arTC)886 void PVMediaInputAuthorEngineTest::CompleteTest(test_case& arTC)
887 {
888 // Print out the result for this test case
889 const test_result the_result = arTC.last_result();
890
891 fprintf(iFile, " Successes %d, Failures %d\n", the_result.success_count() - iTotalSuccess,
892 the_result.failures().size() - iTotalFail);
893
894 iTotalSuccess = the_result.success_count();
895 iTotalFail = the_result.failures().size();
896 iTotalError = the_result.errors().size();
897
898 // Stop the scheduler
899 OsclExecScheduler *sched = OsclExecScheduler::Current();
900 if (sched)
901 {
902 sched->StopScheduler();
903 }
904 }
905
Print_TestCase_Name(int32 aTestnum)906 void PVMediaInputAuthorEngineTest::Print_TestCase_Name(int32 aTestnum)
907 {
908 fprintf(iFile, "\n\nTest:%d: ", aTestnum);
909 switch (aTestnum)
910 {
911 case PVMediaInput_Open_Compose_Stop_Test:
912 {
913 fprintf(iFile, "Open Compose Stop test with AVI/WAV MIO Comp:\n");
914 }
915 break;
916 case PVMediaInput_Open_RealTimeCompose_Stop_Test:
917 {
918 fprintf(iFile, "Open Real Time Compose Stop test with AVI/WAV MIO Comp:\n");
919 }
920 break;
921 case YUV_Input_VOnly_3gpTest:
922 {
923 fprintf(iFile, "YUV to V-Only .3gp Test with AVI/WAV component\n");
924
925 }
926 break;
927 case PCM16_Input_AOnly_3gpTest:
928 {
929 fprintf(iFile, "PCM16 to A-Only .3gp Test\n");
930 }
931 break;
932 case PCM16_YUV_Input_AV_3gpTest:
933 {
934 fprintf(iFile, "PCM16 & YUV to AV .3gp Test\n");
935 }
936 break;
937 case H264_Input_VOnly_3gpTest:
938 {
939 fprintf(iFile, "H264 to V-Only .3gp Test\n");
940 }
941 break;
942 case PCM16In_AMROut_Test:
943 {
944 fprintf(iFile, "PCM16 to ARM Test\n");
945 }
946 break;
947 case KMaxFileSizeTest:
948 {
949 fprintf(iFile, "Max FileSize test \n");
950 }
951 break;
952
953 case K3GPPDownloadModeTest:
954 {
955 fprintf(iFile, "3GPPDownloadMode test \n");
956 }
957 break;
958 case K3GPPProgressiveDownloadModeTest:
959 {
960 fprintf(iFile, "3GPPProgressiveDownloadMode test \n");
961 }
962 break;
963 case KMovieFragmentModeTest:
964 {
965 fprintf(iFile, "Movie Fragment test \n");
966 }
967 break;
968 case CapConfigTest:
969 {
970 fprintf(iFile, "CapConfig test \n");
971 }
972 break;
973 case AVI_Input_Longetivity_Test:
974 {
975 fprintf(iFile, "AVI Input Longetivity test:\n");
976 }
977 break;
978 case KMaxFileSizeLongetivityTest:
979 {
980 fprintf(iFile, "KMaxFileSizeLongetivityTest test \n");
981 }
982 break;
983 case K3GPPDownloadModeLongetivityTest:
984 {
985 fprintf(iFile, "K3GPPDownloadMode Longetivity Test:\n");
986 }
987 break;
988 case K3GPPProgressiveDownloadModeLongetivityTest:
989 {
990 fprintf(iFile, "K3GPPProgressiveDownloadMode Longetivity Test:\n");
991 }
992 break;
993 case KMovieFragmentModeLongetivityTest:
994 {
995 fprintf(iFile, "KMovieFragmentMode Longetivity Test:\n");
996 }
997 break;
998 case PVMediaInput_ErrorHandling_Test_WrongIPFileName:
999 {
1000 fprintf(iFile, "Error Handling wrong IP File test with AVI/WAV MIO Comp\n");
1001 }
1002 break;
1003
1004 case ErrorHandling_WrongOutputPathTest:
1005 {
1006 fprintf(iFile, "Error Handling wrong Output path for output File test with AVI/WAV MIO Comp\n");
1007 }
1008 break;
1009 case ErrorHandling_VideoInitFailed:
1010 {
1011 fprintf(iFile, "Error Handling test for Video Init Failed\n");
1012 }
1013 break;
1014 case ErrorHandling_VideoEncodeFailed:
1015 {
1016 fprintf(iFile, "Error Handiling test for Video Encode Failed\n");
1017 }
1018 break;
1019 case ErrorHandling_VideoEncode5FramesFailed:
1020 {
1021 fprintf(iFile, "Error Handling test for Video Encode 5Frames Failed\n");
1022 }
1023 break;
1024 case ErrorHandling_ComposerAddFragFailed:
1025 {
1026 fprintf(iFile, "Error Handling test for Composer Add Fragment Failed\n");
1027 }
1028 break;
1029 case ErrorHandling_ComposerAddTrackFailed:
1030 {
1031 fprintf(iFile, "Error Handling test for Composer Add Track Failed\n");
1032 }
1033 break;
1034 case ErrorHandling_AVCVideoEncodeFailed:
1035 {
1036 fprintf(iFile, "Error Handling test for AVC Video Encoder Failed\n");
1037 }
1038 break;
1039 case ErrorHandling_AVCVideoEncode5FramesFailed:
1040 {
1041 fprintf(iFile, "Error Handling test for AVC Video Encode 5 Frames Failed\n");
1042 }
1043 break;
1044 case ErrorHandling_MediaInputNodeStopFailed:
1045 {
1046 fprintf(iFile, "Error Handling test for MediaInputNode Stop Failed\n");
1047 }
1048 break;
1049 case ErrorHandling_AudioInitFailed:
1050 {
1051 fprintf(iFile, "Error Handiling test for Audio Init Failed \n");
1052 }
1053 break;
1054 case ErrorHandling_AudioEncodeFailed:
1055 {
1056 fprintf(iFile, "Error Handling test for Audio Encode Failed \n");
1057 }
1058 break;
1059 case ErrorHandling_MediaInputNode_NoMemBuffer:
1060 {
1061 fprintf(iFile, "Error Handling test for MediaInputNode No Memory Buffer available \n");
1062 }
1063 break;
1064 case ErrorHandling_MediaInputNode_Out_Queue_busy:
1065 {
1066 fprintf(iFile, "Error Handling test for MediaInputNode Out Queue Busy occur \n");
1067 }
1068 break;
1069 case ErrorHandling_MediaInputNode_large_time_stamp:
1070 {
1071 fprintf(iFile, "ErrorHandling test for MediaInputNode to mess up the time stamp by giving largeer time stamp in begining. \n");
1072 }
1073 break;
1074 case ErrorHandling_MediaInputNode_wrong_time_stamp_after_duration:
1075 {
1076 fprintf(iFile, "ErrorHandling test for MediaInputNode to mess up the time stamp by giving wrong timestamp after some duration of time. \n");
1077 }
1078 break;
1079 case ErrorHandling_MediaInputNode_zero_time_stamp:
1080 {
1081 fprintf(iFile, "ErrorHandling test for MediaInputNode to mess up the time stamp by assigning timestamp value as zero. \n");
1082 }
1083 break;
1084 case ErrorHandling_MediaInputNode_StateFailure_EPause_SendMIORequest:
1085 {
1086 fprintf(iFile, "ErrorHandling test for MediaInputNode to fail EPause state of SendMIORequest(). \n");
1087 }
1088 break;
1089 case ErrorHandling_MediaInputNode_StateFailure_CancelMIORequest:
1090 {
1091 fprintf(iFile, "ErrorHandling test for MediaInputNode to fail CancelMIORequest(). \n");
1092 }
1093 break;
1094 case ErrorHandling_MediaInputNode_Corrupt_Video_InputData:
1095 {
1096 fprintf(iFile, "ErrorHandling test for MediaInputNode to corrupt the video input data. \n");
1097 }
1098 break;
1099 case ErrorHandling_MediaInputNode_Corrupt_Audio_InputData:
1100 {
1101 fprintf(iFile, "ErrorHandling test for MediaInputNode to corrupt the audio input data. \n");
1102 }
1103 break;
1104 case ErrorHandling_MediaInputNode_Node_Cmd_Start:
1105 {
1106 fprintf(iFile, "ErrorHandling test for MediaInputNode to fail the node command Start state. \n");
1107 }
1108 break;
1109 case ErrorHandling_MediaInputNode_Node_Cmd_Stop:
1110 {
1111 fprintf(iFile, "ErrorHandling test for MediaInputNode to fail the node command Stop state. \n");
1112 }
1113 break;
1114 case ErrorHandling_MediaInputNode_Node_Cmd_Flush:
1115 {
1116 fprintf(iFile, "ErrorHandling test for MediaInputNode to fail the node command Flush state. \n");
1117 }
1118 break;
1119 case ErrorHandling_MediaInputNode_Node_Cmd_Pause:
1120 {
1121 fprintf(iFile, "ErrorHandling test for MediaInputNode to fail the node command Pause state. \n");
1122 }
1123 break;
1124 case ErrorHandling_MediaInputNode_Node_Cmd_ReleasePort:
1125 {
1126 fprintf(iFile, "ErrorHandling test for MediaInputNode to fail the node command Release Port state. \n");
1127 }
1128 break;
1129 case ErrorHandling_MediaInputNode_DataPath_Stall:
1130 {
1131 fprintf(iFile, "ErrorHandling test for MediaInputNode to stall data path. \n");
1132 }
1133 break;
1134 case ErrorHandling_MP4Composer_AddTrack_PVMF_AMR_IETF:
1135 {
1136 fprintf(iFile, "ErrorHandling test for MP4ComposerNode to fail PVMF_AMR_IETF in AddTrack(). \n");
1137 }
1138 break;
1139 case ErrorHandling_MP4Composer_AddTrack_PVMF_3GPP_TIMEDTEXT:
1140 {
1141 fprintf(iFile, "ErrorHandling test for MP4ComposerNode to fail PVMF_3GPP_TIMEDTEXT in AddTrack(). \n");
1142 }
1143 break;
1144 case ErrorHandling_MP4Composer_AddTrack_PVMF_M4V:
1145 {
1146 fprintf(iFile, "ErrorHandling test for MP4ComposerNode to fail PVMF_M4V in AddTrack(). \n");
1147 }
1148 break;
1149 case ErrorHandling_MP4Composer_AddTrack_PVMF_H263:
1150 {
1151 fprintf(iFile, "ErrorHandling test for MP4ComposerNode to fail PVMF_H263 in AddTrack(). \n");
1152 }
1153 break;
1154 case ErrorHandling_MP4Composer_AddTrack_PVMF_H264_MP4:
1155 {
1156 fprintf(iFile, "ErrorHandling test for MP4ComposerNode to fail PVMF_H264_MP4 in AddTrack(). \n");
1157 }
1158 break;
1159 case ErrorHandling_MP4Composer_Node_Cmd_Start:
1160 {
1161 fprintf(iFile, "ErrorHandling test for MP4ComposerNode to fail Node Command Start. \n");
1162 }
1163 break;
1164 case ErrorHandling_MP4Composer_Node_Cmd_Stop:
1165 {
1166 fprintf(iFile, "ErrorHandling test for MP4ComposerNode to fail Node Command Stop. \n");
1167 }
1168 break;
1169 case ErrorHandling_MP4Composer_Node_Cmd_Flush:
1170 {
1171 fprintf(iFile, "ErrorHandling test for MP4ComposerNode to fail Node Command Flush. \n");
1172 }
1173 break;
1174 case ErrorHandling_MP4Composer_Node_Cmd_Pause:
1175 {
1176 fprintf(iFile, "ErrorHandling test for MP4ComposerNode to fail Node Command Pause. \n");
1177 }
1178 break;
1179 case ErrorHandling_MP4Composer_Node_Cmd_ReleasePort:
1180 {
1181 fprintf(iFile, "ErrorHandling test for MP4ComposerNode to fail Node Command Release Port. \n");
1182 }
1183 break;
1184 case ErrorHandling_MP4Composer_Create_FileParser:
1185 {
1186 fprintf(iFile, "ErrorHandling test for MP4ComposerNode to fail creation of mp4 file parser. \n");
1187 }
1188 break;
1189 case ErrorHandling_MP4Composer_RenderToFile:
1190 {
1191 fprintf(iFile, "ErrorHandling test for MP4ComposerNode to fail RenderToFile(). \n");
1192 }
1193 break;
1194 case ErrorHandling_MP4Composer_FailAfter_FileSize:
1195 {
1196 fprintf(iFile, "ErrorHandling test for MP4ComposerNode returns error after particular file size if reached.\n");
1197 }
1198 break;
1199 case ErrorHandling_MP4Composer_FailAfter_Duration:
1200 {
1201 fprintf(iFile, "ErrorHandling test for MP4ComposerNode returns error after some duration of time.\n");
1202 }
1203 break;
1204 case ErrorHandling_VideoEncodeNode_Node_Cmd_Start:
1205 {
1206 fprintf(iFile, "ErrorHandling test for VideoEncodeNode to fail Node Command Start. \n");
1207 }
1208 break;
1209 case ErrorHandling_VideoEncodeNode_Node_Cmd_Stop:
1210 {
1211 fprintf(iFile, "ErrorHandling test for VideoEncodeNode to fail Node Command Stop. \n");
1212 }
1213 break;
1214 case ErrorHandling_VideoEncodeNode_Node_Cmd_Flush:
1215 {
1216 fprintf(iFile, "ErrorHandling test for VideoEncodeNode to fail Node Command Flush. \n");
1217 }
1218 break;
1219 case ErrorHandling_VideoEncodeNode_Node_Cmd_Pause:
1220 {
1221 fprintf(iFile, "ErrorHandling test for VideoEncodeNode to fail Node Command Pause. \n");
1222 }
1223 break;
1224 case ErrorHandling_VideoEncodeNode_Node_Cmd_ReleasePort:
1225 {
1226 fprintf(iFile, "ErrorHandling test for VideoEncodeNode to fail Node Command ReleasePort. \n");
1227 }
1228 break;
1229 case ErrorHandling_VideoEncodeNode_ConfigHeader:
1230 {
1231 fprintf(iFile, "ErrorHandling test for VideoEncodeNode to fail GetVolHeader(). \n");
1232 }
1233 break;
1234 case ErrorHandling_VideoEncodeNode_DataPathStall_Before_ProcessingData:
1235 {
1236 fprintf(iFile, "ErrorHandling test for VideoEncodeNode to stall the data path before processing starts. \n");
1237 }
1238 break;
1239 case ErrorHandling_VideoEncodeNode_DataPathStall_After_ProcessingData:
1240 {
1241 fprintf(iFile, "ErrorHandling test for VideoEncodeNode to stall the data path after processing is done. \n");
1242 }
1243 break;
1244
1245 case ErrorHandling_VideoEncodeNode_FailEncode_AfterDuration:
1246 {
1247 fprintf(iFile, "ErrorHandling test for VideoEncodeNode to fail encode operation after duration of time. \n");
1248 }
1249 break;
1250 case ErrorHandling_AudioEncodeNode_Node_Cmd_Start:
1251 {
1252 fprintf(iFile, "ErrorHandling test for AudioEncodeNode to fail Node Command Start. \n");
1253 }
1254 break;
1255 case ErrorHandling_AudioEncodeNode_Node_Cmd_Stop:
1256 {
1257 fprintf(iFile, "ErrorHandling test for AudioEncodeNode to fail Node Command Stop. \n");
1258 }
1259 break;
1260 case ErrorHandling_AudioEncodeNode_Node_Cmd_Flush:
1261 {
1262 fprintf(iFile, "ErrorHandling test for AudioEncodeNode to fail Node Command Flush. \n");
1263 }
1264 break;
1265 case ErrorHandling_AudioEncodeNode_Node_Cmd_Pause:
1266 {
1267 fprintf(iFile, "ErrorHandling test for AudioEncodeNode to fail Node Command Pause. \n");
1268 }
1269 break;
1270 case ErrorHandling_AudioEncodeNode_Node_Cmd_ReleasePort:
1271 {
1272 fprintf(iFile, "ErrorHandling test for AudioEncodeNode to fail Node Command Release Port. \n");
1273 }
1274 break;
1275 case ErrorHandling_AudioEncodeNode_FailEncode_AfterDuration:
1276 {
1277 fprintf(iFile, "ErrorHandling test for AudioEncodeNode to fail encode operation after duration of time. \n");
1278 }
1279 break;
1280 case ErrorHandling_AudioEncodeNode_DataPathStall_Before_ProcessingData:
1281 {
1282 fprintf(iFile, "ErrorHandling test for AudioEncodeNode to stall the data path before the processing starts. \n");
1283 }
1284 break;
1285 case ErrorHandling_AudioEncodeNode_DataPathStall_After_ProcessingData:
1286 {
1287 fprintf(iFile, "ErrorHandling test for AudioEncodeNode to stall the data path after the processing is done. \n");
1288 }
1289 break;
1290 case ErrorHandling_AVCEncodeNode_Node_Cmd_Start:
1291 {
1292 fprintf(iFile, "ErrorHandling test for AVCEncodeNode to fail Node Command Start. \n");
1293 }
1294 break;
1295 case ErrorHandling_AVCEncodeNode_Node_Cmd_Stop:
1296 {
1297 fprintf(iFile, "ErrorHandling test for AVCEncodeNode to fail Node Command Stop. \n");
1298 }
1299 break;
1300 case ErrorHandling_AVCEncodeNode_Node_Cmd_Flush:
1301 {
1302 fprintf(iFile, "ErrorHandling test for AVCEncodeNode to fail Node Command Flush. \n");
1303 }
1304 break;
1305 case ErrorHandling_AVCEncodeNode_Node_Cmd_Pause:
1306 {
1307 fprintf(iFile, "ErrorHandling test for AVCEncodeNode to fail Node Command Pause. \n");
1308 }
1309 break;
1310 case ErrorHandling_AVCEncodeNode_Node_Cmd_ReleasePort:
1311 {
1312 fprintf(iFile, "ErrorHandling test for AVCEncodeNode to fail Node Command ReleasePort. \n");
1313 }
1314 break;
1315 case ErrorHandling_AVCEncodeNode_ConfigHeader:
1316 {
1317 fprintf(iFile, "ErrorHandling test for AVCEncodeNode to fail in getting SPS and PPS value. \n");
1318 }
1319 break;
1320 case ErrorHandling_AVCEncodeNode_DataPathStall_Before_ProcessingData:
1321 {
1322 fprintf(iFile, "ErrorHandling test for AVCEncodeNode to stall the data path before processing starts. \n");
1323 }
1324 break;
1325 case ErrorHandling_AVCEncodeNode_DataPathStall_After_ProcessingData:
1326 {
1327 fprintf(iFile, "ErrorHandling test for AVCEncodeNode to stall the data path after processing is done. \n");
1328 }
1329 break;
1330 case ErrorHandling_AVCEncodeNode_FailEncode_AfterDuration:
1331 {
1332 fprintf(iFile, "ErrorHandling test for AVCEncodeNode to fail encode operation after duration of time. \n");
1333 }
1334 break;
1335 case ErrorHandling_MP4Composer_DataPathStall:
1336 {
1337 fprintf(iFile, "ErrorHandling test for MP4ComposerNode to stall data path. \n");
1338 }
1339 break;
1340 default:
1341 break;
1342
1343
1344 }
1345 fprintf(iFile, "\n");
1346 }
1347