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_AUTHOR_ENGINE_TYPEDEFS_H 19 #define TEST_PV_AUTHOR_ENGINE_TYPEDEFS_H 20 21 #ifndef OSCL_BASE_H_INCLUDED 22 #include "oscl_base.h" 23 #endif 24 #ifndef OSCL_ERROR_H_INCLUDED 25 #include "oscl_error.h" 26 #endif 27 #ifndef OSCL_ERROR_CODES_H_INCLUDED 28 #include "oscl_error_codes.h" 29 #endif 30 #ifndef OSCL_CONFIG_IO_H_INCLUDED 31 #include "osclconfig_io.h" 32 #endif 33 #ifndef OSCL_FILE_IO_H_INCLUDED 34 #include "oscl_file_io.h" 35 #endif 36 #ifndef OSCL_MEM_H_INCLUDED 37 #include "oscl_mem.h" 38 #endif 39 #ifndef OSCL_VECTOR_H_INCLUDED 40 #include "oscl_vector.h" 41 #endif 42 #ifndef OSCL_SCHEDULER_AO_H_INCLUDED 43 #include "oscl_scheduler_ao.h" 44 #endif 45 #ifndef PVLOGGER_H_INCLUDED 46 #include "pvlogger.h" 47 #endif 48 #ifndef PVLOGGER_STDERR_APPENDER_H_INCLUDED 49 #include "pvlogger_stderr_appender.h" 50 #endif 51 #ifndef PVLOGGER_FILE_APPENDER_H_INCLUDED 52 #include "pvlogger_file_appender.h" 53 #endif 54 #ifndef PVLOGGER_TIME_AND_ID_LAYOUT_H_INCLUDED 55 #include "pvlogger_time_and_id_layout.h" 56 #endif 57 #ifndef TEST_CASE_H_INCLUDED 58 #include "test_case.h" 59 #endif 60 #ifndef PVMF_NODE_INTERFACE_H_INCLUDED 61 #include "pvmf_node_interface.h" 62 #endif 63 #ifndef PV_ENGINE_TYPES_H_INCLUDED 64 #include "pv_engine_types.h" 65 #endif 66 #ifndef PV_ENGINE_OBSERVER_H_INCLUDED 67 #include "pv_engine_observer.h" 68 #endif 69 #ifndef PVAUTHORENGINEFACTORY_H_INCLUDED 70 #include "pvauthorenginefactory.h" 71 #endif 72 #ifndef PVAUTHORENGINEINTERFACE_H_INCLUDED 73 #include "pvauthorengineinterface.h" 74 #endif 75 #ifndef PVAETESTINPUT_H_INCLUDED 76 #include "pvaetestinput.h" 77 #endif 78 #ifndef OSCL_UTF8CONV_H 79 #include "oscl_utf8conv.h" 80 #endif 81 #ifndef OSCL_SCHEDULER_H_INCLUDED 82 #include "oscl_scheduler.h" 83 #endif 84 #ifndef TEXT_TEST_INTERPRETER_H_INCLUDED 85 #include "text_test_interpreter.h" 86 #endif 87 #ifndef PV_MP4_H263_ENC_EXTENSION_H_INCLUDED 88 #include "pvmp4h263encextension.h" 89 #endif 90 #ifndef PVMP4FFCN_CLIPCONFIG_H_INCLUDED 91 #include "pvmp4ffcn_clipconfig.h" 92 #endif 93 #ifndef PVMF_FILEOUTPUT_CONFIG_H_INCLUDED 94 #include "pvmf_fileoutput_config.h" 95 #endif 96 #ifndef PVMF_COMPOSER_SIZE_AND_DURATION_H_INCLUDED 97 #include "pvmf_composer_size_and_duration.h" 98 #endif 99 #ifndef TEST_PV_AUTHOR_ENGINE_CONFIG_H_INCLUDED 100 #include "test_pv_author_engine_config.h" 101 #endif 102 #ifndef UNIT_TEST_ARGS_H_INCLUDED 103 #include "unit_test_args.h" 104 #endif 105 #ifndef PVLOGGER_FILE_APPENDER_H_INCLUDED 106 #include "pvlogger_file_appender.h" 107 #endif 108 #ifndef OSCL_MEM_H_INCLUDED 109 #include "oscl_mem.h" 110 #endif 111 #ifndef OSCL_MEM_AUDIT_H_INCLUDED 112 #include "oscl_mem_audit.h" 113 #endif 114 #ifndef OSCL_UTF8CONV_H 115 #include "oscl_utf8conv.h" 116 #endif 117 #ifndef OSCL_STRING_UTILS_H 118 #include "oscl_string_utils.h" 119 #endif 120 #ifndef OSCL_BASE_H_INCLUDED 121 #include "oscl_stdstring.h" 122 #endif 123 #ifndef PVMI_CONFIG_AND_CAPABILITY_H_INCLUDED 124 #include "pvmi_config_and_capability.h" 125 #endif 126 #ifndef PVMI_CONFIG_AND_CAPABILITY_OBSERVER_H_INCLUDED 127 #include "pvmi_config_and_capability_observer.h" 128 #endif 129 130 #ifndef OSCLCONFIG_H_INCLUDED 131 #include "osclconfig.h" 132 #endif 133 134 #ifndef OSCL_UTF8CONV_H 135 #include "oscl_utf8conv.h" 136 #endif 137 138 #ifndef PVAELOGGER_H_INCLUDED 139 #include "test_pv_author_engine_logger.h" 140 #endif 141 142 //#define _W(x) _STRLIT_WCHAR(x) 143 144 //composer mime type 145 #define K3gpComposerMimeType "/x-pvmf/ff-mux/3gp" 146 #define KAMRNbComposerMimeType "/x-pvmf/ff-mux/amr-nb" 147 #define KAMRWBComposerMimeType "/x-pvmf/ff-mux/amr-wb" 148 #define KAACADIFComposerMimeType "/x-pvmf/ff-mux/adif" 149 #define KAACADTSComposerMimeType "/x-pvmf/ff-mux/adts" 150 151 //encoder mime type 152 #define KAMRNbEncMimeType "/x-pvmf/audio/encode/amr-nb" 153 #define KAMRWbEncMimeType "/x-pvmf/audio/encode/amr-wb" 154 #define KAACMP4EncMimeType "/x-pvmf/audio/encode/X-MPEG4-AUDIO" 155 #define KH263EncMimeType "/x-pvmf/video/encode/h263" 156 #define KH264EncMimeType "/x-pvmf/video/encode/h264" 157 #define KMp4EncMimeType "/x-pvmf/video/encode/mp4" 158 #define KAACADIFEncMimeType "/x-pvmf/audio/encode/aac/adif" 159 #define KAACADTSEncMimeType "/x-pvmf/audio/encode/aac/adts" 160 #define KTextEncMimeType "/x-pvmf/text/encode/txt" 161 162 // Default input settings 163 extern const uint32 KVideoBitrate ; 164 extern const uint32 KVideoFrameWidth ; 165 extern const uint32 KVideoFrameHeight; 166 extern const uint32 KVideoTimescale ; 167 extern const uint32 KNumLayers; 168 169 extern const uint32 KVideoFrameRate; 170 extern const uint32 KNum20msFramesPerChunk; 171 extern const uint32 KAudioBitsPerSample; 172 173 extern const uint16 KVideoIFrameInterval; 174 extern const uint8 KH263VideoProfile; 175 extern const uint8 KH263VideoLevel; 176 extern const uint32 KAudioBitrate; 177 extern const uint32 KAudioBitrateWB; 178 extern const uint32 KAACAudioBitrate; 179 extern const uint32 KAudioTimescale; 180 extern const uint32 KAudioTimescaleWB; 181 extern const uint32 KAudioNumChannels; 182 183 extern const uint32 KMaxFileSize; 184 extern const uint32 KMaxDuration; 185 extern const uint32 KFileSizeProgressFreq; 186 extern const uint32 KDurationProgressFreq; 187 extern const uint32 KTestDuration; 188 extern const uint32 KTextTimescale; 189 extern const uint32 KTextFrameWidth; 190 extern const uint32 KTextFrameHeight; 191 192 193 194 // it's for setting Authoring Time Unit for selecting counter loop 195 // this time unit is used as default authoring time for longetivity tests 196 //const uint32 KAuthoringSessionUnit = 1800; //in seconds 197 extern const uint32 KAuthoringSessionUnit; 198 extern const uint32 KPauseDuration; 199 200 // The string to prepend to source filenames 201 #define SOURCENAME_PREPEND_STRING "" 202 #define SOURCENAME_PREPEND_WSTRING _STRLIT_WCHAR("") 203 204 205 #define ARRAY_SIZE 512 206 207 //enum types for test cases 208 typedef enum 209 { 210 ERROR_NOSTATE = 0, 211 ERROR_VIDEO_START_INIT, 212 ERROR_VIDEO_START_ENCODE, 213 ERROR_VIDEO_START_ENCODE_5FRAMES, 214 ERROR_COMPOSER_START_ADDMEMFRAG, 215 ERROR_COMPOSER_START_ADDTRACK, 216 ERROR_MEDIAINPUTNODE_ADDDATASOURCE_START, 217 ERROR_MEDIAINPUTNODE_ADDDATASOURCE_STOP, 218 ERROR_AVC_START_ENCODE, 219 ERROR_AVC_START_ENCODE_5FRAMES 220 } FAIL_STATE; 221 222 223 typedef enum 224 { 225 226 /*********** Compressed Tests Begin****************************/ 227 // Tests that take compressed inputs 228 //3gp output file 229 AMR_Input_AOnly_3gpTest = 0, //.amr 230 H263_Input_VOnly_3gpTest = 1, //.h263 231 AMR_YUV_Input_AV_3gpTest = 2, //.amr+.yuv 232 AMR_H263_Input_AV_3gpTest = 3, //.amr+.h263 233 234 H264_AMR_Input_AV_3gpTest = 4, //.yuv 235 AMR_YUV_Input_AV_M4V_AMR_Output_3gpTest = 5, //.amr+.yuv 236 TEXT_Input_TOnly_3gpTest = 6, 237 AMR_TEXT_Input_AT_3gpTest = 7, 238 YUV_TEXT_Input_VT_3gpTest = 8, 239 AMR_YUV_TEXT_Input_AVT_Mp4Test = 9, 240 241 K3GP_OUTPUT_TestEnd = 10, //placeholder 242 243 //amr output file 244 AMR_FOutput_Test = 11, //.amr 245 246 AMR_OUTPUT_TestEnd = 12, // placeholder 247 248 //aac output file 249 AACADIF_FOutput_Test = 13, //.aacadif 250 AACADTS_FOutput_Test = 14, //.aacadts 251 252 AAC_OUTPUT_TestEnd = 15, // placeholder 253 254 //ErrorHandling_WrongTextInputFileNameTest, //Incorrect name of Text input file 255 //amr output file 256 AMR_FileOutput_Test_UsingExternalFileHandle = 16, //.amr 257 //3gp output file 258 AMRWB_Input_AOnly_3gpTest = 17, 259 260 //amr-wb output file 261 AMRWB_FOutput_Test = 18, 262 263 CompressedNormalTestEnd = 19, //placeholder 264 265 /*********** Compressed Longetivity Tests *********************/ 266 // tests that takes compressed inputs and run for long duration 267 // The duration is configurable through command line argument 268 CompressedLongetivityTestBegin = 100, //placeholder 269 //3gp output file 270 TEXT_Input_TOnly_3gp_LongetivityTest = 101, //.txt 271 AMR_TEXT_Input_AT_3gp_LongetivityTest = 102, //.amr+.txt 272 YUV_TEXT_Input_VT_3gp_LongetivityTest = 103, //.txt+.yuv 273 AMR_YUV_TEXT_Input_AVT_3gp_LongetivityTest = 104, //.txt+.yuv +.amr 274 Compressed_LongetivityTestEnd = 105, // placeholder 275 276 /*********** Compressed Tests End******************************/ 277 278 /*********** UnCompressed Tests Begin**************************/ 279 // Test case that takes Uncompressed input through AVI File begin 280 281 // AVI file must have RGB24, RGB12, YUV420 planar or PCM mono 8KHz data only 282 UnCompressed_NormalTestBegin = 200, //placeholder 283 PVMediaInput_Open_Compose_Stop_Test = 201, //Use testinput.avi 284 PVMediaInput_Open_RealTimeCompose_Stop_Test = 202, //Real Time authoring 285 YUV_Input_VOnly_3gpTest = 203, //.yuv 286 PCM16_Input_AOnly_3gpTest = 204, //.pcm 287 PCM16_YUV_Input_AV_3gpTest = 205, //.pcm+.yuv 288 H264_Input_VOnly_3gpTest = 206, //.yuv 289 PCM16In_AMROut_Test = 207, //.pcm//207 290 291 KMaxFileSizeTest = 208, //.amr+.yuv 292 293 K3GPPDownloadModeTest = 210, //.amr+.yuv 294 K3GPPProgressiveDownloadModeTest = 211, //.amr+.yuv 295 296 KMovieFragmentModeTest = 213, 297 CapConfigTest = 214, 298 299 PVMediaInput_Pause_Resume_Test = 215, 300 301 PVMediaInput_Reset_After_Create_Test = 216, 302 PVMediaInput_Reset_After_Open_Test = 217, 303 PVMediaInput_Reset_After_AddDataSource_Test = 218, 304 PVMediaInput_Reset_After_SelectComposer_Test = 219, 305 PVMediaInput_Reset_After_AddMediaTrack_Test = 220, 306 PVMediaInput_Reset_After_Init_Test = 221, 307 PVMediaInput_Reset_After_Start_Test = 222, 308 PVMediaInput_Reset_After_Pause_Test = 223, 309 PVMediaInput_Reset_After_Recording_Test = 224, 310 PVMediaInput_Reset_After_Stop_Test = 225, 311 312 PVMediaInput_Delete_After_Create_Test = 226, 313 PVMediaInput_Delete_After_Open_Test = 227, 314 PVMediaInput_Delete_After_AddDataSource_Test = 228, 315 PVMediaInput_Delete_After_SelectComposer_Test = 229, 316 PVMediaInput_Delete_After_AddMediaTrack_Test = 230, 317 PVMediaInput_Delete_After_Init_Test = 231, 318 PVMediaInput_Delete_After_Start_Test = 232, 319 PVMediaInput_Delete_After_Pause_Test = 233, 320 PVMediaInput_Delete_After_Recording_Test = 234, 321 PVMediaInput_Delete_After_Stop_Test = 235, 322 PVMediaInput_Open_Compose_Stop_Test_UsingExternalFileHandle = 236, 323 324 UnCompressed_NormalTestEnd = 237, 325 326 /********** Uncompressed Longetivity tests*********************/ 327 UnCompressed_LongetivityTestBegin = 300, //placeholder 328 AVI_Input_Longetivity_Test = 301, 329 KMaxFileSizeLongetivityTest = 302, //.amr+.yuv/302 330 K3GPPDownloadModeLongetivityTest = 304, //.amr+.yuv 331 K3GPPProgressiveDownloadModeLongetivityTest = 305, //.amr+.yuv 332 KMovieFragmentModeLongetivityTest = 307, 333 UnCompressed_LongetivityTestEnd = 308, 334 335 /*********** UnCompressed Tests End****************************/ 336 337 /*********** Error Handling Tests Begin************************/ 338 339 // Error Handling tests. These are to test the error handling capability of Author Engine. 340 // Some of the tests takes unsupported inputs like RGB16 data (PVMediaInput_ErrorHandling_Test_WrongFormat). 341 // Other tests deliberately induces errors at various points in the data path. The error point is send through 342 // KVP keys through the test app. 343 344 // Error handling tests that takes compressed inputs 345 KCompressed_Errorhandling_TestBegin = 400, 346 ErrorHandling_WrongTextInputFileNameTest = 401, 347 ErrorHandling_MediaInputNodeStartFailed = 402, 348 KCompressed_Errorhandling_TestEnd = 403, 349 350 //Error handling tests that takes uncompressed inputs through avi files. 351 KUnCompressed_Errorhandling_TestBegin = 500, 352 PVMediaInput_ErrorHandling_Test_WrongFormat = 501, //Use testinput_rgb16.avi 353 PVMediaInput_ErrorHandling_Test_WrongIPFileName = 502, 354 ErrorHandling_WrongOutputPathTest = 503, 355 ErrorHandling_VideoInitFailed = 504, //Video Encoder Init Failed 356 ErrorHandling_VideoEncodeFailed = 505, //Video Encoder Encode Failed 357 ErrorHandling_VideoEncode5FramesFailed = 506, //VideoEncNode Encode5Frames Failed 358 ErrorHandling_ComposerAddFragFailed = 507, //507, Composer AddMemFrag Failed 359 ErrorHandling_ComposerAddTrackFailed = 508, //Composer AddMemTrack Failed 360 ErrorHandling_AVCVideoEncodeFailed = 509, //AVCEncNode Encode Failed 361 ErrorHandling_AVCVideoEncode5FramesFailed = 510, //AVCEncNode Encode5Frames Failed 362 ErrorHandling_MediaInputNodeStopFailed = 511, 363 ErrorHandling_AudioInitFailed = 512, //Audio Encoder(AMR) Init Failed 364 ErrorHandling_AudioEncodeFailed = 513, //Audio Encoder(AMR) Encode Failed 365 ErrorHandling_MediaInputNode_NoMemBuffer = 514, 366 ErrorHandling_MediaInputNode_Out_Queue_busy = 515, 367 ErrorHandling_MediaInputNode_large_time_stamp = 516, //MediaInputNode Error in time stamp for large value. 368 ErrorHandling_MediaInputNode_wrong_time_stamp_after_duration = 517, //MediaInputNode Error in time stamp for wrong value after duration of time. 369 ErrorHandling_MediaInputNode_zero_time_stamp = 518, //MediaInputNode Error in time stamp for zero value. 370 ErrorHandling_MediaInputNode_StateFailure_EPause_SendMIORequest = 519, //MediaInputNode Error in SendMIOioRequest(). 371 ErrorHandling_MediaInputNode_StateFailure_CancelMIORequest = 520, //MediaInputNode Error in CancelMIORequest(). 372 ErrorHandling_MediaInputNode_Corrupt_Video_InputData = 521, //MediaInputNode Corrupt the video input data. 373 ErrorHandling_MediaInputNode_Corrupt_Audio_InputData = 522, //MediaInputNode Corrupt the audio input data. 374 ErrorHandling_MediaInputNode_DataPath_Stall = 523, //MediaInputNode Stall the data path. 375 ErrorHandling_MP4Composer_AddTrack_PVMF_AMR_IETF = 524, //MP4ComposerNode Error in AddTrack() for PVMF_AMR_IETF. 376 ErrorHandling_MP4Composer_AddTrack_PVMF_3GPP_TIMEDTEXT = 525, //MP4ComposerNode Error in AddTrack() for PVMF_3GPP_TIMEDTEXT. 377 ErrorHandling_MP4Composer_AddTrack_PVMF_M4V = 526, //MP4ComposerNode Error in AddTrack() for PVMF_M4V. 378 ErrorHandling_MP4Composer_AddTrack_PVMF_H263 = 527, //MP4ComposerNode Error in AddTrack() for PVMF_H263. 379 ErrorHandling_MP4Composer_AddTrack_PVMF_H264_MP4 = 528, //MP4ComposerNode Error in AddTrack() for PVMF_H264_MP4. 380 ErrorHandling_MP4Composer_Create_FileParser = 529, //MP4ComposerNode Error in the creation of mp4 file parser. 381 ErrorHandling_MP4Composer_RenderToFile = 530, //MP4ComposerNode Error in the RenderToFile(). 382 ErrorHandling_MP4Composer_FailAfter_FileSize = 531, //MP4ComposerNode Error after a particular file size is reached. 383 ErrorHandling_MP4Composer_FailAfter_Duration = 532, //MP4ComposerNode Error after a duration of some time. 384 ErrorHandling_MP4Composer_DataPathStall = 533, //MP4ComposerNode Stall the data path. 385 ErrorHandling_VideoEncodeNode_ConfigHeader = 534, //VideoEncodeNode Error in GetVolHeader(). 386 ErrorHandling_VideoEncodeNode_DataPathStall_Before_ProcessingData = 535, //VideoEncodeNode Stall the data path before processing starts. 387 ErrorHandling_VideoEncodeNode_DataPathStall_After_ProcessingData = 536, //VideoEncodeNode Stall the data path post processing. 388 ErrorHandling_VideoEncodeNode_FailEncode_AfterDuration = 537, //VideoEncodeNode Error in encode after duration of time. 389 ErrorHandling_AudioEncodeNode_FailEncode_AfterDuration = 538, //AudioEncodeNode Error in encode operation after duration of time. 390 ErrorHandling_AudioEncodeNode_DataPathStall_Before_ProcessingData = 539, //AudioEncodeNode Stall data path before processing starts. 391 ErrorHandling_AudioEncodeNode_DataPathStall_After_ProcessingData = 540, //AudioEncodeNode Stall data path post processing. 392 ErrorHandling_AVCEncodeNode_ConfigHeader = 541, //AVCEncodeNode Error in in getting SPS & PPS Values. 393 ErrorHandling_AVCEncodeNode_DataPathStall_Before_ProcessingData = 542, //AVCEncodeNode Stall the data path before processing starts. 394 ErrorHandling_AVCEncodeNode_DataPathStall_After_ProcessingData = 543, //AVCEncodeNode Stall the data path post processing. 395 ErrorHandling_AVCEncodeNode_FailEncode_AfterDuration = 544, //AVCEncodeNode Error in encode after duration of time. 396 397 /***** Test for Node Commands *****/ 398 ErrorHandling_MediaInputNode_Node_Cmd_Start = 545, //MediaInputNode Error in node command DoStart(). 399 ErrorHandling_MediaInputNode_Node_Cmd_Stop = 546, //MediaInputNode Error in node command DoStop(). 400 ErrorHandling_MediaInputNode_Node_Cmd_Flush = 547, //MediaInputNode Error in node command DoFlush(). 401 ErrorHandling_MediaInputNode_Node_Cmd_Pause = 548, //MediaInputNode Error in node command DoPause(). 402 ErrorHandling_MediaInputNode_Node_Cmd_ReleasePort = 549, //MediaInputNode Error in node command DoReleasePort(). 403 ErrorHandling_MP4Composer_Node_Cmd_Start = 550, //MP4ComposerNode Error in the node command DoStart(). 404 ErrorHandling_MP4Composer_Node_Cmd_Stop = 551, //MP4ComposerNode Error in the node command DoStop(). 405 ErrorHandling_MP4Composer_Node_Cmd_Flush = 552, //MP4ComposerNode Error in the node command DoFlush(). 406 ErrorHandling_MP4Composer_Node_Cmd_Pause = 553, //MP4ComposerNode Error in the node command DoPause(). 407 ErrorHandling_MP4Composer_Node_Cmd_ReleasePort = 554, //MP4ComposerNode Error in the node command DoReleasePort(). 408 ErrorHandling_VideoEncodeNode_Node_Cmd_Start = 555, //VideoEncodeNode Error in node command DoStart(). 409 ErrorHandling_VideoEncodeNode_Node_Cmd_Stop = 556, //VideoEncodeNode Error in node command DoStop(). 410 ErrorHandling_VideoEncodeNode_Node_Cmd_Flush = 557, //VideoEncodeNode Error in node command DoFlush(). 411 ErrorHandling_VideoEncodeNode_Node_Cmd_Pause = 558, //VideoEncodeNode Error in node command DoPause(). 412 ErrorHandling_VideoEncodeNode_Node_Cmd_ReleasePort = 559, //VideoEncodeNode Error in node command DoReleasePort(). 413 ErrorHandling_AudioEncodeNode_Node_Cmd_Start = 560, //AudioEncodeNode Error in node command DoStart(). 414 ErrorHandling_AudioEncodeNode_Node_Cmd_Stop = 561, //AudioEncodeNode Error in node command DoStop(). 415 ErrorHandling_AudioEncodeNode_Node_Cmd_Flush = 562, //AudioEncodeNode Error in node command DoFlush(). 416 ErrorHandling_AudioEncodeNode_Node_Cmd_Pause = 563, //AudioEncodeNode Error in node command DoPause(). 417 ErrorHandling_AudioEncodeNode_Node_Cmd_ReleasePort = 564, //AudioEncodeNode Error in node command DoReleasePort(). 418 ErrorHandling_AVCEncodeNode_Node_Cmd_Start = 565, //AVCEncodeNode Error in node command DoStart(). 419 ErrorHandling_AVCEncodeNode_Node_Cmd_Stop = 566, //AVCEncodeNode Error in node command DoStop(). 420 ErrorHandling_AVCEncodeNode_Node_Cmd_Flush = 567, //AVCEncodeNode Error in node command DoFlush(). 421 ErrorHandling_AVCEncodeNode_Node_Cmd_Pause = 568, //AVCEncodeNode Error in node command DoPause(). 422 ErrorHandling_AVCEncodeNode_Node_Cmd_ReleasePort = 569, //AVCEncodeNode Error in node command DoReleasePort(). 423 424 KUnCompressed_Errorhandling_TestEnd = 570, 425 426 /*********** Error Handling Tests End**************************/ 427 LastInteractiveTest = 1000, 428 Invalid_Test 429 430 } PVAETestCase; 431 432 class pvauthor_async_test_observer; 433 434 typedef struct 435 { 436 pvauthor_async_test_observer* iObserver; 437 test_case* iTestCase; 438 int32 iTestCaseNum; 439 FILE* iStdOut; 440 441 } PVAuthorAsyncTestParam; 442 443 444 445 446 /** Enumeration of types of asychronous commands that can be issued to PV Author Engine */ 447 typedef enum 448 { 449 PVAE_CMD_NONE = 0, 450 PVAE_CMD_SET_LOG_APPENDER, 451 PVAE_CMD_REMOVE_LOG_APPENDER, 452 PVAE_CMD_SET_LOG_LEVEL, 453 PVAE_CMD_GET_LOG_LEVEL, 454 PVAE_CMD_CREATE, 455 PVAE_CMD_OPEN, 456 PVAE_CMD_CLOSE, 457 PVAE_CMD_ADD_DATA_SOURCE, 458 PVAE_CMD_ADD_DATA_SOURCE_AUDIO, 459 PVAE_CMD_ADD_DATA_SOURCE_VIDEO, 460 PVAE_CMD_ADD_DATA_SOURCE_TEXT, 461 PVAE_CMD_REMOVE_DATA_SOURCE, 462 PVAE_CMD_SELECT_COMPOSER, 463 PVAE_CMD_ADD_MEDIA_TRACK, 464 PVAE_CMD_ADD_AUDIO_MEDIA_TRACK, 465 PVAE_CMD_ADD_VIDEO_MEDIA_TRACK, 466 PVAE_CMD_ADD_TEXT_MEDIA_TRACK, 467 PVAE_CMD_ADD_DATA_SINK, 468 PVAE_CMD_REMOVE_DATA_SINK, 469 PVAE_CMD_INIT, 470 PVAE_CMD_RESET, 471 PVAE_CMD_START, 472 PVAE_CMD_PAUSE, 473 PVAE_CMD_RESUME, 474 PVAE_CMD_STOP, 475 PVAE_CMD_QUERY_UUID, 476 PVAE_CMD_QUERY_INTERFACE, 477 PVAE_CMD_GET_SDK_INFO, 478 PVAE_CMD_GET_SDK_MODULE_INFO, 479 PVAE_CMD_CANCEL_ALL_COMMANDS, 480 PVAE_CMD_QUERY_INTERFACE2, 481 PVAE_CMD_CLEANUPANDCOMPLETE, 482 PVAE_CMD_CAPCONFIG_SYNC, 483 PVAE_CMD_CAPCONFIG_ASYNC, 484 PVAE_CMD_RECORDING, 485 PVAE_CMD_QUERY_INTERFACE1, 486 PVAE_CMD_CAPCONFIG_SYNC1, 487 PVAE_CMD_QUERY_INTERFACE_COMP 488 } PVAECmdType; 489 490 491 //////////////////////////////////////////////////////////////////////////// 492 class PVLoggerSchedulerSetup 493 { 494 public: PVLoggerSchedulerSetup()495 PVLoggerSchedulerSetup() {}; ~PVLoggerSchedulerSetup()496 ~PVLoggerSchedulerSetup() {}; 497 InitLoggerScheduler()498 void InitLoggerScheduler() 499 { 500 // Logging by PV Logger 501 PVLogger::Init(); 502 //PVAELogger::ParseConfigFile(_W("uilogger.txt")); 503 PVAELogger::ParseConfigFile(KPVAELoggerFile); 504 505 // Construct and install the active scheduler 506 OsclScheduler::Init("PVAuthorEngineTestScheduler"); 507 } 508 CleanupLoggerScheduler()509 void CleanupLoggerScheduler() 510 { 511 OsclScheduler::Cleanup(); 512 PVLogger::Cleanup(); 513 } 514 515 }; 516 // Observer class for pvPlayer async test to notify completion of test 517 class pvauthor_async_test_observer 518 { 519 public: 520 // Signals completion of test. Test instance can be deleted after this callback completes. 521 virtual void CompleteTest(test_case &) = 0; 522 }; 523 524 525 //////////////////////////////////////////////////////////////////////////// 526 class pvauthor_async_test_base : public OsclTimerObject, 527 public PVCommandStatusObserver, 528 public PVErrorEventObserver, 529 public PVInformationalEventObserver 530 { 531 public: pvauthor_async_test_base(PVAuthorAsyncTestParam aTestParam)532 pvauthor_async_test_base(PVAuthorAsyncTestParam aTestParam) 533 : OsclTimerObject(OsclActiveObject::EPriorityNominal, "PVAuthorEngineAsyncTestBase"), 534 iObserver(aTestParam.iObserver), 535 iTestCase(aTestParam.iTestCase), 536 iTestCaseNum(aTestParam.iTestCaseNum), 537 iStdOut(aTestParam.iStdOut) 538 {}; 539 ~pvauthor_async_test_base()540 virtual ~pvauthor_async_test_base() {} 541 virtual void StartTest() = 0; CommandCompleted(const PVCmdResponse &)542 virtual void CommandCompleted(const PVCmdResponse& /*aResponse*/) {} HandleErrorEvent(const PVAsyncErrorEvent &)543 virtual void HandleErrorEvent(const PVAsyncErrorEvent& /*aEvent*/) {} HandleInformationalEvent(const PVAsyncInformationalEvent &)544 virtual void HandleInformationalEvent(const PVAsyncInformationalEvent& /*aEvent*/) {} 545 546 pvauthor_async_test_observer* iObserver; 547 test_case* iTestCase; 548 int32 iTestCaseNum; 549 FILE* iStdOut; 550 }; 551 552 553 #endif //#ifndef TEST_PV_AUTHOR_ENGINE_TYPEDEFS_H 554 555