Update contrib.
1 // Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
16 #ifndef TSU_3GPLIBRARY_PARSE_COMPOSER_H
17 #define TSU_3GPLIBRARY_PARSE_COMPOSER_H
19 #include <test/testexecutestepbase.h>
20 #include <c3gplibrary.h>
23 // C3GPLibParseComposeFile takes a directory path specified by the test configuration and
24 // parses the video & audio data within the single file inside the directory. Optionally,
25 // this class can parse then use the data retrieved to compose a copy of the original file.
26 // The output files will reside in a user-specificed output directory, using the same name as the
27 // original file. An extra option is to compare the input & output files' video & audio data.
29 _LIT(K3GPParseComposeFile, "3GPParseComposeFile");
30 class C3GPLibParseComposeFile : public CTestStep
33 C3GPLibParseComposeFile();
34 TVerdict doTestStepPreambleL();
35 TVerdict doTestStepL();
36 TVerdict doTestStepPostambleL();
39 TInt ReadVideoFrame(C3GPParse& aParser,
41 TBool& aVideoKeyFrame,
42 TUint& aVideoTimestampInMS,
43 T3GPFrameDependencies& aDependencies);
45 TInt ReadAudioFrames(C3GPParse& aParser,
47 TInt& aFramesInSample,
48 TUint& aTimestampInTS);
50 virtual void ParseFileL(const TDesC& aInputFile);
55 TInt ParseVideoProperties(C3GPParse& aParser,
56 RBuf8& aDecoderSpecificInfo,
57 T3GPVideoPropertiesBase*& aProperties,
59 TInt ParseAudioProperties(C3GPParse& aParser,
60 RBuf8& aDecoderSpecificInfo,
61 T3GPAudioPropertiesBase*& aProperties,
63 TInt GetAudioDecoderSpecificInfo(RBuf8& aBuffer);
64 TInt GetVideoDecoderSpecificInfo(RBuf8& aBuffer);
67 void ReadWriteAudioVideoFramesL(const T3GPVideoPropertiesBase* aVideoProperties,
68 const T3GPAudioPropertiesBase* aAudioProperties,
69 TUint aVideoLengthInMs,
70 TUint aAudioLengthInMs);
72 TBool CompareInputOuputFileL(const TDesC& aInputFile);
73 TBool CompareVideoPropertiesL(C3GPParse& aParser1,
75 TBool CompareAudioPropertiesL(C3GPParse& aParser1,
77 TBool CompareAudioVideoData(C3GPParse& aParser1,
79 TBool CompareAudioFrames(C3GPParse& aParser1,
81 TBool CompareVideoFrame(C3GPParse& aParser1,
91 TBool iCompareOriginal;
92 TInt iExpectedNumberOfFailure;
95 C3GPCompose* iComposer;
99 CActiveScheduler* iScheduler;
102 RFile64 iParsedFileHandle64;
103 RFile64 iComposedFileHandle64;
106 #endif // TSU_3GPLIBRARY_PARSE_COMPOSER_H