• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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_H_INCLUDED
19 #define TEST_PV_PLAYER_ENGINE_H_INCLUDED
20 
21 #ifndef TEST_CASE_H_INCLUDED
22 #include "test_case.h"
23 #endif
24 
25 #ifndef TEXT_TEST_INTERPRETER_H_INCLUDED
26 #include "text_test_interpreter.h"
27 #endif
28 
29 #ifndef OSCL_SCHEDULER_AO_H_INCLUDED
30 #include "oscl_scheduler_ao.h"
31 #endif
32 
33 #ifndef OSCL_EXCEPTION_H_INCLUDE
34 #include "oscl_exception.h"
35 #endif
36 
37 #ifndef PV_PLAYER_FACTORY_H_INCLUDED
38 #include "pv_player_factory.h"
39 #endif
40 
41 #ifndef PV_PLAYER_INTERFACE_H_INCLUDE
42 #include "pv_player_interface.h"
43 #endif
44 
45 #ifndef PV_ENGINE_OBSERVER_H_INCLUDED
46 #include "pv_engine_observer.h"
47 #endif
48 
49 #ifndef PVLOGGER_H_INCLUDED
50 #include "pvlogger.h"
51 #endif
52 
53 #ifndef PVLOGGER_STDERR_APPENDER_H_INCLUDED
54 #include "pvlogger_stderr_appender.h"
55 #endif
56 
57 #ifndef PVLOGGER_TIME_AND_ID_LAYOUT_H_INCLUDED
58 #include "pvlogger_time_and_id_layout.h"
59 #endif
60 
61 #ifndef PVMI_MEDIA_IO_FILEOUTPUT_H_INCLUDED
62 #include "pvmi_media_io_fileoutput.h"
63 #endif
64 
65 #ifndef TEST_PV_PLAYER_ENGINE_CONFIG_H_INCLUDED
66 #include "test_pv_player_engine_config.h"
67 #endif
68 
69 #ifndef MEDIA_CLOCK_CONVERTER
70 #include "media_clock_converter.h"
71 #endif
72 
73 template<class DestructClass>
74 class LogAppenderDestructDealloc : public OsclDestructDealloc
75 {
76     public:
destruct_and_dealloc(OsclAny * ptr)77         virtual void destruct_and_dealloc(OsclAny *ptr)
78         {
79             delete((DestructClass*)ptr);
80         }
81 };
82 
83 class pvplayer_engine_test_suite : public test_case
84 {
85     public:
86         pvplayer_engine_test_suite(char *aFilename, PVMFFormatType aFiletype, int32 aFirstTest, int32 aLastTest, bool aCompV, bool aCompA, bool aFInput, bool aBCS, int32 aLogLevel, int32 aLogNode, int32 aLogText, int32 aLogMem, int32 aFileFormatType, bool  aProxyEnabled);
87 };
88 
89 
90 // Observer class for pvPlayer async test to notify completion of test
91 class pvplayer_async_test_observer
92 {
93     public:
94         // Signals completion of test. Test instance can be deleted after this callback completes.
95         virtual void TestCompleted(test_case &) = 0;
96 };
97 
98 
99 class PVPlayerAsyncTestParam
100 {
101     public:
102         pvplayer_async_test_observer* iObserver;
103         test_case* iTestCase;
104         FILE* iTestMsgOutputFile;
105         const char* iFileName;
106         PVMFFormatType iFileType;
107         bool iCompressedVideo;
108         bool iCompressedAudio;
109         bool iFileInput;
110         bool iBCS;
111         int iCurrentTestNumber;
112         bool iProxyEnabled;
113         //explicit copy constructor
Copy(const PVPlayerAsyncTestParam & aParam)114         void Copy(const PVPlayerAsyncTestParam& aParam)
115         {
116             iObserver = aParam.iObserver;
117             iTestCase = aParam.iTestCase;
118             iTestMsgOutputFile = aParam.iTestMsgOutputFile;
119             iFileName = aParam.iFileName;
120             iFileType = aParam.iFileType;
121             iCompressedVideo = aParam.iCompressedVideo;
122             iCompressedAudio = aParam.iCompressedAudio;
123             iFileInput = aParam.iFileInput;
124             iBCS = aParam.iBCS;
125             iCurrentTestNumber = aParam.iCurrentTestNumber;
126             iProxyEnabled = aParam.iProxyEnabled;
127         }
128 } ;
129 
130 #define PVPATB_TEST_IS_TRUE(condition) (iTestCase->test_is_true_stub( (condition), (#condition), __FILE__, __LINE__ ))
131 
132 typedef enum
133 {
134     STATE_CREATE,
135     STATE_QUERYINTERFACE,
136     STATE_ADDDATASOURCE,
137     STATE_CONFIGPARAMS,
138     STATE_INIT,
139     STATE_QUERYLICENSEACQIF,
140     STATE_ACQUIRELICENSE,
141     STATE_CANCEL_ACQUIRELICENSE,
142     STATE_INIT2,
143     STATE_GETMETADATAKEYLIST,
144     STATE_GETMETADATAVALUELIST,
145     STATE_ADDDATASINK_VIDEO,
146     STATE_ADDDATASINK_AUDIO,
147     STATE_PREPARE,
148     STATE_WAIT_FOR_DATAREADY,
149     STATE_WAIT_FOR_BUFFCOMPLETE,
150     STATE_CANCELALL,
151     STATE_WAIT_FOR_CANCELALL,
152     STATE_START,
153     STATE_SETPLAYBACKRANGE,
154     STATE_PAUSE,
155     STATE_RESUME,
156     STATE_EOSNOTREACHED,
157     STATE_STOP,
158     STATE_REMOVEDATASINK_VIDEO,
159     STATE_REMOVEDATASINK_AUDIO,
160     STATE_RESET,
161     STATE_REMOVEDATASOURCE,
162     STATE_CLEANUPANDCOMPLETE,
163     STATE_PROTOCOLROLLOVER,
164     STATE_RECONNECT
165 } PVTestState;
166 
167 /*!
168 ** PVPlayerTestMioFactory: MIO Factory functions
169 */
170 class PvmiMIOControl;
171 class PVPlayerTestMioFactory
172 {
173     public:
174         static PVPlayerTestMioFactory* Create();
~PVPlayerTestMioFactory()175         virtual ~PVPlayerTestMioFactory() {}
176 
177         virtual PvmiMIOControl* CreateAudioOutput(OsclAny* aParam) = 0;
178         virtual PvmiMIOControl* CreateAudioOutput(OsclAny* aParam, MediaType aMediaType, bool aCompressedAudio = false)
179         {
180             OSCL_UNUSED_ARG(aParam);
181             OSCL_UNUSED_ARG(aMediaType);
182             OSCL_UNUSED_ARG(aCompressedAudio);
183             return 0;
184         };
185         virtual PvmiMIOControl* CreateAudioOutput(OsclAny* aParam, PVRefFileOutputTestObserver* aObserver, bool aActiveTiming, uint32 aQueueLimit, bool aSimFlowControl, bool logStrings = true) = 0;
186         virtual void DestroyAudioOutput(PvmiMIOControl* aMio) = 0;
187         virtual PvmiMIOControl* CreateVideoOutput(OsclAny* aParam) = 0;
188         virtual PvmiMIOControl* CreateVideoOutput(OsclAny* aParam, MediaType aMediaType, bool aCompressedVideo = false)
189         {
190             OSCL_UNUSED_ARG(aParam);
191             OSCL_UNUSED_ARG(aMediaType);
192             OSCL_UNUSED_ARG(aCompressedVideo);
193             return 0;
194         };
195         virtual PvmiMIOControl* CreateVideoOutput(OsclAny* aParam, PVRefFileOutputTestObserver* aObserver, bool aActiveTiming, uint32 aQueueLimit, bool aSimFlowControl, bool logStrings = true) = 0;
196         virtual void DestroyVideoOutput(PvmiMIOControl* aMio) = 0;
197         virtual PvmiMIOControl* CreateTextOutput(OsclAny* aParam) = 0;
CreateTextOutput(OsclAny * aParam,MediaType aMediaType)198         virtual PvmiMIOControl* CreateTextOutput(OsclAny* aParam, MediaType aMediaType)
199         {
200             OSCL_UNUSED_ARG(aParam);
201             OSCL_UNUSED_ARG(aMediaType);
202             return 0;
203         };
204         virtual void DestroyTextOutput(PvmiMIOControl* aMio) = 0;
205 };
206 
207 // The base class for all pvplayer engine asynchronous tests
208 class pvplayer_async_test_base : public OsclTimerObject,
209         public PVCommandStatusObserver,
210         public PVInformationalEventObserver,
211         public PVErrorEventObserver
212 {
213     public:
pvplayer_async_test_base(PVPlayerAsyncTestParam aTestParam)214         pvplayer_async_test_base(PVPlayerAsyncTestParam aTestParam) :
215                 OsclTimerObject(OsclActiveObject::EPriorityNominal, "PVPlayerEngineAsyncTestBase")
216         {
217             OSCL_ASSERT(aTestParam.iObserver != NULL);
218             OSCL_ASSERT(aTestParam.iTestCase != NULL);
219             iObserver = aTestParam.iObserver;
220             iTestCase = aTestParam.iTestCase;
221             iTestMsgOutputFile = aTestParam.iTestMsgOutputFile;
222             iFileName = aTestParam.iFileName;
223             iFileType = aTestParam.iFileType;
224             iCompressedVideo = aTestParam.iCompressedVideo;
225             iCompressedAudio = aTestParam.iCompressedAudio;
226             iFileInput = aTestParam.iFileInput;
227             iBCS = aTestParam.iBCS;
228             iTestCaseName = _STRLIT_CHAR(" ");
229             iTestNumber = aTestParam.iCurrentTestNumber;
230             iProxyEnabled = aTestParam.iProxyEnabled;
231 
232             // Initialize the variables to use for context data testing
233             iContextObjectRefValue = 0x5C7A; // some random number
234             iContextObject = iContextObjectRefValue;
235 
236             iMioFactory = PVPlayerTestMioFactory::Create();
237             OSCL_ASSERT(iMioFactory);
238         }
239 
~pvplayer_async_test_base()240         virtual ~pvplayer_async_test_base()
241         {
242             if (iMioFactory)
243             {
244                 delete iMioFactory;
245                 iMioFactory = NULL;
246             }
247         }
248 
249         virtual void StartTest() = 0;
250 
CommandCompleted(const PVCmdResponse &)251         virtual void CommandCompleted(const PVCmdResponse& /*aResponse*/) {}
HandleErrorEvent(const PVAsyncErrorEvent &)252         virtual void HandleErrorEvent(const PVAsyncErrorEvent& /*aEvent*/) {}
HandleInformationalEvent(const PVAsyncInformationalEvent &)253         virtual void HandleInformationalEvent(const PVAsyncInformationalEvent& /*aEvent*/) {}
254 
255         // Utility function to retrieve the filename from string and replace ',' with '_'
RetrieveFilename(const oscl_wchar * aSource,OSCL_wHeapString<OsclMemAllocator> & aFilename)256         void RetrieveFilename(const oscl_wchar* aSource, OSCL_wHeapString<OsclMemAllocator>& aFilename)
257         {
258             if (aSource == NULL)
259             {
260                 return;
261             }
262 
263             // Find the last '\' or '/' in the string
264             oscl_wchar* lastslash = (oscl_wchar*)aSource;
265             bool foundlastslash = false;
266             while (!foundlastslash)
267             {
268                 const oscl_wchar* tmp1 = oscl_strstr(lastslash, _STRLIT_WCHAR("\\"));
269                 const oscl_wchar* tmp2 = oscl_strstr(lastslash, _STRLIT_WCHAR("/"));
270                 if (tmp1 != NULL)
271                 {
272                     lastslash = (oscl_wchar*)tmp1 + 1;
273                 }
274                 else if (tmp2 != NULL)
275                 {
276                     lastslash = (oscl_wchar*)tmp2 + 1;
277                 }
278                 else
279                 {
280                     foundlastslash = true;
281                 }
282             }
283 
284             // Now copy the filename
285             if (lastslash)
286             {
287                 aFilename = lastslash;
288             }
289 
290             // Replace each '.' in filename with '_'
291             bool finishedreplace = false;
292             while (!finishedreplace)
293             {
294                 oscl_wchar* tmp = OSCL_CONST_CAST(oscl_wchar*, oscl_strstr(aFilename.get_cstr(), _STRLIT_WCHAR(".")));
295                 if (tmp != NULL)
296                 {
297                     oscl_strncpy(tmp, _STRLIT_WCHAR("_"), 1);
298                 }
299                 else
300                 {
301                     finishedreplace = true;
302                 }
303             }
304         }
305 
306         pvplayer_async_test_observer* iObserver;
307         test_case* iTestCase;
308         FILE* iTestMsgOutputFile;
309         const char *iFileName;
310         PVMFFormatType iFileType;
311         bool iCompressedVideo;
312         bool iCompressedAudio;
313         bool iProxyEnabled;
314         bool iFileInput;
315         bool iBCS;
316 
317         OSCL_HeapString<OsclMemAllocator> iTestCaseName;
318 
319         uint32 iContextObject;
320         uint32 iContextObjectRefValue;
321 
322         int32 iTestNumber;
323 
324         // Media IO Factory
325         PVPlayerTestMioFactory* iMioFactory;
326 };
327 
328 
329 // test_base-based class which will run async tests on pvPlayer engine
330 class pvplayer_engine_test : public test_case,
331         public pvplayer_async_test_observer
332 {
333     public:
334         pvplayer_engine_test(char *aFileName, PVMFFormatType aFileType, int32 aFirstTest, int32 aLastTest,
335                              bool aCompV, bool aCompA, bool aFInput, bool aBCS, int32 aLogLevel, int32 aLogNode, int32 aLogText, int32 aLogMem, int32 aFileFormatType, bool aProxyEnabled);
336         ~pvplayer_engine_test();
337 
338         // Note: for command line options to work, the local tests need to be 0-99,
339         // Download tests 100-199,
340         // Streaming tests 200-299.
341         // Interactive test 800-899
342         enum PVPlayerEngineAsyncTests
343         {
344             NewDeleteTest = 0,
345             OpenPlayStopResetTest,
346             OpenPlayStopResetCPMTest,
347             MetaDataTest,
348             TimingTest,
349             InvalidStateTest,
350             PreparedStopTest,
351             VideoOnlyPlay7Seconds,
352             Play5StopPlay10StopReset,
353             PauseResume,
354 
355             PlayPauseStop = 10,
356             OutsideNodeForVideoSink,
357             GetPlayerState,
358             GetCurrentPosition,
359             PlaySetStopPosition,
360             PlaySetStopPositionVidFrameNum,
361             SetStartPositionPlayStop,
362             SetPlayRangePlay,
363             SetPlayRangeVidFrameNumPlay,
364             PlaySetPlayRangeStop,
365 
366             PlaySetPlayRangeVidFrameNumStop = 20,
367             TrackLevelInfoTest,
368             SetPlaybackRate2X,
369             SetPlaybackRateFifth,
370             CapConfigInterfaceTest,
371             QueuedCommandsTest,
372             LoopingTest,
373             WaitForEOSTest,
374             MultiplePauseResumeTest,
375             MultipleRepositionTest, // Start of local tests using media IO node
376 
377             MediaIONodeOpenPlayStopTest = 30,
378             MediaIONodePlayStopPlayTest,
379             MediaIONodePauseResumeTest,
380             MediaIONodePlaySetPlaybackRangeTest,
381             MediaIONodeSetPlaybackRate3XTest,
382             MediaIONodeSetPlaybackRateHalfTest,
383             MediaIONodeLoopingTest,
384             MediaIONodeWaitForEOSTest,
385             MediaIOMultiplePauseResumeTest,
386             MediaIOMultipleRepositionTest,
387 
388             MediaIORepositionConfigTest = 40,
389             MediaIONodeEOSLoopingTest,
390             MediaIONodeRepositionDuringPreparedTest,
391             MediaIONodePlaySetPlaybackRangeStopPlayTest,
392             MediaIONodePlayStopSetPlaybackRangePlayStopTest,
393             MediaIONodeSetPlaybackRangeNearEndStartTest,
394             MediaIONodePlayRepositionNearEndOfClipTest,
395             MediaIONodeForwardStepToEOSTest,
396             MediaIONodeForwardStepTest,
397             MediaIONodeForwardStepActiveAudioTest,
398             MediaIONodeBackwardTest,
399 
400             MP4M4VAMRFileOpenPlayStopTest = 51, // Start of testing various local files
401             MP4M4VAMRFilePlayStopPlayStopTest,
402             MP4H263AMRFileOpenPlayStopTest,
403             MP4H263AMRFilePlayStopPlayStopTest,
404             MP4AVCAMRFileOpenPlayStopTest,
405             MP4AVCAMRFilePlayStopPlayStopTest,
406             MP4AMRFileOpenPlayStopTest,
407             MP4AMRFilePlayStopPlayStopTest,
408             MP4AACFileOpenPlayStopTest,
409 
410             MP4AACFilePlayStopPlayStopTest = 60,
411             MP4M4VAMRTextFileOpenPlayStopTest,
412             MP4M4VAMRTextFilePlayStopPlayStopTest,
413             AMRIETFFileOpenPlayStopTest,
414             AMRIETFFilePlayStopPlayStopTest,
415             AMRIF2FileOpenPlayStopTest,
416             AMRIF2FilePlayStopPlayStopTest,
417             AACADTSFileOpenPlayStopTest,
418             AACADTSFilePlayStopPlayStopTest,
419             AACADIFFileOpenPlayStopTest,
420 
421             AACADIFFilePlayStopPlayStopTest = 70,
422             AACRawFileOpenPlayStopTest,
423             AACRawFilePlayStopPlayStopTest,
424             MP3CBRFileOpenPlayStopTest,
425             MP3CBRFilePlayStopPlayStopTest,
426             MP3VBRFileOpenPlayStopTest,
427             MP3VBRFilePlayStopPlayStopTest,
428             WAVFileOpenPlayStopTest,
429             WAVFilePlayStopPlayStopTest,
430             ASFFileOpenPlayStopTest,
431             ASFFilePlayStopPlayStopTest = 80,
432 
433             //real audio test case
434             RealAudioFileOpenPlayStopTest = 81,
435             SetPlaybackAfterPrepare,
436 
437             MediaIONodeBackwardForwardTest = 83,
438             MediaIONodePauseNearEOSBackwardResumeTest,
439             MediaIONodeMultiplePauseSetPlaybackRateResumeTest,
440             MediaIONodeBackwardNearEOSForwardNearStartTest,
441 
442             MultiplePauseSeekResumeTest = 87,
443             MultipleSetStartPositionPlayStopTest,
444 
445             OpenPlayStopResetCPMRecognizeTest = 89, //Start of testing recognizer using DataStream input
446 
447             LastLocalTest,//placeholder
448 
449             FirstDownloadTest = 100,  //placeholder
450 
451             FTDownloadOpenPlayStopTest = 101,
452 
453             ProgDownloadPlayAsapTest, //102
454             ProgDownloadDownloadThenPlayTest, //103
455             ProgDownloadDownloadOnlyTest, //104
456             ProgDownloadCancelDuringInitTest, //105
457             ProgDownloadContentTooLarge, //106
458             ProgDownloadTruncated, //107
459             ProgDownloadProtocolRolloverTest, //108
460             ProgDownloadSetPlayBackRangeTest, //109
461             ProgDownloadPlayUtilEOSTest, //110
462             FTDownloadOpenPlayUntilEOSTest, //111
463 
464             ProgDownloadDownloadThenPlayPauseTest,//112
465             ProgDownloadDownloadThenPlayRepositionTest,//113
466             ProgDownloadCancelDuringInitDelayTest, //114
467             ProgDownloadPauseResumeAfterUnderflowTest, //115
468 
469             FTDownloadPlayStopPlayTest, //116
470             ProgDownloadPlayStopPlayTest, //117
471 
472             LastDownloadTest, //placeholder
473 
474             ProgPlaybackMP4UntilEOSTest = 150,
475             ProgPlaybackMP4ShortTest, //151
476             ProgPlaybackMP4ShortPauseResumeTest, //152
477             ProgPlaybackMP4LongPauseResumeTest, //153
478             ProgPlaybackMP4StartPauseSeekResumeTwiceTest, //154
479             ProgPlaybackMP4SeekStartTest, //155
480             ProgPlaybackMP4StartPauseSeekResumeLoopTest, //156
481             ProgPlaybackMP4SeekForwardStepLoopTest, //157
482             ProgPlaybackPlayStopPlayTest, //158
483             ProgPlaybackMP4SeekToBOCAfterDownloadCompleteTest, //159
484             ProgPlaybackMP4SeekInCacheAfterDownloadCompleteTest, //160
485             ProgPlaybackMP4EOSStopPlayAgainTest, //161
486 
487             LastProgressivePlaybackTest, //placeholder
488 
489             ShoutcastPlayback5MinuteTest = 180,
490             ShoutcastPlaybackPauseResumeTest = 181,
491             ShoutcastPlaybackPlayStopPlayTest = 182,
492 
493             LastShoutcastPlaybackTest, // placeholder
494 
495             FirstStreamingTest = 200, //placeholder
496 
497             StreamingOpenPlayStopTest, //201
498             StreamingOpenPlayPausePlayStopTest, //202
499             StreamingOpenPlaySeekStopTest, //203
500             StreamingCancelDuringPrepareTest, //204
501 
502             LastStreamingTest, //placeholder
503 
504             //Multiple Instance tests.
505             MultipleInstanceOpenPlayStopTest = 300,
506             MultipleThreadOpenPlayStopTest = 301,
507             //this range reserved for future multiple instance tests.
508             LastMultipleInstanceTest = 325,//placeholder
509 
510             FirstProjTest = 700, // placeholder
511             // Project specific unit tests should have numbers 701 to 799
512             LastProjTest = 799,
513 
514             FirstInteractiveTest = 800, // placeholder
515 
516             PrintMetadataTest = 801,
517             PrintMemStatsTest,
518             PlayUntilEOSTest,
519             ReleaseMetadataTest,
520 
521             StreamingOpenPlayUntilEOSTest = 851,//851
522             StreamingOpenPlayPausePlayUntilEOSTest,//852
523             StreamingOpenPlaySeekPlayUntilEOSTest, //853
524             StreamingJitterBufferAdjustUntilEOSTest, //854
525             StreamingCloakingOpenPlayUntilEOSTest, //855
526             StreamingPlayBitStreamSwitchPlayUntilEOSTest,//856
527             StreamingMultiplePlayUntilEOSTest,//857
528             StreamingMultipleCloakingPlayUntilEOSTest, //858
529             StreamingProtocolRollOverTest, //859
530             StreamingProtocolRollOverTestWithUnknownURLType, //860
531             StreamingPlayListSeekTest, //861
532             StreamingSeekAfterEOSTest, //862
533             /*
534              * TC 863: This test case checks the engine behavior when the server responds
535              * with any of the following error codes - 404 (URL Not Found), 415 (Media Unsupported),
536              * 457 (Invalid Range). In all cases, the test should not error out, and complete as in TC 861
537              */
538             StreamingPlayListErrorCodeTest, // 863
539             StreamingOpenPlayMultipleSeekToEndOfClipUntilEOSTest, //864
540 
541 
542             StreamingOpenPlayMultiplePausePlayUntilEOSTest = 875, //875
543 
544             DVBH_StreamingOpenPlayStopTest = 876, //876
545             DVBH_StreamingOpenPlayUntilEOSTest, //877
546             StreamingLongPauseTest, //878
547 
548             CPM_DLA_OMA1PASSTRHU_OpenFailAuthPlayStopResetTest, //879
549             CPM_DLA_OMA1PASSTRHU_OpenPlayStopResetTest, //880
550             CPM_DLA_OMA1PASSTRHU_UnknownContentOpenPlayStopResetTest, //881
551 
552             StreamingOpenPlayUntilEOSTestWithFileHandle,//882
553             //883-888 available
554 
555             //GetLicense returns commandCompleted before CancelLic could be triggered
556             CPM_DLA_OMA1PASSTRHU_CancelAcquireLicenseTooLate_CancelFails = 889, //889
557             //GetLicense does not commandComplete, cancelLic is triggered
558             CPM_DLA_OMA1PASSTRHU_CancelAcquireLicense_CancelSucceeds, //890
559             CPM_DLA_OMA1PASSTRHU_ContentNotSupported, //891
560 
561             StreamingOpenPlayForwardPlayUntilEOSTest, //892
562 
563             //Multiple CPM Plugins
564             OpenPlayStop_MultiCPMTest, //893
565             StreamingLongPauseSeekTest, //894
566 
567             GenericReset_AddDataSource = 900,
568             GenericReset_Init,
569             GenericReset_AddDataSinkVideo,
570             GenericReset_AddDataSinkAudio,
571             GenericReset_Prepare,
572             GenericReset_Start,
573             GenericReset_Pause,
574             GenericReset_Resume,
575             GenericReset_Stop,
576             //GenericReset_Reset,
577             GenericReset_SetPlaybackRange,
578 
579             GenericDelete_AddDataSource = 910,
580             GenericDelete_Init,
581             GenericDelete_AddDataSinkVideo,
582             GenericDelete_AddDataSinkAudio,
583             GenericDelete_Prepare,
584             GenericDelete_Start,
585             GenericDelete_Pause,
586             GenericDelete_Resume,
587             GenericDelete_Stop,
588             //GenericDelete_Reset,
589             GenericDelete_SetPlaybackRange,
590 
591             GenericDeleteWhileProc_AddDataSource = 920,
592             GenericDeleteWhileProc_Init,
593             GenericDeleteWhileProc_AddDataSinkVideo,
594             GenericDeleteWhileProc_AddDataSinkAudio,
595             GenericDeleteWhileProc_Prepare,
596             GenericDeleteWhileProc_Start,
597             GenericDeleteWhileProc_Pause,
598             GenericDeleteWhileProc_Resume,
599             GenericDeleteWhileProc_Stop,
600             //GenericDeleteWhileProc_Reset,
601             GenericDeleteWhileProc_SetPlaybackRange,
602 
603             GenericCancelAll_AddDataSource = 930,
604             GenericCancelAll_Init,
605             GenericCancelAll_AddDataSinkVideo,
606             GenericCancelAll_AddDataSinkAudio,
607             GenericCancelAll_Prepare,
608             GenericCancelAll_Start,
609             GenericCancelAll_Pause,
610             GenericCancelAll_Resume,
611             GenericCancelAll_Stop,
612             //GenericCancelAll_Reset,
613             GenericCancelAll_SetPlaybackRange,
614 
615             GenericCancelAllWhileProc_AddDataSource = 940,
616             GenericCancelAllWhileProc_Init,
617             GenericCancelAllWhileProc_AddDataSinkVideo,
618             GenericCancelAllWhileProc_AddDataSinkAudio,
619             GenericCancelAllWhileProc_Prepare,
620             GenericCancelAllWhileProc_Start,
621             GenericCancelAllWhileProc_Pause,
622             GenericCancelAllWhileProc_Resume,
623             GenericCancelAllWhileProc_Stop,
624             //GenericCancelAllWhileProc_Reset,
625             GenericCancelAllWhileProc_SetPlaybackRange,
626 
627             // ACCESS DRM plugin tests
628             FirstAccessCPMTest = 960,
629             QueryEngine_AccessCPMTest,          //961
630             OpenPlayStop_AccessCPMTest,         //962
631             PlayStopPlayStop_AccessCPMTest,     //963
632             StartupMeasurement_AccessCPMTest,   //964
633             LastAccessCPMTest,
634 
635             GenericNetworkDisconnect_AddDataSource = 1051,
636             GenericNetworkDisconnect_Init,
637             GenericNetworkDisconnect_AddDataSinkVideo,
638             GenericNetworkDisconnect_AddDataSinkAudio,
639             GenericNetworkDisconnect_Prepare,
640             GenericNetworkDisconnect_Start,
641             GenericNetworkDisconnect_Pause,
642             GenericNetworkDisconnect_Resume,
643             GenericNetworkDisconnect_Stop,
644             GenericNetworkDisconnect_SetPlaybackRange,
645 
646             GenericNetworkDisconnectWhileProc_AddDataSource = 1061,
647             GenericNetworkDisconnectWhileProc_Init,
648             GenericNetworkDisconnectWhileProc_AddDataSinkVideo,
649             GenericNetworkDisconnectWhileProc_AddDataSinkAudio,
650             GenericNetworkDisconnectWhileProc_Prepare,
651             GenericNetworkDisconnectWhileProc_Start,
652             GenericNetworkDisconnectWhileProc_Pause,
653             GenericNetworkDisconnectWhileProc_Resume,
654             GenericNetworkDisconnectWhileProc_Stop,
655             GenericNetworkDisconnectWhileProc_SetPlaybackRange,
656 
657             GenericNetworkDisconnectReconnect_AddDataSource = 1071,
658             GenericNetworkDisconnectReconnect_Init,
659             GenericNetworkDisconnectReconnect_AddDataSinkVideo,
660             GenericNetworkDisconnectReconnect_AddDataSinkAudio,
661             GenericNetworkDisconnectReconnect_Prepare,
662             GenericNetworkDisconnectReconnect_Start,
663             GenericNetworkDisconnectReconnect_Pause,
664             GenericNetworkDisconnectReconnect_Resume,
665             GenericNetworkDisconnectReconnect_Stop,
666             GenericNetworkDisconnectReconnect_SetPlaybackRange,
667 
668             GenericNetworkDisconnectReconnectWhileProc_AddDataSource = 1081,
669             GenericNetworkDisconnectReconnectWhileProc_Init,
670             GenericNetworkDisconnectReconnectWhileProc_AddDataSinkVideo,
671             GenericNetworkDisconnectReconnectWhileProc_AddDataSinkAudio,
672             GenericNetworkDisconnectReconnectWhileProc_Prepare,
673             GenericNetworkDisconnectReconnectWhileProc_Start,
674             GenericNetworkDisconnectReconnectWhileProc_Pause,
675             GenericNetworkDisconnectReconnectWhileProc_Resume,
676             GenericNetworkDisconnectReconnectWhileProc_Stop,
677             GenericNetworkDisconnectReconnectWhileProc_SetPlaybackRange,
678 
679             GenericNetworkDisconnectCancelAll_AddDataSource = 1091,
680             GenericNetworkDisconnectCancelAll_Init,
681             GenericNetworkDisconnectCancelAll_AddDataSinkVideo,
682             GenericNetworkDisconnectCancelAll_AddDataSinkAudio,
683             GenericNetworkDisconnectCancelAll_Prepare,
684             GenericNetworkDisconnectCancelAll_Start,
685             GenericNetworkDisconnectCancelAll_Pause,
686             GenericNetworkDisconnectCancelAll_Resume,
687             GenericNetworkDisconnectCancelAll_Stop,
688             GenericNetworkDisconnectCancelAll_SetPlaybackRange,
689 
690             GenericNetworkDisconnectCancelAllWhileProc_AddDataSource = 1101,
691             GenericNetworkDisconnectCancelAllWhileProc_Init,
692             GenericNetworkDisconnectCancelAllWhileProc_AddDataSinkVideo,
693             GenericNetworkDisconnectCancelAllWhileProc_AddDataSinkAudio,
694             GenericNetworkDisconnectCancelAllWhileProc_Prepare,
695             GenericNetworkDisconnectCancelAllWhileProc_Start,
696             GenericNetworkDisconnectCancelAllWhileProc_Pause,
697             GenericNetworkDisconnectCancelAllWhileProc_Resume,
698             GenericNetworkDisconnectCancelAllWhileProc_Stop,
699             GenericNetworkDisconnectCancelAllWhileProc_SetPlaybackRange,
700 
701             GenericNetworkDisconnectCancelAllWhileProtocolRollover,
702 
703             GenericOpenPlayMultiplePauseResumeUntilEOSTest = 1112,
704             GenericOpenPlayMultipleSeekUntilEOSTest,
705 
706             GenericOpenPlayStop_SleepAddDataSource = 1114,
707             GenericOpenPlayStop_SleepInit,
708             GenericOpenPlayStop_SleepAddDataSinkVideo,
709             GenericOpenPlayStop_SleepAddDataSinkAudio,
710             GenericOpenPlayStop_SleepPrepare,
711             GenericOpenPlayStop_SleepGetMetaDataValueList,
712             GenericOpenPlayStop_SleepStop,
713 
714             GenericOpenPlayPauseResumeSeekStopProfiling = 1125,
715             GenericOpenPlayPauseRepositionResumeUntilEOSTest,
716             GenericOpenPlayPauseRepositionResumeNetworkDisconnectCancelAllTest,
717             GenericOpenSetPlaybackRangeStartPlayStopTest,
718             GenericOpenPlayRepositionToEndTest,
719             GenericPVMFErrorCorruptReNotified,
720             GenericOpenPlayPauseGetMetaDataUntilEOSTest,
721             GenericOpenGetMetaDataPicTest,//1132
722 
723             //1133-1149 available.
724 
725             //BEGIN JANUS CPM TESTS
726             CleanDrmData_JanusCPMTest = 1150,
727             LoadLicense_JanusCPMTest,//1151
728             OpenPlayStop_JanusCPMTest, //1152
729             PlayStopPlayStop_JanusCPMTest,//1153
730             QueryEngine_JanusCPMTest,//1154
731             StartupMeasurement_JanusCPMTest, //1155
732             //Janus DLA tests
733             DLA_CleanDrmData_JanusCPMTest,//1156
734             DLA_OpenPlayStop_JanusCPMTest,//1157
735             DLA_LicenseCapture_JanusCPMTest,//1158
736             DLA_CancelAcquireLicense_JanusCPMTest,//1159
737             //Janus streaming tests.
738             DLA_StreamingOpenPlayUntilEOST_JanusCPMTest,//1160
739             DLA_StreamingOpenPlayPausePlayUntilEOS_JanusCPMTest,//1161
740             DLA_StreamingOpenPlaySeekPlayUntilEOS_JanusCPMTest,//1162
741             DLA_StreamingMultiplePlayUntilEOS_JanusCPMTest,//1163
742             DLA_StreamingProtocolRollOverTest_JanusCPMTest,//1164
743             DLA_StreamingProtocolRollOverTestWithUnknownURLType_JanusCPMTest,//1165
744             DLA_StreamingCancelAcquireLicense_JanusCPMTest,//1166
745             //Janus PDL tests
746             DLA_PDL_OpenPlayUntilEOS_JanusCPMTest,//1167
747 
748             //this range RESERVED for future Janus tests.
749 
750             FirstDLAStreamingTest = 1200, //placeholder
751             //note these are all Janus CPM tests
752 
753             DLA_StreamingCancelAll_AddDataSource = 1201,
754             DLA_StreamingCancelAll_Init,
755             DLA_StreamingCancelAll_LicenseAcquired,
756             DLA_StreamingCancelAll_AddDataSinkVideo,
757             DLA_StreamingCancelAll_AddDataSinkAudio,
758             DLA_StreamingCancelAll_Prepare,
759             DLA_StreamingCancelAll_Start,
760             DLA_StreamingCancelAll_Pause,
761             DLA_StreamingCancelAll_Resume,
762             DLA_StreamingCancelAll_Stop,
763             DLA_StreamingCancelAll_SetPlaybackRange,
764 
765             DLA_StreamingCancelAllWhileProc_AddDataSource = 1212,
766             DLA_StreamingCancelAllWhileProc_Init,
767             DLA_StreamingCancelAllWhileProc_LicenseAcquired,
768             DLA_StreamingCancelAllWhileProc_AddDataSinkVideo,
769             DLA_StreamingCancelAllWhileProc_AddDataSinkAudio,
770             DLA_StreamingCancelAllWhileProc_Prepare,
771             DLA_StreamingCancelAllWhileProc_Start,
772             DLA_StreamingCancelAllWhileProc_Pause,
773             DLA_StreamingCancelAllWhileProc_Resume,
774             DLA_StreamingCancelAllWhileProc_Stop,
775             DLA_StreamingCancelAllWhileProc_SetPlaybackRange,
776 
777             DLA_StreamingNetworkDisconnect_AddDataSource = 1223,
778             DLA_StreamingNetworkDisconnect_Init,
779             DLA_StreamingNetworkDisconnect_LicenseAcquired,
780             DLA_StreamingNetworkDisconnect_AddDataSinkVideo,
781             DLA_StreamingNetworkDisconnect_AddDataSinkAudio,
782             DLA_StreamingNetworkDisconnect_Prepare,
783             DLA_StreamingNetworkDisconnect_Start,
784             DLA_StreamingNetworkDisconnect_Pause,
785             DLA_StreamingNetworkDisconnect_Resume,
786             DLA_StreamingNetworkDisconnect_Stop,
787             DLA_StreamingNetworkDisconnect_SetPlaybackRange,
788 
789             DLA_StreamingNetworkDisconnectWhileProc_AddDataSource = 1234,
790             DLA_StreamingNetworkDisconnectWhileProc_Init,
791             DLA_StreamingNetworkDisconnectWhileProc_LicenseAcquired,
792             DLA_StreamingNetworkDisconnectWhileProc_AddDataSinkVideo,
793             DLA_StreamingNetworkDisconnectWhileProc_AddDataSinkAudio,
794             DLA_StreamingNetworkDisconnectWhileProc_Prepare,
795             DLA_StreamingNetworkDisconnectWhileProc_Start,
796             DLA_StreamingNetworkDisconnectWhileProc_Pause,
797             DLA_StreamingNetworkDisconnectWhileProc_Resume,
798             DLA_StreamingNetworkDisconnectWhileProc_Stop,
799             DLA_StreamingNetworkDisconnectWhileProc_SetPlaybackRange,
800 
801             DLA_StreamingNetworkDisconnectReconnect_AddDataSource = 1245,
802             DLA_StreamingNetworkDisconnectReconnect_Init,
803             DLA_StreamingNetworkDisconnectReconnect_LicenseAcquired,
804             DLA_StreamingNetworkDisconnectReconnect_AddDataSinkVideo,
805             DLA_StreamingNetworkDisconnectReconnect_AddDataSinkAudio,
806             DLA_StreamingNetworkDisconnectReconnect_Prepare,
807             DLA_StreamingNetworkDisconnectReconnect_Start,
808             DLA_StreamingNetworkDisconnectReconnect_Pause,
809             DLA_StreamingNetworkDisconnectReconnect_Resume,
810             DLA_StreamingNetworkDisconnectReconnect_Stop,
811             DLA_StreamingNetworkDisconnectReconnect_SetPlaybackRange,
812 
813             DLA_StreamingNetworkDisconnectReconnectWhileProc_AddDataSource = 1256,
814             DLA_StreamingNetworkDisconnectReconnectWhileProc_Init,
815             DLA_StreamingNetworkDisconnectReconnectWhileProc_LicenseAcquired,
816             DLA_StreamingNetworkDisconnectReconnectWhileProc_AddDataSinkVideo,
817             DLA_StreamingNetworkDisconnectReconnectWhileProc_AddDataSinkAudio,
818             DLA_StreamingNetworkDisconnectReconnectWhileProc_Prepare,
819             DLA_StreamingNetworkDisconnectReconnectWhileProc_Start,
820             DLA_StreamingNetworkDisconnectReconnectWhileProc_Pause,
821             DLA_StreamingNetworkDisconnectReconnectWhileProc_Resume,
822             DLA_StreamingNetworkDisconnectReconnectWhileProc_Stop,
823             DLA_StreamingNetworkDisconnectReconnectWhileProc_SetPlaybackRange,
824 
825             DLA_StreamingNetworkDisconnectCancelAll_AddDataSource = 1267,
826             DLA_StreamingNetworkDisconnectCancelAll_Init,
827             DLA_StreamingNetworkDisconnectCancelAll_LicenseAcquired,
828             DLA_StreamingNetworkDisconnectCancelAll_AddDataSinkVideo,
829             DLA_StreamingNetworkDisconnectCancelAll_AddDataSinkAudio,
830             DLA_StreamingNetworkDisconnectCancelAll_Prepare,
831             DLA_StreamingNetworkDisconnectCancelAll_Start,
832             DLA_StreamingNetworkDisconnectCancelAll_Pause,
833             DLA_StreamingNetworkDisconnectCancelAll_Resume,
834             DLA_StreamingNetworkDisconnectCancelAll_Stop,
835             DLA_StreamingNetworkDisconnectCancelAll_SetPlaybackRange,
836 
837             DLA_StreamingNetworkDisconnectCancelAllWhileProc_AddDataSource = 1278,
838             DLA_StreamingNetworkDisconnectCancelAllWhileProc_Init,
839             DLA_StreamingNetworkDisconnectCancelAllWhileProc_LicenseAcquired,
840             DLA_StreamingNetworkDisconnectCancelAllWhileProc_AddDataSinkVideo,
841             DLA_StreamingNetworkDisconnectCancelAllWhileProc_AddDataSinkAudio,
842             DLA_StreamingNetworkDisconnectCancelAllWhileProc_Prepare,
843             DLA_StreamingNetworkDisconnectCancelAllWhileProc_Start,
844             DLA_StreamingNetworkDisconnectCancelAllWhileProc_Pause,
845             DLA_StreamingNetworkDisconnectCancelAllWhileProc_Resume,
846             DLA_StreamingNetworkDisconnectCancelAllWhileProc_Stop,
847             DLA_StreamingNetworkDisconnectCancelAllWhileProc_SetPlaybackRange,
848 
849             DLA_StreamingOpenPlayMultiplePauseResumeUntilEOSTest = 1289,
850             DLA_StreamingOpenPlayMultipleSeekUntilEOSTest,
851 
852             DLA_StreamingOpenPlayStop_SleepAddDataSource = 1291,
853             DLA_StreamingOpenPlayStop_SleepInit,
854             DLA_StreamingOpenPlayStop_SleepLicenseAcquired,
855             DLA_StreamingOpenPlayStop_SleepAddDataSinkVideo,
856             DLA_StreamingOpenPlayStop_SleepAddDataSinkAudio,
857             DLA_StreamingOpenPlayStop_SleepPrepare,
858             DLA_StreamingOpenPlayStop_SleepStop = 1301,
859             //END JANUS CPM TESTS
860 
861             GenericOpenPlaySeekBeyondClipDurationTest = 1302,
862 
863             //tests various modes of track selection
864             //refer to test_pv_player_engine_testset_apptrackselection.h
865             //for definition of modes
866             ApplicationInvolvedTrackSelectionTestDefault = 1303,
867             ApplicationInvolvedTrackSelectionTestPassthru = 1304,
868             ApplicationInvolvedTrackSelectionTestAudioOnly = 1305,
869             ApplicationInvolvedTrackSelectionTestVideoOnly = 1306,
870             ApplicationInvolvedTrackSelectionTestTextOnly = 1307,
871             ApplicationInvolvedTrackSelectionTestNoTracks = 1308,
872 
873             //Metadata Query tests
874             DLA_QueryEngine_JupiterCPMTest_v2_WMA = 1400,
875             DLA_QueryEngine_JupiterCPMTest_v24_WMA,//1401
876             DLA_QueryEngine_JupiterCPMTest_v4_Enveloped_ASF,//1402
877             DLA_QueryEngine_JupiterCPMTest_v4_Enveloped_MP4,//1403
878             DLA_QueryEngine_JupiterCPMTest_v4_Enveloped_Image,//1404
879             //Enveloped image tests
880             DLA_EnvelopeRead_JupiterCPMTest_v4_Enveloped_Image,//1405
881             //Multi-media format tests
882             DLA_OpenPlayStop_JupiterCPMTest_v2_WMA,//1406
883             DLA_OpenPlayStop_JupiterCPMTest_v2_WMV,//1407
884             DLA_OpenPlayStop_JupiterCPMTest_v24_WMA,//1408
885             DLA_OpenPlayStop_JupiterCPMTest_v24_WMV,//1409
886             DLA_OpenPlayStop_JupiterCPMTest_v4_WMA,//1410
887             DLA_OpenPlayStop_JupiterCPMTest_v4_WMV,//1411
888             DLA_OpenPlayStop_JupiterCPMTest_v4_AAC,//1412
889             DLA_OpenPlayStop_JupiterCPMTest_v4_H264,//1413
890             DLA_OpenPlayStop_JupiterCPMTest_v4_Enveloped_ASF,//1414
891             DLA_OpenPlayStop_JupiterCPMTest_v4_Enveloped_MP4,//1415
892             DLA_OpenPlayStop_JupiterCPMTest_unprotected_H264,//1416
893             DLA_OpenPlayStop_JupiterCPMTest_unprotected_AAC,//1417
894             //Special license protocol sequence tests
895             DLA_OpenPlayStop_JupiterCPMTest_redirect,//1418
896             DLA_OpenPlayStop_JupiterCPMTest_v24_WMA_fallback,//1419
897             DLA_OpenPlayStop_JupiterCPMTest_v4_WMA_ringtone,//1420
898             DLA_OpenPlayStop_JupiterCPMTest_v4_WMA_domain,//1421
899             DLA_OpenPlayStop_JupiterCPMTest_v4_WMA_domain_renew,//1422
900             DLA_OpenPlayStop_JupiterCPMTest_v4_WMA_domain_offline,//1423
901             DLA_OpenPlayStop_JupiterCPMTest_v4_WMA_domain_history,//1424
902             //Jupiter utility tests
903             DLA_JoinDomain_JupiterCPMTest,//1425
904             DLA_LeaveDomain_JupiterCPMTest,//1426
905             DLA_DeleteLicense_JupiterCPMTest_v2_Content,//1427
906             DLA_DeleteLicense_JupiterCPMTest_v24_Content,//1428
907             DLA_MeteringByCert_JupiterCPMTest,//1429
908             DLA_MeteringByMID_JupiterCPMTest,//1430
909             DLA_MeteringAll_JupiterCPMTest,//1431
910             DLA_LicenseUpdateAll_JupiterCPMTest,//1432
911             DLA_LicenseUpdateExpired_JupiterCPMTest,//1433
912             //Jupiter CancelAcquireLicense tests
913             DLA_CancelAcquireLicense_JupiterCPMTest_v4_Enveloped_Image,//1434
914             DLA_CancelAcquireLicense_JupiterCPMTest_v2_Content,//1435
915             DLA_CancelAcquireLicense_JupiterCPMTest_v24_Content,//1436
916             DLA_CancelAcquireLicense_JupiterCPMTest_v4_Enveloped_MP4,//1437
917             //Jupiter streaming tests.
918             DLA_StreamingOpenPlayUntilEOST_JupiterCPMTest,//1438
919             DLA_StreamingOpenPlayPausePlayUntilEOS_JupiterCPMTest,//1439
920             DLA_StreamingOpenPlaySeekPlayUntilEOS_JupiterCPMTest,//1440
921             DLA_StreamingMultiplePlayUntilEOS_JupiterCPMTest,//1441
922             DLA_StreamingCancelAcquireLicense_JupiterCPMTest,//1442
923             DLA_StreamingProtocolRollOverTest_JupiterCPMTest,//1443
924             DLA_StreamingProtocolRollOverTestWithUnknownURLType_JupiterCPMTest,//1444
925             //RESERVED FOR FUTURE JUPITER CPM TESTS.
926             LastJupiterCPMTest = 1599,//placeholder
927             //End JUPITER CPM TESTS.
928             /*
929              * Note: Starting PVR tests from 1600 since the number of tests exceed the range
930              * from 895 and 900 (the earlier location of the tests)
931              */
932             /*
933              * =========== Basic PVR tests ===========
934              */
935 
936             /*
937              * 1600:        Play->pause->resume->stop test
938              * Description: Self-explanatory
939              */
940 
941             /**
942             PVR Memory Live Buffer tests start at 1600
943             */
944 
945             PVR_MLB_StreamingOpenPlayLivePausePlayStopTest = 1600,//1600
946             PVR_MLB_StreamingOpenPlayLivePausePlaySeekStopTest,//1601
947             PVR_MLB_StreamingOpenPlayLiveBufferBoundaryCheckTest,//1602
948             /*
949              * 1601:        Reposition after a play pause
950              * Description: See TC 1611
951              */
952 
953             /*
954              * 1602:        Check live buffer boundary
955              * Description: To maintain TC numbers, this test case
956              *              does a play followed by a stop.
957              */
958 
959             /*
960              * =========== Live pause tests ===========
961              */
962 
963             /*
964              * 1603:        Quick successive pause/resume
965              * Description: This test case will call pause/resume in a quick and
966              *              repetitive sequence to test quick successive pause/resume stress condition.
967              * Input:       1. repeat count
968              */
969             PVR_MLB_StreamingOpenPlayMultipleLivePausePlayTest,//1603
970             /*
971              * 1604:        Pause with random duration
972              * Description: This test case will call pause/resume repeatedly.
973              *              Each pause has random duration in a range.
974              * Inputs:      1. repeat count.
975              *              2. pause duration range
976              */
977             PVR_MLB_StreamingOpenPlayMultipleLivePauseRandomDurationPlayTest,//1604
978             /*
979              * 1605:        Long pause
980              * Description: This test case will pause long period of time (> live buffer duration)
981              * Input:       1. pause duration
982              */
983             PVR_MLB_StreamingOpenPlayLongLivePausePlayTest,//1605
984             /*
985              * 1606:        Stop during live pause
986              * Description: This test case stop the session during live pause.
987              *              Then it starts the same session again.
988              */
989             PVR_MLB_StreamingOpenPlayLivePauseStopTest,//1606
990 
991             /*
992              * =========== Random position tests ===========
993              */
994 
995             /*
996              * 1607:        Jump to live after pause
997              * Description: This test case jumps to live session (not buffer) after a pause.
998              *              The above step is repeated several times, after pausing for a random duration.
999              * Inputs:      1. Repeat count
1000              *              2. Pause duration range
1001              */
1002             PVR_MLB_StreamingOpenPauseJumpToLiveStopTest, //1607
1003             /*
1004              * 1608:        Jump to live after pause/resume
1005              * Description: This test case pauses a live session for a random duration, resumes
1006              *              a for random duration that is less than the pause duration, and then
1007              *              jumps to live. This is repeated several times.
1008              * Inputs:      1. Repeat count
1009              *              2. Pause duration range
1010              *              3. Resume duration range
1011              */
1012             PVR_MLB_StreamingOpenPauseResumeJumpToLiveStopTest, //1608
1013             /*
1014              * 1609:        Stop during playing back from live buffer
1015              * Description: This test case pauses a live session for a random duration, resumes
1016              *              and then stops the session while playing from the live buffer. The same
1017              *              session is started after the stop.
1018              */
1019             PVR_MLB_StreamingOpenPauseResumeStopTest, //1609
1020             /*
1021              * 1610:        RTSP URL test
1022              * Description: This test case uses an RTSP URL as the input for the streaming session.
1023              *              Both live and VOD cases are handled.
1024              */
1025             PVR_MLB_StreamingRTSPUrlPauseResumeStopTest, //1610
1026 
1027             /*
1028              * 1611:        PVR Repositioning test
1029              * Description: This test case does a sequence of repositioning requests within the live buffer.
1030              *              The followed sequence is: start, pause, resume, repositioning sequence, stop.
1031                             The repos. sequence consists of 6 repositioning requests back and forward.
1032              */
1033             PVR_MLB_StreamingPauseResumeRepositionStopTest, //1611
1034 
1035             /*
1036             * 1612:        PVR Repositioning test
1037             * Description: This test case does a sequence of repositioning requests within the live buffer.
1038             *              The followed sequence is: start, pause, repositioning, resume. This sequence is
1039                         done six times, followed by a stop.
1040             */
1041             PVR_MLB_StreamingPauseRepositionResumeStopTest, //1612
1042 
1043             /*
1044              * 1613:        RTSP END_OF_STREAM test for memory live buffer.
1045              * Description: This test is design to test the case where and RTSP END_OF_STREAM arrives
1046              *              during a live pause. Total playback time must equal the cumulative playlist clip
1047              *              duration.
1048              * Input:
1049              */
1050             PVR_MLB_StreamingOpenPlayLivePauseWaitForRTSPEOSResumeTest = 1613,//1613
1051 
1052 
1053             /*
1054             * 1614:        PVR Playlist switch with a full live buffer after JTL
1055             * Description: This test case makes a live pause it resumes once the live buffer gets full, and makes
1056             *              a JTL followed by a channel switch, the channel switch time is measured.
1057 
1058             */
1059             PVR_MLB_StreamingOpenPauseJmpToLiveChannelSwitchTest, //1614
1060 
1061 
1062 
1063             /*
1064             * 1615       PVR Bitrate estimation test
1065             * Description: Test case for mismatch between advertised and real bitrate,
1066             *              the root of the problem with higher-than-advertised bitrates is that it
1067             *              may cause overwrites in the LiveBuffer, which is then reflected in quality artifacts.
1068             *
1069             *              PLEASE USE A SDP FILE THAT ANOUNCES A SMALLER BITRATE THAN THE REAL ONE
1070 
1071             */
1072             PVR_MLB_StreamingBitrateEstimationTest = 1615,
1073 
1074             /**
1075             PVR FileSystem Live Buffer tests start at 1630
1076             */
1077             PVR_FSLB_StreamingOpenPlayLivePausePlayStopTest = 1630,//1630
1078             PVR_FSLB_StreamingOpenPlayLivePausePlaySeekStopTest,//1631
1079             PVR_FSLB_StreamingOpenPlayLiveBufferBoundaryCheckTest,//1632
1080             /*
1081              * =========== Live pause tests ===========
1082              */
1083 
1084             /*
1085              * 1633:        Quick successive pause/resume
1086              * Description: This test case will call pause/resume in a quick and
1087              *              repetitive sequence to test quick successive pause/resume stress condition.
1088              * Input:       1. repeat count
1089              */
1090             PVR_FSLB_StreamingOpenPlayMultipleLivePausePlayTest,//1633
1091             /*
1092              * 1634:        Pause with random duration
1093              * Description: This test case will call pause/resume repeatedly.
1094              *              Each pause has random duration in a range.
1095              * Inputs:      1. repeat count.
1096              *              2. pause duration range
1097              */
1098             PVR_FSLB_StreamingOpenPlayMultipleLivePauseRandomDurationPlayTest,//1634
1099             /*
1100              * 1635:        Long pause
1101              * Description: This test case will pause long period of time (> live buffer duration)
1102              * Input:       1. pause duration
1103              */
1104             PVR_FSLB_StreamingOpenPlayLongLivePausePlayTest,//1635
1105             /*
1106              * 1636:        Stop during live pause
1107              * Description: This test case stop the session during live pause.
1108              *              Then it starts the same session again.
1109              */
1110             PVR_FSLB_StreamingOpenPlayLivePauseStopTest,//1636
1111 
1112             /*
1113              * =========== Random position tests ===========
1114              */
1115 
1116             /*
1117              * 1637:        Jump to live after pause
1118              * Description: This test case jumps to live session (not buffer) after a pause.
1119              *              The above step is repeated several times, after pausing for a random duration.
1120              * Inputs:      1. Repeat count
1121              *              2. Pause duration range
1122              */
1123             PVR_FSLB_StreamingOpenPauseJumpToLiveStopTest, //1637
1124             /*
1125              * 1638:        Jump to live after pause/resume
1126              * Description: This test case pauses a live session for a random duration, resumes
1127              *              a for random duration that is less than the pause duration, and then
1128              *              jumps to live. This is repeated several times.
1129              * Inputs:      1. Repeat count
1130              *              2. Pause duration range
1131              *              3. Resume duration range
1132              */
1133             PVR_FSLB_StreamingOpenPauseResumeJumpToLiveStopTest, //1638
1134             /*
1135              * 1639:        Stop during playing back from live buffer
1136              * Description: This test case pauses a live session for a random duration, resumes
1137              *              and then stops the session while playing from the live buffer. The same
1138              *              session is started after the stop.
1139              */
1140             PVR_FSLB_StreamingOpenPauseResumeStopTest, //1639
1141 
1142             /*
1143              * 1640:        RTSP URL test
1144              * Description: This test case uses an RTSP URL as the input for the streaming session.
1145              *              Both live and VOD cases are handled.
1146              */
1147             PVR_FSLB_StreamingRTSPUrlPauseResumeStopTest, //1640
1148 
1149             /*
1150              * 1641:        PVR Repositioning test
1151              * Description: This test case does a sequence of repositioning requests within the live buffer.
1152              *              The followed sequence is: start, pause, resume, repositioning sequence, stop.
1153                             The repos. sequence consists of 6 repositioning requests back and forward.
1154              */
1155             PVR_FSLB_StreamingPauseResumeRepositionStopTest, //1641
1156 
1157             /*
1158             * 1642:        PVR Repositioning test
1159             * Description: This test case does a sequence of repositioning requests within the live buffer.
1160             *              The followed sequence is: start, pause, repositioning, resume. This sequence is
1161                         done six times, followed by a stop.
1162             */
1163             PVR_FSLB_StreamingPauseRepositionResumeStopTest, //1642
1164 
1165             /*
1166             * 1643:        RTSP END_OF_STREAM test for file system live buffer.
1167             * Description: Same as 1643.
1168             * Input:
1169             */
1170 
1171             PVR_FSLB_StreamingOpenPlayLivePauseWaitForRTSPEOSResumeTest, //1643
1172 
1173             /*
1174             * 1644:        PVR Playlist switch with a full live buffer after JTL
1175             * Description: This test case makes a live pause it resumes once the live buffer gets full, and makes
1176             *              a JTL followed by a channel switch, the channel switch time is measured.
1177 
1178             */
1179             PVR_FSLB_StreamingOpenPauseJmpToLiveChannelSwitchTest, //1644
1180 
1181 
1182             /**
1183             PVR local file playback tests start at 1660
1184             */
1185 
1186             PVR_FILEPLAYBACK_OpenPlayUntilEOFTest = 1660,// 1660
1187 
1188             /*
1189             * 1661       PVR Local Playback Open-Play-Reposition-Play-Stop
1190             * Description: This test case plays a local pvr file for 10 seconds, then
1191             *              it repositions to 50, 75, 40, 0, 60 and 95% of the local file
1192             *              and then it stops playback.
1193             *
1194 
1195             */
1196 
1197             PVR_FILEPLAYBACK_OpenPlayRepositionPlayStopTest,  // 1661
1198 
1199 
1200             /*
1201             * 1662       PVR Local Playback Open-Play-Pause-Reposition
1202             * Description: This test case plays a local pvr file for 10 seconds, then pauses playback
1203             *              it repositions to 50, 75, 40, 0, 60 and 95% of the local file
1204             *              and then it stops playback.
1205             *
1206 
1207             */
1208 
1209             PVR_FILEPLAYBACK_OpenPlayPauseRepositionTest,  // 1662
1210 
1211             /*
1212             * 1663       PVR Local Playback Retrieved duration is correct
1213             * Description: This test case plays a local pvr file for 3 seconds and
1214             *              verifies if the retrieved duration is correct
1215             *
1216 
1217             */
1218 
1219             PVR_FILEPLAYBACK_OpenPlayVerifyDurationTest,  // 1663
1220 
1221 
1222 
1223 
1224             /*===========================PVR Recorder Test cases============================*/
1225 
1226             /*
1227             * 1680       PVR_Recorder_RecordOnStartUp
1228             * Description: - Recording will start from NPT zero until playback is stopped.
1229             *              - Pass criteria will be: No playback or recording errors.
1230             */
1231 
1232             PVR_Recorder_RecordOnStartUp = 1680,
1233 
1234             /*
1235             * 1681       PVR_Recorder_RecordOnDemand
1236             * Description: - Recording will start from an arbitrary NPT different than zero to a point before playback is stopped.
1237             *              - Pass criteria will be: No playback or recording errors.
1238             */
1239 
1240             PVR_Recorder_RecordOnDemand,
1241 
1242             /*
1243             * 1682       PVR_Recorder_MultiplePause
1244             * Description: - Recording will start from NPT zero.
1245             *              - Multiple pause/resume resume will be performed
1246             *              - Pass criteria will be: No playback or recording errors.
1247             */
1248 
1249             PVR_Recorder_MultiplePause,
1250 
1251             /*
1252             * 1683       PVR_Recorder_MultiplePauseJTL
1253             * Description: - Recording will start from NPT zero.
1254             *              - Multiple pause/resume will be performed
1255             *              - After last pause JTL
1256             *              - Pass criteria will be: No playback or recording errors.
1257             */
1258 
1259             PVR_Recorder_MultiplePauseJTL,
1260 
1261             /*
1262             * 1684       PVR_Recorder_MultipleRepos
1263             * Description: - Recording will start from NPT zero.
1264             *              - Multiple Reposition/resume will be performed
1265             *              - Pass criteria will be: No playback or recording errors.
1266             */
1267 
1268             PVR_Recorder_MultipleRepos,
1269 
1270             /*
1271             * 1685       PVR_Recorder_MultipleRecord
1272             * Description: - Recording will start from an arbitrary NPT different than zero.
1273             *              - Multiple StartRecord/StopRecord will be performed
1274             *              - Pass criteria will be: No playback or recording errors
1275             */
1276 
1277             PVR_Recorder_MultipleRecord,
1278 
1279             LastInteractiveTest = 2000, // placeholder
1280 
1281 
1282             BeyondLastTest = 9999 //placeholder
1283         };
1284 
1285         // From test_case
1286         virtual void test();
1287 
1288         // From pvplayer_async_test_observer
1289         void TestCompleted(test_case&);
1290 
1291         //Validating file format specific player test cases
1292         bool ValidateTestCase(int& aCurrentTestCaseNumber);
1293 
1294         void SetupLoggerScheduler();
1295 
1296     private:
1297         const char *iFileName;
1298         PVMFFormatType iFileType;
1299 
1300         int iCurrentTestNumber;
1301         pvplayer_async_test_base* iCurrentTest;
1302         int32 iFirstTest;
1303         int32 iLastTest;
1304         bool iCompressedVideoOutput;
1305         bool iCompressedAudioOutput;
1306         bool iFileInput;
1307         bool iBCS;
1308         //for proxy support
1309         bool iProxyEnabled;
1310 
1311         // For test results
1312         int iTotalSuccess;
1313         int iTotalError;
1314         int iTotalFail;
1315 
1316         // For logging
1317         int32 iLogLevel;
1318         int32 iLogNode;
1319         int32 iLogFile;
1320         int32 iLogMem;
1321 
1322         // For memory statistics
1323         uint32 iTotalAlloc;
1324         uint32 iTotalBytes;
1325         uint32 iAllocFails;
1326         uint32 iNumAllocs;
1327         //Flag for checking the file type
1328         int32 iFileFormatType;
1329 };
1330 
1331 /**
1332  * Factory class for project specific unit test cases
1333  */
1334 class PVPlayerProjTestFactory
1335 {
1336     public:
1337         /**
1338          * Creates customer project test case object as specified by test case number.  Default
1339          * implementation returns NULL.  Customer projects that wish to extend pvPlayer unit
1340          * test to implement customer specific test cases should implement this function
1341          *
1342          * @param aTestCaseNumber - Unit test case number
1343          * @param aTestParam - Parameters to the unit test case
1344          * @return Newly created project specific test case object, or NULL if the test case
1345          *              number is not supported.
1346          */
GetProjTest(uint aTestCaseNumber,PVPlayerAsyncTestParam aTestParam)1347         virtual pvplayer_async_test_base* GetProjTest(uint aTestCaseNumber, PVPlayerAsyncTestParam aTestParam)
1348         {
1349             OSCL_UNUSED_ARG(aTestCaseNumber);
1350             OSCL_UNUSED_ARG(aTestParam);
1351             return NULL;
1352         }
1353 };
1354 
1355 #endif
1356 
1357 
1358