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_PLAYER_ENGINE_TESTSET7_H_INCLUDED 19 #define TEST_PV_PLAYER_ENGINE_TESTSET7_H_INCLUDED 20 21 /** 22 * @file test_pv_player_engine_testset7.h 23 * @brief This file contains the class definitions for the seventh set of 24 * test cases for PVPlayerEngine dealing with use of media IO node for data sink 25 * 26 */ 27 28 #ifndef TEST_PV_PLAYER_ENGINE_H_INCLUDED 29 #include "test_pv_player_engine.h" 30 #endif 31 32 #ifndef PV_PLAYER_DATASOURCEURL_H_INCLUDED 33 #include "pv_player_datasourceurl.h" 34 #endif 35 36 #ifndef PVMF_NODE_INTERFACE_H_INCLUDED 37 #include "pvmf_node_interface.h" 38 #endif 39 40 #ifndef PV_ENGINE_TYPES_H_INCLUDED 41 #include "pv_engine_types.h" 42 #endif 43 44 #ifndef TEST_PV_PLAYER_ENGINE_CONFIG_H_INCLUDED 45 #include "test_pv_player_engine_config.h" 46 #endif 47 48 #ifndef OSCL_FILE_IO_H_INCLUDED 49 #include "oscl_file_io.h" 50 #endif 51 52 #ifndef PVMI_CONFIG_AND_CAPABILITY_OBSERVER_H_INCLUDED 53 #include "pvmi_config_and_capability_observer.h" 54 #endif 55 56 #ifndef PVMF_STREAMING_DATA_SOURCE_H_INCLUDED 57 #include "pvmf_streaming_data_source.h" 58 #endif 59 60 #ifndef PVMF_SOURCE_CONTEXT_DATA_H_INCLUDED 61 #include "pvmf_source_context_data.h" 62 #endif 63 64 class PVPlayerDataSink; 65 class PVPlayerDataSinkFilename; 66 class PvmfFileOutputNodeConfigInterface; 67 class PvmiCapabilityAndConfig; 68 69 #define FIRST_PAUSE_AFTER_START_LOCAL 10 70 #define PAUSE_RESUME_INTERVAL_LOCAL 1 71 #define SEQUENTIAL_PAUSE_INTERVAL_LOCAL 5 72 73 /*! 74 * A test case to test playback of specified source with file output media IO node. Also tests out call to retrieve 75 * metadata keys and values from the source node 76 * - Data Source: Specified by user of test case 77 * - Data Sink(s): Video[File Output MediaIO Interface Node-test_player_mionode_openplaystop_%SOURCEFILENAME%_video.dat]\n 78 * Audio[File Output MediaIO Interface Node-test_player_mionode_openplaystop_%SOURCEFILENAME%_audio.dat]\n 79 * Text[File Output MediaIO Interface Node-test_player_mionode_openplaystop_%SOURCEFILENAME%_text.dat] 80 * - Sequence: 81 * -# CreatePlayer() 82 * -# AddDataSource() 83 * -# Init() 84 * -# GetMetadataKeys() 85 * -# GetMetadataValues() 86 * -# AddDataSink() (video) 87 * -# AddDataSink() (audio) 88 * -# AddDataSink() (text) 89 * -# Prepare() 90 * -# Start() 91 * -# WAIT 20 sec. 92 * -# Stop() 93 * -# RemoveDataSink() (video) 94 * -# RemoveDataSink() (audio) 95 * -# RemoveDataSink() (text) 96 * -# Reset() 97 * -# RemoveDataSource() 98 * -# DeletePlayer() 99 * 100 */ 101 class pvplayer_async_test_mediaionode_openplaystop : public pvplayer_async_test_base 102 { 103 public: pvplayer_async_test_mediaionode_openplaystop(PVPlayerAsyncTestParam aTestParam)104 pvplayer_async_test_mediaionode_openplaystop(PVPlayerAsyncTestParam aTestParam): 105 pvplayer_async_test_base(aTestParam) 106 , iPlayer(NULL) 107 , iDataSource(NULL) 108 , iDataSinkVideo(NULL) 109 , iDataSinkAudio(NULL) 110 , iDataSinkText(NULL) 111 , iIONodeVideo(NULL) 112 , iIONodeAudio(NULL) 113 , iIONodeText(NULL) 114 , iMIOFileOutVideo(NULL) 115 , iMIOFileOutAudio(NULL) 116 , iMIOFileOutText(NULL) 117 , iCurrentCmdId(0) 118 { 119 iTestCaseName = _STRLIT_CHAR("MIONode Open-Play-Stop"); 120 } 121 ~pvplayer_async_test_mediaionode_openplaystop()122 ~pvplayer_async_test_mediaionode_openplaystop() {} 123 124 void StartTest(); 125 void Run(); 126 127 void CommandCompleted(const PVCmdResponse& aResponse); 128 void HandleErrorEvent(const PVAsyncErrorEvent& aEvent); 129 void HandleInformationalEvent(const PVAsyncInformationalEvent& aEvent); 130 131 enum PVTestState 132 { 133 STATE_CREATE, 134 STATE_ADDDATASOURCE, 135 STATE_INIT, 136 STATE_GETMETADATAKEYLIST, 137 STATE_GETMETADATAVALUELIST, 138 STATE_ADDDATASINK_VIDEO, 139 STATE_ADDDATASINK_AUDIO, 140 STATE_ADDDATASINK_TEXT, 141 STATE_PREPARE, 142 STATE_START, 143 STATE_STOP, 144 STATE_REMOVEDATASINK_VIDEO, 145 STATE_REMOVEDATASINK_AUDIO, 146 STATE_REMOVEDATASINK_TEXT, 147 STATE_RESET, 148 STATE_REMOVEDATASOURCE, 149 STATE_CLEANUPANDCOMPLETE 150 }; 151 152 PVTestState iState; 153 154 PVPlayerInterface* iPlayer; 155 PVPlayerDataSourceURL* iDataSource; 156 PVPlayerDataSink* iDataSinkVideo; 157 PVPlayerDataSink* iDataSinkAudio; 158 PVPlayerDataSink* iDataSinkText; 159 PVMFNodeInterface* iIONodeVideo; 160 PVMFNodeInterface* iIONodeAudio; 161 PVMFNodeInterface* iIONodeText; 162 PvmiMIOControl* iMIOFileOutVideo; 163 PvmiMIOControl* iMIOFileOutAudio; 164 PvmiMIOControl* iMIOFileOutText; 165 PVCommandId iCurrentCmdId; 166 167 OSCL_wHeapString<OsclMemAllocator> iFileNameWStr; 168 oscl_wchar iTmpWCharBuffer[512]; 169 170 PVPMetadataList iMetadataKeyList; 171 Oscl_Vector<PvmiKvp, OsclMemAllocator> iMetadataValueList; 172 int32 iNumValues; 173 }; 174 175 176 /*! 177 * A test case to test repeating playback(play-stop-play) of specified source with file output media IO node 178 * - Data Source: Specified by user of test case 179 * - Data Sink(s): Video[File Output MediaIO Interface Node-test_player_mionode_playstopplay_%SOURCEFILENAME%_video.dat]\n 180 * Audio[File Output MediaIO Interface Node-test_player_mionode_playstopplay_%SOURCEFILENAME%_audio.dat]\n 181 * Text[File Output MediaIO Interface Node-test_player_mionode_playstopplay_%SOURCEFILENAME%_text.dat] 182 * - Sequence: 183 * -# CreatePlayer() 184 * -# AddDataSource() 185 * -# Init() 186 * -# AddDataSink() (video) 187 * -# AddDataSink() (audio) 188 * -# AddDataSink() (text) 189 * -# Prepare() 190 * -# Start() 191 * -# WAIT 5 sec. 192 * -# Stop() 193 * -# WAIT 5 sec. 194 * -# Prepare() 195 * -# Start() 196 * -# WAIT 10 sec 197 * -# Stop() 198 * -# RemoveDataSink() (video) 199 * -# RemoveDataSink() (audio) 200 * -# RemoveDataSink() (text) 201 * -# Reset() 202 * -# RemoveDataSource() 203 * -# DeletePlayer() 204 * 205 */ 206 class pvplayer_async_test_mediaionode_playstopplay : public pvplayer_async_test_base 207 { 208 public: pvplayer_async_test_mediaionode_playstopplay(PVPlayerAsyncTestParam aTestParam)209 pvplayer_async_test_mediaionode_playstopplay(PVPlayerAsyncTestParam aTestParam): 210 pvplayer_async_test_base(aTestParam) 211 , iPlayer(NULL) 212 , iDataSource(NULL) 213 , iDataSinkVideo(NULL) 214 , iDataSinkAudio(NULL) 215 , iDataSinkText(NULL) 216 , iIONodeVideo(NULL) 217 , iIONodeAudio(NULL) 218 , iIONodeText(NULL) 219 , iMIOFileOutVideo(NULL) 220 , iMIOFileOutAudio(NULL) 221 , iMIOFileOutText(NULL) 222 , iCurrentCmdId(0) 223 { 224 iTestCaseName = _STRLIT_CHAR("MIONode Play-Stop-Play-Stop"); 225 } 226 ~pvplayer_async_test_mediaionode_playstopplay()227 ~pvplayer_async_test_mediaionode_playstopplay() {} 228 229 void StartTest(); 230 void Run(); 231 232 void CommandCompleted(const PVCmdResponse& aResponse); 233 void HandleErrorEvent(const PVAsyncErrorEvent& aEvent); 234 void HandleInformationalEvent(const PVAsyncInformationalEvent& aEvent); 235 236 enum PVTestState 237 { 238 STATE_CREATE, 239 STATE_ADDDATASOURCE, 240 STATE_INIT, 241 STATE_ADDDATASINK_VIDEO, 242 STATE_ADDDATASINK_AUDIO, 243 STATE_ADDDATASINK_TEXT, 244 STATE_PREPARE1, 245 STATE_START1, 246 STATE_STOP1, 247 STATE_PREPARE2, 248 STATE_START2, 249 STATE_STOP2, 250 STATE_REMOVEDATASINK_VIDEO, 251 STATE_REMOVEDATASINK_AUDIO, 252 STATE_REMOVEDATASINK_TEXT, 253 STATE_RESET, 254 STATE_REMOVEDATASOURCE, 255 STATE_CLEANUPANDCOMPLETE 256 }; 257 258 PVTestState iState; 259 260 PVPlayerInterface* iPlayer; 261 PVPlayerDataSourceURL* iDataSource; 262 PVPlayerDataSink* iDataSinkVideo; 263 PVPlayerDataSink* iDataSinkAudio; 264 PVPlayerDataSink* iDataSinkText; 265 PVMFNodeInterface* iIONodeVideo; 266 PVMFNodeInterface* iIONodeAudio; 267 PVMFNodeInterface* iIONodeText; 268 PvmiMIOControl* iMIOFileOutVideo; 269 PvmiMIOControl* iMIOFileOutAudio; 270 PvmiMIOControl* iMIOFileOutText; 271 PVCommandId iCurrentCmdId; 272 273 OSCL_wHeapString<OsclMemAllocator> iFileNameWStr; 274 oscl_wchar iTmpWCharBuffer[512]; 275 }; 276 277 278 /*! 279 * A test case to test playback pause-resume of specified source with file output media IO node 280 * - Data Source: Specified by user of test case 281 * - Data Sink(s): Video[File Output MediaIO Interface Node-test_player_mionode_pauseresume_%SOURCEFILENAME%_video.dat]\n 282 * Audio[File Output MediaIO Interface Node-test_player_mionode_pauseresume_%SOURCEFILENAME%_audio.dat]\n 283 * Text[File Output MediaIO Interface Node-test_player_mionode_pauseresume_%SOURCEFILENAME%_text.dat] 284 * - Sequence: 285 * -# CreatePlayer() 286 * -# AddDataSource() 287 * -# Init() 288 * -# AddDataSink() (video) 289 * -# AddDataSink() (audio) 290 * -# AddDataSink() (text) 291 * -# Prepare() 292 * -# Start() 293 * -# WAIT 10 sec. 294 * -# Pause() 295 * -# WAIT 5 sec. 296 * -# Resume() 297 * -# WAIT 10 sec. 298 * -# Stop() 299 * -# RemoveDataSink() (video) 300 * -# RemoveDataSink() (audio) 301 * -# RemoveDataSink() (text) 302 * -# Reset() 303 * -# RemoveDataSource() 304 * -# DeletePlayer() 305 * 306 */ 307 class pvplayer_async_test_mediaionode_pauseresume : public pvplayer_async_test_base 308 { 309 public: pvplayer_async_test_mediaionode_pauseresume(PVPlayerAsyncTestParam aTestParam)310 pvplayer_async_test_mediaionode_pauseresume(PVPlayerAsyncTestParam aTestParam): 311 pvplayer_async_test_base(aTestParam) 312 , iPlayer(NULL) 313 , iDataSource(NULL) 314 , iDataSinkVideo(NULL) 315 , iDataSinkAudio(NULL) 316 , iDataSinkText(NULL) 317 , iIONodeVideo(NULL) 318 , iIONodeAudio(NULL) 319 , iIONodeText(NULL) 320 , iMIOFileOutVideo(NULL) 321 , iMIOFileOutAudio(NULL) 322 , iMIOFileOutText(NULL) 323 , iCurrentCmdId(0) 324 { 325 iTestCaseName = _STRLIT_CHAR("MIONode Pause-Resume"); 326 } 327 ~pvplayer_async_test_mediaionode_pauseresume()328 ~pvplayer_async_test_mediaionode_pauseresume() {} 329 330 void StartTest(); 331 void Run(); 332 333 void CommandCompleted(const PVCmdResponse& aResponse); 334 void HandleErrorEvent(const PVAsyncErrorEvent& aEvent); 335 void HandleInformationalEvent(const PVAsyncInformationalEvent& aEvent); 336 337 enum PVTestState 338 { 339 STATE_CREATE, 340 STATE_ADDDATASOURCE, 341 STATE_INIT, 342 STATE_ADDDATASINK_VIDEO, 343 STATE_ADDDATASINK_AUDIO, 344 STATE_ADDDATASINK_TEXT, 345 STATE_PREPARE, 346 STATE_START, 347 STATE_PAUSE, 348 STATE_RESUME, 349 STATE_STOP, 350 STATE_REMOVEDATASINK_VIDEO, 351 STATE_REMOVEDATASINK_AUDIO, 352 STATE_REMOVEDATASINK_TEXT, 353 STATE_RESET, 354 STATE_REMOVEDATASOURCE, 355 STATE_CLEANUPANDCOMPLETE 356 }; 357 358 PVTestState iState; 359 360 PVPlayerInterface* iPlayer; 361 PVPlayerDataSourceURL* iDataSource; 362 PVPlayerDataSink* iDataSinkVideo; 363 PVPlayerDataSink* iDataSinkAudio; 364 PVPlayerDataSink* iDataSinkText; 365 PVMFNodeInterface* iIONodeVideo; 366 PVMFNodeInterface* iIONodeAudio; 367 PVMFNodeInterface* iIONodeText; 368 PvmiMIOControl* iMIOFileOutVideo; 369 PvmiMIOControl* iMIOFileOutAudio; 370 PvmiMIOControl* iMIOFileOutText; 371 PVCommandId iCurrentCmdId; 372 373 OSCL_wHeapString<OsclMemAllocator> iFileNameWStr; 374 oscl_wchar iTmpWCharBuffer[512]; 375 }; 376 377 378 /*! 379 * A test case to test repositioning playback of specified source with file output media IO node 380 * - Data Source: Specified by user of test case 381 * - Data Sink(s): Video[File Output MediaIO Interface Node-test_player_mionode_playsetplaybackrange_%SOURCEFILENAME%_video.dat]\n 382 * Audio[File Output MediaIO Interface Node-test_player_mionode_playsetplaybackrange_%SOURCEFILENAME%_audio.dat]\n 383 * Text[File Output MediaIO Interface Node-test_player_mionode_playsetplaybackrange_%SOURCEFILENAME%_text.dat] 384 * - Sequence: 385 * -# CreatePlayer() 386 * -# AddDataSource() 387 * -# Init() 388 * -# AddDataSink() (video) 389 * -# AddDataSink() (audio) 390 * -# AddDataSink() (text) 391 * -# Prepare() 392 * -# Start() 393 * -# WAIT 10 sec. 394 * -# SetPlaybackRange(20 sec, indeterminate) 395 * -# WAIT 10 sec. 396 * -# Stop() 397 * -# RemoveDataSink() (video) 398 * -# RemoveDataSink() (audio) 399 * -# RemoveDataSink() (text) 400 * -# Reset() 401 * -# RemoveDataSource() 402 * -# DeletePlayer() 403 * 404 */ 405 class pvplayer_async_test_mediaionode_playsetplaybackrange : public pvplayer_async_test_base 406 { 407 public: pvplayer_async_test_mediaionode_playsetplaybackrange(PVPlayerAsyncTestParam aTestParam)408 pvplayer_async_test_mediaionode_playsetplaybackrange(PVPlayerAsyncTestParam aTestParam): 409 pvplayer_async_test_base(aTestParam) 410 , iPlayer(NULL) 411 , iDataSource(NULL) 412 , iDataSinkVideo(NULL) 413 , iDataSinkAudio(NULL) 414 , iDataSinkText(NULL) 415 , iIONodeVideo(NULL) 416 , iIONodeAudio(NULL) 417 , iIONodeText(NULL) 418 , iMIOFileOutVideo(NULL) 419 , iMIOFileOutAudio(NULL) 420 , iMIOFileOutText(NULL) 421 , iCurrentCmdId(0) 422 { 423 iTestCaseName = _STRLIT_CHAR("MIONode Play-SetPlaybackRange"); 424 } 425 ~pvplayer_async_test_mediaionode_playsetplaybackrange()426 ~pvplayer_async_test_mediaionode_playsetplaybackrange() {} 427 428 void StartTest(); 429 void Run(); 430 431 void CommandCompleted(const PVCmdResponse& aResponse); 432 void HandleErrorEvent(const PVAsyncErrorEvent& aEvent); 433 void HandleInformationalEvent(const PVAsyncInformationalEvent& aEvent); 434 435 enum PVTestState 436 { 437 STATE_CREATE, 438 STATE_ADDDATASOURCE, 439 STATE_INIT, 440 STATE_ADDDATASINK_VIDEO, 441 STATE_ADDDATASINK_AUDIO, 442 STATE_ADDDATASINK_TEXT, 443 STATE_PREPARE, 444 STATE_START, 445 STATE_SETPLAYBACKRANGE, 446 STATE_STOP, 447 STATE_REMOVEDATASINK_VIDEO, 448 STATE_REMOVEDATASINK_AUDIO, 449 STATE_REMOVEDATASINK_TEXT, 450 STATE_RESET, 451 STATE_REMOVEDATASOURCE, 452 STATE_CLEANUPANDCOMPLETE 453 }; 454 455 PVTestState iState; 456 457 PVPlayerInterface* iPlayer; 458 PVPlayerDataSourceURL* iDataSource; 459 PVPlayerDataSink* iDataSinkVideo; 460 PVPlayerDataSink* iDataSinkAudio; 461 PVPlayerDataSink* iDataSinkText; 462 PVMFNodeInterface* iIONodeVideo; 463 PVMFNodeInterface* iIONodeAudio; 464 PVMFNodeInterface* iIONodeText; 465 PvmiMIOControl* iMIOFileOutVideo; 466 PvmiMIOControl* iMIOFileOutAudio; 467 PvmiMIOControl* iMIOFileOutText; 468 PVCommandId iCurrentCmdId; 469 470 OSCL_wHeapString<OsclMemAllocator> iFileNameWStr; 471 oscl_wchar iTmpWCharBuffer[512]; 472 }; 473 474 475 /*! 476 * A test case to test 3X playback of specified source with file output media IO node 477 * - Data Source: Specified by user of test case 478 * - Data Sink(s): Video[File Output MediaIO Interface Node-test_player_mionode_3Xplayrate_%SOURCEFILENAME%_video.dat]\n 479 * Audio[File Output MediaIO Interface Node-test_player_mionode_3Xplayrate_%SOURCEFILENAME%_audio.dat]\n 480 * Text[File Output MediaIO Interface Node-test_player_mionode_3Xplayrate_%SOURCEFILENAME%_text.dat] 481 * - Sequence: 482 * -# CreatePlayer() 483 * -# AddDataSource() 484 * -# Init() 485 * -# AddDataSink() (video) 486 * -# AddDataSink() (audio) 487 * -# AddDataSink() (text) 488 * -# Prepare() 489 * -# SetPlaybackRate(300000) 490 * -# Start() 491 * -# WAIT 20 sec. 492 * -# Stop() 493 * -# RemoveDataSink() (video) 494 * -# RemoveDataSink() (audio) 495 * -# RemoveDataSink() (text) 496 * -# Reset() 497 * -# RemoveDataSource() 498 * -# DeletePlayer() 499 * 500 */ 501 class pvplayer_async_test_mediaionode_3Xplayrate : public pvplayer_async_test_base 502 { 503 public: pvplayer_async_test_mediaionode_3Xplayrate(PVPlayerAsyncTestParam aTestParam)504 pvplayer_async_test_mediaionode_3Xplayrate(PVPlayerAsyncTestParam aTestParam): 505 pvplayer_async_test_base(aTestParam) 506 , iPlayer(NULL) 507 , iDataSource(NULL) 508 , iDataSinkVideo(NULL) 509 , iDataSinkAudio(NULL) 510 , iDataSinkText(NULL) 511 , iIONodeVideo(NULL) 512 , iIONodeAudio(NULL) 513 , iIONodeText(NULL) 514 , iMIOFileOutVideo(NULL) 515 , iMIOFileOutAudio(NULL) 516 , iMIOFileOutText(NULL) 517 , iCurrentCmdId(0) 518 { 519 iTestCaseName = _STRLIT_CHAR("MIONode SetPlaybackRate 3X"); 520 } 521 ~pvplayer_async_test_mediaionode_3Xplayrate()522 ~pvplayer_async_test_mediaionode_3Xplayrate() {} 523 524 void StartTest(); 525 void Run(); 526 527 void CommandCompleted(const PVCmdResponse& aResponse); 528 void HandleErrorEvent(const PVAsyncErrorEvent& aEvent); 529 void HandleInformationalEvent(const PVAsyncInformationalEvent& aEvent); 530 531 enum PVTestState 532 { 533 STATE_CREATE, 534 STATE_ADDDATASOURCE, 535 STATE_INIT, 536 STATE_ADDDATASINK_VIDEO, 537 STATE_ADDDATASINK_AUDIO, 538 STATE_ADDDATASINK_TEXT, 539 STATE_PREPARE, 540 STATE_SETPLAYBACKRATE, 541 STATE_START, 542 STATE_STOP, 543 STATE_REMOVEDATASINK_VIDEO, 544 STATE_REMOVEDATASINK_AUDIO, 545 STATE_REMOVEDATASINK_TEXT, 546 STATE_RESET, 547 STATE_REMOVEDATASOURCE, 548 STATE_CLEANUPANDCOMPLETE 549 }; 550 551 PVTestState iState; 552 553 PVPlayerInterface* iPlayer; 554 PVPlayerDataSourceURL* iDataSource; 555 PVPlayerDataSink* iDataSinkVideo; 556 PVPlayerDataSink* iDataSinkAudio; 557 PVPlayerDataSink* iDataSinkText; 558 PVMFNodeInterface* iIONodeVideo; 559 PVMFNodeInterface* iIONodeAudio; 560 PVMFNodeInterface* iIONodeText; 561 PvmiMIOControl* iMIOFileOutVideo; 562 PvmiMIOControl* iMIOFileOutAudio; 563 PvmiMIOControl* iMIOFileOutText; 564 PVCommandId iCurrentCmdId; 565 566 OSCL_wHeapString<OsclMemAllocator> iFileNameWStr; 567 oscl_wchar iTmpWCharBuffer[512]; 568 }; 569 570 571 /*! 572 * A test case to test 0.5X playback of specified source with file output media IO node 573 * - Data Source: Specified by user of test case 574 * - Data Sink(s): Video[File Output MediaIO Interface Node-test_player_mionode_halfplayrate_%SOURCEFILENAME%_video.dat]\n 575 * Audio[File Output MediaIO Interface Node-test_player_mionode_halfplayrate_%SOURCEFILENAME%_audio.dat]\n 576 * Text[File Output MediaIO Interface Node-test_player_mionode_halfplayrate_%SOURCEFILENAME%_text.dat] 577 * - Sequence: 578 * -# CreatePlayer() 579 * -# AddDataSource() 580 * -# Init() 581 * -# AddDataSink() (video) 582 * -# AddDataSink() (audio) 583 * -# AddDataSink() (text) 584 * -# Prepare() 585 * -# SetPlaybackRate(50000) 586 * -# Start() 587 * -# WAIT 20 sec. 588 * -# Stop() 589 * -# RemoveDataSink() (video) 590 * -# RemoveDataSink() (audio) 591 * -# RemoveDataSink() (text) 592 * -# Reset() 593 * -# RemoveDataSource() 594 * -# DeletePlayer() 595 * 596 */ 597 class pvplayer_async_test_mediaionode_halfplayrate : public pvplayer_async_test_base 598 { 599 public: pvplayer_async_test_mediaionode_halfplayrate(PVPlayerAsyncTestParam aTestParam)600 pvplayer_async_test_mediaionode_halfplayrate(PVPlayerAsyncTestParam aTestParam): 601 pvplayer_async_test_base(aTestParam) 602 , iPlayer(NULL) 603 , iDataSource(NULL) 604 , iDataSinkVideo(NULL) 605 , iDataSinkAudio(NULL) 606 , iDataSinkText(NULL) 607 , iIONodeVideo(NULL) 608 , iIONodeAudio(NULL) 609 , iIONodeText(NULL) 610 , iMIOFileOutVideo(NULL) 611 , iMIOFileOutAudio(NULL) 612 , iMIOFileOutText(NULL) 613 , iCurrentCmdId(0) 614 { 615 iTestCaseName = _STRLIT_CHAR("MIONode SetPlaybackRate 1/2X"); 616 } 617 ~pvplayer_async_test_mediaionode_halfplayrate()618 ~pvplayer_async_test_mediaionode_halfplayrate() {} 619 620 void StartTest(); 621 void Run(); 622 623 void CommandCompleted(const PVCmdResponse& aResponse); 624 void HandleErrorEvent(const PVAsyncErrorEvent& aEvent); 625 void HandleInformationalEvent(const PVAsyncInformationalEvent& aEvent); 626 627 enum PVTestState 628 { 629 STATE_CREATE, 630 STATE_ADDDATASOURCE, 631 STATE_INIT, 632 STATE_ADDDATASINK_VIDEO, 633 STATE_ADDDATASINK_AUDIO, 634 STATE_ADDDATASINK_TEXT, 635 STATE_PREPARE, 636 STATE_SETPLAYBACKRATE, 637 STATE_START, 638 STATE_STOP, 639 STATE_REMOVEDATASINK_VIDEO, 640 STATE_REMOVEDATASINK_AUDIO, 641 STATE_REMOVEDATASINK_TEXT, 642 STATE_RESET, 643 STATE_REMOVEDATASOURCE, 644 STATE_CLEANUPANDCOMPLETE 645 }; 646 647 PVTestState iState; 648 649 PVPlayerInterface* iPlayer; 650 PVPlayerDataSourceURL* iDataSource; 651 PVPlayerDataSink* iDataSinkVideo; 652 PVPlayerDataSink* iDataSinkAudio; 653 PVPlayerDataSink* iDataSinkText; 654 PVMFNodeInterface* iIONodeVideo; 655 PVMFNodeInterface* iIONodeAudio; 656 PVMFNodeInterface* iIONodeText; 657 PvmiMIOControl* iMIOFileOutVideo; 658 PvmiMIOControl* iMIOFileOutAudio; 659 PvmiMIOControl* iMIOFileOutText; 660 PVCommandId iCurrentCmdId; 661 662 OSCL_wHeapString<OsclMemAllocator> iFileNameWStr; 663 oscl_wchar iTmpWCharBuffer[512]; 664 }; 665 666 667 /*! 668 * A test case to test looping playback of specified source with file output media IO node 669 * - Data Source: Specified by user of test case 670 * - Data Sink(s): Video[File Output MediaIO Interface Node-test_player_mionode_looping_%SOURCEFILENAME%_video.dat]\n 671 * Audio[File Output MediaIO Interface Node-test_player_mionode_looping_%SOURCEFILENAME%_audio.dat]\n 672 * Text[File Output MediaIO Interface Node-test_player_mionode_looping_%SOURCEFILENAME%_text.dat] 673 * - Sequence: 674 * -# CreatePlayer() 675 * -# AddDataSource() 676 * -# Init() 677 * -# AddDataSink() (video) 678 * -# AddDataSink() (audio) 679 * -# AddDataSink() (text) 680 * -# Prepare() 681 * -# Start() 682 * -# SetPlaybackRange(indeterminate, end at 10 sec) 683 * -# WAIT 15 sec. for end time reached event 684 * -# SetPlaybackRange(0, end at 10 sec) 685 * -# Resume() 686 * -# WAIT 15 sec. for end time reached event 687 * -# Stop() 688 * -# RemoveDataSink() (video) 689 * -# RemoveDataSink() (audio) 690 * -# RemoveDataSink() (text) 691 * -# Reset() 692 * -# RemoveDataSource() 693 * -# DeletePlayer() 694 * 695 */ 696 class pvplayer_async_test_mediaionode_looping : public pvplayer_async_test_base 697 { 698 public: pvplayer_async_test_mediaionode_looping(PVPlayerAsyncTestParam aTestParam)699 pvplayer_async_test_mediaionode_looping(PVPlayerAsyncTestParam aTestParam): 700 pvplayer_async_test_base(aTestParam) 701 , iPlayer(NULL) 702 , iDataSource(NULL) 703 , iDataSinkVideo(NULL) 704 , iDataSinkAudio(NULL) 705 , iDataSinkText(NULL) 706 , iIONodeVideo(NULL) 707 , iIONodeAudio(NULL) 708 , iIONodeText(NULL) 709 , iMIOFileOutVideo(NULL) 710 , iMIOFileOutAudio(NULL) 711 , iMIOFileOutText(NULL) 712 , iCurrentCmdId(0) 713 { 714 iTestCaseName = _STRLIT_CHAR("MIONode Looping"); 715 } 716 ~pvplayer_async_test_mediaionode_looping()717 ~pvplayer_async_test_mediaionode_looping() {} 718 719 void StartTest(); 720 void Run(); 721 722 void CommandCompleted(const PVCmdResponse& aResponse); 723 void HandleErrorEvent(const PVAsyncErrorEvent& aEvent); 724 void HandleInformationalEvent(const PVAsyncInformationalEvent& aEvent); 725 726 enum PVTestState 727 { 728 STATE_CREATE, 729 STATE_ADDDATASOURCE, 730 STATE_INIT, 731 STATE_ADDDATASINK_VIDEO, 732 STATE_ADDDATASINK_AUDIO, 733 STATE_ADDDATASINK_TEXT, 734 STATE_PREPARE, 735 STATE_START, 736 STATE_SETPLAYBACKRANGE1, 737 STATE_ENDTIMENOTREACHED1, 738 STATE_SETPLAYBACKRANGE2, 739 STATE_RESUME, 740 STATE_ENDTIMENOTREACHED2, 741 STATE_STOP, 742 STATE_REMOVEDATASINK_VIDEO, 743 STATE_REMOVEDATASINK_AUDIO, 744 STATE_REMOVEDATASINK_TEXT, 745 STATE_RESET, 746 STATE_REMOVEDATASOURCE, 747 STATE_CLEANUPANDCOMPLETE 748 }; 749 750 PVTestState iState; 751 752 PVPlayerInterface* iPlayer; 753 PVPlayerDataSourceURL* iDataSource; 754 PVPlayerDataSink* iDataSinkVideo; 755 PVPlayerDataSink* iDataSinkAudio; 756 PVPlayerDataSink* iDataSinkText; 757 PVMFNodeInterface* iIONodeVideo; 758 PVMFNodeInterface* iIONodeAudio; 759 PVMFNodeInterface* iIONodeText; 760 PvmiMIOControl* iMIOFileOutVideo; 761 PvmiMIOControl* iMIOFileOutAudio; 762 PvmiMIOControl* iMIOFileOutText; 763 PVCommandId iCurrentCmdId; 764 765 OSCL_wHeapString<OsclMemAllocator> iFileNameWStr; 766 oscl_wchar iTmpWCharBuffer[512]; 767 }; 768 769 770 /*! 771 * A test case to test playback of specified source with file output media IO node till EOS 772 * - Data Source: Specified by user of test case 773 * - Data Sink(s): Video[File Output MediaIO Interface Node-test_player_mionode_waitforeos_%SOURCEFILENAME%_video.dat]\n 774 * Audio[File Output MediaIO Interface Node-test_player_mionode_waitforeos_%SOURCEFILENAME%_audio.dat]\n 775 * Text[File Output MediaIO Interface Node-test_player_mionode_waitforeos_%SOURCEFILENAME%_text.dat] 776 * - Sequence: 777 * -# CreatePlayer() 778 * -# AddDataSource() 779 * -# Init() 780 * -# AddDataSink() (video) 781 * -# AddDataSink() (audio) 782 * -# AddDataSink() (text) 783 * -# Prepare() 784 * -# Start() 785 * -# WAIT FOR EOS EVENT OR TIMEOUT AFTER 180 sec. 786 * -# IF PAUSED DUE TO EOS Resume() (should fail) 787 * -# Stop() 788 * -# RemoveDataSink() (video) 789 * -# RemoveDataSink() (audio) 790 * -# RemoveDataSink() (text) 791 * -# Reset() 792 * -# RemoveDataSource() 793 * -# DeletePlayer() 794 * 795 */ 796 class pvplayer_async_test_mediaionode_waitforeos : public pvplayer_async_test_base 797 { 798 public: pvplayer_async_test_mediaionode_waitforeos(PVPlayerAsyncTestParam aTestParam)799 pvplayer_async_test_mediaionode_waitforeos(PVPlayerAsyncTestParam aTestParam): 800 pvplayer_async_test_base(aTestParam) 801 , iPlayer(NULL) 802 , iDataSource(NULL) 803 , iDataSinkVideo(NULL) 804 , iDataSinkAudio(NULL) 805 , iDataSinkText(NULL) 806 , iIONodeVideo(NULL) 807 , iIONodeAudio(NULL) 808 , iIONodeText(NULL) 809 , iMIOFileOutVideo(NULL) 810 , iMIOFileOutAudio(NULL) 811 , iMIOFileOutText(NULL) 812 , iCurrentCmdId(0) 813 { 814 iTestCaseName = _STRLIT_CHAR("MIONode Wait For EOS"); 815 } 816 ~pvplayer_async_test_mediaionode_waitforeos()817 ~pvplayer_async_test_mediaionode_waitforeos() {} 818 819 void StartTest(); 820 void Run(); 821 822 void CommandCompleted(const PVCmdResponse& aResponse); 823 void HandleErrorEvent(const PVAsyncErrorEvent& aEvent); 824 void HandleInformationalEvent(const PVAsyncInformationalEvent& aEvent); 825 826 enum PVTestState 827 { 828 STATE_CREATE, 829 STATE_ADDDATASOURCE, 830 STATE_INIT, 831 STATE_ADDDATASINK_VIDEO, 832 STATE_ADDDATASINK_AUDIO, 833 STATE_ADDDATASINK_TEXT, 834 STATE_PREPARE, 835 STATE_START, 836 STATE_EOSNOTREACHED, 837 STATE_RESUMEAFTEREOS, 838 STATE_STOP, 839 STATE_REMOVEDATASINK_VIDEO, 840 STATE_REMOVEDATASINK_AUDIO, 841 STATE_REMOVEDATASINK_TEXT, 842 STATE_RESET, 843 STATE_REMOVEDATASOURCE, 844 STATE_CLEANUPANDCOMPLETE 845 }; 846 847 PVTestState iState; 848 849 PVPlayerInterface* iPlayer; 850 PVPlayerDataSourceURL* iDataSource; 851 PVPlayerDataSink* iDataSinkVideo; 852 PVPlayerDataSink* iDataSinkAudio; 853 PVPlayerDataSink* iDataSinkText; 854 PVMFNodeInterface* iIONodeVideo; 855 PVMFNodeInterface* iIONodeAudio; 856 PVMFNodeInterface* iIONodeText; 857 PvmiMIOControl* iMIOFileOutVideo; 858 PvmiMIOControl* iMIOFileOutAudio; 859 PvmiMIOControl* iMIOFileOutText; 860 PVCommandId iCurrentCmdId; 861 862 OSCL_wHeapString<OsclMemAllocator> iFileNameWStr; 863 oscl_wchar iTmpWCharBuffer[512]; 864 }; 865 866 867 /*! 868 * A test case to test if the player engine can handle multiple pause-resume requests with media IO for sinks 869 * - Data Source: Specified source 870 * - Data Sink(s): Video[FileOutputNode-test_player_mionode_multipauseresume_[SRCFILENAME]_video.dat]\n 871 * Audio[FileOutputNode-test_player_mionode_multipauseresume_[SRCFILENAME]_audio.dat]\n 872 * Text[FileOutputNode-test_player_mionode_multipauseresume_[SRCFILENAME]_text.dat] 873 * - Sequence: 874 * -# CreatePlayer() 875 * -# AddDataSource()/Init()/AddDataSink() (video)/AddDataSink() (audio)/AddDataSink() (text)/Prepare()/Start() 876 * -# WAIT 5 sec. 877 * -# Pause()/Resume() X 5 878 * -# WAIT 2 sec. 879 * -# Pause() 880 * -# WAIT 5 sec. 881 * -# Resume() 882 * -# WAIT 3 sec. 883 * -# Pause()/Resume() X 3 884 * -# Wait 5 sec. 885 * -# Stop()/RemoveDataSink() (video)/RemoveDataSink() (audio)/RemoveDataSink() (text)/Reset()/RemoveDataSource() 886 * -# DeletePlayer() 887 * 888 */ 889 class pvplayer_async_test_mediaionode_multipauseresume : public pvplayer_async_test_base 890 { 891 public: pvplayer_async_test_mediaionode_multipauseresume(PVPlayerAsyncTestParam aTestParam)892 pvplayer_async_test_mediaionode_multipauseresume(PVPlayerAsyncTestParam aTestParam): 893 pvplayer_async_test_base(aTestParam) 894 , iPlayer(NULL) 895 , iDataSource(NULL) 896 , iDataSinkVideo(NULL) 897 , iDataSinkAudio(NULL) 898 , iDataSinkText(NULL) 899 , iIONodeVideo(NULL) 900 , iIONodeAudio(NULL) 901 , iIONodeText(NULL) 902 , iMIOFileOutVideo(NULL) 903 , iMIOFileOutAudio(NULL) 904 , iMIOFileOutText(NULL) 905 , iCurrentCmdId(0) 906 , iSourceContextData(NULL) 907 { 908 iTestCaseName = _STRLIT_CHAR("MIONode Multiple Pause-Resume"); 909 } 910 ~pvplayer_async_test_mediaionode_multipauseresume()911 ~pvplayer_async_test_mediaionode_multipauseresume() {} 912 913 void StartTest(); 914 void Run(); 915 916 void CommandCompleted(const PVCmdResponse& aResponse); 917 void HandleErrorEvent(const PVAsyncErrorEvent& aEvent); 918 void HandleInformationalEvent(const PVAsyncInformationalEvent& aEvent); 919 920 enum PVTestState 921 { 922 STATE_CREATE, 923 STATE_STARTPLAYBACK, 924 STATE_PAUSERESUME1, 925 STATE_PAUSE, 926 STATE_RESUME, 927 STATE_PAUSERESUME2, 928 STATE_SHUTDOWN, 929 STATE_CLEANUPANDCOMPLETE 930 }; 931 932 PVTestState iState; 933 934 PVPlayerInterface* iPlayer; 935 PVPlayerDataSourceURL* iDataSource; 936 PVPlayerDataSink* iDataSinkVideo; 937 PVPlayerDataSink* iDataSinkAudio; 938 PVPlayerDataSink* iDataSinkText; 939 PVMFNodeInterface* iIONodeVideo; 940 PVMFNodeInterface* iIONodeAudio; 941 PVMFNodeInterface* iIONodeText; 942 PvmiMIOControl* iMIOFileOutVideo; 943 PvmiMIOControl* iMIOFileOutAudio; 944 PvmiMIOControl* iMIOFileOutText; 945 PVCommandId iCurrentCmdId; 946 947 Oscl_Vector<PVCommandId, OsclMemAllocator> iCmdIds; 948 949 private: 950 OSCL_wHeapString<OsclMemAllocator> wFileName; 951 oscl_wchar output[512]; 952 PVMFSourceContextData* iSourceContextData; 953 }; 954 955 956 /*! 957 * A test case to test if the player engine can handle multiple repositioning during playback with media IO for sinks 958 * - Data Source: Specified source 959 * - Data Sink(s): Video[FileOutputNode-test_player_mionode_multireposition_[SRCFILENAME]_video.dat]\n 960 * Audio[FileOutputNode-test_player_mionode_multireposition_[SRCFILENAME]_audio.dat]\n 961 * Text[FileOutputNode-test_player_mionode_multireposition_[SRCFILENAME]_text.dat] 962 * - Sequence: 963 * -# CreatePlayer() 964 * -# AddDataSource()/Init()/AddDataSink() (video)/AddDataSink() (audio)/AddDataSink() (text)/Prepare()/Start() 965 * -# WAIT 5 sec. 966 * -# SetPlaybackRange(20 sec, indeterminate) 967 * -# WAIT 5 sec. 968 * -# SetPlaybackRange(5 sec, indeterminate) 969 * -# WAIT 5 sec. 970 * -# SetPlaybackRange(25 sec, indeterminate) 971 * -# WAIT 5 sec. 972 * -# SetPlaybackRange(10 sec, indeterminate) 973 * -# WAIT 5 sec. 974 * -# SetPlaybackRange(20 sec, indeterminate) 975 * -# SetPlaybackRange(0 sec, indeterminate) 976 * -# WAIT 5 sec. 977 * -# Stop()/RemoveDataSink() (video)/RemoveDataSink() (audio)/RemoveDataSink() (text)/Reset()/RemoveDataSource() 978 * -# DeletePlayer() 979 * 980 */ 981 class pvplayer_async_test_mediaionode_multireposition : public pvplayer_async_test_base 982 { 983 public: pvplayer_async_test_mediaionode_multireposition(PVPlayerAsyncTestParam aTestParam)984 pvplayer_async_test_mediaionode_multireposition(PVPlayerAsyncTestParam aTestParam): 985 pvplayer_async_test_base(aTestParam) 986 , iPlayer(NULL) 987 , iDataSource(NULL) 988 , iDataSinkVideo(NULL) 989 , iDataSinkAudio(NULL) 990 , iDataSinkText(NULL) 991 , iIONodeVideo(NULL) 992 , iIONodeAudio(NULL) 993 , iIONodeText(NULL) 994 , iMIOFileOutVideo(NULL) 995 , iMIOFileOutAudio(NULL) 996 , iMIOFileOutText(NULL) 997 , iCurrentCmdId(0) 998 { 999 iTestCaseName = _STRLIT_CHAR("MIONode Multiple SetPlaybackRange"); 1000 } 1001 ~pvplayer_async_test_mediaionode_multireposition()1002 ~pvplayer_async_test_mediaionode_multireposition() {} 1003 1004 void StartTest(); 1005 void Run(); 1006 1007 void CommandCompleted(const PVCmdResponse& aResponse); 1008 void HandleErrorEvent(const PVAsyncErrorEvent& aEvent); 1009 void HandleInformationalEvent(const PVAsyncInformationalEvent& aEvent); 1010 1011 enum PVTestState 1012 { 1013 STATE_CREATE, 1014 STATE_STARTPLAYBACK, 1015 STATE_SETPLAYBACKRANGE1, 1016 STATE_SETPLAYBACKRANGE2, 1017 STATE_SETPLAYBACKRANGE3, 1018 STATE_SETPLAYBACKRANGE4, 1019 STATE_SETPLAYBACKRANGE5, 1020 STATE_SETPLAYBACKRANGE6, 1021 STATE_SHUTDOWN, 1022 STATE_CLEANUPANDCOMPLETE 1023 }; 1024 1025 PVTestState iState; 1026 1027 PVPlayerInterface* iPlayer; 1028 PVPlayerDataSourceURL* iDataSource; 1029 PVPlayerDataSink* iDataSinkVideo; 1030 PVPlayerDataSink* iDataSinkAudio; 1031 PVPlayerDataSink* iDataSinkText; 1032 PVMFNodeInterface* iIONodeVideo; 1033 PVMFNodeInterface* iIONodeAudio; 1034 PVMFNodeInterface* iIONodeText; 1035 PvmiMIOControl* iMIOFileOutVideo; 1036 PvmiMIOControl* iMIOFileOutAudio; 1037 PvmiMIOControl* iMIOFileOutText; 1038 PVCommandId iCurrentCmdId; 1039 1040 Oscl_Vector<PVCommandId, OsclMemAllocator> iCmdIds; 1041 1042 Oscl_FileServer iFS; 1043 Oscl_File iTimeLogFile; 1044 1045 private: 1046 OSCL_wHeapString<OsclMemAllocator> wFileName; 1047 oscl_wchar output[512]; 1048 }; 1049 1050 1051 /*! 1052 * A test case to test various configurations of repositioning playback of specified source with file output media IO node 1053 * - Data Source: Specified by user of test case 1054 * - Data Sink(s): Video[File Output MediaIO Interface Node-test_player_mionode_repositionconfig_%SOURCEFILENAME%_video.dat]\n 1055 * Audio[File Output MediaIO Interface Node-test_player_mionode_repositionconfig_%SOURCEFILENAME%_audio.dat]\n 1056 * Text[File Output MediaIO Interface Node-test_player_mionode_repositionconfig_%SOURCEFILENAME%_text.dat] 1057 * - Sequence: 1058 * -# CreatePlayer()/QueryInterface() (capability-and-config interface) 1059 * -# AddDataSource() 1060 * -# Init() 1061 * -# AddDataSink() (video) 1062 * -# AddDataSink() (audio) 1063 * -# AddDataSink() (text) 1064 * -# setParametersSync() seektosyncpoint=true, seekwindow=0, skiptorequestedpos=false 1065 * -# SetPlaybackRange(10sec, indeterminate) 1066 * -# Prepare() 1067 * -# Start() 1068 * -# WAIT 5 sec. 1069 * -# SetPlaybackRange(20 sec, indeterminate) 1070 * -# WAIT 10 sec. 1071 * -# setParametersSync() seektosyncpoint=true, seekwindow=1000, skiptorequestedpos=false 1072 * -# SetPlaybackRange(20 sec, indeterminate) 1073 * -# WAIT 10 sec. 1074 * -# setParametersSync() seektosyncpoint=true, seekwindow=1000, skiptorequestedpos=true 1075 * -# SetPlaybackRange(20 sec, indeterminate) 1076 * -# WAIT 10 sec. 1077 * -# setParametersSync() seektosyncpoint=false, skiptorequestedpos=false 1078 * -# SetPlaybackRange(20 sec, indeterminate) 1079 * -# WAIT 10 sec. 1080 * -# setParametersSync() seektosyncpoint=false, skiptorequestedpos=true 1081 * -# SetPlaybackRange(20 sec, indeterminate) 1082 * -# WAIT 5 sec. 1083 * -# setParametersSync() seektosyncpoint=true, seekwindow=100, skiptorequestedpos=false 1084 * -# SetPlaybackRange(30 sec, indeterminate) 1085 * -# WAIT 5 sec. 1086 * -# Stop() 1087 * -# RemoveDataSink() (video) 1088 * -# RemoveDataSink() (audio) 1089 * -# RemoveDataSink() (text) 1090 * -# Reset() 1091 * -# RemoveDataSource() 1092 * -# DeletePlayer() 1093 * 1094 */ 1095 class pvplayer_async_test_mediaionode_repositionconfig : public pvplayer_async_test_base 1096 { 1097 public: pvplayer_async_test_mediaionode_repositionconfig(PVPlayerAsyncTestParam aTestParam)1098 pvplayer_async_test_mediaionode_repositionconfig(PVPlayerAsyncTestParam aTestParam): 1099 pvplayer_async_test_base(aTestParam) 1100 , iPlayer(NULL) 1101 , iPlayerCapConfigIF(NULL) 1102 , iDataSource(NULL) 1103 , iDataSinkVideo(NULL) 1104 , iDataSinkAudio(NULL) 1105 , iDataSinkText(NULL) 1106 , iIONodeVideo(NULL) 1107 , iIONodeAudio(NULL) 1108 , iIONodeText(NULL) 1109 , iMIOFileOutVideo(NULL) 1110 , iMIOFileOutAudio(NULL) 1111 , iMIOFileOutText(NULL) 1112 , iCurrentCmdId(0) 1113 { 1114 iTestCaseName = _STRLIT_CHAR("MIONode Different Reposition Config"); 1115 } 1116 ~pvplayer_async_test_mediaionode_repositionconfig()1117 ~pvplayer_async_test_mediaionode_repositionconfig() {} 1118 1119 void StartTest(); 1120 void Run(); 1121 1122 void CommandCompleted(const PVCmdResponse& aResponse); 1123 void HandleErrorEvent(const PVAsyncErrorEvent& aEvent); 1124 void HandleInformationalEvent(const PVAsyncInformationalEvent& aEvent); 1125 1126 enum PVTestState 1127 { 1128 STATE_CREATE, 1129 STATE_ADDDATASOURCE, 1130 STATE_INIT, 1131 STATE_ADDDATASINK_VIDEO, 1132 STATE_ADDDATASINK_AUDIO, 1133 STATE_ADDDATASINK_TEXT, 1134 STATE_SETPLAYBACKRANGE1, 1135 STATE_PREPARE, 1136 STATE_START, 1137 STATE_SETPLAYBACKRANGE2, 1138 STATE_SETPLAYBACKRANGE3, 1139 STATE_SETPLAYBACKRANGE4, 1140 STATE_SETPLAYBACKRANGE5, 1141 STATE_SETPLAYBACKRANGE6, 1142 STATE_SETPLAYBACKRANGE7, 1143 STATE_STOP, 1144 STATE_REMOVEDATASINK_VIDEO, 1145 STATE_REMOVEDATASINK_AUDIO, 1146 STATE_REMOVEDATASINK_TEXT, 1147 STATE_RESET, 1148 STATE_REMOVEDATASOURCE, 1149 STATE_CLEANUPANDCOMPLETE 1150 }; 1151 1152 PVTestState iState; 1153 1154 PVPlayerInterface* iPlayer; 1155 PvmiCapabilityAndConfig* iPlayerCapConfigIF; 1156 PVPlayerDataSourceURL* iDataSource; 1157 PVPlayerDataSink* iDataSinkVideo; 1158 PVPlayerDataSink* iDataSinkAudio; 1159 PVPlayerDataSink* iDataSinkText; 1160 PVMFNodeInterface* iIONodeVideo; 1161 PVMFNodeInterface* iIONodeAudio; 1162 PVMFNodeInterface* iIONodeText; 1163 PvmiMIOControl* iMIOFileOutVideo; 1164 PvmiMIOControl* iMIOFileOutAudio; 1165 PvmiMIOControl* iMIOFileOutText; 1166 PVCommandId iCurrentCmdId; 1167 1168 OSCL_wHeapString<OsclMemAllocator> iFileNameWStr; 1169 oscl_wchar iTmpWCharBuffer[512]; 1170 }; 1171 1172 1173 /*! 1174 * A test case to test multiple looping playback of the whole specified source with file output media IO node 1175 * - Data Source: Specified by user of test case 1176 * - Data Sink(s): Video[File Output MediaIO Interface Node-test_player_mionode_eoslooping_%SOURCEFILENAME%_video.dat]\n 1177 * Audio[File Output MediaIO Interface Node-test_player_mionode_eoslooping_%SOURCEFILENAME%_audio.dat]\n 1178 * Text[File Output MediaIO Interface Node-test_player_mionode_eoslooping_%SOURCEFILENAME%_text.dat] 1179 * - Sequence: 1180 * -# CreatePlayer() 1181 * -# AddDataSource() 1182 * -# Init() 1183 * -# AddDataSink() (video) 1184 * -# AddDataSink() (audio) 1185 * -# AddDataSink() (text) 1186 * -# Prepare() 1187 * -# Start() 1188 * -# WAIT 180 sec. for EOS event 1189 * -# SetPlaybackRange(0, indeterminate) 1190 * -# Resume() 1191 * -# WAIT 180 sec. for EOS event 1192 * -# SetPlaybackRange(0, indeterminate) 1193 * -# Resume() 1194 * -# WAIT 180 sec. for EOS event 1195 * -# Stop() 1196 * -# RemoveDataSink() (video) 1197 * -# RemoveDataSink() (audio) 1198 * -# RemoveDataSink() (text) 1199 * -# Reset() 1200 * -# RemoveDataSource() 1201 * -# DeletePlayer() 1202 * 1203 */ 1204 class pvplayer_async_test_mediaionode_eoslooping : public pvplayer_async_test_base 1205 { 1206 public: pvplayer_async_test_mediaionode_eoslooping(PVPlayerAsyncTestParam aTestParam)1207 pvplayer_async_test_mediaionode_eoslooping(PVPlayerAsyncTestParam aTestParam): 1208 pvplayer_async_test_base(aTestParam) 1209 , iPlayer(NULL) 1210 , iDataSource(NULL) 1211 , iDataSinkVideo(NULL) 1212 , iDataSinkAudio(NULL) 1213 , iDataSinkText(NULL) 1214 , iIONodeVideo(NULL) 1215 , iIONodeAudio(NULL) 1216 , iIONodeText(NULL) 1217 , iMIOFileOutVideo(NULL) 1218 , iMIOFileOutAudio(NULL) 1219 , iMIOFileOutText(NULL) 1220 , iCurrentCmdId(0) 1221 { 1222 iTestCaseName = _STRLIT_CHAR("MIONode Looping After EOS"); 1223 } 1224 ~pvplayer_async_test_mediaionode_eoslooping()1225 ~pvplayer_async_test_mediaionode_eoslooping() {} 1226 1227 void StartTest(); 1228 void Run(); 1229 1230 void CommandCompleted(const PVCmdResponse& aResponse); 1231 void HandleErrorEvent(const PVAsyncErrorEvent& aEvent); 1232 void HandleInformationalEvent(const PVAsyncInformationalEvent& aEvent); 1233 1234 enum PVTestState 1235 { 1236 STATE_CREATE, 1237 STATE_ADDDATASOURCE, 1238 STATE_INIT, 1239 STATE_ADDDATASINK_VIDEO, 1240 STATE_ADDDATASINK_AUDIO, 1241 STATE_ADDDATASINK_TEXT, 1242 STATE_PREPARE, 1243 STATE_START, 1244 STATE_ENDTIMENOTREACHED1, 1245 STATE_SETPLAYBACKRANGE1, 1246 STATE_RESUME1, 1247 STATE_ENDTIMENOTREACHED2, 1248 STATE_SETPLAYBACKRANGE2, 1249 STATE_RESUME2, 1250 STATE_ENDTIMENOTREACHED3, 1251 STATE_STOP, 1252 STATE_REMOVEDATASINK_VIDEO, 1253 STATE_REMOVEDATASINK_AUDIO, 1254 STATE_REMOVEDATASINK_TEXT, 1255 STATE_RESET, 1256 STATE_REMOVEDATASOURCE, 1257 STATE_CLEANUPANDCOMPLETE 1258 }; 1259 1260 PVTestState iState; 1261 1262 PVPlayerInterface* iPlayer; 1263 PVPlayerDataSourceURL* iDataSource; 1264 PVPlayerDataSink* iDataSinkVideo; 1265 PVPlayerDataSink* iDataSinkAudio; 1266 PVPlayerDataSink* iDataSinkText; 1267 PVMFNodeInterface* iIONodeVideo; 1268 PVMFNodeInterface* iIONodeAudio; 1269 PVMFNodeInterface* iIONodeText; 1270 PvmiMIOControl* iMIOFileOutVideo; 1271 PvmiMIOControl* iMIOFileOutAudio; 1272 PvmiMIOControl* iMIOFileOutText; 1273 PVCommandId iCurrentCmdId; 1274 1275 OSCL_wHeapString<OsclMemAllocator> iFileNameWStr; 1276 oscl_wchar iTmpWCharBuffer[512]; 1277 }; 1278 1279 1280 /*! 1281 * A test case to test repositioning during Prepared state 1282 * - Data Source: Specified by user of test case 1283 * - Data Sink(s): Video[File Output MediaIO Interface Node-test_player_mionode_preparedrepo_%SOURCEFILENAME%_video.dat]\n 1284 * Audio[File Output MediaIO Interface Node-test_player_mionode_preparedrepo_%SOURCEFILENAME%_audio.dat]\n 1285 * Text[File Output MediaIO Interface Node-test_player_mionode_preparedrepo_%SOURCEFILENAME%_text.dat] 1286 * - Sequence: 1287 * -# CreatePlayer() 1288 * -# AddDataSource() 1289 * -# Init() 1290 * -# AddDataSink() (video) 1291 * -# AddDataSink() (audio) 1292 * -# AddDataSink() (text) 1293 * -# Prepare() 1294 * -# SetPlaybackRange(20 sec, indeterminate) 1295 * -# Start() 1296 * -# WAIT 10 sec. 1297 * -# Stop() 1298 * -# RemoveDataSink() (video) 1299 * -# RemoveDataSink() (audio) 1300 * -# RemoveDataSink() (text) 1301 * -# Reset() 1302 * -# RemoveDataSource() 1303 * -# DeletePlayer() 1304 * 1305 */ 1306 class pvplayer_async_test_mediaionode_repositionduringprepared : public pvplayer_async_test_base 1307 { 1308 public: pvplayer_async_test_mediaionode_repositionduringprepared(PVPlayerAsyncTestParam aTestParam)1309 pvplayer_async_test_mediaionode_repositionduringprepared(PVPlayerAsyncTestParam aTestParam): 1310 pvplayer_async_test_base(aTestParam) 1311 , iPlayer(NULL) 1312 , iDataSource(NULL) 1313 , iDataSinkVideo(NULL) 1314 , iDataSinkAudio(NULL) 1315 , iDataSinkText(NULL) 1316 , iIONodeVideo(NULL) 1317 , iIONodeAudio(NULL) 1318 , iIONodeText(NULL) 1319 , iMIOFileOutVideo(NULL) 1320 , iMIOFileOutAudio(NULL) 1321 , iMIOFileOutText(NULL) 1322 , iCurrentCmdId(0) 1323 { 1324 iTestCaseName = _STRLIT_CHAR("MIONode Reposition During Prepared"); 1325 } 1326 ~pvplayer_async_test_mediaionode_repositionduringprepared()1327 ~pvplayer_async_test_mediaionode_repositionduringprepared() {} 1328 1329 void StartTest(); 1330 void Run(); 1331 1332 void CommandCompleted(const PVCmdResponse& aResponse); 1333 void HandleErrorEvent(const PVAsyncErrorEvent& aEvent); 1334 void HandleInformationalEvent(const PVAsyncInformationalEvent& aEvent); 1335 1336 enum PVTestState 1337 { 1338 STATE_CREATE, 1339 STATE_ADDDATASOURCE, 1340 STATE_INIT, 1341 STATE_ADDDATASINK_VIDEO, 1342 STATE_ADDDATASINK_AUDIO, 1343 STATE_ADDDATASINK_TEXT, 1344 STATE_PREPARE, 1345 STATE_SETPLAYBACKRANGE, 1346 STATE_START, 1347 STATE_STOP, 1348 STATE_REMOVEDATASINK_VIDEO, 1349 STATE_REMOVEDATASINK_AUDIO, 1350 STATE_REMOVEDATASINK_TEXT, 1351 STATE_RESET, 1352 STATE_REMOVEDATASOURCE, 1353 STATE_CLEANUPANDCOMPLETE 1354 }; 1355 1356 PVTestState iState; 1357 1358 PVPlayerInterface* iPlayer; 1359 PVPlayerDataSourceURL* iDataSource; 1360 PVPlayerDataSink* iDataSinkVideo; 1361 PVPlayerDataSink* iDataSinkAudio; 1362 PVPlayerDataSink* iDataSinkText; 1363 PVMFNodeInterface* iIONodeVideo; 1364 PVMFNodeInterface* iIONodeAudio; 1365 PVMFNodeInterface* iIONodeText; 1366 PvmiMIOControl* iMIOFileOutVideo; 1367 PvmiMIOControl* iMIOFileOutAudio; 1368 PvmiMIOControl* iMIOFileOutText; 1369 PVCommandId iCurrentCmdId; 1370 1371 OSCL_wHeapString<OsclMemAllocator> iFileNameWStr; 1372 oscl_wchar iTmpWCharBuffer[512]; 1373 }; 1374 1375 1376 /*! 1377 * A test case to test that second time playback starts from the beginning 1378 * - Data Source: Specified by user of test case 1379 * - Data Sink(s): Video[File Output MediaIO Interface Node-test_player_mionode_playrepostopplay_%SOURCEFILENAME%_video.dat]\n 1380 * Audio[File Output MediaIO Interface Node-test_player_mionode_playrepostopplay_%SOURCEFILENAME%_audio.dat]\n 1381 * Text[File Output MediaIO Interface Node-test_player_mionode_playrepostopplay_%SOURCEFILENAME%_text.dat] 1382 * - Sequence: 1383 * -# CreatePlayer() 1384 * -# AddDataSource() 1385 * -# Init() 1386 * -# AddDataSink() (video) 1387 * -# AddDataSink() (audio) 1388 * -# AddDataSink() (text) 1389 * -# Prepare() 1390 * -# Start() 1391 * -# WAIT 5 sec. 1392 * -# SetPlaybackRange(20 sec, indeterminate) 1393 * -# WAIT 5 sec. 1394 * -# Stop() 1395 * -# Prepare() 1396 * -# Start() 1397 * -# WAIT 10 sec. 1398 * -# Stop() 1399 * -# RemoveDataSink() (video) 1400 * -# RemoveDataSink() (audio) 1401 * -# RemoveDataSink() (text) 1402 * -# Reset() 1403 * -# RemoveDataSource() 1404 * -# DeletePlayer() 1405 * 1406 */ 1407 class pvplayer_async_test_mediaionode_playsetplaybackrangestopplay : public pvplayer_async_test_base 1408 { 1409 public: pvplayer_async_test_mediaionode_playsetplaybackrangestopplay(PVPlayerAsyncTestParam aTestParam)1410 pvplayer_async_test_mediaionode_playsetplaybackrangestopplay(PVPlayerAsyncTestParam aTestParam): 1411 pvplayer_async_test_base(aTestParam) 1412 , iPlayer(NULL) 1413 , iDataSource(NULL) 1414 , iDataSinkVideo(NULL) 1415 , iDataSinkAudio(NULL) 1416 , iDataSinkText(NULL) 1417 , iIONodeVideo(NULL) 1418 , iIONodeAudio(NULL) 1419 , iIONodeText(NULL) 1420 , iMIOFileOutVideo(NULL) 1421 , iMIOFileOutAudio(NULL) 1422 , iMIOFileOutText(NULL) 1423 , iCurrentCmdId(0) 1424 { 1425 iTestCaseName = _STRLIT_CHAR("MIONode Play-Reposition-Stop-Play"); 1426 } 1427 ~pvplayer_async_test_mediaionode_playsetplaybackrangestopplay()1428 ~pvplayer_async_test_mediaionode_playsetplaybackrangestopplay() {} 1429 1430 void StartTest(); 1431 void Run(); 1432 1433 void CommandCompleted(const PVCmdResponse& aResponse); 1434 void HandleErrorEvent(const PVAsyncErrorEvent& aEvent); 1435 void HandleInformationalEvent(const PVAsyncInformationalEvent& aEvent); 1436 1437 enum PVTestState 1438 { 1439 STATE_CREATE, 1440 STATE_ADDDATASOURCE, 1441 STATE_INIT, 1442 STATE_ADDDATASINK_VIDEO, 1443 STATE_ADDDATASINK_AUDIO, 1444 STATE_ADDDATASINK_TEXT, 1445 STATE_PREPARE1, 1446 STATE_START1, 1447 STATE_SETPLAYBACKRANGE, 1448 STATE_STOP1, 1449 STATE_PREPARE2, 1450 STATE_START2, 1451 STATE_STOP2, 1452 STATE_REMOVEDATASINK_VIDEO, 1453 STATE_REMOVEDATASINK_AUDIO, 1454 STATE_REMOVEDATASINK_TEXT, 1455 STATE_RESET, 1456 STATE_REMOVEDATASOURCE, 1457 STATE_CLEANUPANDCOMPLETE 1458 }; 1459 1460 PVTestState iState; 1461 1462 PVPlayerInterface* iPlayer; 1463 PVPlayerDataSourceURL* iDataSource; 1464 PVPlayerDataSink* iDataSinkVideo; 1465 PVPlayerDataSink* iDataSinkAudio; 1466 PVPlayerDataSink* iDataSinkText; 1467 PVMFNodeInterface* iIONodeVideo; 1468 PVMFNodeInterface* iIONodeAudio; 1469 PVMFNodeInterface* iIONodeText; 1470 PvmiMIOControl* iMIOFileOutVideo; 1471 PvmiMIOControl* iMIOFileOutAudio; 1472 PvmiMIOControl* iMIOFileOutText; 1473 PVCommandId iCurrentCmdId; 1474 1475 OSCL_wHeapString<OsclMemAllocator> iFileNameWStr; 1476 oscl_wchar iTmpWCharBuffer[512]; 1477 }; 1478 1479 1480 /*! 1481 * A test case to test SetPlaybackRange() before Prepare() for second time playback 1482 * - Data Source: Specified by user of test case 1483 * - Data Sink(s): Video[File Output MediaIO Interface Node-test_player_mionode_playstopsetplaybackrangeplaystop_%SOURCEFILENAME%_video.dat]\n 1484 * Audio[File Output MediaIO Interface Node-test_player_mionode_playstopsetplaybackrangeplaystop_%SOURCEFILENAME%_audio.dat]\n 1485 * Text[File Output MediaIO Interface Node-test_player_mionode_playstopsetplaybackrangeplaystop_%SOURCEFILENAME%_text.dat] 1486 * - Sequence: 1487 * -# CreatePlayer() 1488 * -# AddDataSource() 1489 * -# Init() 1490 * -# AddDataSink() (video) 1491 * -# AddDataSink() (audio) 1492 * -# AddDataSink() (text) 1493 * -# Prepare() 1494 * -# Start() 1495 * -# WAIT 10 sec. 1496 * -# Stop() 1497 * -# SetPlaybackRange(30 sec, X) 1498 * -# Prepare() 1499 * -# Start() 1500 * -# WAIT 10 sec. and check playback position 1501 * -# Stop() 1502 * -# RemoveDataSink() (video) 1503 * -# RemoveDataSink() (audio) 1504 * -# RemoveDataSink() (text) 1505 * -# Reset() 1506 * -# RemoveDataSource() 1507 * -# DeletePlayer() 1508 * 1509 */ 1510 class pvplayer_async_test_mediaionode_playstopsetplaybackrangeplaystop : public pvplayer_async_test_base 1511 { 1512 public: pvplayer_async_test_mediaionode_playstopsetplaybackrangeplaystop(PVPlayerAsyncTestParam aTestParam)1513 pvplayer_async_test_mediaionode_playstopsetplaybackrangeplaystop(PVPlayerAsyncTestParam aTestParam): 1514 pvplayer_async_test_base(aTestParam) 1515 , iPlayer(NULL) 1516 , iDataSource(NULL) 1517 , iDataSinkVideo(NULL) 1518 , iDataSinkAudio(NULL) 1519 , iDataSinkText(NULL) 1520 , iIONodeVideo(NULL) 1521 , iIONodeAudio(NULL) 1522 , iIONodeText(NULL) 1523 , iMIOFileOutVideo(NULL) 1524 , iMIOFileOutAudio(NULL) 1525 , iMIOFileOutText(NULL) 1526 , iCurrentCmdId(0) 1527 { 1528 iTestCaseName = _STRLIT_CHAR("MIONode Play-Stop-SetPlaybackRange-Play-Stop"); 1529 } 1530 ~pvplayer_async_test_mediaionode_playstopsetplaybackrangeplaystop()1531 ~pvplayer_async_test_mediaionode_playstopsetplaybackrangeplaystop() {} 1532 1533 void StartTest(); 1534 void Run(); 1535 1536 void CommandCompleted(const PVCmdResponse& aResponse); 1537 void HandleErrorEvent(const PVAsyncErrorEvent& aEvent); 1538 void HandleInformationalEvent(const PVAsyncInformationalEvent& aEvent); 1539 1540 enum PVTestState 1541 { 1542 STATE_CREATE, 1543 STATE_ADDDATASOURCE, 1544 STATE_INIT, 1545 STATE_ADDDATASINK_VIDEO, 1546 STATE_ADDDATASINK_AUDIO, 1547 STATE_ADDDATASINK_TEXT, 1548 STATE_PREPARE1, 1549 STATE_START1, 1550 STATE_STOP1, 1551 STATE_SETPLAYBACKRANGE, 1552 STATE_PREPARE2, 1553 STATE_START2, 1554 STATE_STOP2, 1555 STATE_REMOVEDATASINK_VIDEO, 1556 STATE_REMOVEDATASINK_AUDIO, 1557 STATE_REMOVEDATASINK_TEXT, 1558 STATE_RESET, 1559 STATE_REMOVEDATASOURCE, 1560 STATE_CLEANUPANDCOMPLETE 1561 }; 1562 1563 PVTestState iState; 1564 1565 PVPlayerInterface* iPlayer; 1566 PVPlayerDataSourceURL* iDataSource; 1567 PVPlayerDataSink* iDataSinkVideo; 1568 PVPlayerDataSink* iDataSinkAudio; 1569 PVPlayerDataSink* iDataSinkText; 1570 PVMFNodeInterface* iIONodeVideo; 1571 PVMFNodeInterface* iIONodeAudio; 1572 PVMFNodeInterface* iIONodeText; 1573 PvmiMIOControl* iMIOFileOutVideo; 1574 PvmiMIOControl* iMIOFileOutAudio; 1575 PvmiMIOControl* iMIOFileOutText; 1576 PVCommandId iCurrentCmdId; 1577 1578 OSCL_wHeapString<OsclMemAllocator> iFileNameWStr; 1579 oscl_wchar iTmpWCharBuffer[512]; 1580 }; 1581 1582 1583 /*! 1584 * A test case to test SetPlaybackRange() to near end of clip and then start 1585 * - Data Source: Specified by user of test case 1586 * - Data Sink(s): Video[File Output MediaIO Interface Node-test_player_mionode_setplaybackrangenearendplay_%SOURCEFILENAME%_video.dat]\n 1587 * Audio[File Output MediaIO Interface Node-test_player_mionode_setplaybackrangenearendplay_%SOURCEFILENAME%_audio.dat]\n 1588 * Text[File Output MediaIO Interface Node-test_player_mionode_setplaybackrangenearendplay_%SOURCEFILENAME%_text.dat] 1589 * - Sequence: 1590 * -# CreatePlayer() 1591 * -# AddDataSource() 1592 * -# Init() 1593 * -# AddDataSink() (video) 1594 * -# AddDataSink() (audio) 1595 * -# AddDataSink() (text) 1596 * -# GetMetadataValues() (retrieve clip duration) 1597 * -# Prepare() 1598 * -# SetPlaybackRange(1 sec before end of clip, X) 1599 * -# Start() 1600 * -# WAIT FOR EOS 1601 * -# RemoveDataSink() (video) 1602 * -# RemoveDataSink() (audio) 1603 * -# RemoveDataSink() (text) 1604 * -# Reset() 1605 * -# RemoveDataSource() 1606 * -# DeletePlayer() 1607 * 1608 */ 1609 class pvplayer_async_test_mediaionode_setplaybackrangenearendplay : public pvplayer_async_test_base 1610 { 1611 public: pvplayer_async_test_mediaionode_setplaybackrangenearendplay(PVPlayerAsyncTestParam aTestParam)1612 pvplayer_async_test_mediaionode_setplaybackrangenearendplay(PVPlayerAsyncTestParam aTestParam): 1613 pvplayer_async_test_base(aTestParam) 1614 , iPlayer(NULL) 1615 , iDataSource(NULL) 1616 , iDataSinkVideo(NULL) 1617 , iDataSinkAudio(NULL) 1618 , iDataSinkText(NULL) 1619 , iIONodeVideo(NULL) 1620 , iIONodeAudio(NULL) 1621 , iIONodeText(NULL) 1622 , iMIOFileOutVideo(NULL) 1623 , iMIOFileOutAudio(NULL) 1624 , iMIOFileOutText(NULL) 1625 , iCurrentCmdId(0) 1626 , iSourceContextData(NULL) 1627 { 1628 iTestCaseName = _STRLIT_CHAR("MIONode SetPlaybackRange Near End-Play"); 1629 } 1630 ~pvplayer_async_test_mediaionode_setplaybackrangenearendplay()1631 ~pvplayer_async_test_mediaionode_setplaybackrangenearendplay() {} 1632 1633 void StartTest(); 1634 void Run(); 1635 1636 void CommandCompleted(const PVCmdResponse& aResponse); 1637 void HandleErrorEvent(const PVAsyncErrorEvent& aEvent); 1638 void HandleInformationalEvent(const PVAsyncInformationalEvent& aEvent); 1639 1640 enum PVTestState 1641 { 1642 STATE_CREATE, 1643 STATE_ADDDATASOURCE, 1644 STATE_INIT, 1645 STATE_ADDDATASINK_VIDEO, 1646 STATE_ADDDATASINK_AUDIO, 1647 STATE_ADDDATASINK_TEXT, 1648 STATE_GETMETADATAVALUES, 1649 STATE_PREPARE, 1650 STATE_SETPLAYBACKRANGE, 1651 STATE_START, 1652 STATE_ENDTIMENOTREACHED, 1653 STATE_STOP, 1654 STATE_REMOVEDATASINK_VIDEO, 1655 STATE_REMOVEDATASINK_AUDIO, 1656 STATE_REMOVEDATASINK_TEXT, 1657 STATE_RESET, 1658 STATE_REMOVEDATASOURCE, 1659 STATE_CLEANUPANDCOMPLETE 1660 }; 1661 1662 PVTestState iState; 1663 1664 PVPlayerInterface* iPlayer; 1665 PVPlayerDataSourceURL* iDataSource; 1666 PVPlayerDataSink* iDataSinkVideo; 1667 PVPlayerDataSink* iDataSinkAudio; 1668 PVPlayerDataSink* iDataSinkText; 1669 PVMFNodeInterface* iIONodeVideo; 1670 PVMFNodeInterface* iIONodeAudio; 1671 PVMFNodeInterface* iIONodeText; 1672 PvmiMIOControl* iMIOFileOutVideo; 1673 PvmiMIOControl* iMIOFileOutAudio; 1674 PvmiMIOControl* iMIOFileOutText; 1675 PVCommandId iCurrentCmdId; 1676 1677 OSCL_wHeapString<OsclMemAllocator> iFileNameWStr; 1678 oscl_wchar iTmpWCharBuffer[512]; 1679 1680 PVPMetadataList iMetadataKeyList; 1681 Oscl_Vector<PvmiKvp, OsclMemAllocator> iMetadataValueList; 1682 int32 iNumValues; 1683 uint32 iStartPosition; 1684 1685 private: 1686 OSCL_wHeapString<OsclMemAllocator> wFileName; 1687 oscl_wchar output[512]; 1688 1689 PVMFSourceContextData* iSourceContextData; 1690 }; 1691 1692 1693 /*! 1694 * A test case to test SetPlaybackRange() during playback near the end of the clip. Tests how EOS media command is handled when repositioning. 1695 * - Data Source: Specified by user of test case 1696 * - Data Sink(s): Video[File Output MediaIO Interface Node-test_player_mionode_playrepositionnearendofclip_%SOURCEFILENAME%_video.dat]\n 1697 * Audio[File Output MediaIO Interface Node-test_player_mionode_playrepositionnearendofclip_%SOURCEFILENAME%_audio.dat]\n 1698 * Text[File Output MediaIO Interface Node-test_player_mionode_playrepositionnearendofclip_%SOURCEFILENAME%_text.dat] 1699 * - Sequence: 1700 * -# CreatePlayer() 1701 * -# AddDataSource() 1702 * -# Init() 1703 * -# AddDataSink() (video) 1704 * -# AddDataSink() (audio) 1705 * -# AddDataSink() (text) 1706 * -# GetMetadataValues() (retrieve clip duration) 1707 * -# Prepare() 1708 * -# Start() 1709 * -# WAIT UNTIL 2 SECONDS BEFORE CLIP DURATION 1710 * -# SetPlaybackRange(0,X) 1711 * -# WAIT FOR 5 SEC 1712 * -# Stop() 1713 * -# RemoveDataSink() (video) 1714 * -# RemoveDataSink() (audio) 1715 * -# RemoveDataSink() (text) 1716 * -# Reset() 1717 * -# RemoveDataSource() 1718 * -# DeletePlayer() 1719 * 1720 */ 1721 class pvplayer_async_test_mediaionode_playrepositionnearendofclip : public pvplayer_async_test_base 1722 { 1723 public: pvplayer_async_test_mediaionode_playrepositionnearendofclip(PVPlayerAsyncTestParam aTestParam)1724 pvplayer_async_test_mediaionode_playrepositionnearendofclip(PVPlayerAsyncTestParam aTestParam): 1725 pvplayer_async_test_base(aTestParam) 1726 , iPlayer(NULL) 1727 , iDataSource(NULL) 1728 , iDataSinkVideo(NULL) 1729 , iDataSinkAudio(NULL) 1730 , iDataSinkText(NULL) 1731 , iIONodeVideo(NULL) 1732 , iIONodeAudio(NULL) 1733 , iIONodeText(NULL) 1734 , iMIOFileOutVideo(NULL) 1735 , iMIOFileOutAudio(NULL) 1736 , iMIOFileOutText(NULL) 1737 , iCurrentCmdId(0) 1738 , iSetPlayBackRangeIssued(false) 1739 { 1740 iTestCaseName = _STRLIT_CHAR("MIONode Play-Reposition Near End Of Clip"); 1741 } 1742 ~pvplayer_async_test_mediaionode_playrepositionnearendofclip()1743 ~pvplayer_async_test_mediaionode_playrepositionnearendofclip() {} 1744 1745 void StartTest(); 1746 void Run(); 1747 1748 void CommandCompleted(const PVCmdResponse& aResponse); 1749 void HandleErrorEvent(const PVAsyncErrorEvent& aEvent); 1750 void HandleInformationalEvent(const PVAsyncInformationalEvent& aEvent); 1751 1752 enum PVTestState 1753 { 1754 STATE_CREATE, 1755 STATE_ADDDATASOURCE, 1756 STATE_INIT, 1757 STATE_ADDDATASINK_VIDEO, 1758 STATE_ADDDATASINK_AUDIO, 1759 STATE_ADDDATASINK_TEXT, 1760 STATE_GETMETADATAVALUES, 1761 STATE_PREPARE, 1762 STATE_START, 1763 STATE_SETPLAYBACKRANGE, 1764 STATE_STOP, 1765 STATE_REMOVEDATASINK_VIDEO, 1766 STATE_REMOVEDATASINK_AUDIO, 1767 STATE_REMOVEDATASINK_TEXT, 1768 STATE_RESET, 1769 STATE_REMOVEDATASOURCE, 1770 STATE_CLEANUPANDCOMPLETE 1771 }; 1772 1773 PVTestState iState; 1774 1775 PVPlayerInterface* iPlayer; 1776 PVPlayerDataSourceURL* iDataSource; 1777 PVPlayerDataSink* iDataSinkVideo; 1778 PVPlayerDataSink* iDataSinkAudio; 1779 PVPlayerDataSink* iDataSinkText; 1780 PVMFNodeInterface* iIONodeVideo; 1781 PVMFNodeInterface* iIONodeAudio; 1782 PVMFNodeInterface* iIONodeText; 1783 PvmiMIOControl* iMIOFileOutVideo; 1784 PvmiMIOControl* iMIOFileOutAudio; 1785 PvmiMIOControl* iMIOFileOutText; 1786 PVCommandId iCurrentCmdId; 1787 1788 OSCL_wHeapString<OsclMemAllocator> iFileNameWStr; 1789 oscl_wchar iTmpWCharBuffer[512]; 1790 1791 PVPMetadataList iMetadataKeyList; 1792 Oscl_Vector<PvmiKvp, OsclMemAllocator> iMetadataValueList; 1793 int32 iNumValues; 1794 uint32 iClipDuration; 1795 bool iSetPlayBackRangeIssued; 1796 }; 1797 1798 /*! 1799 * A test case to test forward step specified source with file output media IO node 1800 * - Data Source: Specified by user of test case 1801 * - Data Sink(s): Video[File Output MediaIO Interface Node-test_player_mionode_3Xplayrate_%SOURCEFILENAME%_video.dat]\n 1802 * Audio[File Output MediaIO Interface Node-test_player_mionode_3Xplayrate_%SOURCEFILENAME%_audio.dat]\n 1803 * Text[File Output MediaIO Interface Node-test_player_mionode_3Xplayrate_%SOURCEFILENAME%_text.dat] 1804 * - Sequence: 1805 * -# CreatePlayer() 1806 * -# AddDataSource() 1807 * -# Init() 1808 * -# AddDataSink() (video) 1809 * -# AddDataSink() (audio) 1810 * -# AddDataSink() (text) 1811 * -# Prepare() 1812 * -# Start() 1813 * (play for 2 seconds) 1814 * -# Pause 1815 * -# SetPlaybackRate (1x, step mode) 1816 * -# Resume 1817 * -# Step 1 frame, wait 1/2 sec, until 10 steps total 1818 * -# Reposition to 20 second. 1819 * -# Step 1 frame, wait 1/2 sec, until 25 steps total (incl the 10 prior) 1820 * -# Pause 1821 * -# SetPlaybackRate for normal 1x playback. 1822 * -# Resume 1823 * (play for 2 seconds) 1824 * -# Stop() 1825 * -# RemoveDataSink() (video) 1826 * -# RemoveDataSink() (audio) 1827 * -# RemoveDataSink() (text) 1828 * -# Reset() 1829 * -# RemoveDataSource() 1830 * -# DeletePlayer() 1831 * 1832 */ 1833 class pvplayer_async_test_mediaionode_forwardstep : public pvplayer_async_test_base 1834 { 1835 public: 1836 pvplayer_async_test_mediaionode_forwardstep(PVPlayerAsyncTestParam aTestParam, bool aActiveAudio = false): pvplayer_async_test_base(aTestParam)1837 pvplayer_async_test_base(aTestParam) 1838 , iPlayer(NULL) 1839 , iDataSource(NULL) 1840 , iDataSinkVideo(NULL) 1841 , iDataSinkAudio(NULL) 1842 , iDataSinkText(NULL) 1843 , iIONodeVideo(NULL) 1844 , iIONodeAudio(NULL) 1845 , iIONodeText(NULL) 1846 , iMIOFileOutVideo(NULL) 1847 , iMIOFileOutAudio(NULL) 1848 , iMIOFileOutText(NULL) 1849 , iCurrentCmdId(0) 1850 , iActiveAudio(aActiveAudio) 1851 , iEOSReached(false) 1852 { 1853 if (iActiveAudio) 1854 iTestCaseName = _STRLIT_CHAR("MIONode Forward Step Active Audio"); 1855 else 1856 iTestCaseName = _STRLIT_CHAR("MIONode Forward Step"); 1857 iReposComplete = false; 1858 } 1859 ~pvplayer_async_test_mediaionode_forwardstep()1860 ~pvplayer_async_test_mediaionode_forwardstep() {} 1861 1862 void StartTest(); 1863 void Run(); 1864 1865 void CommandCompleted(const PVCmdResponse& aResponse); 1866 void HandleErrorEvent(const PVAsyncErrorEvent& aEvent); 1867 void HandleInformationalEvent(const PVAsyncInformationalEvent& aEvent); 1868 1869 enum PVTestState 1870 { 1871 STATE_CREATE, 1872 STATE_ADDDATASOURCE, 1873 STATE_INIT, 1874 STATE_ADDDATASINK_VIDEO, 1875 STATE_ADDDATASINK_AUDIO, 1876 STATE_ADDDATASINK_TEXT, 1877 STATE_PREPARE, 1878 STATE_START, 1879 STATE_PAUSE, 1880 STATE_ENTERSTEPMODE, 1881 STATE_STARTSTEPPING, 1882 STATE_STEP, 1883 STATE_STOPSTEPPING, 1884 STATE_EXITSTEPMODE, 1885 STATE_RESUME, 1886 STATE_STOP, 1887 STATE_REMOVEDATASINK_VIDEO, 1888 STATE_REMOVEDATASINK_AUDIO, 1889 STATE_REMOVEDATASINK_TEXT, 1890 STATE_RESET, 1891 STATE_REMOVEDATASOURCE, 1892 STATE_CLEANUPANDCOMPLETE 1893 }; 1894 1895 PVTestState iState; 1896 1897 PVPlayerInterface* iPlayer; 1898 PVPlayerDataSourceURL* iDataSource; 1899 PVPlayerDataSink* iDataSinkVideo; 1900 PVPlayerDataSink* iDataSinkAudio; 1901 PVPlayerDataSink* iDataSinkText; 1902 PVMFNodeInterface* iIONodeVideo; 1903 PVMFNodeInterface* iIONodeAudio; 1904 PVMFNodeInterface* iIONodeText; 1905 PvmiMIOControl* iMIOFileOutVideo; 1906 PvmiMIOControl* iMIOFileOutAudio; 1907 PvmiMIOControl* iMIOFileOutText; 1908 PVCommandId iCurrentCmdId; 1909 1910 OSCL_wHeapString<OsclMemAllocator> iFileNameWStr; 1911 oscl_wchar iTmpWCharBuffer[512]; 1912 1913 PVMFTimebase_Count iSteppingTimebase; 1914 bool iReposComplete; 1915 bool iActiveAudio; 1916 int32 iCount; 1917 bool iEOSReached; 1918 }; 1919 1920 /*! 1921 * A test case to test forward step playback of specified source with media output media IO node 1922 * - Data Source: Specified by user of test case 1923 * - Data Sink(s): Video[File Output MediaIO Interface Node-test_player_mionode_3Xplayrate_%SOURCEFILENAME%_video.dat]\n 1924 * Audio[File Output MediaIO Interface Node-test_player_mionode_3Xplayrate_%SOURCEFILENAME%_audio.dat]\n 1925 * Text[File Output MediaIO Interface Node-test_player_mionode_3Xplayrate_%SOURCEFILENAME%_text.dat] 1926 * - Sequence: 1927 * -# CreatePlayer() 1928 * -# AddDataSource() 1929 * -# Init() 1930 * -# AddDataSink() (video) 1931 * -# AddDataSink() (audio) 1932 * -# AddDataSink() (text) 1933 * -# Prepare() 1934 * -# SetPlaybackRate(1x, step mode) 1935 * -# Start() 1936 * -# Step, wait 1/5 sec, step , wait, etc. until EOS reached. 1937 * -# Stop() 1938 * -# RemoveDataSink() (video) 1939 * -# RemoveDataSink() (audio) 1940 * -# RemoveDataSink() (text) 1941 * -# Reset() 1942 * -# RemoveDataSource() 1943 * -# DeletePlayer() 1944 * 1945 */ 1946 class pvplayer_async_test_mediaionode_forwardsteptoeos : public pvplayer_async_test_base 1947 { 1948 public: pvplayer_async_test_mediaionode_forwardsteptoeos(PVPlayerAsyncTestParam aTestParam)1949 pvplayer_async_test_mediaionode_forwardsteptoeos(PVPlayerAsyncTestParam aTestParam): 1950 pvplayer_async_test_base(aTestParam) 1951 , iPlayer(NULL) 1952 , iDataSource(NULL) 1953 , iDataSinkVideo(NULL) 1954 , iDataSinkAudio(NULL) 1955 , iDataSinkText(NULL) 1956 , iIONodeVideo(NULL) 1957 , iIONodeAudio(NULL) 1958 , iIONodeText(NULL) 1959 , iMIOFileOutVideo(NULL) 1960 , iMIOFileOutAudio(NULL) 1961 , iMIOFileOutText(NULL) 1962 , iCurrentCmdId(0) 1963 { 1964 iTestCaseName = _STRLIT_CHAR("MIONode Forward Step to EOS"); 1965 } 1966 ~pvplayer_async_test_mediaionode_forwardsteptoeos()1967 ~pvplayer_async_test_mediaionode_forwardsteptoeos() {} 1968 1969 void StartTest(); 1970 void Run(); 1971 1972 void CommandCompleted(const PVCmdResponse& aResponse); 1973 void HandleErrorEvent(const PVAsyncErrorEvent& aEvent); 1974 void HandleInformationalEvent(const PVAsyncInformationalEvent& aEvent); 1975 1976 enum PVTestState 1977 { 1978 STATE_CREATE, 1979 STATE_ADDDATASOURCE, 1980 STATE_INIT, 1981 STATE_ADDDATASINK_VIDEO, 1982 STATE_ADDDATASINK_AUDIO, 1983 STATE_ADDDATASINK_TEXT, 1984 STATE_PREPARE, 1985 STATE_SETPLAYBACKRATE, 1986 STATE_START, 1987 STATE_STEP, 1988 STATE_STOP, 1989 STATE_REMOVEDATASINK_VIDEO, 1990 STATE_REMOVEDATASINK_AUDIO, 1991 STATE_REMOVEDATASINK_TEXT, 1992 STATE_RESET, 1993 STATE_REMOVEDATASOURCE, 1994 STATE_CLEANUPANDCOMPLETE 1995 }; 1996 1997 PVTestState iState; 1998 1999 PVPlayerInterface* iPlayer; 2000 PVPlayerDataSourceURL* iDataSource; 2001 PVPlayerDataSink* iDataSinkVideo; 2002 PVPlayerDataSink* iDataSinkAudio; 2003 PVPlayerDataSink* iDataSinkText; 2004 PVMFNodeInterface* iIONodeVideo; 2005 PVMFNodeInterface* iIONodeAudio; 2006 PVMFNodeInterface* iIONodeText; 2007 PvmiMIOControl* iMIOFileOutVideo; 2008 PvmiMIOControl* iMIOFileOutAudio; 2009 PvmiMIOControl* iMIOFileOutText; 2010 PVCommandId iCurrentCmdId; 2011 2012 OSCL_wHeapString<OsclMemAllocator> iFileNameWStr; 2013 oscl_wchar iTmpWCharBuffer[512]; 2014 2015 PVMFTimebase_Count iSteppingTimebase; 2016 2017 }; 2018 2019 /*! 2020 * A test case to test backward playback and backward stepping. 2021 * - Data Source: Specified by user of test case 2022 * - Data Sink(s): Video[File Output MediaIO Interface Node-test_player_mionode_3Xplayrate_%SOURCEFILENAME%_video.dat]\n 2023 * Audio[File Output MediaIO Interface Node-test_player_mionode_3Xplayrate_%SOURCEFILENAME%_audio.dat]\n 2024 * Text[File Output MediaIO Interface Node-test_player_mionode_3Xplayrate_%SOURCEFILENAME%_text.dat] 2025 * - Sequence: 2026 * -# CreatePlayer() 2027 * -# AddDataSource() 2028 * -# Init() 2029 * -# AddDataSink() (video) 2030 * -# AddDataSink() (audio) 2031 * -# AddDataSink() (text) 2032 * -# Prepare() 2033 * -# Start() 2034 * (play for 40 seconds) 2035 * -# SetPlaybackRate(-1x) 2036 * (play backward for 20 seconds) 2037 * -# SetPlaybackRate(1x) 2038 * (play forward for 10 seconds) 2039 * -# Pause 2040 * -# SetPlaybackRate(-1x, stepping mode) 2041 * -# Resume 2042 * -# Step, wait 1/2 sec, step , wait, etc. until EOS reached. 2043 * -# Stop() 2044 * -# RemoveDataSink() (video) 2045 * -# RemoveDataSink() (audio) 2046 * -# RemoveDataSink() (text) 2047 * -# Reset() 2048 * -# RemoveDataSource() 2049 * -# DeletePlayer() 2050 * 2051 */ 2052 class pvplayer_async_test_mediaionode_backwardplayback : public pvplayer_async_test_base 2053 { 2054 public: pvplayer_async_test_mediaionode_backwardplayback(PVPlayerAsyncTestParam aTestParam)2055 pvplayer_async_test_mediaionode_backwardplayback(PVPlayerAsyncTestParam aTestParam): 2056 pvplayer_async_test_base(aTestParam) 2057 , iPlayer(NULL) 2058 , iDataSource(NULL) 2059 , iDataSinkVideo(NULL) 2060 , iDataSinkAudio(NULL) 2061 , iDataSinkText(NULL) 2062 , iIONodeVideo(NULL) 2063 , iIONodeAudio(NULL) 2064 , iIONodeText(NULL) 2065 , iMIOFileOutVideo(NULL) 2066 , iMIOFileOutAudio(NULL) 2067 , iMIOFileOutText(NULL) 2068 , iCurrentCmdId(0) 2069 { 2070 iTestCaseName = _STRLIT_CHAR("MIONode Backward Playback"); 2071 } 2072 ~pvplayer_async_test_mediaionode_backwardplayback()2073 ~pvplayer_async_test_mediaionode_backwardplayback() {} 2074 2075 void StartTest(); 2076 void Run(); 2077 2078 void CommandCompleted(const PVCmdResponse& aResponse); 2079 void HandleErrorEvent(const PVAsyncErrorEvent& aEvent); 2080 void HandleInformationalEvent(const PVAsyncInformationalEvent& aEvent); 2081 2082 enum PVTestState 2083 { 2084 STATE_CREATE, 2085 STATE_ADDDATASOURCE, 2086 STATE_INIT, 2087 STATE_ADDDATASINK_VIDEO, 2088 STATE_ADDDATASINK_AUDIO, 2089 STATE_ADDDATASINK_TEXT, 2090 STATE_PREPARE, 2091 STATE_START, 2092 STATE_GOBACKWARD, 2093 STATE_GOFORWARD, 2094 STATE_PAUSE, 2095 STATE_GOBACKWARDSTEP, 2096 STATE_RESUME, 2097 STATE_STEP, 2098 STATE_STOP, 2099 STATE_REMOVEDATASINK_VIDEO, 2100 STATE_REMOVEDATASINK_AUDIO, 2101 STATE_REMOVEDATASINK_TEXT, 2102 STATE_RESET, 2103 STATE_REMOVEDATASOURCE, 2104 STATE_CLEANUPANDCOMPLETE 2105 }; 2106 2107 PVTestState iState; 2108 2109 PVPlayerInterface* iPlayer; 2110 PVPlayerDataSourceURL* iDataSource; 2111 PVPlayerDataSink* iDataSinkVideo; 2112 PVPlayerDataSink* iDataSinkAudio; 2113 PVPlayerDataSink* iDataSinkText; 2114 PVMFNodeInterface* iIONodeVideo; 2115 PVMFNodeInterface* iIONodeAudio; 2116 PVMFNodeInterface* iIONodeText; 2117 PvmiMIOControl* iMIOFileOutVideo; 2118 PvmiMIOControl* iMIOFileOutAudio; 2119 PvmiMIOControl* iMIOFileOutText; 2120 PVCommandId iCurrentCmdId; 2121 PVMFTimebase_Count iSteppingTimebase; 2122 2123 OSCL_wHeapString<OsclMemAllocator> iFileNameWStr; 2124 oscl_wchar iTmpWCharBuffer[512]; 2125 2126 2127 }; 2128 2129 /*! 2130 * A test case to test Play->2xBackward playback->3x forward playback->normal playback 2131 * - Data Source: Specified by user of test case 2132 * - Data Sink(s): Video[File Output MediaIO Interface Node-test_player_mionode_backwardforwardplayback_%SOURCEFILENAME%_video.dat]\n 2133 * Audio[File Output MediaIO Interface Node-test_player_mionode_backwardforwardplayback_%SOURCEFILENAME%_audio.dat]\n 2134 * Text[File Output MediaIO Interface Node-test_player_mionode_backwardforwardplayback_%SOURCEFILENAME%_text.dat] 2135 * - Sequence: 2136 * -# CreatePlayer() 2137 * -# AddDataSource() 2138 * -# Init() 2139 * -# AddDataSink() (video) 2140 * -# AddDataSink() (audio) 2141 * -# AddDataSink() (text) 2142 * -# Prepare() 2143 * -# Start() 2144 * (play for 40 seconds) 2145 * -# SetPlaybackRate(-2x) 2146 * (play backward for 10 seconds) 2147 * -# SetPlaybackRate(3x) 2148 * (play forward for 10 seconds) 2149 * -# SetPlaybackRate(1x) 2150 * (play until EOS) 2151 * -# Stop() 2152 * -# RemoveDataSink() (video) 2153 * -# RemoveDataSink() (audio) 2154 * -# RemoveDataSink() (text) 2155 * -# Reset() 2156 * -# RemoveDataSource() 2157 * -# DeletePlayer() 2158 * 2159 */ 2160 class pvplayer_async_test_mediaionode_backwardforwardplayback : public pvplayer_async_test_base 2161 { 2162 public: pvplayer_async_test_mediaionode_backwardforwardplayback(PVPlayerAsyncTestParam aTestParam)2163 pvplayer_async_test_mediaionode_backwardforwardplayback(PVPlayerAsyncTestParam aTestParam): 2164 pvplayer_async_test_base(aTestParam) 2165 , iPlayer(NULL) 2166 , iDataSource(NULL) 2167 , iDataSinkVideo(NULL) 2168 , iDataSinkAudio(NULL) 2169 , iDataSinkText(NULL) 2170 , iIONodeVideo(NULL) 2171 , iIONodeAudio(NULL) 2172 , iIONodeText(NULL) 2173 , iMIOFileOutVideo(NULL) 2174 , iMIOFileOutAudio(NULL) 2175 , iMIOFileOutText(NULL) 2176 , iCurrentCmdId(0) 2177 { 2178 iTestCaseName = _STRLIT_CHAR("MIONode Backward Forward Playback"); 2179 } 2180 ~pvplayer_async_test_mediaionode_backwardforwardplayback()2181 ~pvplayer_async_test_mediaionode_backwardforwardplayback() {} 2182 2183 void StartTest(); 2184 void Run(); 2185 2186 void CommandCompleted(const PVCmdResponse& aResponse); 2187 void HandleErrorEvent(const PVAsyncErrorEvent& aEvent); 2188 void HandleInformationalEvent(const PVAsyncInformationalEvent& aEvent); 2189 2190 enum PVTestState 2191 { 2192 STATE_CREATE, 2193 STATE_ADDDATASOURCE, 2194 STATE_INIT, 2195 STATE_ADDDATASINK_VIDEO, 2196 STATE_ADDDATASINK_AUDIO, 2197 STATE_ADDDATASINK_TEXT, 2198 STATE_PREPARE, 2199 STATE_START, 2200 STATE_GOBACKWARD, 2201 STATE_GOFORWARD, 2202 STATE_GONORMAL, 2203 STATE_STOP, 2204 STATE_REMOVEDATASINK_VIDEO, 2205 STATE_REMOVEDATASINK_AUDIO, 2206 STATE_REMOVEDATASINK_TEXT, 2207 STATE_RESET, 2208 STATE_REMOVEDATASOURCE, 2209 STATE_CLEANUPANDCOMPLETE 2210 }; 2211 2212 PVTestState iState; 2213 2214 PVPlayerInterface* iPlayer; 2215 PVPlayerDataSourceURL* iDataSource; 2216 PVPlayerDataSink* iDataSinkVideo; 2217 PVPlayerDataSink* iDataSinkAudio; 2218 PVPlayerDataSink* iDataSinkText; 2219 PVMFNodeInterface* iIONodeVideo; 2220 PVMFNodeInterface* iIONodeAudio; 2221 PVMFNodeInterface* iIONodeText; 2222 PvmiMIOControl* iMIOFileOutVideo; 2223 PvmiMIOControl* iMIOFileOutAudio; 2224 PvmiMIOControl* iMIOFileOutText; 2225 PVCommandId iCurrentCmdId; 2226 PVMFTimebase_Count iSteppingTimebase; 2227 2228 OSCL_wHeapString<OsclMemAllocator> iFileNameWStr; 2229 oscl_wchar iTmpWCharBuffer[512]; 2230 2231 2232 }; 2233 2234 /*! 2235 * A test case to test Pause near end of clip then SetPlaybackRate(-4x) and then resume 2236 * - Data Source: Specified by user of test case 2237 * - Data Sink(s): Video[File Output MediaIO Interface Node-test_player_mionode_pauseneareosbackwardresume_%SOURCEFILENAME%_video.dat]\n 2238 * Audio[File Output MediaIO Interface Node-test_player_mionode_pauseneareosbackwardresume_%SOURCEFILENAME%_audio.dat]\n 2239 * Text[File Output MediaIO Interface Node-test_player_mionode_pauseneareosbackwardresume_%SOURCEFILENAME%_text.dat] 2240 * - Sequence: 2241 * -# CreatePlayer() 2242 * -# AddDataSource() 2243 * -# Init() 2244 * -# AddDataSink() (video) 2245 * -# AddDataSink() (audio) 2246 * -# AddDataSink() (text) 2247 * -# GetMetadataValues() (retrieve clip duration) 2248 * -# Prepare() 2249 * -# Start() 2250 * -# Pause() (just 1 sec before EOS) 2251 * -# SetPlaybackRate(-4x) 2252 * -# Resume() 2253 * -# SetPlaybackRate(1x) (After 20 secs of resume) 2254 (normal play until EOS) 2255 * -# Stop() 2256 * -# RemoveDataSink() (video) 2257 * -# RemoveDataSink() (audio) 2258 * -# RemoveDataSink() (text) 2259 * -# Reset() 2260 * -# RemoveDataSource() 2261 * -# DeletePlayer() 2262 * 2263 */ 2264 class pvplayer_async_test_mediaionode_pauseneareosbackwardresume : public pvplayer_async_test_base 2265 { 2266 public: pvplayer_async_test_mediaionode_pauseneareosbackwardresume(PVPlayerAsyncTestParam aTestParam)2267 pvplayer_async_test_mediaionode_pauseneareosbackwardresume(PVPlayerAsyncTestParam aTestParam): 2268 pvplayer_async_test_base(aTestParam) 2269 , iPlayer(NULL) 2270 , iDataSource(NULL) 2271 , iDataSinkVideo(NULL) 2272 , iDataSinkAudio(NULL) 2273 , iDataSinkText(NULL) 2274 , iIONodeVideo(NULL) 2275 , iIONodeAudio(NULL) 2276 , iIONodeText(NULL) 2277 , iMIOFileOutVideo(NULL) 2278 , iMIOFileOutAudio(NULL) 2279 , iMIOFileOutText(NULL) 2280 , iCurrentCmdId(0) 2281 { 2282 iTestCaseName = _STRLIT_CHAR("MIONode Pause Near End-Play, SetPlaybackRate -4x, resume"); 2283 } 2284 ~pvplayer_async_test_mediaionode_pauseneareosbackwardresume()2285 ~pvplayer_async_test_mediaionode_pauseneareosbackwardresume() {} 2286 2287 void StartTest(); 2288 void Run(); 2289 2290 void CommandCompleted(const PVCmdResponse& aResponse); 2291 void HandleErrorEvent(const PVAsyncErrorEvent& aEvent); 2292 void HandleInformationalEvent(const PVAsyncInformationalEvent& aEvent); 2293 2294 enum PVTestState 2295 { 2296 STATE_CREATE, 2297 STATE_ADDDATASOURCE, 2298 STATE_INIT, 2299 STATE_ADDDATASINK_VIDEO, 2300 STATE_ADDDATASINK_AUDIO, 2301 STATE_ADDDATASINK_TEXT, 2302 STATE_GETMETADATAVALUES, 2303 STATE_PREPARE, 2304 STATE_START, 2305 STATE_PAUSE, 2306 STATE_SETBACKWARD, 2307 STATE_RESUME, 2308 STATE_GONORMAL, 2309 STATE_STOP, 2310 STATE_REMOVEDATASINK_VIDEO, 2311 STATE_REMOVEDATASINK_AUDIO, 2312 STATE_REMOVEDATASINK_TEXT, 2313 STATE_RESET, 2314 STATE_REMOVEDATASOURCE, 2315 STATE_CLEANUPANDCOMPLETE 2316 }; 2317 2318 PVTestState iState; 2319 2320 PVPlayerInterface* iPlayer; 2321 PVPlayerDataSourceURL* iDataSource; 2322 PVPlayerDataSink* iDataSinkVideo; 2323 PVPlayerDataSink* iDataSinkAudio; 2324 PVPlayerDataSink* iDataSinkText; 2325 PVMFNodeInterface* iIONodeVideo; 2326 PVMFNodeInterface* iIONodeAudio; 2327 PVMFNodeInterface* iIONodeText; 2328 PvmiMIOControl* iMIOFileOutVideo; 2329 PvmiMIOControl* iMIOFileOutAudio; 2330 PvmiMIOControl* iMIOFileOutText; 2331 PVCommandId iCurrentCmdId; 2332 2333 OSCL_wHeapString<OsclMemAllocator> iFileNameWStr; 2334 oscl_wchar iTmpWCharBuffer[512]; 2335 2336 PVPMetadataList iMetadataKeyList; 2337 Oscl_Vector<PvmiKvp, OsclMemAllocator> iMetadataValueList; 2338 int32 iNumValues; 2339 uint32 iStartPosition; 2340 }; 2341 2342 /*! 2343 * A test case to test Multiple occurences of Pause then SetPlaybackRate and then resume combination 2344 * - Data Source: Specified by user of test case 2345 * - Data Sink(s): Video[File Output MediaIO Interface Node-test_player_mionode_multiplepausesetplaybackrateresume_%SOURCEFILENAME%_video.dat]\n 2346 * Audio[File Output MediaIO Interface Node-test_player_mionode_multiplepausesetplaybackrateresume_%SOURCEFILENAME%_audio.dat]\n 2347 * Text[File Output MediaIO Interface Node-test_player_mionode_multiplepausesetplaybackrateresume_%SOURCEFILENAME%_text.dat] 2348 * - Sequence: 2349 * -# CreatePlayer() 2350 * -# AddDataSource() 2351 * -# Init() 2352 * -# AddDataSink() (video) 2353 * -# AddDataSink() (audio) 2354 * -# AddDataSink() (text) 2355 * -# GetMetadataValues() (retrieve clip duration) 2356 * -# Prepare() 2357 * -# Start() 2358 * -# Pause() (Multiple times in loop) 2359 * -# SetPlaybackRate(x) 2360 * -# Resume() 2361 * -# SetPlaybackRate(1x) (After 20 secs of resume) 2362 * -# Stop() 2363 * -# RemoveDataSink() (video) 2364 * -# RemoveDataSink() (audio) 2365 * -# RemoveDataSink() (text) 2366 * -# Reset() 2367 * -# RemoveDataSource() 2368 * -# DeletePlayer() 2369 * 2370 */ 2371 class pvplayer_async_test_mediaionode_multiplepausesetplaybackrateresume : public pvplayer_async_test_base 2372 { 2373 public: pvplayer_async_test_mediaionode_multiplepausesetplaybackrateresume(PVPlayerAsyncTestParam aTestParam)2374 pvplayer_async_test_mediaionode_multiplepausesetplaybackrateresume(PVPlayerAsyncTestParam aTestParam): 2375 pvplayer_async_test_base(aTestParam) 2376 , iPlayer(NULL) 2377 , iDataSource(NULL) 2378 , iDataSinkVideo(NULL) 2379 , iDataSinkAudio(NULL) 2380 , iDataSinkText(NULL) 2381 , iIONodeVideo(NULL) 2382 , iIONodeAudio(NULL) 2383 , iIONodeText(NULL) 2384 , iMIOFileOutVideo(NULL) 2385 , iMIOFileOutAudio(NULL) 2386 , iMIOFileOutText(NULL) 2387 , iCurrentCmdId(0) 2388 { 2389 iTestCaseName = _STRLIT_CHAR("MIONode Multiple Pause-SetPlaybackRate-Resume"); 2390 iNumSetRate = 0; 2391 iPlaybackRate = 0; 2392 } 2393 ~pvplayer_async_test_mediaionode_multiplepausesetplaybackrateresume()2394 ~pvplayer_async_test_mediaionode_multiplepausesetplaybackrateresume() {} 2395 2396 void StartTest(); 2397 void Run(); 2398 2399 void CommandCompleted(const PVCmdResponse& aResponse); 2400 void HandleErrorEvent(const PVAsyncErrorEvent& aEvent); 2401 void HandleInformationalEvent(const PVAsyncInformationalEvent& aEvent); 2402 2403 enum PVTestState 2404 { 2405 STATE_CREATE, 2406 STATE_ADDDATASOURCE, 2407 STATE_INIT, 2408 STATE_ADDDATASINK_VIDEO, 2409 STATE_ADDDATASINK_AUDIO, 2410 STATE_ADDDATASINK_TEXT, 2411 STATE_GETMETADATAVALUES, 2412 STATE_PREPARE, 2413 STATE_START, 2414 STATE_PAUSE, 2415 STATE_SETPLAYBACKRATE, 2416 STATE_RESUME, 2417 STATE_GONORMAL, 2418 STATE_STOP, 2419 STATE_REMOVEDATASINK_VIDEO, 2420 STATE_REMOVEDATASINK_AUDIO, 2421 STATE_REMOVEDATASINK_TEXT, 2422 STATE_RESET, 2423 STATE_REMOVEDATASOURCE, 2424 STATE_CLEANUPANDCOMPLETE 2425 }; 2426 2427 PVTestState iState; 2428 2429 PVPlayerInterface* iPlayer; 2430 PVPlayerDataSourceURL* iDataSource; 2431 PVPlayerDataSink* iDataSinkVideo; 2432 PVPlayerDataSink* iDataSinkAudio; 2433 PVPlayerDataSink* iDataSinkText; 2434 PVMFNodeInterface* iIONodeVideo; 2435 PVMFNodeInterface* iIONodeAudio; 2436 PVMFNodeInterface* iIONodeText; 2437 PvmiMIOControl* iMIOFileOutVideo; 2438 PvmiMIOControl* iMIOFileOutAudio; 2439 PvmiMIOControl* iMIOFileOutText; 2440 PVCommandId iCurrentCmdId; 2441 2442 OSCL_wHeapString<OsclMemAllocator> iFileNameWStr; 2443 oscl_wchar iTmpWCharBuffer[512]; 2444 2445 PVPMetadataList iMetadataKeyList; 2446 Oscl_Vector<PvmiKvp, OsclMemAllocator> iMetadataValueList; 2447 int32 iNumValues; 2448 uint32 iStartPosition; 2449 2450 int32 iNumSetRate; 2451 int32 iPlaybackRate; 2452 }; 2453 2454 /*! 2455 * A test case to test Pause near end of clip then SetPlaybackRate(-4x) and then resume till Beginning of stream 2456 * then play forward normal 2457 * - Data Source: Specified by user of test case 2458 * - Data Sink(s): Video[File Output MediaIO Interface Node-test_player_mionode_backwardneareosforwardnearbos_%SOURCEFILENAME%_video.dat]\n 2459 * Audio[File Output MediaIO Interface Node-test_player_mionode_backwardneareosforwardnearbos_%SOURCEFILENAME%_audio.dat]\n 2460 * Text[File Output MediaIO Interface Node-test_player_mionode_backwardneareosforwardnearbos_%SOURCEFILENAME%_text.dat] 2461 * - Sequence: 2462 * -# CreatePlayer() 2463 * -# AddDataSource() 2464 * -# Init() 2465 * -# AddDataSink() (video) 2466 * -# AddDataSink() (audio) 2467 * -# AddDataSink() (text) 2468 * -# GetMetadataValues() (retrieve clip duration) 2469 * -# Prepare() 2470 * -# Start() 2471 * -# Pause() (just 1 sec before EOS) 2472 * -# SetPlaybackRate(-4x) 2473 * -# Resume() (Fast backward till BOS) 2474 * -# SetPlaybackRate(1x) 2475 (normal play until EOS) 2476 * -# Stop() 2477 * -# RemoveDataSink() (video) 2478 * -# RemoveDataSink() (audio) 2479 * -# RemoveDataSink() (text) 2480 * -# Reset() 2481 * -# RemoveDataSource() 2482 * -# DeletePlayer() 2483 * 2484 */ 2485 class pvplayer_async_test_mediaionode_backwardneareosforwardnearbos : public pvplayer_async_test_base 2486 { 2487 public: pvplayer_async_test_mediaionode_backwardneareosforwardnearbos(PVPlayerAsyncTestParam aTestParam)2488 pvplayer_async_test_mediaionode_backwardneareosforwardnearbos(PVPlayerAsyncTestParam aTestParam): 2489 pvplayer_async_test_base(aTestParam) 2490 , iPlayer(NULL) 2491 , iDataSource(NULL) 2492 , iDataSinkVideo(NULL) 2493 , iDataSinkAudio(NULL) 2494 , iDataSinkText(NULL) 2495 , iIONodeVideo(NULL) 2496 , iIONodeAudio(NULL) 2497 , iIONodeText(NULL) 2498 , iMIOFileOutVideo(NULL) 2499 , iMIOFileOutAudio(NULL) 2500 , iMIOFileOutText(NULL) 2501 , iCurrentCmdId(0) 2502 , iNumPlay(0) 2503 { 2504 iTestCaseName = _STRLIT_CHAR("MIONode Fast Rewind Near EOS till BOS then Normal Forward"); 2505 } 2506 ~pvplayer_async_test_mediaionode_backwardneareosforwardnearbos()2507 ~pvplayer_async_test_mediaionode_backwardneareosforwardnearbos() {} 2508 2509 void StartTest(); 2510 void Run(); 2511 2512 void CommandCompleted(const PVCmdResponse& aResponse); 2513 void HandleErrorEvent(const PVAsyncErrorEvent& aEvent); 2514 void HandleInformationalEvent(const PVAsyncInformationalEvent& aEvent); 2515 2516 enum PVTestState 2517 { 2518 STATE_CREATE, 2519 STATE_ADDDATASOURCE, 2520 STATE_INIT, 2521 STATE_ADDDATASINK_VIDEO, 2522 STATE_ADDDATASINK_AUDIO, 2523 STATE_ADDDATASINK_TEXT, 2524 STATE_GETMETADATAVALUES, 2525 STATE_PREPARE, 2526 STATE_START, 2527 STATE_PAUSE, 2528 STATE_SETBACKWARD, 2529 STATE_RESUME, 2530 STATE_GONORMAL, 2531 STATE_STOP, 2532 STATE_REMOVEDATASINK_VIDEO, 2533 STATE_REMOVEDATASINK_AUDIO, 2534 STATE_REMOVEDATASINK_TEXT, 2535 STATE_RESET, 2536 STATE_REMOVEDATASOURCE, 2537 STATE_CLEANUPANDCOMPLETE 2538 }; 2539 2540 PVTestState iState; 2541 2542 PVPlayerInterface* iPlayer; 2543 PVPlayerDataSourceURL* iDataSource; 2544 PVPlayerDataSink* iDataSinkVideo; 2545 PVPlayerDataSink* iDataSinkAudio; 2546 PVPlayerDataSink* iDataSinkText; 2547 PVMFNodeInterface* iIONodeVideo; 2548 PVMFNodeInterface* iIONodeAudio; 2549 PVMFNodeInterface* iIONodeText; 2550 PvmiMIOControl* iMIOFileOutVideo; 2551 PvmiMIOControl* iMIOFileOutAudio; 2552 PvmiMIOControl* iMIOFileOutText; 2553 PVCommandId iCurrentCmdId; 2554 2555 OSCL_wHeapString<OsclMemAllocator> iFileNameWStr; 2556 oscl_wchar iTmpWCharBuffer[512]; 2557 2558 PVPMetadataList iMetadataKeyList; 2559 Oscl_Vector<PvmiKvp, OsclMemAllocator> iMetadataValueList; 2560 int32 iNumValues; 2561 uint32 iStartPosition; 2562 uint32 iNumPlay; 2563 }; 2564 #endif // TEST_PV_PLAYER_ENGINE_TESTSET7_H_INCLUDED 2565 2566 2567